Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
});
} else if (nextProps.fileContentNeedReload[nextProps.file]) {
const oldContent = this.getFileContent();
const hasChange = this.hasChange(); // has changed
await this.checkAndFetchFileContent(nextProps);
modelManager.setInitialValue(nextProps.file, this.getFileContent(nextProps.file), true);
this.setState({
loadingFile: false,
});
const newContent = this.getFileContent();
if (
hasChange &&
oldContent !== newContent &&
newContent !== modelManager.getValue(nextProps.file)
) {
Modal.confirm({
title: 'The file has changed on disk.',
content: 'Do you want to reload it?',
okText: 'Yes',
cancelText: 'No',
onOk: () => {
modelManager.reset(nextProps.file);
},
});
}
}
}
submitInitData(current) {
const _this = this
Modal.confirm({
title: '温馨提示!!',
content: '将会删除并创建DAS的相关物理库表,是否继续?',
okText: '继续',
cancelText: '取消',
onOk() {
const dbconectInfo = _this.getValueToJson(_this.objName)
_this.props.addInit(dbconectInfo, _this, (_this, data) => {
if (data.code == 200) {
_this.showSuccessMsg('初始化成功')
window.setTimeout(() => {
_this.setState({current})
}, 800)
} else {
_this.showErrorsNotification(data.msg)
}
})
targetId: elementId,
elementType: 'folder',
});
break;
}
case 'move': {
showDialog('core.element.move.component', 'Move', {
action: 'move',
targetId: elementId,
});
break;
}
case 'del-file-folder': {
const ele = byId(elementId);
Modal.confirm({
title: `Are you sure to delete the ${ele.type}?`,
onOk() {
if (!ele) {
Modal.error({
title: 'No element to delete',
content: `Element not found: ${elementId}`,
});
return;
}
const name = ele.id;
execCoreCommand({
commandName: 'remove',
type: ele.type,
name,
}).then(
() => {
switch (e.key) {
case 'dashboard':
browserHistory.push('/');
break;
case 'algorithm':
browserHistory.push('/algorithm');
break;
case 'exchange':
browserHistory.push('/exchange');
break;
case 'user':
browserHistory.push('/user');
break;
case 'logout':
Modal.confirm({
title: 'Are you sure to logout ?',
onOk: () => {
dispatch(Logout());
browserHistory.push('/login');
},
iconType: 'exclamation-circle',
});
break;
}
}
const onDelete = r => {
Modal.confirm({
title: 'Do you Want to delete this job?',
content: `job ${r.name} will be deleted! `,
onOk() {
dispatch({
type: 'timeserials/removeJob',
payload: r.id,
});
},
});
};
if (e.key !== 'logout') {
this.setState({
current: e.key,
});
}
switch (e.key) {
case 'home':
browserHistory.push('/');
break;
case 'chart':
browserHistory.push('/chart');
break;
case 'logout':
Modal.confirm({
title: 'Are you sure to log out ?',
onOk: () => {
dispatch(logout());
browserHistory.push('/login');
},
iconType: 'exclamation-circle',
});
break;
}
}
showDeletionDialog = (e: SerializedEntity) => {
Modal.confirm({
title: this.props.intl.formatMessage(
{ id: "management.browser.delete.areYouSure" },
{ instanceName: e._instanceName }
),
okText: this.props.intl.formatMessage({
id: "management.browser.delete.ok"
}),
cancelText: this.props.intl.formatMessage({
id: "management.browser.delete.cancel"
}),
onOk: () => {
return this.dataCollection.delete(e);
}
});
};
const uiDialogConfirm = (config = {}, execFunc) =>
Modal.confirm({
...config,
onOk: execFunc
});
const uiItemCheckbox = (item = [], jsx) => {
title: '提示!',
content: "您确定要重启ZlMedia吗",
type: 'confirm',
okText: '确定',
okType: 'danger',
cancelText: '放弃',
okCancel: true,
onOk: () => {
restartZlmediaServer().then((res) => {
if (res.code == 0) {
message.info(res.msg);
}
})
}
};
return Modal.confirm(config);
}}>重启服务