Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
2bdfd851
".github/git@developer.sourcefind.cn:gaoqiong/migraphx.git" did not exist on "414c36cd0337d66a36a8ac7b0210a97bbfde7e33"
Commit
2bdfd851
authored
May 28, 2024
by
Timothy J. Baek
Browse files
fix: pipelines setting
parent
834bdf46
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
src/lib/components/admin/Settings/Pipelines.svelte
src/lib/components/admin/Settings/Pipelines.svelte
+11
-9
No files found.
src/lib/components/admin/Settings/Pipelines.svelte
View file @
2bdfd851
...
...
@@ -10,10 +10,12 @@
getPipelineValves,
getPipelineValvesSpec,
updatePipelineValves,
getPipelines
getPipelines,
getModels
} from '$lib/apis';
import Spinner from '$lib/components/common/Spinner.svelte';
import { toast } from 'svelte-sonner';
import { models } from '$lib/stores';
const i18n: Writable<i18nType> = getContext('i18n');
...
...
@@ -39,6 +41,7 @@
if (res) {
toast.success('Valves updated successfully');
setPipelines();
models.set(await getModels(localStorage.token));
saveHandler();
}
} else {
...
...
@@ -46,11 +49,17 @@
}
};
const getValves = async (idx) => {
valves_spec = await getPipelineValvesSpec(localStorage.token, pipelines[idx].id);
valves = await getPipelineValves(localStorage.token, pipelines[idx].id);
};
const setPipelines = async () => {
pipelines = await getPipelines(localStorage.token);
if (pipelines.length > 0) {
selectedPipelineIdx = 0;
await getValves(selectedPipelineIdx);
}
};
...
...
@@ -82,14 +91,7 @@
placeholder={$i18n.t('Select a pipeline')}
on:change={async () => {
await tick();
valves_spec = await getPipelineValvesSpec(
localStorage.token,
pipelines[selectedPipelineIdx].id
);
valves = await getPipelineValves(
localStorage.token,
pipelines[selectedPipelineIdx].id
);
await getValves(selectedPipelineIdx);
}}
>
{#each pipelines as pipeline, idx}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment