Project

General

Profile

« Previous | Next » 

Revision 608e32be

Added by Ondřej Ezr over 2 years ago

Fixes #32893 - use setting DSL for General category

This uses our new DSL to define the General settings, this showcases how
to use the new DSL and other categories should follow in the same
release.

View differences:

webpack/assets/javascripts/react_app/components/SettingRecords/__tests__/__snapshots__/SettingRecordsReducer.test.js.snap
Object {
"editing": null,
"settings": Object {
"Setting::Auth": Array [
Object {
"category": "Setting::Auth",
"configFile": "settings.yaml",
"createdAt": "2019-04-30 11:24:17 +0200",
"default": 4,
"description": "Cost value of bcrypt password hash function for internal auth-sources (4-30). Higher value is safer but verification is slower particularly for stateless API calls and UI logins. Password change needed to take effect.",
"encrypted": false,
"fullName": "BCrypt password cost",
"id": 232,
"name": "bcrypt_cost",
"readonly": false,
"selectValues": null,
"settingsType": "integer",
"updatedAt": "2019-10-09 10:02:35 +0200",
"value": 9,
},
],
"Setting::Email": Array [
Object {
"category": "Setting::Email",
"configFile": "settings.yaml",
"createdAt": "2019-11-06 09:42:45 +0100",
"default": "root@example.com",
"description": "Email reply address for emails that Foreman is sending",
"encrypted": false,
"fullName": "Email reply address",
"id": 36,
"name": "email_reply_address",
"readonly": false,
"selectValues": null,
"settingsType": "string",
"updatedAt": "2020-04-29 15:48:23 +0200",
"value": "root@example.com",
},
],
"Setting::General": Array [
"General": Array [
Object {
"category": "Setting::General",
"category": "General",
"configFile": "settings.yaml",
"createdAt": "2019-11-06 09:42:45 +0100",
"default": "root@example.com",
......
"value": "root@example.com",
},
Object {
"category": "Setting::General",
"category": "General",
"configFile": "settings.yaml",
"createdAt": "2018-01-22 14:03:38 +0100",
"default": false,
......
"value": true,
},
Object {
"category": "Setting::General",
"category": "General",
"configFile": "settings.yaml",
"default": null,
"description": "Timezone to use for new users",
......
"value": "Bangkok",
},
Object {
"category": "Setting::General",
"category": "General",
"configFile": "settings.yaml",
"createdAt": "2019-11-06 09:42:45 +0100",
"default": Array [],
......
],
},
],
"Setting::Auth": Array [
Object {
"category": "Setting::Auth",
"configFile": "settings.yaml",
"createdAt": "2019-04-30 11:24:17 +0200",
"default": 4,
"description": "Cost value of bcrypt password hash function for internal auth-sources (4-30). Higher value is safer but verification is slower particularly for stateless API calls and UI logins. Password change needed to take effect.",
"encrypted": false,
"fullName": "BCrypt password cost",
"id": 232,
"name": "bcrypt_cost",
"readonly": false,
"selectValues": null,
"settingsType": "integer",
"updatedAt": "2019-10-09 10:02:35 +0200",
"value": 9,
},
],
"Setting::Email": Array [
Object {
"category": "Setting::Email",
"configFile": "settings.yaml",
"createdAt": "2019-11-06 09:42:45 +0100",
"default": "root@example.com",
"description": "Email reply address for emails that Foreman is sending",
"encrypted": false,
"fullName": "Email reply address",
"id": 36,
"name": "email_reply_address",
"readonly": false,
"selectValues": null,
"settingsType": "string",
"updatedAt": "2020-04-29 15:48:23 +0200",
"value": "root@example.com",
},
],
"Setting::Provisioning": Array [
Object {
"category": "Setting::Provisioning",
......
Object {
"editing": null,
"settings": Object {
"Setting::Auth": Array [
Object {
"category": "Setting::Auth",
"configFile": "settings.yaml",
"createdAt": "2019-04-30 11:24:17 +0200",
"default": 4,
"description": "Cost value of bcrypt password hash function for internal auth-sources (4-30). Higher value is safer but verification is slower particularly for stateless API calls and UI logins. Password change needed to take effect.",
"encrypted": false,
"fullName": "BCrypt password cost",
"id": 232,
"name": "bcrypt_cost",
"readonly": false,
"selectValues": null,
"settingsType": "integer",
"updatedAt": "2019-10-09 10:02:35 +0200",
"value": 9,
},
],
"Setting::Email": Array [
Object {
"category": "Setting::Email",
"configFile": "settings.yaml",
"createdAt": "2019-11-06 09:42:45 +0100",
"default": "root@example.com",
"description": "Email reply address for emails that Foreman is sending",
"encrypted": false,
"fullName": "Email reply address",
"id": 36,
"name": "email_reply_address",
"readonly": false,
"selectValues": null,
"settingsType": "string",
"updatedAt": "2020-04-29 15:48:23 +0200",
"value": "root@example.com",
},
],
"Setting::General": Array [
"General": Array [
Object {
"category": "Setting::General",
"category": "General",
"configFile": "settings.yaml",
"createdAt": "2019-11-06 09:42:45 +0100",
"default": "root@example.com",
......
"value": "root@example.com",
},
Object {
"category": "Setting::General",
"category": "General",
"configFile": "settings.yaml",
"createdAt": "2018-01-22 14:03:38 +0100",
"default": false,
......
"value": true,
},
Object {
"category": "Setting::General",
"category": "General",
"configFile": "settings.yaml",
"default": null,
"description": "Timezone to use for new users",
......
"value": "Bangkok",
},
Object {
"category": "Setting::General",
"category": "General",
"configFile": "settings.yaml",
"createdAt": "2019-11-06 09:42:45 +0100",
"default": Array [],
......
"value": "http://proxy.com",
},
],
"Setting::Auth": Array [
Object {
"category": "Setting::Auth",
"configFile": "settings.yaml",
"createdAt": "2019-04-30 11:24:17 +0200",
"default": 4,
"description": "Cost value of bcrypt password hash function for internal auth-sources (4-30). Higher value is safer but verification is slower particularly for stateless API calls and UI logins. Password change needed to take effect.",
"encrypted": false,
"fullName": "BCrypt password cost",
"id": 232,
"name": "bcrypt_cost",
"readonly": false,
"selectValues": null,
"settingsType": "integer",
"updatedAt": "2019-10-09 10:02:35 +0200",
"value": 9,
},
],
"Setting::Email": Array [
Object {
"category": "Setting::Email",
"configFile": "settings.yaml",
"createdAt": "2019-11-06 09:42:45 +0100",
"default": "root@example.com",
"description": "Email reply address for emails that Foreman is sending",
"encrypted": false,
"fullName": "Email reply address",
"id": 36,
"name": "email_reply_address",
"readonly": false,
"selectValues": null,
"settingsType": "string",
"updatedAt": "2020-04-29 15:48:23 +0200",
"value": "root@example.com",
},
],
"Setting::Provisioning": Array [
Object {
"category": "Setting::Provisioning",

Also available in: Unified diff