ui: show tags inline in list of services in node view
This commit is contained in:
parent
8f4799a062
commit
0f7adbf639
|
@ -344,6 +344,13 @@
|
|||
<h3 class="no-margin">{{ model.0.Service.Service }}</h3>
|
||||
<hr>
|
||||
|
||||
<h5>Tags</h5>
|
||||
<ul class="list-inline">
|
||||
{{#each tag in model.service.Tags}}
|
||||
{{serviceTag tag}}
|
||||
{{/each}}
|
||||
{{serviceTagMessage service.Tags}}
|
||||
</ul>
|
||||
<h5>Nodes</h5>
|
||||
|
||||
{{#each node in model }}
|
||||
|
@ -446,17 +453,10 @@
|
|||
<h3 class="no-margin">{{ model.Node }} <small> {{ model.Address }}</small></h3>
|
||||
<hr>
|
||||
|
||||
<h5>Service Tags</h5>
|
||||
{{#if model.nodeTags}}
|
||||
<p class="bold">{{model.nodeTags}}</p>
|
||||
{{else}}
|
||||
<p class="light small">No tags</p>
|
||||
{{/if}}
|
||||
|
||||
<h5>Services</h5>
|
||||
|
||||
{{#each service in model.Services }}
|
||||
{{#link-to 'services.show' service.Service tagName="div" href=false class="list-group-item list-condensed-link" }}
|
||||
{{#link-to 'services.show' service.Service tagName="div" href=false class="list-group-item list-condensed-link double-line" }}
|
||||
<div class="list-bar-horizontal bg-light-gray"></div>
|
||||
<div class="name">
|
||||
{{service.Service}}
|
||||
|
@ -464,6 +464,12 @@
|
|||
:{{service.Port}}
|
||||
</small>
|
||||
</div>
|
||||
<ul class="list-inline sub">
|
||||
{{#each tag in service.Tags}}
|
||||
{{serviceTag tag}}
|
||||
{{/each}}
|
||||
{{serviceTagMessage service.Tags}}
|
||||
</ul>
|
||||
{{/link-to}}
|
||||
|
||||
{{/each}}
|
||||
|
|
|
@ -27,3 +27,11 @@ Ember.Handlebars.helper('sessionName', function(session) {
|
|||
return new Handlebars.SafeString(session.Name + ' <small>' + session.ID + '</small>');
|
||||
}
|
||||
});
|
||||
|
||||
// We need to do this because of our global namespace properties. The
|
||||
// service.Tags
|
||||
Ember.Handlebars.helper('serviceTagMessage', function(tags) {
|
||||
if (tags === null) {
|
||||
return "No tags";
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue