Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #36328 - display short host name in Content Hosts page #10538

Merged
merged 1 commit into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.display_name }}",
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.display_name }}</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.display_name }}</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.display_name }}</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.display_name }}</span>

<div bst-feature-flag="remote_actions">
<h3 translate ng-hide="selectedErrataOption === 'current'">Applicable Errata</h3>
Expand Down Expand Up @@ -53,8 +53,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>
Comment on lines +56 to +57
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lfu Do you think this should be {{host.display_name}}?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are correct!

<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.display_name }}</span>
<div bst-feature-flag="remote_actions">
<h3 translate ng-hide="selectedModuleStreamOption === 'available'">Available Module Streams</h3>
</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.display_name }}</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.display_name }}</span>

<h3 translate>Applicable 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.display_name }}</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.display_name }}</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>
Comment on lines +42 to +44
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lfu Same here

<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.display_name));
$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.display_name);

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.display_name }}</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.display_name }}</span>

<div data-extend-template="layouts/details-page-with-breadcrumbs.html">
<header data-block="header" translate>
{{ host.name }}
{{ host.display_name }}
</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.display_name}}"?
</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.display_name }}</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.display_name }}</span>

<div ng-hide="host.hasSubscription()">
<div data-extend-template="common/views/registration.html"></div>
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.display_name }}</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.display_name }}</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.display_name }}
</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.display_name }}</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.display_name }}</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 @@ -104,9 +104,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.display_name }}</a>
<a ng-switch-when="true" ng-if="!host.subscription_facet_attributes.uuid" ng-href="/new/hosts/{{host.name}}">{{ host.display_name }}</a>
<a ng-switch-when="false" ui-sref="content-host.info({hostId: host.id})">{{ host.display_name }}</a>
</span>
</td>
<td bst-table-cell ng-hide="simpleContentAccessEnabled">
Expand Down