| | |
| | | this.addDirectoryItem = this.addDirectoryItem.bind(this); |
| | | this.removeDirectoryItem = this.removeDirectoryItem.bind(this); |
| | | this.onResetConfiguration = this.onResetConfiguration.bind(this); |
| | | this.onClearAllCaches = this.onClearAllCaches.bind(this); |
| | | this.loadConfig = this.loadConfig.bind(this); |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | onClearAllCaches() { |
| | | fetch(getRestServiceUrl("configuration/clearAllCaches"), { |
| | | method: "GET", |
| | | dataType: "JSON", |
| | | headers: { |
| | | "Content-Type": "text/plain; charset=utf-8" |
| | | } |
| | | }) |
| | | } |
| | | |
| | | addDirectoryItem() { |
| | | directoryItems.push({ |
| | | index: directoryItems.length + 1, |
| | |
| | | } |
| | | |
| | | if (this.state.failed) { |
| | | return <ErrorAlertGenericRestFailure handleClick={this.loadConfig} />; |
| | | return <ErrorAlertGenericRestFailure handleClick={this.loadConfig}/>; |
| | | } |
| | | |
| | | return ( |
| | | <form> |
| | | <FormLabelField> |
| | | <FormButton id={'clearCahces'} onClick={this.onClearCaches}> Clear all caches |
| | | </FormButton> |
| | | </FormLabelField> |
| | | <FormLabelField> |
| | | <Button className={'btn-outline-primary'} |
| | | onClick={() => this.setState({expertSettingsOpen: !this.state.expertSettingsOpen})}> |
| | | <IconWarning/> <I18n name={'configuration.forExpertsOnly'}/> |