Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private handleSubmit() {
const { onClickSubmit } = this.props
const { name, token } = this.state
if (name !== '' && token !== '') {
onClickSubmit({ name, token })
toaster.success('Complete to connect!', { duration: 1 })
} else {
toaster.warning('Invalid input!', { duration: 1 })
}
}
setTimeout(() => {
if (this.props.changeError === false) {
toaster.warning("All Works are successfully paused :)");
} else {
toaster.danger("Server replied: " + this.props.changeError);
}
}, 500);
}
.catch( ex => {
dispatch(updateContainer({
containerId: container.shortId,
data: { stateToggling: false },
}))
toaster.warning(`There is problem ${status === 'start'? 'starting' : 'stopping'} container ${container.Name}`,{duration: 5})
})
}
handleAlertMsg(alertStyle, alertMsg) {
if (alertStyle === "success") {
toaster.success(alertMsg);
}
if (alertStyle === "warning") {
toaster.warning(alertMsg);
}
if (alertStyle === "danger") {
toaster.danger(alertMsg);
}
}
toasterSuccess(error_id, action) {
if (action === "deleteError") {
toaster.warning("Issue " + error_id + " is successfully deleted :)");
}
}
setTimeout(() => {
if (this.props.changeError === false) {
toaster.warning("Work is successfully paused :)");
} else {
toaster.danger("Server replied: " + this.props.changeError);
}
}, 500);
}