mirror of
https://github.com/unraid/api.git
synced 2025-12-31 05:29:48 -06:00
fix: trigger loading correctly
This commit is contained in:
10
.github/workflows/main.yml
vendored
10
.github/workflows/main.yml
vendored
@@ -203,6 +203,16 @@ jobs:
|
||||
with:
|
||||
name: connect-files
|
||||
|
||||
- name: Write Changelog to Plugin XML
|
||||
run: |
|
||||
notes=$(cat << EOF
|
||||
Pull Request Build: ${{ github.event.pull_request.number }}
|
||||
$(git log -1 --pretty=%B)
|
||||
EOF
|
||||
)
|
||||
escapedNotes=$(sed -e 's/[&\\/]/\\&/g; s/$/\\/' -e '$s/\\$//' <<<"$notes")
|
||||
sed -i -z -E "s/<CHANGES>(.*)<\/CHANGES>/<CHANGES>\n${escapedNotes}\n<\/CHANGES>/g" "dynamix.unraid.net.staging.plg"
|
||||
|
||||
- name: Copy other release files to pr-release
|
||||
run: |
|
||||
cp archive/dynamix.unraid.net.staging-*.txz pr-release/
|
||||
|
||||
@@ -15,10 +15,7 @@ import { createClient } from "graphql-ws";
|
||||
import { WEBGUI_GRAPHQL } from "./urls";
|
||||
import { createApolloCache } from "./apollo-cache";
|
||||
import { ApolloLink, Observable } from "@apollo/client/core";
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
import { useServerStore } from "~/store/server";
|
||||
import { connect } from "http2";
|
||||
|
||||
const httpEndpoint = WEBGUI_GRAPHQL;
|
||||
const wsEndpoint = new URL(WEBGUI_GRAPHQL.toString().replace("http", "ws"));
|
||||
@@ -88,8 +85,8 @@ const retryLink = new RetryLink({
|
||||
const disableClientLink = new ApolloLink((operation, forward) => {
|
||||
const serverStore = useServerStore();
|
||||
const { connectPluginInstalled, guid} = toRefs(serverStore);
|
||||
console.log("serverStore.connectPluginInstalled", connectPluginInstalled.value, guid.value);
|
||||
if (!connectPluginInstalled.value) {
|
||||
console.log("serverStore.connectPluginInstalled", connectPluginInstalled?.value, guid?.value);
|
||||
if (!connectPluginInstalled?.value) {
|
||||
return new Observable((observer) => {
|
||||
console.warn("connectPluginInstalled is false, aborting request");
|
||||
observer.complete();
|
||||
|
||||
1303
web/store/server.ts
1303
web/store/server.ts
File diff suppressed because it is too large
Load Diff
@@ -26,20 +26,6 @@ export const useUnraidApiStore = defineStore("unraidApi", () => {
|
||||
client
|
||||
);
|
||||
|
||||
watch(
|
||||
serverStore,
|
||||
async (newVal) => {
|
||||
if (!newVal.fetchServerFromApi) {
|
||||
return;
|
||||
}
|
||||
const apiResponse = await newVal.fetchServerFromApi();
|
||||
if (apiResponse) {
|
||||
// we have a response, so we're online
|
||||
unraidApiStatus.value = "online";
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
// const unraidApiErrors = ref<any[]>([]);
|
||||
const unraidApiStatus = ref<
|
||||
"connecting" | "offline" | "online" | "restarting"
|
||||
|
||||
Reference in New Issue
Block a user