mirror of
https://github.com/ansible/awx.git
synced 2026-03-18 01:17:35 -02:30
Make UI work when not running at root path
This commit is contained in:
@@ -3,7 +3,7 @@ import Base from '../Base';
|
|||||||
class ActivityStream extends Base {
|
class ActivityStream extends Base {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/activity_stream/';
|
this.baseUrl = 'api/v2/activity_stream/';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import RunnableMixin from '../mixins/Runnable.mixin';
|
|||||||
class AdHocCommands extends RunnableMixin(Base) {
|
class AdHocCommands extends RunnableMixin(Base) {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/ad_hoc_commands/';
|
this.baseUrl = 'api/v2/ad_hoc_commands/';
|
||||||
}
|
}
|
||||||
|
|
||||||
readCredentials(id) {
|
readCredentials(id) {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Base from '../Base';
|
|||||||
class Applications extends Base {
|
class Applications extends Base {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/applications/';
|
this.baseUrl = 'api/v2/applications/';
|
||||||
}
|
}
|
||||||
|
|
||||||
readTokens(appId, params) {
|
readTokens(appId, params) {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Base from '../Base';
|
|||||||
class Auth extends Base {
|
class Auth extends Base {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/auth/';
|
this.baseUrl = 'api/v2/auth/';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Base from '../Base';
|
|||||||
class Config extends Base {
|
class Config extends Base {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/config/';
|
this.baseUrl = 'api/v2/config/';
|
||||||
this.read = this.read.bind(this);
|
this.read = this.read.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Base from '../Base';
|
|||||||
class CredentialInputSources extends Base {
|
class CredentialInputSources extends Base {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/credential_input_sources/';
|
this.baseUrl = 'api/v2/credential_input_sources/';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Base from '../Base';
|
|||||||
class CredentialTypes extends Base {
|
class CredentialTypes extends Base {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/credential_types/';
|
this.baseUrl = 'api/v2/credential_types/';
|
||||||
}
|
}
|
||||||
|
|
||||||
async loadAllTypes(
|
async loadAllTypes(
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ describe('CredentialTypesAPI', () => {
|
|||||||
|
|
||||||
expect(mockHttp.get).toHaveBeenCalledTimes(1);
|
expect(mockHttp.get).toHaveBeenCalledTimes(1);
|
||||||
expect(mockHttp.get.mock.calls[0]).toEqual([
|
expect(mockHttp.get.mock.calls[0]).toEqual([
|
||||||
`/api/v2/credential_types/`,
|
`api/v2/credential_types/`,
|
||||||
{ params: { page_size: 200 } },
|
{ params: { page_size: 200 } },
|
||||||
]);
|
]);
|
||||||
expect(types).toEqual(typesData);
|
expect(types).toEqual(typesData);
|
||||||
@@ -41,11 +41,11 @@ describe('CredentialTypesAPI', () => {
|
|||||||
|
|
||||||
expect(mockHttp.get).toHaveBeenCalledTimes(2);
|
expect(mockHttp.get).toHaveBeenCalledTimes(2);
|
||||||
expect(mockHttp.get.mock.calls[0]).toEqual([
|
expect(mockHttp.get.mock.calls[0]).toEqual([
|
||||||
`/api/v2/credential_types/`,
|
`api/v2/credential_types/`,
|
||||||
{ params: { page_size: 200 } },
|
{ params: { page_size: 200 } },
|
||||||
]);
|
]);
|
||||||
expect(mockHttp.get.mock.calls[1]).toEqual([
|
expect(mockHttp.get.mock.calls[1]).toEqual([
|
||||||
`/api/v2/credential_types/`,
|
`api/v2/credential_types/`,
|
||||||
{ params: { page_size: 200, page: 2 } },
|
{ params: { page_size: 200, page: 2 } },
|
||||||
]);
|
]);
|
||||||
expect(types).toHaveLength(4);
|
expect(types).toHaveLength(4);
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Base from '../Base';
|
|||||||
class Credentials extends Base {
|
class Credentials extends Base {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/credentials/';
|
this.baseUrl = 'api/v2/credentials/';
|
||||||
|
|
||||||
this.readAccessList = this.readAccessList.bind(this);
|
this.readAccessList = this.readAccessList.bind(this);
|
||||||
this.readAccessOptions = this.readAccessOptions.bind(this);
|
this.readAccessOptions = this.readAccessOptions.bind(this);
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Base from '../Base';
|
|||||||
class Dashboard extends Base {
|
class Dashboard extends Base {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/dashboard/';
|
this.baseUrl = 'api/v2/dashboard/';
|
||||||
}
|
}
|
||||||
|
|
||||||
readJobGraph(params) {
|
readJobGraph(params) {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Base from '../Base';
|
|||||||
class ExecutionEnvironments extends Base {
|
class ExecutionEnvironments extends Base {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/execution_environments/';
|
this.baseUrl = 'api/v2/execution_environments/';
|
||||||
}
|
}
|
||||||
|
|
||||||
readUnifiedJobTemplates(id, params) {
|
readUnifiedJobTemplates(id, params) {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Base from '../Base';
|
|||||||
class Groups extends Base {
|
class Groups extends Base {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/groups/';
|
this.baseUrl = 'api/v2/groups/';
|
||||||
|
|
||||||
this.associateHost = this.associateHost.bind(this);
|
this.associateHost = this.associateHost.bind(this);
|
||||||
this.createHost = this.createHost.bind(this);
|
this.createHost = this.createHost.bind(this);
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Base from '../Base';
|
|||||||
class Hosts extends Base {
|
class Hosts extends Base {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/hosts/';
|
this.baseUrl = 'api/v2/hosts/';
|
||||||
|
|
||||||
this.readFacts = this.readFacts.bind(this);
|
this.readFacts = this.readFacts.bind(this);
|
||||||
this.readAllGroups = this.readAllGroups.bind(this);
|
this.readAllGroups = this.readAllGroups.bind(this);
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Base from '../Base';
|
|||||||
class InstanceGroups extends Base {
|
class InstanceGroups extends Base {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/instance_groups/';
|
this.baseUrl = 'api/v2/instance_groups/';
|
||||||
|
|
||||||
this.associateInstance = this.associateInstance.bind(this);
|
this.associateInstance = this.associateInstance.bind(this);
|
||||||
this.disassociateInstance = this.disassociateInstance.bind(this);
|
this.disassociateInstance = this.disassociateInstance.bind(this);
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Base from '../Base';
|
|||||||
class Instances extends Base {
|
class Instances extends Base {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/instances/';
|
this.baseUrl = 'api/v2/instances/';
|
||||||
|
|
||||||
this.readHealthCheckDetail = this.readHealthCheckDetail.bind(this);
|
this.readHealthCheckDetail = this.readHealthCheckDetail.bind(this);
|
||||||
this.healthCheck = this.healthCheck.bind(this);
|
this.healthCheck = this.healthCheck.bind(this);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import InstanceGroupsMixin from '../mixins/InstanceGroups.mixin';
|
|||||||
class Inventories extends InstanceGroupsMixin(Base) {
|
class Inventories extends InstanceGroupsMixin(Base) {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/inventories/';
|
this.baseUrl = 'api/v2/inventories/';
|
||||||
|
|
||||||
this.readAccessList = this.readAccessList.bind(this);
|
this.readAccessList = this.readAccessList.bind(this);
|
||||||
this.readAccessOptions = this.readAccessOptions.bind(this);
|
this.readAccessOptions = this.readAccessOptions.bind(this);
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Base from '../Base';
|
|||||||
class InventoryScripts extends Base {
|
class InventoryScripts extends Base {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/inventory_scripts/';
|
this.baseUrl = 'api/v2/inventory_scripts/';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ class InventorySources extends LaunchUpdateMixin(
|
|||||||
) {
|
) {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/inventory_sources/';
|
this.baseUrl = 'api/v2/inventory_sources/';
|
||||||
|
|
||||||
this.createSchedule = this.createSchedule.bind(this);
|
this.createSchedule = this.createSchedule.bind(this);
|
||||||
this.createSyncStart = this.createSyncStart.bind(this);
|
this.createSyncStart = this.createSyncStart.bind(this);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import RunnableMixin from '../mixins/Runnable.mixin';
|
|||||||
class InventoryUpdates extends RunnableMixin(Base) {
|
class InventoryUpdates extends RunnableMixin(Base) {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/inventory_updates/';
|
this.baseUrl = 'api/v2/inventory_updates/';
|
||||||
this.createSyncCancel = this.createSyncCancel.bind(this);
|
this.createSyncCancel = this.createSyncCancel.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ class JobTemplates extends SchedulesMixin(
|
|||||||
) {
|
) {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/job_templates/';
|
this.baseUrl = 'api/v2/job_templates/';
|
||||||
|
|
||||||
this.createSchedule = this.createSchedule.bind(this);
|
this.createSchedule = this.createSchedule.bind(this);
|
||||||
this.launch = this.launch.bind(this);
|
this.launch = this.launch.bind(this);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import RunnableMixin from '../mixins/Runnable.mixin';
|
|||||||
class Jobs extends RunnableMixin(Base) {
|
class Jobs extends RunnableMixin(Base) {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/jobs/';
|
this.baseUrl = 'api/v2/jobs/';
|
||||||
this.jobEventSlug = '/job_events/';
|
this.jobEventSlug = '/job_events/';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Base from '../Base';
|
|||||||
class Labels extends Base {
|
class Labels extends Base {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/labels/';
|
this.baseUrl = 'api/v2/labels/';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Base from '../Base';
|
|||||||
class Me extends Base {
|
class Me extends Base {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/me/';
|
this.baseUrl = 'api/v2/me/';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Base from '../Base';
|
|||||||
class Metrics extends Base {
|
class Metrics extends Base {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/metrics/';
|
this.baseUrl = 'api/v2/metrics/';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export default Metrics;
|
export default Metrics;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Base from '../Base';
|
|||||||
class NotificationTemplates extends Base {
|
class NotificationTemplates extends Base {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/notification_templates/';
|
this.baseUrl = 'api/v2/notification_templates/';
|
||||||
}
|
}
|
||||||
|
|
||||||
test(id) {
|
test(id) {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Base from '../Base';
|
|||||||
class Notifications extends Base {
|
class Notifications extends Base {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/notifications/';
|
this.baseUrl = 'api/v2/notifications/';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import InstanceGroupsMixin from '../mixins/InstanceGroups.mixin';
|
|||||||
class Organizations extends InstanceGroupsMixin(NotificationsMixin(Base)) {
|
class Organizations extends InstanceGroupsMixin(NotificationsMixin(Base)) {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/organizations/';
|
this.baseUrl = 'api/v2/organizations/';
|
||||||
}
|
}
|
||||||
|
|
||||||
readAccessList(id, params) {
|
readAccessList(id, params) {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ describe('OrganizationsAPI', () => {
|
|||||||
const testParams = { foo: 'bar' };
|
const testParams = { foo: 'bar' };
|
||||||
const testParamsDuplicates = { foo: ['bar', 'baz'] };
|
const testParamsDuplicates = { foo: ['bar', 'baz'] };
|
||||||
|
|
||||||
const mockBaseURL = `/api/v2/organizations/${orgId}/access_list/`;
|
const mockBaseURL = `api/v2/organizations/${orgId}/access_list/`;
|
||||||
|
|
||||||
await OrganizationsAPI.readAccessList(orgId);
|
await OrganizationsAPI.readAccessList(orgId);
|
||||||
await OrganizationsAPI.readAccessList(orgId, testParams);
|
await OrganizationsAPI.readAccessList(orgId, testParams);
|
||||||
@@ -41,7 +41,7 @@ describe('OrganizationsAPI', () => {
|
|||||||
const testParams = { foo: 'bar' };
|
const testParams = { foo: 'bar' };
|
||||||
const testParamsDuplicates = { foo: ['bar', 'baz'] };
|
const testParamsDuplicates = { foo: ['bar', 'baz'] };
|
||||||
|
|
||||||
const mockBaseURL = `/api/v2/organizations/${orgId}/teams/`;
|
const mockBaseURL = `api/v2/organizations/${orgId}/teams/`;
|
||||||
|
|
||||||
await OrganizationsAPI.readTeams(orgId);
|
await OrganizationsAPI.readTeams(orgId);
|
||||||
await OrganizationsAPI.readTeams(orgId, testParams);
|
await OrganizationsAPI.readTeams(orgId, testParams);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import RunnableMixin from '../mixins/Runnable.mixin';
|
|||||||
class ProjectUpdates extends RunnableMixin(Base) {
|
class ProjectUpdates extends RunnableMixin(Base) {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/project_updates/';
|
this.baseUrl = 'api/v2/project_updates/';
|
||||||
}
|
}
|
||||||
|
|
||||||
readCredentials(id) {
|
readCredentials(id) {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ class Projects extends SchedulesMixin(
|
|||||||
) {
|
) {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/projects/';
|
this.baseUrl = 'api/v2/projects/';
|
||||||
|
|
||||||
this.readAccessList = this.readAccessList.bind(this);
|
this.readAccessList = this.readAccessList.bind(this);
|
||||||
this.readAccessOptions = this.readAccessOptions.bind(this);
|
this.readAccessOptions = this.readAccessOptions.bind(this);
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Base from '../Base';
|
|||||||
class Roles extends Base {
|
class Roles extends Base {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/roles/';
|
this.baseUrl = 'api/v2/roles/';
|
||||||
}
|
}
|
||||||
|
|
||||||
disassociateUserRole(roleId, userId) {
|
disassociateUserRole(roleId, userId) {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Base from '../Base';
|
|||||||
class Root extends Base {
|
class Root extends Base {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/';
|
this.baseUrl = 'api/';
|
||||||
this.redirectURL = '/api/v2/config/';
|
this.redirectURL = '/api/v2/config/';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@ class Root extends Base {
|
|||||||
// automation etc. should relocate this variable file to an importable
|
// automation etc. should relocate this variable file to an importable
|
||||||
// location in src prior to building. That said, a raw http call
|
// location in src prior to building. That said, a raw http call
|
||||||
// works for now.
|
// works for now.
|
||||||
return this.http.get('/static/media/default.strings.json');
|
return this.http.get('static/media/default.strings.json');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Base from '../Base';
|
|||||||
class Schedules extends Base {
|
class Schedules extends Base {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/schedules/';
|
this.baseUrl = 'api/v2/schedules/';
|
||||||
}
|
}
|
||||||
|
|
||||||
createPreview(data) {
|
createPreview(data) {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Base from '../Base';
|
|||||||
class Settings extends Base {
|
class Settings extends Base {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/settings/';
|
this.baseUrl = 'api/v2/settings/';
|
||||||
}
|
}
|
||||||
|
|
||||||
readAllOptions() {
|
readAllOptions() {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ const Mixins = SchedulesMixin(NotificationsMixin(Base));
|
|||||||
class SystemJobTemplates extends Mixins {
|
class SystemJobTemplates extends Mixins {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/system_job_templates/';
|
this.baseUrl = 'api/v2/system_job_templates/';
|
||||||
}
|
}
|
||||||
|
|
||||||
launch(id, data) {
|
launch(id, data) {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import RunnableMixin from '../mixins/Runnable.mixin';
|
|||||||
class SystemJobs extends RunnableMixin(Base) {
|
class SystemJobs extends RunnableMixin(Base) {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/system_jobs/';
|
this.baseUrl = 'api/v2/system_jobs/';
|
||||||
}
|
}
|
||||||
|
|
||||||
readCredentials(id) {
|
readCredentials(id) {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Base from '../Base';
|
|||||||
class Teams extends Base {
|
class Teams extends Base {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/teams/';
|
this.baseUrl = 'api/v2/teams/';
|
||||||
}
|
}
|
||||||
|
|
||||||
associateRole(teamId, roleId) {
|
associateRole(teamId, roleId) {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ describe('TeamsAPI', () => {
|
|||||||
|
|
||||||
expect(mockHttp.post).toHaveBeenCalledTimes(1);
|
expect(mockHttp.post).toHaveBeenCalledTimes(1);
|
||||||
expect(mockHttp.post.mock.calls[0]).toContainEqual(
|
expect(mockHttp.post.mock.calls[0]).toContainEqual(
|
||||||
`/api/v2/teams/${teamId}/roles/`,
|
`api/v2/teams/${teamId}/roles/`,
|
||||||
{ id: roleId }
|
{ id: roleId }
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@@ -33,7 +33,7 @@ describe('TeamsAPI', () => {
|
|||||||
|
|
||||||
expect(mockHttp.post).toHaveBeenCalledTimes(1);
|
expect(mockHttp.post).toHaveBeenCalledTimes(1);
|
||||||
expect(mockHttp.post.mock.calls[0]).toContainEqual(
|
expect(mockHttp.post.mock.calls[0]).toContainEqual(
|
||||||
`/api/v2/teams/${teamId}/roles/`,
|
`api/v2/teams/${teamId}/roles/`,
|
||||||
{
|
{
|
||||||
id: roleId,
|
id: roleId,
|
||||||
disassociate: true,
|
disassociate: true,
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Base from '../Base';
|
|||||||
class Tokens extends Base {
|
class Tokens extends Base {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/tokens/';
|
this.baseUrl = 'api/v2/tokens/';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Base from '../Base';
|
|||||||
class UnifiedJobTemplates extends Base {
|
class UnifiedJobTemplates extends Base {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/unified_job_templates/';
|
this.baseUrl = 'api/v2/unified_job_templates/';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Base from '../Base';
|
|||||||
class UnifiedJobs extends Base {
|
class UnifiedJobs extends Base {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/unified_jobs/';
|
this.baseUrl = 'api/v2/unified_jobs/';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Base from '../Base';
|
|||||||
class Users extends Base {
|
class Users extends Base {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/users/';
|
this.baseUrl = 'api/v2/users/';
|
||||||
}
|
}
|
||||||
|
|
||||||
associateRole(userId, roleId) {
|
associateRole(userId, roleId) {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ describe('UsersAPI', () => {
|
|||||||
|
|
||||||
expect(mockHttp.post).toHaveBeenCalledTimes(1);
|
expect(mockHttp.post).toHaveBeenCalledTimes(1);
|
||||||
expect(mockHttp.post.mock.calls[0]).toContainEqual(
|
expect(mockHttp.post.mock.calls[0]).toContainEqual(
|
||||||
`/api/v2/users/${userId}/roles/`,
|
`api/v2/users/${userId}/roles/`,
|
||||||
{ id: roleId }
|
{ id: roleId }
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@@ -30,7 +30,7 @@ describe('UsersAPI', () => {
|
|||||||
|
|
||||||
expect(mockHttp.post).toHaveBeenCalledTimes(1);
|
expect(mockHttp.post).toHaveBeenCalledTimes(1);
|
||||||
expect(mockHttp.post.mock.calls[0]).toContainEqual(
|
expect(mockHttp.post.mock.calls[0]).toContainEqual(
|
||||||
`/api/v2/users/${userId}/roles/`,
|
`api/v2/users/${userId}/roles/`,
|
||||||
{
|
{
|
||||||
id: roleId,
|
id: roleId,
|
||||||
disassociate: true,
|
disassociate: true,
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Base from '../Base';
|
|||||||
class WorkflowApprovalTemplates extends Base {
|
class WorkflowApprovalTemplates extends Base {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/workflow_approval_templates/';
|
this.baseUrl = 'api/v2/workflow_approval_templates/';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Base from '../Base';
|
|||||||
class WorkflowApprovals extends Base {
|
class WorkflowApprovals extends Base {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/workflow_approvals/';
|
this.baseUrl = 'api/v2/workflow_approvals/';
|
||||||
}
|
}
|
||||||
|
|
||||||
approve(id) {
|
approve(id) {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import Base from '../Base';
|
|||||||
class WorkflowJobTemplateNodes extends Base {
|
class WorkflowJobTemplateNodes extends Base {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/workflow_job_template_nodes/';
|
this.baseUrl = 'api/v2/workflow_job_template_nodes/';
|
||||||
}
|
}
|
||||||
|
|
||||||
createApprovalTemplate(id, data) {
|
createApprovalTemplate(id, data) {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import NotificationsMixin from '../mixins/Notifications.mixin';
|
|||||||
class WorkflowJobTemplates extends SchedulesMixin(NotificationsMixin(Base)) {
|
class WorkflowJobTemplates extends SchedulesMixin(NotificationsMixin(Base)) {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/workflow_job_templates/';
|
this.baseUrl = 'api/v2/workflow_job_templates/';
|
||||||
this.createSchedule = this.createSchedule.bind(this);
|
this.createSchedule = this.createSchedule.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import RunnableMixin from '../mixins/Runnable.mixin';
|
|||||||
class WorkflowJobs extends RunnableMixin(Base) {
|
class WorkflowJobs extends RunnableMixin(Base) {
|
||||||
constructor(http) {
|
constructor(http) {
|
||||||
super(http);
|
super(http);
|
||||||
this.baseUrl = '/api/v2/workflow_jobs/';
|
this.baseUrl = 'api/v2/workflow_jobs/';
|
||||||
}
|
}
|
||||||
|
|
||||||
readNodes(id, params) {
|
readNodes(id, params) {
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ function About({ version, isOpen, onClose }) {
|
|||||||
onClose={onClose}
|
onClose={onClose}
|
||||||
productName={brandName}
|
productName={brandName}
|
||||||
trademark={`${copyright} ${new Date().getFullYear()} ${redHatInc}`}
|
trademark={`${copyright} ${new Date().getFullYear()} ${redHatInc}`}
|
||||||
brandImageSrc="/static/media/logo-header.svg"
|
brandImageSrc="static/media/logo-header.svg"
|
||||||
brandImageAlt={t`Brand Image`}
|
brandImageAlt={t`Brand Image`}
|
||||||
>
|
>
|
||||||
<pre>
|
<pre>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ const BrandImg = styled.img`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
const BrandLogo = ({ alt }) => (
|
const BrandLogo = ({ alt }) => (
|
||||||
<BrandImg src="/static/media/logo-header.svg" alt={alt} />
|
<BrandImg src="static/media/logo-header.svg" alt={alt} />
|
||||||
);
|
);
|
||||||
|
|
||||||
export default BrandLogo;
|
export default BrandLogo;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ export default function useWebsocket(subscribeGroups) {
|
|||||||
ws.current = new WebSocket(
|
ws.current = new WebSocket(
|
||||||
`${window.location.protocol === 'http:' ? 'ws:' : 'wss:'}//${
|
`${window.location.protocol === 'http:' ? 'ws:' : 'wss:'}//${
|
||||||
window.location.host
|
window.location.host
|
||||||
}/websocket/`
|
}${window.location.pathname}websocket/`
|
||||||
);
|
);
|
||||||
|
|
||||||
const connect = () => {
|
const connect = () => {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ export default function connectJobSocket({ type, id }, onMessage) {
|
|||||||
ws = new WebSocket(
|
ws = new WebSocket(
|
||||||
`${window.location.protocol === 'http:' ? 'ws:' : 'wss:'}//${
|
`${window.location.protocol === 'http:' ? 'ws:' : 'wss:'}//${
|
||||||
window.location.host
|
window.location.host
|
||||||
}/websocket/`
|
}${window.location.pathname}websocket/`
|
||||||
);
|
);
|
||||||
|
|
||||||
ws.onopen = () => {
|
ws.onopen = () => {
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ import ErrorDetail from 'components/ErrorDetail';
|
|||||||
import { useSession } from 'contexts/Session';
|
import { useSession } from 'contexts/Session';
|
||||||
import { SESSION_REDIRECT_URL } from '../../constants';
|
import { SESSION_REDIRECT_URL } from '../../constants';
|
||||||
|
|
||||||
const loginLogoSrc = '/static/media/logo-login.svg';
|
const loginLogoSrc = 'static/media/logo-login.svg';
|
||||||
|
|
||||||
const Login = styled(PFLogin)`
|
const Login = styled(PFLogin)`
|
||||||
& .pf-c-brand {
|
& .pf-c-brand {
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ describe('<Login />', () => {
|
|||||||
});
|
});
|
||||||
const { loginHeaderLogo } = await findChildren(wrapper);
|
const { loginHeaderLogo } = await findChildren(wrapper);
|
||||||
const { alt, src } = loginHeaderLogo.props();
|
const { alt, src } = loginHeaderLogo.props();
|
||||||
expect([alt, src]).toEqual(['AWX', '/static/media/logo-login.svg']);
|
expect([alt, src]).toEqual(['AWX', 'static/media/logo-login.svg']);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('custom login info handled correctly', async () => {
|
test('custom login info handled correctly', async () => {
|
||||||
@@ -152,7 +152,7 @@ describe('<Login />', () => {
|
|||||||
});
|
});
|
||||||
const { loginHeaderLogo } = await findChildren(wrapper);
|
const { loginHeaderLogo } = await findChildren(wrapper);
|
||||||
const { alt, src } = loginHeaderLogo.props();
|
const { alt, src } = loginHeaderLogo.props();
|
||||||
expect([alt, src]).toEqual([null, '/static/media/logo-login.svg']);
|
expect([alt, src]).toEqual([null, 'static/media/logo-login.svg']);
|
||||||
expect(wrapper.find('AlertModal').length).toBe(1);
|
expect(wrapper.find('AlertModal').length).toBe(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ function AnalyticsStep() {
|
|||||||
<Flex alignItems={{ default: 'alignItemsCenter' }}>
|
<Flex alignItems={{ default: 'alignItemsCenter' }}>
|
||||||
<img
|
<img
|
||||||
width="300"
|
width="300"
|
||||||
src="/static/media/insights-analytics-dashboard.jpeg"
|
src="static/media/insights-analytics-dashboard.jpeg"
|
||||||
alt={t`Insights for Ansible Automation Platform dashboard`}
|
alt={t`Insights for Ansible Automation Platform dashboard`}
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
Reference in New Issue
Block a user