mirror of
https://github.com/status-im/consul.git
synced 2025-01-09 21:35:52 +00:00
30 lines
802 B
JavaScript
30 lines
802 B
JavaScript
Ember.Handlebars.helper('panelBar', function(status) {
|
|
var highlightClass;
|
|
|
|
if (status == "passing") {
|
|
highlightClass = "bg-green";
|
|
} else {
|
|
highlightClass = "bg-orange";
|
|
}
|
|
return new Handlebars.SafeString('<div class="panel-bar ' + highlightClass + '"></div>');
|
|
});
|
|
|
|
Ember.Handlebars.helper('listBar', function(status) {
|
|
var highlightClass;
|
|
|
|
if (status == "passing") {
|
|
highlightClass = "bg-green";
|
|
} else {
|
|
highlightClass = "bg-orange";
|
|
}
|
|
return new Handlebars.SafeString('<div class="list-bar-horizontal ' + highlightClass + '"></div>');
|
|
});
|
|
|
|
Ember.Handlebars.helper('sessionName', function(session) {
|
|
if (session.Name === "") {
|
|
return session.ID;
|
|
} else {
|
|
return new Handlebars.SafeString(session.Name + ' <small>' + session.ID + '</small>');
|
|
}
|
|
});
|