From 0f7adbf63994bf15a79cfc28a8eece3c25a096d0 Mon Sep 17 00:00:00 2001 From: Jack Pearkes Date: Wed, 11 Jun 2014 16:54:03 -0400 Subject: [PATCH] ui: show tags inline in list of services in node view --- ui/index.html | 22 ++++++++++++++-------- ui/javascripts/app/helpers.js | 8 ++++++++ 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/ui/index.html b/ui/index.html index 2c51e33a9..cb848da5b 100644 --- a/ui/index.html +++ b/ui/index.html @@ -344,6 +344,13 @@

{{ model.0.Service.Service }}


+
Tags
+
Nodes
{{#each node in model }} @@ -446,17 +453,10 @@

{{ model.Node }} {{ model.Address }}


-
Service Tags
- {{#if model.nodeTags}} -

{{model.nodeTags}}

- {{else}} -

No tags

- {{/if}} -
Services
{{#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" }}
{{service.Service}} @@ -464,6 +464,12 @@ :{{service.Port}}
+ {{/link-to}} {{/each}} diff --git a/ui/javascripts/app/helpers.js b/ui/javascripts/app/helpers.js index 32f87f0db..50b6dc046 100644 --- a/ui/javascripts/app/helpers.js +++ b/ui/javascripts/app/helpers.js @@ -27,3 +27,11 @@ Ember.Handlebars.helper('sessionName', function(session) { return new Handlebars.SafeString(session.Name + ' ' + session.ID + ''); } }); + +// 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"; + } +});