mirror of
https://github.com/ansible/awx.git
synced 2026-05-18 06:47:41 -02:30
Redirect to Instances/{nodeId}/details page.
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
import * as d3 from 'd3';
|
import * as d3 from 'd3';
|
||||||
import { InstancesAPI } from 'api';
|
|
||||||
import { truncateString } from '../../../util/strings';
|
import { truncateString } from '../../../util/strings';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -34,13 +33,8 @@ export function renderNodeIcon(selectedNode) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function redirectToDetailsPage(selectedNode, history) {
|
export async function redirectToDetailsPage(selectedNode, history) {
|
||||||
// TODO: redirect to top-level instances details page
|
|
||||||
const { id: nodeId } = selectedNode;
|
const { id: nodeId } = selectedNode;
|
||||||
const {
|
const constructedURL = `/instances/${nodeId}/details`;
|
||||||
data: { results },
|
|
||||||
} = await InstancesAPI.readInstanceGroup(nodeId);
|
|
||||||
const { id: instanceGroupId } = results[0];
|
|
||||||
const constructedURL = `/instance_groups/${instanceGroupId}/instances/${nodeId}/details`;
|
|
||||||
history.push(constructedURL);
|
history.push(constructedURL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user