Show ports on pods list

otherwise pods with different ports (or without port) all look the same,
like if they are duplicates
This commit is contained in:
Benjamin Neff 2022-10-31 01:08:34 +01:00
parent 8334eeeeff
commit 800f394870
No known key found for this signature in database
GPG key ID: 971464C3F1A90194
3 changed files with 3 additions and 1 deletions

View file

@ -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"),

View file

@ -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>

View file

@ -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,