mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-09-20 23:17:30 +03:00
console: update sidebar loading state after table rename error
GitOrigin-RevId: 4b837af9ca0bc09823170611234c0e15fd22c344
This commit is contained in:
parent
3f0bb499cb
commit
834c324d47
@ -12,6 +12,7 @@ export const createNewSchema = (schemaName, successCb, errorCb) => {
|
||||
dispatch(setSidebarLoading(true));
|
||||
const source = getState().tables.currentDataSource;
|
||||
if (!gqlPattern.test(schemaName)) {
|
||||
dispatch(setSidebarLoading(false));
|
||||
return dispatch(
|
||||
showErrorNotification(
|
||||
gqlSchemaErrorNotif[0],
|
||||
@ -69,6 +70,7 @@ export const deleteCurrentSchema = (successCb, errorCb) => {
|
||||
const confirmMessage = `This will permanently delete schema "${currentSchema}" from the database`;
|
||||
const isOk = getConfirmation(confirmMessage, true, currentSchema);
|
||||
if (!isOk) {
|
||||
dispatch(setSidebarLoading(false));
|
||||
return;
|
||||
}
|
||||
const migration = new Migration();
|
||||
|
@ -775,6 +775,7 @@ const changeTableName = (oldName, newName, isTable, tableType) => {
|
||||
|
||||
const property = tableType.toLowerCase();
|
||||
if (oldName === newName) {
|
||||
dispatch(setSidebarLoading(false));
|
||||
return dispatch(
|
||||
showErrorNotification(
|
||||
`Renaming ${property} failed`,
|
||||
@ -784,6 +785,7 @@ const changeTableName = (oldName, newName, isTable, tableType) => {
|
||||
}
|
||||
|
||||
if (!gqlPattern.test(newName)) {
|
||||
dispatch(setSidebarLoading(false));
|
||||
const gqlValidationError = isTable
|
||||
? gqlTableErrorNotif
|
||||
: gqlViewErrorNotif;
|
||||
|
Loading…
Reference in New Issue
Block a user