diff --git a/src/lib/components/Popup.svelte b/src/lib/components/Popup.svelte index e64a2b7..4451b4e 100644 --- a/src/lib/components/Popup.svelte +++ b/src/lib/components/Popup.svelte @@ -49,6 +49,11 @@ return `/${release}${toTree}?path=${encodeURIComponent(path.path)}${platParam}${fromParam}${modelParam}` } + function launchQuery(path: any) { + const release = "release" in path ? `v${path.release}` : $page.data.release + return `/${release}/query?path=${encodeURIComponent(path.path)}` + } + function copyEffect() { const toggle = () => { document.getElementById("clip")?.classList.toggle("hidden") @@ -159,7 +164,10 @@ -
diff --git a/src/lib/components/functions.ts b/src/lib/components/functions.ts index beabd29..aef2abf 100644 --- a/src/lib/components/functions.ts +++ b/src/lib/components/functions.ts @@ -234,4 +234,13 @@ export function gnmiToModelPath(jsonInstancePath: string) { }) .join('/') .replace(/^/, '/') +} + +export function copyAnimation() { + const toggle = () => { + document.getElementById("clip")?.classList.toggle("hidden") + document.getElementById("copied")?.classList.toggle("hidden") + } + setTimeout(toggle, 1000) + toggle() } \ No newline at end of file diff --git a/src/routes/[release]/query/+page.svelte b/src/routes/[release]/query/+page.svelte new file mode 100644 index 0000000..fe1c58e --- /dev/null +++ b/src/routes/[release]/query/+page.svelte @@ -0,0 +1,119 @@ + + +JSON-RPC Query SR Linux
+ +Response:
+ +{JSON.stringify(jsonRpcResponse, null, 2)}
+