fix: wrong loaded schema change

This commit is contained in:
Fabio Di Stasio 2021-07-21 17:56:55 +02:00
parent e6ef5ffa56
commit c41e059b0b
9 changed files with 12 additions and 10 deletions

View File

@ -41,7 +41,7 @@
</form> </form>
</div> </div>
</div> </div>
<div class="modal-footer text-light"> <div class="modal-footer">
<button class="btn btn-primary mr-2" @click.stop="sendCredentials"> <button class="btn btn-primary mr-2" @click.stop="sendCredentials">
{{ $t('word.send') }} {{ $t('word.send') }}
</button> </button>

View File

@ -53,7 +53,7 @@
</form> </form>
</div> </div>
</div> </div>
<div class="modal-footer text-light"> <div class="modal-footer">
<button class="btn btn-primary mr-2" @click.stop="updateSchema"> <button class="btn btn-primary mr-2" @click.stop="updateSchema">
{{ $t('word.update') }} {{ $t('word.update') }}
</button> </button>

View File

@ -52,7 +52,7 @@
</form> </form>
</div> </div>
</div> </div>
<div class="modal-footer text-light columns"> <div class="modal-footer columns">
<div class="column d-flex" :class="hasFakes ? 'col-4' : 'col-2'"> <div class="column d-flex" :class="hasFakes ? 'col-4' : 'col-2'">
<div class="input-group tooltip tooltip-right" :data-tooltip="$t('message.numberOfInserts')"> <div class="input-group tooltip tooltip-right" :data-tooltip="$t('message.numberOfInserts')">
<input <input

View File

@ -49,7 +49,7 @@
</form> </form>
</div> </div>
</div> </div>
<div class="modal-footer text-light"> <div class="modal-footer">
<button <button
class="btn btn-primary mr-2" class="btn btn-primary mr-2"
:class="{'loading': isLoading}" :class="{'loading': isLoading}"

View File

@ -86,7 +86,7 @@
</form> </form>
</div> </div>
</div> </div>
<div class="modal-footer text-light"> <div class="modal-footer">
<div class="input-group col-3 tooltip tooltip-right" :data-tooltip="$t('message.numberOfInserts')"> <div class="input-group col-3 tooltip tooltip-right" :data-tooltip="$t('message.numberOfInserts')">
<input <input
v-model="nInserts" v-model="nInserts"

View File

@ -273,6 +273,7 @@ export default {
methods: { methods: {
...mapActions({ ...mapActions({
changeBreadcrumbs: 'workspaces/changeBreadcrumbs', changeBreadcrumbs: 'workspaces/changeBreadcrumbs',
addLoadedSchema: 'workspaces/addLoadedSchema',
newTab: 'workspaces/newTab', newTab: 'workspaces/newTab',
refreshSchema: 'workspaces/refreshSchema' refreshSchema: 'workspaces/refreshSchema'
}), }),
@ -281,6 +282,7 @@ export default {
if (!this.loadedSchemas.has(schema) && !this.isLoading) { if (!this.loadedSchemas.has(schema) && !this.isLoading) {
this.isLoading = true; this.isLoading = true;
await this.refreshSchema({ uid: this.connection.uid, schema }); await this.refreshSchema({ uid: this.connection.uid, schema });
this.addLoadedSchema(schema);
this.isLoading = false; this.isLoading = false;
} }

View File

@ -326,7 +326,7 @@
:status="toast.status" :status="toast.status"
/> />
</div> </div>
<div class="modal-footer text-light"> <div class="modal-footer">
<button <button
class="btn btn-gray mr-2" class="btn btn-gray mr-2"
:class="{'loading': isTesting}" :class="{'loading': isTesting}"

View File

@ -333,7 +333,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="modal-footer text-light"> <div class="modal-footer">
<button <button
class="btn btn-gray mr-2" class="btn btn-gray mr-2"
:class="{'loading': isTesting}" :class="{'loading': isTesting}"

View File

@ -513,9 +513,9 @@ export default {
}; };
commit('CHANGE_BREADCRUMBS', { uid: getters.getSelected, breadcrumbs: { ...breadcrumbsObj, ...payload } }); commit('CHANGE_BREADCRUMBS', { uid: getters.getSelected, breadcrumbs: { ...breadcrumbsObj, ...payload } });
},
if (payload.schema) addLoadedSchema ({ commit, getters }, schema) {
commit('ADD_LOADED_SCHEMA', { uid: getters.getSelected, schema: payload.schema }); commit('ADD_LOADED_SCHEMA', { uid: getters.getSelected, schema });
}, },
setSearchTerm ({ commit, getters }, term) { setSearchTerm ({ commit, getters }, term) {
commit('SET_SEARCH_TERM', { uid: getters.getSelected, term }); commit('SET_SEARCH_TERM', { uid: getters.getSelected, term });