1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-30 22:21:13 +03:00

Update more urls

This commit is contained in:
Jeff Bradberry 2019-04-11 14:46:13 -04:00
parent 10cfac2f0e
commit 11b85250e8
3 changed files with 6 additions and 3 deletions

View File

@ -1655,7 +1655,8 @@ class HostInsights(GenericAPIView):
return res.json()
except ValueError:
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):
session = requests.Session()

View File

@ -129,5 +129,7 @@ class TestHostInsights:
url = reverse('api:host_insights', kwargs={'pk': host.pk})
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

View File

@ -7,7 +7,7 @@
export default function(){
return function(plan) {
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 {
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>`;