mirror of https://github.com/status-im/consul.git
ui: add panelbar helper
This commit is contained in:
parent
a40a845f91
commit
c0372ddf18
|
@ -379,7 +379,7 @@
|
|||
{{#each check in model.Checks }}
|
||||
|
||||
<div class="panel">
|
||||
<div {{bind-attr class=":panel-bar model.hasFailingChecks:bg-orange:bg-green"}} ></div>
|
||||
{{ panelBar check.Status }}
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
{{check.Name}}
|
||||
|
@ -431,6 +431,7 @@
|
|||
<script src="javascripts/app/models.js"></script>
|
||||
<script src="javascripts/app/views.js"></script>
|
||||
<script src="javascripts/app/controllers.js"></script>
|
||||
<script src="javascripts/app/helpers.js"></script>
|
||||
<!-- to activate the test runner, add the "?test" query string parameter -->
|
||||
<script src="tests/runner.js"></script>
|
||||
<!-- <script src="static/application.min.js"></script> -->
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
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>');
|
||||
});
|
|
@ -15,6 +15,7 @@ app = [
|
|||
"javascripts/app/routes.js",
|
||||
"javascripts/app/controllers.js",
|
||||
"javascripts/app/views.js",
|
||||
"javascripts/app/helpers.js",
|
||||
]
|
||||
|
||||
libs.each do |js_file|
|
||||
|
|
Loading…
Reference in New Issue