Skip to content

Commit

Permalink
Update Mesh.js to allow for running AWX at non-root path (URL prefixi…
Browse files Browse the repository at this point in the history
…ng) (#14020)

Co-authored-by: Michael Abashian <[email protected]>
  • Loading branch information
rakesh561 and mabashian authored Jun 5, 2023
1 parent aafd4df commit 9009a21
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion awx/ui/src/api/models/JobEvents.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Base from '../Base';
class JobEvents extends Base {
constructor(http) {
super(http);
this.baseUrl = '/api/v2/job_events/';
this.baseUrl = 'api/v2/job_events/';
}

readChildren(id, params) {
Expand Down
2 changes: 1 addition & 1 deletion awx/ui/src/api/models/Mesh.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Base from '../Base';
class Mesh extends Base {
constructor(http) {
super(http);
this.baseUrl = '/api/v2/mesh_visualizer/';
this.baseUrl = 'api/v2/mesh_visualizer/';
}
}
export default Mesh;
2 changes: 1 addition & 1 deletion awx/ui/src/api/models/Root.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Root extends Base {
constructor(http) {
super(http);
this.baseUrl = 'api/';
this.redirectURL = '/api/v2/config/';
this.redirectURL = 'api/v2/config/';
}

async login(username, password, redirect = this.redirectURL) {
Expand Down
2 changes: 1 addition & 1 deletion awx/ui/src/api/models/Root.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe('RootAPI', () => {

expect(mockHttp.post).toHaveBeenCalledTimes(2);
expect(mockHttp.post.mock.calls[0]).toContainEqual(
'username=foo&password=bar&next=%2Fapi%2Fv2%2Fconfig%2F'
'username=foo&password=bar&next=api%2Fv2%2Fconfig%2F'
);
expect(mockHttp.post.mock.calls[1]).toContainEqual(
'username=foo&password=bar&next=baz'
Expand Down

0 comments on commit 9009a21

Please sign in to comment.