diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fd74dd0..94cb997 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -81,8 +81,5 @@ jobs: repo_token: "${{ secrets.GITHUB_TOKEN }}" files: | LICENSE - out/make/**/*.dmg - out/make/**/*.rpm - out/make/**/*.deb - out/make/**/*.Setup.exe + out/make/**/*.{dmg,rpm,deb,Setup.exe} diff --git a/src/electron/sourceFIleApi.ts b/src/electron/sourceFIleApi.ts index 3a84f21..f93a068 100644 --- a/src/electron/sourceFIleApi.ts +++ b/src/electron/sourceFIleApi.ts @@ -52,6 +52,6 @@ const sourceFileApi: { [key: string]: (filePath: string, content: string) => unk export const registerSourceFileApiListener = (ipcMain: Electron.IpcMain) => { ipcMain.handle('sourceFileAPI', (_, { content, method }: SourceFileApiInput) => - sourceFileApi[method.toLowerCase()]('./data/default.search', content), + sourceFileApi[method.toLowerCase()]('../../data/default.search', content), ); }; diff --git a/src/store/connectionStore.ts b/src/store/connectionStore.ts index e535ce3..b6295b5 100644 --- a/src/store/connectionStore.ts +++ b/src/store/connectionStore.ts @@ -96,6 +96,19 @@ export const useConnectionStore = defineStore('connectionStore', { })); this.established = { ...connection, indices }; }, + async fetchIndices() { + if (!this.established) throw new Error('no connection established'); + const client = loadHttpClient(this.established as Connection); + const data = await client.get('/_cat/indices', 'format=json'); + this.established!.indices = data.map((index: { [key: string]: string }) => ({ + ...index, + docs: { + count: parseInt(index['docs.count'], 10), + deleted: parseInt(index['docs.deleted'], 10), + }, + store: { size: index['store.size'] }, + })); + }, selectIndex(indexName: string) { this.established = { ...this.established, @@ -119,8 +132,6 @@ export const useConnectionStore = defineStore('connectionStore', { const reqPath = buildPath(index, path); const body = qdsl ? JSON.parse(qdsl) : undefined; - // eslint-disable-next-line no-console - console.log('before req', { index, qdsl, method, path }); const dispatch: { [method: string]: () => Promise } = { POST: async () => client.post(reqPath, undefined, body), PUT: async () => client.put(reqPath, undefined, body), diff --git a/src/views/connect/components/collection-selector.vue b/src/views/connect/components/collection-selector.vue index 1181bba..9cc86f3 100644 --- a/src/views/connect/components/collection-selector.vue +++ b/src/views/connect/components/collection-selector.vue @@ -3,7 +3,11 @@ @@ -11,10 +15,15 @@