Adds UI bits for new UI_NEXT system setting

This commit is contained in:
Michael Abashian
2023-03-09 10:41:00 -05:00
committed by Hao Liu
parent f53aa2d26b
commit d137086870
6 changed files with 27 additions and 3 deletions

View File

@@ -60,7 +60,8 @@ function MiscSystemDetail() {
'DEFAULT_EXECUTION_ENVIRONMENT',
'PROXY_IP_ALLOWED_LIST',
'AUTOMATION_ANALYTICS_LAST_GATHER',
'AUTOMATION_ANALYTICS_LAST_ENTRIES'
'AUTOMATION_ANALYTICS_LAST_ENTRIES',
'UI_NEXT'
);
const mergedData = {};

View File

@@ -43,6 +43,7 @@ describe('<MiscSystemDetail />', () => {
AUTOMATION_ANALYTICS_LAST_ENTRIES:
'{"foo": "2021-11-24R06:35:15.179Z"}',
AUTOMATION_ANALYTICS_GATHER_INTERVAL: 14400,
UI_NEXT: true,
},
});
ExecutionEnvironmentsAPI.readDetail = jest.fn();
@@ -113,6 +114,7 @@ describe('<MiscSystemDetail />', () => {
assertVariableDetail(wrapper, 'Remote Host Headers', '[]');
assertVariableDetail(wrapper, 'Proxy IP Allowed List', '[]');
assertDetail(wrapper, 'Global default execution environment', 'Foo');
assertDetail(wrapper, 'Enable Next Generation User Interface', 'On');
});
test('should render execution environment as not configured', async () => {

View File

@@ -52,7 +52,8 @@ function MiscSystemEdit() {
'REMOTE_HOST_HEADERS',
'TOWER_URL_BASE',
'DEFAULT_EXECUTION_ENVIRONMENT',
'PROXY_IP_ALLOWED_LIST'
'PROXY_IP_ALLOWED_LIST',
'UI_NEXT'
);
const mergedData = {};
@@ -222,6 +223,7 @@ function MiscSystemEdit() {
type="number"
isRequired
/>
<BooleanField name="UI_NEXT" config={system.UI_NEXT} />
<ObjectField
name="AUTOMATION_ANALYTICS_LAST_ENTRIES"
config={system.AUTOMATION_ANALYTICS_LAST_ENTRIES}

View File

@@ -39,6 +39,7 @@ const systemData = {
REMOTE_HOST_HEADERS: ['REMOTE_ADDR', 'REMOTE_HOST'],
TOWER_URL_BASE: 'https://localhost:3000',
PROXY_IP_ALLOWED_LIST: [],
UI_NEXT: false,
};
describe('<MiscSystemEdit />', () => {

View File

@@ -639,6 +639,15 @@
"unit": "seconds",
"default": 14400
},
"UI_NEXT": {
"type": "boolean",
"required": false,
"label": "Enable Next Generation User Interface",
"help_text": "Enable the next generation user interface.",
"category": "System",
"category_slug": "system",
"default": true
},
"SESSION_COOKIE_AGE": {
"type": "integer",
"required": true,
@@ -4372,6 +4381,14 @@
"defined_in_file": false,
"unit": "seconds"
},
"UI_NEXT": {
"type": "boolean",
"label": "Enable Next Generation User Interface",
"help_text": "Enable the next generation user interface.",
"category": "System",
"category_slug": "system",
"defined_in_file": false
},
"SESSION_COOKIE_AGE": {
"type": "integer",
"label": "Idle Time Force Log Out",

View File

@@ -307,5 +307,6 @@
"instances":{"fields":["hostname"],"adj_list":[]}
},
"DEFAULT_EXECUTION_ENVIRONMENT": 1,
"AWX_MOUNT_ISOLATED_PATHS_ON_K8S": false
"AWX_MOUNT_ISOLATED_PATHS_ON_K8S": false,
"UI_NEXT": false
}