diff options
author | Benjamin Neff <benjamin@coding4coffee.ch> | 2022-10-31 03:08:34 +0300 |
---|---|---|
committer | Benjamin Neff <benjamin@coding4coffee.ch> | 2022-10-31 03:45:13 +0300 |
commit | 800f3948702be34a56ee5395b0ad1fa003e99372 (patch) | |
tree | c6d7915da71a9f6817ee37fa997f7c548154f463 | |
parent | 8334eeeeff869b2de4457cf5004e490a01542d44 (diff) |
Show ports on pods list
otherwise pods with different ports (or without port) all look the same,
like if they are duplicates
-rw-r--r-- | app/assets/javascripts/app/views/pod_entry_view.js | 1 | ||||
-rw-r--r-- | app/assets/templates/pod_table_entry_tpl.jst.hbs | 2 | ||||
-rw-r--r-- | spec/javascripts/app/views/pod_entry_view_spec.js | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/app/assets/javascripts/app/views/pod_entry_view.js b/app/assets/javascripts/app/views/pod_entry_view.js index 5e45267d1..3d3d098ab 100644 --- a/app/assets/javascripts/app/views/pod_entry_view.js +++ b/app/assets/javascripts/app/views/pod_entry_view.js @@ -27,6 +27,7 @@ app.views.PodEntry = app.views.Base.extend({ presenter: function() { return _.extend({}, this.defaultPresenter(), { /* jshint camelcase: false */ + hasPort: (this.model.get("port") >= 0), is_unchecked: (this.model.get("status")==="unchecked"), has_no_errors: (this.model.get("status")==="no_errors"), has_errors: (this.model.get("status")!=="no_errors"), diff --git a/app/assets/templates/pod_table_entry_tpl.jst.hbs b/app/assets/templates/pod_table_entry_tpl.jst.hbs index 3c2bb0605..76940a4a5 100644 --- a/app/assets/templates/pod_table_entry_tpl.jst.hbs +++ b/app/assets/templates/pod_table_entry_tpl.jst.hbs @@ -7,7 +7,7 @@ {{/if}} </i> </td> -<td class="pod-title" title="{{host}}">{{host}}</td> +<td class="pod-title" title="{{host}}">{{host}}{{#if hasPort}}:{{port}}{{/if}}</td> <td class="added"> <small><time datetime="{{created_at}}" title="{{localTime created_at}}"></time></small> </td> diff --git a/spec/javascripts/app/views/pod_entry_view_spec.js b/spec/javascripts/app/views/pod_entry_view_spec.js index c7b6f8968..8840cd022 100644 --- a/spec/javascripts/app/views/pod_entry_view_spec.js +++ b/spec/javascripts/app/views/pod_entry_view_spec.js @@ -36,6 +36,7 @@ describe("app.views.PodEntry", function() { var actual = this.view.presenter(); expect(actual).toEqual(jasmine.objectContaining({ /* jshint camelcase: false */ + hasPort: false, is_unchecked: false, has_no_errors: true, has_errors: false, |