mirror of
https://github.com/ansible/awx.git
synced 2026-03-13 23:17:32 -02:30
Update the front-end Insights urls
This commit is contained in:
@@ -5,7 +5,8 @@
|
|||||||
"per_page": 50,
|
"per_page": 50,
|
||||||
"results": [
|
"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"
|
"updated": "2019-03-19T21:59:09.213151-04:00"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ def filter_insights_api_response(platform_info, reports, remediations):
|
|||||||
}
|
}
|
||||||
|
|
||||||
new_json = {
|
new_json = {
|
||||||
|
'platform_id': platform_info['id'],
|
||||||
'last_check_in': platform_info.get('updated'),
|
'last_check_in': platform_info.get('updated'),
|
||||||
'reports': [],
|
'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 && InventoryData.summary_fields.insights_credential.id) ?
|
||||||
InventoryData.summary_fields.insights_credential.id : null;
|
InventoryData.summary_fields.insights_credential.id : null;
|
||||||
$scope.canRemediate = CanRemediate;
|
$scope.canRemediate = CanRemediate;
|
||||||
|
$scope.platformId = $scope.reports_dataset.platform_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
function filter(str){
|
function filter(str){
|
||||||
@@ -40,7 +41,7 @@ function (data, $scope, moment, $state, InventoryData, InsightsService,
|
|||||||
};
|
};
|
||||||
|
|
||||||
$scope.viewDataInInsights = function(){
|
$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){
|
$scope.remediateInventory = function(inv_id, insights_credential){
|
||||||
|
|||||||
@@ -7,10 +7,10 @@
|
|||||||
export default function(){
|
export default function(){
|
||||||
return function(plan) {
|
return function(plan) {
|
||||||
if(plan === null || plan === undefined){
|
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 {
|
} else {
|
||||||
let name = (plan.name === null) ? "Unnamed Plan" : plan.name;
|
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>`;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user