mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 06:51:10 +03:00
Update the front-end Insights urls
This commit is contained in:
parent
49ba6c6b3d
commit
6ff539e6ee
@ -5,7 +5,8 @@
|
||||
"per_page": 50,
|
||||
"results": [
|
||||
{
|
||||
"insights_id": "11111111-1111-1111-1111-111111111111",
|
||||
"id": "11111111-1111-1111-1111-111111111111",
|
||||
"insights_id": "22222222-2222-2222-2222-222222222222",
|
||||
"updated": "2019-03-19T21:59:09.213151-04:00"
|
||||
}
|
||||
]
|
||||
|
@ -24,6 +24,7 @@ def filter_insights_api_response(platform_info, reports, remediations):
|
||||
}
|
||||
|
||||
new_json = {
|
||||
'platform_id': platform_info['id'],
|
||||
'last_check_in': platform_info.get('updated'),
|
||||
'reports': [],
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ function (data, $scope, moment, $state, InventoryData, InsightsService,
|
||||
InventoryData.summary_fields.insights_credential && InventoryData.summary_fields.insights_credential.id) ?
|
||||
InventoryData.summary_fields.insights_credential.id : null;
|
||||
$scope.canRemediate = CanRemediate;
|
||||
$scope.platformId = $scope.reports_dataset.platform_id;
|
||||
}
|
||||
|
||||
function filter(str){
|
||||
@ -40,7 +41,7 @@ function (data, $scope, moment, $state, InventoryData, InsightsService,
|
||||
};
|
||||
|
||||
$scope.viewDataInInsights = function(){
|
||||
window.open(`https://access.redhat.com/insights/inventory?machine=${$scope.$parent.host.insights_system_id}`, '_blank');
|
||||
window.open(`https://cloud.redhat.com/insights/inventory/${$scope.platform_id}/insights`, '_blank');
|
||||
};
|
||||
|
||||
$scope.remediateInventory = function(inv_id, insights_credential){
|
||||
|
@ -7,10 +7,10 @@
|
||||
export default function(){
|
||||
return function(plan) {
|
||||
if(plan === null || plan === undefined){
|
||||
return "PLAN: Not Available <a href='https://cloud.redhat.com/insights/planner/' target='_blank'>CREATE A NEW PLAN IN INSIGHTS</a>";
|
||||
return "PLAN: Not Available <a href='https://cloud.redhat.com/insights/remediations/' target='_blank'>CREATE A NEW PLAN IN INSIGHTS</a>";
|
||||
} else {
|
||||
let name = (plan.name === null) ? "Unnamed Plan" : plan.name;
|
||||
return `<a href="https://cloud.redhat.com/insights/planner/${plan.id}" target="_blank">${name} (${plan.id})</a>`;
|
||||
return `<a href="https://cloud.redhat.com/insights/remediations/${plan.id}" target="_blank">${name} (${plan.id})</a>`;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user