Skip to content

Commit

Permalink
fix bug in setServerSetting
Browse files Browse the repository at this point in the history
  • Loading branch information
Nanguage committed Apr 16, 2024
1 parent 3e6c303 commit a85524b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
12 changes: 6 additions & 6 deletions src/components/RunPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -343,20 +343,20 @@ export default {
viewerControl: new ImagejJsController(this.ij),
});
this.setInfoPanel("");
this.turnButtons(true);
if (window.app.client) {
const clientApi = window.app.client;
const urlParams = new URLSearchParams(window.location.search);
if (urlParams.has("model")) {
const model = urlParams.get("model");
await clientApi.setModel(model);
const model = urlParams.get("model");
await clientApi.setModel(model);
}
if (urlParams.has("server_url") && urlParams.has("triton_service_id")) {
const serverUrl = urlParams.get("server_url");
const serviceId = urlParams.get("triton_service_id");
await clientApi.setServerSetting(serverUrl, serviceId);
const serverUrl = urlParams.get("server_url");
const serviceId = urlParams.get("triton_service_id");
await clientApi.setServerSetting(serverUrl, serviceId);
}
}
this.turnButtons(true);
},
async initImJoy() {
function waitForImjoy(timeout = 10000) {
Expand Down
5 changes: 1 addition & 4 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,10 @@ async function createImjoyApi(api) {
const serverStore = window.app.store.server;
const runStore = window.app.store.run;
runStore.$patch({ serverInitialized: false });
if ((serverStore.serverUrl === serverUrl) && (serverStore.serviceId === serviceId)) {
runStore.$patch({ serverInitialized: true });
return;
}
serverStore.$patch({
serverUrl: serverUrl,
serviceId: serviceId,
updateCount: serverStore.updateCount + 1,
});
await waitState(() => runStore.serverInitialized, true);
}
Expand Down

0 comments on commit a85524b

Please sign in to comment.