Skip to content
Snippets Groups Projects
Unverified Commit 67028e2e authored by stefanoantonel's avatar stefanoantonel Committed by GitHub
Browse files

Fix BlueNaaS model urls (#32)

parent c97eba41
No related branches found
No related tags found
No related merge requests found
{ {
"name": "svelte-app", "name": "svelte-app",
"version": "1.5.3", "version": "1.5.4",
"scripts": { "scripts": {
"build": "rollup -c", "build": "rollup -c",
"dev": "sh usecases-schema-to-ts.sh && rollup -c -w", "dev": "sh usecases-schema-to-ts.sh && rollup -c -w",
......
...@@ -179,7 +179,7 @@ ...@@ -179,7 +179,7 @@
.model-section-container .model-list { .model-section-container .model-list {
grid-area: list; grid-area: list;
max-height: 70vh; max-height: 70vh;
overflow: scroll; overflow: auto;
padding: 10px; padding: 10px;
} }
.model-section-container .models-selected-info { .model-section-container .models-selected-info {
......
...@@ -123,7 +123,6 @@ export async function updateOrCreateModelsJson() { ...@@ -123,7 +123,6 @@ export async function updateOrCreateModelsJson() {
} }
function fillModelUrl(placeholderUrl: string, uc: UsecaseItem) { function fillModelUrl(placeholderUrl: string, uc: UsecaseItem) {
const BLUE_NAAS_KEY = 'bluenaas=true';
if (uc.maxModelSelection !== 1) { if (uc.maxModelSelection !== 1) {
errorMessage.set('Multiple models in URL not supported yet'); errorMessage.set('Multiple models in URL not supported yet');
return null; return null;
...@@ -147,7 +146,6 @@ function fillModelUrl(placeholderUrl: string, uc: UsecaseItem) { ...@@ -147,7 +146,6 @@ function fillModelUrl(placeholderUrl: string, uc: UsecaseItem) {
// this way we obtain the latest source available in the instances // this way we obtain the latest source available in the instances
const source = instance?.source; const source = instance?.source;
if (!source) return prev; if (!source) return prev;
if (!source.includes(BLUE_NAAS_KEY)) return prev;
const trimmed = source.replace(/^.+AUTH_.+?\//, ''); const trimmed = source.replace(/^.+AUTH_.+?\//, '');
if (!trimmed) return prev; if (!trimmed) return prev;
return prev = trimmed; return prev = trimmed;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment