Last active
April 1, 2016 00:36
-
-
Save fhrbek/da41bb87e0bb974b2c8bf7e4501fb29b to your computer and use it in GitHub Desktop.
PE Radiator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
const nodeCounts = [ | |
{ | |
id: 'enforcement', | |
counts: { | |
failed: 1, | |
changed: 5, | |
unchanged: 994 | |
} | |
}, | |
{ | |
id: 'noop', | |
counts: { | |
failed: 1, | |
changed: 2, | |
unchanged: 3 | |
} | |
}, | |
]; | |
export default Ember.Route.extend({ | |
model: function () { | |
return nodeCounts; | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
logConvert: function (per) { | |
return Math.log10(per * 999 / 1000 + 1) * 100 / 2; | |
}, | |
label: Ember.computed('stats.id', function() { | |
return this.get('stats.id').capitalize(); | |
}), | |
total: Ember.computed('stats.counts.failed', | |
'stats.counts.changed', | |
'stats.counts.unchanged', | |
function () { | |
return this.get('stats.counts.failed') + | |
this.get('stats.counts.changed') + | |
this.get('stats.counts.unchanged'); | |
}), | |
failedPer: Ember.computed('total', 'stats.counts.failed', function () { | |
return this.get('stats.counts.failed') / this.get('total') * 100; | |
}), | |
changedPer: Ember.computed('total', 'stats.counts.changed', function () { | |
return this.get('stats.counts.changed') / this.get('total') * 100; | |
}), | |
unchangedPer: Ember.computed('total', 'stats.counts.unchanged', function () { | |
return this.get('stats.counts.unchanged') / this.get('total') * 100; | |
}), | |
failedLog: Ember.computed('failedPer', function () { | |
return this.logConvert(this.get('failedPer')); | |
}), | |
changedLog: Ember.computed('changedPer', function () { | |
return this.logConvert(this.get('changedPer')); | |
}), | |
unchangedLog: Ember.computed('unchangedPer', function () { | |
return this.logConvert(this.get('unchangedPer')); | |
}) | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
import config from './config/environment'; | |
const Router = Ember.Router.extend({ | |
location: 'hash' | |
}); | |
Router.map(function() { | |
this.route('log'); | |
this.route('minw'); | |
}); | |
export default Router; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
margin: 12px 16px; | |
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
font-size: 12pt; | |
} | |
.heading { | |
margin-bottom: 10px; | |
} | |
.total { | |
font-size: 2em; | |
} | |
.label { | |
font-size: 1.5em; | |
} | |
.bar-wrapper { | |
height: 30px; | |
width: 100%; | |
margin-bottom: 20px; | |
position: relative; | |
} | |
.bar-label, | |
.bar-total { | |
display: inline-block; | |
font-size: 1.5em; | |
height: 100%; | |
text-align: right; | |
position: absolute; | |
} | |
.bar-label { | |
width: 60%; | |
} | |
.bar-total { | |
left: 60%; | |
right: 0.3em; | |
} | |
.bar-left-wrapper { | |
width: 20%; | |
height: 100%; | |
display: inline-block; | |
position: absolute; | |
} | |
.bar-inner-wrapper { | |
width: 80%; | |
height: 100%; | |
display: inline-block; | |
overflow: hidden; | |
position: absolute; | |
left: 20%; | |
border: 1px solid #000; | |
box-sizing: border-box; | |
} | |
.bar-value { | |
height: 100%; | |
display: inline-block; | |
} | |
.failed .bar-value { | |
background-color: #f88; | |
} | |
.changed .bar-value { | |
background-color: #88f; | |
} | |
.unchanged .bar-value { | |
background-color: #8f8; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.7.1", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": true, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "https://cdnjs.cloudflare.com/ajax/libs/ember.js/2.4.3/ember.debug.js", | |
"ember-data": "https://cdnjs.cloudflare.com/ajax/libs/ember-data.js/2.4.3/ember-data.js", | |
"ember-template-compiler": "https://cdnjs.cloudflare.com/ajax/libs/ember.js/2.4.3/ember-template-compiler.js" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment