Adds UI bits for new UI_NEXT system setting

This commit is contained in:
Michael Abashian
2023-03-09 10:41:00 -05:00
parent ff03242830
commit 27f8f1a853
6 changed files with 27 additions and 3 deletions

View File

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

View File

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

View File

@@ -52,7 +52,8 @@ function MiscSystemEdit() {
'REMOTE_HOST_HEADERS', 'REMOTE_HOST_HEADERS',
'TOWER_URL_BASE', 'TOWER_URL_BASE',
'DEFAULT_EXECUTION_ENVIRONMENT', 'DEFAULT_EXECUTION_ENVIRONMENT',
'PROXY_IP_ALLOWED_LIST' 'PROXY_IP_ALLOWED_LIST',
'UI_NEXT'
); );
const mergedData = {}; const mergedData = {};
@@ -222,6 +223,7 @@ function MiscSystemEdit() {
type="number" type="number"
isRequired isRequired
/> />
<BooleanField name="UI_NEXT" config={system.UI_NEXT} />
<ObjectField <ObjectField
name="AUTOMATION_ANALYTICS_LAST_ENTRIES" name="AUTOMATION_ANALYTICS_LAST_ENTRIES"
config={system.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'], REMOTE_HOST_HEADERS: ['REMOTE_ADDR', 'REMOTE_HOST'],
TOWER_URL_BASE: 'https://localhost:3000', TOWER_URL_BASE: 'https://localhost:3000',
PROXY_IP_ALLOWED_LIST: [], PROXY_IP_ALLOWED_LIST: [],
UI_NEXT: false,
}; };
describe('<MiscSystemEdit />', () => { describe('<MiscSystemEdit />', () => {

View File

@@ -639,6 +639,15 @@
"unit": "seconds", "unit": "seconds",
"default": 14400 "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": { "SESSION_COOKIE_AGE": {
"type": "integer", "type": "integer",
"required": true, "required": true,
@@ -4372,6 +4381,14 @@
"defined_in_file": false, "defined_in_file": false,
"unit": "seconds" "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": { "SESSION_COOKIE_AGE": {
"type": "integer", "type": "integer",
"label": "Idle Time Force Log Out", "label": "Idle Time Force Log Out",

View File

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