Skip to content

Commit

Permalink
Fixes #36328 - display short host name in Content Hosts page
Browse files Browse the repository at this point in the history
  • Loading branch information
lfu committed May 1, 2023
1 parent 918b22b commit 9732437
Show file tree
Hide file tree
Showing 20 changed files with 33 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ angular.module('Bastion.content-hosts').config(['$stateProvider', function ($sta
controller: 'ContentHostDetailsInfoController',
templateUrl: 'content-hosts/details/views/content-host-info.html',
ncyBreadcrumb: {
label: "{{ host.name }}",
label: "{{ host.displayname }}",
parent: 'content-hosts'
}
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<span page-title ng-model="host">{{ 'Packages for: ' | translate }} {{ host.name }}</span>
<span page-title ng-model="host">{{ 'Packages for: ' | translate }} {{ host.displayname }}</span>

<section ng-hide="denied('edit_hosts', host)" bst-feature-flag="remote_actions">
<h4 translate>Package Actions</h4>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<span page-title ng-model="host">{{ 'Deb Packages for: ' | translate }} {{ host.name }}</span>
<span page-title ng-model="host">{{ 'Deb Packages for: ' | translate }} {{ host.displayname }}</span>

<h3 translate>Applicable Deb Packages</h3>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<span page-title ng-model="host">{{ 'Packages for: ' | translate }} {{ host.name }}</span>
<span page-title ng-model="host">{{ 'Packages for: ' | translate }} {{ host.displayname }}</span>

<section ng-hide="denied('edit_hosts', host)" bst-feature-flag="remote_actions">
<p bst-alert="info" ng-hide="remoteExecutionPresent">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<span page-title ng-model="host">{{ 'Errata for: ' | translate }} {{ host.name }}</span>
<span page-title ng-model="host">{{ 'Errata for: ' | translate }} {{ host.displayname }}</span>

<div bst-feature-flag="remote_actions">
<h3 translate ng-hide="selectedErrataOption === 'current'">Applicable Errata</h3>
Expand Down Expand Up @@ -55,8 +55,8 @@ <h3 translate ng-show="selectedErrataOption === 'current'">Installable Errata</h

<span data-block="list-actions" ng-hide="contentHost.readonly">
<div bst-modal="applySelected()" model="host">
<div data-block="modal-header" translate>Apply Errata to Content Host "{{host.name}}"?</div>
<div data-block="modal-body" translate>Are you sure you want to apply Errata to content host "{{ host.name }}"?</div>
<div data-block="modal-header" translate>Apply Errata to Content Host "{{host.displayname}}"?</div>
<div data-block="modal-body" translate>Are you sure you want to apply Errata to content host "{{ host.displayname }}"?</div>
<span data-block="modal-confirm-button">
<button class="btn btn-primary" ng-click="ok()">
<span translate>Apply</span>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<span page-title ng-model="host">{{ 'Module Streams for: ' | translate }} {{ host.name }}</span>
<span page-title ng-model="host">{{ 'Module Streams for: ' | translate }} {{ host.displayname }}</span>
<div bst-feature-flag="remote_actions">
<h3 translate ng-hide="selectedModuleStreamOption === 'available'">Available Module Streams</h3>
</div>
Expand Down Expand Up @@ -59,7 +59,7 @@ <h3 translate ng-hide="selectedModuleStreamOption === 'available'">Available Mod
<tbody>
<tr bst-table-row ng-repeat="module in table.rows">
<td bst-table-cell>
<a href="/module_streams?search=module_spec%3D{{ module.module_spec }}+and+host%3D{{ host.name }}">
<a href="/module_streams?search=module_spec%3D{{ module.module_spec }}+and+host%3D{{ host.displayname }}">
{{ module.name }}</a></td>
<td bst-table-cell>{{ module.stream }}</td>
<td bst-table-cell>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<span page-title ng-model="host">{{ 'Packages for: ' | translate }} {{ host.name }}</span>
<span page-title ng-model="host">{{ 'Packages for: ' | translate }} {{ host.displayname }}</span>

<section ng-hide="denied('edit_hosts', host)" bst-feature-flag="remote_actions">
<h4 translate>Package Actions</h4>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<span page-title ng-model="host">{{ 'Packages for: ' | translate }} {{ host.name }}</span>
<span page-title ng-model="host">{{ 'Packages for: ' | translate }} {{ host.displayname }}</span>

<h3 translate>Applicable Packages</h3>
<div ng-show="katelloAgentPresent" data-extend-template="common/views/katello-agent-notice.html"></div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<span page-title ng-model="host">{{ 'Packages for: ' | translate }} {{ host.name }}</span>
<span page-title ng-model="host">{{ 'Packages for: ' | translate }} {{ host.displayname }}</span>

<h3 translate>Installed Packages</h3>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<span page-title ng-model="host">{{ 'Traces for: ' | translate }} {{ host.name }}</span>
<span page-title ng-model="host">{{ 'Traces for: ' | translate }} {{ host.displayname }}</span>

<div ng-hide="host.hasContent()">
<div data-extend-template="common/views/registration.html"></div>
Expand Down Expand Up @@ -39,9 +39,9 @@ <h4 translate>Tracer helps administrators identify applications that need to be
<div data-extend-template="layouts/partials/table.html">
<span data-block="list-actions" ng-hide="contentHost.readonly">
<div bst-modal="performViaRemoteExecution(false)" model="host">
<div data-block="modal-header" translate>Restart Services on Content Host "{{host.name}}"?</div>
<div data-block="modal-header" translate>Restart Services on Content Host "{{host.displayname}}"?</div>
<div data-block="modal-body">
<span translate>Are you sure you want to restart services on content host "{{ host.name }}"?</span>
<span translate>Are you sure you want to restart services on content host "{{ host.displayname }}"?</span>
<span ng-show="host.rebootRequired()">
<strong translate>Resolving the selected Traces will reboot this host.</strong>
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostAddHostCollection

success = function (response) {
Notification.setSuccessMessage(translate('Added %x host collections to content host "%y".')
.replace('%x', $scope.table.numSelected).replace('%y', host.name));
.replace('%x', $scope.table.numSelected).replace('%y', host.displayname));
$scope.table.working = false;
$scope.table.selectAll(false);
nutupane.refresh();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ angular.module('Bastion.content-hosts').controller('ContentHostHostCollectionsCo

success = function (response) {
var message = translate('Removed %x host collections from content host "%y".')
.replace('%x', $scope.table.numSelected).replace('%y', host.name);
.replace('%x', $scope.table.numSelected).replace('%y', host.displayname);

Notification.setSuccessMessage(message);
$scope.table.working = false;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<span page-title ng-model="host">{{ 'Add Subscriptions for Content Host:' | translate }} {{ host.name }}</span>
<span page-title ng-model="host">{{ 'Add Subscriptions for Content Host:' | translate }} {{ host.displayname }}</span>

<div data-extend-template="layouts/partials/table.html">
<div data-block="list-actions">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<span page-title ng-model="host">{{ 'Content Host:' | translate }} {{ host.name }}</span>
<span page-title ng-model="host">{{ 'Content Host:' | translate }} {{ host.displayname }}</span>

<div data-extend-template="layouts/details-page-with-breadcrumbs.html">
<header data-block="header" translate>
{{ host.name }}
{{ host.displayname }}
</header>

<nav data-block="item-actions">
Expand All @@ -15,7 +15,7 @@

<div bst-modal="unregisterContentHost(host)" model="host">
<div data-block="modal-header" translate>
Unregister Host "{{host.name}}"?
Unregister Host "{{host.displayname}}"?
</div>
<div data-block="modal-body">
<p translate>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<span page-title ng-model="host">{{ 'Host Collections for:' | translate }} {{ host.name }}</span>
<span page-title ng-model="host">{{ 'Host Collections for:' | translate }} {{ host.displayname }}</span>

<h4 translate>Host Collection Management</h4>
<nav>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<span page-title ng-model="host">{{ 'Content Host' | translate }} {{ host.name }}</span>
<span page-title ng-model="host">{{ 'Content Host' | translate }} {{ host.displayname }}</span>

<div ng-hide="host.hasSubscription()">
<div data-extend-template="common/views/registration.html"></div>
Expand All @@ -11,7 +11,7 @@ <h4 translate>Basic Information</h4>

<dl class="dl-horizontal dl-horizontal-left">
<dt translate>Name</dt>
<dd bst-edit-text="host.name"
<dd bst-edit-text="host.displayname"
readonly="denied('edit_hosts', host)"
on-save="save(host)">
</dd>
Expand Down Expand Up @@ -79,7 +79,7 @@ <h4 translate>Basic Information</h4>

<dt ng-show="host.subscription_facet_attributes.virtual_host" translate>Virtual Host</dt>
<dd ng-show="host.subscription_facet_attributes.virtual_host">
<a ui-sref="content-host.info({hostId: host.subscription_facet_attributes.virtual_host.id })">{{ host.subscription_facet_attributes.virtual_host.name }}</a>
<a ui-sref="content-host.info({hostId: host.subscription_facet_attributes.virtual_host.id })">{{ host.subscription_facet_attributes.virtual_host.displayname }}</a>
</dd>
</dl>

Expand Down Expand Up @@ -359,7 +359,7 @@ <h4 translate>Networking</h4>

<dl class="dl-horizontal dl-horizontal-left">
<dt translate>Hostname</dt>
<dd>{{ host.name }}</dd>
<dd>{{ host.displayname }}</dd>

<dt translate>IPv4 Address</dt>
<dd>{{ host.facts["network::ipv4_address"] }}</dd>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<span page-title ng-model="host">{{ 'Content Host' | translate }} {{ host.name }}</span>
<span page-title ng-model="host">{{ 'Content Host' | translate }} {{ host.displayname }}</span>

<div data-extend-template="layouts/two-column-details.html">
<div data-block="left-column">
Expand All @@ -8,7 +8,7 @@ <h4 translate>Provisioning Host Details</h4>
<dt translate>Name</dt>
<dd>
<a href="/hosts/{{ host.name }}">
{{ host.name }}
{{ host.displayname }}
</a>
</dd>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<span page-title ng-model="host">{{ 'Subscriptions for Content Host:' | translate }} {{ host.name }}</span>
<span page-title ng-model="host">{{ 'Subscriptions for Content Host:' | translate }} {{ host.displayname }}</span>

<div data-extend-template="layouts/partials/table.html">
<div data-block="list-actions">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<span page-title ng-model="host">{{ 'Subscriptions for: ' | translate }} {{ host.name }}</span>
<span page-title ng-model="host">{{ 'Subscriptions for: ' | translate }} {{ host.displayname }}</span>

<div ng-hide="host.hasSubscription()">
<div data-extend-template="common/views/registration.html"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ <h2 translate>Content Hosts</h2>
ng-controller="ContentHostStatusController">
<td bst-table-cell>
<span ng-switch="newHostDetailsUI">
<a ng-switch-when="true" ng-if="host.subscription_facet_attributes.uuid" ng-href="/new/hosts/{{host.name}}/content">{{ host.name }}</a>
<a ng-switch-when="true" ng-if="!host.subscription_facet_attributes.uuid" ng-href="/new/hosts/{{host.name}}">{{ host.name}}</a>
<a ng-switch-when="false" ui-sref="content-host.info({hostId: host.id})">{{ host.name }}</a>
<a ng-switch-when="true" ng-if="host.subscription_facet_attributes.uuid" ng-href="/new/hosts/{{host.name}}/content">{{ host.displayname }}</a>
<a ng-switch-when="true" ng-if="!host.subscription_facet_attributes.uuid" ng-href="/new/hosts/{{host.name}}">{{ host.displayname }}</a>
<a ng-switch-when="false" ui-sref="content-host.info({hostId: host.id})">{{ host.displayname }}</a>
</span>
</td>
<td bst-table-cell ng-hide="simpleContentAccessEnabled">
Expand Down

0 comments on commit 9732437

Please sign in to comment.