mirror of
https://github.com/ansible/awx.git
synced 2026-01-15 20:00:43 -03:30
show/hide Insights action buttons
to prevent the user from navigating to the insights dashboard if they don't have their insights inventory configured with an insights credential.
This commit is contained in:
parent
5ab1a76785
commit
74c486a4cd
@ -126,7 +126,7 @@ function(i18n) {
|
||||
dataPlacement: 'top',
|
||||
title: i18n._('Insights'),
|
||||
skipGenerator: true,
|
||||
ngIf: 'host.insights_system_id!==null'
|
||||
ngIf: "host.insights_system_id!==null && host.summary_fields.inventory.hasOwnProperty('insights_credential_id')"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -74,7 +74,7 @@
|
||||
</td>
|
||||
<td class="List-actionsContainer">
|
||||
<div class="List-actionButtonCell List-tableCell">
|
||||
<button id="insights-action" class="List-actionButton " data-placement="top" ng-click="goToInsights(host.id)" aw-tool-tip="View Insights Data" ng-show="host.insights_system_id">
|
||||
<button id="insights-action" class="List-actionButton " data-placement="top" ng-click="goToInsights(host.id)" aw-tool-tip="View Insights Data" ng-show="host.insights_system_id && host.summary_fields.inventory.hasOwnProperty('insights_credential_id')">
|
||||
<i class="fa fa-info"></i>
|
||||
</button>
|
||||
<button id="edit-action" class="List-actionButton " ng-class="{'List-editButton--selected' : $stateParams['host_id'] == host.id}" data-placement="top" ng-click="editHost(host.id)" aw-tool-tip="Edit host" ng-show="host.summary_fields.user_capabilities.edit">
|
||||
|
||||
@ -126,7 +126,7 @@ function(i18n) {
|
||||
dataPlacement: 'top',
|
||||
title: i18n._('Insights'),
|
||||
skipGenerator: true,
|
||||
ngIf: 'host.insights_system_id!==null'
|
||||
ngIf: "host.insights_system_id!==null && host.summary_fields.inventory.hasOwnProperty('insights_credential_id')"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -86,7 +86,7 @@ export default ['i18n', function(i18n) {
|
||||
icon: 'fa-info',
|
||||
awToolTip: 'View Insights Data',
|
||||
dataPlacement: 'top',
|
||||
ngShow: 'host.insights_system_id'
|
||||
ngShow: 'host.insights_system_id && host.summary_fields.inventory.hasOwnProperty("insights_credential_id")'
|
||||
},
|
||||
edit: {
|
||||
//label: 'Edit',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user