Compare commits

..

2 Commits

Author SHA1 Message Date
e895602aa4 Amend port 2025-07-17 13:12:10 +02:00
9c743ed514 Update OpenAPI, amend TS issues 2025-07-17 13:11:20 +02:00
7 changed files with 13 additions and 119 deletions

View File

@@ -7,16 +7,16 @@ services:
depends_on: depends_on:
- db - db
environment: environment:
QUARKUS_DATASOURCE_JDBC_URL: jdbc:postgresql://db:5432/dex QUARKUS_DATASOURCE_JDBC_URL:
QUARKUS_DATASOURCE_USERNAME: dex QUARKUS_DATASOURCE_USERNAME:
QUARKUS_DATASOURCE_PASSWORD: dex QUARKUS_DATASOURCE_PASSWORD:
QUARKUS_OIDC_AUTH_SERVER_URL: https://auth.smoothbrain.win/application/o/dex-be/ QUARKUS_OIDC_AUTH_SERVER_URL:
QUARKUS_OIDC_CLIENT_ID: wUSuMpZlbop44mij54Mshxuf4CMuXdR9h1Jv9Ixc QUARKUS_OIDC_CLIENT_ID:
QUARKUS_OIDC_CREDENTIALS_SECRET: CY8i3LM5mqHRUKAie6EscEi8fteiehYgy0FC2HtY79U1TxhRcCde9FfFB3m05DYvOTqI4xufRmspI5N5uqzgXkAljoe7BTjXw1Hhgxz0e5KH0K1jADhpO5a4lczoifjl QUARKUS_OIDC_CREDENTIALS_SECRET:
QUARKUS_OIDC_TOKEN_AUDIENCE: K202NAqkgfjceLZr28gAVQgJDc6RjZfdrE1jNx0K,wUSuMpZlbop44mij54Mshxuf4CMuXdR9h1Jv9Ixc QUARKUS_OIDC_TOKEN_AUDIENCE:
QUARKUS_OIDC_TOKEN_ISSUER: https://auth.smoothbrain.win/application/o/dex/ QUARKUS_OIDC_TOKEN_ISSUER:
QUARKUS_HTTP_INSECURE_REQUESTS: enabled QUARKUS_HTTP_INSECURE_REQUESTS: enabled
DEX_FILE_PATH: /data/files DEX_FILE_PATH:
networks: networks:
- dex - dex
@@ -25,7 +25,7 @@ services:
context: .. context: ..
dockerfile: docker/Dockerfile dockerfile: docker/Dockerfile
ports: ports:
- "7070:7070" - "80:80"
depends_on: depends_on:
- be - be
environment: environment:

View File

