
The selection mechanism of Tabulator was getting in the way of having nice navigation, as it would deselect (i.e. nav to "/") before selecting the next job (i.e. nav to "/jobs/{job-id}"). The active job is now determined by the URL and thus handled by Vue Router. Clicking on a job simply navigates to its URL, which causes the reactive system to load & display it. It is still intended to get job selection for "mass actions", but that's only possible after normal navigation is working well.
24 lines
405 B
JavaScript
24 lines
405 B
JavaScript
|
|
let url = new URL(window.location.href);
|
|
url.port = "8080";
|
|
url.pathname = "/";
|
|
const flamencoAPIURL = url.href;
|
|
|
|
url.protocol = "ws:";
|
|
const websocketURL = url.href;
|
|
|
|
const URLs = {
|
|
api: flamencoAPIURL,
|
|
ws: websocketURL,
|
|
};
|
|
|
|
// console.log("Flamenco API:", URLs.api);
|
|
// console.log("Websocket :", URLs.ws);
|
|
|
|
export function ws() {
|
|
return URLs.ws;
|
|
}
|
|
export function api() {
|
|
return URLs.api;
|
|
}
|