mirror of
https://github.com/ansible/awx.git
synced 2026-05-13 12:27:37 -02:30
Update more urls
This commit is contained in:
@@ -1655,7 +1655,8 @@ class HostInsights(GenericAPIView):
|
|||||||
return res.json()
|
return res.json()
|
||||||
except ValueError:
|
except ValueError:
|
||||||
raise BadGateway(
|
raise BadGateway(
|
||||||
_('Expected JSON response from Insights but instead got {}').format(res.content))
|
_('Expected JSON response from Insights at URL {}'
|
||||||
|
' but instead got {}').format(url, res.content))
|
||||||
|
|
||||||
def _get_session(self, username, password):
|
def _get_session(self, username, password):
|
||||||
session = requests.Session()
|
session = requests.Session()
|
||||||
|
|||||||
@@ -129,5 +129,7 @@ class TestHostInsights:
|
|||||||
url = reverse('api:host_insights', kwargs={'pk': host.pk})
|
url = reverse('api:host_insights', kwargs={'pk': host.pk})
|
||||||
response = get(url, user('admin', True))
|
response = get(url, user('admin', True))
|
||||||
|
|
||||||
assert response.data['error'] == "Expected JSON response from Insights but instead got booo!"
|
assert response.data['error'].startswith("Expected JSON response from Insights at URL")
|
||||||
|
assert 'insights_id=123e4567-e89b-12d3-a456-426655440000' in response.data['error']
|
||||||
|
assert response.data['error'].endswith("but instead got booo!")
|
||||||
assert response.status_code == 502
|
assert response.status_code == 502
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
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://access.redhat.com/insights/info/' target='_blank'>CREATE A NEW PLAN IN INSIGHTS</a>";
|
return "PLAN: Not Available <a href='https://cloud.redhat.com/insights/planner/' 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/planner/${plan.id}" target="_blank">${name} (${plan.id})</a>`;
|
||||||
|
|||||||
Reference in New Issue
Block a user