@@ -25,6 +25,7 @@ import { GetFullConfig } from '@postgres.ai/shared/types/api/endpoints/getFullCo
25
25
import { GetInstanceRetrieval } from '@postgres.ai/shared/types/api/endpoints/getInstanceRetrieval'
26
26
import { InstanceRetrievalType } from '@postgres.ai/shared/types/api/entities/instanceRetrieval'
27
27
import { GetEngine } from '@postgres.ai/shared/types/api/endpoints/getEngine'
28
+ import { isRetrievalUnknown } from '@postgres.ai/shared/pages/Configuration/utils'
28
29
29
30
const POLLING_TIME = 2000
30
31
@@ -67,6 +68,7 @@ export class MainStore {
67
68
readonly snapshots : SnapshotsStore
68
69
69
70
isReloadingClones = false
71
+ isConfigurationLoading = false
70
72
isReloadingInstance = false
71
73
isReloadingInstanceRetrieval = false
72
74
@@ -89,8 +91,7 @@ export class MainStore {
89
91
this . isReloadingInstance = true
90
92
this . loadInstance ( instanceId )
91
93
this . loadInstanceRetrieval ( instanceId ) . then ( ( ) => {
92
- this . isReloadingInstance = false
93
- if ( this . instanceRetrieval ?. mode !== 'physical' ) {
94
+ if ( ! isRetrievalUnknown ( this . instanceRetrieval ?. mode ) ) {
94
95
this . getConfig ( )
95
96
}
96
97
} )
@@ -170,8 +171,12 @@ export class MainStore {
170
171
getConfig = async ( ) => {
171
172
if ( ! this . api . getConfig ) return
172
173
174
+ this . isConfigurationLoading = true
175
+
173
176
const { response, error } = await this . api . getConfig ( )
174
177
178
+ this . isConfigurationLoading = false
179
+
175
180
if ( response ) {
176
181
this . config = response
177
182
this . configError = null
0 commit comments