mirror of
				https://github.com/Fabio286/antares.git
				synced 2025-06-05 21:59:22 +02:00 
			
		
		
		
	perf: avoid to load schema elements if already loaded in export modal
This commit is contained in:
		| @@ -172,6 +172,7 @@ export default connections => { | |||||||
|  |  | ||||||
|       switch (type) { |       switch (type) { | ||||||
|          case 'mysql': |          case 'mysql': | ||||||
|  |          case 'maria': | ||||||
|             exporter = new MysqlExporter(connections[uid], tables, rest); |             exporter = new MysqlExporter(connections[uid], tables, rest); | ||||||
|             break; |             break; | ||||||
|          default: |          default: | ||||||
|   | |||||||
| @@ -48,11 +48,16 @@ | |||||||
|                      </div> |                      </div> | ||||||
|  |  | ||||||
|                      <div class="column col-auto col-ml-auto "> |                      <div class="column col-auto col-ml-auto "> | ||||||
|                         <button class="btn btn-dark btn-sm" @click="refresh"> |                         <button | ||||||
|  |                            class="btn btn-dark btn-sm" | ||||||
|  |                            :title="$t('word.refresh')" | ||||||
|  |                            @click="refresh" | ||||||
|  |                         > | ||||||
|                            <i class="mdi mdi-database-refresh" /> |                            <i class="mdi mdi-database-refresh" /> | ||||||
|                         </button> |                         </button> | ||||||
|                         <button |                         <button | ||||||
|                            class="btn btn-dark btn-sm" |                            class="btn btn-dark btn-sm" | ||||||
|  |                            :title="$t('message.uncheckAllTables')" | ||||||
|                            :disabled="isRefreshing" |                            :disabled="isRefreshing" | ||||||
|                            @click="uncheckAllTables" |                            @click="uncheckAllTables" | ||||||
|                         > |                         > | ||||||
| @@ -60,6 +65,7 @@ | |||||||
|                         </button> |                         </button> | ||||||
|                         <button |                         <button | ||||||
|                            class="btn btn-dark btn-sm" |                            class="btn btn-dark btn-sm" | ||||||
|  |                            :title="$t('message.checkAllTables')" | ||||||
|                            :disabled="isRefreshing" |                            :disabled="isRefreshing" | ||||||
|                            @click="checkAllTables" |                            @click="checkAllTables" | ||||||
|                         > |                         > | ||||||
| @@ -258,8 +264,10 @@ export default { | |||||||
|       } |       } | ||||||
|    }, |    }, | ||||||
|    async created () { |    async created () { | ||||||
|       await this.refresh(); |       if (!this.schemaItems.length) await this.refresh(); | ||||||
|  |  | ||||||
|       window.addEventListener('keydown', this.onKey); |       window.addEventListener('keydown', this.onKey); | ||||||
|  |  | ||||||
|       this.basePath = await Application.getDownloadPathDirectory(); |       this.basePath = await Application.getDownloadPathDirectory(); | ||||||
|       this.tables = this.schemaItems.map(item => ({ |       this.tables = this.schemaItems.map(item => ({ | ||||||
|          table: item.name, |          table: item.name, | ||||||
|   | |||||||
| @@ -155,12 +155,10 @@ module.exports = { | |||||||
|       downloadingUpdate: 'Downloading update', |       downloadingUpdate: 'Downloading update', | ||||||
|       updateDownloaded: 'Update downloaded', |       updateDownloaded: 'Update downloaded', | ||||||
|       restartToInstall: 'Restart Antares to install', |       restartToInstall: 'Restart Antares to install', | ||||||
|       unableEditFieldWithoutPrimary: |       unableEditFieldWithoutPrimary: 'Unable to edit a field without a primary key in resultset', | ||||||
|          'Unable to edit a field without a primary key in resultset', |  | ||||||
|       editCell: 'Edit cell', |       editCell: 'Edit cell', | ||||||
|       deleteRows: 'Delete row | Delete {count} rows', |       deleteRows: 'Delete row | Delete {count} rows', | ||||||
|       confirmToDeleteRows: |       confirmToDeleteRows: 'Do you confirm to delete one row? | Do you confirm to delete {count} rows?', | ||||||
|          'Do you confirm to delete one row? | Do you confirm to delete {count} rows?', |  | ||||||
|       notificationsTimeout: 'Notifications timeout', |       notificationsTimeout: 'Notifications timeout', | ||||||
|       uploadFile: 'Upload file', |       uploadFile: 'Upload file', | ||||||
|       addNewRow: 'Add new row', |       addNewRow: 'Add new row', | ||||||
| @@ -188,8 +186,7 @@ module.exports = { | |||||||
|       deleteTable: 'Delete table', |       deleteTable: 'Delete table', | ||||||
|       emptyCorfirm: 'Do you confirm to empty', |       emptyCorfirm: 'Do you confirm to empty', | ||||||
|       unsavedChanges: 'Unsaved changes', |       unsavedChanges: 'Unsaved changes', | ||||||
|       discardUnsavedChanges: |       discardUnsavedChanges: 'You have some unsaved changes. Closing this tab these changes will be discarded.', | ||||||
|          'You have some unsaved changes. Closing this tab these changes will be discarded.', |  | ||||||
|       thereAreNoIndexes: 'There are no indexes', |       thereAreNoIndexes: 'There are no indexes', | ||||||
|       thereAreNoForeign: 'There are no foreign keys', |       thereAreNoForeign: 'There are no foreign keys', | ||||||
|       createNewForeign: 'Create new foreign key', |       createNewForeign: 'Create new foreign key', | ||||||
| @@ -266,7 +263,9 @@ module.exports = { | |||||||
|       newInserStmtEvery: 'New INSERT statement every', |       newInserStmtEvery: 'New INSERT statement every', | ||||||
|       processingTableExport: 'Processing {table}', |       processingTableExport: 'Processing {table}', | ||||||
|       fechingTableExport: 'Fetching {table} data', |       fechingTableExport: 'Fetching {table} data', | ||||||
|       writingTableExport: 'Writing {table} data' |       writingTableExport: 'Writing {table} data', | ||||||
|  |       checkAllTables: 'Check all tables', | ||||||
|  |       uncheckAllTables: 'Uncheck all tables' | ||||||
|    }, |    }, | ||||||
|    faker: { |    faker: { | ||||||
|       address: 'Address', |       address: 'Address', | ||||||
|   | |||||||
| @@ -155,12 +155,10 @@ module.exports = { | |||||||
|       downloadingUpdate: 'Download dell\'aggiornamento', |       downloadingUpdate: 'Download dell\'aggiornamento', | ||||||
|       updateDownloaded: 'Aggiornamento scaricato', |       updateDownloaded: 'Aggiornamento scaricato', | ||||||
|       restartToInstall: 'Riavvia Antares per installare l\'aggiornamento', |       restartToInstall: 'Riavvia Antares per installare l\'aggiornamento', | ||||||
|       unableEditFieldWithoutPrimary: |       unableEditFieldWithoutPrimary: 'Impossibile modificare il campo senza una primary key nel resultset', | ||||||
|          'Impossibile modificare il campo senza una primary key nel resultset', |  | ||||||
|       editCell: 'Modifica cella', |       editCell: 'Modifica cella', | ||||||
|       deleteRows: 'Elimina riga | Elimina {count} righe', |       deleteRows: 'Elimina riga | Elimina {count} righe', | ||||||
|       confirmToDeleteRows: |       confirmToDeleteRows: 'Confermi di voler cancellare una riga? | Confermi di voler cancellare {count} righe?', | ||||||
|          'Confermi di voler cancellare una riga? | Confermi di voler cancellare {count} righe?', |  | ||||||
|       notificationsTimeout: 'Timeout Notifiche', |       notificationsTimeout: 'Timeout Notifiche', | ||||||
|       uploadFile: 'Carica file', |       uploadFile: 'Carica file', | ||||||
|       addNewRow: 'Aggiungi nuova riga', |       addNewRow: 'Aggiungi nuova riga', | ||||||
| @@ -188,8 +186,7 @@ module.exports = { | |||||||
|       deleteTable: 'Cancella tabella', |       deleteTable: 'Cancella tabella', | ||||||
|       emptyCorfirm: 'Confermi di voler svuotare', |       emptyCorfirm: 'Confermi di voler svuotare', | ||||||
|       unsavedChanges: 'Modifiche non salvate', |       unsavedChanges: 'Modifiche non salvate', | ||||||
|       discardUnsavedChanges: |       discardUnsavedChanges: 'Hai modifiche non salvate. Lasciando questa scheda le modifiche saranno scartate.', | ||||||
|          'Hai modifiche non salvate. Lasciando questa scheda le modifiche saranno scartate.', |  | ||||||
|       thereAreNoIndexes: 'Non ci sono indici', |       thereAreNoIndexes: 'Non ci sono indici', | ||||||
|       thereAreNoForeign: 'Non ci sono chiavi esterne', |       thereAreNoForeign: 'Non ci sono chiavi esterne', | ||||||
|       createNewForeign: 'Crea nuova chiave esterna', |       createNewForeign: 'Crea nuova chiave esterna', | ||||||
| @@ -253,7 +250,9 @@ module.exports = { | |||||||
|       newInserStmtEvery: 'Nuova istruzione INSERT ogni', |       newInserStmtEvery: 'Nuova istruzione INSERT ogni', | ||||||
|       processingTableExport: 'Processo {table}', |       processingTableExport: 'Processo {table}', | ||||||
|       fechingTableExport: 'Ricavo i dati {table}', |       fechingTableExport: 'Ricavo i dati {table}', | ||||||
|       writingTableExport: 'Scrittura dati {table}' |       writingTableExport: 'Scrittura dati {table}', | ||||||
|  |       checkAllTables: 'Seleziona tutte le tabelle', | ||||||
|  |       uncheckAllTables: 'Deseleziona tutte le tabelle' | ||||||
|    }, |    }, | ||||||
|    faker: { |    faker: { | ||||||
|       address: 'Indirizzo', |       address: 'Indirizzo', | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user