Merge pull request #6878 from jaredevantabor/insights

show/hide Insights action buttons
This commit is contained in:
Jared Tabor 2017-07-06 09:45:31 -07:00 committed by GitHub
commit 270d88be1d
4 changed files with 4 additions and 4 deletions

View File

@ -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')"
}
}
};

View File

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

View File

@ -124,7 +124,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')"
}
}
};

View File

@ -78,7 +78,7 @@ export default ['i18n', function(i18n) {
icon: 'fa-info',
awToolTip: i18n._('View Insights Data'),
dataPlacement: 'top',
ngShow: 'host.insights_system_id'
ngShow: 'host.insights_system_id && host.summary_fields.inventory.hasOwnProperty("insights_credential_id")'
},
edit: {
ngClick: "editHost(host)",