mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-09-21 07:28:26 +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));
|
dispatch(setSidebarLoading(true));
|
||||||
const source = getState().tables.currentDataSource;
|
const source = getState().tables.currentDataSource;
|
||||||
if (!gqlPattern.test(schemaName)) {
|
if (!gqlPattern.test(schemaName)) {
|
||||||
|
dispatch(setSidebarLoading(false));
|
||||||
return dispatch(
|
return dispatch(
|
||||||
showErrorNotification(
|
showErrorNotification(
|
||||||
gqlSchemaErrorNotif[0],
|
gqlSchemaErrorNotif[0],
|
||||||
@ -69,6 +70,7 @@ export const deleteCurrentSchema = (successCb, errorCb) => {
|
|||||||
const confirmMessage = `This will permanently delete schema "${currentSchema}" from the database`;
|
const confirmMessage = `This will permanently delete schema "${currentSchema}" from the database`;
|
||||||
const isOk = getConfirmation(confirmMessage, true, currentSchema);
|
const isOk = getConfirmation(confirmMessage, true, currentSchema);
|
||||||
if (!isOk) {
|
if (!isOk) {
|
||||||
|
dispatch(setSidebarLoading(false));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const migration = new Migration();
|
const migration = new Migration();
|
||||||
|
@ -775,6 +775,7 @@ const changeTableName = (oldName, newName, isTable, tableType) => {
|
|||||||
|
|
||||||
const property = tableType.toLowerCase();
|
const property = tableType.toLowerCase();
|
||||||
if (oldName === newName) {
|
if (oldName === newName) {
|
||||||
|
dispatch(setSidebarLoading(false));
|
||||||
return dispatch(
|
return dispatch(
|
||||||
showErrorNotification(
|
showErrorNotification(
|
||||||
`Renaming ${property} failed`,
|
`Renaming ${property} failed`,
|
||||||
@ -784,6 +785,7 @@ const changeTableName = (oldName, newName, isTable, tableType) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!gqlPattern.test(newName)) {
|
if (!gqlPattern.test(newName)) {
|
||||||
|
dispatch(setSidebarLoading(false));
|
||||||
const gqlValidationError = isTable
|
const gqlValidationError = isTable
|
||||||
? gqlTableErrorNotif
|
? gqlTableErrorNotif
|
||||||
: gqlViewErrorNotif;
|
: gqlViewErrorNotif;
|
||||||
|
Loading…
Reference in New Issue
Block a user