Compare commits
2 Commits
520f59a0ca
...
4ccbf959f8
| Author | SHA1 | Date | |
|---|---|---|---|
| 4ccbf959f8 | |||
| 80e2924e30 |
@@ -7,16 +7,16 @@ services:
|
||||
depends_on:
|
||||
- db
|
||||
environment:
|
||||
QUARKUS_DATASOURCE_JDBC_URL:
|
||||
QUARKUS_DATASOURCE_USERNAME:
|
||||
QUARKUS_DATASOURCE_PASSWORD:
|
||||
QUARKUS_OIDC_AUTH_SERVER_URL:
|
||||
QUARKUS_OIDC_CLIENT_ID:
|
||||
QUARKUS_OIDC_CREDENTIALS_SECRET:
|
||||
QUARKUS_OIDC_TOKEN_AUDIENCE:
|
||||
QUARKUS_OIDC_TOKEN_ISSUER:
|
||||
QUARKUS_DATASOURCE_JDBC_URL: jdbc:postgresql://db:5432/dex
|
||||
QUARKUS_DATASOURCE_USERNAME: dex
|
||||
QUARKUS_DATASOURCE_PASSWORD: dex
|
||||
QUARKUS_OIDC_AUTH_SERVER_URL: https://auth.smoothbrain.win/application/o/dex-be/
|
||||
QUARKUS_OIDC_CLIENT_ID: wUSuMpZlbop44mij54Mshxuf4CMuXdR9h1Jv9Ixc
|
||||
QUARKUS_OIDC_CREDENTIALS_SECRET: CY8i3LM5mqHRUKAie6EscEi8fteiehYgy0FC2HtY79U1TxhRcCde9FfFB3m05DYvOTqI4xufRmspI5N5uqzgXkAljoe7BTjXw1Hhgxz0e5KH0K1jADhpO5a4lczoifjl
|
||||
QUARKUS_OIDC_TOKEN_AUDIENCE: K202NAqkgfjceLZr28gAVQgJDc6RjZfdrE1jNx0K,wUSuMpZlbop44mij54Mshxuf4CMuXdR9h1Jv9Ixc
|
||||
QUARKUS_OIDC_TOKEN_ISSUER: https://auth.smoothbrain.win/application/o/dex/
|
||||
QUARKUS_HTTP_INSECURE_REQUESTS: enabled
|
||||
DEX_FILE_PATH:
|
||||
DEX_FILE_PATH: /data/files
|
||||
networks:
|
||||
- dex
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ http {
|
||||
resolver 127.0.0.11 valid=10s ipv6=off;
|
||||
|
||||
upstream backend {
|
||||
server ${API_HOST}:${API_PORT};
|
||||
server ${API_HOST}:8080;
|
||||
}
|
||||
|
||||
server {
|
||||
@@ -56,22 +56,23 @@ http {
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location ^~ /api/ {
|
||||
# Proxy to Quarkus
|
||||
proxy_pass http://backend;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
location /api/ {
|
||||
proxy_pass http://backend:8080/;
|
||||
|
||||
# Relay CORS headers from the backend
|
||||
proxy_pass_header Access-Control-Allow-Origin;
|
||||
proxy_pass_header Access-Control-Allow-Methods;
|
||||
proxy_pass_header Access-Control-Allow-Headers;
|
||||
proxy_pass_header Access-Control-Allow-Credentials;
|
||||
# Headers for both simple and preflight requests
|
||||
add_header 'Access-Control-Allow-Origin' '$http_origin' always;
|
||||
add_header 'Access-Control-Allow-Credentials' 'true' always;
|
||||
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS' always;
|
||||
add_header 'Access-Control-Allow-Headers' 'Authorization,Content-Type' always;
|
||||
add_header 'Access-Control-Expose-Headers' 'Authorization' always;
|
||||
|
||||
# Handle OPTIONS directly
|
||||
if ($request_method = 'OPTIONS') {
|
||||
add_header 'Access-Control-Max-Age' 1728000;
|
||||
add_header 'Content-Type' 'text/plain; charset=UTF-8';
|
||||
add_header 'Content-Length' 0;
|
||||
return 204;
|
||||
}
|
||||
}
|
||||
|
||||
# Cache static assets
|
||||
|
||||
11
src/App.vue
11
src/App.vue
@@ -35,6 +35,10 @@
|
||||
<main class="app-main pt-[60px]">
|
||||
<Toast/>
|
||||
<RouterView/>
|
||||
<ImportModal
|
||||
:visible="importModalVisibility"
|
||||
@update:visible="importModalVisibility = false"
|
||||
/>
|
||||
</main>
|
||||
</div>
|
||||
</template>
|
||||
@@ -44,9 +48,11 @@ import {ref} from "vue";
|
||||
import {useRouter} from "vue-router";
|
||||
import Toast from 'primevue/toast';
|
||||
import {useAuthStore} from "./stores/auth.ts";
|
||||
import ImportModal from "@/components/ImportModal.vue";
|
||||
|
||||
const authStore = useAuthStore();
|
||||
const router = useRouter();
|
||||
const importModalVisibility = ref(false);
|
||||
|
||||
const items = ref([
|
||||
{
|
||||
@@ -83,6 +89,11 @@ const items = ref([
|
||||
command: () => {
|
||||
router.push('/jobs');
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Import Set',
|
||||
icon: 'pi pi-mobile',
|
||||
command: () => importModalVisibility.value = true
|
||||
}
|
||||
]);
|
||||
</script>
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -6,8 +6,8 @@ All URIs are relative to *http://localhost*
|
||||
|------------- | ------------- | -------------|
|
||||
|[**apiSetsNameGet**](#apisetsnameget) | **GET** /api/sets/{name} | Find Set By Name|
|
||||
|[**apiSetsNameNewGet**](#apisetsnamenewget) | **GET** /api/sets/{name}/new | Fetch And Persist From Upstream|
|
||||
|[**apiSetsNameScrapeGet**](#apisetsnamescrapeget) | **GET** /api/sets/{name}/scrape | Scrape And Persist From Upstream|
|
||||
|[**getCardSetPage**](#getcardsetpage) | **GET** /api/sets | Get a page of Card Sets with optional name query parameter|
|
||||
|[**scrapeSetByName**](#scrapesetbyname) | **GET** /api/sets/{name}/scrape | Scrape a CardSet via name query parameter|
|
||||
|
||||
# **apiSetsNameGet**
|
||||
> SetDto apiSetsNameGet()
|
||||
@@ -102,56 +102,6 @@ No authorization required
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
|**200** | Set retrieved | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **apiSetsNameScrapeGet**
|
||||
> apiSetsNameScrapeGet()
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```typescript
|
||||
import {
|
||||
SetService,
|
||||
Configuration
|
||||
} from './api';
|
||||
|
||||
const configuration = new Configuration();
|
||||
const apiInstance = new SetService(configuration);
|
||||
|
||||
let name: string; // (default to undefined)
|
||||
|
||||
const { status, data } = await apiInstance.apiSetsNameScrapeGet(
|
||||
name
|
||||
);
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
|Name | Type | Description | Notes|
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **name** | [**string**] | | defaults to undefined|
|
||||
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
@@ -215,3 +165,53 @@ No authorization required
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **scrapeSetByName**
|
||||
> scrapeSetByName()
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```typescript
|
||||
import {
|
||||
SetService,
|
||||
Configuration
|
||||
} from './api';
|
||||
|
||||
const configuration = new Configuration();
|
||||
const apiInstance = new SetService(configuration);
|
||||
|
||||
let name: string; // (default to undefined)
|
||||
|
||||
const { status, data } = await apiInstance.scrapeSetByName(
|
||||
name
|
||||
);
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
|Name | Type | Description | Notes|
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **name** | [**string**] | | defaults to undefined|
|
||||
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
|**200** | Set retrieved | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* dex API
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 0.0.1
|
||||
* The version of the OpenAPI document: 0.0.5
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
@@ -90,40 +90,6 @@ export const SetServiceAxiosParamCreator = function (configuration?: Configurati
|
||||
|
||||
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Scrape And Persist From Upstream
|
||||
* @param {string} name
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSetsNameScrapeGet: async (name: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists('apiSetsNameScrapeGet', 'name', name)
|
||||
const localVarPath = `/api/sets/{name}/scrape`
|
||||
.replace(`{${"name"}}`, encodeURIComponent(String(name)));
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
@@ -169,6 +135,40 @@ export const SetServiceAxiosParamCreator = function (configuration?: Configurati
|
||||
|
||||
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Scrape a CardSet via name query parameter
|
||||
* @param {string} name
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
scrapeSetByName: async (name: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists('scrapeSetByName', 'name', name)
|
||||
const localVarPath = `/api/sets/{name}/scrape`
|
||||
.replace(`{${"name"}}`, encodeURIComponent(String(name)));
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
@@ -214,19 +214,6 @@ export const SetServiceFp = function(configuration?: Configuration) {
|
||||
const localVarOperationServerBasePath = operationServerMap['SetService.apiSetsNameNewGet']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Scrape And Persist From Upstream
|
||||
* @param {string} name
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSetsNameScrapeGet(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.apiSetsNameScrapeGet(name, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['SetService.apiSetsNameScrapeGet']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Get a page of Card Sets with optional name query parameter
|
||||
@@ -242,6 +229,19 @@ export const SetServiceFp = function(configuration?: Configuration) {
|
||||
const localVarOperationServerBasePath = operationServerMap['SetService.getCardSetPage']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Scrape a CardSet via name query parameter
|
||||
* @param {string} name
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async scrapeSetByName(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.scrapeSetByName(name, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['SetService.scrapeSetByName']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
@@ -272,16 +272,6 @@ export const SetServiceFactory = function (configuration?: Configuration, basePa
|
||||
apiSetsNameNewGet(requestParameters: SetServiceApiSetsNameNewGetRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<SetDto>> {
|
||||
return localVarFp.apiSetsNameNewGet(requestParameters.name, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Scrape And Persist From Upstream
|
||||
* @param {SetServiceApiSetsNameScrapeGetRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSetsNameScrapeGet(requestParameters: SetServiceApiSetsNameScrapeGetRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
||||
return localVarFp.apiSetsNameScrapeGet(requestParameters.name, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Get a page of Card Sets with optional name query parameter
|
||||
@@ -292,6 +282,16 @@ export const SetServiceFactory = function (configuration?: Configuration, basePa
|
||||
getCardSetPage(requestParameters: SetServiceGetCardSetPageRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<PageSetDto> {
|
||||
return localVarFp.getCardSetPage(requestParameters.name, requestParameters.page, requestParameters.pageSize, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Scrape a CardSet via name query parameter
|
||||
* @param {SetServiceScrapeSetByNameRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
scrapeSetByName(requestParameters: SetServiceScrapeSetByNameRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
||||
return localVarFp.scrapeSetByName(requestParameters.name, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
@@ -323,20 +323,6 @@ export interface SetServiceApiSetsNameNewGetRequest {
|
||||
readonly name: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for apiSetsNameScrapeGet operation in SetService.
|
||||
* @export
|
||||
* @interface SetServiceApiSetsNameScrapeGetRequest
|
||||
*/
|
||||
export interface SetServiceApiSetsNameScrapeGetRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SetServiceApiSetsNameScrapeGet
|
||||
*/
|
||||
readonly name: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for getCardSetPage operation in SetService.
|
||||
* @export
|
||||
@@ -365,6 +351,20 @@ export interface SetServiceGetCardSetPageRequest {
|
||||
readonly pageSize?: number
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for scrapeSetByName operation in SetService.
|
||||
* @export
|
||||
* @interface SetServiceScrapeSetByNameRequest
|
||||
*/
|
||||
export interface SetServiceScrapeSetByNameRequest {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SetServiceScrapeSetByName
|
||||
*/
|
||||
readonly name: string
|
||||
}
|
||||
|
||||
/**
|
||||
* SetService - object-oriented interface
|
||||
* @export
|
||||
@@ -396,18 +396,6 @@ export class SetService extends BaseAPI {
|
||||
return SetServiceFp(this.configuration).apiSetsNameNewGet(requestParameters.name, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Scrape And Persist From Upstream
|
||||
* @param {SetServiceApiSetsNameScrapeGetRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SetService
|
||||
*/
|
||||
public apiSetsNameScrapeGet(requestParameters: SetServiceApiSetsNameScrapeGetRequest, options?: RawAxiosRequestConfig) {
|
||||
return SetServiceFp(this.configuration).apiSetsNameScrapeGet(requestParameters.name, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Get a page of Card Sets with optional name query parameter
|
||||
@@ -419,5 +407,17 @@ export class SetService extends BaseAPI {
|
||||
public getCardSetPage(requestParameters: SetServiceGetCardSetPageRequest = {}, options?: RawAxiosRequestConfig) {
|
||||
return SetServiceFp(this.configuration).getCardSetPage(requestParameters.name, requestParameters.page, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Scrape a CardSet via name query parameter
|
||||
* @param {SetServiceScrapeSetByNameRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SetService
|
||||
*/
|
||||
public scrapeSetByName(requestParameters: SetServiceScrapeSetByNameRequest, options?: RawAxiosRequestConfig) {
|
||||
return SetServiceFp(this.configuration).scrapeSetByName(requestParameters.name, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
2
src/components.d.ts
vendored
2
src/components.d.ts
vendored
@@ -19,11 +19,13 @@ declare module 'vue' {
|
||||
Column: typeof import('primevue/column')['default']
|
||||
CustomTag: typeof import('./components/CustomTag.vue')['default']
|
||||
DataTable: typeof import('primevue/datatable')['default']
|
||||
Dialog: typeof import('primevue/dialog')['default']
|
||||
Divider: typeof import('primevue/divider')['default']
|
||||
DynamicAsset: typeof import('./components/DynamicAsset.vue')['default']
|
||||
Fieldset: typeof import('primevue/fieldset')['default']
|
||||
FloatLabel: typeof import('primevue/floatlabel')['default']
|
||||
Image: typeof import('primevue/image')['default']
|
||||
ImportModal: typeof import('./components/ImportModal.vue')['default']
|
||||
InputNumber: typeof import('primevue/inputnumber')['default']
|
||||
InputText: typeof import('primevue/inputtext')['default']
|
||||
LinkArrowsComponent: typeof import('./components/LinkArrowsComponent.vue')['default']
|
||||
|
||||
86
src/components/ImportModal.vue
Normal file
86
src/components/ImportModal.vue
Normal file
@@ -0,0 +1,86 @@
|
||||
<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>
|
||||
12
src/main.ts
12
src/main.ts
@@ -26,7 +26,7 @@ import {useAuthStore} from "./stores/auth.ts";
|
||||
import SetsView from "./views/set/SetsView.vue";
|
||||
import JobsView from "./views/JobsView.vue";
|
||||
import {definePreset} from "@primeuix/themes";
|
||||
import {getApiUrl, initConfig} from "@/util/config.ts";
|
||||
import {getApiUrl, getConfig, initConfig} from "@/util/config.ts";
|
||||
import axios from "axios";
|
||||
|
||||
// Initialize configuration from window object
|
||||
@@ -141,14 +141,12 @@ app.use(ToastService)
|
||||
|
||||
let apiUrl: string | undefined
|
||||
|
||||
if (!getApiUrl()) {
|
||||
apiUrl = `http://${getApiUrl()}`
|
||||
} else {
|
||||
apiUrl = "http://localhost:7070"
|
||||
}
|
||||
const devProxy = import.meta.env.DEV && !import.meta.env.VITE_API_HOST && !import.meta.env.VITE_API_PORT
|
||||
? ''
|
||||
: `http://${getApiUrl()}`
|
||||
|
||||
const axiosInstance = axios.create({
|
||||
baseURL: apiUrl,
|
||||
baseURL: devProxy,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
|
||||
@@ -24,6 +24,13 @@ export default defineConfig({
|
||||
'@': path.resolve(__dirname, './src'),
|
||||
}
|
||||
},
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://localhost:8080',
|
||||
changeOrigin: true,
|
||||
secure: false,
|
||||
}
|
||||
},
|
||||
build: {
|
||||
// @ts-ignore
|
||||
assetsInclude: [
|
||||
|
||||
Reference in New Issue
Block a user