import{d as m,y as l,z as _,B as d,a as f,D as u,e as p,o as r,c as s,b as h,w as y,j as g,n,T as v,_ as I}from"./index-FX23dEwE.js";const w={class:"__container_tabDemo3"},q={class:"__container_iframe_container"},D=["src"],S=m({__name:"GrafanaPage",setup(b){const a=l(_.GRAFANA);d(""),f(),u(async()=>{var t;let e=await a.api({});a.url=`${(t=e.data)==null?void 0:t.baseURL}?var-${a.type}=${a.name}&kiosk=1?&theme=light`,a.showIframe=!0});function o(e){try{e()}catch(t){console.log(t)}}function c(){console.log("The iframe has been loaded."),setTimeout(()=>{try{let e=document.querySelector("#grafanaIframe").contentDocument;o(()=>{e.querySelector("header").remove()}),o(()=>{e.querySelector("[data-testid*='controls']").remove()}),setTimeout(()=>{o(()=>{e.querySelector("[data-testid*='navigation mega-menu']").remove()}),o(()=>{for(let t of e.querySelectorAll("[data-testid*='Panel menu']"))t.remove()})},2e3)}catch{}a.showIframe=!0},1e3)}return(e,t)=>{const i=p("a-spin");return r(),s("div",w,[h(i,{class:"spin",spinning:!n(a).showIframe},{default:y(()=>[g("div",q,[n(a).showIframe?(r(),s("iframe",{key:0,onload:c,id:"grafanaIframe",style:{"padding-top":"60px"},src:n(a).url,frameborder:"0"},null,8,D)):v("",!0)])]),_:1},8,["spinning"])])}}}),x=I(S,[["__scopeId","data-v-e90f2e5a"]]);export{x as G};