@@ -2,7 +2,7 @@
set -e set -e
: "${API_HOST:=http://localhost}" : "${API_HOST:=http://localhost}"
: "${API_PORT:=7070}" : "${API_PORT:=80}"
# Create runtime config file in writable location # Create runtime config file in writable location
cat > /runtime-config/config.js <<EOF cat > /runtime-config/config.js <<EOF
window.__APP_CONFIG__ = { window.__APP_CONFIG__ = {

View File

@@ -32,7 +32,7 @@ http {
} }
server { server {
listen 7070; listen 80;
server_name localhost; server_name localhost;
root /usr/share/nginx/html; root /usr/share/nginx/html;
index index.html; index index.html;
@@ -57,7 +57,7 @@ http {
} }
location /api/ { location /api/ {
proxy_pass http://backend:8080/; proxy_pass http://backend;
# Headers for both simple and preflight requests # Headers for both simple and preflight requests
add_header 'Access-Control-Allow-Origin' '$http_origin' always; add_header 'Access-Control-Allow-Origin' '$http_origin' always;

View File

@@ -35,10 +35,6 @@
<main class="app-main pt-[60px]"> <main class="app-main pt-[60px]">
<Toast/> <Toast/>
<RouterView/> <RouterView/>
<ImportModal
:visible="importModalVisibility"
@update:visible="importModalVisibility = false"
/>
</main> </main>
</div> </div>
</template> </template>
@@ -48,11 +44,9 @@ import {ref} from "vue";
import {useRouter} from "vue-router"; import {useRouter} from "vue-router";
import Toast from 'primevue/toast'; import Toast from 'primevue/toast';
import {useAuthStore} from "./stores/auth.ts"; import {useAuthStore} from "./stores/auth.ts";
import ImportModal from "@/components/ImportModal.vue";
const authStore = useAuthStore(); const authStore = useAuthStore();
const router = useRouter(); const router = useRouter();
const importModalVisibility = ref(false);
const items = ref([ const items = ref([
{ {
@@ -89,11 +83,6 @@ const items = ref([
command: () => { command: () => {
router.push('/jobs'); router.push('/jobs');
} }
},
{
label: 'Import Set',
icon: 'pi pi-mobile',
command: () => importModalVisibility.value = true
} }
]); ]);
</script> </script>

2
src/components.d.ts vendored
View File

@@ -19,13 +19,11 @@ declare module 'vue' {
Column: typeof import('primevue/column')['default'] Column: typeof import('primevue/column')['default']
CustomTag: typeof import('./components/CustomTag.vue')['default'] CustomTag: typeof import('./components/CustomTag.vue')['default']
DataTable: typeof import('primevue/datatable')['default'] DataTable: typeof import('primevue/datatable')['default']
Dialog: typeof import('primevue/dialog')['default']
Divider: typeof import('primevue/divider')['default'] Divider: typeof import('primevue/divider')['default']
DynamicAsset: typeof import('./components/DynamicAsset.vue')['default'] DynamicAsset: typeof import('./components/DynamicAsset.vue')['default']
Fieldset: typeof import('primevue/fieldset')['default'] Fieldset: typeof import('primevue/fieldset')['default']
FloatLabel: typeof import('primevue/floatlabel')['default'] FloatLabel: typeof import('primevue/floatlabel')['default']
Image: typeof import('primevue/image')['default'] Image: typeof import('primevue/image')['default']
ImportModal: typeof import('./components/ImportModal.vue')['default']
InputNumber: typeof import('primevue/inputnumber')['default'] InputNumber: typeof import('primevue/inputnumber')['default']
InputText: typeof import('primevue/inputtext')['default'] InputText: typeof import('primevue/inputtext')['default']
LinkArrowsComponent: typeof import('./components/LinkArrowsComponent.vue')['default'] LinkArrowsComponent: typeof import('./components/LinkArrowsComponent.vue')['default']

View File

@@ -1,86 +0,0 @@
<template>
<Dialog
v-model:visible="visible"
@update:visible="$emit('update:visible', visible)"
modal
header="Edit Profile"
:style="{ width: '25rem' }"
:draggable="false"
>
<template #header>
<div class="inline-flex items-center justify-center gap-2">
<span class="font-bold whitespace-nowrap">Import Set</span>
</div>
</template>
<div class="flex items-center gap-4 mb-4">
<label for="setName" class="font-semibold w-24">Set Name</label>
<InputText id="setName" v-model="cardSetName" class="flex-auto" autocomplete="off" />
</div>
<template #footer>
<Button label="Cancel" text severity="secondary" @click="visible = false" autofocus />
<Button
label="Import"
:disabled="!cardSetName"
outlined
severity="primary"
@click="startSetScrapeJob(cardSetName)"
autofocus
/>
</template>
</Dialog>
</template>
<script setup lang="ts">
import {inject, ref, type Ref, watch} from "vue";
import {SetServiceKey} from "@/main.ts";
import {SetService} from "@/api/openapi";
import {useToast} from "primevue";
const emit = defineEmits(['update:visible'])
const toast = useToast();
const loading: Ref<boolean> = ref(false);
const visible: Ref<boolean> = defineModel("visible", {
required: true
})
const cardSetName: Ref<string | null> = ref(null)
const setService: SetService = inject(SetServiceKey) as SetService
const startSetScrapeJob = async (name: string | null) => {
if (!name) {
return;
}
loading.value = true;
try {
await setService.scrapeSetByName({
name: name
})
toast.add({
severity: "info",
detail: `Import Job for '${cardSetName}' has been started'`
})
} catch (e) {
toast.add({
severity: "error",
detail: "Error occurred trying to import CardSet - see logs for details"
})
} finally {
loading.value = false;
visible.value = false;
emit('update:visible', visible)
}
}
watch(visible, (newValue: boolean) => {
if (!newValue) {
cardSetName.value = null;
}
})
</script>
<style scoped>
</style>

View File

@@ -24,13 +24,6 @@ export default defineConfig({
'@': path.resolve(__dirname, './src'), '@': path.resolve(__dirname, './src'),
} }
}, },
proxy: {
'/api': {
target: 'http://localhost:8080',
changeOrigin: true,
secure: false,
}
},
build: { build: {
// @ts-ignore // @ts-ignore
assetsInclude: [ assetsInclude: [