map(this.props.home.modifiedData, (data, key) => { const k = replace(key, '${name}', dbName); if (key !== 'database.connections.${name}.name') { newData[k] = data; } });
export function setInputPoliciesPath(path) { const inputPath = replace(path, 'enabled', 'policy'); return { type: SET_INPUT_POLICIES_PATH, inputPath, }; }
export function setTempAttribute() { const newAttribute = cloneDeep(this.props.modifiedDataAttribute); forEach(newAttribute.params, (value, key) => { if (includes(key, 'Value')) { set(newAttribute.params, replace(key, 'Value', ''), value); unset(newAttribute.params, key); } }); return newAttribute; }
map(contentType.attributes, (attr, key) => { if (get(attr.params, 'target') === replace(split(this.props.hash, '::')[0], '#edit', '')) { contentType.attributes[key].params.target = this.props.modifiedDataEdit.name; } });
const target = err.target ? replace(err.target, err.target.split('.')[2], '${name}') : 'database.connections.${name}.name'; return ( { target, errors: map(err.messages, mess => ({ id: `settings-manager.${mess.id}`})) }
componentDidUpdate(prevProps) { if (prevProps.location.pathname !== this.props.location.pathname) { this.props.resetProps(); this.initComponent(this.props); } if ( prevProps.editPage.submitSuccess !== this.props.editPage.submitSuccess ) { if ( !isEmpty(this.props.location.search) && includes(this.props.location.search, '?redirectUrl') ) { const redirectUrl = this.props.location.search.split( '?redirectUrl=', )[1]; this.props.history.push({ pathname: redirectUrl.split('?')[0], search: redirectUrl.split('?')[1], }); } else { this.props.history.push({ pathname: replace(this.props.location.pathname, '/create', ''), search: `?source=${this.getSource()}`, }); } } }
const index = findIndex(oldMenu, ['name', replace(this.props.hash.split('::')[0], '#edit', '')]); const modifiedContentType = { name: this.props.modifiedDataEdit.name,
function setAttributeFormData(hash) { const hashArray = hash.split('::'); const formType = replace(hashArray[1], 'attribute', ''); const settingsType = hashArray[2]; const form = forms.attribute[formType][settingsType];
const xFrameValue = `ALLOW-FROM.ALLOW-FROM ${trimStart(replace(this.props.home.modifiedData['security.xframe.value.nested'], 'ALLOW-FROM', ''))}`; body['security.xframe.value'] = xFrameValue;
render() { const redirectRoute = replace(this.props.match.path, '/:modelName', ''); const addButtons = get(storeData.getContentType(), 'name') === this.props.match.params.modelName && size(get(storeData.getContentType(), 'attributes')) > 0 || this.props.modelPage.showButtons; const contentHeaderDescription = this.props.modelPage.model.description || 'content-type-builder.modelPage.contentHeader.emptyDescription.description';