Submit
Path:
~
/
/
usr
/
share
/
grafana
/
public
/
build
/
File Content:
6934.fa19d392db34411fb300.js
"use strict";(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[6934],{6191:(at,he,v)=>{v.d(he,{X:()=>o});var Y=v(32196),q=v(96540),ue=v(40845);const o=({children:ae})=>{const be=(0,ue.of)(ze);return q.createElement("div",{className:be.root},ae)},ze=ae=>({root:(0,Y.css)({display:"flex",flexWrap:"wrap",alignItems:"center",gap:ae.spacing(3),minHeight:ae.spacing(4)})})},22354:(at,he,v)=>{v.d(he,{W:()=>Ae});var Y=v(32196),q=v(96540),ue=v(40845),o=v(88323),ze=v(4603),ae=Object.defineProperty,be=Object.defineProperties,re=Object.getOwnPropertyDescriptors,ie=Object.getOwnPropertySymbols,W=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable,H=(T,C,R)=>C in T?ae(T,C,{enumerable:!0,configurable:!0,writable:!0,value:R}):T[C]=R,Ge=(T,C)=>{for(var R in C||(C={}))W.call(C,R)&&H(T,R,C[R]);if(ie)for(var R of ie(C))Ee.call(C,R)&&H(T,R,C[R]);return T},z=(T,C)=>be(T,re(C)),ve=(T,C)=>{var R={};for(var F in T)W.call(T,F)&&C.indexOf(F)<0&&(R[F]=T[F]);if(T!=null&&ie)for(var F of ie(T))C.indexOf(F)<0&&Ee.call(T,F)&&(R[F]=T[F]);return R};function Ae(T){var C=T,{label:R}=C,F=ve(C,["label"]);const me=(0,ue.of)(Te),[pe]=(0,q.useState)(()=>Math.random().toString(16).slice(2)),it={SelectContainer:U,ValueContainer:Q,SingleValue:Q};return q.createElement("div",{className:me.root},R&&q.createElement("label",{className:me.label,htmlFor:pe},R,":","\xA0"),q.createElement(o.l6,z(Ge({openMenuOnFocus:!0,inputId:pe},F),{components:it})))}const U=T=>{const{children:C}=T,R=(0,ue.of)(Te);return q.createElement(ze.K,z(Ge({},T),{className:(0,Y.cx)(T.className,R.container)}),C)},Q=T=>{const{className:C,children:R}=T,F=(0,ue.of)(Te);return q.createElement("div",{className:(0,Y.cx)(C,F.valueContainer)},R)},Te=T=>({root:(0,Y.css)({display:"flex",fontSize:12,alignItems:"center"}),label:(0,Y.css)({color:T.colors.text.secondary,whiteSpace:"nowrap"}),container:(0,Y.css)({background:"none",borderColor:"transparent"}),valueContainer:(0,Y.css)({display:"flex",alignItems:"center",flex:"initial",color:T.colors.text.secondary,fontSize:12})})},76934:(at,he,v)=>{v.r(he),v.d(he,{plugin:()=>Lo});var Y=v(40187),q=v(69129),ue=v(3591),o=v(96540),ze=v(22391),ae=v(68704),be=v(91062),re=v(72574),ie=v(17172),W=v(32264),Ee=v(25994),H=v(42418),Ge=v(17081),z=v(2543),ve=v.n(z),Ae=v(65879);class U{static createISO8601Duration(e,s){const r=["hour","minute","h","m"];return(0,z.includes)(r,s)?`PT${e}${s[0].toUpperCase()}`:`P${e}${s[0].toUpperCase()}`}static createISO8601DurationFromInterval(e){const s=+e.slice(0,e.length-1),r=e[e.length-1];if(e.indexOf("ms")>-1)return U.createISO8601Duration(1,"m");if(e[e.length-1]==="s"){let a=s*60%60;return a<1&&(a=1),U.createISO8601Duration(a,"m")}return U.createISO8601Duration(s,r)}static findClosestTimeGrain(e,s){const r=(0,z.filter)(s,c=>c!=="auto");let a=r[0];const i=Ae.intervalToMs(e);for(let c=0;c<r.length;c++)i>Ae.intervalToMs(r[c])&&(c+1<r.length?a=r[c+1]:a=r[c]);return a}static createTimeGrainFromISO8601Duration(e){let s=1;e.substring(0,2)==="PT"&&(s=2);const r=e.substring(s,e.length-1),a=e.substring(e.length-1);return r+" "+U.timeUnitToText(+r,a)}static timeUnitToText(e,s){let r="";return s==="S"&&(r="second"),s==="M"&&(r="minute"),s==="H"&&(r="hour"),s==="D"&&(r="day"),e>1?r+"s":r}static createKbnUnitFromISO8601Duration(e){if(e==="auto")return"auto";let s=1;e.substring(0,2)==="PT"&&(s=2);const r=e.substring(s,e.length-1),a=e.substring(e.length-1);return r+U.timeUnitToKbn(+r,a)}static timeUnitToKbn(e,s){return s==="S"?"s":s==="M"?"m":s==="H"?"h":s==="D"?"d":""}}class Q{static parseResponseValues(e,s,r){const a=[];if(!e)return a;for(let i=0;i<e.value.length;i++)if(!(0,z.find)(a,["value",(0,z.get)(e.value[i],r)])){const c=(0,z.get)(e.value[i],r),n=(0,z.get)(e.value[i],s,c);a.push({text:n,value:c})}return a}static parseResourceNames(e,s){const r=[];if(!e)return r;for(let a=0;a<e.value.length;a++)typeof e.value[a].type=="string"&&(!s||e.value[a].type.toLocaleLowerCase()===s.toLocaleLowerCase())&&r.push({text:e.value[a].name,value:e.value[a].name});return r}static parseMetadata(e,s){const r=["None","Average","Minimum","Maximum","Total","Count"],a=e?.value.find(i=>i.name.value===s);return a?{primaryAggType:a.primaryAggregationType,supportedAggTypes:a.supportedAggregationTypes||r,supportedTimeGrains:[{label:"Auto",value:"auto"},...Q.parseTimeGrains(a.metricAvailabilities??[])],dimensions:Q.parseDimensions(a.dimensions??[])}:{primaryAggType:"",supportedAggTypes:r,supportedTimeGrains:[],dimensions:[]}}static parseTimeGrains(e){const s=[];return e&&e.forEach(r=>{r.timeGrain&&s.push({label:U.createTimeGrainFromISO8601Duration(r.timeGrain),value:r.timeGrain})}),s}static parseDimensions(e){return e.map(s=>({label:s.localizedValue||s.value,value:s.value}))}static parseSubscriptions(e){const s=[];if(!e)return s;const r="subscriptionId",a="displayName";for(let i=0;i<e.value.length;i++)(0,z.find)(s,["value",(0,z.get)(e.value[i],r)])||s.push({text:`${(0,z.get)(e.value[i],a)}`,value:(0,z.get)(e.value[i],r)});return s}static parseSubscriptionsForSelect(e){const s=[];if(!e)return s;const r="subscriptionId",a="displayName";for(let i=0;i<e.data.value.length;i++)(0,z.find)(s,["value",(0,z.get)(e.data.value[i],r)])||s.push({label:`${(0,z.get)(e.data.value[i],a)} - ${(0,z.get)(e.data.value[i],r)}`,value:(0,z.get)(e.data.value[i],r)});return s}static parseLocations(e){const s=[];if(!e)return s;for(const r of e.value)s.push({name:r.name,displayName:r.displayName,supportsLogs:void 0});return s}}const Te=(t,e)=>t.some(s=>s.options?Te(s.options,e):s.value===e),T=(t,e=[])=>{if(e.length===0)return[];const s=e.reduce((r,a)=>(r.add(a),r),new Set);return t.filter(r=>s.has(r.value))},C=t=>({value:t.value,label:t.text}),R=(t,e,s)=>{const r=[...t,e],a=t.map(i=>i.value.toLowerCase()).concat(e.options.map(i=>i.value));return s&&!a.includes(s.toLowerCase())&&r.push({label:s,value:s}),r},F={azureMonitor:"azuremonitor",logAnalytics:"loganalytics",appInsights:"appinsights",resourceGraph:"resourcegraph"};function me(t,e){return typeof t=="string"?e.multi||e.includeAll&&!e.allValue?"'"+t+"'":t:typeof t=="number"?t:(0,z.map)(t,r=>typeof t=="number"?t:"'"+r+"'").join(",")}var pe=v(94701),it=v(34169);const $o={subscriptions:[]};var m=(t=>(t.AzureMonitor="Azure Monitor",t.AzureResourceGraph="Azure Resource Graph",t.AzureTraces="Azure Traces",t.GrafanaTemplateVariableFn="Grafana Template Variable Function",t.LocationsQuery="Azure Regions",t.LogAnalytics="Azure Log Analytics",t.MetricNamesQuery="Azure Metric Names",t.NamespacesQuery="Azure Namespaces",t.ResourceGroupsQuery="Azure Resource Groups",t.ResourceNamesQuery="Azure Resource Names",t.SubscriptionsQuery="Azure Subscriptions",t.WorkspacesQuery="Azure Workspaces",t))(m||{});const Oo={allowedTimeGrainsMs:[],dimensionFilters:[],resources:[]},Uo={resources:[]},Wo={filters:[],resources:[],traceTypes:[]},jo={filters:[]};var K=(t=>(t.Logs="logs",t.Table="table",t.TimeSeries="time_series",t.Trace="trace",t))(K||{});const Xo={filters:[]};var Ne=(t=>(t.Public="AzureCloud",t.China="AzureChinaCloud",t.USGovernment="AzureUSGovernment",t.None="",t))(Ne||{});const Wt=Symbol("Concealed client secret");function Pe(t){return t.jsonData.azureAuthType?t.jsonData.azureAuthType:t.jsonData.tenantId&&t.jsonData.clientId?"clientsecret":W.$.azure.managedIdentityEnabled?"msi":"clientsecret"}function Me(){switch(W.$.azure.cloud){case Ne.Public:case Ne.None:case void 0:return"azuremonitor";case Ne.China:return"chinaazuremonitor";case Ne.USGovernment:return"govazuremonitor";default:throw new Error(`The cloud '${W.$.azure.cloud}' not supported.`)}}function nt(t){switch(t){case"azuremonitor":return"https://portal.azure.com";case"chinaazuremonitor":return"https://portal.azure.cn";case"govazuremonitor":return"https://portal.azure.us";default:throw new Error("The cloud not supported.")}}function ct(t){switch(Pe(t)){case"msi":case"workloadidentity":return Me();case"clientsecret":return t.jsonData.cloudName||Me()}}function jt(t){if(t.secureJsonFields.clientSecret)return Wt;{const e=t.secureJsonData?.clientSecret;return typeof e=="string"&&e.length>0?e:void 0}}function Xt(t){switch(t.authType){case"msi":case"workloadidentity":return!0;case"clientsecret":return!!(t.azureCloud&&t.tenantId&&t.clientId&&t.clientSecret)}}function Bt(t){const e=Pe(t);switch(e){case"msi":case"workloadidentity":return e==="msi"&&W.$.azure.managedIdentityEnabled||e==="workloadidentity"&&W.$.azure.workloadIdentityEnabled?{authType:e}:{authType:"clientsecret",azureCloud:Me()};case"clientsecret":return{authType:"clientsecret",azureCloud:t.jsonData.cloudName||Me(),tenantId:t.jsonData.tenantId,clientId:t.jsonData.clientId,clientSecret:jt(t)}}}function Ht(t,e){switch(e.authType){case"msi":case"workloadidentity":if(e.authType==="msi"&&!W.$.azure.managedIdentityEnabled)throw new Error("Managed Identity authentication is not enabled in Grafana config.");if(e.authType==="workloadidentity"&&!W.$.azure.workloadIdentityEnabled)throw new Error("Workload Identity authentication is not enabled in Grafana config.");return t={...t,jsonData:{...t.jsonData,azureAuthType:e.authType}},t;case"clientsecret":return t={...t,jsonData:{...t.jsonData,azureAuthType:"clientsecret",cloudName:e.azureCloud||Me(),tenantId:e.tenantId,clientId:e.clientId},secureJsonData:{...t.secureJsonData,clientSecret:typeof e.clientSecret=="string"?e.clientSecret:void 0},secureJsonFields:{...t.secureJsonFields,clientSecret:typeof e.clientSecret=="symbol"}},t}}var $=v(88575),D=v(88323),x=v(10354),_=v(55852);const N={components:{configEditor:{authType:{select:"data-testid auth-type"},azureCloud:{input:"data-testid azure-cloud"},tenantID:{input:"data-testid tenant-id"},clientID:{input:"data-testid client-id"},clientSecret:{input:"data-testid client-secret"},loadSubscriptions:{button:"data-testid load-subscriptions"},defaultSubscription:{input:"data-testid default-subscription"}},queryEditor:{header:{select:"data-testid azure-monitor-experimental-header"},resourcePicker:{select:{button:"data-testid resource-picker-select"},search:{input:"data-testid resource-picker-search"},apply:{button:"data-testid resource-picker-apply"},cancel:{button:"data-testid resource-picker-cancel"},advanced:{collapse:"data-testid resource-picker-advanced",subscription:{input:"data-testid resource-picker-subscription"},resourceGroup:{input:"data-testid resource-picker-resource-group"},namespace:{input:"data-testid resource-picker-namespace"},region:{input:"data-testid resource-picker-region"},resource:{input:"data-testid resource-picker-resource"}}},metricsQueryEditor:{container:{input:"data-testid azure-monitor-metrics-query-editor-with-experimental-ui"},metricName:{input:"data-testid metric-name"}},logsQueryEditor:{container:{input:"data-testid azure-monitor-logs-query-editor-with-experimental-ui"},formatSelection:{input:"data-testid format-selection"}},argsQueryEditor:{container:{input:"data-testid azure-monitor-arg-query-editor"},subscriptions:{input:"data-testid azure-monitor-args-subscription"}},tracesQueryEditor:{container:{input:"data-testid azure-monitor-traces-query-editor-with-experimental-ui"},traceTypes:{select:"data-testid azure-monitor-traces-query-editor-trace-types"}}},variableEditor:{queryType:{input:"data-testid query-type"},subscription:{input:"data-testid subscription"},resourceGroup:{input:"data-testid resource-group"},namespace:{input:"data-testid namespace"},resource:{input:"data-testid resource"},region:{input:"data-testid region"}}}},Kt=t=>{const{credentials:e,azureCloudOptions:s,onCredentialsChange:r,disabled:a,managedIdentityEnabled:i,workloadIdentityEnabled:c}=t,n=(0,o.useMemo)(()=>{let f=[{value:"clientsecret",label:"App Registration"}];return i&&f.push({value:"msi",label:"Managed Identity"}),c&&f.push({value:"workloadidentity",label:"Workload Identity"}),f},[i,c]),l=f=>{const p=i?"msi":c?"workloadidentity":"clientsecret",y={...e,authType:f.value||p};r(y)},u=f=>{if(e.authType==="clientsecret"){const p={...e,azureCloud:f.value};r(p)}},d=f=>{if(e.authType==="clientsecret"){const p={...e,tenantId:f.target.value};r(p)}},g=f=>{if(e.authType==="clientsecret"){const p={...e,clientId:f.target.value};r(p)}},b=f=>{if(e.authType==="clientsecret"){const p={...e,clientSecret:f.target.value};r(p)}},h=()=>{if(e.authType==="clientsecret"){const f={...e,clientSecret:""};r(f)}};return o.createElement(be.A,{title:"Authentication"},n.length>1&&o.createElement($.D,{label:"Authentication",description:"Choose the type of authentication to Azure services","data-testid":N.components.configEditor.authType.select,htmlFor:"authentication-type"},o.createElement(D.l6,{className:"width-15",value:n.find(f=>f.value===e.authType),options:n,onChange:l,disabled:a})),e.authType==="clientsecret"&&o.createElement(o.Fragment,null,s&&o.createElement($.D,{label:"Azure Cloud","data-testid":N.components.configEditor.azureCloud.input,htmlFor:"azure-cloud-type",disabled:a},o.createElement(D.l6,{inputId:"azure-cloud-type","aria-label":"Azure Cloud",className:"width-15",value:s.find(f=>f.value===e.azureCloud),options:s,onChange:u})),o.createElement($.D,{label:"Directory (tenant) ID",required:!0,"data-testid":N.components.configEditor.tenantID.input,htmlFor:"tenant-id",invalid:!e.tenantId,error:"Tenant ID is required"},o.createElement(x.p,{"aria-label":"Tenant ID",className:"width-30",placeholder:"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",value:e.tenantId||"",onChange:d,disabled:a})),o.createElement($.D,{label:"Application (client) ID",required:!0,"data-testid":N.components.configEditor.clientID.input,htmlFor:"client-id",invalid:!e.clientId,error:"Client ID is required"},o.createElement(x.p,{className:"width-30","aria-label":"Client ID",placeholder:"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",value:e.clientId||"",onChange:g,disabled:a})),!a&&(typeof e.clientSecret=="symbol"?o.createElement($.D,{label:"Client Secret",htmlFor:"client-secret",required:!0},o.createElement("div",{className:"width-30",style:{display:"flex",gap:"4px"}},o.createElement(x.p,{"aria-label":"Client Secret",placeholder:"configured",disabled:!0,"data-testid":"client-secret"}),o.createElement(_.$n,{variant:"secondary",type:"button",onClick:h,disabled:a},"Reset"))):o.createElement($.D,{label:"Client Secret","data-testid":N.components.configEditor.clientSecret.input,required:!0,htmlFor:"client-secret",invalid:!e.clientSecret,error:"Client secret is required"},o.createElement(x.p,{className:"width-30","aria-label":"Client Secret",placeholder:"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",value:e.clientSecret||"",onChange:b,id:"client-secret",disabled:a})))),t.children)},Ho=null,Jt=t=>{const{credentials:e,disabled:s,options:r,subscriptions:a,getSubscriptions:i,onSubscriptionChange:c,onSubscriptionsChange:n}=t,l=Xt(e),[u,d]=(0,o.useReducer)(h=>h+1,0);(0,o.useEffect)(()=>{if(!i||!l){g([]);return}let h=!1;return i().then(f=>{h||g(f,u)}),()=>{h=!0}},[u]);const g=(h,f=!1)=>{n(h),i&&(f&&!r.subscriptionId&&h.length>0?b(h[0]):r.subscriptionId&&(h.find(y=>y.value===r.subscriptionId)||b(void 0)))},b=h=>c(h?.value);return o.createElement(o.Fragment,null,o.createElement($.D,{label:"Default Subscription","data-testid":N.components.configEditor.defaultSubscription.input,htmlFor:"default-subscription"},o.createElement("div",{className:"width-30",style:{display:"flex",gap:"4px"}},o.createElement(D.l6,{inputId:"default-subscription","aria-label":"Default Subscription",value:r.subscriptionId?a.find(h=>h.value===r.subscriptionId):void 0,options:a,onChange:b,disabled:s}),o.createElement(_.$n,{variant:"secondary",type:"button",onClick:d,disabled:!l||s,"data-testid":N.components.configEditor.loadSubscriptions.button},"Load Subscriptions"))))},Zt=[{value:"azuremonitor",label:"Azure"},{value:"govazuremonitor",label:"Azure US Government"},{value:"chinaazuremonitor",label:"Azure China"}],Yt=t=>{const{updateOptions:e,getSubscriptions:s,options:r}=t,[a,i]=(0,o.useState)([]),c=(0,o.useMemo)(()=>Bt(t.options),[t.options]),n=(d,g)=>{g||i([]),e(b=>Ht({...b,jsonData:{...b.jsonData,subscriptionId:g}},d))},l=d=>i(d),u=d=>e(g=>({...g,jsonData:{...g.jsonData,subscriptionId:d}}));return(0,pe.A)(()=>{(!r.jsonData.authType||!c.authType)&&n(c,r.jsonData.subscriptionId)}),o.createElement(o.Fragment,null,o.createElement(Kt,{managedIdentityEnabled:W.$.azure.managedIdentityEnabled,workloadIdentityEnabled:W.$.azure.workloadIdentityEnabled,credentials:c,azureCloudOptions:Zt,onCredentialsChange:n,disabled:t.options.readOnly},o.createElement(Jt,{subscriptions:a,credentials:c,getSubscriptions:s,disabled:t.options.readOnly,onSubscriptionsChange:l,onSubscriptionChange:u,options:r.jsonData})))},Ko=null;class qt extends o.PureComponent{constructor(e){super(e),this.templateSrv=(0,re.w)(),this.updateOptions=s=>{const r=s(this.props.options);this.props.onOptionsChange(r),this.setState({unsaved:!0})},this.saveOptions=async()=>{this.state.unsaved&&(await(0,ie.AI)().put(`/api/datasources/${this.props.options.id}`,this.props.options).then(s=>{(0,ze.pN)(this.props,"version",s.datasource.version)}),this.setState({unsaved:!1}))},this.getSubscriptions=async()=>{await this.saveOptions();const s="?api-version=2019-03-01";try{const r=await(0,ie.AI)().fetch({url:this.baseURL+s,method:"GET"}).toPromise();return this.setState({error:void 0}),Q.parseSubscriptionsForSelect(r)}catch(r){return(0,ie.NF)(r)&&this.setState({error:{title:"Error requesting subscriptions",description:"Could not request subscriptions from Azure. Check your credentials and try again.",details:r?.data?.message}}),Promise.resolve([])}},this.state={unsaved:!1},this.baseURL=`/api/datasources/${this.props.options.id}/resources/${F.azureMonitor}/subscriptions`}render(){const{options:e,onOptionsChange:s}=this.props,{error:r}=this.state;return o.createElement(o.Fragment,null,o.createElement(ae.I,{dataSourceName:"Azure Monitor",docsLink:"https://grafana.com/docs/grafana/latest/datasources/azure-monitor/",hasRequiredFields:!0}),o.createElement(Ee.c,null),o.createElement(Yt,{options:e,updateOptions:this.updateOptions,getSubscriptions:this.getSubscriptions}),r&&o.createElement(H.F,{severity:"error",title:r.title},o.createElement("p",null,r.description),r.details&&o.createElement("details",{style:{whiteSpace:"pre-wrap"}},r.details)),W.$.secureSocksDSProxyEnabled&&o.createElement(o.Fragment,null,o.createElement(Ee.c,null),o.createElement(be.A,{title:"Additional settings",description:"Additional settings are optional settings that can be configured for more control over your data source. This includes Secure Socks Proxy.",isCollapsible:!0,isInitiallyOpen:e.jsonData.enableSecureSocksProxy!==void 0},o.createElement(Ge.Y,{options:e,onOptionsChange:s}))))}}const Jo=null;var S=v(32196),Qe=v(14110),J=v(68402),Xe=v(32372);function _t(t){return(0,o.isValidElement)(t)?t:ye(t)}function ye(t){if(!t||typeof t!="object")return;if(typeof t.message=="string")return t.message;if(typeof t.data?.error?.message=="string")return t.data.error.message;const e=t.error?.data?.error?.innererror?.innererror?.message||t.error?.data?.error?.innererror?.message||t.error?.data?.error?.message||t.error?.data?.message||t.data?.message||t;if(typeof e=="string")return e;if(e&&e.toString)return e.toString()}function lt(){const[t,e]=(0,o.useState)([]),s=(0,o.useCallback)((a,i)=>{e(c=>{const n=[...c],l=c.findIndex(([u])=>u===a);return l>-1&&n.splice(l,1),i&&n.unshift([a,i]),n})},[]);return[(0,o.useMemo)(()=>{const a=t[0];return a&&_t(a[1])},[t]),s]}var xe=v(71087),ee=v(9e4),te=v(97801);const es=({query:t,onQueryChange:e})=>{const s=(0,o.useCallback)(r=>{e({...t,azureResourceGraph:{...t.azureResourceGraph,query:r}})},[e,t]);return o.createElement(Xe.B,{value:t.azureResourceGraph?.query??"",language:"kusto",height:200,width:"100%",showMiniMap:!1,onBlur:s,onSave:s})};var ts=v(72093),ss=v(81580),oe=v(14186);const ut=18,X=t=>{const{labelWidth:e,inlineField:s,...r}=t;return s?o.createElement(oe.I,{labelWidth:e||ut,...r}):o.createElement(ss.c,{width:e||ut,...r})},rs=({query:t,subscriptions:e,variableOptionGroup:s,onQueryChange:r})=>{const[a,i]=(0,o.useState)(!1),[c,n]=(0,o.useState)([]),l=(0,o.useMemo)(()=>[...e,s],[e,s]);(0,o.useEffect)(()=>{t.subscriptions&&t.subscriptions.length>0?(n(T([...e,...s.options],t.subscriptions)),i(!1)):i(!0)},[t.subscriptions,e,s.options]);const u=d=>{const g=d.filter(b=>b.value==="Select all subscriptions");if(!d||d.length===0)n([]),r({...t,subscriptions:[]}),i(!0);else if(g.length>0){const b=e.map(h=>h.value??"").filter(h=>h!=="Select all subscriptions");r({...t,subscriptions:b})}else{const b=d.map(h=>h.value??"");r({...t,subscriptions:b}),n(T([...e,...s.options],b)),i(!1)}};return o.createElement(X,{label:"Subscriptions","data-testid":N.components.queryEditor.argsQueryEditor.subscriptions.input},o.createElement(o.Fragment,null,o.createElement(D.KF,{isClearable:!0,value:c,inputId:"azure-monitor-subscriptions-field",onChange:u,options:l,width:38}),a?o.createElement(ts.P,null,"At least one subscription must be chosen."):null))},mt="arg-subscriptions";function os(t,e,s){let r=e||[];r.length===0&&s&&(r=[s]),r.length===0&&t.length&&(r=[t[0]]);const a=r.filter(c=>c.includes("$")),i=(0,z.intersection)(r,t).concat(a);return t.length&&r.length>i.length&&(r=i.length>0?i:[t[0]]),r}const pt=({query:t,datasource:e,subscriptionId:s,variableOptionGroup:r,onChange:a,setError:i})=>{const[c,n]=(0,o.useState)([]);return(0,o.useMemo)(()=>{e.getSubscriptions().then(l=>{const u=[{label:"Select all subscriptions",value:"Select all subscriptions",description:"Select all"}],d=l.map(g=>({label:g.text,value:g.value,description:g.value}));n(u.concat(d)),i(mt,void 0),a({...t,subscriptions:os(d.map(g=>g.value),t.subscriptions,t.subscription)})}).catch(l=>i(mt,l))},[e]),o.createElement("span",{"data-testid":N.components.queryEditor.argsQueryEditor.container.input},o.createElement(xe.D,null,o.createElement(ee.U,null,o.createElement(te.B,null,o.createElement(rs,{subscriptions:c,query:t,datasource:e,subscriptionId:s,variableOptionGroup:r,onQueryChange:a,setError:i})))),o.createElement(es,{query:t,datasource:e,subscriptionId:s,variableOptionGroup:r,onQueryChange:a,setError:i}))},dt=({query:t,variableOptionGroup:e,onQueryChange:s,inputId:r,options:a,defaultValue:i,setFormatAs:c,resultFormat:n})=>{const l=(0,o.useMemo)(()=>[...a,e],[e,a]),u=(0,o.useCallback)(d=>{const{value:g}=d;if(!g)return;const b=c(t,g);s(b)},[s,t,c]);return(0,pe.A)(()=>{n?a.find(d=>d.value===n)||u({value:i}):u({value:i})}),o.createElement(X,{label:"Format as","data-testid":N.components.queryEditor.logsQueryEditor.formatSelection.input},o.createElement(D.l6,{inputId:`${r}-format-as-field`,value:n??i,onChange:u,options:l,width:38}))};var Z=v(40845),Be=v(37390),ne=v(14578),He=v(39558),ft=v(82762);const as=({resources:t,onChange:e,renderAdvanced:s})=>{const[r,a]=(0,o.useState)(!!t.length&&JSON.stringify(t).includes("$"));return o.createElement("div",{"data-testid":N.components.queryEditor.resourcePicker.advanced.collapse},o.createElement(ft.S,{collapsible:!0,label:"Advanced",isOpen:r,onToggle:()=>a(!r)},s(t,e),o.createElement(J.$,{v:2})))};var is=v(31511),ns=v(29158),gt=v(10880),I=(t=>(t.Subscription="Subscription",t.ResourceGroup="ResourceGroup",t.Resource="Resource",t.VariableGroup="TemplateVariableGroup",t.Variable="TemplateVariable",t))(I||{});const cs=({isOpen:t,entry:{type:e}})=>{switch(e){case I.Subscription:return o.createElement(ne.I,{name:"layer-group"});case I.ResourceGroup:return o.createElement(ne.I,{name:t?"folder-open":"folder"});case I.Resource:return o.createElement(ne.I,{name:"cube"});case I.VariableGroup:return o.createElement(ne.I,{name:"x"});case I.Variable:return o.createElement(ne.I,{name:"x"});default:return null}},Re=t=>({table:(0,S.css)({width:"100%",tableLayout:"fixed",overflow:"scroll"}),scrollableTable:(0,S.css)({overflow:"auto"}),tableScroller:(0,S.css)({maxHeight:"16vh"}),selectedTableScroller:(0,S.css)({maxHeight:"13vh"}),header:(0,S.css)({background:t.colors.background.secondary}),row:(0,S.css)({borderBottom:`1px solid ${t.colors.border.weak}`,"&:last-of-type":{borderBottomColor:t.colors.border.medium}}),disabledRow:(0,S.css)({opacity:.5}),cell:(0,S.css)({padding:t.spacing(1,1,1,0),width:"25%",overflow:"hidden",textOverflow:"ellipsis","&:first-of-type":{width:"50%",padding:t.spacing(1,1,1,2)}}),collapseButton:(0,S.css)({margin:0}),loadingCell:(0,S.css)({textAlign:"center"}),spinner:(0,S.css)({marginBottom:0}),nestedEntry:(0,S.css)({display:"flex",alignItems:"center"}),entryContentItem:(0,S.css)({margin:t.spacing(0,1,0,0)}),truncated:(0,S.css)({minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}),resourceField:(0,S.css)({maxWidth:t.spacing(36),overflow:"hidden"}),resourceFieldButton:(0,S.css)({padding:"7px",textAlign:"left"}),nestedRowCheckbox:(0,S.css)({zIndex:0}),selectionFooter:(0,S.css)({background:t.colors.background.primary,paddingTop:t.spacing(2)}),loadingWrapper:(0,S.css)({textAlign:"center",paddingTop:t.spacing(2),paddingBottom:t.spacing(2),color:t.colors.text.secondary}),resultLimit:(0,S.css)({margin:"4px 0",fontStyle:"italic"}),modal:(0,S.css)({width:t.breakpoints.values.lg})}),ls=({entry:t,isSelected:e,isDisabled:s,isOpen:r,isSelectable:a,level:i,scrollIntoView:c,onToggleCollapse:n,onSelectedChange:l})=>{const u=(0,Z.$j)(),d=(0,Z.of)(Re),g=!!t.children,b=(0,o.useCallback)(()=>{n(t)},[n,t]),h=(0,o.useCallback)(p=>{const y=p.target.checked;l(t,y)},[t,l]),f=`${c?"table":"summary"}_checkbox_${t.uri}`;return(0,o.useEffect)(()=>{e&&c&&document.getElementById(f)?.scrollIntoView({behavior:"smooth",block:"center"})},[]),o.createElement("div",{className:d.nestedEntry,style:{marginLeft:i*(3*u.spacing.gridSize)}},g?o.createElement(ns.K,{className:d.collapseButton,name:r?"angle-down":"angle-right","aria-label":r?`Collapse ${t.name}`:`Expand ${t.name}`,onClick:b,id:t.id}):o.createElement(J.$,{layout:"inline",h:2}),o.createElement(J.$,{layout:"inline",h:2}),a&&o.createElement(o.Fragment,null,o.createElement(gt.S,{id:f,onChange:h,disabled:s,value:e,className:d.nestedRowCheckbox}),o.createElement(J.$,{layout:"inline",h:2})),o.createElement(cs,{entry:t,isOpen:r}),o.createElement(J.$,{layout:"inline",h:1}),o.createElement("label",{htmlFor:f,className:(0,S.cx)(d.entryContentItem,d.truncated)},t.name))};var us=v(1932);class de{static buildResourceUri(e,s,r){const a=[],{subscription:i,resourceGroup:c,metricNamespace:n,resourceName:l}=s;if(i&&(a.push("/subscriptions",i),c&&!r&&(a.push("resourceGroups",c),n&&l))){const u=e.replace(n),d=n.split("/"),g=e.replace(l),b=l.split("/"),h=d.shift();if(h&&a.push("providers",h),u.toLowerCase().startsWith("microsoft.storage/storageaccounts/")&&!g.endsWith("default")&&b.push("default"),b.length>d.length){const f=b.shift();f&&a.push(f)}for(const f in d)a.push(d[f]),a.push(b[f])}return a.join("/")}static buildAzureMonitorGetMetricNamespacesUrl(e,s,r,a,i){let c;if("resourceUri"in r)c=r.resourceUri;else{const{subscription:n,resourceGroup:l,metricNamespace:u,resourceName:d}=r;c=de.buildResourceUri(i,{subscription:n,resourceGroup:l,metricNamespace:u,resourceName:d})}return`${e}${c}/providers/microsoft.insights/metricNamespaces?api-version=${s}${a?"®ion=global":""}`}static buildAzureMonitorGetMetricNamesUrl(e,s,r,a,i,c){let n;const{customNamespace:l,metricNamespace:u}=r;if("resourceUri"in r)n=r.resourceUri;else{const{subscription:g,resourceGroup:b,metricNamespace:h,resourceName:f}=r;n=de.buildResourceUri(a,{subscription:g,resourceGroup:b,metricNamespace:h,resourceName:f},i)}let d=`${e}${n}/providers/microsoft.insights/metricdefinitions?api-version=${s}`;return l&&(d+=`&metricnamespace=${encodeURIComponent(l)}`),i&&!l&&u&&(d+=`&metricnamespace=${encodeURIComponent(u)}`),c&&i&&(d+=`®ion=${c}`),d}}const ms=/\/subscriptions\/(?<subscription>[^/]+)(?:\/resourceGroups\/(?<resourceGroup>[^/]+)(?:\/providers\/(?<metricNamespaceAndResource>.+))?)?/;function ps(t){if(!t)return{};const e=t.split("/"),s=e.splice(0,2),r=e.splice(0,1);for(;e.length;){const a=e.shift();e.length%2===0?r.push(a):s.push(a)}return{metricNamespace:s.join("/"),resourceName:r.join("/")}}function Ve(t){const s=ms.exec(t)?.groups??{},{subscription:r,resourceGroup:a,metricNamespaceAndResource:i}=s,{metricNamespace:c,resourceName:n}=ps(i);return{subscription:r,resourceGroup:a,metricNamespace:c,resourceName:n}}function fe(t,e){return t.map(s=>j(s,e))}function j(t,e){if(typeof t=="string"){const s=Ve(t);return e&&(s.region=e),s}return t}function Ke(t){return t.map(e=>$e(e))}function $e(t){return t?typeof t=="string"?t:de.buildResourceUri((0,re.w)(),t):""}function ht(t){return!!t.match(/^[A-Z0-9]+/i)}function ds(t,e,s,r){return s?.startsWith("microsoft.storage/storageaccounts")&&(s="microsoft.storage/storageaccounts",r?.endsWith("/default")&&(r=r.slice(0,-8))),t===s&&e===r}function bt(t,e){const s=j(e),r=j(t);return r?.subscription===s?.subscription&&r?.resourceGroup?.toLowerCase()===s?.resourceGroup?.toLowerCase()&&ds(r?.metricNamespace?.toLowerCase(),r?.resourceName,s?.metricNamespace?.toLowerCase(),s?.resourceName)}function fs(t,e){const s=[];return e.forEach(r=>{const a=we(t,r);a&&s.push(a)}),s}function we(t,e){for(const s of t){if(bt(s.uri,e))return s;if(s.children){const r=we(s.children,e);if(r)return r}}}function Je(t,e,s){return(0,us.jM)(t,r=>{const a=we(r,e);a&&(a.children=s)})}function gs(t,e,s){if(e==="logs")return{...t,azureLogAnalytics:{...t.azureLogAnalytics,resources:Ke(s).filter(a=>a!=="")}};if(e==="traces")return{...t,azureTraces:{...t.azureTraces,resources:Ke(s).filter(a=>a!=="")}};const r=s.length?j(s[0]):{};return{...t,subscription:r.subscription,azureMonitor:{...t.azureMonitor,metricNamespace:r.metricNamespace?.toLocaleLowerCase(),region:r.region,resources:fe(s).filter(a=>a.resourceName!==""&&a.metricNamespace!==""&&a.subscription!==""&&a.resourceGroup!==""),metricName:void 0,aggregation:void 0,timeGrain:"",dimensionFilters:[]}}}const vt=({row:t,selectedRows:e,level:s,requestNestedRows:r,onRowSelectedChange:a,selectableEntryTypes:i,scrollIntoView:c,disableRow:n})=>{const l=(0,Z.of)(Re),[u,d]=(0,o.useState)("closed"),g=!!e.find(p=>p.uri.toLowerCase()===t.uri.toLowerCase()),b=!g&&n(t,e),h=u==="open",f=async()=>{if(u==="open"){d("closed");return}d("loading"),r(t).then(()=>d("open")).catch(()=>d("closed"))};return(0,o.useEffect)(()=>{const p=e[0];p&&!!we(t.children??[],p.uri)&&d("open")},[e,t]),o.createElement(o.Fragment,null,o.createElement("tr",{className:(0,S.cx)(l.row,b&&l.disabledRow),key:t.id},o.createElement("td",{className:l.cell},o.createElement(ls,{level:s,isSelected:g,isDisabled:b,isOpen:h,entry:t,onToggleCollapse:f,onSelectedChange:a,isSelectable:i.some(p=>p===t.type),scrollIntoView:c})),o.createElement("td",{className:l.cell},t.typeLabel),o.createElement("td",{className:l.cell},t.location??"-")),h&&t.children&&Object.keys(t.children).length>0&&t.children.map(p=>o.createElement(vt,{key:p.uri,row:p,selectedRows:e,level:s+1,requestNestedRows:r,onRowSelectedChange:a,selectableEntryTypes:i,scrollIntoView:c,disableRow:n})),o.createElement(is.A,{visible:u==="loading"},o.createElement("tr",null,o.createElement("td",{className:(0,S.cx)(l.cell,l.loadingCell),colSpan:3},o.createElement(He._,{text:"Loading...",className:l.spinner})))))},yt=vt,hs=({searchFn:t})=>{const[e,s]=(0,o.useState)(""),r=(0,o.useMemo)(()=>(0,z.debounce)(t,600),[t]);return(0,o.useEffect)(()=>()=>{r.cancel()},[r]),o.createElement(x.p,{"aria-label":"resource search",prefix:o.createElement(ne.I,{name:"search"}),value:e,onChange:a=>{const i=a.currentTarget.value;s(i),r(i)},placeholder:"search for a resource","data-testid":N.components.queryEditor.resourcePicker.search.input})},bs=({resourcePickerData:t,resources:e,onApply:s,onCancel:r,selectableEntryTypes:a,queryType:i,disableRow:c,renderAdvanced:n,selectionNotice:l})=>{const u=(0,Z.of)(Re),[d,g]=(0,o.useState)(!1),[b,h]=(0,o.useState)([]),[f,p]=(0,o.useState)([]),[y,w]=(0,o.useState)(e),[k,E]=(0,o.useState)(void 0),[L,V]=(0,o.useState)(!1),le=l?.(f);(0,o.useEffect)(()=>{w(e)},[e]);const se=(0,o.useCallback)(async()=>{if(!d){try{g(!0);const A=await t.fetchInitialRows(i,fe(y??{}));h(A)}catch(A){E(ye(A))}g(!1)}},[y,d,t,i]);(0,pe.A)(()=>{se()});const De=A=>typeof A=="string"?A!=="":A.subscription&&A.resourceGroup&&A.resourceName&&A.metricNamespace;(0,o.useEffect)(()=>{y||p([]);const A=y.filter(O=>De(O)),P=y&&fs(b,Ke(A));return A?.length>P.length?p(t.parseRows(A)):P&&P.length?p(P):p([])},[y,b,t]);const Le=(0,o.useCallback)(async A=>{if(E(void 0),!A.children?.length)try{const P=await t.fetchAndAppendNestedRow(b,A,i);h(P)}catch(P){throw E(ye(P)),P}},[t,b,i]),je=(0,o.useCallback)((A,P)=>{if(P){const O=i==="logs"?A.uri:fe([A.uri],A.location)[0],Se=y?y.concat(O):[O];w(Se.filter(ge=>De(ge)))}else{const O=y?.filter(Se=>!bt($e(Se),A.uri));w(O)}},[i,y,w]),rt=(0,o.useCallback)(()=>{y&&s(i==="logs"?y:fe(y))},[i,y,s]),ot=(0,o.useCallback)(async A=>{if(E(void 0),V(!1),!A){se();return}try{g(!0);const P=await t.search(A,i);h(P),P.length>=t.resultLimit&&V(!0)}catch(P){E(ye(P))}g(!1)},[se,t,i]);return o.createElement(o.Fragment,null,o.createElement(hs,{searchFn:ot}),L?o.createElement("p",{className:u.resultLimit},"Showing first ",t.resultLimit," results"):o.createElement(J.$,{v:2}),o.createElement("table",{className:u.table},o.createElement("thead",null,o.createElement("tr",{className:(0,S.cx)(u.row,u.header)},o.createElement("td",{className:u.cell},"Scope"),o.createElement("td",{className:u.cell},"Type"),o.createElement("td",{className:u.cell},"Location")))),o.createElement("div",{className:(0,S.cx)(u.scrollableTable,u.tableScroller)},o.createElement("table",{className:u.table},o.createElement("tbody",null,d&&o.createElement("tr",{className:(0,S.cx)(u.row)},o.createElement("td",{className:u.cell},o.createElement(He._,{text:"Loading..."}))),!d&&b.length===0&&o.createElement("tr",{className:(0,S.cx)(u.row)},o.createElement("td",{className:u.cell,"aria-live":"polite"},"No resources found")),!d&&b.map(A=>o.createElement(yt,{key:A.uri,row:A,selectedRows:f,level:0,requestNestedRows:Le,onRowSelectedChange:je,selectableEntryTypes:a,scrollIntoView:!0,disableRow:c}))))),o.createElement("footer",{className:u.selectionFooter},f.length>0&&o.createElement(o.Fragment,null,o.createElement("h5",null,"Selection"),o.createElement("div",{className:(0,S.cx)(u.scrollableTable,u.selectedTableScroller)},o.createElement("table",{className:u.table},o.createElement("tbody",null,f.map(A=>o.createElement(yt,{key:A.uri,row:A,selectedRows:f,level:0,requestNestedRows:Le,onRowSelectedChange:je,selectableEntryTypes:a,disableRow:()=>!1}))))),o.createElement(J.$,{v:2}),le?.length?o.createElement(H.F,{title:"",severity:"info"},le):null),o.createElement(as,{resources:y,onChange:A=>w(A),renderAdvanced:n}),k&&o.createElement(o.Fragment,null,o.createElement(J.$,{v:2}),o.createElement(H.F,{severity:"error",title:"An error occurred while requesting resources from Azure Monitor"},k)),o.createElement(Be.a.ButtonRow,null,o.createElement(_.$n,{onClick:r,variant:"secondary",fill:"outline"},"Cancel"),o.createElement(_.$n,{disabled:!!k||!y.every(De),onClick:rt,"data-testid":N.components.queryEditor.resourcePicker.apply.button},"Apply"))))},vs=({query:t,datasource:e,onQueryChange:s,selectableEntryTypes:r,queryType:a,resources:i,inlineField:c,labelWidth:n,disableRow:l,renderAdvanced:u,selectionNotice:d})=>{const g=(0,Z.of)(Re),[b,h]=(0,o.useState)(!1),f=(0,o.useCallback)(()=>{h(!0)},[]),p=(0,o.useCallback)(()=>{h(!1)},[]),y=(0,o.useCallback)(w=>{s(gs(t,a,w)),p()},[p,s,t,a]);return o.createElement("span",{"data-testid":N.components.queryEditor.resourcePicker.select.button},o.createElement(Be.a,{className:g.modal,title:"Select a resource",isOpen:b,onDismiss:p,trapFocus:!1},o.createElement(bs,{resourcePickerData:e.resourcePickerData,resources:i,onApply:y,onCancel:p,selectableEntryTypes:r,queryType:a,disableRow:l,renderAdvanced:u,selectionNotice:d})),o.createElement(X,{label:"Resource",inlineField:c,labelWidth:n},o.createElement(_.$n,{className:g.resourceFieldButton,variant:"secondary",onClick:f,type:"button"},o.createElement(ys,{resources:i,datasource:e}))))},ys=({resources:t,datasource:e})=>{const[s,r]=(0,o.useState)(fe(t));return(0,o.useEffect)(()=>{r(fe(t))},[t]),t.length?o.createElement(ws,{resources:s}):o.createElement(o.Fragment,null,"Select a resource")},ws=({resources:t})=>{const e=(0,Z.of)(Re);let s="cube";const r=[];return t.forEach(a=>{if(a.resourceName){r.push(a.resourceName.split("/")[0]);return}if(a.resourceGroup){s="folder",r.push(a.resourceGroup);return}if(a.subscription){s="layer-group",r.push(a.subscription);return}}),o.createElement("span",{className:(0,S.cx)(e.truncated,e.resourceField)},o.createElement(ne.I,{name:s}),r.join(", "))},Ze=vs;var Oe=v(3721),wt=v(60029),ks=v(56034);const Ss=t=>({resourceList:(0,S.css)({width:"100%",display:"flex",marginBlock:t.spacing(1)})}),kt=({resources:t,onChange:e})=>{const s=(0,Z.of)(Ss);(0,o.useEffect)(()=>{t.length===0&&e([""])},[t,e]);const r=(c,n)=>{const l=[...t];l[c]=n,e(l)},a=c=>{const n=[...t];n.splice(c,1),e(n)},i=()=>{e(t.concat(""))};return o.createElement(o.Fragment,null,o.createElement(wt.J,null,o.createElement("h6",null,"Resource URI(s)"," ",o.createElement(ks.m,{content:o.createElement(o.Fragment,null,"Manually edit the"," ",o.createElement("a",{href:"https://docs.microsoft.com/en-us/azure/azure-monitor/logs/log-standard-columns#_resourceid",rel:"noopener noreferrer",target:"_blank"},"resource uri"),". Supports the use of multiple template variables (ex: /subscriptions/$subId/resourceGroups/$rg)"),placement:"right",interactive:!0},o.createElement(ne.I,{name:"info-circle"})))),t.map((c,n)=>o.createElement("div",{key:`resource-${n+1}`},o.createElement("div",{className:s.resourceList},o.createElement(x.p,{id:`input-advanced-resource-picker-${n+1}`,value:c,onChange:l=>r(n,l.currentTarget.value),placeholder:"ex: /subscriptions/$subId","data-testid":`input-advanced-resource-picker-${n+1}`}),o.createElement(Oe.Z,{"aria-label":"remove",icon:"times",variant:"secondary",onClick:()=>a(n),"data-testid":"remove-resource",hidden:t.length===1})))),o.createElement(_.$n,{"aria-label":"Add",icon:"plus",variant:"secondary",onClick:i,type:"button"},"Add resource URI"))};function Ye(t,e){return{...t,azureLogAnalytics:{...t.azureLogAnalytics,query:e}}}function zs(t,e){return{...t,azureLogAnalytics:{...t.azureLogAnalytics,resultFormat:e}}}function Es(t,e){return{...t,azureLogAnalytics:{...t.azureLogAnalytics,dashboardTime:e}}}function St(t,e){return{...t,azureLogAnalytics:{...t.azureLogAnalytics,timeColumn:e}}}const As=({query:t,onQueryChange:e,schema:s})=>{const[r,a]=(0,o.useState)();(0,o.useEffect)(()=>{if(!s||!r)return;(async({monaco:l,editor:u},d)=>{try{const g=l.languages,b=u.getModel();b&&await(await(await g.kusto.getKustoWorker())(b?.uri)).setSchema(d)}catch(g){console.error(g)}})(r,s).catch(l=>console.error(l))},[s,r]);const i=(0,o.useCallback)((n,l)=>{a({monaco:l,editor:n})},[]),c=(0,o.useCallback)(n=>{e(Ye(t,n))},[e,t]);return o.createElement(Xe.B,{value:t.azureLogAnalytics?.query??"",language:"kusto",height:200,width:"100%",showMiniMap:!1,onBlur:c,onSave:c,onEditorDidMount:i})};var Ts=v(94354);function Ns({query:t,onQueryChange:e,schema:s}){const[r,a]=(0,o.useState)(),[i,c]=(0,o.useState)(),n=(0,o.useCallback)(u=>e(St(t,u)),[t,e]);(0,o.useEffect)(()=>{if(s&&t.azureLogAnalytics?.dashboardTime){const u=[],d=new Set,g=new Map,b=s.database;if(b)for(const f of b.tables){const p=f.columns.reduce((y,w,k)=>(w.type==="datetime"&&(!f.timespanColumn||f.timespanColumn!==w.name)&&(y.push({value:w.name,label:`${f.name} > ${w.name}`}),d.add(w.name)),y),[]);u.push(...p),f.timespanColumn&&!g.has(f.timespanColumn)&&g.set(f.timespanColumn,{value:f.timespanColumn,label:f.timespanColumn})}c(u);const h=Array.from(g.values());if(a(h),!t.azureLogAnalytics.timeColumn||t.azureLogAnalytics.timeColumn&&!d.has(t.azureLogAnalytics.timeColumn)&&!g.has(t.azureLogAnalytics.timeColumn))if(h&&h.length){n(h[0].value),n(h[0].value);return}else if(u&&u.length){n(u[0].value);return}else{n("TimeGenerated");return}}},[s,t.azureLogAnalytics?.dashboardTime,t.azureLogAnalytics?.timeColumn,n]);const l=(0,o.useCallback)(u=>{if(!u.value)return;const d=St(t,u.value);e(d)},[e,t]);return o.createElement(o.Fragment,null,o.createElement(oe.I,{label:"Time-range",tooltip:o.createElement("span",null,"Specifies the time-range used to query. The ",o.createElement("code",null,"Query")," option will only use time-ranges specified in the query. ",o.createElement("code",null,"Dashboard")," will only use the Grafana time-range.")},o.createElement(Ts.z,{options:[{label:"Query",value:!1},{label:"Dashboard",value:!0}],value:t.azureLogAnalytics?.dashboardTime??!1,size:"md",onChange:u=>e(Es(t,u))})),t.azureLogAnalytics?.dashboardTime&&o.createElement(oe.I,{label:"Time Column",tooltip:o.createElement("span",null,"Specifies the time column used for filtering. Defaults to the first tables ",o.createElement("code",null,"timeSpan")," column, the first ",o.createElement("code",null,"datetime")," column found or ",o.createElement("code",null,"TimeGenerated"),".")},o.createElement(D.l6,{options:[{label:"Default time columns",options:r??[{value:"TimeGenerated",label:"TimeGenerated"}]},{label:"Other time columns",options:i??[]}],onChange:l,value:t.azureLogAnalytics?.timeColumn?t.azureLogAnalytics?.timeColumn:r?r[0]:i?i[0]:{value:"TimeGenerated",label:"TimeGenerated"},allowCustomValue:!0})))}async function Ms(t,e,s){if(e.azureLogAnalytics?.workspace!==void 0&&!e.azureLogAnalytics.resources){const r=ht(e.azureLogAnalytics.workspace);let a;r?a=await t.resourcePickerData.getResourceURIFromWorkspace(e.azureLogAnalytics.workspace):a=e.azureLogAnalytics.workspace;const i={...e,azureLogAnalytics:{...e.azureLogAnalytics,resource:a,workspace:void 0}};delete i.azureLogAnalytics.workspace,s(i)}}function Rs(t,e,s){const[r,a]=(0,o.useState)();return(0,o.useEffect)(()=>{Ms(t,e,s).catch(i=>a({title:"Unable to migrate workspace as a resource",message:i.message}))},[t,e,s]),r}const zt=({query:t,datasource:e,subscriptionId:s,variableOptionGroup:r,onChange:a,setError:i,hideFormatAs:c,timeRange:n,data:l})=>{const u=Rs(e,t,a),d=(f,p)=>{if(p.length===0)return!1;const y=j(f.uri,f.location).metricNamespace?.toLowerCase(),w=j(p[0].uri,p[0].location).metricNamespace?.toLowerCase();return y!==w},[g,b]=(0,o.useState)();(0,o.useEffect)(()=>{t.azureLogAnalytics?.resources&&t.azureLogAnalytics.resources.length&&e.azureLogAnalyticsDatasource.getKustoSchema(t.azureLogAnalytics.resources[0]).then(f=>{b(f)})},[t.azureLogAnalytics?.resources,e.azureLogAnalyticsDatasource]);let h=null;if(l?.series){const f=l.series.find(p=>p.refId===t.refId);f&&f.meta?.custom?.azurePortalLink&&(h=o.createElement(o.Fragment,null,o.createElement(_.z9,{size:"md",target:"_blank",style:{marginTop:"22px"},href:f.meta?.custom?.azurePortalLink},"View query in Azure Portal")))}return o.createElement("span",{"data-testid":N.components.queryEditor.logsQueryEditor.container.input},o.createElement(xe.D,null,o.createElement(ee.U,null,o.createElement(te.B,null,o.createElement(Ze,{query:t,datasource:e,inlineField:!0,labelWidth:10,subscriptionId:s,variableOptionGroup:r,onQueryChange:a,setError:i,selectableEntryTypes:[I.Subscription,I.ResourceGroup,I.Resource,I.Variable],resources:t.azureLogAnalytics?.resources??[],queryType:"logs",disableRow:d,renderAdvanced:(f,p)=>o.createElement(kt,{resources:f,onChange:p}),selectionNotice:()=>"You may only choose items of the same resource type."}),o.createElement(Ns,{query:t,datasource:e,variableOptionGroup:r,onQueryChange:a,setError:i,schema:g}))),o.createElement(As,{query:t,datasource:e,subscriptionId:s,variableOptionGroup:r,onQueryChange:a,setError:i,schema:g}),o.createElement(ee.U,null,o.createElement(te.B,null,!c&&o.createElement(dt,{query:t,datasource:e,subscriptionId:s,variableOptionGroup:r,onQueryChange:a,setError:i,inputId:"azure-monitor-logs",options:[{label:"Log",value:K.Logs},{label:"Time series",value:K.TimeSeries},{label:"Table",value:K.Table}],defaultValue:K.Logs,setFormatAs:zs,resultFormat:t.azureLogAnalytics?.resultFormat}),h,u&&o.createElement(H.F,{title:u.title},u.message)))))};var Et=v(40276),qe=v(10860),Cs=v(28848),Is=v.n(Cs);function Ds({query:t,lang:e,className:s}){const r=(0,Z.$j)(),a=Ls(r),i=Is().highlight(t,e.grammar,e.name);return o.createElement("div",{className:(0,S.cx)(a.editorField,"prism-syntax-highlight",s),"aria-label":"selector",dangerouslySetInnerHTML:{__html:i}})}const Ls=t=>({editorField:(0,S.css)({fontFamily:t.typography.fontFamilyMonospace,fontSize:t.typography.bodySmall.fontSize})}),Fs=[{label:"fields",documentation:"Retrieves the specified fields from log events"},{label:"display",documentation:"Specifies which fields to display in the query results"},{label:"filter",documentation:"Filters the results of a query based on one or more conditions"},{label:"stats",documentation:"Calculates aggregate statistics based on the values of log fields"},{label:"sort",documentation:"Sorts the retrieved log events"},{label:"limit",documentation:"Specifies the number of log events returned by the query"},{label:"parse",documentation:"Extracts data from a log field, creating one or more ephemeral fields that you can process further in the query"}],na=null,ca=null,Gs=[{label:"abs",detail:"abs(a)",documentation:"Absolute value."},{label:"ceil",detail:"ceil(a)",documentation:"Round to ceiling (the smallest integer that is greater than the value of a)."},{label:"floor",detail:"floor(a)",documentation:"Round to floor (the largest integer that is smaller than the value of a)."},{label:"greatest",detail:"greatest(a,b, ... z)",documentation:"Returns the largest value."},{label:"least",detail:"least(a, b, ... z)",documentation:"Returns the smallest value."},{label:"log",detail:"log(a)",documentation:"Natural logarithm."},{label:"sqrt",detail:"sqrt(a)",documentation:"Square root."}],Ps=[{label:"ispresent",detail:"ispresent(fieldname)",documentation:"Returns true if the field exists."},{label:"coalesce",detail:"coalesce(fieldname1, fieldname2, ... fieldnamex)",documentation:"Returns the first non-null value from the list."}],Qs=[{label:"isempty",detail:"isempty(fieldname)",documentation:"Returns true if the field is missing or is an empty string."},{label:"isblank",detail:"isblank(fieldname)",documentation:"Returns true if the field is missing, an empty string, or contains only white space."},{label:"concat",detail:"concat(string1, string2, ... stringz)",documentation:"Concatenates the strings."},{label:"ltrim",detail:"ltrim(string) or ltrim(string1, string2)",documentation:"Remove white space from the left of the string. If the function has a second string argument, it removes the characters of string2 from the left of string1."},{label:"rtrim",detail:"rtrim(string) or rtrim(string1, string2)",documentation:"Remove white space from the right of the string. If the function has a second string argument, it removes the characters of string2 from the right of string1."},{label:"trim",detail:"trim(string) or trim(string1, string2)",documentation:"Remove white space from both ends of the string. If the function has a second string argument, it removes the characters of string2 from both sides of string1."},{label:"strlen",detail:"strlen(string)",documentation:"Returns the length of the string in Unicode code points."},{label:"toupper",detail:"toupper(string)",documentation:"Converts the string to uppercase."},{label:"tolower",detail:"tolower(string)",documentation:"Converts the string to lowercase."},{label:"substr",detail:"substr(string1, x), or substr(string1, x, y)",documentation:"Returns a substring from the index specified by the number argument to the end of the string. If the function has a second number argument, it contains the length of the substring to be retrieved."},{label:"replace",detail:"replace(string1, string2, string3)",documentation:"Replaces all instances of string2 in string1 with string3."},{label:"strcontains",detail:"strcontains(string1, string2)",documentation:"Returns 1 if string1 contains string2 and 0 otherwise."}],xs=[{label:"bin",detail:"bin(period)",documentation:"Rounds the value of @timestamp to the given period and then truncates."},{label:"datefloor",detail:"datefloor(a, period)",documentation:"Truncates the timestamp to the given period."},{label:"dateceil",detail:"dateceil(a, period)",documentation:"Rounds up the timestamp to the given period and then truncates."},{label:"fromMillis",detail:"fromMillis(fieldname)",documentation:"Interprets the input field as the number of milliseconds since the Unix epoch and converts it to a timestamp."},{label:"toMillis",detail:"toMillis(fieldname)",documentation:"Converts the timestamp found in the named field into a number representing the milliseconds since the Unix epoch."}],At=[{label:"isValidIp",detail:"isValidIp(fieldname)",documentation:"Returns true if the field is a valid v4 or v6 IP address."},{label:"isValidIpV4",detail:"isValidIpV4(fieldname)",documentation:"Returns true if the field is a valid v4 IP address."},{label:"isValidIpV6",detail:"isValidIpV6(fieldname)",documentation:"Returns true if the field is a valid v6 IP address."},{label:"isIpInSubnet",detail:"isIpInSubnet(fieldname, string)",documentation:"Returns true if the field is a valid v4 or v6 IP address within the specified v4 or v6 subnet."},{label:"isIpv4InSubnet",detail:"isIpv4InSubnet(fieldname, string)",documentation:"Returns true if the field is a valid v4 IP address within the specified v4 subnet."},{label:"isIpv6InSubnet",detail:"isIpv6InSubnet(fieldname, string)",documentation:"Returns true if the field is a valid v6 IP address within the specified v6 subnet."}],la=[{label:"ispresent",detail:"ispresent(fieldname)",documentation:"Returns true if the field exists."},{label:"isempty",detail:"isempty(fieldname)",documentation:"Returns true if the field is missing or is an empty string."},{label:"isblank",detail:"isblank(fieldname)",documentation:"Returns true if the field is missing, an empty string, or contains only white space."},{label:"strcontains",detail:"strcontains(string1, string2)",documentation:"Returns 1 if string1 contains string2 and 0 otherwise."},...At],Vs=[{label:"avg",detail:"avg(NumericFieldname)",documentation:"The average of the values in the specified field."},{label:"count",detail:"count(fieldname) or count(*)",documentation:"Counts the log records."},{label:"count_distinct",detail:"count_distinct(fieldname)",documentation:"Returns the number of unique values for the field."},{label:"max",detail:"max(fieldname)",documentation:"The maximum of the values for this log field in the queried logs."},{label:"min",detail:"min(fieldname)",documentation:"The minimum of the values for this log field in the queried logs."},{label:"pct",detail:"pct(fieldname, value)",documentation:"A percentile indicates the relative standing of a value in a datas."},{label:"stddev",detail:"stddev(NumericFieldname)",documentation:"The standard deviation of the values in the specified field."},{label:"sum",detail:"sum(NumericFieldname)",documentation:"The sum of the values in the specified field."}],$s=[{label:"earliest",detail:"earliest(fieldname)",documentation:"Returns the value of fieldName from the log event that has the earliest time stamp in the queried logs."},{label:"latest",detail:"latest(fieldname)",documentation:"Returns the value of fieldName from the log event that has the latest time stamp in the queried logs."},{label:"sortsFirst",detail:"sortsFirst(fieldname)",documentation:"Returns the value of fieldName that sorts first in the queried logs."},{label:"sortsLast",detail:"sortsLast(fieldname)",documentation:"Returns the value of fieldName that sorts last in the queried logs."}],Os=[...Vs,...$s],Us=["as","like","by","in","desc","asc"],Ws=[...[...Gs,...Ps,...Qs,...xs,...At],...Os],js={comment:{pattern:/^#.*/,greedy:!0},backticks:{pattern:/`.*?`/,alias:"string",greedy:!0},quote:{pattern:/".*?"/,alias:"string",greedy:!0},regex:{pattern:/\/.*?\/(?=\||\s*$|,)/,greedy:!0},"query-command":{pattern:new RegExp(`\\b(?:${Fs.map(t=>t.label).join("|")})\\b`,"i"),alias:"function"},function:{pattern:new RegExp(`\\b(?:${Ws.map(t=>t.label).join("|")})\\b`,"i")},keyword:{pattern:new RegExp(`(\\s+)(${Us.join("|")})(?=\\s+)`,"i"),lookbehind:!0},"log-group-name":{pattern:/[\.\-_/#A-Za-z0-9]+/},"field-name":{pattern:/(@?[_a-zA-Z]+[_.0-9a-zA-Z]*)|(`((\\`)|([^`]))*?`)/,greedy:!0},number:/\b-?\d+((\.\d*)?([eE][+-]?\d+)?)?\b/,"command-separator":{pattern:/\|/,alias:"punctuation"},"comparison-operator":{pattern:/([<>]=?)|(!?=)/},punctuation:/[{}()`,.]/,whitespace:/\s+/},Xs=t=>{const[e,s]=(0,o.useState)(null),[r,a]=(0,o.useState)({}),[i,c]=(0,o.useState)(null),[n,l]=(0,o.useState)(!0),[u,d]=(0,o.useState)(""),g=(0,Z.of)(Bs),b={grammar:js,name:"kql"},h=(0,o.useMemo)(()=>e?Object.keys(e).map(w=>({label:w,value:w})):[],[e]),f=async()=>{await t.datasource.getAzureLogAnalyticsCheatsheetQueries().then(w=>{w.categories.sort((E,L)=>E.displayName.toLowerCase()===L.displayName.toLowerCase()?0:E.displayName.toLowerCase()<L.displayName.toLowerCase()?-1:1);const k=w.categories.reduce((E,L)=>{const V=L.related.queries.map(le=>w.queries.find(se=>se.id===le));return E[L.displayName]=V,a({...r,[L.id]:!1}),E},{});return s(k),c(k),l(!1),k})};(0,o.useEffect)(()=>{e||f()});const p=w=>{const k=Object.keys(i);if(w.length>0&&e){const E=Object.keys(e).reduce((L,V)=>{const le=e[V].filter(se=>se.displayName.toLowerCase().includes(w.toLowerCase()));return k.includes(V)&&(L[V]=le),L},{});return c(E),E}else return Object.keys(i).length!==Object.keys(e).length?(c(i),i):(c(e),e)},y=w=>{if(w.length>0){const E=w.map(L=>L.label).reduce((L,V)=>(L[V]=e[V],L),{});c(E)}else c(e)};return o.createElement("div",null,!n&&i?o.createElement("div",null,o.createElement("div",{className:g.filterAlignment},o.createElement(x.p,{value:u,onChange:w=>{d(w.currentTarget.value);const k=p(w.currentTarget.value);c(k)},placeholder:"Search Logs queries",width:40}),o.createElement($.D,{label:"Categories",className:g.categoryDropdown},o.createElement(D.l6,{options:h,value:"",onChange:w=>y(w),allowCustomValue:!1,backspaceRemovesValue:!0,placeholder:"All categories",isClearable:!0,noOptionsMessage:"Unable to list all categories",formatCreateLabel:w=>`Category: ${w}`,isSearchable:!0,isMulti:!0,width:40}))),o.createElement("div",{className:g.spacing},"Query results:"," ",Object.keys(i).reduce((w,k)=>(w=i[k].length+w,w),0)),o.createElement(Et.E,{showScrollIndicators:!0,autoHeightMax:"350px"},Object.keys(i).map(w=>{if(i[w].length)return o.createElement(ft.S,{label:w+` (${i[w].length})`,collapsible:!0,isOpen:r[w],onToggle:k=>a({...r,[w]:k}),key:w},i[w].map(k=>o.createElement(qe.Z,{className:g.card,key:k.id},o.createElement(qe.Z.Heading,null,k.displayName),o.createElement(Et.E,{showScrollIndicators:!0,autoHeightMax:"100px"},o.createElement(Ds,{"aria-label":`${k.displayName} raw query`,query:k.body,lang:b,className:g.rawQuery})),o.createElement(qe.Z.Actions,null,o.createElement(_.$n,{size:"sm","aria-label":"use this query button",onClick:()=>{t.onChange({refId:"A",queryType:m.LogAnalytics,azureLogAnalytics:{query:k.body},datasource:t.datasource}),(0,Qe.rR)("grafana_azure_cheatsheet_logs_query_selected",{id:k.id,queryName:k.displayName,query:k.body,queryCategories:k.related.categories})}},"Use this query")))))}))):o.createElement(He._,{text:"Loading..."}))},Bs=t=>({card:(0,S.css)({width:"90%",display:"flex",flexDirection:"column"}),rawQuery:(0,S.css)({backgroundColor:`${t.colors.background.primary}`,padding:`${t.spacing(1)}`,marginTop:`${t.spacing(1)}`}),spacing:(0,S.css)({marginBottom:`${t.spacing(1)}`}),filterAlignment:(0,S.css)({display:"flex"}),categoryDropdown:(0,S.css)({margin:"0 0 10px 10px",display:"flex",flexDirection:"row",alignItems:"center"})}),Hs=t=>{const{isOpen:e,onClose:s,datasource:r,onChange:a}=t;return o.createElement(Be.a,{"aria-label":"Kick start your query modal",isOpen:e,title:"Kick start your query",onDismiss:s},o.createElement(Xs,{onChange:i=>{a(i),s()},query:{refId:"A"},datasource:r}))},_e={"microsoft.recoveryservices/vaults/backupfabrics/protectioncontainers/protecteditems":"Backup Items","microsoft.resources/subscriptions":"Subscriptions","microsoft.resources/subscriptions/resourcegroups":"Resource groups","citrix.services/xenappessentials":"Citrix Virtual Apps Essentials","citrix.services/xendesktopessentials":"Citrix Virtual Desktops Essentials","dynatrace.observability/monitors":"Dynatrace","github.enterprise/accounts":"GitHub AE","microsoft.aad/domainservices":"Azure AD Domain Services","microsoft.aadiam/privatelinkforazuread":"Private Link for Azure AD","microsoft.agfoodplatform/farmbeats":"Azure FarmBeats","microsoft.analysisservices/servers":"Analysis Services","microsoft.anybuild/clusters":"AnyBuild clusters","microsoft.apimanagement/service":"API Management services","microsoft.appconfiguration/configurationstores":"App Configuration","microsoft.appplatform/spring":"Azure Spring Cloud","microsoft.attestation/attestationproviders":"Attestation providers","microsoft.authorization/resourcemanagementprivatelinks":"Resource management private links","microsoft.automation/automationaccounts":"Automation Accounts","microsoft.automation/automationaccounts/runbooks":"Runbook","microsoft.autonomoussystems/workspaces":"Bonsai","microsoft.avs/privateclouds":"AVS Private clouds","microsoft.azureactivedirectory/b2cdirectories":"B2C Tenants","microsoft.azureactivedirectory/guestusages":"Guest Usages","microsoft.azurearcdata/datacontrollers":"Azure Arc data controllers","microsoft.azurearcdata/postgresinstances":"Azure Arc-enabled PostgreSQL Hyperscale server groups","microsoft.azurearcdata/sqlmanagedinstances":"SQL managed instances - Azure Arc","microsoft.azurearcdata/sqlserverinstances":"SQL Server - Azure Arc","microsoft.azuredata/sqlserverregistrations":"SQL Server registries","microsoft.azurepercept/accounts":"Azure Percept accounts","microsoft.azurestackhci/clusters":"Azure Stack HCI","microsoft.azurestackhci/virtualmachines":"Azure Stack HCI virtual machine - Azure Arc","microsoft.baremetal/crayservers":"Cray Servers","microsoft.baremetal/monitoringservers":"Monitoring Servers","microsoft.baremetalinfrastructure/baremetalinstances":"BareMetal Instances","microsoft.batch/batchaccounts":"Batch accounts","microsoft.bing/accounts":"Bing Resources","microsoft.botservice/botservices":"Bot Services","microsoft.cache/redis":"Azure Cache for Redis","microsoft.cache/redisenterprise":"Redis Enterprise","microsoft.cdn/cdnwebapplicationfirewallpolicies":"Content Delivery Network WAF policies","microsoft.cdn/profiles (front doors standard/premium":"Preview)","microsoft.cdn/profiles/afdendpoints":"Endpoints","microsoft.cdn/profiles/endpoints":"Endpoints","microsoft.certificateregistration/certificateorders":"App Service Certificates","microsoft.chaos/chaosexperiments":"Chaos Experiments (Classic)","microsoft.chaos/experiments":"Chaos Experiments","microsoft.classiccompute/domainnames":"Cloud services (classic)","microsoft.classiccompute/virtualmachines":"Virtual machines (classic)","microsoft.classicnetwork/networksecuritygroups":"Network security groups (classic)","microsoft.classicnetwork/reservedips":"Reserved IP addresses (classic)","microsoft.classicnetwork/virtualnetworks":"Virtual networks (classic)","microsoft.classicstorage/storageaccounts":"Storage accounts (classic)","microsoft.cloudtest/accounts":"CloudTest Accounts","microsoft.cloudtest/hostedpools":"1ES Hosted Pools","microsoft.cloudtest/images":"CloudTest Images","microsoft.cloudtest/pools":"CloudTest Pools","microsoft.clusterstor/nodes":"ClusterStors","microsoft.cognitiveservices/accounts":"Cognitive Services","microsoft.compute/availabilitysets":"Availability sets","microsoft.compute/capacityreservationgroups":"Capacity Reservation Groups","microsoft.compute/cloudservices":"Cloud services (extended support)","microsoft.compute/diskaccesses":"Disk Accesses","microsoft.compute/diskencryptionsets":"Disk Encryption Sets","microsoft.compute/disks":"Disks","microsoft.compute/galleries":"Azure compute galleries","microsoft.compute/galleries/applications":"VM application definitions","microsoft.compute/galleries/applications/versions":"VM application versions","microsoft.compute/galleries/images":"VM image definitions","microsoft.compute/galleries/images/versions":"VM image versions","microsoft.compute/hostgroups":"Host groups","microsoft.compute/hostgroups/hosts":"Hosts","microsoft.compute/images":"Images","microsoft.compute/proximityplacementgroups":"Proximity placement groups","microsoft.compute/restorepointcollections":"Restore Point Collections","microsoft.compute/snapshots":"Snapshots","microsoft.compute/sshpublickeys":"SSH keys","microsoft.compute/virtualmachines":"Virtual machines","microsoft.compute/virtualmachinescalesets":"Virtual machine scale sets","microsoft.confidentialledger/ledgers":"Confidential Ledgers","microsoft.confluent/organizations":"Confluent organizations","microsoft.connectedcache/cachenodes":"Connected Cache Resources","microsoft.connectedcache/enterprisecustomers":"Connected Cache Resources","microsoft.connectedvehicle/platformaccounts":"Connected Vehicle Platforms","microsoft.connectedvmwarevsphere/vcenters":"VMware vCenters","microsoft.connectedvmwarevsphere/virtualmachines":"VMware + AVS virtual machines","microsoft.containerinstance/containergroups":"Container instances","microsoft.containerregistry/registries":"Container registries","microsoft.containerregistry/registries/replications":"Container registry replications","microsoft.containerregistry/registries/webhooks":"Container registry webhooks","microsoft.containerservice/managedclusters":"Kubernetes services","microsoft.dashboard/grafana":"Grafana Workspaces","microsoft.databox/jobs":"Azure Data Box","microsoft.databoxedge/databoxedgedevices":"Azure Stack Edge / Data Box Gateway","microsoft.databricks/workspaces":"Azure Databricks Services","microsoft.datacatalog/catalogs":"Data Catalog","microsoft.datacollaboration/workspaces":"Project CI","microsoft.datadog/monitors":"Datadog","microsoft.datafactory/datafactories":"Data factories","microsoft.datafactory/factories":"Data factories (V2)","microsoft.datalakeanalytics/accounts":"Data Lake Analytics","microsoft.datalakestore/accounts":"Data Lake Storage Gen1","microsoft.datamigration/services":"Azure Database Migration Services","microsoft.datamigration/services/projects":"Azure Database Migration Projects","microsoft.datamigration/sqlmigrationservices":"Azure Database Migration Services","microsoft.dataprotection/backupvaults":"Backup vaults","microsoft.dataprotection/resourceguards":"Resource Guards (Preview)","microsoft.datareplication/replicationvaults":"Site Recovery Vaults","microsoft.datashare/accounts":"Data Shares","microsoft.dbformariadb/servers":"Azure Database for MariaDB servers","microsoft.dbformysql/flexibleservers":"Azure Database for MySQL flexible servers","microsoft.dbformysql/servers":"Azure Database for MySQL servers","microsoft.dbforpostgresql/flexibleservers":"Azure Database for PostgreSQL flexible servers","microsoft.dbforpostgresql/servergroups":"Azure Database for PostgreSQL server groups","microsoft.dbforpostgresql/servergroupsv2":"Azure Database for PostgreSQL server groups","microsoft.dbforpostgresql/servers":"Azure Database for PostgreSQL servers","microsoft.dbforpostgresql/serversv2":"Azure Database for PostgreSQL servers v2","microsoft.deploymentmanager/rollouts":"Rollouts","microsoft.desktopvirtualization/applicationgroups":"Application groups","microsoft.desktopvirtualization/hostpools":"Host pools","microsoft.desktopvirtualization/scalingplans":"Scaling plans","microsoft.desktopvirtualization/workspaces":"Workspaces","microsoft.devices/iothubs":"IoT Hub","microsoft.devices/provisioningservices":"Device Provisioning Services","microsoft.deviceupdate/accounts":"Device Update for IoT Hubs","microsoft.devops/pipelines":"DevOps Starter","microsoft.devtestlab/labs":"DevTest Labs","microsoft.devtestlab/labs/virtualmachines":"Virtual machines","microsoft.digitaltwins/digitaltwinsinstances":"Azure Digital Twins","microsoft.documentdb/cassandraclusters":"Azure Managed Instance for Apache Cassandra","microsoft.documentdb/databaseaccounts":"Azure Cosmos DB accounts","microsoft.domainregistration/domains":"App Service Domains","microsoft.edgeorder/addresses":"Azure Edge Hardware Center Address","microsoft.edgeorder/orderitems":"Azure Edge Hardware Center","microsoft.elastic/monitors":"Elasticsearch (Elastic Cloud)","microsoft.eventgrid/domains":"Event Grid Domains","microsoft.eventgrid/partnernamespaces":"Event Grid Partner Namespaces","microsoft.eventgrid/partnerregistrations":"Event Grid Partner Registrations","microsoft.eventgrid/partnertopics":"Event Grid Partner Topics","microsoft.eventgrid/systemtopics":"Event Grid System Topics","microsoft.eventgrid/topics":"Event Grid Topics","microsoft.eventhub/clusters":"Event Hubs Clusters","microsoft.eventhub/namespaces":"Event Hubs Namespaces","microsoft.experimentation/experimentworkspaces":"Experiment Workspaces","microsoft.extendedlocation/customlocations":"Custom locations","microsoft.fidalgo/devcenters":"Fidalgo DevCenters","microsoft.fidalgo/networksettings":"Network Configurations","microsoft.fidalgo/projects":"Fidalgo Projects","microsoft.fidalgo/projects/environments":"Fidalgo Environments","microsoft.fluidrelay/fluidrelayservers":"Fluid Relay","microsoft.genomics/accounts":"Genomics accounts","microsoft.hanaonazure/hanainstances":"SAP HANA on Azure","microsoft.hanaonazure/sapmonitors":"Azure Monitors for SAP Solutions","microsoft.hdinsight/clusterpools":"HDInsight cluster pools","microsoft.hdinsight/clusterpools/clusters":"HDInsight gen2 clusters","microsoft.hdinsight/clusterpools/clusters/sessionclusters":"HDInsight session clusters","microsoft.hdinsight/clusters":"HDInsight clusters","microsoft.healthbot/healthbots":"Azure Health Bot","microsoft.healthcareapis/services":"Azure API for FHIR","microsoft.healthcareapis/workspaces":"Healthcare APIs Workspaces","microsoft.healthcareapis/workspaces/dicomservices":"DICOM services","microsoft.healthcareapis/workspaces/fhirservices":"FHIR services","microsoft.healthcareapis/workspaces/iotconnectors":"IoT connectors","microsoft.hpcworkbench/instances":"HPC Workbenches (preview)","microsoft.hpcworkbench/instances/chambers":"Chambers (preview)","microsoft.hpcworkbench/instances/chambers/accessprofiles":"Chamber Profiles (preview)","microsoft.hpcworkbench/instances/chambers/workloads":"Chamber VMs (preview)","microsoft.hpcworkbench/instances/consortiums":"Consortiums (preview)","microsoft.hybridcompute/machines":"Servers - Azure Arc","microsoft.hybridcompute/privatelinkscopes":"Azure Arc Private Link Scopes","microsoft.hybridcontainerservice/provisionedclusters":"Provisioned clusters","microsoft.hybriddata/datamanagers":"StorSimple Data Managers","microsoft.hybridnetwork/devices":"Azure Network Function Manager \u2013 Devices","microsoft.hybridnetwork/networkfunctions":"Azure Network Function Manager \u2013 Network Functions","microsoft.importexport/jobs":"Import/export jobs","microsoft.insights/components":"Application Insights","microsoft.insights/datacollectionendpoints":"Data collection endpoints","microsoft.insights/datacollectionrules":"Data collection rules","microsoft.insights/privatelinkscopes":"Azure Monitor Private Link Scopes","microsoft.insights/webtests":"Availability tests","microsoft.insights/workbooks":"Azure Workbooks","microsoft.insights/workbooktemplates":"Azure Workbook Templates","microsoft.iotcentral/iotapps":"IoT Central Applications","microsoft.keyvault/vaults":"Key vaults","microsoft.kubernetes/connectedclusters":"Kubernetes - Azure Arc","microsoft.kusto/clusters":"Azure Data Explorer Clusters","microsoft.kusto/clusters/databases":"Azure Data Explorer Databases","microsoft.labservices/labaccounts":"Lab accounts","microsoft.labservices/labplans":"Lab plans","microsoft.labservices/labs":"Labs","microsoft.loadtestservice/loadtests":"Azure Load Testing","microsoft.logic/integrationaccounts":"Integration accounts","microsoft.logic/integrationserviceenvironments":"Integration Service Environments","microsoft.logic/integrationserviceenvironments/managedapis":"Managed Connector","microsoft.logic/workflows":"Logic apps","microsoft.logz/monitors":"Logz main account","microsoft.logz/monitors/accounts":"Logz sub account","microsoft.logz/monitors/metricssource":"Logz metrics data source","microsoft.machinelearning/commitmentplans":"Machine Learning Studio (classic) web service plans","microsoft.machinelearning/webservices":"Machine Learning Studio (classic) web services","microsoft.machinelearning/workspaces":"Machine Learning Studio (classic) workspaces","microsoft.machinelearningservices/workspaces":"Machine learning","microsoft.machinelearningservices/workspaces/onlineendpoints":"Machine learning online endpoints","microsoft.machinelearningservices/workspaces/onlineendpoints/deployments":"Machine learning online deployments","microsoft.maintenance/maintenanceconfigurations":"Maintenance Configurations","microsoft.managedidentity/userassignedidentities":"Managed Identities","microsoft.maps/accounts":"Azure Maps Accounts","microsoft.maps/accounts/creators":"Azure Maps Creator Resources","microsoft.media/mediaservices":"Media Services","microsoft.media/mediaservices/liveevents":"Live events","microsoft.media/mediaservices/streamingendpoints":"Streaming Endpoints","microsoft.media/videoanalyzers":"Video Analyzers","microsoft.migrate/projects":"Migration projects","microsoft.mixedreality/objectanchorsaccounts":"Object Anchors Accounts","microsoft.mixedreality/objectunderstandingaccounts":"Object Understanding Accounts","microsoft.mixedreality/remoterenderingaccounts":"Remote Rendering Accounts","microsoft.mixedreality/spatialanchorsaccounts":"Spatial Anchors Accounts","microsoft.mobilenetwork/mobilenetworks":"Mobile Networks","microsoft.mobilenetwork/mobilenetworks/datanetworks":"Data Networks","microsoft.mobilenetwork/mobilenetworks/services":"Services","microsoft.mobilenetwork/mobilenetworks/simpolicies":"Sim Policies","microsoft.mobilenetwork/mobilenetworks/sites":"Mobile Network Sites","microsoft.mobilenetwork/mobilenetworks/slices":"Slices","microsoft.mobilenetwork/packetcorecontrolplanes":"Packet Core Control Planes","microsoft.mobilenetwork/packetcorecontrolplanes/packetcoredataplanes":"Packet Core Data Planes","microsoft.mobilenetwork/packetcorecontrolplanes/packetcoredataplanes/attacheddatanetworks":"Attached Data Networks","microsoft.mobilenetwork/sims":"Sims","microsoft.netapp/netappaccounts":"NetApp accounts","microsoft.netapp/netappaccounts/capacitypools":"Capacity pools","microsoft.netapp/netappaccounts/capacitypools/volumes":"Volumes","microsoft.netapp/netappaccounts/capacitypools/volumes/snapshots":"Snapshots","microsoft.netapp/netappaccounts/snapshotpolicies":"Snapshot policies","microsoft.network/applicationgateways":"Application gateways","microsoft.network/applicationgatewaywebapplicationfirewallpolicies":"Application Gateway WAF policies","microsoft.network/applicationsecuritygroups":"Application security groups","microsoft.network/azurefirewalls":"Firewalls","microsoft.network/bastionhosts":"Bastions","microsoft.network/connections":"Connections","microsoft.network/customipprefixes":"Custom IP Prefixes","microsoft.network/ddosprotectionplans":"DDoS protection plans","microsoft.network/dnsforwardingrulesets":"Dns Forwarding Rulesets","microsoft.network/dnsresolvers":"DNS Private Resolvers","microsoft.network/dnszones":"DNS zones","microsoft.network/expressroutecircuits":"ExpressRoute circuits","microsoft.network/expressrouteports":"ExpressRoute Direct","microsoft.network/firewallpolicies":"Firewall Policies","microsoft.network/frontdoors":"Front Doors","microsoft.network/frontdoorwebapplicationfirewallpolicies":"Web Application Firewall policies (WAF)","microsoft.network/ipgroups":"IP Groups","microsoft.network/loadbalancers":"Load balancers","microsoft.network/localnetworkgateways":"Local network gateways","microsoft.network/natgateways":"NAT gateways","microsoft.network/networkexperimentprofiles":"Internet Analyzer profiles","microsoft.network/networkinterfaces":"Network interfaces","microsoft.network/networkmanagers":"Network Managers","microsoft.network/networksecuritygroups":"Network security groups","microsoft.network/networkwatchers":"Network Watchers","microsoft.network/networkwatchers/connectionmonitors":"Connection Monitors","microsoft.network/networkwatchers/flowlogs":"NSG Flow Logs","microsoft.network/privatednszones":"Private DNS zones","microsoft.network/privateendpoints":"Private endpoints","microsoft.network/privatelinkservices":"Private link services","microsoft.network/publicipaddresses":"Public IP addresses","microsoft.network/publicipprefixes":"Public IP Prefixes","microsoft.network/routefilters":"Route filters","microsoft.network/routetables":"Route tables","microsoft.network/serviceendpointpolicies":"Service endpoint policies","microsoft.network/trafficmanagerprofiles":"Traffic Manager profiles","microsoft.network/virtualnetworkgateways":"Virtual network gateways","microsoft.network/virtualnetworks":"Virtual networks","microsoft.network/virtualwans":"Virtual WANs","microsoft.notificationhubs/namespaces":"Notification Hub Namespaces","microsoft.notificationhubs/namespaces/notificationhubs":"Notification Hubs","microsoft.openenergyplatform/energyservices":"Project Oak Forest","microsoft.openlogisticsplatform/workspaces":"Open Supply Chain Platform","microsoft.operationalinsights/querypacks":"Log Analytics query packs","microsoft.operationalinsights/workspaces":"Log Analytics workspaces","microsoft.operationsmanagement/solutions":"Solutions","microsoft.orbital/contactprofiles":"Contact Profiles","microsoft.orbital/edgesites":"Edge Sites","microsoft.orbital/groundstations":"Ground Stations","microsoft.orbital/l2connections":"L2 Connections","microsoft.orbital/spacecrafts":"Spacecrafts","microsoft.peering/peerings":"Peerings","microsoft.peering/peeringservices":"Peering Services","microsoft.playfab/playeraccountpools":"PlayFab player account pools","microsoft.playfab/titles":"PlayFab titles","microsoft.portal/dashboards":"Shared dashboards","microsoft.powerbidedicated/capacities":"Power BI Embedded","microsoft.purview/accounts":"Microsoft Purview accounts","microsoft.quantum/workspaces":"Quantum Workspaces","microsoft.recommendationsservice/accounts":"Intelligent Recommendations Accounts","microsoft.recommendationsservice/accounts/modeling":"Modeling","microsoft.recommendationsservice/accounts/serviceendpoints":"Service Endpoints","microsoft.recoveryservices/vaults":"Recovery Services vaults","microsoft.redhatopenshift/openshiftclusters":"Azure Red Hat OpenShift","microsoft.relay/namespaces":"Relays","microsoft.resourceconnector/appliances":"Resource bridges","microsoft.resourcegraph/queries":"Resource Graph queries","microsoft.resources/deploymentscripts":"Deployment Scripts","microsoft.resources/templatespecs":"Template specs","microsoft.saas/applications":"Software as a Service (classic)","microsoft.saas/resources":"SaaS","microsoft.scom/managedinstances":"Aquila Instances","microsoft.scvmm/virtualmachines":"SCVMM virtual machine - Azure Arc","microsoft.scvmm/vmmservers":"SCVMM management servers","microsoft.search/searchservices":"Search services","microsoft.securitydetonation/chambers":"Security Detonation Chambers","microsoft.servicebus/namespaces":"Service Bus Namespaces","microsoft.servicefabric/clusters":"Service Fabric clusters","microsoft.servicefabric/managedclusters":"Service Fabric managed clusters","microsoft.serviceshub/connectors":"Services Hub Connectors","microsoft.signalrservice/signalr":"SignalR","microsoft.signalrservice/webpubsub":"Web PubSub Service","microsoft.solutions/applicationdefinitions":"Service catalog managed application definitions","microsoft.solutions/applications":"Managed applications","microsoft.sql/instancepools":"Instance pools","microsoft.sql/managedinstances":"SQL managed instances","microsoft.sql/managedinstances/databases":"Managed databases","microsoft.sql/servers":"SQL servers","microsoft.sql/servers/databases":"SQL databases","microsoft.sql/servers/elasticpools":"SQL elastic pools","microsoft.sql/servers/jobagents":"Elastic Job agents","microsoft.sql/virtualclusters":"Virtual clusters","microsoft.sqlvirtualmachine/sqlvirtualmachines":"SQL virtual machines","microsoft.storage/storageaccounts":"Storage accounts","microsoft.storagecache/amlfilesystems":"Lustre File Systems","microsoft.storagecache/caches":"HPC caches","microsoft.storagepool/diskpools":"Disk Pools","microsoft.storagesync/storagesyncservices":"Storage Sync Services","microsoft.storagesyncdev/storagesyncservices":"Storage Sync Services","microsoft.storagesyncint/storagesyncservices":"Storage Sync Services","microsoft.storsimple/managers":"StorSimple Device Managers","microsoft.streamanalytics/clusters":"Stream Analytics clusters","microsoft.streamanalytics/streamingjobs":"Stream Analytics jobs","microsoft.synapse/privatelinkhubs":"Azure Synapse Analytics (private link hubs)","microsoft.synapse/workspaces":"Azure Synapse Analytics","microsoft.synapse/workspaces/bigdatapools":"Apache Spark pools","microsoft.synapse/workspaces/kustopools":"Data Explorer pools (preview)","microsoft.synapse/workspaces/sqlpools":"Dedicated SQL pools","microsoft.testbase/testbaseaccounts":"Test Base Accounts","microsoft.testbase/testbaseaccounts/packages":"Test Base Packages","microsoft.timeseriesinsights/environments":"Time Series Insights environments","microsoft.timeseriesinsights/environments/eventsources":"Time Series Insights event sources","microsoft.timeseriesinsights/environments/referencedatasets":"Time Series Insights reference data sets","microsoft.videoindexer/accounts":"Video Analyzer for Media","microsoft.virtualmachineimages/imagetemplates":"Image Templates","microsoft.visualstudio/account":"Azure DevOps organizations","microsoft.visualstudio/account/project":"DevOps Starter","microsoft.vmwarecloudsimple/dedicatedcloudnodes":"CloudSimple Nodes","microsoft.vmwarecloudsimple/dedicatedcloudservices":"CloudSimple Services","microsoft.vmwarecloudsimple/virtualmachines":"CloudSimple Virtual Machines","microsoft.vsonline/plans":"Visual Studio Online Plans","microsoft.web/connectiongateways":"On-premises data gateways","microsoft.web/connections":"API Connections","microsoft.web/containerapps":"Container Apps","microsoft.web/customapis":"Logic Apps Custom Connector","microsoft.web/hostingenvironments":"App Service Environments","microsoft.web/kubeenvironments":"App Service Kubernetes Environments","microsoft.web/serverfarms":"App Service plans","microsoft.web/sites":"App Services","microsoft.web/sites/slots":"App Service (Slots)","microsoft.web/staticsites":"Static Web Apps","microsoft.windowsesu/multipleactivationkeys":"Windows Multiple Activation Keys","microsoft.windowsiot/deviceservices":"Windows 10 IoT Core Services","microsoft.workloads/monitors":"Azure Monitors for SAP Solutions (v2)","microsoft.workloads/phpworkloads":"Scalable WordPress on Linux","microsoft.workloads/sapvirtualinstances":"SAP Virtual Instances","microsoft.workloads/sapvirtualinstances/applicationinstances":"SAP app server instances","microsoft.workloads/sapvirtualinstances/centralinstances":"SAP central server instances","microsoft.workloads/sapvirtualinstances/databaseinstances":"SAP database server instances","nginx.nginxplus/nginxdeployments":"NGINX Deployment","providers.test/statefulibizaengines":"VLCentral Help","wandisco.fusion/fusiongroups":"LiveData Planes","wandisco.fusion/fusiongroups/azurezones":"Azure Zones","wandisco.fusion/fusiongroups/azurezones/plugins":"Plugins","wandisco.fusion/fusiongroups/hivereplicationrules":"Hive Replication Rules","wandisco.fusion/fusiongroups/managedonpremzones":"On-premises Zones","wandisco.fusion/fusiongroups/replicationrules":"Replication Rules","wandisco.fusion/migrators":"LiveData Migrators","wandisco.fusion/migrators/exclusiontemplates":"Exclusions","wandisco.fusion/migrators/livedatamigrations":"Migrations","wandisco.fusion/migrators/metadatamigrations":"Metadata Migrations","wandisco.fusion/migrators/metadatatargets":"Metadata Targets","wandisco.fusion/migrators/pathmappings":"Path Mappings","wandisco.fusion/migrators/targets":"Targets","microsoft.security/insights/classification":"Data Sensitivity Security Insights (Preview)","microsoft.security/locations/alerts":"Security Alerts"},Ks={"microsoft.cache/redis":!0,"microsoft.dbforpostgresql/flexibleservers":!0,"microsoft.storagecache/amlfilesystems":!0,"microsoft.databoxedge/databoxedgedevices":!0,"microsoft.dataprotection/backupvaults":!0,"microsoft.netapp/netappaccounts/capacitypools":!0,"microsoft.network/networkwatchers/connectionmonitors":!0,"microsoft.keyvault/vaults":!0,"microsoft.recoveryservices/vaults":!0,"microsoft.sql/servers/databases":!0,"microsoft.sql/servers/elasticpools":!0,"microsoft.compute/virtualmachinescalesets":!0,"microsoft.compute/virtualmachines":!0,"microsoft.signalrservice/webpubsub":!0},Js=["microsoft.aad/domainservices","microsoft.aadiam/azureadmetrics","microsoft.analysisservices/servers","microsoft.apimanagement/service","microsoft.app/containerapps","microsoft.app/managedenvironments","microsoft.appconfiguration/configurationstores","microsoft.appplatform/spring","microsoft.automation/automationaccounts","microsoft.avs/privateclouds","microsoft.azuresphere/catalogs","microsoft.azurestackhci/clusters","microsoft.azurestackresourcemonitor/storageaccountmonitor","microsoft.batch/batchaccounts","microsoft.batchai/workspaces","microsoft.bing/accounts","microsoft.botservice/botservices","microsoft.botservice/botservices/channels","microsoft.botservice/botservices/connections","microsoft.botservice/checknameavailability","microsoft.botservice/hostsettings","microsoft.botservice/listauthserviceproviders","microsoft.botservice/listqnamakerendpointkeys","microsoft.cache/redis","microsoft.cache/redisenterprise","microsoft.cdn/cdnwebapplicationfirewallpolicies","microsoft.cdn/profiles","microsoft.classiccompute/domainnames","microsoft.classiccompute/domainnames/slots/roles","microsoft.classiccompute/virtualmachines","microsoft.classicstorage/storageaccounts","microsoft.classicstorage/storageaccounts/blobservices","microsoft.classicstorage/storageaccounts/fileservices","microsoft.classicstorage/storageaccounts/queueservices","microsoft.classicstorage/storageaccounts/tableservices","microsoft.cloudtest/hostedpools","microsoft.cloudtest/pools","microsoft.clusterstor/nodes","microsoft.codesigning/codesigningaccounts","microsoft.cognitiveservices/accounts","microsoft.communication/communicationservices","microsoft.compute/cloudservices","microsoft.compute/cloudservices/roles","microsoft.compute/disks","microsoft.compute/virtualmachines","microsoft.compute/virtualmachinescalesets","microsoft.compute/virtualmachinescalesets/virtualmachines","microsoft.connectedcache/cachenodes","microsoft.connectedcache/enterprisemcccustomers","microsoft.connectedcache/ispcustomers","microsoft.connectedvehicle/platformaccounts","microsoft.containerinstance/containergroups","microsoft.containerinstance/containerscalesets","microsoft.containerregistry/registries","microsoft.containerservice/managedclusters","microsoft.customerinsights/hubs","microsoft.customproviders/resourceproviders","microsoft.dashboard/grafana","microsoft.databoxedge/databoxedgedevices","microsoft.datacollaboration/workspaces","microsoft.datafactory/datafactories","microsoft.datafactory/factories","microsoft.datalakeanalytics/accounts","microsoft.datalakestore/accounts","microsoft.dataprotection/backupvaults","microsoft.datashare/accounts","microsoft.dbformariadb/servers","microsoft.dbformysql/flexibleservers","microsoft.dbformysql/servers","microsoft.dbforpostgresql/flexibleservers","microsoft.dbforpostgresql/servergroupsv2","microsoft.dbforpostgresql/servers","microsoft.dbforpostgresql/serversv2","microsoft.devices/iothubs","microsoft.devices/provisioningservices","microsoft.digitaltwins/digitaltwinsinstances","microsoft.documentdb/cassandraclusters","microsoft.documentdb/databaseaccounts","microsoft.documentdb/mongoclusters","microsoft.edgezones/edgezones","microsoft.enterpriseknowledgegraph/services","microsoft.eventgrid/domains","microsoft.eventgrid/eventsubscriptions","microsoft.eventgrid/extensiontopics","microsoft.eventgrid/namespaces","microsoft.eventgrid/partnernamespaces","microsoft.eventgrid/partnertopics","microsoft.eventgrid/systemtopics","microsoft.eventgrid/topics","microsoft.eventhub/clusters","microsoft.eventhub/namespaces","microsoft.fabric.admin/fabriclocations","microsoft.hdinsight/clusters","microsoft.healthcareapis/services","microsoft.healthcareapis/workspaces/dicomservices","microsoft.healthcareapis/workspaces/fhirservices","microsoft.healthcareapis/workspaces/iotconnectors","microsoft.healthmodel/healthmodels","microsoft.hybridcontainerservice/provisionedclusters","microsoft.hybridnetwork/networkfunctions","microsoft.hybridnetwork/virtualnetworkfunctions","microsoft.insights/autoscalesettings","microsoft.insights/components","microsoft.iotcentral/iotapps","microsoft.iotspaces/graph","microsoft.keyvault/managedhsms","microsoft.keyvault/vaults","microsoft.kubernetes/connectedclusters","microsoft.kubernetesconfiguration/extensions","microsoft.kusto/clusters","microsoft.logic/integrationserviceenvironments","microsoft.logic/workflows","microsoft.machinelearningservices/workspaces","microsoft.machinelearningservices/workspaces/onlineendpoints","microsoft.machinelearningservices/workspaces/onlineendpoints/deployments","microsoft.managednetworkfabric/internetgateways","microsoft.managednetworkfabric/l3isolationdomains","microsoft.managednetworkfabric/networkdevices","microsoft.maps/accounts","microsoft.media/mediaservices","microsoft.media/mediaservices/liveevents","microsoft.media/mediaservices/streamingendpoints","microsoft.media/videoanalyzers","microsoft.mixedreality/remoterenderingaccounts","microsoft.mixedreality/spatialanchorsaccounts","microsoft.mobilenetwork/packetcorecontrolplanes","microsoft.mobilenetwork/packetcorecontrolplanes/packetcoredataplanes","microsoft.monitor/accounts","microsoft.netapp/netappaccounts/capacitypools","microsoft.netapp/netappaccounts/capacitypools/volumes","microsoft.network/applicationgateways","microsoft.network/azurefirewalls","microsoft.network/bastionhosts","microsoft.network/connections","microsoft.network/dnsforwardingrulesets","microsoft.network/dnsresolvers","microsoft.network/dnszones","microsoft.network/expressroutecircuits","microsoft.network/expressroutecircuits/peerings","microsoft.network/expressroutegateways","microsoft.network/expressrouteports","microsoft.network/frontdoors","microsoft.network/loadbalancers","microsoft.network/natgateways","microsoft.network/networkinterfaces","microsoft.network/networkmanagers/ipampools","microsoft.network/networkvirtualappliances","microsoft.network/networkwatchers","microsoft.network/networkwatchers/connectionmonitors","microsoft.network/p2svpngateways","microsoft.network/privatednszones","microsoft.network/privateendpoints","microsoft.network/privatelinkservices","microsoft.network/publicipaddresses","microsoft.network/publicipprefixes","microsoft.network/trafficmanagerprofiles","microsoft.network/virtualhubs","microsoft.network/virtualnetworkgateways","microsoft.network/virtualnetworks","microsoft.network/virtualrouters","microsoft.network/vpngateways","microsoft.networkanalytics/dataconnectors","microsoft.networkcloud/baremetalmachines","microsoft.networkcloud/clusters","microsoft.networkcloud/storageappliances","microsoft.networkfunction/azuretrafficcollectors","microsoft.notificationhubs/namespaces/notificationhubs","microsoft.operationalinsights/workspaces","microsoft.operationsmanagement/solutions","microsoft.orbital/contactprofiles","microsoft.orbital/l2connections","microsoft.orbital/spacecrafts","microsoft.orbital/terminals","microsoft.peering/peerings","microsoft.peering/peeringservices","microsoft.playfab/titles","microsoft.powerbidedicated/capacities","microsoft.purview/accounts","microsoft.recoveryservices/vaults","microsoft.relay/namespaces","microsoft.resources/subscriptions","microsoft.search/searchservices","microsoft.securitydetonation/chambers","microsoft.securitydetonation/securitydetonationchambers","microsoft.servicebus/namespaces","microsoft.servicefabricmesh/applications","microsoft.servicenetworking/trafficcontrollers","microsoft.signalrservice/signalr","microsoft.signalrservice/signalr/replicas","microsoft.signalrservice/webpubsub","microsoft.signalrservice/webpubsub/replicas","microsoft.singularity/accounts","microsoft.sql/managedinstances","microsoft.sql/servers/databases","microsoft.sql/servers/elasticpools","microsoft.sql/servers/jobagents","microsoft.storage/storageaccounts","microsoft.storage/storageaccounts/blobservices","microsoft.storage/storageaccounts/fileservices","microsoft.storage/storageaccounts/objectreplicationpolicies","microsoft.storage/storageaccounts/queueservices","microsoft.storage/storageaccounts/storagetasks","microsoft.storage/storageaccounts/tableservices","microsoft.storage/storagetasks","microsoft.storagecache/amlfilesystems","microsoft.storagecache/caches","microsoft.storagemover/storagemovers","microsoft.storagesync/storagesyncservices","microsoft.storagetasks/storagetasks","microsoft.streamanalytics/streamingjobs","microsoft.synapse/workspaces","microsoft.synapse/workspaces/bigdatapools","microsoft.synapse/workspaces/kustopools","microsoft.synapse/workspaces/scopepools","microsoft.synapse/workspaces/sqlpools","microsoft.timeseriesinsights/environments","microsoft.timeseriesinsights/environments/eventsources","microsoft.vmwarecloudsimple/virtualmachines","microsoft.voiceservices/communicationsgateways","microsoft.web/containerapps","microsoft.web/hostingenvironments","microsoft.web/hostingenvironments/multirolepools","microsoft.web/hostingenvironments/workerpools","microsoft.web/serverfarms","microsoft.web/sites","microsoft.web/sites/slots","microsoft.web/staticsites","nginx.nginxplus/nginxdeployments","wandisco.fusion/migrators","wandisco.fusion/migrators/datatransferagents","wandisco.fusion/migrators/livedatamigrations","wandisco.fusion/migrators/metadatamigrations"],Zs=["microsoft.aad/domainservices","microsoft.aadiam/azureadmetrics","microsoft.aadiam/tenants","microsoft.agfoodplatform/farmbeats","microsoft.analysisservices/servers","microsoft.apimanagement/service","microsoft.appconfiguration/configurationstores","microsoft.appplatform/spring","microsoft.attestation/attestationproviders","microsoft.automation/automationaccounts","microsoft.autonomousdevelopmentplatform/accounts","microsoft.autonomousdevelopmentplatform/datapools","microsoft.autonomousdevelopmentplatform/workspaces","microsoft.avs/privateclouds","microsoft.azurestackresourcemonitor/storageaccountmonitor","microsoft.batch/batchaccounts","microsoft.batchai/workspaces","microsoft.blockchain/blockchainmembers","microsoft.blockchain/cordamembers","microsoft.botservice/botservices","microsoft.cache/redis","microsoft.cache/redisenterprise","microsoft.cdn/cdnwebapplicationfirewallpolicies","microsoft.cdn/profiles","microsoft.cdn/profiles/endpoints","microsoft.classiccompute/domainnames","microsoft.classiccompute/virtualmachines","microsoft.classicnetwork/networksecuritygroups","microsoft.classicstorage/storageaccounts","microsoft.cognitiveservices/accounts","microsoft.communication/communicationservices","microsoft.compute/disks","microsoft.compute/virtualmachines","microsoft.compute/virtualmachinescalesets","microsoft.connectedcache/cachenodes","microsoft.connectedvehicle/platformaccounts","microsoft.containerinstance/containergroups","microsoft.containerregistry/registries","microsoft.containerservice/managedclusters","microsoft.customerinsights/hubs","microsoft.customproviders/resourceproviders","microsoft.d365customerinsights/instances","microsoft.dashboard/grafana","microsoft.databoxedge/databoxedgedevices","microsoft.databricks/workspaces","microsoft.datacollaboration/workspaces","microsoft.datafactory/datafactories","microsoft.datafactory/factories","microsoft.datalakeanalytics/accounts","microsoft.datalakestore/accounts","microsoft.datashare/accounts","microsoft.dbformariadb/servers","microsoft.dbformysql/flexibleservers","microsoft.dbformysql/servers","microsoft.dbforpostgresql/flexibleservers","microsoft.dbforpostgresql/servergroupsv2","microsoft.dbforpostgresql/servers","microsoft.dbforpostgresql/serversv2","microsoft.desktopvirtualization/applicationgroups","microsoft.desktopvirtualization/hostpools","microsoft.desktopvirtualization/scalingplans","microsoft.desktopvirtualization/workspaces","microsoft.devices/elasticpools/iothubtenants","microsoft.devices/iothubs","microsoft.devices/provisioningservices","microsoft.digitaltwins/digitaltwinsinstances","microsoft.documentdb/cassandraclusters","microsoft.documentdb/databaseaccounts","microsoft.eventgrid/domains","microsoft.eventgrid/partnernamespaces","microsoft.eventgrid/partnertopics","microsoft.eventgrid/systemtopics","microsoft.eventgrid/topics","microsoft.eventhub/clusters","microsoft.eventhub/namespaces","microsoft.experimentation/experimentworkspaces","microsoft.fabric.admin/fabriclocations","microsoft.hdinsight/clusters","microsoft.healthcareapis/services","microsoft.healthcareapis/workspaces/dicomservices","microsoft.healthcareapis/workspaces/fhirservices","microsoft.insights/autoscalesettings","microsoft.insights/components","microsoft.insights/qos","microsoft.iotcentral/iotapps","microsoft.keyvault/managedhsms","microsoft.keyvault/vaults","microsoft.kubernetes/connectedclusters","microsoft.kusto/clusters","microsoft.loadtestservice/loadtests","microsoft.logic/integrationaccounts","microsoft.logic/integrationserviceenvironments","microsoft.logic/workflows","microsoft.machinelearningservices/workspaces","microsoft.media/mediaservices","microsoft.media/mediaservices/liveevents","microsoft.media/mediaservices/streamingendpoints","microsoft.media/videoanalyzers","microsoft.netapp/netappaccounts/capacitypools","microsoft.netapp/netappaccounts/capacitypools/volumes","microsoft.network/applicationgateways","microsoft.network/azurefirewalls","microsoft.network/bastionhosts","microsoft.network/connections","microsoft.network/dnszones","microsoft.network/expressroutecircuits","microsoft.network/expressroutegateways","microsoft.network/expressrouteports","microsoft.network/frontdoors","microsoft.network/loadbalancers","microsoft.network/natgateways","microsoft.network/networkinterfaces","microsoft.network/networksecuritygroups","microsoft.network/networksecurityperimeters","microsoft.network/networkvirtualappliances","microsoft.network/networkwatchers","microsoft.network/networkwatchers/connectionmonitors","microsoft.network/p2svpngateways","microsoft.network/privateendpoints","microsoft.network/privatelinkservices","microsoft.network/publicipaddresses","microsoft.network/trafficmanagerprofiles","microsoft.network/virtualnetworkgateways","microsoft.network/virtualnetworks","microsoft.network/vpngateways","microsoft.networkfunction/azuretrafficcollectors","microsoft.notificationhubs/namespaces","microsoft.notificationhubs/namespaces/notificationhubs","microsoft.openlogisticsplatform/workspaces","microsoft.operationalinsights/workspaces","microsoft.operationsmanagement/solutions","microsoft.peering/peeringservices","microsoft.powerbi/tenants","microsoft.powerbi/tenants/workspaces","microsoft.powerbidedicated/capacities","microsoft.purview/accounts","microsoft.recoveryservices/vaults","microsoft.relay/namespaces","microsoft.resources/subscriptions","microsoft.resources/subscriptions/resourcegroups","microsoft.search/searchservices","microsoft.security/antimalwaresettings","microsoft.securityinsights/settings","microsoft.servicebus/namespaces","microsoft.signalrservice/signalr","microsoft.signalrservice/webpubsub","microsoft.singularity/accounts","microsoft.sql/managedinstances","microsoft.sql/managedinstances/databases","microsoft.sql/servers/databases","microsoft.sql/servers/elasticpools","microsoft.storage/storageaccounts","microsoft.storage/storageaccounts/blobservices","microsoft.storage/storageaccounts/fileservices","microsoft.storage/storageaccounts/queueservices","microsoft.storage/storageaccounts/tableservices","microsoft.storagecache/caches","microsoft.storagesync/storagesyncservices","microsoft.streamanalytics/streamingjobs","microsoft.synapse/workspaces","microsoft.synapse/workspaces/bigdatapools","microsoft.synapse/workspaces/kustopools","microsoft.synapse/workspaces/scopepools","microsoft.synapse/workspaces/sqlpools","microsoft.timeseriesinsights/environments","microsoft.timeseriesinsights/environments/eventsources","microsoft.videoindexer/accounts","microsoft.vmwarecloudsimple/virtualmachines","microsoft.web/hostingenvironments","microsoft.web/hostingenvironments/workerpools","microsoft.web/serverfarms","microsoft.web/sites","microsoft.web/sites/slots"],Ys=t=>({resourceList:(0,S.css)({display:"flex",columnGap:t.spacing(1),flexWrap:"wrap",marginBottom:t.spacing(1)}),resource:(0,S.css)({flex:"0 0 auto"}),resourceLabel:(0,S.css)({padding:t.spacing(1)}),resourceGroupAndName:(0,S.css)({display:"flex",columnGap:t.spacing(.5)})}),qs=({resources:t,onChange:e})=>{const s=(0,Z.of)(Ys);(0,o.useEffect)(()=>{t.length===0&&e([{}])},[t,e]);const r=(n,l)=>{const u=[...t];u[n]=l,e(u)},a=n=>{const l=[...t];l.splice(n,1),e(l)},i=()=>{e(t.concat({subscription:t[0]?.subscription,metricNamespace:t[0]?.metricNamespace,resourceGroup:"",resourceName:""}))},c=n=>{e(t.map(l=>({...l,...n})))};return o.createElement(o.Fragment,null,o.createElement(oe.I,{label:"Subscription",grow:!0,transparent:!0,htmlFor:"input-advanced-resource-picker-subscription",labelWidth:15,"data-testid":N.components.queryEditor.resourcePicker.advanced.subscription.input},o.createElement(x.p,{id:"input-advanced-resource-picker-subscription",value:t[0]?.subscription??"",onChange:n=>c({subscription:n.currentTarget.value}),placeholder:"aaaaaaaa-bbbb-cccc-dddd-eeeeeeee"})),o.createElement(oe.I,{label:"Namespace",grow:!0,transparent:!0,htmlFor:"input-advanced-resource-picker-metricNamespace",labelWidth:15,"data-testid":N.components.queryEditor.resourcePicker.advanced.namespace.input,invalid:t[0]?.metricNamespace?.endsWith("/"),error:'Namespace cannot end with a "/"'},o.createElement(x.p,{id:"input-advanced-resource-picker-metricNamespace",value:t[0]?.metricNamespace??"",onChange:n=>c({metricNamespace:n.currentTarget.value}),placeholder:"Microsoft.Insights/metricNamespaces"})),o.createElement(oe.I,{label:"Region",grow:!0,transparent:!0,htmlFor:"input-advanced-resource-picker-region",labelWidth:15,"data-testid":N.components.queryEditor.resourcePicker.advanced.region.input,tooltip:"The code region of the resource. Optional for one resource but mandatory when selecting multiple ones."},o.createElement(x.p,{id:"input-advanced-resource-picker-region",value:t[0]?.region??"",onChange:n=>c({region:n.currentTarget.value}),placeholder:"northeurope"})),o.createElement("div",{className:s.resourceList},t.map((n,l)=>o.createElement("div",{key:`resource-${l+1}`,className:s.resource},t.length!==1&&o.createElement(wt.J,{className:s.resourceLabel},"Resource ",l+1),o.createElement(oe.I,{label:"Resource Group",transparent:!0,htmlFor:`input-advanced-resource-picker-resourceGroup-${l+1}`,labelWidth:15,"data-testid":N.components.queryEditor.resourcePicker.advanced.resourceGroup.input},o.createElement("div",{className:s.resourceGroupAndName},o.createElement(x.p,{id:`input-advanced-resource-picker-resourceGroup-${l+1}`,value:n?.resourceGroup??"",onChange:u=>r(l,{...n,resourceGroup:u.currentTarget.value}),placeholder:"resource-group"}),o.createElement(Oe.Z,{"aria-label":"remove",icon:"times",variant:"secondary",onClick:()=>a(l),hidden:t.length===1,"data-testid":"remove-resource"}))),o.createElement(oe.I,{label:"Resource Name",transparent:!0,htmlFor:`input-advanced-resource-picker-resourceName-${l+1}`,labelWidth:15,"data-testid":N.components.queryEditor.resourcePicker.advanced.resource.input},o.createElement(x.p,{id:`input-advanced-resource-picker-resourceName-${l+1}`,value:n?.resourceName??"",onChange:u=>r(l,{...n,resourceName:u.currentTarget.value}),placeholder:"name"}))))),o.createElement(_.$n,{"aria-label":"Add",icon:"plus",variant:"secondary",onClick:i,type:"button"},"Add resource"))};function Tt(t,e){return t.azureMonitor?.customNamespace===e?t:e?.toLowerCase().startsWith("microsoft.storage/storageaccounts/")?{...t,azureMonitor:{...t.azureMonitor,metricNamespace:e,metricName:void 0,aggregation:void 0,timeGrain:"",dimensionFilters:[]}}:{...t,azureMonitor:{...t.azureMonitor,customNamespace:e,metricName:void 0,aggregation:void 0,timeGrain:"",dimensionFilters:[]}}}function _s(t,e){return t.azureMonitor?.metricName===e?t:{...t,azureMonitor:{...t.azureMonitor,metricName:e,aggregation:void 0,timeGrain:"",dimensionFilters:[]}}}function er(t,e){return t.azureMonitor?.aggregation===e?t:{...t,azureMonitor:{...t.azureMonitor,aggregation:e}}}function Nt(t,e){return t.azureMonitor?.timeGrain===e?t:{...t,azureMonitor:{...t.azureMonitor,timeGrain:e}}}function Ue(t,e){return t.azureMonitor?.dimensionFilters===e?t:{...t,azureMonitor:{...t.azureMonitor,dimensionFilters:e}}}function tr(t,e="",s="eq",r=[]){const a=t.azureMonitor?.dimensionFilters??[];return Ue(t,[...a,{dimension:e,operator:s,filters:r}])}function fa(t,e){const r=[...t.azureMonitor?.dimensionFilters??[]];return r.splice(e,1),Ue(t,r)}function ga(t,e,s,r){const i=[...t.azureMonitor?.dimensionFilters??[]],c=i[e];return c[s]=r,(s==="dimension"||s==="operator")&&(c.filters=[]),Ue(t,i)}function sr(t,e){return t.azureMonitor?.top===e?t:{...t,azureMonitor:{...t.azureMonitor,top:e}}}function rr(t,e){return t.azureMonitor?.alias===e?t:{...t,azureMonitor:{...t.azureMonitor,alias:e}}}const or=({query:t,variableOptionGroup:e,onQueryChange:s,aggregationOptions:r,isLoading:a})=>{const i=(0,o.useCallback)(n=>{if(!n.value)return;const l=er(t,n.value);s(l)},[s,t]),c=R(r,e,t.azureMonitor?.aggregation);return o.createElement(X,{label:"Aggregation"},o.createElement(D.l6,{inputId:"azure-monitor-metrics-aggregation-field",value:t.azureMonitor?.aggregation||null,onChange:i,options:c,isLoading:a}))};var Mt=v(7650),Rt=v(66864);const ar=(t,e)=>{const[s,r]=(0,o.useState)({});return(0,o.useEffect)(()=>{let a={};if(t?.series?.length){const n=t.series.flat().filter(l=>l.refId===e.refId).flatMap(l=>l.fields).map(l=>l.labels).flat().filter(l=>l!=null);for(const l of n)for(const[u,d]of Object.entries(l)){const g=u.toLowerCase();a[g]?a[g].add(d):a[g]=new Set([d])}}r(i=>{const c={},n=Object.keys(a);if(n.length===0)return i;for(const l of n)i[l]&&a[l].size<i[l].size?c[l]=i[l]:c[l]=a[l];return c})},[t?.series,e.refId]),s},ir=({data:t,query:e,dimensionOptions:s,onQueryChange:r})=>{const a=(0,o.useMemo)(()=>e.azureMonitor?.dimensionFilters??[],[e.azureMonitor?.dimensionFilters]),i=ar(t,e),c=[{label:"==",value:"eq"},{label:"!=",value:"ne"},{label:"starts with",value:"sw"}],n=(0,o.useMemo)(()=>{let p=s;return a.length&&(p=s.filter(y=>!a.some(w=>w.dimension===y.value))),p},[a,s]),l=(p,y,w,k)=>{y[p]=w,k(y)},u=p=>n.concat(s.filter(y=>y.value===p)),d=(p,y)=>{const w=Array.from(i[y.toLowerCase()]??[]);return w.find(k=>k===p)?w.map(k=>({value:k,label:k})):[...w,...p&&p!=="*"?[p]:[]].map(k=>({value:k,label:k}))},g=(p,y)=>{const w=d(void 0,y);if(p)for(const k of p)w.find(E=>E.value===k)||w.push({value:k,label:k});return w},b=p=>c.find(y=>y.value===p)?c:[...c,...p?[{label:p,value:p}]:[]],h=p=>{const y=p.map(w=>({dimension:w.dimension??"",operator:w.operator??"eq",filters:w.filters??[]}));r(Ue(e,y))},f=(p,y,w)=>o.createElement(Rt.Gy,{spacing:"none"},o.createElement(D.l6,{menuShouldPortal:!0,placeholder:"Field",value:p.dimension,options:u(p.dimension||""),onChange:k=>l("dimension",p,k.value??"",y)}),o.createElement(D.l6,{menuShouldPortal:!0,placeholder:"Operation",value:p.operator,options:b(p.operator||"eq"),onChange:k=>l("operator",p,k.value??"",y),allowCustomValue:!0}),p.operator==="eq"||p.operator==="ne"?o.createElement(D.KF,{menuShouldPortal:!0,placeholder:"Select value(s)",value:p.filters,options:g(p.filters,p.dimension??""),onChange:k=>l("filters",p,k.map(E=>E.value??""),y),"aria-label":"dimension-labels-select",allowCustomValue:!0}):o.createElement(D.l6,{menuShouldPortal:!0,placeholder:"Select value",value:p.filters?p.filters[0]:"",allowCustomValue:!0,options:d(p.filters?p.filters[0]:"",p.dimension??""),onChange:k=>l("filters",p,[k?.value??""],y),isClearable:!0}),o.createElement(Oe.Z,{"aria-label":"Remove",icon:"times",variant:"secondary",onClick:w,type:"button"}));return o.createElement(X,{label:"Dimensions"},o.createElement(Mt.o,{items:a,onChange:h,renderItem:f}))},nr=({onQueryChange:t,query:e})=>{const[s,r]=(0,o.useState)(e.azureMonitor?.alias??""),a=(0,o.useCallback)(c=>{c.target instanceof HTMLInputElement&&r(c.target.value)},[]),i=(0,o.useCallback)(()=>{const c=rr(e,s);t(c)},[t,e,s]);return o.createElement(X,{label:"Legend format"},o.createElement(x.p,{id:"azure-monitor-metrics-legend-field",placeholder:"Alias patterns",value:s,onChange:a,onBlur:i,width:38}))},cr=({metricNames:t,query:e,variableOptionGroup:s,onQueryChange:r})=>{const a=(0,o.useCallback)(c=>{if(!c.value)return;const n=_s(e,c.value);r(n)},[r,e]),i=R(t,s,e.azureMonitor?.metricName);return o.createElement(X,{label:"Metric","data-testid":N.components.queryEditor.metricsQueryEditor.metricName.input},o.createElement(D.l6,{inputId:"azure-monitor-metrics-metric-field",value:e.azureMonitor?.metricName??null,onChange:a,options:i,allowCustomValue:!0}))},lr=({metricNamespaces:t,query:e,variableOptionGroup:s,onQueryChange:r})=>{const a=(0,o.useCallback)(n=>{if(!n.value)return;const l=Tt(e,n.value);r(l)},[r,e]),i=e.azureMonitor?.customNamespace||e.azureMonitor?.metricNamespace,c=R(t,s,i);return o.createElement(X,{label:"Metric namespace"},o.createElement(D.l6,{inputId:"azure-monitor-metrics-metric-namespace-field",value:i||null,onChange:a,options:c,allowCustomValue:!0}))},ur=({query:t,timeGrainOptions:e,variableOptionGroup:s,onQueryChange:r})=>{const a=(0,o.useCallback)(c=>{if(!c.value)return;const n=Nt(t,c.value);r(n)},[r,t]),i=(0,o.useMemo)(()=>{const c=U.findClosestTimeGrain("1m",e.map(u=>U.createKbnUnitFromISO8601Duration(u.value))||["1m","5m","15m","30m","1h","6h","12h","1d"]),n=e.map(u=>u.value==="auto"?{...u,description:c}:u);return R(n,s,t.azureMonitor?.timeGrain)},[e,s,t.azureMonitor?.timeGrain]);return o.createElement(X,{label:"Time grain"},o.createElement(D.l6,{inputId:"azure-monitor-metrics-time-grain-field",value:t.azureMonitor?.timeGrain,onChange:a,options:i}))},mr=({onQueryChange:t,query:e})=>{const[s,r]=(0,o.useState)(e.azureMonitor?.top??""),a=(0,o.useCallback)(c=>{c.target instanceof HTMLInputElement&&r(c.target.value)},[]),i=(0,o.useCallback)(()=>{const c=sr(e,s);t(c)},[t,e,s]);return o.createElement(X,{label:"Top"},o.createElement(x.p,{id:"azure-monitor-metrics-top-field",value:s,onChange:a,onBlur:i,width:16}))};function Ct(t,e,s){const[r]=(0,o.useState)(()=>Math.random()),[a,i]=(0,o.useState)(),c=(0,o.useMemo)(()=>a??[],[a]);return(0,o.useEffect)(()=>{t().then(n=>{i(n),e(r,void 0)}).catch(n=>{e(r,n)})},s),c}const et=t=>!t||!t.length?{resourceGroup:"",resourceName:""}:{resourceGroup:t[0].resourceGroup??"",resourceName:t[0].resourceName??""},pr=(t,e,s,r)=>{const{subscription:a}=t,{metricNamespace:i,resources:c}=t.azureMonitor??{},{resourceGroup:n,resourceName:l}=et(c);return Ct(async()=>{if(!a||!n||!l)return;const d=await e.azureMonitorDatasource.getMetricNamespaces({subscription:a,metricNamespace:i,resourceGroup:n,resourceName:l},!1),g=Dt(d,i);return!i&&g.length&&s(Tt(t,g[0].value)),g},r,[a,i,n,l])},dr=(t,e,s,r)=>{const{subscription:a}=t,{metricNamespace:i,metricName:c,resources:n,customNamespace:l}=t.azureMonitor??{},{resourceGroup:u,resourceName:d}=et(n),g=(n&&n.length>1)??!1,b=t.azureMonitor?.region??"";return Ct(async()=>{if(!a||!i||!u||!d)return;const h=await e.azureMonitorDatasource.getMetricNames({subscription:a,resourceGroup:u,resourceName:d,metricNamespace:i,customNamespace:l},g,b);return Dt(h,c)},r,[a,u,d,i,l,g])},It={aggOptions:[],timeGrains:[],dimensions:[],isLoading:!1,supportedAggTypes:[],primaryAggType:void 0},fr=(t,e,s)=>{const[r,a]=(0,o.useState)(It),{subscription:i}=t,{resources:c,metricNamespace:n,metricName:l,aggregation:u,timeGrain:d,customNamespace:g,region:b}=t.azureMonitor??{},{resourceGroup:h,resourceName:f}=et(c),p=(c&&c.length>1)??!1;return(0,o.useEffect)(()=>{if(!i||!h||!f||!n||!l){a(It);return}e.azureMonitorDatasource.getMetricMetadata({subscription:i,resourceGroup:h,resourceName:f,metricNamespace:n,metricName:l,customNamespace:g},p,b).then(y=>{const w=(y.supportedAggTypes||[y.primaryAggType]).map(k=>({label:k,value:k}));a({aggOptions:w,timeGrains:y.supportedTimeGrains,dimensions:y.dimensions,isLoading:!1,supportedAggTypes:y.supportedAggTypes??[],primaryAggType:y.primaryAggType})})},[b,e,i,h,f,n,l,g,p]),(0,o.useEffect)(()=>{const y=u||r.primaryAggType,w=d||"auto";(y!==u||w!==d)&&s({...t,azureMonitor:{...t.azureMonitor,aggregation:y,timeGrain:w,allowedTimeGrainsMs:r.timeGrains.filter(k=>k.value!=="auto").map(k=>Ae.intervalToMs(U.createKbnUnitFromISO8601Duration(k.value)))}})},[s,r,u,d,t]),r};function Dt(t,e){const s=t.map(C);return e&&!s.find(r=>r.value===e.toLowerCase())&&s.push({label:e,value:e}),s}const gr=({data:t,query:e,datasource:s,variableOptionGroup:r,onChange:a,setError:i})=>{const c=fr(e,s,a),n=pr(e,s,a,i),l=dr(e,s,a,i),u=e.azureMonitor?.resources?.map(h=>({subscription:e.subscription,resourceGroup:h.resourceGroup,metricNamespace:e.azureMonitor?.metricNamespace,resourceName:h.resourceName,region:e.azureMonitor?.region}))??[],d=h=>Ks[h?.toLocaleLowerCase()??""]??!1,g=(h,f)=>{if(f.length===0)return!1;const p=j(h.uri,h.location),y=j(f[0].uri,f[0].location);return p.subscription!==y.subscription||p.region!==y.region||p.metricNamespace?.toLocaleLowerCase()!==y.metricNamespace?.toLocaleLowerCase()||!d(p.metricNamespace)},b=h=>{if(h.length===0)return"";const f=j(h[0].uri,h[0].location);return d(f.metricNamespace)?"You can select items of the same resource type and location. To select resources of a different resource type or location, please first uncheck your current selection.":""};return o.createElement("span",{"data-testid":N.components.queryEditor.metricsQueryEditor.container.input},o.createElement(xe.D,null,o.createElement(ee.U,null,o.createElement(te.B,null,o.createElement(Ze,{query:e,datasource:s,variableOptionGroup:r,onQueryChange:a,setError:i,selectableEntryTypes:[I.Resource],resources:u??[],queryType:"metrics",disableRow:g,renderAdvanced:(h,f)=>o.createElement(qs,{resources:h,onChange:f}),selectionNotice:b}),o.createElement(lr,{metricNamespaces:n,query:e,datasource:s,variableOptionGroup:r,onQueryChange:a,setError:i}),o.createElement(cr,{metricNames:l,query:e,datasource:s,variableOptionGroup:r,onQueryChange:a,setError:i}),o.createElement(or,{query:e,datasource:s,variableOptionGroup:r,onQueryChange:a,setError:i,aggregationOptions:c?.aggOptions??[],isLoading:c.isLoading}),o.createElement(ur,{query:e,datasource:s,variableOptionGroup:r,onQueryChange:a,setError:i,timeGrainOptions:c?.timeGrains??[]}))),o.createElement(ee.U,null,o.createElement(te.B,null,o.createElement(ir,{data:t,query:e,datasource:s,variableOptionGroup:r,onQueryChange:a,setError:i,dimensionOptions:c?.dimensions??[]}))),o.createElement(ee.U,null,o.createElement(te.B,null,o.createElement(mr,{query:e,datasource:s,variableOptionGroup:r,onQueryChange:a,setError:i}),o.createElement(nr,{query:e,datasource:s,variableOptionGroup:r,onQueryChange:a,setError:i})))))};var hr=v(6191),br=v(22354);const vr=({query:t,onQueryChange:e})=>{const s=[{value:m.AzureMonitor,label:"Metrics"},{value:m.LogAnalytics,label:"Logs"},{value:m.AzureTraces,label:"Traces"},{value:m.AzureResourceGraph,label:"Azure Resource Graph"}],r=(0,o.useCallback)(a=>{a.value&&a.value!==t.queryType&&e({refId:t.refId,datasource:t.datasource,queryType:a.value})},[e,t]);return o.createElement("span",{"data-testid":N.components.queryEditor.header.select},o.createElement(hr.X,null,o.createElement(br.W,{label:"Service",value:t.queryType,placeholder:"Service...",allowCustomValue:!0,options:s,onChange:r})))};var yr=v(84596),Lt=v(75505),wr=v(41987),kr=v(43127),Sr=v(88824),zr=v(9261);const We=(t,e,s,r)=>{t==="filters"?e[t]=s.map(a=>a.value):(e[t]=s.value,t==="property"&&(e.filters=[])),r(e)},Er=async(t,e,s,r,a,i,c)=>{const{azureTraces:n}=t;if(!n)return[];const{resources:l}=n;if(!l||!i)return[];const u=i.property;if(!u)return[];const d=`let ${u} = toscalar(union isfuzzy=true ${s.join(",")} | where $__timeFilter(timestamp) | summarize count=count() by ${u} | summarize make_list(pack_all())); print properties = bag_pack("${u}", ${u});`,g=await(0,Lt.s)(e.azureLogAnalyticsDatasource.query({requestId:"azure-traces-properties-req",interval:"",intervalMs:0,scopedVars:{},timezone:"",startTime:0,app:wr.Jk.Unknown,targets:[{...t,azureLogAnalytics:{resources:l,query:d},queryType:m.LogAnalytics}],range:c||(0,kr.E2)()}));if(g.data.length>0){const b=g.data[0];if(b.fields.length>0){const f=JSON.parse(b.fields[0].values.toArray()[0])[u].map(p=>{let y=p[u];return p[u]===""&&(y="<Empty>"),{label:y.toString(),value:p[u].toString(),count:p.count}});return r.set(u,f),a(r),f}}return[]};function Ar(t){function e(s,r,a){return o.createElement(Nr,{...t,item:s,onChange:r,onDelete:a})}return e}const Tr=t=>{const{data:e,innerProps:s,innerRef:r,isFocused:a,isSelected:i}=t,c=(0,Z.$j)(),n=(0,Sr.J)(c),l=u=>{t.selectOption({...e}),u.stopPropagation(),u.preventDefault()};return o.createElement("div",{ref:r,className:(0,S.cx)(n.option,a&&n.optionFocused,i&&n.optionSelected,e.isDisabled&&n.optionDisabled),...s,"aria-label":"Select option",title:e.title,onClick:l,onKeyDown:l,role:"checkbox","aria-checked":i,tabIndex:0},o.createElement("div",{className:n.optionBody},o.createElement(gt.S,{value:i,label:e.label?`${e.label} - (${e.count})`:""})))},Nr=t=>{const{query:e,datasource:s,propertyMap:r,setPropertyMap:a,queryTraceTypes:i,properties:c,item:n,onChange:l,onDelete:u,variableOptionGroup:d,range:g}=t,[b,h]=(0,o.useState)(!1),[f,p]=(0,o.useState)(R(r.get(n.property??"")??[],d)),[y,w]=(0,o.useState)(n.filters?n.filters.map(E=>({value:E,label:E===""?"<Empty>":E})):[]),k=async()=>{if(h(!0),n.property&&n.property!==""){const L=r.get(n.property??"");if(L)return p(R(L,d)),h(!1),Promise.resolve(L);{const V=await Er(e,s,i,r,a,n,g);return p(R(V,d)),h(!1),V}}const E=[];return Promise.resolve(E)};return o.createElement(Rt.Gy,{spacing:"none"},o.createElement(D.l6,{menuShouldPortal:!0,placeholder:"Property",value:n.property?{value:n.property,label:n.property}:null,options:R(c.map(E=>({label:E,value:E})),d),onChange:E=>We("property",n,E,l),width:25}),o.createElement(zr.f,{value:n.operation?{label:n.operation==="eq"?"=":"!=",value:n.operation}:void 0,options:[{label:"=",value:"eq"},{label:"!=",value:"ne"}],onChange:E=>We("operation",n,E,l),defaultValue:"eq"}),o.createElement(D.Iv,{blurInputOnSelect:!1,menuShouldPortal:!0,placeholder:"Value",value:y,loadOptions:k,isLoading:b,onOpenMenu:k,onChange:E=>{w(E),E.length===0&&We("filters",n,y,l)},width:35,defaultOptions:f,isClearable:!0,components:{Option:Tr},closeMenuOnSelect:!1,onCloseMenu:()=>We("filters",n,y,l),hideSelectedOptions:!1}),o.createElement(Oe.Z,{"aria-label":"Remove filter",icon:"times",variant:"secondary",onClick:u,type:"button"}))},Ea=null,Mr={availabilityResults:{label:"Availablity Results",description:"Availability test results."},dependencies:{label:"Dependencies",description:"Calls your application makes to other services such as databases or REST APIs."},customEvents:{label:"Custom Events",description:"Calls to TrackEvent that are inserted to monitor usage."},exceptions:{label:"Exceptions",description:"Exceptions that are logged via TrackException, or uncaught exceptions."},pageViews:{label:"Page Views",description:"Web client telemetry to create page view reports."},requests:{label:"Requests",description:"HTTP requests received by the application."},traces:{label:"Traces",description:"Diagnostic logs emitted using TrackTrace and similar methods. Note: Traces are not visualised if the result format is set to Trace"}},Aa={AppAvailabilityResults:"availabilityResults",AppDependencies:"dependencies",AppEvents:"events",AppExceptions:"exceptions",AppPageViews:"pageViews",AppRequests:"requests",AppTraces:"traces"},Rr=["operationId","duration","id","name","problemId","operation_ParentId","timestamp","customDimensions","operation_Name"],Ce={appId:"ResourceGUID",application_Version:"AppVersion",appName:"_ResourceId",client_Browser:"ClientBrowser",client_City:"ClientCity",client_CountryOrRegion:"ClientCountryOrRegion",client_IP:"ClientIP",client_Model:"ClientModel",client_OS:"ClientOS",client_StateOrProvince:"ClientStateOrProvince",client_Type:"ClientType",cloud_RoleInstance:"AppRoleInstance",cloud_RoleName:"AppRoleName",customDimensions:"Properties",customMeasurements:"Measurements",duration:"DurationMs",id:"Id",iKey:"IKey",itemCount:"ItemCount",itemId:"_ItemId",itemType:"Type",name:"Name",operation_Id:"OperationId",operation_Name:"OperationName",operation_ParentId:"OperationParentId",operation_SyntheticSource:"OperationSyntheticSource",performanceBucket:"PerformanceBucket",sdkVersion:"SDKVersion",session_Id:"SessionId",success:"Success",timestamp:"TimeGenerated",user_AccountId:"UserAccountId",user_AuthenticatedId:"UserAuthenticatedId",user_Id:"UserId"},Cr={...Ce,location:"Location",message:"Message",size:"Size"},Ir={...Ce,data:"Data",resultCode:"ResultCode",target:"Target",type:"DependencyType"},Dr=(0,z.omit)(Ce,["duration","id","success","performanceBucket"]),Lr=(0,z.omit)({...Ce,url:"Url"},["success"]),Fr={resultCode:"ResultCode",source:"Source",url:"Url"},Gr=(0,z.omit)({...Ce,assembly:"Assembly",details:"Details",handledAt:"HandledAt",innermostAssembly:"InnermostAssembly",innermostMessage:"InnermostMessage",innermostMethod:"InnermostMethod",innermostType:"InnermostType",message:"Message",method:"Method",outerAssembly:"OuterAssembly",outerMessage:"OuterMessage",outerMethod:"OuterMethod",outerType:"OuterType",problemId:"ProblemId",severityLevel:"SeverityLevel",type:"ExceptionType"},["duration","id","name","performanceBucket","success"]),Pr=(0,z.omit)({message:"Message",severityLevel:"SeverityLevel"},["duration","id","name","performanceBucket","success"]),tt={availabilityResults:Cr,dependencies:Ir,customEvents:Dr,exceptions:Gr,pageViews:Lr,requests:Fr,traces:Pr},Ta=Object.entries(tt).reduce((t,[e,s])=>({...t,[e]:Object.keys((0,z.omit)(s,Rr)).join(",")}),{});function Qr(t,e){return{...t,azureTraces:{...t.azureTraces,operationId:e}}}function xr(t,e){return{...t,azureTraces:{...t.azureTraces,resultFormat:e}}}function Ft(t,e){return{...t,azureTraces:{...t.azureTraces,traceTypes:e}}}function Vr(t,e){return{...t,azureTraces:{...t.azureTraces,filters:e}}}const $r=({query:t,datasource:e,onQueryChange:s,variableOptionGroup:r,range:a})=>{const{azureTraces:i}=t,c=i?.traceTypes?i.traceTypes:Object.keys(tt),n=new Set(["customDimensions","customMeasurements","details","duration","id","itemId","operation_Id","operation_ParentId","timestamp"]),l=(0,z.uniq)(c.map(p=>Object.keys(tt[p])).flat()).filter(p=>!n.has(p)),[u,d]=(0,o.useState)(new Map),g=(0,o.useMemo)(()=>t.azureTraces?.filters??[],[t.azureTraces?.filters]),[b,h]=(0,o.useState)(g);(0,o.useEffect)(()=>{d(new Map)},[t.azureTraces?.resources,t.azureTraces?.traceTypes,t.azureTraces?.operationId]);const f=p=>{let y=!1;const w=p.map(k=>(k.property!==""&&k.filters&&k.filters.length>0&&k.operation!==""?y=!0:y=!1,{property:k.property??"",filters:k.filters??[],operation:k.operation??"eq"}));h(w),(y||g.length>0&&w.length===0)&&s(Vr(t,w))};return o.createElement($.D,{label:"Filters"},o.createElement(Mt.o,{items:b,onChange:f,renderItem:Ar({query:t,datasource:e,propertyMap:u,setPropertyMap:d,queryTraceTypes:c,properties:l,variableOptionGroup:r,range:a})}))},Or=({query:t,variableOptionGroup:e,onQueryChange:s})=>{const r=Object.entries(Mr).map(([n,l])=>({label:l.label,description:l.description,value:n})),a=(0,o.useCallback)(n=>{const l=Ft(t,n.map(u=>u.value??""));s(l)},[s,t]),i=(0,o.useMemo)(()=>[...r,e],[r,e]),c=()=>{const n=r.map(u=>u.value),l=Ft(t,n);return s(l),n};return o.createElement(X,{label:"Event Type"},o.createElement(D.KF,{placeholder:"Choose event types",inputId:"azure-monitor-traces-type-field",value:T([...r,...e.options],t.azureTraces?.traceTypes??c()),onChange:a,options:i,allowCustomValue:!0,isClearable:!0,"aria-label":N.components.queryEditor.tracesQueryEditor.traceTypes.select}))},Ur=({query:t,datasource:e,subscriptionId:s,variableOptionGroup:r,onChange:a,setError:i,range:c})=>{const n=(h,f)=>{if(f.length===0)return!1;const p=j(h.uri,h.location).metricNamespace?.toLowerCase(),y=j(f[0].uri,f[0].location).metricNamespace?.toLowerCase();return p!==y},[l,u]=(0,o.useState)(t.azureTraces?.operationId??""),d=(0,yr.A)(t.azureTraces?.operationId);(0,o.useEffect)(()=>{t.azureTraces?.operationId&&d!==t.azureTraces.operationId&&u(t.azureTraces.operationId)},[u,d,t,l]);const g=(0,o.useCallback)(h=>{h.target instanceof HTMLInputElement&&u(h.target.value)},[]),b=(0,o.useCallback)(h=>{const f=Qr(t,l);a(f)},[a,l,t]);return o.createElement("span",{"data-testid":N.components.queryEditor.tracesQueryEditor.container.input},o.createElement(xe.D,null,o.createElement(ee.U,null,o.createElement(te.B,null,o.createElement(Ze,{query:t,datasource:e,subscriptionId:s,variableOptionGroup:r,onQueryChange:a,setError:i,selectableEntryTypes:[I.Subscription,I.ResourceGroup,I.Resource,I.Variable],resources:t.azureTraces?.resources??[],queryType:"traces",disableRow:n,renderAdvanced:(h,f)=>o.createElement(kt,{resources:h,onChange:f}),selectionNotice:()=>"You may only choose items of the same resource type.",range:c}))),o.createElement(ee.U,null,o.createElement(te.B,null,o.createElement(Or,{datasource:e,onQueryChange:a,query:t,setError:i,variableOptionGroup:r,range:c}),o.createElement(X,{label:"Operation ID"},o.createElement(x.p,{id:"azure-monitor-traces-operation-id-field",value:l,onChange:g,onBlur:b,width:40})))),o.createElement(ee.U,null,o.createElement(te.B,null,o.createElement($r,{datasource:e,onQueryChange:a,query:t,setError:i,variableOptionGroup:r,range:c}))),o.createElement(ee.U,null,o.createElement(te.B,null,o.createElement(dt,{datasource:e,setError:i,query:t,variableOptionGroup:r,onQueryChange:a,inputId:"azure-monitor-traces",options:[{label:"Table",value:K.Table},{label:"Trace",value:K.Trace}],defaultValue:K.Table,setFormatAs:xr,resultFormat:t.azureTraces?.resultFormat,range:c})))))};var Wr=v(32017),jr=v.n(Wr);const Xr="select";function st(t){let e=t;return e.queryType||(e={...e,queryType:m.AzureMonitor}),e=Hr(e),e.queryType===m.AzureMonitor&&e.azureMonitor&&(e=Br(e),e=Kr(e),e=Jr(e),e=Zr(e),e=Yr(e)),(e.azureMonitor?.resourceGroup||e.azureMonitor?.resourceName)&&(e=qr(e)),e.azureLogAnalytics?.resource&&(e={...e,azureLogAnalytics:{...e.azureLogAnalytics,resources:[e.azureLogAnalytics.resource]}},delete e.azureLogAnalytics?.resource),e.azureLogAnalytics&&e.azureLogAnalytics.dashboardTime===void 0&&(e.azureLogAnalytics.intersectTime?e={...e,azureLogAnalytics:{...e.azureLogAnalytics,dashboardTime:!0}}:e={...e,azureLogAnalytics:{...e.azureLogAnalytics,dashboardTime:!1}}),e}function Br(t){let e=t;if(e.azureMonitor?.timeGrainUnit&&e.azureMonitor.timeGrain!=="auto"){const s=U.createISO8601Duration(e.azureMonitor.timeGrain??"auto",e.azureMonitor.timeGrainUnit);e=Nt(e,s),delete e.azureMonitor?.timeGrainUnit}return e}function Hr(t){let e=t;return e.azureLogAnalytics?.query?.match(/\$__from\s/gi)&&(e=Ye(e,e.azureLogAnalytics.query.replace(/\$__from\s/gi,"$__timeFrom() "))),e.azureLogAnalytics?.query?.match(/\$__to\s/gi)&&(e=Ye(e,e.azureLogAnalytics.query.replace(/\$__to\s/gi,"$__timeTo() "))),e}function Kr(t){return!(t.azureMonitor?.metricNamespace&&t.azureMonitor.metricNamespace!==Xr)&&t.azureMonitor?.metricDefinition?{...t,azureMonitor:{...t.azureMonitor,metricNamespace:t.azureMonitor.metricDefinition,metricDefinition:void 0}}:t}function Jr(t){let e=t;const s=e.azureMonitor?.dimension;return s&&s!=="None"&&(e=tr(e,s,"eq",[e.azureMonitor?.dimensionFilter||""])),delete e.azureMonitor?.dimension,delete e.azureMonitor?.dimensionFilter,e}function Zr(t){const e=t.azureMonitor;if(!e)return t;const s=[],r=e.dimensionFilters;return r&&r.length>0&&(r.forEach(a=>{const i={dimension:a.dimension,operator:a.operator};if(!a.filters&&a.filter)s.push({...i,filters:[a.filter]});else{let c=!1;if(a.filters&&a.filter){for(const n of a.filters)if(a.filter===n){c=!0;break}!c&&a.filter!=="*"&&a.filters.push(a.filter),s.push({...i,filters:a.filters})}}}),s.length>0)?{...t,azureMonitor:{...e,dimensionFilters:s}}:t}function Yr(t){if(t.azureMonitor?.resourceUri&&!t.azureMonitor.resourceUri.startsWith("$")){const e=j(t.azureMonitor.resourceUri),s=e?.subscription&&e?.resourceGroup&&e?.resourceName;return{...t,subscription:e?.subscription,azureMonitor:{...t.azureMonitor,resources:[{resourceGroup:e?.resourceGroup,resourceName:e?.resourceName}],metricNamespace:e?.metricNamespace,resourceUri:s?void 0:t.azureMonitor.resourceUri}}}return t}function qr(t){let e=t;return e.azureMonitor?.resourceGroup&&e.azureMonitor?.resourceName&&(e={...e,azureMonitor:{...e.azureMonitor,resources:[{resourceGroup:e.azureMonitor.resourceGroup,resourceName:e.azureMonitor.resourceName}]}},delete e.azureMonitor?.resourceGroup,delete e.azureMonitor?.resourceName),e}const _r={queryType:m.AzureMonitor},eo=t=>{const e=(0,z.defaults)({},t,_r),s=st(e);return jr()(s,t)?t:s},to=(t,e)=>{const s=(0,o.useMemo)(()=>eo(t),[t]);return(0,o.useEffect)(()=>{s!==t&&e(s)},[s,t,e]),s},so=({query:t,datasource:e,onChange:s,onRunQuery:r,data:a,range:i})=>{const[c,n]=lt(),l=(0,o.useMemo)(()=>(0,z.debounce)(r,500),[r]),[u,d]=(0,o.useState)(!1),g=(0,o.useCallback)(p=>{s(p),l()},[s,l]),b=to(t,g),h=b.subscription||e.azureMonitorDatasource.defaultSubscriptionId,f={label:"Template Variables",options:e.getVariables().map(p=>({label:p,value:p}))};return o.createElement("div",{"data-testid":"azure-monitor-query-editor"},o.createElement(Hs,{datasource:e.azureLogAnalyticsDatasource,isOpen:u,onClose:()=>d(!1),onChange:p=>s({...p,queryType:m.LogAnalytics})}),o.createElement("div",{className:(0,S.css)({display:"flex",alignItems:"center"})},o.createElement(vr,{query:b,onQueryChange:g}),b.queryType===m.LogAnalytics&&o.createElement(_.$n,{"aria-label":"Azure logs kick start your query button",variant:"secondary",size:"sm",onClick:()=>{d(p=>!p),(0,Qe.rR)("grafana_azure_logs_query_patterns_opened",{version:"v2",editorMode:b.azureLogAnalytics})}},"Kick start your query")),o.createElement(ro,{data:a,subscriptionId:h,query:b,datasource:e,onChange:g,variableOptionGroup:f,setError:n,range:i}),c&&o.createElement(o.Fragment,null,o.createElement(J.$,{v:2}),o.createElement(H.F,{severity:"error",title:"An error occurred while requesting metadata from Azure Monitor"},c instanceof Error?c.message:c)))},ro=({data:t,subscriptionId:e,query:s,datasource:r,variableOptionGroup:a,onChange:i,setError:c,range:n})=>{switch(s.queryType){case m.AzureMonitor:return o.createElement(gr,{data:t,query:s,datasource:r,onChange:i,variableOptionGroup:a,setError:c});case m.LogAnalytics:return o.createElement(zt,{data:t,subscriptionId:e,query:s,datasource:r,onChange:i,variableOptionGroup:a,setError:c,timeRange:n});case m.AzureResourceGraph:return o.createElement(pt,{subscriptionId:e,query:s,datasource:r,onChange:i,variableOptionGroup:a,setError:c});case m.AzureTraces:return o.createElement(Ur,{subscriptionId:e,query:s,datasource:r,onChange:i,variableOptionGroup:a,setError:c,range:n});default:const l=s.queryType;return o.createElement(H.F,{title:"Unknown query type"},(l==="Application Insights"||l==="Insights Analytics")&&o.createElement(o.Fragment,null,l," was deprecated in Grafana 9. See the"," ",o.createElement("a",{href:"https://grafana.com/docs/grafana/latest/datasources/azuremonitor/deprecated-application-insights/",target:"_blank",rel:"noreferrer"},"deprecation notice")," ","to get more information about how to migrate your queries. This is the current query definition:",o.createElement(Xe.B,{height:"200px",readOnly:!0,language:"json",value:JSON.stringify(s,null,4)})))}},oo=so;var ao=v(45650),io=v(62467),no=v(81160),Gt=v(39070),Ie=v(26657);const co=/([\w\W]+):([\w]+)(?:\s?=\s?([\w\W]+))?/;function lo(t){return t.functions?t.functions.map(e=>{const s=e.parameters&&e.parameters.split(", ").map(r=>{const a=r.match(co);if(!a)return;const[,i,c,n]=a;return{name:i,type:c,defaultValue:n,cslDefaultValue:n}}).filter(r=>!!r);return{name:e.name,body:e.body,inputParameters:s||[]}}):[]}function uo(t,e,s){const r={name:e,tables:t.tables,functions:lo(t),majorVersion:0,minorVersion:0};r.functions.push({name:"$__timeFilter",body:"{ true }",inputParameters:[{name:"timeColumn",type:"System.String",defaultValue:'""',cslDefaultValue:'""'}]},{name:"$__timeFrom",body:"{ datetime(2018-06-05T18:09:58.907Z) }",inputParameters:[]},{name:"$__timeTo",body:"{ datetime(2018-06-05T20:09:58.907Z) }",inputParameters:[]},{name:"$__escapeMulti",body:"{ @'\\grafana-vmNetwork(eth0)Total', @'\\hello!'}",inputParameters:[{name:"$myVar",type:"System.String",defaultValue:"$myVar",cslDefaultValue:"$myVar"}]},{name:"$__contains",body:"{ colName in ('value1','value2') }",inputParameters:[{name:"colName",type:"System.String",defaultValue:"colName",cslDefaultValue:"colName"},{name:"$myVar",type:"System.String",defaultValue:"$myVar",cslDefaultValue:"$myVar"}]});const a=s.map(i=>({name:`$${i.name}`,type:"dynamic"}));return{clusterType:"Engine",cluster:{connectionString:e,databases:[r]},database:r,globalScalarParameters:a}}class mo extends Ie.iy{constructor(e,s=(0,re.w)()){super(e),this.instanceSettings=e,this.templateSrv=s,this.resourcePath=`${F.logAnalytics}`,this.azureMonitorPath=`${F.azureMonitor}/subscriptions`;const r=ct(e);this.azurePortalUrl=nt(r),this.defaultSubscriptionId=this.instanceSettings.jsonData.subscriptionId||""}isConfigured(){return!this.validateDatasource()}filterQuery(e){return e.hide!==!0&&(!!e.azureLogAnalytics?.query&&(!!e.azureLogAnalytics.resources?.length||!!e.azureLogAnalytics.workspace)||!!e.azureTraces?.resources?.length)}async getSubscriptions(){if(!this.isConfigured())return[];const e=`${this.azureMonitorPath}?api-version=2019-03-01`;return await this.getResource(e).then(s=>Q.parseSubscriptions(s))}async getWorkspaces(e){const s=await this.getWorkspaceList(e);return(0,z.map)(s.value,r=>({text:r.name,value:r.id}))||[]}getWorkspaceList(e){const s=this.templateSrv.replace(e||this.defaultSubscriptionId),r=this.azureMonitorPath+`/${s}/providers/Microsoft.OperationalInsights/workspaces?api-version=2017-04-26-preview`;return this.getResource(r)}async getMetadata(e){const s=`${this.resourcePath}/v1${e}/metadata`;return await this.getResource(s)}async getKustoSchema(e){const s=this.templateSrv.replace(e,{},me),r=await this.getMetadata(s);return uo(r,s,this.templateSrv.getVariables())}applyTemplateVariables(e,s){let r;if(e.queryType===m.LogAnalytics&&e.azureLogAnalytics){r=e.azureLogAnalytics;const a=this.expandResourcesForMultipleVariables(r.resources,s);let i=this.templateSrv.replace(r.workspace,s);!i&&!a&&this.firstWorkspace&&(i=this.firstWorkspace);const c=this.templateSrv.replace(r.query,s,me);return{...e,queryType:e.queryType||m.LogAnalytics,azureLogAnalytics:{resultFormat:r.resultFormat,query:c,resources:a,workspace:i,dashboardTime:r.dashboardTime,timeColumn:this.templateSrv.replace(r.timeColumn,s)}}}if(e.queryType===m.AzureTraces&&e.azureTraces){r=e.azureTraces;const a=this.expandResourcesForMultipleVariables(r.resources,s),i=this.templateSrv.replace(r.query,s,me),c=r.traceTypes?.map(l=>this.templateSrv.replace(l,s)),n=(r.filters??[]).filter(l=>!!l.property).map(l=>{const u=l.filters?.map(d=>this.templateSrv.replace(d??"",s));return{property:this.templateSrv.replace(l.property,s),operation:l.operation||"eq",filters:u||[]}});return{...e,queryType:e.queryType||m.AzureTraces,azureTraces:{resultFormat:r.resultFormat,query:i,resources:a,operationId:this.templateSrv.replace(e.azureTraces?.operationId,s),filters:n,traceTypes:c}}}return e}expandResourcesForMultipleVariables(e,s){if(!e)return;const r=[];return e.forEach(a=>{this.templateSrv.replace(a,s,"raw").split(",").forEach(n=>{r.push(n)})}),r}getDeprecatedDefaultWorkSpace(){return this.instanceSettings.jsonData.logAnalyticsDefaultWorkspace}async getDefaultOrFirstSubscription(){return this.defaultSubscriptionId?this.defaultSubscriptionId:(await this.getSubscriptions())[0]?.value}async getFirstWorkspace(){if(this.firstWorkspace)return this.firstWorkspace;const e=await this.getDefaultOrFirstSubscription();if(!e)return;const r=(await this.getWorkspaces(e))[0]?.value;return r&&(this.firstWorkspace=r),r}validateDatasource(){if(Pe(this.instanceSettings)==="clientsecret"){if(!this.isValidConfigField(this.instanceSettings.jsonData.tenantId))return{status:"error",message:"The Tenant Id field is required."};if(!this.isValidConfigField(this.instanceSettings.jsonData.clientId))return{status:"error",message:"The Client Id field is required."}}}isValidConfigField(e){return typeof e=="string"&&e.length>0}async getAzureLogAnalyticsCheatsheetQueries(){return await this.getResource(`${this.resourcePath}/v1/metadata`)}}const po="select";function ke(t){return!!(t&&t!==po)}class fo extends Ie.iy{constructor(e,s=(0,re.w)()){super(e),this.instanceSettings=e,this.templateSrv=s,this.apiVersion="2018-01-01",this.apiPreviewVersion="2017-12-01-preview",this.listByResourceGroupApiVersion="2021-04-01",this.providerApiVersion="2021-04-01",this.locationsApiVersion="2020-01-01",this.defaultSubscriptionId=e.jsonData.subscriptionId;const r=ct(e);this.resourcePath=F.azureMonitor,this.azurePortalUrl=nt(r)}isConfigured(){return!this.validateDatasource()}filterQuery(e){const s=e?.azureMonitor?.resources&&e.azureMonitor.resources.length>0&&e.azureMonitor.resources.every(a=>ke(a.resourceGroup)&&ke(a.resourceName))&&ke(e?.azureMonitor?.metricDefinition||e?.azureMonitor?.metricNamespace),r=ke(e.azureMonitor?.resourceUri);return!!(e.hide!==!0&&(s||r)&&ke(e?.azureMonitor?.metricName)&&ke(e?.azureMonitor?.aggregation))}applyTemplateVariables(e,s){const r=e.azureMonitor;if(!r)throw new Error("Query is not a valid Azure Monitor Metrics query");r.resourceUri&&(r.resourceUri=this.templateSrv.replace(r.resourceUri,s)),r.metricDefinition&&(r.metricDefinition=this.templateSrv.replace(r.metricDefinition,s)),r.timeGrain&&r.timeGrainUnit&&r.timeGrain!=="auto"&&(r.timeGrain=U.createISO8601Duration(r.timeGrain,r.timeGrainUnit));const a=st(e),i=a.azureMonitor;if(!i)throw new Error("Query is not a valid Azure Monitor Metrics query");const c=this.templateSrv.replace(a.subscription||this.defaultSubscriptionId,s),n=i.resources?.map(p=>this.replaceTemplateVariables(p,s)).flat(),l=this.templateSrv.replace(i.metricNamespace,s),u=this.templateSrv.replace(i.customNamespace,s),d=this.templateSrv.replace((i.timeGrain||"").toString(),s),g=this.templateSrv.replace(i.aggregation,s),b=this.templateSrv.replace(i.top||"",s),h=(i.dimensionFilters??[]).filter(p=>p.dimension&&p.dimension!=="None").map(p=>{const y=p.filters?.map(w=>this.templateSrv.replace(w??"",s));return{dimension:this.templateSrv.replace(p.dimension,s),operator:p.operator||"eq",filters:y||[]}}),f={...i,resources:n,metricNamespace:l,customNamespace:u,timeGrain:d,allowedTimeGrainsMs:i.allowedTimeGrainsMs,metricName:this.templateSrv.replace(i.metricName,s),region:this.templateSrv.replace(i.region,s),aggregation:g,dimensionFilters:h,top:b||"10",alias:i.alias};return{...e,subscription:c,queryType:m.AzureMonitor,azureMonitor:f}}async getSubscriptions(){return this.isConfigured()?this.getResource(`${this.resourcePath}/subscriptions?api-version=2019-03-01`).then(e=>Q.parseSubscriptions(e)):[]}getResourceGroups(e){return this.getResource(`${this.resourcePath}/subscriptions/${e}/resourceGroups?api-version=${this.listByResourceGroupApiVersion}`).then(s=>Q.parseResponseValues(s,"name","name"))}async getResourceNames(e,s){const r=this.replaceTemplateVariables(e).map(({metricNamespace:a,subscriptionId:i,resourceGroup:c,region:n})=>{const l=(0,z.startsWith)(a?.toLowerCase(),"microsoft.storage/storageaccounts/")?"microsoft.storage/storageaccounts":a;let u=`${this.resourcePath}/subscriptions/${i}`;c&&(u+=`/resourceGroups/${c}`),u+=`/resources?api-version=${this.listByResourceGroupApiVersion}`;const d=[];return l&&d.push(`resourceType eq '${l}'`),n&&d.push(`location eq '${n}'`),d.length>0&&(u+=`&$filter=${d.join(" and ")}`),s&&(u+=`&$skiptoken=${s}`),this.getResource(u).then(async g=>{let b=[];if((0,z.startsWith)(a?.toLowerCase(),"microsoft.storage/storageaccounts/")){b=Q.parseResourceNames(g,"microsoft.storage/storageaccounts");for(let h=0;h<b.length;h++)b[h].text+="/default",b[h].value+="/default"}else b=Q.parseResourceNames(g,a);if(g.nextLink){const f=new URL(g.nextLink).searchParams.get("$skiptoken");if(!f)throw Error("unable to request the next page of resources");const p=await this.getResourceNames({metricNamespace:a,subscriptionId:i,resourceGroup:c},f);b=b.concat(p)}return b})});return(await Promise.all(r)).flat()}getMetricNamespaces(e,s){const r=de.buildAzureMonitorGetMetricNamespacesUrl(this.resourcePath,this.apiPreviewVersion,this.replaceSingleTemplateVariables(e),s,this.templateSrv);return this.getResource(r).then(a=>Q.parseResponseValues(a,"properties.metricNamespaceName","properties.metricNamespaceName")).then(a=>{if(r.toLowerCase().includes("microsoft.storage/storageaccounts")){const i=["microsoft.storage/storageaccounts","microsoft.storage/storageaccounts/blobservices","microsoft.storage/storageaccounts/fileservices","microsoft.storage/storageaccounts/tableservices","microsoft.storage/storageaccounts/queueservices"];for(const c of i)(0,z.find)(a,["value",c.toLowerCase()])||a.push({value:c,text:c})}return a})}getMetricNames(e,s,r){const a=s?this.apiPreviewVersion:this.apiVersion,i=de.buildAzureMonitorGetMetricNamesUrl(this.resourcePath,a,this.replaceSingleTemplateVariables(e),this.templateSrv,s,r);return this.getResource(i).then(c=>Q.parseResponseValues(c,"name.localizedValue","name.value"))}getMetricMetadata(e,s,r){const{metricName:a}=e,i=s?this.apiPreviewVersion:this.apiVersion,c=de.buildAzureMonitorGetMetricNamesUrl(this.resourcePath,i,this.replaceSingleTemplateVariables(e),this.templateSrv,s,r);return this.getResource(c).then(n=>Q.parseMetadata(n,this.templateSrv.replace(a)))}validateDatasource(){if(Pe(this.instanceSettings)==="clientsecret"){if(!this.isValidConfigField(this.instanceSettings.jsonData.tenantId))return{status:"error",message:"The Tenant Id field is required."};if(!this.isValidConfigField(this.instanceSettings.jsonData.clientId))return{status:"error",message:"The Client Id field is required."}}}isValidConfigField(e){return typeof e=="string"&&e.length>0}replaceSingleTemplateVariables(e,s){return this.replaceTemplateVariables(e,s)[0]}replaceTemplateVariables(e,s){const r=[{...e}];return Object.keys(e).forEach(i=>{const c=this.templateSrv.replace(r[0][i],s,"raw");if(c.includes(",")){const n=c.split(","),l=[...r];n.forEach((u,d)=>{l.forEach(g=>{d===0?g[i]=u:r.push({...g,[i]:u})})})}else r.forEach(n=>{n[i]=c})}),r}async getProvider(e){return await this.getResource(`${F.azureMonitor}/providers/${e}?api-version=${this.providerApiVersion}`)}async getLocations(e){const s=new Map;for(const r of e){const a=Q.parseLocations(await this.getResource(`${F.azureMonitor}/subscriptions/${this.templateSrv.replace(r)}/locations?api-version=${this.locationsApiVersion}`));for(const i of a)s.set(i.name,i)}return s}}class go extends Ie.iy{filterQuery(e){return!!e.azureResourceGraph?.query&&!!e.subscriptions&&e.subscriptions.length>0}applyTemplateVariables(e,s){const r=(0,re.w)(),a=e.azureResourceGraph;if(!a)return e;const i=r.getVariables().map(d=>`$${d.name}`),c=ve().find(e.subscriptions,d=>ve().includes(i,d)),l=[...r.replace(c,s,d=>d).split(",").filter(d=>d.length>0),...ve().filter(e.subscriptions,d=>!ve().includes(i,d))],u=r.replace(a.query,s,me);return{...e,queryType:m.AzureResourceGraph,subscriptions:l,azureResourceGraph:{resultFormat:"table",query:u}}}}const ho="/providers/Microsoft.ResourceGraph/resources?api-version=2021-03-01",bo=Zs.map(t=>`"${t}"`).join(",");class vo extends Ie.iy{constructor(e,s){super(e),this.resultLimit=200,this.supportedMetricNamespaces="",this.search=async(r,a)=>{let i="resources";a==="logs"&&(i+=` | union resourcecontainers`),i+=` | where id contains "${r}" ${await this.filterByType(a)} | order by tolower(name) asc | limit ${this.resultLimit} `;const{data:c}=await this.makeResourceGraphRequest(i);return c.map(n=>{const l=Ve(n.id);if(!l||!(l.resourceName||l.resourceGroup||l.subscription))throw new Error("unable to fetch resource details");let u=l.subscription??"",d=I.Subscription;return l.resourceName?(u=l.resourceName,d=I.Resource):l.resourceGroup&&(u=l.resourceGroup,d=I.ResourceGroup),{name:n.name,id:u,uri:n.id,resourceGroupName:n.resourceGroup,type:d,typeLabel:_e[n.type]||n.type,location:n.location}})},this.filterByType=async r=>(this.supportedMetricNamespaces===""&&r!=="logs"&&await this.fetchAllNamespaces(),r==="logs"?`| where type in (${bo})`:`| where type in (${this.supportedMetricNamespaces})`),this.resourcePath=`${F.resourceGraph}`,this.azureMonitorDatasource=s}async fetchInitialRows(e,s){const r=await this.getSubscriptions();if(!s)return r;let a=r;const i=s.map(c=>async()=>{if(c.subscription){const n=`/subscriptions/${c.subscription}/resourceGroups/${c.resourceGroup}`;if(c.resourceGroup&&!we(a,n)){const u=await this.getResourceGroupsBySubscriptionId(c.subscription,e);a=Je(a,`/subscriptions/${c.subscription}`,u)}const l=$e(c);if(c.resourceName&&!we(a,l)){const u=await this.getResourcesForResourceGroup(n,e);a=Je(a,n,u)}}});for(const c of i)await c();return a}async fetchAndAppendNestedRow(e,s,r){const a=s.type===I.Subscription?await this.getResourceGroupsBySubscriptionId(s.id,r):await this.getResourcesForResourceGroup(s.uri,r);return Je(e,s.uri,a)}async getSubscriptions(){const e=` resources | join kind=inner ( ResourceContainers | where type == 'microsoft.resources/subscriptions' | project subscriptionName=name, subscriptionURI=id, subscriptionId ) on subscriptionId | summarize count() by subscriptionName, subscriptionURI, subscriptionId | order by subscriptionName desc `;let s=[],r=!1,a;for(;!r;){let i={};a&&(i={$skipToken:a});const c=await this.makeResourceGraphRequest(e,1,i);if(!c.data.length)throw new Error("No subscriptions were found");s=s.concat(c.data),a=c.$skipToken,r=!a}return s.map(i=>({name:i.subscriptionName,id:i.subscriptionId,uri:`/subscriptions/${i.subscriptionId}`,typeLabel:"Subscription",type:I.Subscription,children:[]}))}async getResourceGroupsBySubscriptionId(e,s){const r=` resources | join kind=inner ( ResourceContainers | where type == 'microsoft.resources/subscriptions/resourcegroups' | project resourceGroupURI=id, resourceGroupName=name, resourceGroup, subscriptionId ) on resourceGroup, subscriptionId ${await this.filterByType(s)} | where subscriptionId == '${e}' | summarize count() by resourceGroupName, resourceGroupURI | order by resourceGroupURI asc`;let a=[],i=!1,c;for(;!i;){let n={};c&&(n={$skipToken:c});const l=await this.makeResourceGraphRequest(r,1,n);a=a.concat(l.data),c=l.$skipToken,i=!c}return a.map(n=>{const l=Ve(n.resourceGroupURI);if(!l||!l.resourceGroup)throw new Error("unable to fetch resource groups");return{name:n.resourceGroupName,uri:n.resourceGroupURI,id:l.resourceGroup,type:I.ResourceGroup,typeLabel:"Resource Group",children:[]}})}async getResourcesForResourceGroup(e,s){const{data:r}=await this.makeResourceGraphRequest(` resources | where id hasprefix "${e}/" ${await this.filterByType(s)} `);return r.map(a=>{const i=Ve(a.id);if(!i||!i.resourceName)throw new Error("unable to fetch resource details");return{name:a.name,id:i.resourceName,uri:a.id,resourceGroupName:a.resourceGroup,type:I.Resource,typeLabel:_e[a.type]||a.type,locationDisplayName:a.location,location:a.location}})}async getResourceURIDisplayProperties(e){const{subscription:s,resourceGroup:r,resourceName:a}=j(e)??{};if(!s)throw new Error("Invalid resource URI passed");const i=`/subscriptions/${s}`,c=`${i}/resourceGroups/${r}`,n=` resourcecontainers | where type == "microsoft.resources/subscriptions" | where id =~ "${i}" | project subscriptionName=name, subscriptionId | join kind=leftouter ( resourcecontainers | where type == "microsoft.resources/subscriptions/resourcegroups" | where id =~ "${c}" | project resourceGroupName=name, resourceGroup, subscriptionId ) on subscriptionId | join kind=leftouter ( resources | where id =~ "${e}" | project resourceName=name, subscriptionId ) on subscriptionId | project subscriptionName, resourceGroupName, resourceName `,{data:l}=await this.makeResourceGraphRequest(n);if(!l.length)throw new Error("unable to fetch resource details");const{subscriptionName:u,resourceGroupName:d,resourceName:g}=l[0];return{subscription:u||s,resourceGroup:d||r,resourceName:g||a}}async getResourceURIFromWorkspace(e){const{data:s}=await this.makeResourceGraphRequest(` resources | where properties['customerId'] == "${e}" | project id `);if(!s.length)throw new Error("unable to find resource for workspace "+e);return s[0].id}async makeResourceGraphRequest(e,s=1,r){try{return await this.postResource(this.resourcePath+ho,{query:e,options:{resultFormat:"objectArray",...r}})}catch(a){if(s>0)return this.makeResourceGraphRequest(e,s-1);throw a}}async fetchAllNamespaces(){const e=await this.getSubscriptions();(0,Qe.rR)("grafana_ds_azuremonitor_subscriptions_loaded",{subscriptions:e.length});let s=[];for await(const r of e){const a=await this.azureMonitorDatasource.getMetricNamespaces({resourceUri:`/subscriptions/${r.id}`},!0);if(a){const i=a.map(c=>`"${c.value.toLocaleLowerCase()}"`);s=s.concat(i)}}if(s.length===0)throw new Error("Unable to resolve a list of valid metric namespaces. Validate the datasource configuration is correct and required permissions have been granted for all subscriptions. Grafana requires at least the Reader role to be assigned.");this.supportedMetricNamespaces=(0,z.uniq)(s.concat(Js.map(r=>`"${r}"`))).join(",")}parseRows(e){const s=fe(e),r=[];return s.forEach((a,i)=>{let c=a.resourceName,n=a.resourceName,l=I.Resource;c||(c=a.resourceGroup,n=a.resourceGroup,l=I.ResourceGroup,c||(c=a.subscription,n=a.subscription,l=I.Subscription)),r.push({id:c??"",name:n??"",type:l,uri:$e(a),typeLabel:_e[a.metricNamespace?.toLowerCase()??""]??a.metricNamespace??"",location:a.region})}),r}}function yo(t){const e=typeof t.rawQuery=="string"?t.rawQuery:null,s=typeof t.workspace=="string"?t.workspace:null;if(!(e&&s&&!t.target?.azureLogAnalytics?.query))return t;const r={...t.target??{},refId:t.target?.refId??"Anno",queryType:m.LogAnalytics,azureLogAnalytics:{query:e,resources:[s]}};return{...t,rawQuery:void 0,workspace:void 0,subscription:void 0,queryType:void 0,target:r}}var wo=v(65474),ko=v(29505),ce=v(14236);const Pt=t=>({subscriptions:t.match(/^Subscriptions\(\)/i),resourceGroups:t.match(/^ResourceGroups\(\)/i),resourceGroupsWithSub:t.match(/^ResourceGroups\(([^\)]+?)(,\s?([^,]+?))?\)/i),namespaces:t.match(/^Namespaces\(([^\)]+?)(,\s?([^,]+?))?\)/i),namespacesWithSub:t.match(/^Namespaces\(([^,]+?),\s?([^,]+?)\)/i),resourceNames:t.match(/^ResourceNames\(([^,]+?),\s?([^,]+?)\)/i),resourceNamesWithSub:t.match(/^ResourceNames\(([^,]+?),\s?([^,]+?),\s?(.+?)\)/i),metricNamespace:t.match(/^MetricNamespace\(([^,]+?),\s?([^,]+?),\s?([^,]+?)\)/i),metricNamespaceWithSub:t.match(/^metricnamespace\(([^,]+?),\s?([^,]+?),\s?([^,]+?),\s?([^,]+?)\)/i),metricNames:t.match(/^MetricNames\(([^,]+?),\s?([^,]+?),\s?([^,]+?),\s?([^,]+?)\)/i),metricNamesWithSub:t.match(/^MetricNames\(([^,]+?),\s?([^,]+?),\s?([^,]+?),\s?([^,]+?),\s?(.+?)\)/i),appInsightsMetricNameQuery:t.match(/^AppInsightsMetricNames\(\)/i),appInsightsGroupByQuery:t.match(/^AppInsightsGroupBys\(([^\)]+?)(,\s?([^,]+?))?\)/i),workspacesQuery:t.match(/^workspaces\(\)/i),workspacesQueryWithSub:t.match(/^workspaces\(["']?([^\)]+?)["']?\)/i)}),So=t=>{const e=Pt(t);return Object.keys(e).some(s=>!!e[s])},zo=(t,e)=>{const s=Pt(t),r=e.azureMonitorDatasource.defaultSubscriptionId,a=()=>s.appInsightsMetricNameQuery?{rawQuery:t,kind:"AppInsightsMetricNameQuery"}:s.appInsightsGroupByQuery?{kind:"AppInsightsGroupByQuery",rawQuery:t,metricName:s.appInsightsGroupByQuery[1]}:s.subscriptions?{kind:"SubscriptionsQuery",rawQuery:t}:s.resourceGroupsWithSub?{kind:"ResourceGroupsQuery",rawQuery:t,subscription:s.resourceGroupsWithSub[1]}:s.resourceGroups&&r?{kind:"ResourceGroupsQuery",rawQuery:t,subscription:r}:s.namespacesWithSub?{kind:"MetricNamespaceQuery",rawQuery:t,subscription:s.namespacesWithSub[1],resourceGroup:s.namespacesWithSub[2]}:s.namespaces&&r?{kind:"MetricNamespaceQuery",rawQuery:t,subscription:r,resourceGroup:s.namespaces[1]}:s.resourceNamesWithSub?{kind:"ResourceNamesQuery",rawQuery:t,subscription:s.resourceNamesWithSub[1],resourceGroup:s.resourceNamesWithSub[2],metricNamespace:s.resourceNamesWithSub[3]}:s.resourceNames&&r?{kind:"ResourceNamesQuery",rawQuery:t,subscription:r,resourceGroup:s.resourceNames[1],metricNamespace:s.resourceNames[2]}:s.metricNamespaceWithSub?{kind:"MetricNamespaceQuery",rawQuery:t,subscription:s.metricNamespaceWithSub[1],resourceGroup:s.metricNamespaceWithSub[2],metricNamespace:s.metricNamespaceWithSub[3],resourceName:s.metricNamespaceWithSub[4]}:s.metricNamespace&&r?{kind:"MetricNamespaceQuery",rawQuery:t,subscription:r,resourceGroup:s.metricNamespace[1],metricNamespace:s.metricNamespace[2],resourceName:s.metricNamespace[3]}:s.metricNames&&r&&s.metricNames[3].indexOf(",")===-1?{kind:"MetricNamesQuery",rawQuery:t,subscription:r,resourceGroup:s.metricNames[1],metricNamespace:s.metricNames[2],resourceName:s.metricNames[3]}:s.metricNamesWithSub?{kind:"MetricNamesQuery",rawQuery:t,subscription:s.metricNamesWithSub[1],resourceGroup:s.metricNamesWithSub[2],metricNamespace:s.metricNamesWithSub[3],resourceName:s.metricNamesWithSub[4]}:s.workspacesQueryWithSub?{kind:"WorkspacesQuery",rawQuery:t,subscription:(s.workspacesQueryWithSub[1]||"").trim()}:s.workspacesQuery&&r?{kind:"WorkspacesQuery",rawQuery:t,subscription:r}:{kind:"SubscriptionsQuery",rawQuery:t};return{refId:"A",queryType:m.GrafanaTemplateVariableFn,grafanaTemplateVariableFn:a(),subscription:r}},Eo=async(t,e)=>{const s=e.azureMonitorDatasource.defaultSubscriptionId;let r="";if(t){const a=e.azureLogAnalyticsDatasource.getDeprecatedDefaultWorkSpace();a?ht(a)?r=await e.resourcePickerData.getResourceURIFromWorkspace(a):r=a:r=await e.azureLogAnalyticsDatasource.getFirstWorkspace()||""}return{refId:"A",queryType:m.LogAnalytics,azureLogAnalytics:{query:t,resources:r?[r]:[]},subscription:s}},Ao=t=>{const{queryType:e,grafanaTemplateVariableFn:s}=t;if(e!==m.GrafanaTemplateVariableFn||!s)return t;const r={...t};switch("subscription"in s&&(r.subscription=s.subscription),"resourceGroup"in s&&(r.resourceGroup=s.resourceGroup),"metricNamespace"in s&&(r.namespace=s.metricNamespace),"resourceName"in s&&(r.resource=s.resourceName),s.kind){case"SubscriptionsQuery":r.queryType=m.SubscriptionsQuery;break;case"ResourceGroupsQuery":r.queryType=m.ResourceGroupsQuery;break;case"ResourceNamesQuery":r.queryType=m.ResourceNamesQuery;break;case"MetricNamespaceQuery":r.queryType=m.NamespacesQuery;break;case"MetricDefinitionsQuery":r.queryType=m.NamespacesQuery;break;case"MetricNamesQuery":r.queryType=m.MetricNamesQuery;break;case"WorkspacesQuery":r.queryType=m.WorkspacesQuery;break}return r},Qt=async(t,e)=>typeof t!="string"?t:So(t)?zo(t,e.datasource):Eo(t,e.datasource),xt=async(t,e)=>{let s=await Qt(t,e);return s.queryType===m.GrafanaTemplateVariableFn&&(s=Ao(s)),s},To=({query:t,updateQuery:e,datasource:s})=>{const[r,a]=(0,o.useState)("");(0,o.useEffect)(()=>{a(t.grafanaTemplateVariableFn?.rawQuery||"")},[t.grafanaTemplateVariableFn?.rawQuery]);const i=(0,o.useCallback)(n=>{Qt(n,{datasource:s}).then(l=>{l.queryType===m.GrafanaTemplateVariableFn?e(l):e({...t,grafanaTemplateVariableFn:{kind:"UnknownQuery",rawQuery:n}})})},[s,t,e]),c=n=>{a(n.target.value)};return o.createElement(oe.I,{label:"Grafana template variable function"},o.createElement(x.p,{placeholder:"type a grafana template variable function, ex: Subscriptions()",value:r,onChange:c,onBlur:()=>i(r)}))},Vt={label:"-",value:""},No=t=>{const{query:e,onChange:s,datasource:r}=t,a=[{label:"Subscriptions",value:m.SubscriptionsQuery},{label:"Resource Groups",value:m.ResourceGroupsQuery},{label:"Namespaces",value:m.NamespacesQuery},{label:"Regions",value:m.LocationsQuery},{label:"Resource Names",value:m.ResourceNamesQuery},{label:"Metric Names",value:m.MetricNamesQuery},{label:"Workspaces",value:m.WorkspacesQuery},{label:"Resource Graph",value:m.AzureResourceGraph},{label:"Logs",value:m.LogAnalytics}];typeof t.query=="object"&&t.query.queryType===m.GrafanaTemplateVariableFn&&a.push({label:"Grafana Query Function",value:m.GrafanaTemplateVariableFn});const[i,c]=(0,o.useState)({label:"Template Variables",options:[]}),[n,l]=(0,o.useState)(!1),[u,d]=(0,o.useState)(!1),[g,b]=(0,o.useState)(!1),[h,f]=(0,o.useState)(!1),[p,y]=(0,o.useState)(!1),[w,k]=(0,o.useState)(!1),[E,L]=(0,o.useState)(!1),[V,le]=(0,o.useState)([]),[se,De]=(0,o.useState)([]),[Le,je]=(0,o.useState)([]),[rt,ot]=(0,o.useState)([]),[A,P]=(0,o.useState)([]),[O,Se]=lt(),ge=typeof e=="string"?"":e.queryType;(0,o.useEffect)(()=>{xt(e,{datasource:r}).then(M=>{(0,z.isEqual)(e,M)||s(M)})},[e,r,s]),(0,o.useEffect)(()=>{switch(l(!1),d(!1),b(!1),y(!1),k(!1),L(!1),ge){case m.ResourceGroupsQuery:case m.WorkspacesQuery:l(!0);break;case m.NamespacesQuery:l(!0),d(!0);break;case m.ResourceNamesQuery:l(!0),d(!0),b(!0),f(!0);break;case m.MetricNamesQuery:l(!0),y(!0),k(!0),L(!0);break;case m.LocationsQuery:l(!0);break}},[ge]),(0,o.useEffect)(()=>{const M=[];r.getVariablesRaw().forEach(G=>{(0,z.get)(G,"query.queryType")!==ge&&M.push({label:G.label||G.name,value:`$${G.name}`})}),c({label:"Template Variables",options:M})},[r,ge]),(0,pe.A)(()=>{r.getSubscriptions().then(M=>{le(M.map(G=>({label:G.text,value:G.value})))})});const B=typeof e=="object"&&e.subscription;(0,o.useEffect)(()=>{B&&r.getResourceGroups(B).then(M=>{De(M.map(G=>({label:G.text,value:G.value})))})},[r,B]);const Fe=typeof e=="object"&&e.resourceGroup||"";(0,o.useEffect)(()=>{B&&r.getMetricNamespaces(B,Fe).then(M=>{je(M.map(G=>({label:G.text,value:G.value})))})},[r,B,Fe]),(0,o.useEffect)(()=>{B&&r.azureMonitorDatasource.getLocations([B]).then(M=>{const G=[];M.forEach(Ut=>G.push({label:Ut.displayName,value:Ut.name})),P(G)})},[r,B,Fe]);const $t=typeof e=="object"&&e.namespace||"";if((0,o.useEffect)(()=>{B&&r.getResourceNames(B,Fe,$t).then(M=>{ot(M.map(G=>({label:G.text,value:G.value})))})},[r,B,Fe,$t]),typeof e=="string")return null;const Fo=M=>{M.value&&s({...e,queryType:M.value,subscription:void 0,resourceGroup:void 0,namespace:void 0,resource:void 0})},Go=M=>{M.value&&s({...e,subscription:M.value,resourceGroup:void 0,namespace:void 0,resource:void 0})},Po=M=>{s({...e,resourceGroup:M.value,namespace:void 0,resource:void 0})},Qo=M=>{s({...e,namespace:M.value,resource:void 0})},xo=M=>{s({...e,region:M.value})},Vo=M=>{s({...e,resource:M.value})},Ot=M=>{s(M)};return o.createElement(o.Fragment,null,o.createElement($.D,{label:"Query Type","data-testid":N.components.variableEditor.queryType.input},o.createElement(D.l6,{"aria-label":"select query type",onChange:Fo,options:a,width:25,value:ge})),e.queryType===m.LogAnalytics&&o.createElement(o.Fragment,null,o.createElement(zt,{subscriptionId:e.subscription,query:e,datasource:r,onChange:Ot,variableOptionGroup:i,setError:Se,hideFormatAs:!0}),O&&o.createElement(o.Fragment,null,o.createElement(J.$,{v:2}),o.createElement(H.F,{severity:"error",title:"An error occurred while requesting metadata from Azure Monitor"},O instanceof Error?O.message:O))),e.queryType===m.GrafanaTemplateVariableFn&&o.createElement(To,{query:e,updateQuery:t.onChange,datasource:r}),n&&o.createElement($.D,{label:"Subscription","data-testid":N.components.variableEditor.subscription.input},o.createElement(D.l6,{"aria-label":"select subscription",onChange:Go,options:V.concat(i),width:25,value:e.subscription||null})),(p||u)&&o.createElement($.D,{label:"Resource Group","data-testid":N.components.variableEditor.resourceGroup.input},o.createElement(D.l6,{"aria-label":"select resource group",onChange:Po,options:p?se.concat(i):se.concat(i,Vt),width:25,value:e.resourceGroup||null,placeholder:p?void 0:"Optional"})),(w||g)&&o.createElement($.D,{label:"Namespace","data-testid":N.components.variableEditor.namespace.input},o.createElement(D.l6,{"aria-label":"select namespace",onChange:Qo,options:w?Le.concat(i):Le.concat(i,Vt),width:25,value:e.namespace||null,placeholder:w?void 0:"Optional"})),h&&o.createElement($.D,{label:"Region","data-testid":N.components.variableEditor.region.input},o.createElement(D.l6,{"aria-label":"select region",onChange:xo,options:A.concat(i),width:25,value:e.region||null,placeholder:"Optional"})),E&&o.createElement($.D,{label:"Resource","data-testid":N.components.variableEditor.resource.input},o.createElement(D.l6,{"aria-label":"select resource",onChange:Vo,options:rt.concat(i),width:25,value:e.resource||null})),e.queryType===m.AzureResourceGraph&&o.createElement(o.Fragment,null,o.createElement(pt,{subscriptionId:r.azureLogAnalyticsDatasource.defaultSubscriptionId,query:e,datasource:r,onChange:Ot,variableOptionGroup:i,setError:Se}),O&&o.createElement(o.Fragment,null,o.createElement(J.$,{v:2}),o.createElement(H.F,{severity:"error",title:"An error occurred while requesting metadata from Azure Monitor"},O instanceof Error?O.message:O))))};class Mo extends ko.f5{constructor(e,s=(0,re.w)()){super(),this.datasource=e,this.templateSrv=s,this.editor=No,this.datasource=e}hasValue(...e){return e.every(s=>!!this.templateSrv.replace(s))}query(e){const s=async()=>{const r=await xt(e.targets[0],{datasource:this.datasource});try{switch(r.queryType){case m.SubscriptionsQuery:const a=await this.datasource.getSubscriptions();return{data:a?.length?[(0,ce.Vc)(a)]:[]};case m.ResourceGroupsQuery:if(r.subscription&&this.hasValue(r.subscription)){const c=await this.datasource.getResourceGroups(r.subscription);return{data:c?.length?[(0,ce.Vc)(c)]:[]}}return{data:[]};case m.NamespacesQuery:if(r.subscription&&this.hasValue(r.subscription)){const c=await this.datasource.getMetricNamespaces(r.subscription,r.resourceGroup);return{data:c?.length?[(0,ce.Vc)(c)]:[]}}return{data:[]};case m.ResourceNamesQuery:if(r.subscription&&this.hasValue(r.subscription)){const c=await this.datasource.getResourceNames(r.subscription,r.resourceGroup,r.namespace,r.region);return{data:c?.length?[(0,ce.Vc)(c)]:[]}}return{data:[]};case m.MetricNamesQuery:if(r.subscription&&r.resourceGroup&&r.namespace&&r.resource&&this.hasValue(r.subscription,r.resourceGroup,r.namespace,r.resource)){const c=await this.datasource.getMetricNames(r.subscription,r.resourceGroup,r.namespace,r.resource);return{data:c?.length?[(0,ce.Vc)(c)]:[]}}return{data:[]};case m.WorkspacesQuery:if(r.subscription&&this.hasValue(r.subscription)){const c=await this.datasource.getAzureLogAnalyticsWorkspaces(r.subscription);return{data:c?.length?[(0,ce.Vc)(c)]:[]}}return{data:[]};case m.GrafanaTemplateVariableFn:if(r.grafanaTemplateVariableFn){const c=await this.callGrafanaTemplateVariableFn(r.grafanaTemplateVariableFn);return{data:c?.length?[(0,ce.Vc)(c)]:[]}}return{data:[]};case m.LocationsQuery:if(r.subscription&&this.hasValue(r.subscription)){const c=await this.datasource.azureMonitorDatasource.getLocations([r.subscription]),n=[];return c.forEach(l=>{n.push({text:l.displayName,value:l.name})}),{data:n?.length?[(0,ce.Vc)(n)]:[]}}default:e.targets[0]=r;const i=await(0,Lt.s)(this.datasource.query(e));return{data:i.data,error:i.error?new Error(ye(i.error)):void 0}}}catch(a){return{data:[],error:new Error(ye(a))}}};return(0,wo.H)(s())}callGrafanaTemplateVariableFn(e){return e.kind==="SubscriptionsQuery"?this.datasource.getSubscriptions():e.kind==="ResourceGroupsQuery"?this.datasource.getResourceGroups(this.replaceVariable(e.subscription)):e.kind==="ResourceNamesQuery"?this.datasource.getResourceNames(this.replaceVariable(e.subscription),this.replaceVariable(e.resourceGroup),this.replaceVariable(e.metricNamespace)):e.kind==="MetricNamespaceQuery"?this.datasource.azureMonitorDatasource.getMetricNamespaces(e,!0):e.kind==="MetricNamesQuery"?this.datasource.azureMonitorDatasource.getMetricNames(e):e.kind==="WorkspacesQuery"?this.datasource.azureLogAnalyticsDatasource.getWorkspaces(this.replaceVariable(e.subscription)):null}replaceVariable(e){return this.templateSrv.replace((e||"").trim())}}class Ro extends Ie.iy{constructor(e,s=(0,re.w)()){super(e),this.templateSrv=s,this.annotations={prepareAnnotation:yo},this.pseudoDatasource={},this.azureMonitorDatasource=new fo(e),this.azureLogAnalyticsDatasource=new mo(e),this.azureResourceGraphDatasource=new go(e),this.resourcePickerData=new vo(e,this.azureMonitorDatasource),this.pseudoDatasource={[m.AzureMonitor]:this.azureMonitorDatasource,[m.LogAnalytics]:this.azureLogAnalyticsDatasource,[m.AzureResourceGraph]:this.azureResourceGraphDatasource},this.variables=new Mo(this)}filterQuery(e){return e.queryType?this.pseudoDatasource[e.queryType]?.filterQuery?.(e)??!0:!1}query(e){const s=new Map;for(const a of e.targets){const i=st(a);if(!i.queryType||i.hide||!Co(i))continue;if(!s.has(i.queryType)){const n=(0,z.cloneDeep)(e);n.requestId=`${n.requestId}-${i.refId}`,n.targets=[],s.set(i.queryType,n)}s.get(i.queryType)?.targets.push(i)}const r=Array.from(s.entries()).map(([a,i])=>{const c=a===m.AzureTraces?m.LogAnalytics:a,n=this.pseudoDatasource[c];if(!n)throw new Error("Data source not created for query type "+a);return n.query(i)});return r.length===1?r[0]:r.length>1?(0,ao.p)(r).pipe((0,no.T)(a=>{const i=[];for(const c of a)for(const n of c.data)i.push(n);return{state:Gt.Gu.Done,data:i}})):(0,io.of)({state:Gt.Gu.Done,data:[]})}targetContainsTemplate(e){if(e.subscription&&this.templateSrv.containsTemplate(e.subscription))return!0;let s;return e.queryType===m.AzureMonitor?s=JSON.stringify(e.azureMonitor):e.queryType===m.LogAnalytics?s=JSON.stringify(e.azureLogAnalytics):e.queryType===m.AzureResourceGraph&&(s=JSON.stringify([e.azureResourceGraph,e.subscriptions])),!!s&&this.templateSrv.containsTemplate(s)}getResourceGroups(e){return this.azureMonitorDatasource.getResourceGroups(this.templateSrv.replace(e))}getMetricNamespaces(e,s){let r=`/subscriptions/${e}`;return s&&(r+=`/resourceGroups/${s};`),this.azureMonitorDatasource.getMetricNamespaces({resourceUri:r},!0)}getResourceNames(e,s,r,a){return this.azureMonitorDatasource.getResourceNames({subscriptionId:e,resourceGroup:s,metricNamespace:r,region:a})}getMetricNames(e,s,r,a){return this.azureMonitorDatasource.getMetricNames({subscription:e,resourceGroup:s,metricNamespace:r,resourceName:a})}getAzureLogAnalyticsWorkspaces(e){return this.azureLogAnalyticsDatasource.getWorkspaces(e)}getSubscriptions(){return this.azureMonitorDatasource.getSubscriptions()}interpolateVariablesInQueries(e,s){return e.map(a=>{if(!a.queryType)return a;const i=a.queryType===m.AzureTraces?m.LogAnalytics:a.queryType,c=this.pseudoDatasource[i];return{datasource:c?.getRef(),...c?.applyTemplateVariables(a,s)??a}})}getVariables(){return this.templateSrv.getVariables().map(e=>`$${e.name}`)}getVariablesRaw(){return this.templateSrv.getVariables()}modifyQuery(e,s){if(!s.options)return e;let r=e.azureLogAnalytics?.query;if(r===void 0)return e;switch(s.type){case"ADD_FILTER":{r+=` | where ${s.options.key} == "${s.options.value}"`;break}case"ADD_FILTER_OUT":{r+=` | where ${s.options.key} != "${s.options.value}"`;break}}return{...e,azureLogAnalytics:{...e.azureLogAnalytics,query:r}}}}function Co(t){switch(t.queryType){case m.AzureMonitor:return!!t.azureMonitor;case m.LogAnalytics:return!!t.azureLogAnalytics;case m.AzureResourceGraph:return!!t.azureResourceGraph;case m.AzureTraces:return!!t.azureTraces;case m.GrafanaTemplateVariableFn:return!!t.grafanaTemplateVariableFn;default:return!1}}var Io=v(83572);const Do=t=>{(0,Qe.rR)("grafana_ds_azuremonitor_dashboard_loaded",t)},Lo=new Y.tD(Ro).setConfigEditor(qt).setQueryEditor(oo);(0,ue.J7)().subscribe(q.gc,({payload:{dashboardId:t,orgId:e,userId:s,grafanaVersion:r,queries:a}})=>{const i=a[Io.id],c={hidden:0,visible:0,multiResource:0,count:0};let n={[m.AzureMonitor]:{...c},[m.LogAnalytics]:{...c,grafanaTime:0,queryTime:0},[m.AzureResourceGraph]:{...c},[m.AzureTraces]:{...c,table:0,trace:0,operationIdSpecified:0,eventTypesSpecified:0,filtersSpecified:0},[m.SubscriptionsQuery]:{...c},[m.ResourceGroupsQuery]:{...c},[m.NamespacesQuery]:{...c},[m.ResourceNamesQuery]:{...c},[m.MetricNamesQuery]:{...c},[m.WorkspacesQuery]:{...c},[m.GrafanaTemplateVariableFn]:{...c},[m.LocationsQuery]:{...c},unknown:{...c}};i.forEach(l=>{switch(l.queryType===m.AzureMonitor&&(n[m.AzureMonitor][l.hide?"hidden":"visible"]++,l.azureMonitor?.resources&&l.azureMonitor.resources.length>1&&n[m.AzureMonitor].multiResource++),l.queryType===m.LogAnalytics&&(n[m.LogAnalytics][l.hide?"hidden":"visible"]++,n[m.LogAnalytics][l.azureLogAnalytics?.dashboardTime?"grafanaTime":"queryTime"]++,l.azureLogAnalytics?.resources&&l.azureLogAnalytics.resources.length>1&&n[m.LogAnalytics].multiResource++),l.queryType===m.AzureResourceGraph&&(n[m.AzureResourceGraph][l.hide?"hidden":"visible"]++,l.subscriptions&&l.subscriptions.length>1&&n[m.AzureResourceGraph].multiResource++),l.queryType===m.AzureTraces&&(n[m.AzureTraces][l.hide?"hidden":"visible"]++,l.azureTraces&&(l.azureTraces.resultFormat&&n[m.AzureTraces][l.azureTraces.resultFormat===K.Trace?K.Trace:K.Table]++,l.azureTraces.resources&&l.azureTraces.resources.length>1&&n[m.AzureTraces].multiResource++,l.azureTraces.operationId&&l.azureTraces.operationId!==""&&n[m.AzureTraces].operationIdSpecified++,l.azureTraces.traceTypes&&l.azureTraces.traceTypes.length>0&&n[m.AzureTraces].eventTypesSpecified++,l.azureTraces.filters&&l.azureTraces.filters.length>0&&n[m.AzureTraces].filtersSpecified++)),l.queryType){case m.AzureMonitor:case m.LogAnalytics:case m.AzureResourceGraph:case m.AzureTraces:case m.SubscriptionsQuery:case m.ResourceGroupsQuery:case m.NamespacesQuery:case m.ResourceNamesQuery:case m.MetricNamesQuery:case m.WorkspacesQuery:case m.GrafanaTemplateVariableFn:case m.LocationsQuery:n[l.queryType].count++;break;default:n.unknown.count++}}),i&&i.length>0&&Do({grafana_version:r,dashboard_id:t,org_id:e,azure_monitor_queries:n[m.AzureMonitor].visible,azure_monitor_queries_hidden:n[m.AzureMonitor].hidden,azure_monitor_multiple_resource:n[m.AzureMonitor].multiResource,azure_monitor_query:n[m.AzureMonitor].count,azure_log_analytics_queries:n[m.LogAnalytics].visible,azure_log_analytics_queries_hidden:n[m.LogAnalytics].hidden,azure_log_multiple_resource:n[m.LogAnalytics].multiResource,azure_log_analytics_queries_grafana_time:n[m.LogAnalytics].grafanaTime,azure_log_analytics_queries_query_time:n[m.LogAnalytics].queryTime,azure_log_query:n[m.LogAnalytics].count,azure_resource_graph_queries:n[m.AzureResourceGraph].visible,azure_resource_graph_queries_hidden:n[m.AzureResourceGraph].hidden,azure_resource_graph_multiple_subscription:n[m.AzureResourceGraph].multiResource,azure_resource_graph_query:n[m.AzureResourceGraph].count,azure_traces_queries:n[m.AzureTraces].visible,azure_traces_queries_hidden:n[m.AzureTraces].hidden,azure_traces_multiple_resource:n[m.AzureTraces].multiResource,azure_traces_table:n[m.AzureTraces].table,azure_traces_trace:n[m.AzureTraces].trace,azure_traces_operation_id_specified:n[m.AzureTraces].operationIdSpecified,azure_traces_event_type_specified:n[m.AzureTraces].eventTypesSpecified,azure_traces_filters:n[m.AzureTraces].filtersSpecified,azure_traces_query:n[m.AzureTraces].count,azure_subscriptions_query:n[m.SubscriptionsQuery].count,azure_resource_groups_query:n[m.ResourceGroupsQuery].count,azure_namespaces_query:n[m.NamespacesQuery].count,azure_resource_names_query:n[m.ResourceNamesQuery].count,azure_metric_names_query:n[m.MetricNamesQuery].count,azure_workspaces_query:n[m.WorkspacesQuery].count,azure_grafana_template_variable_query:n[m.GrafanaTemplateVariableFn].count,azure_locations_query:n[m.LocationsQuery].count,azure_unknown_query:n.unknown.count})})},34169:()=>{}}]); //# sourceMappingURL=6934.fa19d392db34411fb300.js.map
Submit
FILE
FOLDER
INFO
Name
Size
Permission
Action
static
---
0755
0.c88fc16b6533c8976681.js
11857 bytes
0644
0.c88fc16b6533c8976681.js.map
46011 bytes
0644
1118.6d1cbbd2070e00a7483d.js
9459 bytes
0644
1118.6d1cbbd2070e00a7483d.js.map
22012 bytes
0644
1121.6c31bf81768d3312b0d4.js
11557 bytes
0644
1121.6c31bf81768d3312b0d4.js.map
40274 bytes
0644
1122.1b3b5a9bdf4a2fc70a83.js
4310 bytes
0644
1122.1b3b5a9bdf4a2fc70a83.js.map
9301 bytes
0644
1133.cd705902767ed2e9bf55.js
107191 bytes
0644
1133.cd705902767ed2e9bf55.js.map
459177 bytes
0644
1216.ddb58ad09e0c4e3f4079.js
12860 bytes
0644
1216.ddb58ad09e0c4e3f4079.js.map
47906 bytes
0644
1282.2347f27d5b3a18a42a1e.js
2965 bytes
0644
1282.2347f27d5b3a18a42a1e.js.map
6699 bytes
0644
1345.8570fef914aafab94513.js
2223 bytes
0644
1345.8570fef914aafab94513.js.map
5201 bytes
0644
1347.8ad23b870a6e21306189.js
32035 bytes
0644
1347.8ad23b870a6e21306189.js.map
89851 bytes
0644
1420.f2553cafc235b7c32261.js
14576 bytes
0644
1420.f2553cafc235b7c32261.js.map
32839 bytes
0644
1438.897db349b7f48a15b9eb.js
2830 bytes
0644
1438.897db349b7f48a15b9eb.js.map
6911 bytes
0644
1446.babd36e7134aac1046c4.js
1832 bytes
0644
1446.babd36e7134aac1046c4.js.map
3282 bytes
0644
1488.ff35935a06f41b02b6cc.js
316 bytes
0644
1488.ff35935a06f41b02b6cc.js.map
1206 bytes
0644
1560.30962127c91e5eae9982.js
8916 bytes
0644
1560.30962127c91e5eae9982.js.map
20515 bytes
0644
1660.e1f66118fb028d12074f.js
21866 bytes
0644
1660.e1f66118fb028d12074f.js.map
71039 bytes
0644
1698.68ff1ef08e94a87836b3.js
12570 bytes
0644
1698.68ff1ef08e94a87836b3.js.map
46006 bytes
0644
1708.f42a783c0f6c7a317d49.js
2249 bytes
0644
1708.f42a783c0f6c7a317d49.js.map
2954 bytes
0644
1710.d96221051fceaf8c89dd.js
10172 bytes
0644
1710.d96221051fceaf8c89dd.js.map
22097 bytes
0644
1740.e57d920c47a11759ade4.js
6204 bytes
0644
1740.e57d920c47a11759ade4.js.map
13740 bytes
0644
1888.0ede69d3190c536744b9.js
6822 bytes
0644
1888.0ede69d3190c536744b9.js.map
15421 bytes
0644
1914.58113477b565d57e8bfe.js
10710 bytes
0644
1914.58113477b565d57e8bfe.js.map
23555 bytes
0644
198.b84c0e4f5759344ae05a.js
8267 bytes
0644
198.b84c0e4f5759344ae05a.js.map
19446 bytes
0644
205.6c51b5e35c8147226738.js
3542 bytes
0644
205.6c51b5e35c8147226738.js.map
8376 bytes
0644
2058.0e5df44647184aaf02e2.js
1252 bytes
0644
2058.0e5df44647184aaf02e2.js.map
4744 bytes
0644
2077.12b2df3682085a92a810.js
34133 bytes
0644
2077.12b2df3682085a92a810.js.map
122011 bytes
0644
2094.259625d8acf28b9c7361.js
16518 bytes
0644
2094.259625d8acf28b9c7361.js.map
41269 bytes
0644
21.afca69f2d336e287a655.js
6172 bytes
0644
21.afca69f2d336e287a655.js.map
17305 bytes
0644
2136.9c8dcd43d3af327f51f5.js
498667 bytes
0644
2136.9c8dcd43d3af327f51f5.js.map
1908011 bytes
0644
2228.cf629cf4a83c5b6c2671.js
269 bytes
0644
2228.cf629cf4a83c5b6c2671.js.map
457 bytes
0644
2244.9324c28eca7d2ffb7568.js
3396 bytes
0644
2244.9324c28eca7d2ffb7568.js.map
7683 bytes
0644
2261.ac6a26854d5acee00776.js
106373 bytes
0644
2261.ac6a26854d5acee00776.js.map
478562 bytes
0644
2278.bdd73b14b6337c6b14e4.js
5754 bytes
0644
2278.bdd73b14b6337c6b14e4.js.map
13399 bytes
0644
2398.3de0e7aa3057b7dcf9da.js
8016 bytes
0644
2398.3de0e7aa3057b7dcf9da.js.map
18383 bytes
0644
2514.c86950e9813e27962050.js
1983 bytes
0644
2514.c86950e9813e27962050.js.map
4863 bytes
0644
2571.345ecfd2b82551018f2e.js
162139 bytes
0644
2571.345ecfd2b82551018f2e.js.map
2046 bytes
0644
2586.972e9a7d564398afee76.js
6385 bytes
0644
2586.972e9a7d564398afee76.js.map
14676 bytes
0644
2658.f4100815829c4d37d35c.js
5432 bytes
0644
2658.f4100815829c4d37d35c.js.map
13650 bytes
0644
2686.2fbaa7db9c01d59cad8d.js
2815 bytes
0644
2686.2fbaa7db9c01d59cad8d.js.map
6564 bytes
0644
2692.20098ad0182743d98d62.js
2282 bytes
0644
2692.20098ad0182743d98d62.js.map
5680 bytes
0644
2694.a31d749361a36eb167da.js
2726 bytes
0644
2694.a31d749361a36eb167da.js.map
3618 bytes
0644
2745.2e5ec1fdf377d2940fb4.js
33584 bytes
0644
2745.2e5ec1fdf377d2940fb4.js.map
120277 bytes
0644
2962.4c3147d8ee365fe296ef.js
7640 bytes
0644
2962.4c3147d8ee365fe296ef.js.map
17621 bytes
0644
3042.248a4194805a8500fd28.js
19010 bytes
0644
3042.248a4194805a8500fd28.js.map
38148 bytes
0644
3062.4e9a427c2a59d53f902e.js
4663 bytes
0644
3062.4e9a427c2a59d53f902e.js.map
10650 bytes
0644
3082.c09cff56c35d736ee8b6.js
52872 bytes
0644
3082.c09cff56c35d736ee8b6.js.map
56822 bytes
0644
3096.8d41728a4f5010bc56a2.js
4378 bytes
0644
3096.8d41728a4f5010bc56a2.js.map
10739 bytes
0644
3098.f22ad6dab13d06477be0.js
31462 bytes
0644
3098.f22ad6dab13d06477be0.js.map
85588 bytes
0644
3182.1d531f28507c00e391fc.js
13817 bytes
0644
3182.1d531f28507c00e391fc.js.map
26653 bytes
0644
3407.666eb88a718e66b93f72.js
34425 bytes
0644
3407.666eb88a718e66b93f72.js.map
103716 bytes
0644
3418.d31d882b87bd5a2ef66f.js
33061 bytes
0644
3418.d31d882b87bd5a2ef66f.js.map
114234 bytes
0644
3541.8d063e3d43d55745d89b.js
20582 bytes
0644
3541.8d063e3d43d55745d89b.js.map
67154 bytes
0644
3543.eecef49ce94da5ee0418.js
136752 bytes
0644
3543.eecef49ce94da5ee0418.js.map
446118 bytes
0644
3622.976b1aef94b333e450b9.js
1260 bytes
0644
3622.976b1aef94b333e450b9.js.map
2819 bytes
0644
3686.102abfc00452299017bb.js
87 bytes
0644
3718.3993946b7a0eb8f64b4d.js
23620 bytes
0644
3718.3993946b7a0eb8f64b4d.js.map
92024 bytes
0644
3726.3adfe210678d2cd26969.js
31765 bytes
0644
3726.3adfe210678d2cd26969.js.map
118227 bytes
0644
398.4e93ffb675609ea7a9c6.js
2990 bytes
0644
398.4e93ffb675609ea7a9c6.js.map
7145 bytes
0644
4114.953b39a9ce57caa0e87a.js
2536 bytes
0644
4114.953b39a9ce57caa0e87a.js.map
6028 bytes
0644
4120.67bf5d203ed4a2eb5f1b.js
3229 bytes
0644
4120.67bf5d203ed4a2eb5f1b.js.map
7533 bytes
0644
4209.c7060d489834063658f5.js
17352 bytes
0644
4209.c7060d489834063658f5.js.map
30980 bytes
0644
4254.c5f4a5512b252e3a5796.js
71716 bytes
0644
4254.c5f4a5512b252e3a5796.js.map
237783 bytes
0644
4289.d5662b0904798ff437e9.js
16496 bytes
0644
4289.d5662b0904798ff437e9.js.map
32015 bytes
0644
4334.bc078c368a20ed3257b6.js
2598 bytes
0644
4334.bc078c368a20ed3257b6.js.map
6308 bytes
0644
4630.b604ea691184ba563d59.js
5585 bytes
0644
4630.b604ea691184ba563d59.js.map
11866 bytes
0644
4680.358dfdd92851f69ecc97.js
4573 bytes
0644
4680.358dfdd92851f69ecc97.js.map
10841 bytes
0644
4698.696713071ff5d9929a11.js
3682 bytes
0644
4698.696713071ff5d9929a11.js.map
8967 bytes
0644
4787.bd938ea7cb58d64ee246.js
738 bytes
0644
4787.bd938ea7cb58d64ee246.js.map
2168 bytes
0644
4839.17a10e0ceca3eb8954b4.js
39585 bytes
0644
4839.17a10e0ceca3eb8954b4.js.map
145699 bytes
0644
494.8cf705bc1ea509187c88.js
3796 bytes
0644
494.8cf705bc1ea509187c88.js.map
8987 bytes
0644
4958.cd447d877778fc5af081.js
4923 bytes
0644
4958.cd447d877778fc5af081.js.map
11000 bytes
0644
4962.0da526ad79f816a15985.js
2242 bytes
0644
4962.0da526ad79f816a15985.js.map
4978 bytes
0644
50.7b1e44d5b9dbbed566be.js
617497 bytes
0644
50.7b1e44d5b9dbbed566be.js.map
2271464 bytes
0644
5017.003cacead1bba1cba035.js
3567142 bytes
0644
5017.003cacead1bba1cba035.js.map
13214665 bytes
0644
5130.4d31108de97088a3b014.js
2850 bytes
0644
5130.4d31108de97088a3b014.js.map
6536 bytes
0644
5196.064b914693b6a5591a48.js
4035 bytes
0644
5196.064b914693b6a5591a48.js.map
10273 bytes
0644
5240.eceb5f73f807ac22d800.js
704 bytes
0644
5240.eceb5f73f807ac22d800.js.map
2618 bytes
0644
5277.ce6608b6f47246e32767.js
269 bytes
0644
5277.ce6608b6f47246e32767.js.map
457 bytes
0644
5280.4348c762594edebf7d0e.js
16657 bytes
0644
5280.4348c762594edebf7d0e.js.map
89146 bytes
0644
5356.eabc0dc2021a3814a65f.js
10156 bytes
0644
5356.eabc0dc2021a3814a65f.js.map
25249 bytes
0644
5358.7c5e9e1b192582f3082d.js
6173 bytes
0644
5358.7c5e9e1b192582f3082d.js.map
19652 bytes
0644
5364.ac21c32fd45a27bc998a.js
3070 bytes
0644
5364.ac21c32fd45a27bc998a.js.map
7368 bytes
0644
5398.d0c11aa7c1232f4afe44.js
81872 bytes
0644
5398.d0c11aa7c1232f4afe44.js.map
769414 bytes
0644
5428.e85b0800b30feca9d7dc.js
330175 bytes
0644
5428.e85b0800b30feca9d7dc.js.map
530929 bytes
0644
5511.93023985e5c5efe49ae2.js
21275 bytes
0644
5511.93023985e5c5efe49ae2.js.map
93188 bytes
0644
5550.9284e42acc3f2bbdfc9d.js
7039 bytes
0644
5550.9284e42acc3f2bbdfc9d.js.map
16382 bytes
0644
558.701e8b4db7b852c4a10d.js
12211 bytes
0644
558.701e8b4db7b852c4a10d.js.map
24505 bytes
0644
5618.638c32d58d896f3f7261.js
3348 bytes
0644
5618.638c32d58d896f3f7261.js.map
8181 bytes
0644
5648.cb3fd92dbbc06f7d45d2.js
57392 bytes
0644
5648.cb3fd92dbbc06f7d45d2.js.map
60585 bytes
0644
5786.db7abc3b8e4f474a8f7b.js
5325 bytes
0644
5786.db7abc3b8e4f474a8f7b.js.map
11885 bytes
0644
5807.f05d997ece5811bbc849.js
2922915 bytes
0644
5807.f05d997ece5811bbc849.js.map
10524334 bytes
0644
5950.30ec6aaa9dcece6c3b3c.js
4616249 bytes
0644
5950.30ec6aaa9dcece6c3b3c.js.map
19277501 bytes
0644
6018.f4de7ac19ac8f0c774e6.js
5861 bytes
0644
6018.f4de7ac19ac8f0c774e6.js.map
13314 bytes
0644
6029.0549a3fcb50e73c4b256.js
409895 bytes
0644
6029.0549a3fcb50e73c4b256.js.map
998408 bytes
0644
6185.883629fcc773b4968b24.js
2258 bytes
0644
6185.883629fcc773b4968b24.js.map
4788 bytes
0644
6263.e4ef9aaa3073ebacc3a5.js
54594 bytes
0644
6263.e4ef9aaa3073ebacc3a5.js.map
242030 bytes
0644
6302.257b2eb06c25ee74090e.js
8440 bytes
0644
6302.257b2eb06c25ee74090e.js.map
19322 bytes
0644
6359.f824c85233ec703f8cea.js
11411 bytes
0644
6359.f824c85233ec703f8cea.js.map
41881 bytes
0644
6377.45d36c143a694fc45bd3.js
20571 bytes
0644
6377.45d36c143a694fc45bd3.js.map
79590 bytes
0644
6378.27b1e6d863a0a3b85962.js
977993 bytes
0644
6378.27b1e6d863a0a3b85962.js.map
3865587 bytes
0644
6414.192cf271de6ecbbbcb11.js
3984 bytes
0644
6414.192cf271de6ecbbbcb11.js.map
9134 bytes
0644
6446.b4b93ee91aa1bb57ea93.js
7731 bytes
0644
6446.b4b93ee91aa1bb57ea93.js.map
17485 bytes
0644
6464.f379e014f9909e621de6.js
34429 bytes
0644
6464.f379e014f9909e621de6.js.map
113303 bytes
0644
6499.9f52e0855fd4782a8b45.js
78297 bytes
0644
6499.9f52e0855fd4782a8b45.js.map
273155 bytes
0644
6587.bfb1ca0c32c6f325b0df.js
135004 bytes
0644
6587.bfb1ca0c32c6f325b0df.js.map
541974 bytes
0644
660.838743295c2108f3492d.js
43101 bytes
0644
660.838743295c2108f3492d.js.map
100340 bytes
0644
6678.a615dbe07b8a3e591e66.js
14725 bytes
0644
6678.a615dbe07b8a3e591e66.js.map
51145 bytes
0644
680.1a328432fae403eacab3.js
53846 bytes
0644
680.1a328432fae403eacab3.js.map
57615 bytes
0644
6830.0c200fec1efc2be388e2.js
5811 bytes
0644
6830.0c200fec1efc2be388e2.js.map
13972 bytes
0644
6934.fa19d392db34411fb300.js
168944 bytes
0644
6934.fa19d392db34411fb300.js.map
540337 bytes
0644
6940.9c5d3a2dcf9d7d58fa2c.js
3408 bytes
0644
6940.9c5d3a2dcf9d7d58fa2c.js.map
8039 bytes
0644
6969.f8f153735314f9426000.js
1119 bytes
0644
6969.f8f153735314f9426000.js.map
4230 bytes
0644
6990.cc2f5674128929a3f870.js
4418 bytes
0644
6990.cc2f5674128929a3f870.js.map
10503 bytes
0644
7048.117de444b1e1cb5a1360.js
4365 bytes
0644
7048.117de444b1e1cb5a1360.js.map
10316 bytes
0644
7166.480da6892ee84ee8bb53.js
593985 bytes
0644
7166.480da6892ee84ee8bb53.js.map
2430098 bytes
0644
7200.dc60128b9d612fc7b5b0.js
3634 bytes
0644
7200.dc60128b9d612fc7b5b0.js.map
8184 bytes
0644
7246.3adf293a34fa2043387b.js
4306 bytes
0644
7246.3adf293a34fa2043387b.js.map
9084 bytes
0644
7400.024c96bd5b99b8b47a63.js
14112 bytes
0644
7400.024c96bd5b99b8b47a63.js.map
64001 bytes
0644
7409.24316c87d08c1053c46a.js
3287 bytes
0644
7409.24316c87d08c1053c46a.js.map
11649 bytes
0644
7455.845968885abe369e6479.js
19801 bytes
0644
7455.845968885abe369e6479.js.map
77213 bytes
0644
7466.09e6e197d2507f62097d.js
11670 bytes
0644
7466.09e6e197d2507f62097d.js.map
24830 bytes
0644
7515.95323f0dfbd0de010e5c.js
1083 bytes
0644
7515.95323f0dfbd0de010e5c.js.map
1321 bytes
0644
7613.6334cff4df12cc157522.js
808779 bytes
0644
7613.6334cff4df12cc157522.js.map
991378 bytes
0644
7836.6a7e4207e70fc2dc235f.js
7192 bytes
0644
7836.6a7e4207e70fc2dc235f.js.map
17613 bytes
0644
7882.1a3cc418752c83396970.js
3743 bytes
0644
7882.1a3cc418752c83396970.js.map
14950 bytes
0644
7886.485c46f14540aa23cf70.js
8668 bytes
0644
7886.485c46f14540aa23cf70.js.map
20124 bytes
0644
7914.2b1a06c504df18e20fe4.js
2390 bytes
0644
7914.2b1a06c504df18e20fe4.js.map
6418 bytes
0644
7982.6761217193d3060dbf0e.js
188973 bytes
0644
7982.6761217193d3060dbf0e.js.map
1737667 bytes
0644
8054.094788468423bb88ee68.js
38124 bytes
0644
8054.094788468423bb88ee68.js.map
132296 bytes
0644
8107.92bd414247a1d05c014f.js
5144 bytes
0644
8107.92bd414247a1d05c014f.js.map
15320 bytes
0644
8230.2eedae6021a4715c6dea.js
2413 bytes
0644
8230.2eedae6021a4715c6dea.js.map
5812 bytes
0644
8332.f4b05d2f028641445650.js
3177 bytes
0644
8332.f4b05d2f028641445650.js.map
7186 bytes
0644
8334.c95ec0eb6900c0cf7e89.js
7803 bytes
0644
8334.c95ec0eb6900c0cf7e89.js.map
17714 bytes
0644
8390.1fd9505094c8cf8830ab.js
2096 bytes
0644
8390.1fd9505094c8cf8830ab.js.map
5157 bytes
0644
84.a6f8658e6a033d642231.js
30608 bytes
0644
84.a6f8658e6a033d642231.js.map
142543 bytes
0644
8494.4470c87b7093ddf70db7.js
2180 bytes
0644
8494.4470c87b7093ddf70db7.js.map
4863 bytes
0644
8542.1391ab96a455b01963a7.js
1514 bytes
0644
8542.1391ab96a455b01963a7.js.map
3249 bytes
0644
8566.e05562713181c6ca30fe.js
3852 bytes
0644
8566.e05562713181c6ca30fe.js.map
8781 bytes
0644
8730.3dcdd8cbf22c63b45d78.js
2109 bytes
0644
8730.3dcdd8cbf22c63b45d78.js.map
2893 bytes
0644
8786.1b0e43b80c82c73e2096.js
1535 bytes
0644
8786.1b0e43b80c82c73e2096.js.map
4055 bytes
0644
8902.37d0b14aa6ef24687b7b.js
2673 bytes
0644
8902.37d0b14aa6ef24687b7b.js.map
5993 bytes
0644
8990.5a822b8788ebf0bdba81.js
3969 bytes
0644
8990.5a822b8788ebf0bdba81.js.map
9161 bytes
0644
9034.200fc7a09b466256c9a9.js
3486 bytes
0644
9034.200fc7a09b466256c9a9.js.map
8180 bytes
0644
9038.7ae2448b9cc5c423aeca.js
4937 bytes
0644
9038.7ae2448b9cc5c423aeca.js.map
11973 bytes
0644
9118.3121c6b96ec7dc211973.js
48311 bytes
0644
9118.3121c6b96ec7dc211973.js.map
62149 bytes
0644
9150.9eb62d45f9b21cb38850.js
10056 bytes
0644
9150.9eb62d45f9b21cb38850.js.map
21143 bytes
0644
9199.9897e268d6d13e834d4c.js
2307 bytes
0644
9199.9897e268d6d13e834d4c.js.map
8853 bytes
0644
9320.c403e78b78aa6df1d0bd.js
336139 bytes
0644
9320.c403e78b78aa6df1d0bd.js.map
1624993 bytes
0644
9355.421530b20c759bb75633.js
22098 bytes
0644
9355.421530b20c759bb75633.js.map
66961 bytes
0644
9384.a0d5fc49f1b15b3e311e.js
2855 bytes
0644
9384.a0d5fc49f1b15b3e311e.js.map
3717 bytes
0644
9390.fa2af7f3d3d9600c08ee.js
4201 bytes
0644
9390.fa2af7f3d3d9600c08ee.js.map
9682 bytes
0644
946.f2494c0c39a9590349b9.js
9194 bytes
0644
946.f2494c0c39a9590349b9.js.map
22193 bytes
0644
9510.4cfa85a51931dc20573a.js
2949 bytes
0644
9510.4cfa85a51931dc20573a.js.map
6939 bytes
0644
9521.de2a74ca5eb365810ca5.js
46306 bytes
0644
9521.de2a74ca5eb365810ca5.js.map
51040 bytes
0644
9538.996ade7a03ccdb01942d.js
64493 bytes
0644
9538.996ade7a03ccdb01942d.js.map
49212 bytes
0644
9569.a8d60b39654a160cb917.js
27965 bytes
0644
9569.a8d60b39654a160cb917.js.map
99160 bytes
0644
9643.b408884004ca73c102bc.js
627 bytes
0644
9643.b408884004ca73c102bc.js.map
2195 bytes
0644
968.22e079d28acb4131d34c.js
4001 bytes
0644
968.22e079d28acb4131d34c.js.map
9740 bytes
0644
970.a61e37b9b897c8098261.js
5239 bytes
0644
970.a61e37b9b897c8098261.js.map
13858 bytes
0644
9711.d6e977bd60f0e5ba673d.js
13555 bytes
0644
9711.d6e977bd60f0e5ba673d.js.map
43973 bytes
0644
9737.3340c89ea96d33307cc7.js
1001 bytes
0644
9737.3340c89ea96d33307cc7.js.map
3504 bytes
0644
9739.5a801055fcf72bf4d06f.js
1147 bytes
0644
9739.5a801055fcf72bf4d06f.js.map
4390 bytes
0644
9772.49e918c9331237552c0b.js
141 bytes
0644
9772.49e918c9331237552c0b.js.map
416 bytes
0644
9838.b8f01dc360f0c2151291.js
4003 bytes
0644
9838.b8f01dc360f0c2151291.js.map
8118 bytes
0644
AdminAuthentication.b7044adf53b669e61a87.js
22504 bytes
0644
AdminAuthentication.b7044adf53b669e61a87.js.map
67352 bytes
0644
AdminEditOrgPage.96fb6c37346641f44246.js
6369 bytes
0644
AdminEditOrgPage.96fb6c37346641f44246.js.map
20602 bytes
0644
AdminFeatureTogglesPage.22157fe31f358f1c4f09.js
4939 bytes
0644
AdminFeatureTogglesPage.22157fe31f358f1c4f09.js.map
16531 bytes
0644
AdminListOrgsPage.f01c8496fd635e20124b.js
2702 bytes
0644
AdminListOrgsPage.f01c8496fd635e20124b.js.map
7735 bytes
0644
AdminSettings.845c6def917892a0c1f9.js
1903 bytes
0644
AdminSettings.845c6def917892a0c1f9.js.map
5580 bytes
0644
AlertAmRoutes.10a0d9a23a082caf12c8.js
54554 bytes
0644
AlertAmRoutes.10a0d9a23a082caf12c8.js.map
208792 bytes
0644
AlertGroups.efd523dc41621f9f7935.js
10088 bytes
0644
AlertGroups.efd523dc41621f9f7935.js.map
39108 bytes
0644
AlertRuleListIndex.f0b17a6119cc5ea575ed.js
44623 bytes
0644
AlertRuleListIndex.f0b17a6119cc5ea575ed.js.map
156842 bytes
0644
AlertRuleListLegacy.8e675db4469232c87308.js
6270 bytes
0644
AlertRuleListLegacy.8e675db4469232c87308.js.map
18086 bytes
0644
AlertSilences.4ff252ad4c0057124d5d.js
24687 bytes
0644
AlertSilences.4ff252ad4c0057124d5d.js.map
83377 bytes
0644
AlertTabCtrl.d3377d127a336a69beb5.js
9844 bytes
0644
AlertTabCtrl.d3377d127a336a69beb5.js.map
27934 bytes
0644
AlertingAdmin.e62f9c73a69abe6a1ac0.js
10523 bytes
0644
AlertingAdmin.e62f9c73a69abe6a1ac0.js.map
37393 bytes
0644
AlertingFeatureTogglePage.f971bb7b2ad4ceb0acbd.js
672 bytes
0644
AlertingFeatureTogglePage.f971bb7b2ad4ceb0acbd.js.map
1220 bytes
0644
AlertingHome.0d6be993ef4a3df37345.js
33492 bytes
0644
AlertingHome.0d6be993ef4a3df37345.js.map
106868 bytes
0644
AlertingRedirectToRule.37a0040f89e20b99b751.js
3648 bytes
0644
AlertingRedirectToRule.37a0040f89e20b99b751.js.map
10875 bytes
0644
AlertingRuleForm.66bb5b2724b31ae6a5a4.js
79931 bytes
0644
AlertingRuleForm.66bb5b2724b31ae6a5a4.js.map
292923 bytes
0644
AlertingUpgrade.c757b99e306db50cdb16.js
31333 bytes
0644
AlertingUpgrade.c757b99e306db50cdb16.js.map
98330 bytes
0644
AngularApp.7e72879caebef22a5217.js
72809 bytes
0644
AngularApp.7e72879caebef22a5217.js.map
102853 bytes
0644
ApiKeysPage.12b0cd511f7b1e9c50dc.js
8422 bytes
0644
ApiKeysPage.12b0cd511f7b1e9c50dc.js.map
23375 bytes
0644
BenchmarksPage.3a183df3d44714f9a96a.js
2941 bytes
0644
BenchmarksPage.3a183df3d44714f9a96a.js.map
9749 bytes
0644
ChangePasswordPage.5e0562f6a9674bd95cfe.js
470 bytes
0644
ChangePasswordPage.5e0562f6a9674bd95cfe.js.map
1195 bytes
0644
Connections.b53c715b9b9a782d8647.js
32448 bytes
0644
Connections.b53c715b9b9a782d8647.js.map
112998 bytes
0644
CorrelationsFeatureToggle.71addced22f59948b708.js
674 bytes
0644
CorrelationsFeatureToggle.71addced22f59948b708.js.map
1149 bytes
0644
CorrelationsPage.4e02feddf752bdf7cfe6.js
22725 bytes
0644
CorrelationsPage.4e02feddf752bdf7cfe6.js.map
69262 bytes
0644
CreateTeam.dbde5b87278cf087cc5e.js
3046 bytes
0644
CreateTeam.dbde5b87278cf087cc5e.js.map
9594 bytes
0644
DashboardImport.06e6c4c03113061aae6c.js
18153 bytes
0644
DashboardImport.06e6c4c03113061aae6c.js.map
58242 bytes
0644
DashboardListPage.dac1fe75fbaa4f9b1c23.js
30967 bytes
0644
DashboardListPage.dac1fe75fbaa4f9b1c23.js.map
108517 bytes
0644
DashboardPage.5e50193556ad6b828f5d.js
2786 bytes
0644
DashboardPage.5e50193556ad6b828f5d.js.map
8754 bytes
0644
DashboardPageProxy.9a6d60e5cac89c11c71c.js
65136 bytes
0644
DashboardPageProxy.9a6d60e5cac89c11c71c.js.map
226791 bytes
0644
DataTrailsPage.aa19ca6750eb3f91ac5d.js
331 bytes
0644
DataTrailsPage.aa19ca6750eb3f91ac5d.js.map
582 bytes
0644
EditNotificationChannelLegacy.75122e6dbfb215d89d81.js
10507 bytes
0644
EditNotificationChannelLegacy.75122e6dbfb215d89d81.js.map
37444 bytes
0644
EmbeddedDashboard.3856404d3d608c739864.js
1768 bytes
0644
EmbeddedDashboard.3856404d3d608c739864.js.map
5917 bytes
0644
FolderAlerting.a0fe69e3574320c8a74a.js
9633 bytes
0644
FolderAlerting.a0fe69e3574320c8a74a.js.map
29985 bytes
0644
FolderLibraryPanelsPage.95dd7bf6735e202a79d2.js
8599 bytes
0644
FolderLibraryPanelsPage.95dd7bf6735e202a79d2.js.map
25919 bytes
0644
LibraryPanelsPage.4a952d4aa9c21984995a.js
2704 bytes
0644
LibraryPanelsPage.4a952d4aa9c21984995a.js.map
7623 bytes
0644
ListPublicDashboardPage.469a693c4011a5193fcd.js
4713 bytes
0644
ListPublicDashboardPage.469a693c4011a5193fcd.js.map
14309 bytes
0644
MuteTimings.cb66b37f52c9ee3ce1da.js
20855 bytes
0644
MuteTimings.cb66b37f52c9ee3ce1da.js.map
58932 bytes
0644
NewNotificationChannelLegacy.1d57814bc534bb1a3681.js
9785 bytes
0644
NewNotificationChannelLegacy.1d57814bc534bb1a3681.js.map
32951 bytes
0644
NewOrgPage.2bb0e1cab09f0cbd0310.js
1325 bytes
0644
NewOrgPage.2bb0e1cab09f0cbd0310.js.map
3158 bytes
0644
NotificationsListLegacyPage.33212668898a6db361a8.js
2547 bytes
0644
NotificationsListLegacyPage.33212668898a6db361a8.js.map
6671 bytes
0644
NotificationsListPage.1eb9cb05bf88eee08291.js
1620 bytes
0644
NotificationsListPage.1eb9cb05bf88eee08291.js.map
3378 bytes
0644
NotificationsPage.d26b90d7348139106351.js
4646 bytes
0644
NotificationsPage.d26b90d7348139106351.js.map
25381 bytes
0644
OrgDetailsPage.2d5c98f188683c2e1d3b.js
6742 bytes
0644
OrgDetailsPage.2d5c98f188683c2e1d3b.js.map
17850 bytes
0644
PlaylistEditPage.d14b3673a1bb03ca0dbb.js
6892 bytes
0644
PlaylistEditPage.d14b3673a1bb03ca0dbb.js.map
19989 bytes
0644
PlaylistNewPage.13696f39b95b8416ede2.js
6583 bytes
0644
PlaylistNewPage.13696f39b95b8416ede2.js.map
19084 bytes
0644
PlaylistPage.8f45dcc09add615f90e8.js
7895 bytes
0644
PlaylistPage.8f45dcc09add615f90e8.js.map
25502 bytes
0644
PlaylistStartPage.8be462b13a24cddee188.js
275 bytes
0644
PlaylistStartPage.8be462b13a24cddee188.js.map
698 bytes
0644
PluginListPage.815b65d32380d0a800f7.js
12167 bytes
0644
PluginListPage.815b65d32380d0a800f7.js.map
43537 bytes
0644
PluginPage.c790de5e17a0b728dd3a.js
314 bytes
0644
PluginPage.c790de5e17a0b728dd3a.js.map
668 bytes
0644
ProfileFeatureTogglePage.a14257ebc5da1e8c85e0.js
552 bytes
0644
ProfileFeatureTogglePage.a14257ebc5da1e8c85e0.js.map
1012 bytes
0644
PublicDashboardPage.51c7c24941781e091898.js
4295 bytes
0644
PublicDashboardPage.51c7c24941781e091898.js.map
14393 bytes
0644
SelectOrgPage.695c19a5101a3a03ee28.js
1124 bytes
0644
SelectOrgPage.695c19a5101a3a03ee28.js.map
2993 bytes
0644
SendResetMailPage.f16b7172a87070f57227.js
1736 bytes
0644
SendResetMailPage.f16b7172a87070f57227.js.map
4350 bytes
0644
ServerStats.3fbd2493deb8f4598755.js
3863 bytes
0644
ServerStats.3fbd2493deb8f4598755.js.map
11534 bytes
0644
ServiceAccountCreatePage.4f989fb6cd2a41193ff0.js
2440 bytes
0644
ServiceAccountCreatePage.4f989fb6cd2a41193ff0.js.map
7939 bytes
0644
ServiceAccountPage.bc7c35b63b03ccc89628.js
14806 bytes
0644
ServiceAccountPage.bc7c35b63b03ccc89628.js.map
51593 bytes
0644
ServiceAccountsPage.baaa08c045390c05e276.js
14565 bytes
0644
ServiceAccountsPage.baaa08c045390c05e276.js.map
46399 bytes
0644
SignupInvited.81ad56aceb8dd1839e15.js
2360 bytes
0644
SignupInvited.81ad56aceb8dd1839e15.js.map
6096 bytes
0644
SnapshotListPage.519c760ed66124a771ff.js
3061 bytes
0644
SnapshotListPage.519c760ed66124a771ff.js.map
9043 bytes
0644
SoloPanelPage.c729750a88c3fa90d1cc.js
3229 bytes
0644
SoloPanelPage.c729750a88c3fa90d1cc.js.map
12316 bytes
0644
SoloPanelPageOld.6518c21ccaf29701fa97.js
1727 bytes
0644
SoloPanelPageOld.6518c21ccaf29701fa97.js.map
5509 bytes
0644
StoragePage.9b93a99e75f7f2842c11.js
14081 bytes
0644
StoragePage.9b93a99e75f7f2842c11.js.map
48740 bytes
0644
SupportBundles.567d512b3f919b8112e4.js
3058 bytes
0644
SupportBundles.567d512b3f919b8112e4.js.map
8751 bytes
0644
SupportBundlesCreate.fc6b6e4cf6366f751081.js
2779 bytes
0644
SupportBundlesCreate.fc6b6e4cf6366f751081.js.map
8882 bytes
0644
TeamList.2e23d37c91734f608f09.js
9019 bytes
0644
TeamList.2e23d37c91734f608f09.js.map
30348 bytes
0644
TeamPages.4f6177b4c6ec769c72d8.js
22839 bytes
0644
TeamPages.4f6177b4c6ec769c72d8.js.map
66001 bytes
0644
TestStuffPage.8ddabdd17d265b771b17.js
2654 bytes
0644
TestStuffPage.8ddabdd17d265b771b17.js.map
8058 bytes
0644
UserCreatePage.72e86cf2c9a3ce50cff3.js
1470 bytes
0644
UserCreatePage.72e86cf2c9a3ce50cff3.js.map
3788 bytes
0644
UserInvitePage.c8243c9cee4b06e10222.js
2576 bytes
0644
UserInvitePage.c8243c9cee4b06e10222.js.map
6594 bytes
0644
UserListPage.acbb5778a782ca90c7ba.js
25463 bytes
0644
UserListPage.acbb5778a782ca90c7ba.js.map
79671 bytes
0644
UserProfileEditPage.7cc4c218d9e4664250e3.js
14593 bytes
0644
UserProfileEditPage.7cc4c218d9e4664250e3.js.map
42901 bytes
0644
UsersListPage.1b61c82d62ca416b6f2f.js
8800 bytes
0644
UsersListPage.1b61c82d62ca416b6f2f.js.map
30059 bytes
0644
alert-rules-drawer-content.1fd9de3b496d077a5f3a.js
957 bytes
0644
alert-rules-drawer-content.1fd9de3b496d077a5f3a.js.map
3199 bytes
0644
alert-rules-toolbar-button.6f275f0d03748b6c297d.js
1429 bytes
0644
alert-rules-toolbar-button.6f275f0d03748b6c297d.js.map
4041 bytes
0644
alertmanagerPlugin.d13ca72afb3f996bb284.js
3810 bytes
0644
alertmanagerPlugin.d13ca72afb3f996bb284.js.map
10753 bytes
0644
app.b11fde05d43f9632a473.js
920821 bytes
0644
app.b11fde05d43f9632a473.js.map
69088 bytes
0644
assets-manifest.json
280835 bytes
0644
azureMonitorPlugin.0bc37a9d4e3bd8421cc0.js
232 bytes
0644
azureMonitorPlugin.0bc37a9d4e3bd8421cc0.js.map
600 bytes
0644
brace.fcd4b1c7e8b9264ab02c.js
371235 bytes
0644
brace.fcd4b1c7e8b9264ab02c.js.map
1132097 bytes
0644
canvasPanel.a46aa5e57d26b1fcc380.js
485254 bytes
0644
canvasPanel.a46aa5e57d26b1fcc380.js.map
2136916 bytes
0644
cloudMonitoringPlugin.c6ea431eae8e9ad2c7b1.js
198 bytes
0644
cloudMonitoringPlugin.c6ea431eae8e9ad2c7b1.js.map
555 bytes
0644
cloudwatchPlugin.06ef34f60000c4f7ea37.js
192 bytes
0644
cloudwatchPlugin.06ef34f60000c4f7ea37.js.map
544 bytes
0644
dark.7fa24d1908c1c96e6fcc.js
134 bytes
0644
elasticsearchPlugin.3f2edb012f5162b48903.js
214 bytes
0644
elasticsearchPlugin.3f2edb012f5162b48903.js.map
583 bytes
0644
explore-feature-toggle-page.897d9f08c342ad4c0702.js
612 bytes
0644
explore-feature-toggle-page.897d9f08c342ad4c0702.js.map
1280 bytes
0644
explore.476912733278e2a99729.js
165810 bytes
0644
explore.476912733278e2a99729.js.map
579148 bytes
0644
geomapPanel.14b9605971a38c51d262.js
417078 bytes
0644
geomapPanel.14b9605971a38c51d262.js.map
540371 bytes
0644
grafana.dark.8c716fbcf630eae84ced.css
209089 bytes
0644
grafana.light.b8b3904788f25480f4a1.css
209047 bytes
0644
grafanaPlugin.1cb208185a89de28dc3a.js
8654 bytes
0644
grafanaPlugin.1cb208185a89de28dc3a.js.map
28174 bytes
0644
graphPlugin.f47f722cdfc0ceb85136.js
70277 bytes
0644
graphPlugin.f47f722cdfc0ceb85136.js.map
243430 bytes
0644
graphitePlugin.d59175976346917781fe.js
75305 bytes
0644
graphitePlugin.d59175976346917781fe.js.map
272016 bytes
0644
heatmapPanel.f6f29a53ed0f682b4404.js
37545 bytes
0644
heatmapPanel.f6f29a53ed0f682b4404.js.map
158066 bytes
0644
influxdbPlugin.140a7777089f9559c11c.js
68843 bytes
0644
influxdbPlugin.140a7777089f9559c11c.js.map
265085 bytes
0644
jaegerPlugin.d254fd4a19ef0cb5b4f5.js
19727 bytes
0644
jaegerPlugin.d254fd4a19ef0cb5b4f5.js.map
65603 bytes
0644
light.af65e5ce03b9ed0aa2b1.js
134 bytes
0644
loki-query-field.a588d587d9d762b18f22.js
191 bytes
0644
loki-query-field.a588d587d9d762b18f22.js.map
548 bytes
0644
lokiPlugin.77364509de280321b6f8.js
185 bytes
0644
lokiPlugin.77364509de280321b6f8.js.map
536 bytes
0644
mixedPlugin.f36bd557a883d9a67538.js
180 bytes
0644
mssqlPlugin.88775f59ced74c2283c5.js
20457 bytes
0644
mssqlPlugin.88775f59ced74c2283c5.js.map
61420 bytes
0644
mysqlPlugin.72fb44411afd8165d201.js
17323 bytes
0644
mysqlPlugin.72fb44411afd8165d201.js.map
45415 bytes
0644
nodeGraphPanel.9a7cdd8efdae281cbe28.js
2107 bytes
0644
nodeGraphPanel.9a7cdd8efdae281cbe28.js.map
7132 bytes
0644
opentsdbPlugin.418b8c8ea0d97ed99edb.js
22866 bytes
0644
opentsdbPlugin.418b8c8ea0d97ed99edb.js.map
82180 bytes
0644
parcaPlugin.7f2e6dde7161b08ceed2.js
11184 bytes
0644
parcaPlugin.7f2e6dde7161b08ceed2.js.map
42340 bytes
0644
postgresPlugin.f88c598bae2653ae177b.js
18902 bytes
0644
postgresPlugin.f88c598bae2653ae177b.js.map
54304 bytes
0644
prom-query-field.ff217c474ea457bdd65e.js
14104 bytes
0644
prom-query-field.ff217c474ea457bdd65e.js.map
76811 bytes
0644
prometheusPlugin.2ba02c28d3f7293e903e.js
224 bytes
0644
prometheusPlugin.2ba02c28d3f7293e903e.js.map
699 bytes
0644
pyroscopePlugin.eb14b78419d619d90dca.js
22269 bytes
0644
pyroscopePlugin.eb14b78419d619d90dca.js.map
86896 bytes
0644
react-monaco-editor.988b1aa5e90b11f9941a.js
15759 bytes
0644
react-monaco-editor.988b1aa5e90b11f9941a.js.map
51544 bytes
0644
runtime.4b7e1b5735d2ed64b824.js
13640 bytes
0644
runtime.4b7e1b5735d2ed64b824.js.map
35122 bytes
0644
tableOldPlugin.8c72b8399d197aeebe16.js
25242 bytes
0644
tableOldPlugin.8c72b8399d197aeebe16.js.map
80497 bytes
0644
tempoPlugin.efa8c2a55984263b4b61.js
182 bytes
0644
tempoPlugin.efa8c2a55984263b4b61.js.map
529 bytes
0644
testDataDSPlugin.9717509b124d754e4f35.js
120550 bytes
0644
testDataDSPlugin.9717509b124d754e4f35.js.map
303302 bytes
0644
visjs-network.d93b3aa71ac24c8cde84.js
459653 bytes
0644
visjs-network.d93b3aa71ac24c8cde84.js.map
1951742 bytes
0644
zipkinPlugin.70f0f24b6d0b6e673ccb.js
13172 bytes
0644
zipkinPlugin.70f0f24b6d0b6e673ccb.js.map
46861 bytes
0644
N4ST4R_ID | Naxtarrr