Move remaining client functions in components to actions (#5171)
Этот коммит содержится в:
коммит произвёл
George Goldberg
родитель
49c677f6b4
Коммит
d72547433a
@@ -12,9 +12,10 @@ import RemoveFileSetting from './remove_file_setting.jsx';
|
||||
import {FormattedMessage, FormattedHTMLMessage} from 'react-intl';
|
||||
import SettingsGroup from './settings_group.jsx';
|
||||
|
||||
import Client from 'client/web_client.jsx';
|
||||
import * as Utils from 'utils/utils.jsx';
|
||||
|
||||
import {samlCertificateStatus, uploadCertificateFile, removeCertificateFile} from 'actions/admin_actions.jsx';
|
||||
|
||||
export default class SamlSettings extends AdminSettings {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
@@ -73,7 +74,7 @@ export default class SamlSettings extends AdminSettings {
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
Client.samlCertificateStatus(
|
||||
samlCertificateStatus(
|
||||
(data) => {
|
||||
const files = {};
|
||||
if (!data.IdpCertificateFile) {
|
||||
@@ -93,7 +94,7 @@ export default class SamlSettings extends AdminSettings {
|
||||
}
|
||||
|
||||
uploadCertificate(id, file, callback) {
|
||||
Client.uploadCertificateFile(
|
||||
uploadCertificateFile(
|
||||
file,
|
||||
() => {
|
||||
const fileName = file.name;
|
||||
@@ -112,7 +113,7 @@ export default class SamlSettings extends AdminSettings {
|
||||
}
|
||||
|
||||
removeCertificate(id, callback) {
|
||||
Client.removeCertificateFile(
|
||||
removeCertificateFile(
|
||||
this.state[id],
|
||||
() => {
|
||||
this.handleChange(id, '');
|
||||
|
||||
Ссылка в новой задаче
Block a user