Skip to content
Snippets Groups Projects
Verified Commit 61153078 authored by Martin Weise's avatar Martin Weise
Browse files

Hotfix UI and Helm chart

parent c78443cb
Branches
Tags
3 merge requests!268Master,!266Dev,!265Dev
Showing
with 37 additions and 31 deletions
......@@ -112,6 +112,7 @@ public class DatabaseEndpoint {
log.trace("list databases resulted in databases {}", dtos);
final HttpHeaders headers = new HttpHeaders();
headers.set("X-Count", "" + dtos.size());
headers.set("Access-Control-Expose-Headers", "X-Count");
return ResponseEntity.status(HttpStatus.OK)
.headers(headers)
.body(dtos);
......
......@@ -178,6 +178,7 @@ public class QueryEndpoint {
final Long count = queryService.reExecuteCount(databaseId, query, principal);
final HttpHeaders headers = new HttpHeaders();
headers.set("X-Count", "" + count);
headers.set("Access-Control-Expose-Headers", "X-Count");
if (request.getMethod().equals("GET")) {
final QueryResultDto result = queryService.reExecute(databaseId, query, page, size, sortDirection, sortColumn,
principal);
......
......@@ -307,6 +307,7 @@ public class TableDataEndpoint {
final Long count = queryService.tableCount(databaseId, tableId, timestamp, principal);
final HttpHeaders headers = new HttpHeaders();
headers.set("X-Count", "" + count);
headers.set("Access-Control-Expose-Headers", "X-Count");
if (request.getMethod().equals("GET")) {
final QueryResultDto response = queryService.tableFindAll(databaseId, tableId, timestamp, page, size, principal);
log.trace("find table data resulted in result {}", response);
......
......@@ -316,6 +316,7 @@ public class ViewEndpoint {
final Long count = queryService.viewCount(databaseId, view, principal);
final HttpHeaders headers = new HttpHeaders();
headers.set("X-Count", "" + count);
headers.set("Access-Control-Expose-Headers", "X-Count");
if (request.getMethod().equals("GET")) {
final QueryResultDto result = queryService.viewFindAll(databaseId, view, page, size, principal);
log.trace("execute view data for view with id {}", viewId);
......
No preview for this file type
......@@ -14,7 +14,7 @@
</template>
<script>
import DatabaseSkeleton from '@/components/database/DatabaseSkeleton'
import DatabaseSkeleton from '@/components/database/DatabaseSkeleton.vue'
export default {
components: {
......
......@@ -135,7 +135,7 @@
</template>
<script>
import BlobUpload from '@/components/table/BlobUpload'
import BlobUpload from '@/components/table/BlobUpload.vue'
import {localizedMessage} from '@/utils'
export default {
......
......@@ -121,7 +121,6 @@
<script>
import { useCacheStore } from '@/stores/cache'
import {localizedMessage} from '@/utils'
export default {
props: {
......
......@@ -30,7 +30,7 @@
</template>
<script>
import Banner from '@/components/identifier/Banner'
import Banner from '@/components/identifier/Banner.vue'
import { formatTimestampUTCLabel } from '@/utils'
import { useUserStore } from '@/stores/user'
import { useCacheStore } from '@/stores/cache'
......
......@@ -168,12 +168,12 @@
</template>
<script>
import Citation from '@/components/identifier/Citation'
import IsniIcon from '@/components/icons/IsniIcon'
import OrcidIcon from '@/components/icons/OrcidIcon'
import RorIcon from '@/components/icons/RorIcon'
import Banner from '@/components/identifier/Banner'
import Persist from '@/components/identifier/Persist'
import Citation from '@/components/identifier/Citation.vue'
import IsniIcon from '@/components/icons/IsniIcon.vue'
import OrcidIcon from '@/components/icons/OrcidIcon.vue'
import RorIcon from '@/components/icons/RorIcon.vue'
import Banner from '@/components/identifier/Banner.vue'
import Persist from '@/components/identifier/Persist.vue'
import { formatLanguage } from '@/utils'
import { useCacheStore } from '@/stores/cache'
......
......@@ -271,9 +271,9 @@
</template>
<script>
import TimeDrift from '@/components/TimeDrift'
import Raw from '@/components/subset/Raw'
import Results from '@/components/subset/Results'
import TimeDrift from '@/components/TimeDrift.vue'
import Raw from '@/components/subset/Raw.vue'
import Results from '@/components/subset/Results.vue'
import { useCacheStore } from '@/stores/cache'
import { useUserStore } from '@/stores/user'
import { format } from 'sql-formatter'
......
......@@ -75,7 +75,7 @@
</template>
<script>
import DownloadButton from '@/components/identifier/DownloadButton'
import DownloadButton from '@/components/identifier/DownloadButton.vue'
import { formatTimestampUTCLabel } from '@/utils'
import { useUserStore } from '@/stores/user'
import { useCacheStore } from '@/stores/cache'
......
......@@ -399,6 +399,7 @@ export default {
this.rowCount = rowCount
})
this.step = this.stepStart + 2
this.loading = false
})
.catch((error) => {
console.error('Failed to import csv', error)
......@@ -410,6 +411,7 @@ export default {
})
},
uploadAndAnalyse() {
this.loading = true
this.previousFile = this.fileModel[0]
const uploadService = useUploadService()
return uploadService.create(this.previousFile)
......@@ -421,17 +423,14 @@ export default {
this.$toast.error(this.$t('error.upload.dataset'))
this.loading = false
})
.finally(() => {
this.loading = false
})
},
analyse(filename) {
this.loading = true
const analyseService = useAnalyseService()
const payload = { filename }
if (this.tableImport.separator) {
payload.separator = this.tableImport.separator
}
this.loading = true
analyseService.suggest(payload)
.then((analysis) => {
const {columns, separator, line_termination} = analysis
......@@ -456,6 +455,7 @@ export default {
this.step = this.stepStart + 2
this.$toast.success(this.$t('success.analyse.dataset'))
this.$emit('analyse', {columns: this.columns, filename, line_termination})
this.loading = false
})
.catch((error) => {
this.$toast.error(localizedMessage(this.$t, error, null))
......
......@@ -73,8 +73,8 @@
</template>
<script>
import EditTuple from '@/components/dialogs/EditTuple'
import DropTable from '@/components/dialogs/DropTable'
import EditTuple from '@/components/dialogs/EditTuple.vue'
import DropTable from '@/components/dialogs/DropTable.vue'
import { useCacheStore } from '@/stores/cache'
import { useUserStore } from '@/stores/user'
......
......@@ -15,7 +15,7 @@
</template>
<script>
import OrcidIcon from '@/components/icons/OrcidIcon'
import OrcidIcon from '@/components/icons/OrcidIcon.vue'
export default {
components: {
......
......@@ -8,11 +8,12 @@ export const useAxiosInstance = () => {
const userStore = useUserStore()
if (!instance) {
instance = axios.create({
timeout: 3000,
timeout: 10000,
params: {},
headers: {
Accept: 'application/json',
'Content-Type': 'application/json'
'Content-Type': 'application/json',
'Access-Control-Allow-Origin': '*'
},
baseURL: config.public.api.client
});
......
......@@ -110,8 +110,9 @@ export const useQueryService = (): any => {
return new Promise<number>((resolve, reject) => {
axios.head<void>(`/api/database/${databaseId}/query/${queryId}/data`)
.then((response) => {
const count: number = Number(response.headers['x-count'])
console.info('Re-executed query in database with id', databaseId)
resolve(Number(response.headers['X-Count']))
resolve(count)
})
.catch((error) => {
console.error('Failed to re-execute query', error)
......
import type {AxiosRequestConfig} from 'axios'
import type {AxiosRequestConfig, AxiosResponse} from 'axios'
export const useTableService = (): any => {
......@@ -87,9 +87,10 @@ export const useTableService = (): any => {
console.debug('get data count for table with id', tableId, 'in database with id', databaseId);
return new Promise<number>((resolve, reject) => {
axios.head<number>(`/api/database/${databaseId}/table/${tableId}/data`, {params: mapFilter(timestamp, null, null)})
.then((response) => {
console.info('Got data count for table with id', tableId, 'in database with id', databaseId)
resolve(response.data)
.then((response: AxiosResponse<void>) => {
const count: number = Number(response.headers['x-count'])
console.info('Found' + count + 'in table with id', tableId, 'in database with id', databaseId)
resolve(count)
})
.catch((error) => {
console.error('Failed to get data count')
......
......@@ -53,7 +53,7 @@ export const useViewService = (): any => {
return new Promise<number>((resolve, reject) => {
axios.head<number>(`/api/database/${databaseId}/view/${viewId}/data`)
.then((response) => {
const count: number = Number(response.headers['X-Count'])
const count: number = Number(response.headers['x-count'])
console.info('Re-executed view with id', viewId, 'in database with id', databaseId)
resolve(count)
})
......
......@@ -74,7 +74,7 @@ export default defineNuxtConfig({
},
api: {
client: 'http://localhost',
server: 'http://gateway-service',
server: 'http://localhost',
},
database: {
unsupported: '*,AVG,BIT_AND,BIT_OR,BIT_XOR,COUNT,COUNTDISTINCT,GROUP_CONCAT,JSON_ARRAYAGG,JSON_OBJECTAGG,MAX,MIN,STD,STDDEV,STDDEV_POP,STDDEV_SAMP,SUM,VARIANCE,VAR_POP,VAR_SAMP,--',
......@@ -100,7 +100,7 @@ export default defineNuxtConfig({
},
rabbitmq: {
text: 'RabbitMQ Admin',
href: '/admin/broker/'
href: '/api/broker/'
},
keycloak: {
text: 'Keycloak Admin',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment