Submit
Path:
~
/
/
usr
/
share
/
grafana
/
public
/
build
/
File Content:
2571.345ecfd2b82551018f2e.js
(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[2571],{6191:(pe,Q,m)=>{"use strict";m.d(Q,{X:()=>T});var R=m(32196),w=m(96540),E=m(40845);const T=({children:B})=>{const D=(0,E.of)(K);return w.createElement("div",{className:D.root},B)},K=B=>({root:(0,R.css)({display:"flex",flexWrap:"wrap",alignItems:"center",gap:B.spacing(3),minHeight:B.spacing(4)})})},31347:(pe,Q,m)=>{"use strict";m.d(Q,{Z:()=>w});var R=m(96540);const w=({grow:E,shrink:T})=>R.createElement("div",{style:{display:"block",flexGrow:E,flexShrink:T}})},22354:(pe,Q,m)=>{"use strict";m.d(Q,{W:()=>ae});var R=m(32196),w=m(96540),E=m(40845),T=m(88323),K=m(4603),B=Object.defineProperty,D=Object.defineProperties,G=Object.getOwnPropertyDescriptors,$=Object.getOwnPropertySymbols,N=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable,J=(W,j,Y)=>j in W?B(W,j,{enumerable:!0,configurable:!0,writable:!0,value:Y}):W[j]=Y,q=(W,j)=>{for(var Y in j||(j={}))N.call(j,Y)&&J(W,Y,j[Y]);if($)for(var Y of $(j))H.call(j,Y)&&J(W,Y,j[Y]);return W},se=(W,j)=>D(W,G(j)),be=(W,j)=>{var Y={};for(var ce in W)N.call(W,ce)&&j.indexOf(ce)<0&&(Y[ce]=W[ce]);if(W!=null&&$)for(var ce of $(W))j.indexOf(ce)<0&&H.call(W,ce)&&(Y[ce]=W[ce]);return Y};function ae(W){var j=W,{label:Y}=j,ce=be(j,["label"]);const ht=(0,E.of)(Me),[qe]=(0,w.useState)(()=>Math.random().toString(16).slice(2)),Ze={SelectContainer:Oe,ValueContainer:_,SingleValue:_};return w.createElement("div",{className:ht.root},Y&&w.createElement("label",{className:ht.label,htmlFor:qe},Y,":","\xA0"),w.createElement(T.l6,se(q({openMenuOnFocus:!0,inputId:qe},ce),{components:Ze})))}const Oe=W=>{const{children:j}=W,Y=(0,E.of)(Me);return w.createElement(K.K,se(q({},W),{className:(0,R.cx)(W.className,Y.container)}),j)},_=W=>{const{className:j,children:Y}=W,ce=(0,E.of)(Me);return w.createElement("div",{className:(0,R.cx)(j,ce.valueContainer)},Y)},Me=W=>({root:(0,R.css)({display:"flex",fontSize:12,alignItems:"center"}),label:(0,R.css)({color:W.colors.text.secondary,whiteSpace:"nowrap"}),container:(0,R.css)({background:"none",borderColor:"transparent"}),valueContainer:(0,R.css)({display:"flex",alignItems:"center",flex:"initial",color:W.colors.text.secondary,fontSize:12})})},85232:(pe,Q,m)=>{"use strict";m.r(Q),m.d(Q,{AND:()=>se,ASC:()=>G,BY:()=>B,COMPARISON_OPERATORS:()=>_,DESC:()=>D,EQUALS:()=>ae,FROM:()=>w,GROUP:()=>T,KEYWORDS:()=>J,LIMIT:()=>$,LOGICAL_OPERATORS:()=>be,NOT_EQUALS:()=>Oe,ORDER:()=>K,SCHEMA:()=>H,SELECT:()=>R,STATISTICS:()=>q,WHERE:()=>E,WITH:()=>N,conf:()=>W,language:()=>Me});const R="SELECT",w="FROM",E="WHERE",T="GROUP",K="ORDER",B="BY",D="DESC",G="ASC",$="LIMIT",N="WITH",H="SCHEMA",J=[R,w,E,T,K,B,D,G,$,N,H],q=["AVG","COUNT","MAX","MIN","SUM"],se="AND",be=[se],ae="=",Oe="!=",_=[ae,Oe],Me={defaultToken:"",tokenPostfix:".sql",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:J,operators:be,builtinFunctions:q,tokenizer:{root:[[/\$[a-zA-Z0-9-_]+/,"variable"],{include:"@comments"},{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},{include:"@complexIdentifiers"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@keywords":"keyword","@operators":"operator","@builtinFunctions":"predefined","@default":"identifier"}}],[/[=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[[/--+.*/,"comment"]],comment:[[/[^*/]+/,"comment"],[/./,"comment"]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/N'/,{token:"string",next:"@string"}],[/'/,{token:"string",next:"@string"}],[/"/,{token:"type",next:"@string_double"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],string_double:[[/[^\\"]+/,"type"],[/"/,"type","@pop"]],complexIdentifiers:[[/\[/,{token:"identifier.quote",next:"@bracketedIdentifier"}],[/"/,{token:"identifier.quote",next:"@quotedIdentifier"}]],bracketedIdentifier:[[/[^\]]+/,"identifier"],[/]]/,"identifier"],[/]/,{token:"identifier.quote",next:"@pop"}]],quotedIdentifier:[[/[^"]+/,"identifier"],[/""/,"identifier"],[/"/,{token:"identifier.quote",next:"@pop"}]]}},W={comments:{lineComment:"--",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]}},64698:(pe,Q,m)=>{"use strict";m.r(Q),m.d(Q,{DYNAMIC_LABEL_PATTERNS:()=>w,conf:()=>T,language:()=>E});var R=m(32264);const w=["${DATAPOINT_COUNT}","${FIRST}","${FIRST_LAST_RANGE}","${FIRST_LAST_TIME_RANGE}","${FIRST_TIME}","${FIRST_TIME_RELATIVE}","${LABEL}","${LAST}","${LAST_TIME}","${LAST_TIME_RELATIVE}","${MAX}","${MAX_TIME}","${MAX_TIME_RELATIVE}","${MIN}","${MIN_MAX_RANGE}","${MIN_MAX_TIME_RANGE}","${MIN_TIME}","${MIN_TIME_RELATIVE}","${PROP('AccountId')}","${PROP('MetricName')}","${PROP('Namespace')}","${PROP('Period')}","${PROP('Region')}","${PROP('Stat')}","${SUM}",...R.$.featureToggles.cloudWatchCrossAccountQuerying?["${PROP('AccountLabel')}"]:[]],E={id:"dynamicLabels",ignoreCase:!1,tokenizer:{root:[{include:"@whitespace"},{include:"@builtInFunctions"},{include:"@string"},[/\$\{PROP\('Dim.[a-zA-Z0-9-_]?.*'\)\}+/,"predefined"]],builtInFunctions:[[w.map(K).join("|"),"predefined"]],whitespace:[[/\s+/,"white"]],string:[]}},T={};function K(B){return B.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}},89089:(pe,Q,m)=>{"use strict";m.r(Q),m.d(Q,{DEDUP:()=>$,DISPLAY:()=>R,FIELDS:()=>w,FILTER:()=>E,LIMIT:()=>D,LOGS_COMMANDS:()=>N,LOGS_FUNCTION_OPERATORS:()=>J,LOGS_KEYWORDS:()=>se,LOGS_LOGIC_OPERATORS:()=>H,PARSE:()=>G,PATTERN:()=>T,SORT:()=>B,SORT_DIRECTION_KEYWORDS:()=>q,STATS:()=>K,conf:()=>ae,language:()=>be});const R="display",w="fields",E="filter",T="pattern",K="stats",B="sort",D="limit",G="parse",$="dedup",N=[R,w,E,T,K,B,D,G,$],H=["and","or","not"],J=["abs","ceil","floor","greatest","least","log","sqrt","bin","datefloor","dateceil","fromMillis","toMillis","ispresent","coalesce","isValidIp","isValidIpV4","isValidIpV6","isIpInSubnet","isIpv4InSubnet","isIpv6InSubnet","avg","count","count_distinct","max","min","pct","stddev","sum","earliest","latest","sortsFirst","sortsLast","isempty","isblank","concat","ltrim","rtrim","trim","strlen","toupper","tolower","substr","replace","strcontains","unmask"],q=["asc","desc"],se=["like","by","in","as",...q],be={defaultToken:"invalid",id:"logs",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],commands:[...N,...se],operators:H,builtinFunctions:J,tokenizer:{root:[{include:"@comments"},{include:"@regexes"},{include:"@whitespace"},{include:"@fieldNames"},{include:"@variables"},{include:"@strings"},{include:"@numbers"},[/\|\|/,"operator"],[/[,.:\|]/,"delimiter"],[/[()\[\]]/,"delimiter.parenthesis"],[/[\w@#$]+/,{cases:{"@commands":"keyword","@builtinFunctions":"predefined","@operators":"operator","@default":"identifier"}}],[/[+\-*/^%=!<>]/,"operator"]],variables:[[/\${/,{token:"variable",next:"@variable_bracket"}],[/\$[a-zA-Z0-9-_]+/,"variable"]],variable_bracket:[[/[a-zA-Z0-9-_:]+/,"variable"],[/}/,{token:"variable",next:"@pop"}]],fieldNames:[[/(@[_a-zA-Z]+[_.0-9a-zA-Z]*)|(`((\\`)|([^`]))*?`)/,"identifier"]],whitespace:[[/\s+/,"white"]],comments:[[/^#.*/,"comment"],[/\s+#.*/,"comment"]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/'/,{token:"string",next:"@string"}],[/"/,{token:"string",next:"@string_double"}],[/`/,{token:"identifier",next:"@string_backtick"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],string_double:[[/[^\\"]+/,"string"],[/"/,"string","@pop"]],string_backtick:[[/[^\\`]+/,"identifier"],[/`/,"identifier","@pop"]],regexes:[[/\/.*?\/(?=\s*\||\s*$|,)/,"regexp"]]}},ae={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}]}},74746:(pe,Q,m)=>{"use strict";m.r(Q),m.d(Q,{METRIC_MATH_FNS:()=>R,METRIC_MATH_KEYWORDS:()=>E,METRIC_MATH_OPERATORS:()=>T,METRIC_MATH_PERIODS:()=>K,METRIC_MATH_STATISTIC_KEYWORD_STRINGS:()=>w,conf:()=>D,language:()=>B});const R=["ABS","ANOMALY_DETECTION_BAND","AVG","CEIL","DATAPOINT_COUNT","DB_PERF_INSIGHTS","DIFF","DIFF_TIME","FILL","FIRST","LAST","FLOOR","IF","INSIGHT_RULE_METRIC","LOG","LOG10","MAX","METRIC_COUNT","METRICS","MIN","MINUTE","HOUR","DAY","DATE","MONTH","YEAR","EPOCH","PERIOD","RATE","REMOVE_EMPTY","RUNNING_SUM","SEARCH","SERVICE_QUOTA","SLICE","SORT","STDDEV","SUM","TIME_SERIES"],w=["Average","Maximum","Minimum","Sum","SampleCount"],E=["REPEAT","LINEAR","ASC","DSC"],T=["+","-","*","/","^","==","!=","<=",">=","<",">","AND","&&","OR","||"],K=[10,60,300,900,3e3,21600,86400],B={id:"metricMath",ignoreCase:!1,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"}],tokenizer:{root:[{include:"@nonNestableStates"},{include:"@strings"}],nonNestableStates:[{include:"@variables"},{include:"@macros"},{include:"@whitespace"},{include:"@numbers"},{include:"@assignment"},{include:"@keywords"},{include:"@operators"},{include:"@builtInFunctions"},[/[;,.]/,"delimiter"],[/[(){}\[\]]/,"@brackets"]],keywords:[[E.map(G).join("|"),"keyword"]],operators:[[T.map(G).join("|"),"operator"]],builtInFunctions:[[R.map(G).join("|"),"predefined"]],variables:[[/\$[a-zA-Z0-9-_]+/,"variable"]],macros:[[/\$__[a-zA-Z0-9-_]+/,"type"]],whitespace:[[/\s+/,"white"]],assignment:[[/=/,"tag"]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/'/,{token:"string",next:"@string"}],[/"/,{token:"type",next:"@string_double"}]],string:[[/{/,{token:"delimiter.curly",next:"@nestedCurly"}],[/\(/,{token:"delimiter.parenthesis",next:"@nestedParens"}],[/"/,{token:"type",next:"@string_double"}],[/'/,{token:"string",next:"@pop"}],{include:"@nonNestableStates"},[/[^']/,"string"]],string_double:[[/[^"]/,"type"],[/"/,{token:"type",next:"@pop"}]],nestedCurly:[[/}/,{token:"delimiter.curly",next:"@pop"}],[/'/,{token:"string",next:"@string"}],[/"/,{token:"type",next:"@string_double"}]],nestedParens:[[/\)/,{token:"delimiter.parenthesis",next:"@pop"}],[/'/,{token:"string",next:"@string"}],[/"/,{token:"type",next:"@string_double"}]]}},D={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]};function G($){return $.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}},52571:(pe,Q,m)=>{"use strict";m.r(Q),m.d(Q,{plugin:()=>Do});var R=m(40187),w=m(69129),E=m(3591),T=m(32196),K=function(){function t(e,r){for(var n=0;n<r.length;n++){var a=r[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),B=D(["",""],["",""]);function D(t,e){return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function G(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var $=function(){function t(){for(var e=this,r=arguments.length,n=Array(r),a=0;a<r;a++)n[a]=arguments[a];return G(this,t),this.tag=function(o){for(var i=arguments.length,l=Array(i>1?i-1:0),c=1;c<i;c++)l[c-1]=arguments[c];return typeof o=="function"?e.interimTag.bind(e,o):typeof o=="string"?e.transformEndResult(o):(o=o.map(e.transformString.bind(e)),e.transformEndResult(o.reduce(e.processSubstitutions.bind(e,l))))},n.length>0&&Array.isArray(n[0])&&(n=n[0]),this.transformers=n.map(function(o){return typeof o=="function"?o():o}),this.tag}return K(t,[{key:"interimTag",value:function(r,n){for(var a=arguments.length,o=Array(a>2?a-2:0),i=2;i<a;i++)o[i-2]=arguments[i];return this.tag(B,r.apply(void 0,[n].concat(o)))}},{key:"processSubstitutions",value:function(r,n,a){var o=this.transformSubstitution(r.shift(),n);return"".concat(n,o,a)}},{key:"transformString",value:function(r){var n=function(o,i){return i.onString?i.onString(o):o};return this.transformers.reduce(n,r)}},{key:"transformSubstitution",value:function(r,n){var a=function(i,l){return l.onSubstitution?l.onSubstitution(i,n):i};return this.transformers.reduce(a,r)}},{key:"transformEndResult",value:function(r){var n=function(o,i){return i.onEndResult?i.onEndResult(o):o};return this.transformers.reduce(n,r)}}]),t}();const N=$;var H={separator:"",conjunction:"",serial:!1},J=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:H;return{onSubstitution:function(n,a){if(Array.isArray(n)){var o=n.length,i=e.separator,l=e.conjunction,c=e.serial,d=a.match(/(\n?[^\S\n]+)$/);if(d?n=n.join(i+d[1]):n=n.join(i+" "),l&&o>1){var u=n.lastIndexOf(i);n=n.slice(0,u)+(c?i:"")+" "+l+n.slice(u+1)}}return n}}};const q=J;function se(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}else return Array.from(t)}var be=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"initial";return{onEndResult:function(n){if(e==="initial"){var a=n.match(/^[^\S\n]*(?=\S)/gm),o=a&&Math.min.apply(Math,se(a.map(function(l){return l.length})));if(o){var i=new RegExp("^.{"+o+"}","gm");return n.replace(i,"")}return n}if(e==="all")return n.replace(/^[^\S\n]+/gm,"");throw new Error("Unknown type: "+e)}}};const ae=be;var Oe=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return{onEndResult:function(n){if(e==="")return n.trim();if(e=e.toLowerCase(),e==="start"||e==="left")return n.replace(/^\s*/,"");if(e==="end"||e==="right")return n.replace(/\s*$/,"");throw new Error("Side not supported: "+e)}}};const _=Oe;var Me=new N(q({separator:","}),ae,_);const W=null;var j=new N(q({separator:",",conjunction:"and"}),ae,_);const Y=null;var ce=new N(q({separator:",",conjunction:"or"}),ae,_);const ht=null;var qe=function(e){return{onSubstitution:function(n,a){if(e!=null&&typeof e=="string")typeof n=="string"&&n.includes(e)&&(n=n.split(e));else throw new Error("You need to specify a string character to split by.");return n}}};const Ze=qe;var jt=function(e){return e!=null&&!Number.isNaN(e)&&typeof e!="boolean"},qr=function(){return{onSubstitution:function(r){return Array.isArray(r)?r.filter(jt):jt(r)?r:""}}};const Zr=qr;var Go=new N(Ze(` `),Zr,q,ae,_);const Wo=null;var Jr=function(e,r){return{onSubstitution:function(a,o){if(e==null||r==null)throw new Error("replaceSubstitutionTransformer requires at least 2 arguments.");return a==null?a:a.toString().replace(e,r)}}};const Fe=Jr;var Po=new N(Ze(` `),q,ae,_,Fe(/&/g,"&"),Fe(/</g,"<"),Fe(/>/g,">"),Fe(/"/g,"""),Fe(/'/g,"'"),Fe(/`/g,"`"));const Ko=null;var _r=function(e,r){return{onEndResult:function(a){if(e==null||r==null)throw new Error("replaceResultTransformer requires at least 2 arguments.");return a.replace(e,r)}}};const Ne=_r;var $o=new N(Ne(/(?:\n(?:\s*))+/g," "),_);const ko=null;var Vo=new N(Ne(/(?:\n\s*)/g,""),_);const Qo=null;var Bo=new N(q({separator:","}),Ne(/(?:\s+)/g," "),_);const Uo=null;var zo=new N(q({separator:",",conjunction:"or"}),Ne(/(?:\s+)/g," "),_);const jo=null;var Ho=new N(q({separator:",",conjunction:"and"}),Ne(/(?:\s+)/g," "),_);const Yo=null;var Xo=new N(q,ae,_);const qo=null;var Zo=new N(q,Ne(/(?:\s+)/g," "),_);const Jo=null;var en=new N(ae,_);const tn=en;var rn=new N(ae("all"),_);const V=rn;var Ht=m(28848),Yt=m.n(Ht),s=m(96540),Xt=m(82762),qt=m(41781);const Zt=[{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"}],_o=null,ei=null,Jt=[{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."}],nn=[{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."}],_t=[{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."}],er=[{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."}],yt=[{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."}],tr=[{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."},...yt],rr=[{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."}],sn=[{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."}],an=[...rr,...sn],on=["as","like","by","in","desc","asc"],nr=[...Jt,...nn,..._t,...er,...yt],ln=[...nr,...an],vt={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(?:${Zt.map(t=>t.label).join("|")})\\b`,"i"),alias:"function"},function:{pattern:new RegExp(`\\b(?:${ln.map(t=>t.label).join("|")})\\b`,"i")},keyword:{pattern:new RegExp(`(\\s+)(${on.join("|")})(?=\\s+)`,"i"),lookbehind:!0},"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+/},cn=[{category:"Lambda",examples:[{title:"View latency statistics for 5-minute intervals",expr:V`filter @type = "REPORT" | stats avg(@duration), max(@duration), min(@duration) by bin(5m)`},{title:"Determine the amount of overprovisioned memory",expr:tn`filter @type = "REPORT" | stats max(@memorySize / 1000 / 1000) as provisionedMemoryMB, min(@maxMemoryUsed / 1000 / 1000) as smallestMemoryRequestMB, avg(@maxMemoryUsed / 1000 / 1000) as avgMemoryUsedMB, max(@maxMemoryUsed / 1000 / 1000) as maxMemoryUsedMB, provisionedMemoryMB - maxMemoryUsedMB as overProvisionedMB `},{title:"Find the most expensive requests",expr:V`filter @type = "REPORT" | fields @requestId, @billedDuration | sort by @billedDuration desc`}]},{category:"VPC Flow Logs",examples:[{title:"Average, min, and max byte transfers by source and destination IP addresses",expr:"stats avg(bytes), min(bytes), max(bytes) by srcAddr, dstAddr"},{title:"IP addresses using UDP transfer protocol",expr:"filter protocol=17 | stats count(*) by srcAddr"},{title:"Top 10 byte transfers by source and destination IP addresses",expr:V`stats sum(bytes) as bytesTransferred by srcAddr, dstAddr | sort bytesTransferred desc | limit 10`},{title:"Top 20 source IP addresses with highest number of rejected requests",expr:V`filter action="REJECT" | stats count(*) as numRejections by srcAddr | sort numRejections desc | limit 20`},{title:"Find the top 15 packet transfers across hosts",expr:V`stats sum(packets) as packetsTransferred by srcAddr, dstAddr | sort packetsTransferred desc | limit 15`},{title:"Find the IP addresses where flow records were skipped during the capture window",expr:V`filter logStatus="SKIPDATA" | stats count(*) by bin(1h) as t | sort t`}]},{category:"CloudTrail",examples:[{title:"Number of log entries by service, event type, and region",expr:"stats count(*) by eventSource, eventName, awsRegion"},{title:"Number of log entries by region and EC2 event type",expr:V`filter eventSource="ec2.amazonaws.com" | stats count(*) as eventCount by eventName, awsRegion | sort eventCount desc`},{title:"Regions, usernames, and ARNs of newly created IAM users",expr:V`filter eventName="CreateUser" | fields awsRegion, requestParameters.userName, responseElements.user.arn`},{title:"Find EC2 hosts that were started or stopped in a given AWS Region",expr:V`filter (eventName="StartInstances" or eventName="StopInstances") and region="us-east-2"`},{title:"Find the number of records where an exception occurred while invoking the UpdateTrail API",expr:V`filter eventName="UpdateTrail" and ispresent(errorCode) | stats count(*) by errorCode, errorMessage`},{title:"Find log entries where TLS 1.0 or 1.1 was used",expr:V`filter tlsDetails.tlsVersion in [ "TLSv1", "TLSv1.1" ] | stats count(*) as numOutdatedTlsCalls by userIdentity.accountId, recipientAccountId, eventSource, eventName, awsRegion, tlsDetails.tlsVersion, tlsDetails.cipherSuite, userAgent | sort eventSource, eventName, awsRegion, tlsDetails.tlsVersion`},{title:"Find the number of calls per service that used TLS versions 1.0 or 1.1",expr:V`filter tlsDetails.tlsVersion in [ "TLSv1", "TLSv1.1" ] | stats count(*) as numOutdatedTlsCalls by eventSource | sort numOutdatedTlsCalls desc`}]},{category:"Common Queries",examples:[{title:"25 most recently added log events",expr:V`fields @timestamp, @message | sort @timestamp desc | limit 25`},{title:"Number of exceptions logged every 5 minutes",expr:V`filter @message like /Exception/ | stats count(*) as exceptionCount by bin(5m) | sort exceptionCount desc`},{title:"List of log events that are not exceptions",expr:"fields @message | filter @message not like /Exception/"},{title:"To parse and count fields",expr:V`fields @timestamp, @message | filter @message like /User ID/ | parse @message "User ID: *" as @userId | stats count(*) by @userId`},{title:"To Identify faults on any API calls",expr:V`filter Operation = <operation> AND Fault > 0 | fields @timestamp, @logStream as instanceId, ExceptionMessage`},{title:"To get the number of exceptions logged every 5 minutes using regex where exception is not case sensitive",expr:V`filter @message like /(?i)Exception/ | stats count(*) as exceptionCount by bin(5m) | sort exceptionCount desc`},{title:"To parse ephemeral fields using a glob expression",expr:V`parse @message "user=*, method:*, latency := *" as @user, @method, @latency | stats avg(@latency) by @method, @user`},{title:"To parse ephemeral fields using a glob expression using regular expression",expr:V`parse @message /user=(?<user2>.*?), method:(?<method2>.*?), latency := (?<latency2>.*?)/ | stats avg(latency2) by @method2, @user2`},{title:"To extract ephemeral fields and display field for events that contain an ERROR string",expr:V`fields @message | parse @message "* [*] *" as loggingTime, loggingType, loggingMessage | filter loggingType IN ["ERROR"] | display loggingMessage, loggingType = "ERROR" as isError`},{title:"To trim whitespaces from query results",expr:V`fields trim(@message) as trimmedMessage | parse trimmedMessage "[*] * * Retrieving CloudWatch Metrics for AccountID : *, CloudWatch Metric : *, Resource Type : *, ResourceID : *" as level, time, logId, accountId, metric, type, resourceId | display level, time, logId, accountId, metric, type, resourceId | filter level like "INFO"`}]},{category:"Route 53",examples:[{title:"Number of requests received every 10 minutes by edge location",expr:"stats count(*) by queryType, bin(10m)"},{title:"Number of unsuccessful requests by domain",expr:'filter responseCode="SERVFAIL" | stats count(*) by queryName'},{title:"Top 10 DNS resolver IPs with highest number of requests",expr:"stats count(*) as numRequests by resolverIp | sort numRequests desc | limit 10"}]},{category:"AWS AppSync",examples:[{title:"Number of unique HTTP status codes",expr:V`fields ispresent(graphQLAPIId) as isApi | filter isApi | filter logType = "RequestSummary" | stats count() as statusCount by statusCode | sort statusCount desc`},{title:"Top 10 resolvers with maximum latency",expr:V`fields resolverArn, duration | filter logType = "Tracing" | sort duration desc | limit 10`},{title:"Most frequently invoked resolvers",expr:V`fields ispresent(resolverArn) as isRes | stats count() as invocationCount by resolverArn | filter isRes | filter logType = "Tracing" | sort invocationCount desc | limit 10`},{title:"Resolvers with most errors in mapping templates",expr:V`fields ispresent(resolverArn) as isRes | stats count() as errorCount by resolverArn, logType | filter isRes and (logType = "RequestMapping" or logType = "ResponseMapping") and fieldInError | sort errorCount desc | limit 10`},{title:"Field latency statistics",expr:V`fields requestId, latency | filter logType = "RequestSummary" | sort latency desc | limit 10`},{title:"Resolver latency statistics",expr:V`fields ispresent(resolverArn) as isRes | filter isRes | filter logType = "Tracing" | stats min(duration), max(duration), avg(duration) as avgDur by resolverArn | sort avgDur desc | limit 10`},{title:"Top 10 requests with maximum latency",expr:V`fields requestId, latency | filter logType = "RequestSummary" | sort latency desc | limit 10`}]}],un=[{category:"fields",examples:[{description:"Retrieve one or more log fields. You can also use functions and operations such as abs(a+b), sqrt(a/b), log(a)+log(b), strlen(trim()), datefloor(), isPresent(), and others in this command.",expr:"fields @log, @logStream, @message, @timestamp"}]},{category:"filter",examples:[{description:"Retrieve log fields based on one or more conditions. You can use comparison operators such as =, !=, >, >=, <, <=, boolean operators such as and, or, and not, and regular expressions in this command.",expr:"filter @message like /(?i)(Exception|error|fail|5dd)/"}]},{category:"stats",examples:[{description:"Calculate aggregate statistics such as sum(), avg(), count(), min() and max() for log fields.",expr:"stats count() by bin(5m)"}]},{category:"sort",examples:[{description:"Sort the log fields in ascending or descending order.",expr:"sort @timestamp asc"}]},{category:"limit",examples:[{description:"Limit the number of log events returned by a query.",expr:"limit 10"}]},{category:"parse",examples:[{description:"Create one or more ephemeral fields, which can be further processed by the query. The following example will extract the ephemeral fields host, identity, dateTimeString, httpVerb, url, protocol, statusCode, bytes from @message, and return the url, max(bytes), and avg(bytes) fields sorted by max(bytes) in descending order.",expr:V`parse '* - * [*] "* * *" * *' as host, identity, dateTimeString, httpVerb, url, protocol, statusCode, bytes | stats max(bytes) as maxBytes, avg(bytes) by url | sort maxBytes desc`}]}];function sr(t,e){const r=vt,a=(0,qt.R)(Yt().tokenize(t,r)).filter(o=>typeof o!="string").map((o,i)=>s.createElement("span",{className:`prism-token token ${o.types.join(" ")} ${o.aliases.join(" ")}`,key:`${e}-token-${i}`},o.content));return s.createElement("div",{className:"slate-query-field"},a)}const dn=(0,T.css)` margin-top: 5px; `,mn=(0,T.css)` text-decoration: underline; `,pn=t=>{const[e,r]=(0,s.useState)(!1),[n,a]=(0,s.useState)(!1);return s.createElement("div",null,s.createElement("h3",null,"CloudWatch Logs cheat sheet"),s.createElement(Xt.S,{label:"Commands",collapsible:!0,isOpen:e,onToggle:o=>r(o)},s.createElement(s.Fragment,null,un.map((o,i)=>s.createElement("div",{key:`cat-${i}`},s.createElement("h5",null,o.category),o.examples.map((l,c)=>s.createElement("div",{key:`item-${c}`},s.createElement("p",null,l.description),s.createElement("button",{type:"button",className:"cheat-sheet-item__example",key:l.expr,onClick:()=>t.onClickExample({refId:t.query.refId??"A",expression:l.expr,queryMode:"Logs",region:t.query.region,id:t.query.refId??"A",logGroupNames:"logGroupNames"in t.query?t.query.logGroupNames:[],logGroups:"logGroups"in t.query?t.query.logGroups:[]})},s.createElement("pre",null,sr(l.expr,`item-${c}`))))))))),s.createElement(Xt.S,{label:"Queries",collapsible:!0,isOpen:n,onToggle:o=>a(o)},cn.map((o,i)=>s.createElement("div",{key:`cat-${i}`},s.createElement("div",{className:`cheat-sheet-item__title ${(0,T.cx)(dn)}`},o.category),o.examples.map((l,c)=>s.createElement("div",{className:"cheat-sheet-item",key:`item-${c}`},s.createElement("h4",null,l.title),s.createElement("button",{type:"button",className:"cheat-sheet-item__example",key:l.expr,onClick:()=>t.onClickExample({refId:t.query.refId??"A",expression:l.expr,queryMode:"Logs",region:t.query.region,id:t.query.refId??"A",logGroupNames:"logGroupNames"in t.query?t.query.logGroupNames:[],logGroups:"logGroups"in t.query?t.query.logGroups:[]})},s.createElement("pre",null,sr(l.expr,`item-${c}`)))))))),s.createElement("div",null,"Note: If you are seeing masked data, you may have CloudWatch logs data protection enabled."," ",s.createElement("a",{className:(0,T.cx)(mn),href:"https://grafana.com/docs/grafana/latest/datasources/aws-cloudwatch/#cloudwatch-logs-data-protection",target:"_blank",rel:"noreferrer"},"See documentation for details"),"."))};var gn=m(40996),ar=m(97899),Se=m(22391),Et=m(65879),bt=m(91062),oe=m(32264),fn=m(44027),St=m(19347),ge=m(42418),or=m(25994),Je=m(88575),ie=m(10354),ve=m(14186),hn=m(17081),ee=m(2543),ke=m(62467),yn=m(44240),Ae=m(39070),vn=m(26657),Te=m(72574),ir=m(6191),_e=m(22354),Ie=m(9e4),k=m(81580),At=m(79458),Ee=m(68402);const Ve=t=>t.queryMode==="Logs",De=t=>t.queryMode==="Metrics"||!t.hasOwnProperty("queryMode"),lr=t=>t.queryMode==="Annotations",En=t=>t.target?.queryMode==="Annotations";var bn=m(45214),Tt=m(41053),te=m(50877),y=m(25640);const Qe=t=>({label:t,value:t}),fe=(t,e)=>[...e,{label:"Template Variables",options:t.getVariables().map(Qe)}],cr=t=>{const{region:e,metricQueryType:r,metricEditorMode:n,expression:a,metricName:o,namespace:i,sqlExpression:l,statistic:c}=t;return e?r===y.d$.Search&&n===y.Rx.Builder?!!i&&!!o&&!!c:r===y.d$.Search&&n===y.Rx.Code?!!a:r===y.d$.Query?!!l:!1:!1},It=t=>{const[e,r]=(0,s.useState)(!1),[n,a]=(0,s.useState)([{label:"default",value:"default"}]);return(0,s.useEffect)(()=>{r(!0);const o={label:"Template Variables",options:t.getVariables().map(te.z)};t.resources.getRegions().then(i=>a([...i,o])).finally(()=>r(!1))},[t]),[n,e]},Ct=t=>{const[e,r]=(0,s.useState)([]);return(0,s.useEffect)(()=>{t.resources.getNamespaces().then(n=>{r(fe(t,n))})},[t]),e},wt=(t,{region:e,namespace:r,accountId:n})=>{const[a,o]=(0,s.useState)([]);return e&&(e=t.templateSrv.replace(e,{})),r&&(r=t.templateSrv.replace(r,{})),n&&(n=t.templateSrv.replace(n,{})),(0,s.useEffect)(()=>{t.resources.getMetrics({namespace:r,region:e,accountId:n}).then(i=>{o(fe(t,i))})},[t,e,r,n]),a},Be=(t,{region:e,namespace:r,metricName:n,dimensionFilters:a,accountId:o})=>{const[i,l]=(0,s.useState)([]);return e&&(e=t.templateSrv.replace(e,{})),r&&(r=t.templateSrv.replace(r,{})),n&&(n=t.templateSrv.replace(n,{})),o&&(o=t.templateSrv.replace(o,{})),a&&(a=t.resources.convertDimensionFormat(a,{},!1)),(0,bn.A)(()=>{t.resources.getDimensionKeys({namespace:r,region:e,metricName:n,accountId:o,dimensionFilters:a},!1).then(c=>{l(fe(t,c))})},[t,r,e,n,o,a]),i},Ue=(t,e)=>{const[r,n]=(0,s.useState)(""),a=t.templateSrv.replace(e);return(0,s.useEffect)(()=>{if(t.resources.isVariableWithMultipleOptionsSelected(e)){const o=`Template variables with multiple selected options are not supported for ${e}`;r!==o&&n(o);return}r&&n("")},[t.resources,e,a,r]),r},Sn=(t,e)=>{const[r,n]=(0,s.useState)(!1);return e&&(e=t.templateSrv.replace(e,{})),(0,s.useEffect)(()=>{oe.$.featureToggles.cloudWatchCrossAccountQuerying&&t.isMonitoringAccount(e).then(a=>n(a))},[e,t]),r},xt=(t,e)=>{e&&(e=t?.templateSrv.replace(e,{})??"");const r=async()=>{if(!oe.$.featureToggles.cloudWatchCrossAccountQuerying)return Promise.resolve([]);const o=await t?.getAccounts({region:e})??[];if(o.length===0)return[];const i=o.map(d=>({label:d.label,value:d.id,description:d.id})),c={label:"Template Variables",options:t?.getVariables().map(te.z)||[]};return[...i,c]},[n,a]=(0,Tt.A)(r,[t,e]);return(0,s.useEffect)(()=>{a()},[t,e,a]),n};var ur=m(71087),et=m(97801),Z=m(88323);const tt=["Average","Maximum","Minimum","Sum","SampleCount","IQM"],Ge={label:"All",value:"all",description:"Target all linked accounts"};function dr({accountId:t,onChange:e,accountOptions:r}){const n=(0,s.useMemo)(()=>r.find(a=>a.options?a.options.find(i=>i.value===t):a.value===t),[r,t]);return r.length===0?null:s.createElement(k.c,{label:"Account",width:26,tooltip:"A CloudWatch monitoring account views data from source accounts so you can centralize monitoring and troubleshooting activities across multiple accounts. Go to the CloudWatch settings page in the AWS console for more details."},s.createElement(Z.l6,{"aria-label":"Account Selection",value:n?t:Ge.value,options:[Ge,...r],onChange:({value:a})=>{e(a)}}))}var rt=m(7650),ze=m(81392),je=m(3721),he=m(40845);const mr={value:"*",label:"*"},An=(t,e)=>Object.entries(t??{}).reduce((r,[n,a])=>n!==e?{...r,[n]:a}:r,{}),Tn=({filter:t,metricStat:e,datasource:r,disableExpressions:n,onChange:a,onDelete:o})=>{const{region:i,namespace:l,metricName:c,dimensions:d,accountId:u}=e,g=Ue(r,t.key),p=(0,s.useMemo)(()=>An(d??{},t.key),[d,t]),b=Be(r,{...e,dimensionFilters:p}),h=async()=>t.key?r.resources.getDimensionValues({dimensionKey:t.key,dimensionFilters:p,region:i,namespace:l,metricName:c,accountId:u}).then(I=>(I.length&&!n&&!I.some(M=>M.value===mr.value)&&I.unshift(mr),fe(r,I))):[],[S,v]=(0,Tt.A)(h,[t.key,d,i,l,c,u]),x=(0,he.of)(In);return s.createElement("div",{className:x.container,"data-testid":"cloudwatch-dimensions-filter-item"},s.createElement(ze.M,null,s.createElement(Z.l6,{"aria-label":"Dimensions filter key",inputId:"cloudwatch-dimensions-filter-item-key",width:"auto",value:t.key?(0,te.z)(t.key):null,allowCustomValue:!0,options:b,onChange:I=>{I.label&&a({key:I.label,value:void 0})}}),s.createElement("span",{className:(0,T.cx)(x.root)},"="),s.createElement(Z.l6,{"aria-label":"Dimensions filter value",inputId:"cloudwatch-dimensions-filter-item-value",onOpenMenu:v,width:"auto",value:t.value?(0,te.z)(t.value):null,allowCustomValue:!0,isLoading:S.loading,options:S.value,onChange:I=>{I.value&&a({...t,value:I.value})}}),s.createElement(je.Z,{"aria-label":"remove",icon:"times",variant:"secondary",onClick:o,type:"button"})),g&&s.createElement(ge.F,{className:x.alert,title:g,severity:"error",topSpacing:1}))},In=t=>({root:(0,T.css)({padding:t.spacing(0,1),alignSelf:"center"}),container:(0,T.css)({display:"inline-block"}),alert:(0,T.css)({minWidth:"100%",width:"min-content"})}),Cn=t=>Object.entries(t??{}).reduce((e,[r,n])=>{if(!n)return e;let a="";if(typeof n=="string"?a=n:Array.isArray(n)&&typeof n[0]=="string"&&(a=n[0]),!a)return e;const o={key:r,value:a,operator:"="};return[...e,o]},[]),wn=t=>t.reduce((e,{key:r,value:n})=>r&&n?{...e,[r]:n}:e,{}),Rt=({metricStat:t,datasource:e,disableExpressions:r,onChange:n})=>{const a=(0,s.useMemo)(()=>Cn(t.dimensions),[t.dimensions]),[o,i]=(0,s.useState)(a),l=c=>{i(c);const d=wn(c);(0,ee.isEqual)(d,t.dimensions)||n(d)};return s.createElement(rt.o,{items:o,onChange:l,renderItem:xn(e,t,r)})};function xn(t,e,r){function n(a,o,i){return s.createElement(Tn,{filter:a,onChange:l=>o(l),datasource:t,metricStat:e,disableExpressions:r,onDelete:i})}return n}const Rn=/^(p|tm|tc|ts|wm)\d{2}(?:\.\d{1,2})?$/,Ln="\\d*(\\.\\d+)?%?:\\d*(\\.\\d+)?%?",On=new RegExp(`^(PR|TM|TC|TS|WM)\\((${Ln})\\)$`),pr=({refId:t,metricStat:e,datasource:r,disableExpressions:n=!1,onChange:a})=>{const o=Ct(r),i=wt(r,e),l=xt(r.resources,e.region);(0,s.useEffect)(()=>{r.resources.isMonitoringAccount(e.region).then(u=>{u&&!l.loading&&l.value?.length&&!e.accountId&&a({...e,accountId:"all"}),!l.loading&&l.value&&!l.value.length&&e.accountId&&a({...e,accountId:void 0})})},[l,e,a,r.resources]);const c=async u=>{const g=await d(u);a(g)},d=async u=>{let{metricName:g,namespace:p,region:b}=u;return g?(await r.resources.getMetrics({namespace:p,region:b}).then(h=>{h.find(S=>S.value===g)||(g="")}),{...u,metricName:g}):u};return s.createElement(ur.D,null,s.createElement(Ie.U,null,!n&&oe.$.featureToggles.cloudWatchCrossAccountQuerying&&s.createElement(dr,{accountId:e.accountId,onChange:u=>{a({...e,accountId:u})},accountOptions:l?.value||[]}),s.createElement(et.B,null,s.createElement(k.c,{label:"Namespace",width:26},s.createElement(Z.l6,{"aria-label":"Namespace",value:e?.namespace&&Qe(e.namespace),allowCustomValue:!0,options:o,onChange:({value:u})=>{u&&c({...e,namespace:u})}})),s.createElement(k.c,{label:"Metric name",width:16},s.createElement(Z.l6,{"aria-label":"Metric name",value:e?.metricName&&Qe(e.metricName),allowCustomValue:!0,options:i,onChange:({value:u})=>{u&&a({...e,metricName:u})}})),s.createElement(k.c,{label:"Statistic",width:16},s.createElement(Z.l6,{inputId:`${t}-metric-stat-editor-select-statistic`,allowCustomValue:!0,value:Qe(e.statistic??tt[0]),options:fe(r,tt.filter(u=>u!==e.statistic).map(Qe)),onChange:({value:u})=>{!u||!tt.includes(u)&&!(Rn.test(u)||On.test(u))&&!r.templateSrv.containsTemplate(u)||a({...e,statistic:u})}})))),s.createElement(Ie.U,null,s.createElement(k.c,{label:"Dimensions"},s.createElement(Rt,{metricStat:e,onChange:u=>a({...e,dimensions:u}),disableExpressions:n,datasource:r})),!n&&s.createElement(k.c,{label:"Match exact",optional:!0,tooltip:"Only show metrics that exactly match all defined dimension names."},s.createElement(At.C,{id:`${t}-cloudwatch-match-exact`,value:!!e.matchExact,onChange:u=>{a({...e,matchExact:u.currentTarget.checked})}}))))},Mn=t=>{const{query:e,onChange:r,datasource:n}=t,[a,o]=It(n);return lr(e)?s.createElement(s.Fragment,null,s.createElement(ir.X,null,s.createElement(_e.W,{label:"Region",value:a.find(i=>i.value===e.region),placeholder:"Select region",allowCustomValue:!0,onChange:({value:i})=>i&&r({...e,region:i}),options:a,isLoading:o})),s.createElement(Ee.$,{v:.5}),s.createElement(pr,{...t,refId:e.refId,metricStat:e,disableExpressions:!0,onChange:i=>r({...e,...i})}),s.createElement(Ee.$,{v:.5}),s.createElement(Ie.U,null,s.createElement(k.c,{label:"Period",width:26,tooltip:"Minimum interval between points in seconds."},s.createElement(ie.p,{value:e.period||"",placeholder:"auto",onChange:i=>r({...e,period:i.target.value})})),s.createElement(k.c,{label:"Enable Prefix Matching",optional:!0},s.createElement(At.C,{value:e.prefixMatching,onChange:i=>{r({...e,prefixMatching:i.currentTarget.checked})}})),s.createElement(k.c,{label:"Action",optional:!0,disabled:!e.prefixMatching},s.createElement(ie.p,{value:e.actionPrefix||"",onChange:i=>r({...e,actionPrefix:i.target.value})})),s.createElement(k.c,{label:"Alarm Name",optional:!0,disabled:!e.prefixMatching},s.createElement(ie.p,{value:e.alarmNamePrefix||"",onChange:i=>r({...e,alarmNamePrefix:i.target.value})})))):s.createElement(ge.F,{severity:"error",title:"Invalid annotation query",topSpacing:2},JSON.stringify(e,null,4))},Fn={queryMode:"Metrics",namespace:"",metricName:"",expression:"",dimensions:{},region:"default",id:"",statistic:"Average",period:"",metricQueryType:y.d$.Search,metricEditorMode:y.Rx.Builder,sqlExpression:"",matchExact:!0},Lt={queryMode:"Annotations",namespace:"",region:"default",statistic:"Average"},Nn=`fields @timestamp, @message | sort @timestamp desc | limit 20`,Dn=(t,e)=>({id:"",region:"default",logGroupNames:e,logGroups:t??[]}),Gn={queryType:y.b4.Regions,region:"default"},Wn={prepareAnnotation:t=>En(t)?t:{datasource:t.datasource,enable:t.enable,iconColor:t.iconColor,name:t.name,builtIn:t.builtIn,hide:t.hide,target:{...t.target,...t,statistic:t.statistic||Lt.statistic,region:t.region||Lt.region,queryMode:"Annotations",refId:t.refId||"annotationQuery"}},prepareQuery:t=>{if(!t.target)return;const{prefixMatching:e,actionPrefix:r,alarmNamePrefix:n,statistic:a,namespace:o,metricName:i,dimensions:l={}}=t.target,c=!!e&&!!r&&!!n,d=!e&&!!o&&!!i&&!!a&&!!Object.values(l).length;if(c||d)return t.target},getDefaultQuery(){return Lt},QueryEditor:Mn};var gr=m(75505),Re=m(75071);const fr=/\$(\w+)|\[\[(\w+?)(?::(\w+))?\]\]|\${(\w+)(?:\.([^:^\}]+))?(?::([^\}]+))?}/g,Pn=t=>(fr.lastIndex=0,fr.exec(t)),nt=t=>{const e=Pn(t);return e?e.slice(1).find(n=>n!==void 0):null},Ot=(t,e,r,n)=>{n=n??"value";const a=n==="value"?"pipe":"text";let o=[];for(const i of e){const l=nt(i),c=t.getVariables().find(({name:d})=>d===l);if(c&&"current"in c&&Kn(c.current)){const d=c.current[n];if(Array.isArray(d)){const u=a==="text"?" + ":"|";o.push(...t.replace(i,r,a).split(u))}else typeof d=="string"&&o.push(t.replace(i,r,a))}else o.push(i)}return o},hr=(t,e)=>{const r=nt(e);return t.getVariables().some(({name:n})=>n===r)},Kn=t=>t.hasOwnProperty("value")&&t.hasOwnProperty("text");class $n extends R.Is{constructor(e,r,n){super(),this.started=!1,this.cleanText=a=>a.replace(/[()]/g,"").trim(),this.request=(a,o)=>(0,gr.s)(this.datasource.logsQueryRunner.awsRequest(a,o)),this.start=()=>(this.startTask||(this.startTask=Promise.resolve().then(()=>(this.started=!0,[]))),this.startTask),this.fetchFields=async(a,o)=>{const i=Ot(this.templateSrv,a.map(c=>c.name),{},"text");return(await Promise.all(i.map(c=>this.datasource.resources.getLogGroupFields({logGroupName:c,region:o}).then(d=>d.filter(u=>u).map(u=>u.value.name??""))))).flat()},this.handleKeyword=async a=>{const o=await this.getFieldCompletionItems(a?.logGroups,a?.region||"default"),i=[{searchFunctionType:Re.T.Prefix,label:"Functions",items:_t.concat(er,yt)}];return o.suggestions.push(...i),o},this.handleCommand=async(a,o,i)=>{const l=a.content.toLowerCase(),c=We(o),d=c===a;if(l==="sort")return this.handleSortCommand(d,o,i);if(l==="parse"&&d)return await this.getFieldCompletionItems(i?.logGroups??[],i?.region||"default");const u=Ce(a.next,"whitespace")&&!a.next?.next,g=u||kn(a)===o,p=Ce(o,"punctuation",","),b=p||Ce(c,"punctuation",",");if(!(g||b))return{suggestions:[]};if(["display","fields"].includes(l)){const h=await this.getFieldCompletionItems(i?.logGroups??[],i?.region||"default");return h.suggestions.push(...this.getFieldAndFilterFunctionCompletionItems().suggestions),h}if(l==="stats"){const h=this.getStatsAggCompletionItems();return(p||u)&&h?.suggestions.forEach(S=>{S.skipFilter=!0}),h}if(l==="filter"&&d){const h=await this.getFieldCompletionItems(i?.logGroups,i?.region||"default"),S=this.getBoolFuncCompletionItems();return h.suggestions.push(...S.suggestions),h}return{suggestions:[]}},this.handleComparison=async a=>{const o=await this.getFieldCompletionItems(a?.logGroups,a?.region||"default"),i=this.getComparisonCompletionItems();return o.suggestions.push(...i.suggestions),o},this.getCommandCompletionItems=()=>({suggestions:[{searchFunctionType:Re.T.Prefix,label:"Commands",items:Zt}]}),this.getFieldAndFilterFunctionCompletionItems=()=>({suggestions:[{searchFunctionType:Re.T.Prefix,label:"Functions",items:nr}]}),this.getStatsAggCompletionItems=()=>({suggestions:[{searchFunctionType:Re.T.Prefix,label:"Functions",items:rr}]}),this.getBoolFuncCompletionItems=()=>({suggestions:[{searchFunctionType:Re.T.Prefix,label:"Functions",items:tr}]}),this.getComparisonCompletionItems=()=>({suggestions:[{searchFunctionType:Re.T.Prefix,label:"Functions",items:Jt.concat(tr)}]}),this.getFieldCompletionItems=async(a,o)=>a?{suggestions:[{label:"Fields",items:(await this.fetchFields(a,o)).map(l=>({label:l,insertText:l.match(/@?[_a-zA-Z]+[_.0-9a-zA-Z]*/)?void 0:`\`${l}\``}))}]}:{suggestions:[]},this.datasource=e,this.templateSrv=r??(0,Te.w)(),Object.assign(this,n)}getSyntax(){return vt}isStatsQuery(e){const r=this.getSyntax();return!!(Yt().tokenize(e,r)??[]).find(a=>typeof a!="string"&&a.content.toString().toLowerCase()==="stats"&&a.type==="query-command")}async provideCompletionItems(e,r){const{value:n}=e,a=n?.data.get("tokens");if(!a||!a.length)return{suggestions:[]};const o=a.filter(u=>u.offsets.start<=n.selection?.start?.offset&&u.offsets.end>=n.selection?.start?.offset)[0],i=!o.prev,l=We(o);if(i||!i&&l?.types.includes("command-separator"))return this.getCommandCompletionItems();if(Bn(o))return await this.getFieldCompletionItems(r?.logGroups,r?.region||"default");if(Un("by",o))return this.handleKeyword(r);if(l?.types.includes("comparison-operator"))return this.handleComparison(r);const d=Vn(o);return d?await this.handleCommand(d,o,r):{suggestions:[]}}async handleSortCommand(e,r,n){return e?await this.getFieldCompletionItems(n?.logGroups,n?.region||"default"):Ce(We(r),"field-name")?{suggestions:[{searchFunctionType:Re.T.Prefix,label:"Sort Order",items:[{label:"asc"},{label:"desc"}]}]}:{suggestions:[]}}}function kn(t){let e=t;for(;e.next;)if(e.next.types.includes("whitespace"))e=e.next;else return e.next;return null}function We(t){let e=t;for(;e.prev;)if(Ce(e.prev,"whitespace"))e=e.prev;else return e.prev;return null}function Vn(t){let e=t;for(;e.prev;)if(e=e.prev,e.types.includes("query-command")&&(!e.prev||Ce(We(e),"command-separator")))return e;return null}const Qn=["avg","count","count_distinct","earliest","latest","sortsFirst","sortsLast","max","min","pct","stddev","ispresent","fromMillis","toMillis","isempty","isblank","isValidIp","isValidIpV4","isValidIpV6","isIpInSubnet","isIpv4InSubnet","isIpv6InSubnet"].map(t=>t.toLowerCase());function Bn(t){const e=We(t);if(!e)return!1;const r=t.content==="("?t:e.content==="("?e:void 0;if(r){const n=We(r);if(n)return Qn.includes(n.content.toLowerCase())&&n.types.includes("function")}return!1}function Un(t,e){const r=yr(e,["whitespace","function","punctuation","field-name","number"]);if(Ce(r,"keyword","by")){const n=yr(e,["whitespace"]);if(n===r||Ce(n,"punctuation",","))return!0}return!1}function Ce(t,e,r){return!(!t?.types.includes(e)||r&&t?.content.toLowerCase()!==r)}function yr(t,e){let r=t.prev;e:for(;r;){for(const n of e)if(typeof n=="string"){if(r.types.includes(n)){r=r.prev;continue e}}else if(r.types.includes(n.type)&&r.content.toLowerCase()===n.value){r=r.prev;continue e}break}return r}class zn{constructor(e,r,n,a,o,i){this.type=e,this.value=r,this.range=n,this.previous=a,this.next=o,this.tokenTypes=i}isKeyword(){return this.type===this.tokenTypes.Keyword}isWhiteSpace(){return this.type===this.tokenTypes.Whitespace}isParenthesis(){return this.type===this.tokenTypes.Parenthesis}isIdentifier(){return this.type===this.tokenTypes.Identifier}isString(){return this.type===this.tokenTypes.String}isDoubleQuotedString(){return this.type===this.tokenTypes.Type}isVariable(){return this.type===this.tokenTypes.Variable}isFunction(){return this.type===this.tokenTypes.Function}isNumber(){return this.type===this.tokenTypes.Number}is(e,r){const n=this.type===e;return r!==void 0?n&&this.value===r:n}endsWith(e){return this.value===e||this.value[this.value.length-1]===e}getPreviousNonWhiteSpaceToken(){let e=this.previous;for(;e!=null;){if(!e.isWhiteSpace())return e;e=e.previous}return null}getPreviousOfType(e,r){let n=this.previous;for(;n!=null;){const a=n.type===e;if(r!==void 0?a&&n.value===r:a)return n;n=n.previous}return null}getPreviousUntil(e,r,n){let a=[],o=this.previous;for(;o!=null;){if(r.some(l=>l===o?.type)){o=o.previous;continue}const i=o.type===e;if(n!==void 0?i&&o.value===n:i)return a;o.isWhiteSpace()||a.push(o),o=o.previous}return a}getNextUntil(e,r,n){let a=[],o=this.next;for(;o!=null;){if(r.some(l=>l===o?.type)){o=o.next;continue}const i=o.type===e;if(n!==void 0?i&&o.value===n:i)return a;o.isWhiteSpace()||a.push(o),o=o.next}return a}getPreviousKeyword(){let e=this.previous;for(;e!=null;){if(e.isKeyword())return e;e=e.previous}return null}getNextNonWhiteSpaceToken(){let e=this.next;for(;e!=null;){if(!e.isWhiteSpace())return e;e=e.next}return null}getNextOfType(e,r){let n=this.next;for(;n!=null;){const a=n.type===e;if(r!==void 0?a&&n.value===r:a)return n;n=n.next}return null}}function vr(t,e,r,n,a){let o=null,i=null;const l=t.editor.tokenize(r.getValue()??"",e.id);for(let c=0;c<l.length;c++){const d=l[c];if(!d.length&&i){const u={offset:0,type:a.Whitespace,language:e.id,_tokenBrand:void 0};d.push(u)}for(let u=0;u<d.length;u++){const g=d[u];let p=d.length>u+1?d[u+1].offset+1:r.getLineLength(c+1)+1;const b={startLineNumber:c+1,startColumn:g.offset===0?0:g.offset+1,endLineNumber:c+1,endColumn:p},h=r.getValueInRange(b),S=new zn(g.type,h,b,i,null,a);t.Range.containsPosition(b,n)&&(o=S),i&&(i.next=S),i=S}}return o}var f=(t=>(t[t.Unknown=0]="Unknown",t[t.SelectKeyword=1]="SelectKeyword",t[t.AfterSelectKeyword=2]="AfterSelectKeyword",t[t.AfterSelectFuncFirstArgument=3]="AfterSelectFuncFirstArgument",t[t.AfterFromKeyword=4]="AfterFromKeyword",t[t.SchemaFuncFirstArgument=5]="SchemaFuncFirstArgument",t[t.SchemaFuncExtraArgument=6]="SchemaFuncExtraArgument",t[t.FromKeyword=7]="FromKeyword",t[t.AfterFrom=8]="AfterFrom",t[t.WhereKey=9]="WhereKey",t[t.WhereComparisonOperator=10]="WhereComparisonOperator",t[t.WhereValue=11]="WhereValue",t[t.AfterWhereValue=12]="AfterWhereValue",t[t.AfterGroupByKeywords=13]="AfterGroupByKeywords",t[t.AfterGroupBy=14]="AfterGroupBy",t[t.AfterOrderByKeywords=15]="AfterOrderByKeywords",t[t.AfterOrderByFunction=16]="AfterOrderByFunction",t[t.AfterOrderByDirection=17]="AfterOrderByDirection",t[t.PredefinedFunction=18]="PredefinedFunction",t[t.SearchFuncSecondArg=19]="SearchFuncSecondArg",t[t.SearchFuncThirdArg=20]="SearchFuncThirdArg",t[t.PredefinedFuncSecondArg=21]="PredefinedFuncSecondArg",t[t.AfterFunction=22]="AfterFunction",t[t.WithinString=23]="WithinString",t[t.NewCommand=24]="NewCommand",t[t.Comment=25]="Comment",t[t.DedupKeyword=26]="DedupKeyword",t[t.AfterDedupKeyword=27]="AfterDedupKeyword",t[t.DisplayKeyword=28]="DisplayKeyword",t[t.AfterDisplayKeyword=29]="AfterDisplayKeyword",t[t.FieldsKeyword=30]="FieldsKeyword",t[t.AfterFieldsKeyword=31]="AfterFieldsKeyword",t[t.FilterKeyword=32]="FilterKeyword",t[t.AfterFilterKeyword=33]="AfterFilterKeyword",t[t.FilterArg=34]="FilterArg",t[t.LimitKeyword=35]="LimitKeyword",t[t.AfterLimitKeyword=36]="AfterLimitKeyword",t[t.ParseKeyword=37]="ParseKeyword",t[t.AfterParseKeyword=38]="AfterParseKeyword",t[t.SortKeyword=39]="SortKeyword",t[t.AfterSortKeyword=40]="AfterSortKeyword",t[t.SortArg=41]="SortArg",t[t.StatsKeyword=42]="StatsKeyword",t[t.AfterStatsKeyword=43]="AfterStatsKeyword",t[t.AsKeyword=44]="AsKeyword",t[t.AfterAsKeyword=45]="AfterAsKeyword",t[t.ByKeyword=46]="ByKeyword",t[t.AfterByKeyword=47]="AfterByKeyword",t[t.InKeyword=48]="InKeyword",t[t.AfterInKeyword=49]="AfterInKeyword",t[t.LikeKeyword=50]="LikeKeyword",t[t.AfterLikeKeyword=51]="AfterLikeKeyword",t[t.Function=52]="Function",t[t.FunctionArg=53]="FunctionArg",t[t.CommandArg=54]="CommandArg",t[t.AfterCommand=55]="AfterCommand",t[t.ArithmeticOperator=56]="ArithmeticOperator",t[t.ArithmeticOperatorArg=57]="ArithmeticOperatorArg",t[t.BooleanOperator=58]="BooleanOperator",t[t.BooleanOperatorArg=59]="BooleanOperatorArg",t[t.ComparisonOperator=60]="ComparisonOperator",t[t.ComparisonOperatorArg=61]="ComparisonOperatorArg",t))(f||{}),C=(t=>(t[t.SelectKeyword=0]="SelectKeyword",t[t.FunctionsWithArguments=1]="FunctionsWithArguments",t[t.Metrics=2]="Metrics",t[t.FromKeyword=3]="FromKeyword",t[t.SchemaKeyword=4]="SchemaKeyword",t[t.Namespaces=5]="Namespaces",t[t.LabelKeys=6]="LabelKeys",t[t.WhereKeyword=7]="WhereKeyword",t[t.GroupByKeywords=8]="GroupByKeywords",t[t.OrderByKeywords=9]="OrderByKeywords",t[t.FunctionsWithoutArguments=10]="FunctionsWithoutArguments",t[t.LimitKeyword=11]="LimitKeyword",t[t.SortOrderDirectionKeyword=12]="SortOrderDirectionKeyword",t[t.ComparisonOperators=13]="ComparisonOperators",t[t.LabelValues=14]="LabelValues",t[t.LogicalOperators=15]="LogicalOperators",t[t.KeywordArguments=16]="KeywordArguments",t[t.Operators=17]="Operators",t[t.Statistic=18]="Statistic",t[t.Period=19]="Period",t[t.Command=20]="Command",t[t.Function=21]="Function",t[t.InKeyword=22]="InKeyword",t))(C||{}),re=(t=>(t.High="a",t.MediumHigh="d",t.Medium="g",t.MediumLow="k",t.Low="q",t))(re||{});class Mt{constructor(e,r=(0,Te.w)()){this.resources=e,this.templateSrv=r,this.templateSrv=r,this.tokenTypes={Parenthesis:"delimiter.parenthesis",Whitespace:"white",Keyword:"keyword",Delimiter:"delimiter",Operator:"operator",Identifier:"identifier",Type:"type",Function:"predefined",Number:"number",String:"string",Variable:"variable",Comment:"comment",Regexp:"regexp"}}getStatementPosition(e){return f.Unknown}getSuggestionKinds(e){return[]}getSuggestions(e,r,n,a,o){return Promise.reject([])}getCompletionProvider(e,r){return{triggerCharacters:[" ","$",",","(","'"],provideCompletionItems:async(n,a)=>{const o=vr(e,r,n,a,this.tokenTypes),i=this.getStatementPosition(o),l=this.getSuggestionKinds(i);return{suggestions:await this.getSuggestions(e,o,l,i,a)}}}}}const z={id:"editor.action.triggerSuggest",title:""};var A=m(85232);const P={Parenthesis:"delimiter.parenthesis.sql",Whitespace:"white.sql",Keyword:"keyword.sql",Delimiter:"delimiter.sql",Operator:"operator.sql",Identifier:"identifier.sql",Type:"type.sql",Function:"predefined.sql",Number:"number.sql",String:"string.sql",Variable:"variable.sql",Comment:"comment.sql",Regexp:"regexp.sql"};function jn(t){const e=t?.getPreviousNonWhiteSpaceToken(),r=t?.getPreviousKeyword(),n=t?.getPreviousNonWhiteSpaceToken()?.is(P.Operator,"/");return t===null||t.isWhiteSpace()&&t.previous===null||t.is(P.Keyword,A.SELECT)&&t.previous===null||n||t.isIdentifier()&&(n||t?.previous===null)?f.SelectKeyword:e?.value===A.SELECT?f.AfterSelectKeyword:(e?.is(P.Parenthesis,"(")||t?.is(P.Parenthesis,"()"))&&r?.value===A.SELECT?f.AfterSelectFuncFirstArgument:r?.value===A.SELECT&&e?.isParenthesis()?f.FromKeyword:e?.value===A.FROM?f.AfterFromKeyword:(e?.is(P.Parenthesis,"(")||t?.is(P.Parenthesis,"()"))&&r?.value===A.SCHEMA?f.SchemaFuncFirstArgument:r?.value===A.SCHEMA&&e?.is(P.Delimiter,",")?f.SchemaFuncExtraArgument:r?.value===A.FROM&&e?.isDoubleQuotedString()||r?.value===A.FROM&&e?.isVariable()||r?.value===A.SCHEMA&&e?.is(P.Parenthesis,")")?f.AfterFrom:r?.value===A.WHERE&&(e?.isKeyword()||e?.is(P.Parenthesis,"(")||e?.is(P.Operator,A.AND))?f.WhereKey:r?.value===A.WHERE&&(e?.isIdentifier()||e?.isDoubleQuotedString())?f.WhereComparisonOperator:r?.value===A.WHERE&&(e?.is(P.Operator,A.EQUALS)||e?.is(P.Operator,A.NOT_EQUALS))?f.WhereValue:r?.value===A.WHERE&&(e?.isString()||e?.is(P.Parenthesis,")"))?f.AfterWhereValue:r?.is(P.Keyword,A.BY)&&r?.getPreviousKeyword()?.is(P.Keyword,A.GROUP)&&(e?.is(P.Keyword,A.BY)||e?.is(P.Delimiter,","))?f.AfterGroupByKeywords:r?.is(P.Keyword,A.BY)&&r?.getPreviousKeyword()?.is(P.Keyword,A.GROUP)&&(e?.isIdentifier()||e?.isDoubleQuotedString())?f.AfterGroupBy:e?.is(P.Keyword,A.BY)&&e?.getPreviousKeyword()?.is(P.Keyword,A.ORDER)?f.AfterOrderByKeywords:r?.is(P.Keyword,A.BY)&&r?.getPreviousKeyword()?.is(P.Keyword,A.ORDER)&&e?.is(P.Parenthesis)&&e?.getPreviousNonWhiteSpaceToken()?.is(P.Function)?f.AfterOrderByFunction:r?.is(P.Keyword,A.DESC)||r?.is(P.Keyword,A.ASC)?f.AfterOrderByDirection:f.Unknown}function Hn(t){switch(t){case f.SelectKeyword:return[C.SelectKeyword];case f.AfterSelectKeyword:return[C.FunctionsWithArguments];case f.AfterSelectFuncFirstArgument:return[C.Metrics];case f.AfterFromKeyword:return[C.Namespaces,C.SchemaKeyword];case f.SchemaFuncFirstArgument:return[C.Namespaces];case f.SchemaFuncExtraArgument:return[C.LabelKeys];case f.FromKeyword:return[C.FromKeyword];case f.AfterFrom:return[C.WhereKeyword,C.GroupByKeywords,C.OrderByKeywords,C.LimitKeyword];case f.WhereKey:return[C.LabelKeys];case f.WhereComparisonOperator:return[C.ComparisonOperators];case f.WhereValue:return[C.LabelValues];case f.AfterWhereValue:return[C.LogicalOperators,C.GroupByKeywords,C.OrderByKeywords,C.LimitKeyword];case f.AfterGroupByKeywords:return[C.LabelKeys];case f.AfterGroupBy:return[C.OrderByKeywords,C.LimitKeyword];case f.AfterOrderByKeywords:return[C.FunctionsWithoutArguments];case f.AfterOrderByFunction:return[C.SortOrderDirectionKeyword,C.LimitKeyword];case f.AfterOrderByDirection:return[C.LimitKeyword]}return[]}const Er=t=>t?.getPreviousOfType(P.Keyword,A.SELECT)??null,Yn=t=>{const e=Er(t)?.getNextNonWhiteSpaceToken();return e?.isVariable()||e?.isFunction()?e:null},Ft=t=>{const e=Yn(t)?.next?.next;return e?.isVariable()||e?.isIdentifier()?e:null},Xn=t=>Er(t)?.getNextOfType(P.Keyword,A.FROM),Nt=t=>{const r=Xn(t)?.getNextNonWhiteSpaceToken();if(r?.isDoubleQuotedString()||r?.isVariable()&&r?.value.toUpperCase()!==A.SCHEMA)return r;if(r?.isKeyword()&&r.next?.is(P.Parenthesis,"(")){const n=r.next?.next;if(n?.isDoubleQuotedString()||n?.isVariable())return n}return null};class qn extends Mt{constructor(e,r=(0,Te.w)()){super(e,r),this.region=e.getActualRegion()??"",this.getStatementPosition=jn,this.getSuggestionKinds=Hn,this.tokenTypes=P}setRegion(e){this.region=e}async getSuggestions(e,r,n,a,o){let i=[];const c=r?.isWhiteSpace()||r?.isParenthesis()||!r?.range?e.Range.fromPositions(o):r?.range,d=(g,p={})=>({label:g,insertText:g,kind:e.languages.CompletionItemKind.Field,range:c,sortText:re.Medium,...p});function u(g,p={}){i=[...i,d(g,p)]}for(const g of n)switch(g){case C.SelectKeyword:u(A.SELECT,{insertText:`${A.SELECT} $0`,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,kind:e.languages.CompletionItemKind.Keyword,command:z});break;case C.FunctionsWithArguments:A.STATISTICS.map(h=>u(h,{insertText:`${h}($0)`,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,command:z,kind:e.languages.CompletionItemKind.Function}));break;case C.FunctionsWithoutArguments:A.STATISTICS.map(h=>u(h,{insertText:`${h}() `,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,command:z,kind:e.languages.CompletionItemKind.Function}));break;case C.Metrics:{const h=Nt(r);if(h?.value)(await this.resources.getMetrics({namespace:h?.value.replace(/\"/g,""),region:this.region})).forEach(v=>v.value&&u(v.value));else{const S=await this.resources.getAllMetrics({region:this.region});(0,ee.uniq)(S.map(v=>v.metricName)).forEach(v=>v&&u(v,{insertText:v}))}}break;case C.FromKeyword:u(A.FROM,{insertText:`${A.FROM} `,command:z});break;case C.SchemaKeyword:u(A.SCHEMA,{sortText:re.High,insertText:`${A.SCHEMA}($0)`,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,command:z,kind:e.languages.CompletionItemKind.Function});break;case C.Namespaces:const p=Ft(r);let b=[];if(p?.value){const h=await this.resources.getMetrics({region:this.region}),S=this.templateSrv.replace(p.value);b=h.filter(v=>v.metricName===S).map(v=>v.namespace)}else b=(await this.resources.getNamespaces()).map(S=>S.value);b.map(h=>u(`"${h}"`,{insertText:`"${h}"`}));break;case C.LabelKeys:{const h=Ft(r),S=Nt(r);if(S?.value){let v={},x;a===f.SchemaFuncExtraArgument?x=S?.getNextUntil(this.tokenTypes.Parenthesis,[this.tokenTypes.Delimiter,this.tokenTypes.Whitespace]):a===f.AfterGroupByKeywords&&(x=r?.getPreviousUntil(this.tokenTypes.Keyword,[this.tokenTypes.Delimiter,this.tokenTypes.Whitespace])),v=(x||[]).reduce((M,X)=>({...M,[X.value]:null}),{}),(await this.resources.getDimensionKeys({namespace:this.templateSrv.replace(S.value.replace(/\"/g,"")),region:this.templateSrv.replace(this.region),metricName:h?.value,dimensionFilters:v},!1)).map(M=>{const X=/[\s\.-]/.test(M.value??"")?`"${M.value}"`:M.value;X&&u(X)})}}break;case C.LabelValues:{const h=Nt(r),S=Ft(r),v=r?.getPreviousNonWhiteSpaceToken()?.getPreviousNonWhiteSpaceToken();h?.value&&v?.value&&S?.value&&(await this.resources.getDimensionValues({region:this.region,namespace:h.value.replace(/\"/g,""),metricName:S.value,dimensionKey:v.value})).map(I=>u(`'${I.value}'`,{insertText:`'${I.value}' `,command:z}))}break;case C.LogicalOperators:A.LOGICAL_OPERATORS.map(h=>u(`${h}`,{insertText:`${h} `,command:z,sortText:re.MediumHigh}));break;case C.WhereKeyword:u(`${A.WHERE}`,{insertText:`${A.WHERE} `,command:z,sortText:re.High});break;case C.ComparisonOperators:A.COMPARISON_OPERATORS.map(h=>u(`${h}`,{insertText:`${h} `,command:z}));break;case C.GroupByKeywords:u(`${A.GROUP} ${A.BY}`,{insertText:`${A.GROUP} ${A.BY} `,command:z,sortText:re.MediumHigh});break;case C.OrderByKeywords:u(`${A.ORDER} ${A.BY}`,{insertText:`${A.ORDER} ${A.BY} `,command:z,sortText:re.Medium});break;case C.LimitKeyword:u(A.LIMIT,{insertText:`${A.LIMIT} `,sortText:re.MediumLow});break;case C.SortOrderDirectionKeyword:[A.ASC,A.DESC].map(h=>u(h,{insertText:`${h} `,command:z}));break}return this.templateSrv.getVariables().map(g=>{const p=`$${g.name}`;u(p,{range:c,label:p,insertText:p,kind:e.languages.CompletionItemKind.Variable,sortText:re.Low})}),i}}var U=m(89089);const ue="cloudwatch-logs",Dt={id:ue,extensions:[],aliases:[],mimetypes:[],loader:()=>Promise.resolve().then(m.bind(m,89089))},le={Parenthesis:`delimiter.parenthesis.${ue}`,Whitespace:`white.${ue}`,Keyword:`keyword.${ue}`,Delimiter:`delimiter.${ue}`,Operator:`operator.${ue}`,Identifier:`identifier.${ue}`,Type:`type.${ue}`,Function:`predefined.${ue}`,Number:`number.${ue}`,String:`string.${ue}`,Variable:`variable.${ue}`,Comment:`comment.${ue}`,Regexp:`regexp.${ue}`},Zn=t=>{const e=t?.getPreviousNonWhiteSpaceToken(),r=t?.getNextNonWhiteSpaceToken(),n=t?.value?.toLowerCase(),a=e?.value?.toLowerCase();if(t?.is(le.Comment))return f.Comment;if(t?.isFunction())return f.Function;if(t===null||t?.isWhiteSpace()&&e===null&&r===null||e?.is(le.Delimiter,"|")&&t?.isWhiteSpace()||t?.isIdentifier()&&(e?.is(le.Delimiter,"|")||e===null))return f.NewCommand;if(t?.is(le.Delimiter,")")||t?.isWhiteSpace()&&e?.is(le.Delimiter,")")){const i=t?.getPreviousOfType(le.Delimiter,"(")?.getPreviousNonWhiteSpaceToken()?.value?.toLowerCase();if(i){if(U.LOGS_COMMANDS.includes(i))return f.AfterCommand;if(U.LOGS_FUNCTION_OPERATORS.includes(i))return f.AfterFunction}}if(t?.isKeyword()&&n)switch(n){case U.DEDUP:return f.DedupKeyword;case U.DISPLAY:return f.DisplayKeyword;case U.FIELDS:return f.FieldsKeyword;case U.FILTER:return f.FilterKeyword;case U.LIMIT:return f.LimitKeyword;case U.PARSE:return f.ParseKeyword;case U.STATS:return f.StatsKeyword;case U.SORT:return f.SortKeyword;case"as":return f.AsKeyword;case"by":return f.ByKeyword;case"in":return f.InKeyword;case"like":return f.LikeKeyword}if(t?.isWhiteSpace()&&e?.isKeyword&&a)switch(a){case U.DEDUP:return f.AfterDedupKeyword;case U.DISPLAY:return f.AfterDisplayKeyword;case U.FIELDS:return f.AfterFieldsKeyword;case U.FILTER:return f.AfterFilterKeyword;case U.LIMIT:return f.AfterLimitKeyword;case U.PARSE:return f.AfterParseKeyword;case U.STATS:return f.AfterStatsKeyword;case U.SORT:return f.AfterSortKeyword;case"as":return f.AfterAsKeyword;case"by":return f.AfterByKeyword;case"in":return f.AfterInKeyword;case"like":return f.AfterLikeKeyword}if(t?.is(le.Operator)&&n){if(["+","-","*","/","^","%"].includes(n))return f.ArithmeticOperator;if(["=","!=","<",">","<=",">="].includes(n))return f.ComparisonOperator;if(U.LOGS_LOGIC_OPERATORS.includes(n))return f.BooleanOperator}if(e?.is(le.Operator)&&a){if(["+","-","*","/","^","%"].includes(a))return f.ArithmeticOperatorArg;if(["=","!=","<",">","<=",">="].includes(a))return f.ComparisonOperatorArg;if(U.LOGS_LOGIC_OPERATORS.includes(a))return f.BooleanOperatorArg}if(t?.isIdentifier()||t?.isNumber()||t?.is(le.Parenthesis,"()")||t?.is(le.Delimiter,",")||t?.is(le.Parenthesis,")")||t?.isWhiteSpace()&&e?.is(le.Delimiter,",")||t?.isWhiteSpace()&&e?.isIdentifier()||t?.isWhiteSpace()&&e?.isKeyword()&&a&&U.LOGS_COMMANDS.includes(a)){const o=t?.getPreviousOfType(le.Keyword),i=t?.getPreviousOfType(le.Function);if(o!==null&&i===null)return o.value===U.SORT?f.SortArg:o.value===U.FILTER?f.FilterArg:f.CommandArg;if(i!==null&&o===null)return f.FunctionArg;if(o!==null&&i!==null){if(o.range.startLineNumber>i.range.startLineNumber||o.range.endColumn>i.range.endColumn)return o.value===U.SORT?f.SortArg:o.value===U.FILTER?f.FilterArg:f.CommandArg;if(i.range.startLineNumber>o.range.startLineNumber||i.range.endColumn>o.range.endColumn)return f.FunctionArg}}return f.Unknown};function Jn(t){switch(t){case f.NewCommand:return[C.Command];case f.AfterSortKeyword:case f.SortArg:return[C.SortOrderDirectionKeyword,C.Function];case f.AfterDisplayKeyword:case f.AfterFieldsKeyword:case f.AfterFilterKeyword:case f.AfterStatsKeyword:case f.AfterLimitKeyword:case f.AfterParseKeyword:case f.AfterDedupKeyword:case f.CommandArg:case f.FunctionArg:case f.ArithmeticOperatorArg:case f.BooleanOperatorArg:case f.ComparisonOperatorArg:return[C.Function];case f.FilterArg:return[C.InKeyword,C.Function]}return[]}function _n(t,e=(0,Te.w)()){return r=>new es(t,e,r)}class es extends Mt{constructor(e,r=(0,Te.w)(),n){super(e,r),this.fetchFields=async(a,o)=>{const i=await Promise.all(a.map(l=>this.resources.getLogGroupFields({logGroupName:l.name,arn:l.arn,region:o}).then(c=>c.filter(d=>d).map(d=>d.value.name??""))));return[...new Set(i.flat())]},this.getStatementPosition=Zn,this.getSuggestionKinds=Jn,this.tokenTypes=le,this.queryContext=n}async getSuggestions(e,r,n,a,o){const i=[],c=r?.isWhiteSpace()||r?.isParenthesis()||!r?.range?e.Range.fromPositions(o):r?.range;function d(g,p={}){return{label:g,insertText:g,kind:e.languages.CompletionItemKind.Field,range:c,sortText:re.Medium,...p}}function u(g,p={}){i.push(d(g,p))}for(const g of n)switch(g){case C.Command:U.LOGS_COMMANDS.forEach(p=>{u(p,{insertText:`${p} $0`,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,command:z,kind:e.languages.CompletionItemKind.Method})});break;case C.Function:if(U.LOGS_FUNCTION_OPERATORS.forEach(p=>{u(p,{insertText:`${p}($0)`,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,command:z,kind:e.languages.CompletionItemKind.Function})}),this.queryContext.logGroups&&this.queryContext.logGroups.length>0){let p=await this.fetchFields(this.queryContext.logGroups,this.queryContext.region);p.push("@log"),p.forEach(b=>{b!==""&&u(b,{range:c,label:b,insertText:b,kind:e.languages.CompletionItemKind.Field,sortText:re.High})})}break;case C.SortOrderDirectionKeyword:U.SORT_DIRECTION_KEYWORDS.forEach(p=>{u(p,{sortText:re.High,kind:e.languages.CompletionItemKind.Operator})});break;case C.InKeyword:u("in []",{insertText:'in ["$0"]',insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,kind:e.languages.CompletionItemKind.Snippet,sortText:re.High});break}return this.templateSrv.getVariables().map(g=>{const p=`$${g.name}`;u(p,{range:c,label:p,insertText:p,kind:e.languages.CompletionItemKind.Variable,sortText:re.Low})}),i}}var He=m(74746);const Ye={Parenthesis:"delimiter.parenthesis.cloudwatch-MetricMath",Whitespace:"white.cloudwatch-MetricMath",Keyword:"keyword.cloudwatch-MetricMath",Delimiter:"delimiter.cloudwatch-MetricMath",Operator:"operator.cloudwatch-MetricMath",Identifier:"identifier.cloudwatch-MetricMath",Type:"type.cloudwatch-MetricMath",Function:"predefined.cloudwatch-MetricMath",Number:"number.cloudwatch-MetricMath",String:"string.cloudwatch-MetricMath",Variable:"variable.cloudwatch-MetricMath",Comment:"comment.cloudwatch-MetricMath",Regexp:"regexp.cloudwatch-MetricMath"};function ts(t){const e=t?.getPreviousNonWhiteSpaceToken();if(t&&t.isString())return f.WithinString;if(t&&e){const r=t.getPreviousOfType(Ye.Function),n=e.is(Ye.Delimiter,","),a=r&&r.value==="SEARCH",o=t.getPreviousUntil(Ye.Function,[],"SEARCH")||[];if(a){if(o.filter(({value:l})=>l==="'").length===1)return f.WithinString;const i=e.getPreviousOfType(Ye.Delimiter,",");return i&&i.range.startColumn>r.range.startColumn&&i.range.startLineNumber>=r.range.startLineNumber?f.SearchFuncThirdArg:f.SearchFuncSecondArg}if(!a&&n)return f.PredefinedFuncSecondArg}return e?.endsWith(")")?f.AfterFunction:!t||!t.isString()?f.PredefinedFunction:f.Unknown}function rs(t){switch(t){case f.PredefinedFunction:return[C.FunctionsWithArguments];case f.PredefinedFuncSecondArg:return[C.FunctionsWithArguments,C.KeywordArguments];case f.AfterFunction:return[C.Operators];case f.SearchFuncSecondArg:return[C.Statistic];case f.SearchFuncThirdArg:return[C.Period]}return[]}class ns extends Mt{constructor(e,r=(0,Te.w)()){super(e,r),this.getStatementPosition=ts,this.getSuggestionKinds=rs,this.tokenTypes=Ye}async getSuggestions(e,r,n,a,o){let i=[];const c=r?.isWhiteSpace()||r?.isParenthesis()||!r?.range?e.Range.fromPositions(o):r?.range,d=(g,p={})=>({label:g,insertText:g,kind:e.languages.CompletionItemKind.Field,range:c,sortText:re.Medium,...p});function u(g,p={}){i=[...i,d(g,p)]}for(const g of n)switch(g){case C.FunctionsWithArguments:He.METRIC_MATH_FNS.map(p=>u(p,{insertText:p==="SEARCH"?`${p}('$0')`:`${p}($0)`,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,command:z,kind:e.languages.CompletionItemKind.Function}));break;case C.KeywordArguments:He.METRIC_MATH_KEYWORDS.map(p=>u(p,{insertText:p,command:z,kind:e.languages.CompletionItemKind.Keyword,sortText:re.MediumHigh}));break;case C.Statistic:He.METRIC_MATH_STATISTIC_KEYWORD_STRINGS.map(p=>u(p,{insertText:`'${p}', `,command:z}));break;case C.Operators:He.METRIC_MATH_OPERATORS.map(p=>u(p,{insertText:`${p} `,command:z}));break;case C.Period:u("$__period_auto",{kind:e.languages.CompletionItemKind.Variable,sortText:"a",detail:"Sets period dynamically to adjust to selected time range."}),He.METRIC_MATH_PERIODS.map((p,b)=>u(p.toString(),{kind:e.languages.CompletionItemKind.Value,sortText:String.fromCharCode(97+b)}));break}return this.templateSrv.getVariables().map(g=>{const p=`$${g.name}`;u(p,{range:c,label:p,insertText:p,kind:e.languages.CompletionItemKind.Variable,sortText:re.Low})}),i}}var st=m(26272),br=m(17172);const Sr=(t,e=7e3)=>{const r=(0,ee.memoize)((...n)=>(0,ee.debounce)(t,e,{leading:!0}),(...n)=>JSON.stringify(n));return(...n)=>r(...n)(...n)};class at{constructor(e,r){this.instanceSettings=e,this.dsQueryEndpoint="/api/ds/query",this.debouncedCustomAlert=Sr(ss),this.templateSrv=r,this.ref=(0,Se.p$)(e)}awsRequest(e,r,n={}){const a={method:"POST",url:e,data:r,headers:n};return(0,br.AI)().fetch(a)}convertDimensionFormat(e,r,n=!0){return Object.entries(e).reduce((a,[o,i])=>{if(o=this.replaceVariableAndDisplayWarningIfMulti(o,r,n,"dimension keys"),Array.isArray(i))return{...a,[o]:i};if(!i)return{...a,[o]:null};const l=this.expandVariableToArray(i,r);return{...a,[o]:l}},{})}expandVariableToArray(e,r){const n=nt(e),a=this.templateSrv.getVariables().find(({name:o})=>o===n);return n&&a?(a?.type==="custom"||a?.type==="query"||a?.type==="datasource")&&a.multi?this.templateSrv.replace(e,r,"pipe").split("|"):[this.templateSrv.replace(e,r)]:[e]}convertMultiFilterFormat(e,r){return Object.entries(e).reduce((n,[a,o])=>{const i=this.replaceVariableAndDisplayWarningIfMulti(a,{},!0,r);if(!o)return{...n,[i]:null};const l=[],c=o.reduce((d,u)=>{const g=this.expandVariableToArray(u,{});return[...d,...g]},l);return{...n,[i]:c}},{})}isMultiVariable(e){if(e){const n=this.templateSrv.getVariables().find(({name:o})=>o===nt(e)),a=n?.type;return(a==="custom"||a==="query"||a==="datasource")&&n?.multi}return!1}isVariableWithMultipleOptionsSelected(e,r){return!e||!this.isMultiVariable(e)?!1:this.expandVariableToArray(e,r||{}).length>1}replaceVariableAndDisplayWarningIfMulti(e,r,n,a){return n&&this.isVariableWithMultipleOptionsSelected(e)&&this.debouncedCustomAlert("CloudWatch templating error",`Multi template variables are not supported for ${a||e}`),this.templateSrv.replace(e,r)}getActualRegion(e){return e==="default"||e===void 0||e===""?this.instanceSettings.jsonData.defaultRegion??"":e}getVariables(){return this.templateSrv.getVariables().map(e=>`$${e.name}`)}}const ss=(t,e)=>(0,E.J7)().publish({type:st.r1.alertError.name,payload:[t,e]});class as extends at{constructor(e,r){super(e,r)}handleAnnotationQuery(e,r,n){return n({...r,targets:e.map(a=>({...a,statistic:this.templateSrv.replace(a.statistic),region:this.templateSrv.replace(this.getActualRegion(a.region)),namespace:this.templateSrv.replace(a.namespace),metricName:this.templateSrv.replace(a.metricName),dimensions:this.convertDimensionFormat(a.dimensions??{},{}),period:a.period??"",actionPrefix:a.actionPrefix??"",alarmNamePrefix:a.alarmNamePrefix??"",type:"annotationQuery",datasource:this.ref}))})}}var Pe=m(81160),Ar=m(69862),Tr=m(65474),os=m(95864),is=m(31731),Ir=m(1005),ls=m(29405),cs=m(43431),us=m(59099),ds=m(46662),ms=m(69850),Cr=m(66847),Gt=m(88483),Wt=m(9557),ps=m(43127);const gs=m(50287),fs="console.aws.amazon.com",hs="console.amazonaws-us-gov.com",ys="console.amazonaws.cn";function vs(t){let e=fs;return t.startsWith("us-gov-")&&(e=hs),t.startsWith("cn-")&&(e=ys),`${t}.${e}`}function wr(t,e){return`https://${vs(e)}/cloudwatch/home?region=${e}#logs-insights:queryDetail=${gs.stringify(t)}`}async function Es(t,e,r,n,a,o){const i=(c,d)=>r(c,e.scopedVars,!1,d),l=c=>n(c,e.scopedVars);for(const c of t.data){const d=e.targets.find(g=>g.refId===c.refId),u=a(i(d.region??"","region"));for(const g of c.fields)if(g.name==="@xrayTraceId"&&o){a(i(d.region??"","region"));const p=await bs(o,u);p&&(g.config.links=[p])}else g.config.links=[Ss(d,e.range,u,i,l)]}}async function bs(t,e){let r;try{r=await(0,St.l)().get(t)}catch(n){console.error("Could not load linked xray data source, it was probably deleted after it was linked",n);return}return{title:r.name,url:"",internal:{query:{query:"${__value.raw}",queryType:"getTrace",region:e},datasourceUid:t,datasourceName:r.name}}}function Ss(t,e,r,n,a){const o=(t.logGroups??[]).filter(p=>p?.arn).map(p=>(p.arn??"").replace(/:\*$/,"")),i=t.logGroupNames??[],l=o?.length?o:i,c=t.expression?n(t.expression):"",d=l?.flatMap(a),u={end:e.to.toISOString(),start:e.from.toISOString(),timeType:"ABSOLUTE",tz:"UTC",editorString:c,isLiveTail:!1,source:d};return{url:wr(u,r),title:"View in CloudWatch console",targetBlank:!0}}var Pt=m(47773);function As(t,e,r){const n=new Date;let a=0,o,i,l={};const c=d=>Math.pow(2,d)*1e3+Math.random()*100;return new Gt.c(d=>{function u(g){i=t(g).subscribe({next(p){const b=(0,Pt.bE)({data:{results:l}}).data||[];d.next({frames:[...b,...p]}),d.complete()},error(p){if(typeof p=="string"){d.error(p);return}const b=Ts(p);if(!b){d.error(p);return}if(!b.errors.length){d.error(p);return}if(r(a,n.valueOf())){if(Object.keys(l).length||Object.keys(b.good).length){const h=(0,Pt.bE)({data:{results:{...b.good??{},...l??{}}}});h.error={...h.error??{},message:`Some queries timed out: ${b.errorMessage}`},d.next({error:h.error,frames:h.data}),d.complete()}else{const h=(0,Pt.bE)({data:{results:p.data?.results??{}}});d.error(h.error)}return}l={...l,...b.good},o=setTimeout(()=>{a++,u(b.errors)},c(a+1))}})}return u(e),()=>{clearTimeout(o),i.unsubscribe()}})}function Ts(t){const e=t.data?.results;if(e)return Object.keys(e).reduce((r,n)=>(e[n].error?.startsWith("LimitExceededException")?(r.errorMessage=e[n].error,r.errors.push(t.config.data.queries.find(a=>a.refId===n))):r.good[n]=e[n],r),{errors:[],good:{},errorMessage:""})}var Is=m(44838);const Cs=({startPeriod:t=0,endPeriod:e=5e3,step:r=1e3},n=Is.E)=>new Gt.c(a=>{const o={subscriber:a,counter:0,period:t,step:r,endPeriod:e};return a.add(n.schedule(ws,t,o)),a});function ws(t){if(!t)return;const{subscriber:e,counter:r,period:n,step:a,endPeriod:o}=t;e.next(r);const i=Math.min(n+a,o);this.schedule({subscriber:e,counter:r+1,period:i,step:a,endPeriod:o},i)}const xs="__log__grafana_internal__",Rs="__logstream__grafana_internal__";class Ls extends at{constructor(e,r){super(e,r),this.logQueries={},this.getQueryResults=({frames:n,error:a,logQueries:o,timeoutFunc:i,queryFn:l})=>n.every(c=>[y.YZ.Complete,y.YZ.Cancelled,y.YZ.Failed].includes(c.meta?.custom?.Status))?(0,ke.of)({data:n,key:"test-key",state:Ae.Gu.Done}):this.logsQuery(n.map(c=>({queryId:c.fields[0].values[0],region:c.meta?.custom?.Region??"default",refId:c.refId,statsGroups:o.find(d=>d.refId===c.refId)?.statsGroups})),i,l).pipe((0,Pe.T)(c=>(!c.error&&a&&(c.error=a),c))),this.handleLogQueries=(n,a,o)=>{const l=n.filter(this.filterQuery).map(u=>{const g=Ot(this.templateSrv,(u.logGroups||this.instanceSettings.jsonData.logGroups||[]).map(S=>S.arn),a.scopedVars),p=Ot(this.templateSrv,u.logGroupNames||this.instanceSettings.jsonData.defaultLogGroups||[],a.scopedVars,"text"),b=(0,ee.uniq)(g).map(S=>({arn:S,name:S})),h=(0,ee.uniq)(p);return{refId:u.refId,region:this.templateSrv.replace(this.getActualRegion(u.region)),queryString:this.templateSrv.replace(u.expression||"",a.scopedVars),logGroups:b,logGroupNames:h}}),c=new Date,d=()=>Date.now()>=c.valueOf()+Et.intervalToMs(this.logsTimeout);return As(u=>this.makeLogActionRequest("StartQuery",u,o,a),l,d).pipe((0,Ar.Z)(({frames:u,error:g})=>this.getQueryResults({frames:u,logQueries:n,timeoutFunc:d,error:g,queryFn:o})),(0,Ar.Z)(u=>(0,Tr.H)((async()=>(await Es(u,a,this.replaceVariableAndDisplayWarningIfMulti.bind(this),this.expandVariableToArray.bind(this),this.getActualRegion.bind(this),this.tracingDataSourceUid),u))())))},this.getLogRowContext=async(n,{limit:a=10,direction:o=Wt.ZF.Backward}={},i,l)=>{let c=null,d=null;for(const p of n.dataFrame.fields)if(p.name===Rs){if(c=p,d!==null)break}else if(p.name===xs&&(d=p,c!==null))break;const u={refId:l?.refId||"A",limit:a,startFromHead:o!==Wt.ZF.Backward,region:l?.region||"",logGroupName:Ms(d.values[n.rowIndex]),logStreamName:c.values[n.rowIndex]};return o===Wt.ZF.Backward?u.endTime=n.timeEpochMs:u.startTime=n.timeEpochMs,{data:await(0,gr.s)(this.makeLogActionRequest("GetLogEvents",[u],i))}},this.tracingDataSourceUid=e.jsonData.tracingDatasourceUid,this.logsTimeout=e.jsonData.logsTimeout||"30m"}logsQuery(e,r,n){this.logQueries={},e.forEach(c=>{this.logQueries[c.refId]={id:c.queryId,region:c.region,statsQuery:(c.statsGroups?.length??0)>0}});const a=Cs({startPeriod:100,endPeriod:1e3,step:300}).pipe((0,os.H)(c=>this.makeLogActionRequest("GetQueryResults",e,n)),(0,is.u)(),(0,Ir.u)()),o={failures:0,prevRecordsMatched:{}},i=a.pipe((0,ls.S)(({failures:c,prevRecordsMatched:d},u)=>{c++;for(const g of u){const p=g.meta?.stats?.find(b=>b.displayName==="Records scanned")?.value;p>(d[g.refId]??0)&&(c=0),d[g.refId]=p}return{failures:c,prevRecordsMatched:d}},o),(0,Pe.T)(({failures:c})=>c),(0,Ir.u)()),l=(0,cs.y)(a,i).pipe((0,us.M)(([c])=>{for(const d of c)[y.YZ.Complete,y.YZ.Cancelled,y.YZ.Failed].includes(d.meta?.custom?.Status)&&this.logQueries.hasOwnProperty(d.refId)&&delete this.logQueries[d.refId]}),(0,Pe.T)(([c,d])=>{if(r())for(const u of c)(0,ee.set)(u,"meta.custom.Status",y.YZ.Cancelled);return{data:c,key:"test-key",state:c.every(u=>[y.YZ.Complete,y.YZ.Cancelled,y.YZ.Failed].includes(u.meta?.custom?.Status))?Ae.Gu.Done:Ae.Gu.Loading,error:r()?{message:`error: query timed out after ${d} attempts`,type:R.v2.Timeout}:void 0}}),(0,ds.v)(({state:c})=>c!==Ae.Gu.Error&&c!==Ae.Gu.Done,!0));return Os(l,()=>this.stopQueries(n))}stopQueries(e){Object.keys(this.logQueries).length>0&&this.makeLogActionRequest("StopQuery",Object.values(this.logQueries).map(r=>({queryId:r.id,region:r.region,queryString:"",refId:""})),e).pipe((0,ms.j)(()=>{this.logQueries={}}))}makeLogActionRequest(e,r,n,a){const o=a?.range||(0,ps.E2)(),i={...a,range:o,skipQueryCache:!0,requestId:a?.requestId||"",interval:a?.interval||"",intervalMs:a?.intervalMs||1,scopedVars:a?.scopedVars||{},timezone:a?.timezone||"",app:a?.app||"",startTime:a?.startTime||0,targets:r.map(l=>({...l,id:"",queryMode:"Logs",refId:l.refId||"A",intervalMs:1,maxDataPoints:1,datasource:this.ref,type:"logAction",subtype:e}))};return n(i).pipe((0,Pe.T)(l=>l.data),(0,Cr.W)(l=>{throw oe.$.featureToggles.datasourceQueryMultiStatus&&l.status===207||l.status===400?l:l.data?.error?l.data.error:l.data?.message?l.data.message:l}))}filterQuery(e){const r=!e.logGroupNames?.length,n=!e.logGroups?.length,a=!e.expression?.length;return!(n&&r||a)}}function Os(t,e){return new Gt.c(r=>{const n=t.subscribe({next:a=>r.next(a),error:a=>r.next(a),complete:()=>r.complete()});return()=>{n.unsubscribe(),e()}})}function Ms(t){const e=t.lastIndexOf(":");return t.slice(e+1)}var Fs=m(72724),Ns=m(11261);const Ds=({region:t})=>s.createElement("p",null,"Please visit the\xA0",s.createElement("a",{target:"_blank",rel:"noreferrer",className:"text-link",href:`https://${t}.console.aws.amazon.com/servicequotas/home?region=${t}#!/services/monitoring/quotas/L-5E141212`},"AWS Service Quotas console"),"\xA0to request a quota increase or see our\xA0",s.createElement("a",{target:"_blank",rel:"noreferrer",className:"text-link",href:"https://grafana.com/docs/grafana/latest/datasources/cloudwatch/#manage-service-quotas"},"documentation"),"\xA0to learn more.");var Gs=m(32017),Ws=m.n(Gs);function Kt(t){const e=Ps(t);return Ws()(e,t)?t:e}const xr={metric:"PROP('MetricName')",namespace:"PROP('Namespace')",period:"PROP('Period')",region:"PROP('Region')",stat:"PROP('Stat')",label:"LABEL"};function Ps(t){if(!t.hasOwnProperty("label")){const e={...t};if(!t.hasOwnProperty("label")){const r=/{{\s*(.+?)\s*}}/g;e.label=t.alias?.replace(r,(n,a)=>xr.hasOwnProperty(a)?`\${${xr[a]}}`:`\${PROP('Dim.${a}')}`)??""}return e}return t}const Ks=(t,e)=>`Please visit the AWS Service Quotas console at https://${t}.console.aws.amazon.com/servicequotas/home?region=${t}#!/services/monitoring/quotas/L-5E141212 to request a quota increase or see our documentation at https://grafana.com/docs/grafana/latest/datasources/cloudwatch/#manage-service-quotas to learn more. ${e}`,$s=(t,e)=>(0,E.J7)().publish({type:st.r1.alertError.name,payload:[`CloudWatch request limit reached in ${e} for data source ${t}`,"",void 0,s.createElement(Ds,{region:e},null)]});class ks extends at{constructor(e,r){super(e,r),this.debouncedThrottlingAlert=Sr($s),this.handleMetricQueries=(n,a,o)=>{const i=(0,Fs.LE)(Date.now(),{timeZone:a.timezone,format:"Z"}).replace(":",""),l=n.filter(this.filterMetricQuery).map(d=>{const u=Kt(d),g=this.replaceMetricQueryVars(u,a.scopedVars);return{timezoneUTCOffset:i,intervalMs:a.intervalMs,maxDataPoints:a.maxDataPoints,...g,type:"timeSeriesQuery",datasource:this.ref}});if((0,ee.isEmpty)(l))return(0,ke.of)({data:[]});const c={...a,targets:l};return this.performTimeSeriesQuery(c,o)}}interpolateMetricsQueryVariables(e,r){return{alias:this.replaceVariableAndDisplayWarningIfMulti(e.alias,r),metricName:this.replaceVariableAndDisplayWarningIfMulti(e.metricName,r),namespace:this.replaceVariableAndDisplayWarningIfMulti(e.namespace,r),period:this.replaceVariableAndDisplayWarningIfMulti(e.period,r),expression:this.templateSrv.replace(e.expression,r),sqlExpression:this.replaceVariableAndDisplayWarningIfMulti(e.sqlExpression,r),dimensions:this.convertDimensionFormat(e.dimensions??{},r)}}performTimeSeriesQuery(e,r){return r(e).pipe((0,Pe.T)(n=>{const a=n.data||[];return a.forEach(o=>{o.fields.forEach(i=>{i.type===Ns.PU.time&&(i.config.interval=o.meta?.custom?.period*1e3)})}),n.errors?.length&&this.alertOnThrottlingErrors(n.errors,e),{data:a,errors:this.enrichThrottlingErrorMessages(e,n.errors)}}),(0,Cr.W)(n=>Array.isArray(n)?(0,ke.of)({data:[],errors:n}):(0,ke.of)({data:[],errors:[{message:n}]})))}enrichThrottlingErrorMessages(e,r){if(!r||r.length===0)return r;const n=[];return r.forEach(a=>{if(a.message&&(/^Throttling:.*/.test(a.message)||/^Rate exceeded.*/.test(a.message))){const o=this.getActualRegion(e.targets.find(i=>i.refId===a.refId)?.region);n.push({...a,message:Ks(o,a.message)})}else n.push(a)}),n}alertOnThrottlingErrors(e,r){if(e.some(a=>a.message&&(/^Throttling:.*/.test(a.message)||/^Rate exceeded.*/.test(a.message)))){const a=e.map(o=>o.refId).filter(o=>o);a.length>0&&Object.values(r.targets).reduce((i,{refId:l,region:c})=>l&&!a.includes(l)||i.includes(c)?i:[...i,c],[]).forEach(i=>{const l=this.getActualRegion(i);l&&this.debouncedThrottlingAlert(this.instanceSettings.name,l)})}}filterMetricQuery(e){return cr(e)}replaceMetricQueryVars(e,r){return e.region=this.templateSrv.replace(this.getActualRegion(e.region),r),e.namespace=this.replaceVariableAndDisplayWarningIfMulti(e.namespace,r,!0,"namespace"),e.metricName=this.replaceVariableAndDisplayWarningIfMulti(e.metricName,r,!0,"metric name"),e.dimensions=this.convertDimensionFormat(e.dimensions??{},r),e.statistic=this.templateSrv.replace(e.statistic,r),e.period=String(this.getPeriod(e,r)),e.id=this.templateSrv.replace(e.id,r),e.expression=this.templateSrv.replace(e.expression,r),e.sqlExpression=this.templateSrv.replace(e.sqlExpression,r,"raw"),e.accountId&&(e.accountId=this.templateSrv.replace(e.accountId,r)),e}getPeriod(e,r){let n=this.templateSrv.replace(e.period,r);if(n&&n.toLowerCase()!=="auto"){let a;return/^\d+$/.test(n)?a=parseInt(n,10):a=Et.intervalToSeconds(n),a<1&&(a=1),String(a)}return n}}class Vs extends at{constructor(e,r){super(e,r),this.memoizedGetRequest=(0,ee.memoize)(this.getRequest.bind(this),(n,a)=>JSON.stringify({path:n,parameters:a}))}getRequest(e,r){return(0,br.AI)().get(`/api/datasources/${this.instanceSettings.id}/resources/${e}`,r)}async getExternalId(){return await this.memoizedGetRequest("external-id").then(({externalId:e})=>e)}getAccounts({region:e}){return this.memoizedGetRequest("accounts",{region:this.templateSrv.replace(this.getActualRegion(e))}).then(r=>r.map(n=>n.value))}isMonitoringAccount(e){return this.getAccounts({region:e}).then(r=>r.some(n=>n.isMonitoringAccount)).catch(()=>!1)}getRegions(){return this.memoizedGetRequest("regions").then(e=>[{label:"default",value:"default",text:"default"},...e.map(r=>({label:r.value.name,value:r.value.name,text:r.value.name}))].filter(r=>r.value))}getNamespaces(){return this.memoizedGetRequest("namespaces").then(e=>e.map(r=>({label:r.value,value:r.value})))}getLogGroups(e){return this.memoizedGetRequest("log-groups",{...e,region:this.templateSrv.replace(this.getActualRegion(e.region)),accountId:this.templateSrv.replace(e.accountId),listAllLogGroups:e.listAllLogGroups?"true":"false"})}getLogGroupFields({region:e,arn:r,logGroupName:n}){return this.memoizedGetRequest("log-group-fields",{region:this.templateSrv.replace(this.getActualRegion(e)),logGroupName:this.templateSrv.replace(n,{}),logGroupArn:this.templateSrv.replace(r)})}getMetrics({region:e,namespace:r,accountId:n}){return r?this.memoizedGetRequest("metrics",{region:this.templateSrv.replace(this.getActualRegion(e)),namespace:this.templateSrv.replace(r),accountId:this.templateSrv.replace(n)}).then(a=>a.map(o=>({label:o.value.name,value:o.value.name}))):Promise.resolve([])}getAllMetrics({region:e,accountId:r}){return this.memoizedGetRequest("metrics",{region:this.templateSrv.replace(this.getActualRegion(e)),accountId:this.templateSrv.replace(r)}).then(n=>n.map(a=>({metricName:a.value.name,namespace:a.value.namespace})))}getDimensionKeys({region:e,namespace:r="",dimensionFilters:n={},metricName:a="",accountId:o},i){return this.memoizedGetRequest("dimension-keys",{region:this.templateSrv.replace(this.getActualRegion(e)),namespace:this.templateSrv.replace(r),accountId:this.templateSrv.replace(o),metricName:this.templateSrv.replace(a),dimensionFilters:JSON.stringify(this.convertDimensionFormat(n,{},i))}).then(l=>l.map(c=>({label:c.value,value:c.value})))}getDimensionValues({dimensionKey:e,region:r,namespace:n,dimensionFilters:a={},metricName:o="",accountId:i}){return!n||!o?Promise.resolve([]):this.memoizedGetRequest("dimension-values",{region:this.templateSrv.replace(this.getActualRegion(r)),namespace:this.templateSrv.replace(n),metricName:this.templateSrv.replace(o.trim()),dimensionKey:this.replaceVariableAndDisplayWarningIfMulti(e,{},!0),dimensionFilters:JSON.stringify(this.convertDimensionFormat(a,{})),accountId:this.templateSrv.replace(i)}).then(l=>l.map(c=>({label:c.value,value:c.value})))}getEbsVolumeIds(e,r){return this.memoizedGetRequest("ebs-volume-ids",{region:this.templateSrv.replace(this.getActualRegion(e)),instanceId:this.templateSrv.replace(r)})}getEc2InstanceAttribute(e,r,n){return this.memoizedGetRequest("ec2-instance-attribute",{region:this.templateSrv.replace(this.getActualRegion(e)),attributeName:this.templateSrv.replace(r),filters:JSON.stringify(this.convertMultiFilterFormat(n,"filter key"))})}getResourceARNs(e,r,n){return this.memoizedGetRequest("resource-arns",{region:this.templateSrv.replace(this.getActualRegion(e)),resourceType:this.templateSrv.replace(r),tags:JSON.stringify(this.convertMultiFilterFormat(n,"tag name"))})}legacyDescribeLogGroups(e,r){return this.memoizedGetRequest("legacy-log-groups",{region:this.templateSrv.replace(this.getActualRegion(e)),logGroupNamePrefix:r||""})}}var Qs=m(29505);const $t=/\${(\w+):json}/g;function Bs(t){return typeof t!="string"&&typeof t.ec2Filters!="string"&&typeof t.tags!="string"}function ot(t){const e=t.replace($t,'"$$$1"'),r=JSON.parse(e),n={};return Object.keys(r).forEach(a=>{const o=r[a];typeof o=="string"?n[a]=[o]:o!==void 0&&(n[a]=o)}),n}function Rr(t){if(Bs(t))return t;if(typeof t!="string"){const d=(0,ee.omit)(t,["dimensionFilters","ec2Filters","tags"]);if(d.dimensionFilters={},d.ec2Filters={},d.tags={},t.dimensionFilters!==""&&t.ec2Filters!=="[]"){const u=t.dimensionFilters.replace($t,'"$$$1"');try{d.dimensionFilters=JSON.parse(u)}catch{throw new Error(`unable to migrate poorly formed filters: ${t.dimensionFilters}`)}}if(t.ec2Filters!==""&&t.ec2Filters!=="[]")try{d.ec2Filters=ot(t.ec2Filters)}catch{throw new Error(`unable to migrate poorly formed filters: ${t.ec2Filters}`)}if(t.tags!==""&&t.tags!=="[]")try{d.tags=ot(t.tags)}catch{throw new Error(`unable to migrate poorly formed filters: ${t.tags}`)}return d}const e={refId:"CloudWatchVariableQueryEditor-VariableQuery",queryType:y.b4.Regions,namespace:"",region:"",metricName:"",dimensionKey:"",dimensionFilters:{},ec2Filters:{},instanceID:"",attributeName:"",resourceType:"",tags:{}};if(t===""||t.match(/^regions\(\)/))return e;if(t.match(/^namespaces\(\)/))return e.queryType=y.b4.Namespaces,e;const r=t.match(/^metrics\(([^\)]+?)(,\s?([^,]+?))?\)/);if(r)return e.queryType=y.b4.Metrics,e.namespace=r[1],e.region=r[3]||"",e;const n=t.match(/^dimension_keys\(([^\)]+?)(,\s?([^,]+?))?\)/);if(n)return e.queryType=y.b4.DimensionKeys,e.namespace=n[1],e.region=n[3]||"",e;const a=t.match(/^dimension_values\(([^,]+?),\s?([^,]+?),\s?([^,]+?),\s?([^,]+?)(,\s?(.+))?\)/);if(a){if(e.queryType=y.b4.DimensionValues,e.region=a[1],e.namespace=a[2],e.metricName=a[3],e.dimensionKey=a[4],e.dimensionFilters={},a[6]&&a[6]!=="[]"){const d=a[6].replace($t,'"$$$1"');try{e.dimensionFilters=JSON.parse(d)}catch{throw new Error(`unable to migrate poorly formed filters: ${a[6]}`)}}return e}const o=t.match(/^ebs_volume_ids\(([^,]+?),\s?([^,]+?)\)/);if(o)return e.queryType=y.b4.EBSVolumeIDs,e.region=o[1],e.instanceID=o[2],e;const i=t.match(/^ec2_instance_attribute\(([^,]+?),\s?([^,]+?),\s?(.+?)\)/);if(i){if(e.queryType=y.b4.EC2InstanceAttributes,e.region=i[1],e.attributeName=i[2],i[3]&&i[3]!=="[]")try{e.ec2Filters=ot(i[3])}catch{throw new Error(`unable to migrate poorly formed filters: ${i[3]}`)}return e}const l=t.match(/^resource_arns\(([^,]+?),\s?([^,]+?),\s?(.+?)\)/);if(l){if(e.queryType=y.b4.ResourceArns,e.region=l[1],e.resourceType=l[2],l[3]&&l[3]!=="[]")try{e.tags=ot(l[3])}catch{throw new Error(`unable to migrate poorly formed filters: ${l[3]}`)}return e}if(t.match(/^statistics\(\)/))return e.queryType=y.b4.Statistics,e;throw new Error("unable to parse old variable query")}const Us=({filter:t,onChange:e,onDelete:r,keyPlaceholder:n,datasource:a})=>{const[o,i]=(0,s.useState)(t.key||""),[l,c]=(0,s.useState)(t.value?.join(", ")||""),d=Ue(a,t.key),u=(0,he.of)(zs);return s.createElement("div",{"data-testid":"cloudwatch-multifilter-item"},s.createElement(ze.M,null,s.createElement(ie.p,{"data-testid":"cloudwatch-multifilter-item-key","aria-label":"Filter key",value:o,placeholder:n??"key",onChange:g=>i(g.currentTarget.value),onBlur:()=>{o&&o!==t.key&&e({...t,key:o})}}),s.createElement("span",{className:(0,T.cx)(u.root)},"="),s.createElement(ie.p,{"data-testid":"cloudwatch-multifilter-item-value","aria-label":"Filter value",value:l,placeholder:"value1, value2,...",onChange:g=>c(g.currentTarget.value),onBlur:()=>{const g=l.split(",").map(p=>p.trim());l&&g!==t.value&&e({...t,value:g}),c(g.join(", "))}}),s.createElement(je.Z,{"aria-label":"remove",icon:"times",variant:"secondary",onClick:r,type:"button"})),d&&s.createElement(ge.F,{title:d,severity:"error",topSpacing:1}))},zs=t=>({root:(0,T.css)({padding:t.spacing(0,1),alignSelf:"center"})}),js=t=>Object.keys(t).map(e=>({key:e,value:t[e],operator:"="})),Hs=t=>{const e={};return t.forEach(({key:r,value:n})=>{r&&n&&(e[r]=n)}),e},it=({filters:t,onChange:e,keyPlaceholder:r,datasource:n})=>{const[a,o]=(0,s.useState)([]);(0,s.useEffect)(()=>o(t?js(t):[]),[t]);const i=l=>{o(l);const c=Hs(l);(0,ee.isEqual)(c,t)||e(c)};return s.createElement(rt.o,{items:a,onChange:i,renderItem:Ys(n,r)})};function Ys(t,e){function r(n,a,o){return s.createElement(Us,{filter:n,onChange:i=>a(i),onDelete:o,keyPlaceholder:e,datasource:t})}return r}const Xs=t=>({table:(0,T.css)({width:"100%",tableLayout:"fixed"}),selectedLogGroupsContainer:(0,T.css)({marginLeft:t.spacing(.5),marginBottom:t.spacing(.5),display:"flex",flexFlow:"wrap",gap:t.spacing(1),button:{margin:"unset"}}),limitLabel:(0,T.css)({color:t.colors.text.secondary,textAlign:"center",maxWidth:"none",svg:{marginRight:t.spacing(.5)},fontSize:12}),logGroupCountLabel:(0,T.css)({color:t.colors.text.secondary,maxWidth:"none"}),tableScroller:(0,T.css)({maxHeight:"40vh",overflow:"auto"}),row:(0,T.css)({borderBottom:`1px solid ${t.colors.border.weak}`,"&:last-of-type":{borderBottomColor:t.colors.border.medium}}),cell:(0,T.css)({padding:t.spacing(1,1,1,0),width:"25%","&:first-of-type":{width:"80%",padding:t.spacing(1,1,1,2)}}),nestedEntry:(0,T.css)({display:"flex",alignItems:"center"}),logGroupSearchResults:(0,T.css)({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"90%",verticalAlign:"middle"}),modal:(0,T.css)({width:t.breakpoints.values.lg}),selectAccountId:(0,T.css)({maxWidth:"100px"}),logGroupSelectionArea:(0,T.css)({display:"flex"}),searchField:(0,T.css)({width:"100%",marginRight:t.spacing(1)}),resultLimit:(0,T.css)({margin:"4px 0",fontStyle:"italic"}),removeButton:(0,T.css)({verticalAlign:"middle",marginLeft:t.spacing(.5)})}),Lr=(0,T.css)({marginBottom:8}),Or=Xs,Mr=20,Ke=({label:t,onChange:e,value:r,options:n,allowCustomValue:a=!1,isLoading:o=!1,inputId:i=t,newFormStylingEnabled:l,error:c})=>{const d=(0,he.of)(qs);return l?s.createElement(s.Fragment,null,s.createElement(k.c,{label:t,htmlFor:i,className:Lr},s.createElement(Z.l6,{"aria-label":t,allowCustomValue:a,value:r,onChange:({value:u})=>e(u),options:n,isLoading:o,inputId:i})),c&&s.createElement(ge.F,{title:c,severity:"error",topSpacing:1})):s.createElement(s.Fragment,null,s.createElement(ve.I,{label:t,labelWidth:Mr,htmlFor:i},s.createElement(Z.l6,{"aria-label":t,width:25,allowCustomValue:a,value:r,onChange:({value:u})=>e(u),options:n,isLoading:o,inputId:i})),c&&s.createElement(ge.F,{className:d.inlineFieldAlert,title:c,severity:"error",topSpacing:1}))},qs=t=>({inlineFieldAlert:(0,T.css)({maxWidth:t.spacing(Mr+25+.5)})}),Zs=20,lt=({interactive:t,label:e,onBlur:r,placeholder:n,value:a,tooltip:o,newFormStylingEnabled:i})=>{const[l,c]=(0,s.useState)(a);return i?s.createElement(k.c,{label:e,tooltip:o,tooltipInteractive:t,className:Lr},s.createElement(ie.p,{"aria-label":e,placeholder:n,value:l,onChange:d=>c(d.currentTarget.value),onBlur:()=>r(l)})):s.createElement(ve.I,{interactive:t,label:e,labelWidth:Zs,tooltip:o,grow:!0},s.createElement(ie.p,{"aria-label":e,placeholder:n,value:l,onChange:d=>c(d.currentTarget.value),onBlur:()=>r(l),width:25}))},Js=[{value:y.b4.Regions,label:"Regions"},{value:y.b4.Namespaces,label:"Namespaces"},{value:y.b4.Metrics,label:"Metrics"},{value:y.b4.DimensionKeys,label:"Dimension Keys"},{value:y.b4.DimensionValues,label:"Dimension Values"},{value:y.b4.EBSVolumeIDs,label:"EBS Volume IDs"},{value:y.b4.EC2InstanceAttributes,label:"EC2 Instance Attributes"},{value:y.b4.ResourceArns,label:"Resource ARNs"},{value:y.b4.Statistics,label:"Statistics"},{value:y.b4.LogGroups,label:"Log Groups"},...oe.$.featureToggles.cloudWatchCrossAccountQuerying?[{value:y.b4.Accounts,label:"Accounts"}]:[]],_s=({query:t,datasource:e,onChange:r})=>{const n=Rr(t),{region:a,namespace:o,metricName:i,dimensionKey:l}=n,[c,d]=It(e),u=Ct(e),g=wt(e,{region:a,namespace:o}),p=Be(e,{region:a,namespace:o,metricName:i}),b=xt(e.resources,t.region),h=Ue(e,l),S=oe.$.featureToggles.awsDatasourcesNewFormStyling,v=async O=>{const ye=await M({...n,region:O,accountId:void 0});I(ye)},x=async O=>{const ye=await M({...n,namespace:O});I(ye)},I=O=>{r({...O,refId:"CloudWatchVariableQueryEditor-VariableQuery"})},M=async O=>{let{metricName:ye,dimensionKey:xe,dimensionFilters:pt,namespace:gt,region:ft}=O;return ye&&await e.resources.getMetrics({namespace:gt,region:ft}).then(F=>{F.find(ne=>ne.value===ye)||(ye="")}),xe&&await e.resources.getDimensionKeys({namespace:gt,region:ft}).then(F=>{F.find(ne=>ne.value===xe)||(xe="",pt={})}),{...O,metricName:ye,dimensionKey:xe,dimensionFilters:pt}},X=[y.b4.Metrics,y.b4.DimensionKeys,y.b4.DimensionValues,y.b4.EBSVolumeIDs,y.b4.EC2InstanceAttributes,y.b4.ResourceArns,y.b4.LogGroups,y.b4.Accounts].includes(n.queryType),me=[y.b4.Metrics,y.b4.DimensionKeys,y.b4.DimensionValues,y.b4.LogGroups].includes(n.queryType),zt=[y.b4.Metrics,y.b4.DimensionKeys,y.b4.DimensionValues].includes(n.queryType);return s.createElement("div",{className:S?"width-15":""},s.createElement(Ke,{value:n.queryType,options:Js,onChange:O=>I({...n,queryType:O,accountId:void 0}),label:"Query type",inputId:`variable-query-type-${t.refId}`,newFormStylingEnabled:S}),X&&s.createElement(Ke,{value:a,options:c,onChange:O=>v(O),label:"Region",isLoading:d,inputId:`variable-query-region-${t.refId}`,newFormStylingEnabled:S}),me&&b.value&&b.value?.length>0&&oe.$.featureToggles.cloudWatchCrossAccountQuerying&&s.createElement(Ke,{label:"Account",value:t.accountId??null,onChange:O=>I({...n,accountId:O}),options:[Ge,...b?.value],allowCustomValue:!1,newFormStylingEnabled:S}),zt&&s.createElement(Ke,{value:o,options:u,onChange:O=>x(O),label:"Namespace",inputId:`variable-query-namespace-${t.refId}`,allowCustomValue:!0,newFormStylingEnabled:S}),n.queryType===y.b4.DimensionValues&&s.createElement(s.Fragment,null,s.createElement(Ke,{value:i||null,options:g,onChange:O=>I({...n,metricName:O}),label:"Metric",inputId:`variable-query-metric-${t.refId}`,allowCustomValue:!0,newFormStylingEnabled:S}),s.createElement(Ke,{value:l||null,options:p,onChange:O=>I({...n,dimensionKey:O}),label:"Dimension key",inputId:`variable-query-dimension-key-${t.refId}`,allowCustomValue:!0,newFormStylingEnabled:S,error:h}),S?s.createElement(k.c,{label:"Dimensions",className:"width-30",tooltip:"Dimensions to filter the returned values on"},s.createElement(Rt,{metricStat:{...n,dimensions:n.dimensionFilters},onChange:O=>{r({...n,dimensionFilters:O})},disableExpressions:!0,datasource:e})):s.createElement(ve.I,{label:"Dimensions",labelWidth:20,shrink:!0,tooltip:"Dimensions to filter the returned values on"},s.createElement(Rt,{metricStat:{...n,dimensions:n.dimensionFilters},onChange:O=>{r({...n,dimensionFilters:O})},disableExpressions:!0,datasource:e}))),n.queryType===y.b4.EBSVolumeIDs&&s.createElement(lt,{value:t.instanceID,placeholder:"i-XXXXXXXXXXXXXXXXX",onBlur:O=>I({...n,instanceID:O}),label:"Instance ID",newFormStylingEnabled:S}),n.queryType===y.b4.EC2InstanceAttributes&&s.createElement(s.Fragment,null,s.createElement(lt,{value:n.attributeName,onBlur:O=>I({...n,attributeName:O}),label:"Attribute name",interactive:!0,newFormStylingEnabled:S,tooltip:s.createElement(s.Fragment,null,'Attribute or tag to query on. Tags should be formatted "Tags.<name>". ',s.createElement("a",{href:"https://grafana.com/docs/grafana/latest/datasources/aws-cloudwatch/template-queries-cloudwatch/#selecting-attributes",target:"_blank",rel:"noreferrer"},"See the documentation for more details"))}),S?s.createElement(k.c,{label:"Filters",tooltipInteractive:!0,tooltip:s.createElement(s.Fragment,null,s.createElement("a",{href:"https://grafana.com/docs/grafana/latest/datasources/aws-cloudwatch/template-queries-cloudwatch/#selecting-attributes",target:"_blank",rel:"noreferrer"},"Pre-defined ec2:DescribeInstances filters/tags")," and the values to filter on. Tags should be formatted tag:<name>.")},s.createElement(it,{filters:n.ec2Filters,onChange:O=>{r({...n,ec2Filters:O})},keyPlaceholder:"filter/tag",datasource:e})):s.createElement(ve.I,{label:"Filters",labelWidth:20,shrink:!0,tooltip:s.createElement(s.Fragment,null,s.createElement("a",{href:"https://grafana.com/docs/grafana/latest/datasources/aws-cloudwatch/template-queries-cloudwatch/#selecting-attributes",target:"_blank",rel:"noreferrer"},"Pre-defined ec2:DescribeInstances filters/tags")," and the values to filter on. Tags should be formatted tag:<name>.")},s.createElement(it,{filters:n.ec2Filters,onChange:O=>{r({...n,ec2Filters:O})},keyPlaceholder:"filter/tag",datasource:e}))),n.queryType===y.b4.ResourceArns&&s.createElement(s.Fragment,null,s.createElement(lt,{value:n.resourceType,onBlur:O=>I({...n,resourceType:O}),label:"Resource type",newFormStylingEnabled:S}),S?s.createElement(k.c,{label:"Tags",tooltip:"Tags to filter the returned values on."},s.createElement(it,{filters:n.tags,onChange:O=>{r({...n,tags:O})},keyPlaceholder:"tag",datasource:e})):s.createElement(ve.I,{label:"Tags",shrink:!0,labelWidth:20,tooltip:"Tags to filter the returned values on."},s.createElement(it,{filters:n.tags,onChange:O=>{r({...n,tags:O})},keyPlaceholder:"tag",datasource:e}))),n.queryType===y.b4.LogGroups&&s.createElement(lt,{value:t.logGroupPrefix??"",onBlur:O=>I({...n,logGroupPrefix:O}),label:"Log group prefix",newFormStylingEnabled:S}))};class ea extends Qs.f5{constructor(e){super(),this.resources=e,this.editor=_s,this.allMetricFindValue={text:"All",value:Ge.value,expandable:!0}}query(e){const r=Rr(e.targets[0]);return(0,Tr.H)(this.execute(r)).pipe((0,Pe.T)(n=>({data:n})))}async execute(e){try{switch(e.queryType){case y.b4.Regions:return this.handleRegionsQuery();case y.b4.Namespaces:return this.handleNamespacesQuery();case y.b4.Metrics:return this.handleMetricsQuery(e);case y.b4.DimensionKeys:return this.handleDimensionKeysQuery(e);case y.b4.DimensionValues:return this.handleDimensionValuesQuery(e);case y.b4.EBSVolumeIDs:return this.handleEbsVolumeIdsQuery(e);case y.b4.EC2InstanceAttributes:return this.handleEc2InstanceAttributeQuery(e);case y.b4.ResourceArns:return this.handleResourceARNsQuery(e);case y.b4.Statistics:return this.handleStatisticsQuery();case y.b4.LogGroups:return this.handleLogGroupsQuery(e);case y.b4.Accounts:return this.handleAccountsQuery(e)}}catch(r){return console.error(`Could not run CloudWatchMetricFindQuery ${e}`,r),[]}}async handleLogGroupsQuery({region:e,logGroupPrefix:r,accountId:n}){const a=this.resources.templateSrv.replace(r);return this.resources.getLogGroups({accountId:n,region:e,logGroupNamePrefix:a,listAllLogGroups:!0}).then(o=>o.map(i=>({text:i.value.name,value:i.value.arn,expandable:!0})))}async handleRegionsQuery(){return this.resources.getRegions().then(e=>e.map(we))}async handleNamespacesQuery(){return this.resources.getNamespaces().then(e=>e.map(we))}async handleMetricsQuery({namespace:e,region:r,accountId:n}){return this.resources.getMetrics({namespace:e,region:r,accountId:n}).then(a=>a.map(we))}async handleDimensionKeysQuery({namespace:e,region:r,accountId:n}){return this.resources.getDimensionKeys({namespace:e,region:r,accountId:n}).then(a=>a.map(we))}async handleDimensionValuesQuery({namespace:e,accountId:r,region:n,dimensionKey:a,metricName:o,dimensionFilters:i}){return!a||!o?[]:this.resources.getDimensionValues({region:n,accountId:r,namespace:e,metricName:o,dimensionKey:a,dimensionFilters:i}).then(l=>l.map(we))}async handleEbsVolumeIdsQuery({region:e,instanceID:r}){return r?this.resources.getEbsVolumeIds(e,r).then(n=>n.map(we)):[]}async handleEc2InstanceAttributeQuery({region:e,attributeName:r,ec2Filters:n}){return r?this.resources.getEc2InstanceAttribute(e,r,n??{}).then(a=>a.map(we)):[]}async handleResourceARNsQuery({region:e,resourceType:r,tags:n}){return r?(await this.resources.getResourceARNs(e,r,n??{})).map(we):[]}async handleStatisticsQuery(){return tt.map(e=>({text:e,value:e,expandable:!0}))}async handleAccountsQuery({region:e}){return this.resources.getAccounts({region:e}).then(r=>{const n=r.map(a=>({text:a.label,value:a.id,expandable:!0}));return n.length?[this.allMetricFindValue,...n]:[]})}getDefaultQuery(){return Gn}}function we({label:t,value:e}){return{text:t??e??"",value:e,expandable:!0}}class Fr extends vn.iy{constructor(e,r=(0,Te.w)()){super(e),this.instanceSettings=e,this.templateSrv=r,this.type="cloudwatch",this.defaultRegion=e.jsonData.defaultRegion,this.resources=new Vs(e,r),this.languageProvider=new $n(this),this.sqlCompletionItemProvider=new qn(this.resources,this.templateSrv),this.metricMathCompletionItemProvider=new ns(this.resources,this.templateSrv),this.metricsQueryRunner=new ks(e,r),this.logsCompletionItemProviderFunc=_n(this.resources,this.templateSrv),this.logsQueryRunner=new Ls(e,r),this.annotationQueryRunner=new as(e,r),this.variables=new ea(this.resources),this.annotations=Wn,this.defaultLogGroups=e.jsonData.defaultLogGroups}filterQuery(e){return e.hide!==!0||De(e)&&e.id!==""}query(e){e=(0,ee.cloneDeep)(e);let r=e.targets.filter(this.filterQuery);const n=[],a=[],o=[];r.forEach(l=>{lr(l)?o.push(l):Ve(l)?n.push(l):a.push(l)});const i=[];return n.length&&i.push(this.logsQueryRunner.handleLogQueries(n,e,super.query.bind(this))),a.length&&i.push(this.metricsQueryRunner.handleMetricQueries(a,e,super.query.bind(this))),o.length&&i.push(this.annotationQueryRunner.handleAnnotationQuery(o,e,super.query.bind(this))),(0,ee.isEmpty)(i)?(0,ke.of)({data:[],state:Ae.Gu.Done}):(0,yn.h)(...i)}interpolateVariablesInQueries(e,r){return e.length?e.map(n=>({...n,region:this.metricsQueryRunner.replaceVariableAndDisplayWarningIfMulti(this.getActualRegion(n.region),r),...De(n)&&this.metricsQueryRunner.interpolateMetricsQueryVariables(n,r)})):e}getLogRowContext(e,r,n){return this.logsQueryRunner.getLogRowContext(e,r,super.query.bind(this),n)}targetContainsTemplate(e){return this.templateSrv.containsTemplate(e.region)||this.templateSrv.containsTemplate(e.namespace)||this.templateSrv.containsTemplate(e.metricName)||this.templateSrv.containsTemplate(e.expression)||e.logGroupNames?.some(r=>this.templateSrv.containsTemplate(r))||(0,ee.find)(e.dimensions,(r,n)=>this.templateSrv.containsTemplate(n)||this.templateSrv.containsTemplate(r))}getQueryDisplayText(e){return Ve(e)?e.expression??"":JSON.stringify(e)}getVariables(){return this.resources.getVariables()}getActualRegion(e){return e==="default"||e===void 0||e===""?this.defaultRegion??"":e}getDefaultQuery(e){return{...Dn(this.instanceSettings.jsonData.logGroups,this.instanceSettings.jsonData.defaultLogGroups),...Fn}}}const ta=20,ra=4,na=300,sa=({region:t,selectedLogGroups:e,onChange:r,datasource:n,onOpenMenu:a,width:o,saved:i=!0})=>{const[l,c]=(0,s.useState)(!1),[d,u]=(0,s.useState)([]),g=(0,s.useMemo)(()=>(0,ee.unionBy)(d,e?.map(te.z),"value"),[d,e]),p=(0,s.useCallback)(async(v,x)=>{if(!n)return[];try{return await n.resources.legacyDescribeLogGroups(v,x)}catch(I){return(0,E.J7)().publish({type:st.r1.alertError.name,payload:[typeof I=="string"?I:JSON.stringify(I)]}),[]}},[n]),b=async(v,x,I)=>{if(I.action!=="input-change"||!n)return;if(!/^[\.\-_/#A-Za-z0-9]+$/.test(v)){v!==""&&(0,E.J7)().publish({type:st.r1.alertError.name,payload:["Invalid Log Group name: "+v]});return}c(!0);const X=await p(x,v);u((0,ee.unionBy)(d,X,"value")),c(!1)};(0,s.useEffect)(()=>{async function v(){if(!n||!n.getActualRegion(t)){u([]);return}return c(!0),p(n.getActualRegion(t)).then(x=>{u(x)}).finally(()=>{c(!1)})}return i&&v(),()=>{u([]),c(!1)}},[n,t,i]);const h=async()=>{a&&await a()},S=(0,ee.debounce)(b,na);return s.createElement(Z.KF,{inputId:"default-log-groups","aria-label":"Log Groups",allowCustomValue:!0,options:n?fe(n,g):g,value:e,onChange:v=>r(v.filter(({value:x})=>x).map(({value:x})=>x)),closeMenuOnSelect:!1,isClearable:!0,isOptionDisabled:()=>e.length>=ta,placeholder:"Choose Log Groups",maxVisibleValues:ra,noOptionsMessage:"No log groups available",isLoading:l,onOpenMenu:h,onInputChange:(v,x)=>{S(v,t,x)},width:o})},aa=(0,T.css)` gap: 3px; `,oa=({datasource:t,region:e,legacyLogGroupNames:r,onChange:n})=>s.createElement("div",{className:`gf-form gf-form--grow flex-grow-1 ${aa}`},s.createElement(sa,{region:e,selectedLogGroups:r,datasource:t,onChange:n}));var Nr=m(37390),kt=m(14578),ia=m(39558),la=m(10880),ca=m(60029),Le=m(55852);const ua=({searchFn:t,searchPhrase:e})=>{const[r,n]=(0,s.useState)(e),a=(0,s.useMemo)(()=>(0,ee.debounce)(t,600),[t]);return(0,s.useEffect)(()=>()=>{a?.cancel()},[a]),s.createElement(ie.p,{"aria-label":"log group search",prefix:s.createElement(kt.I,{name:"search"}),value:r,onChange:o=>{const i=o.currentTarget.value;n(i),a(i)},placeholder:"search by log group name prefix"})},da=({accountOptions:t=[],variables:e=[],fetchLogGroups:r,onChange:n,onBeforeOpen:a,...o})=>{const[i,l]=(0,s.useState)(!1),[c,d]=(0,s.useState)([]),[u,g]=(0,s.useState)(o.selectedLogGroups??[]),[p,b]=(0,s.useState)(""),[h,S]=(0,s.useState)(Ge.value),[v,x]=(0,s.useState)(!1),I=(0,he.of)(Or),M=(0,s.useMemo)(()=>u.filter(F=>!F.name?.startsWith("$")).length,[u]),X=(0,s.useMemo)(()=>e.map(F=>({label:F,value:F})),[e]),me=(0,s.useMemo)(()=>u.find(F=>F.name?.startsWith("$"))?.name,[u]),zt={label:me,value:me};(0,s.useEffect)(()=>{g(o.selectedLogGroups??[])},[o.selectedLogGroups]);const O=()=>{l(!i),i||(g(u),xe(p,h))},ye=(0,s.useMemo)(()=>{const F={};return t.forEach(ne=>{ne.value&&ne.label&&(F[ne.value]=ne.label)}),F},[t]),xe=async(F,ne)=>{x(!0);try{const $e=await r({logGroupPattern:F,accountId:ne});d($e.map(Xe=>({arn:Xe.value.arn,name:Xe.value.name,accountId:Xe.accountId,accountLabel:Xe.accountId?ye[Xe.accountId]:void 0})))}catch{d([])}x(!1)},pt=(F,ne)=>{g(ne?[...u,F]:u.filter($e=>$e.arn!==F.arn))},gt=()=>{n(u),O()},ft=()=>{g(u),O()};return s.createElement(s.Fragment,null,s.createElement(Nr.a,{className:I.modal,title:"Select log groups",isOpen:i,onDismiss:O},s.createElement("div",{className:I.logGroupSelectionArea},s.createElement("div",{className:I.searchField},s.createElement(k.c,{label:"Log group name prefix"},s.createElement(ua,{searchFn:F=>{xe(F,h),b(F)},searchPhrase:p}))),s.createElement(dr,{onChange:F=>{xe(p,F),S(F||Ge.value)},accountOptions:t,accountId:h})),s.createElement(Ee.$,{layout:"block",v:2}),s.createElement("div",null,!v&&c.length>=25&&s.createElement(s.Fragment,null,s.createElement("div",{className:I.limitLabel},s.createElement(kt.I,{name:"info-circle"}),"Only the first 50 results can be shown. If you do not see an expected log group, try narrowing down your search.",s.createElement("p",null,"A"," ",s.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/cloudwatch_limits_cwl.html"},"maximum"," ")," ","of 50 Cloudwatch log groups can be queried at one time.")),s.createElement(Ee.$,{layout:"block",v:1})),s.createElement("div",{className:I.tableScroller},s.createElement("table",{className:I.table},s.createElement("thead",null,s.createElement("tr",{className:I.row},s.createElement("td",{className:I.cell},"Log Group"),t.length>0&&s.createElement("td",{className:I.cell},"Account label"),s.createElement("td",{className:I.cell},"Account ID"))),s.createElement("tbody",null,v&&s.createElement("tr",{className:I.row},s.createElement("td",{className:I.cell},s.createElement(ia._,{text:"Loading..."}))),!v&&c.length===0&&s.createElement("tr",{className:I.row},s.createElement("td",{className:I.cell},"No log groups found")),!v&&c.map(F=>s.createElement("tr",{className:I.row,key:`${F.arn}`},s.createElement("td",{className:I.cell},s.createElement("div",{className:I.nestedEntry},s.createElement(la.S,{id:F.arn,onChange:ne=>pt(F,ne.currentTarget.checked),value:!!(F.arn&&u.some(ne=>ne.arn===F.arn))}),s.createElement(Ee.$,{layout:"inline",h:2}),s.createElement("label",{className:I.logGroupSearchResults,htmlFor:F.arn,title:F.name},F.name))),t.length>0&&s.createElement("td",{className:I.cell},F.accountLabel),s.createElement("td",{className:I.cell},F.accountId))))))),s.createElement(Ee.$,{layout:"block",v:2}),s.createElement(ca.J,{className:I.logGroupCountLabel},M," log group",M!==1&&"s"," selected"),s.createElement(Ee.$,{layout:"block",v:1}),s.createElement(k.c,{label:"Template variable",width:26,tooltip:"Optionally you can specify a single or multi-valued template variable. Select a variable separately or in conjunction with log groups."},s.createElement(Z.l6,{isClearable:!0,"aria-label":"Template variable",value:zt,allowCustomValue:!0,options:X,onChange:F=>{const ne=u.filter($e=>!$e.name?.startsWith("$"));F?.label&&ne.push({name:F.label,arn:F.label}),g(ne)}})),s.createElement(Nr.a.ButtonRow,null,s.createElement(Le.$n,{onClick:ft,variant:"secondary",type:"button",fill:"outline"},"Cancel"),s.createElement(Le.$n,{onClick:gt,type:"button"},"Add log groups"))),s.createElement("div",null,s.createElement(Le.$n,{variant:"secondary",onClick:()=>{try{a?.(),O()}catch{}},type:"button"},"Select log groups")))};var Dr=m(96374);const Gr=6,ma=({selectedLogGroups:t=[],onChange:e,maxNoOfVisibleLogGroups:r=Gr})=>{const n=(0,he.of)(Or),[a,o]=(0,s.useState)(!1),[i,l]=(0,s.useState)(t.slice(0,Gr));return(0,s.useEffect)(()=>{l(t.slice(0,r))},[t,r]),s.createElement(s.Fragment,null,s.createElement("div",{className:n.selectedLogGroupsContainer},i.map(c=>s.createElement(Le.$n,{key:c.arn,size:"sm",variant:"secondary",icon:"times",className:n.removeButton,onClick:()=>{e(t.filter(d=>d.arn!==c.arn))}},`${c.name}${c.accountLabel?`(${c.accountLabel})`:""}`)),i.length!==t.length&&s.createElement(Le.$n,{size:"sm",variant:"secondary",icon:"plus",fill:"outline",className:n.removeButton,onClick:()=>l(t)},"Show all"),t.length>0&&s.createElement(Le.$n,{size:"sm",variant:"secondary",icon:"times",fill:"outline",className:n.removeButton,onClick:()=>o(!0)},"Clear selection")),s.createElement(Dr.u,{isOpen:a,title:"Clear Log Group Selection",body:"Are you sure you want to clear all log groups?",confirmText:"Yes",dismissText:"No",icon:"exclamation-triangle",onConfirm:()=>{o(!1),e([])},onDismiss:()=>o(!1)}))},pa=(0,T.css)({gap:3}),ga=(0,T.css)({display:"flex",flexDirection:"column",marginTop:8,"& div:first-child":{marginBottom:8}}),fa=({datasource:t,onChange:e,legacyLogGroupNames:r,logGroups:n,region:a,maxNoOfVisibleLogGroups:o,newFormStylingEnabled:i,onBeforeOpen:l})=>{const c=xt(t?.resources,a),[d,u]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{if(t&&!d&&!n?.length&&r?.length){u(!0);const g=r.filter(b=>hr(t.resources.templateSrv,b)),p=r.filter(b=>!hr(t.resources.templateSrv,b));Promise.all(p.map(b=>t.resources.getLogGroups({region:a,logGroupNamePrefix:b}))).then(b=>{const h=b.flatMap(S=>S.map(v=>({arn:v.value.arn,name:v.value.name,accountId:v.accountId})));e([...h,...g.map(S=>({name:S,arn:S}))])}).catch(b=>{console.error(b)})}},[t,r,n,e,a,d]),s.createElement("div",{className:i?ga:`gf-form gf-form--grow flex-grow-1 ${pa}`},s.createElement(da,{fetchLogGroups:async g=>t?.resources.getLogGroups({region:a,...g})??[],onChange:e,accountOptions:c.value,selectedLogGroups:n,onBeforeOpen:l,variables:t?.getVariables()}),s.createElement(ma,{selectedLogGroups:n??[],onChange:e,maxNoOfVisibleLogGroups:o}))},ct=t=>oe.$.featureToggles.cloudWatchCrossAccountQuerying?s.createElement(fa,{...t}):s.createElement(oa,{...t,onChange:t.legacyOnChange,legacyLogGroupNames:t.legacyLogGroupNames||[]});var ha=m(15292);function ya({options:t,onOptionsChange:e}){return s.createElement(bt.A,{title:"Secure Socks Proxy"},s.createElement(Je.D,{label:"Enabled",description:"Connect to this datasource via the secure socks proxy."},s.createElement(ha.d,{value:t.jsonData.enableSecureSocksProxy??!1,onChange:r=>e({...t,jsonData:{...t.jsonData,enableSecureSocksProxy:r.currentTarget.checked}})})))}var Wr=m(55882);const va=t=>({infoText:(0,T.css)` padding-bottom: ${t.spacing(2)}; color: ${t.colors.text.secondary}; `}),Vt="grafana-x-ray-datasource";function Pr({newFormStyling:t,datasourceUid:e,onChange:r}){const n=!!(0,St.l)().getList({pluginId:Vt}).length,a=(0,he.of)(va);return t?s.createElement(bt.A,{title:"X-ray trace link",description:"Grafana will automatically create a link to a trace in X-ray data source if logs contain @xrayTraceId field"},!n&&s.createElement(ge.F,{title:"There is no X-ray datasource to link to. First add an X-ray data source and then link it to Cloud Watch. ",severity:"info"}),s.createElement(Je.D,{htmlFor:"data-source-picker",label:"Data source",description:"X-ray data source containing traces"},s.createElement(Wr.s,{pluginId:Vt,onChange:o=>r(o.uid),current:e,noDefault:!0}))):s.createElement(s.Fragment,null,s.createElement("h3",{className:"page-heading"},"X-ray trace link"),s.createElement("div",{className:a.infoText},"Grafana will automatically create a link to a trace in X-ray data source if logs contain @xrayTraceId field"),!n&&s.createElement(ge.F,{title:"There is no X-ray datasource to link to. First add an X-ray data source and then link it to Cloud Watch. ",severity:"info"}),s.createElement("div",{className:"gf-form-group"},s.createElement(ve.I,{htmlFor:"data-source-picker",label:"Data source",labelWidth:28,tooltip:"X-ray data source containing traces"},s.createElement(Wr.s,{pluginId:Vt,onChange:o=>r(o.uid),current:e,noDefault:!0}))))}const Ea='Since grafana 7.3 authentication type "arn" is deprecated, falling back to default SDK provider',ba=`As of grafana 7.3 authentication type "credentials" should be used only for shared file credentials. If you don't have a credentials file, switch to the default SDK provider for extracting credentials from environment variables or IAM roles`,Sa=t=>{const{options:e,onOptionsChange:r}=t,{defaultLogGroups:n,logsTimeout:a,defaultRegion:o,logGroups:i}=e.jsonData,l=Aa(t),c=Ta(a),d=Ia(t),[u,g]=(0,s.useState)({invalid:!1}),p=oe.$.featureToggles.awsDatasourcesNewFormStyling;(0,s.useEffect)(()=>g({invalid:!1}),[t.options]);const b=(0,fn.G)();(0,s.useEffect)(()=>{const M=(0,E.J7)().subscribe(w.NI,()=>{b("grafana_plugin_cloudwatch_save_succeeded",{auth_type:e.jsonData.authType})}),X=(0,E.J7)().subscribe(w.LL,()=>{b("grafana_plugin_cloudwatch_save_failed",{auth_type:e.jsonData.authType})});return()=>{M.unsubscribe(),X.unsubscribe()}},[e.jsonData.authType,b]);const[h,S]=(0,s.useState)("");(0,s.useEffect)(()=>{!h&&l&&l.resources.getExternalId().then(S).catch(()=>S("Unable to fetch externalId"))},[l,h]);const[v,x]=(0,s.useState)(null),I=()=>{x(null)};return(0,s.useEffect)(()=>{e.jsonData.authType==="arn"?x(Ea):e.jsonData.authType==="credentials"&&!e.jsonData.profile&&!e.jsonData.database&&x(ba)},[e.jsonData.authType,e.jsonData.database,e.jsonData.profile]),p?s.createElement("div",{className:"width-30"},v&&s.createElement(ge.F,{title:"CloudWatch Authentication",severity:"warning",onRemove:I},v),s.createElement(ar.NN,{...t,newFormStylingEnabled:!0,loadRegions:l&&(async()=>l.resources.getRegions().then(M=>M.reduce((X,me)=>me.value?[...X,me.value]:X,[]))),externalId:h}),oe.$.secureSocksDSProxyEnabled&&s.createElement(ya,{options:e,onOptionsChange:r}),s.createElement(or.c,null),s.createElement(bt.A,{title:"Cloudwatch Logs"},s.createElement(Je.D,{htmlFor:"logsTimeout",label:"Query Result Timeout",description:'Grafana will poll for Cloudwatch Logs results every second until Done status is returned from AWS or timeout is exceeded, in which case Grafana will return an error. Note: For Alerting, the timeout from Grafana config file will take precedence. Must be a valid duration string, such as "30m" (default) "30s" "2000ms" etc.',invalid:!!c},s.createElement(ie.p,{id:"logsTimeout",width:60,placeholder:"30m",value:e.jsonData.logsTimeout||"",onChange:(0,Se.PG)(t,"logsTimeout"),title:'The timeout must be a valid duration string, such as "15m" "30s" "2000ms" etc.'})),s.createElement(Je.D,{label:"Default Log Groups",description:"Optionally, specify default log groups for CloudWatch Logs queries.",...u},l?s.createElement(ct,{newFormStylingEnabled:!0,region:o??"",datasource:l,onBeforeOpen:()=>{if(d)return;let M="You need to save the data source before adding log groups.";throw t.options.version&&t.options.version>1&&(M="You have unsaved connection detail changes. You need to save the data source before adding log groups."),g({invalid:!0,error:M}),new Error(M)},legacyLogGroupNames:n,logGroups:i,onChange:M=>{r({...t.options,jsonData:{...t.options.jsonData,logGroups:M,defaultLogGroups:void 0}})},maxNoOfVisibleLogGroups:2,legacyOnChange:M=>{(0,Se.lO)(t,"defaultLogGroups",M)}}):s.createElement(s.Fragment,null))),s.createElement(or.c,null),s.createElement(Pr,{newFormStyling:!0,onChange:M=>(0,Se.lO)(t,"tracingDatasourceUid",M),datasourceUid:e.jsonData.tracingDatasourceUid})):s.createElement(s.Fragment,null,v&&s.createElement(ge.F,{title:"CloudWatch Authentication",severity:"warning",onRemove:I},v),s.createElement(ar.NN,{...t,labelWidth:29,loadRegions:l&&(async()=>l.resources.getRegions().then(M=>M.reduce((X,me)=>me.value?[...X,me.value]:X,[]))),externalId:h},s.createElement(ve.I,{label:"Namespaces of Custom Metrics",labelWidth:29,tooltip:"Namespaces of Custom Metrics."},s.createElement(ie.p,{width:60,placeholder:"Namespace1,Namespace2",value:e.jsonData.customMetricsNamespaces||"",onChange:(0,Se.PG)(t,"customMetricsNamespaces")}))),oe.$.secureSocksDSProxyEnabled&&s.createElement(hn.Y,{options:e,onOptionsChange:r}),s.createElement("h3",{className:"page-heading"},"CloudWatch Logs"),s.createElement("div",{className:"gf-form-group"},s.createElement(ve.I,{label:"Query Result Timeout",labelWidth:28,tooltip:'Grafana will poll for Cloudwatch Logs query results every second until Done status is returned from AWS or timeout is exceeded, in which case Grafana will return an error. The default period is 30 minutes. Note: For Alerting, the timeout defined in the config file will take precedence. Must be a valid duration string, such as "15m" "30s" "2000ms" etc.',invalid:!!c},s.createElement(ie.p,{width:60,placeholder:"30m",value:e.jsonData.logsTimeout||"",onChange:(0,Se.PG)(t,"logsTimeout"),title:'The timeout must be a valid duration string, such as "15m" "30s" "2000ms" etc.'})),s.createElement(ve.I,{label:"Default Log Groups",labelWidth:28,tooltip:"Optionally, specify default log groups for CloudWatch Logs queries.",shrink:!0,...u},l?s.createElement(ct,{region:o??"",datasource:l,onBeforeOpen:()=>{if(d)return;let M="You need to save the data source before adding log groups.";throw t.options.version&&t.options.version>1&&(M="You have unsaved connection detail changes. You need to save the data source before adding log groups."),g({invalid:!0,error:M}),new Error(M)},legacyLogGroupNames:n,logGroups:i,onChange:M=>{r({...t.options,jsonData:{...t.options.jsonData,logGroups:M,defaultLogGroups:void 0}})},maxNoOfVisibleLogGroups:2,legacyOnChange:M=>{(0,Se.lO)(t,"defaultLogGroups",M)}}):s.createElement(s.Fragment,null))),s.createElement(Pr,{onChange:M=>(0,Se.lO)(t,"tracingDatasourceUid",M),datasourceUid:e.jsonData.tracingDatasourceUid}))};function Aa(t){const[e,r]=(0,s.useState)();return(0,s.useEffect)(()=>{t.options.version&&(0,St.l)().get(t.options.name).then(n=>{n instanceof Fr&&r(n)})},[t.options.version,t.options.name]),e}function Ta(t){const[e,r]=(0,s.useState)(void 0);return(0,gn.A)(()=>{if(t)try{Et.describeInterval(t),r(void 0)}catch(n){n instanceof Error&&r(n.toString())}else r(void 0)},350,[t]),e}function Ia(t){const[e,r]=(0,s.useState)(!!t.options.version&&t.options.version>1);return(0,s.useEffect)(()=>{r(!1)},[t.options.jsonData.assumeRoleArn,t.options.jsonData.authType,t.options.jsonData.defaultRegion,t.options.jsonData.endpoint,t.options.jsonData.externalId,t.options.jsonData.profile,t.options.secureJsonData?.accessKey,t.options.secureJsonData?.secretKey]),(0,s.useEffect)(()=>{t.options.version&&t.options.version>1&&r(!0)},[t.options.version]),e}function Ca({data:t=[]}){const e=(0,s.useMemo)(()=>(0,ee.groupBy)(t,"refId"),[t]);return s.createElement(s.Fragment,null,s.createElement("table",{className:"filter-table form-inline"},s.createElement("thead",null,s.createElement("tr",null,s.createElement("th",null,"RefId"),s.createElement("th",null,"Metric Data Query ID"),s.createElement("th",null,"Metric Data Query Expression"),s.createElement("th",null,"Period"),s.createElement("th",null))),Object.entries(e).map(([r,n],a)=>{if(!n.length)return null;const o=n[0],i=o.meta?.custom;return i?s.createElement("tbody",{key:a},s.createElement("tr",null,s.createElement("td",null,r),s.createElement("td",null,i.id),s.createElement("td",null,o.meta?.executedQueryString),s.createElement("td",null,i.period))):null})))}var Kr=m(38894),wa=m(84596);function $r({panelData:t,query:e,datasource:r}){const[n,a]=(0,s.useState)(""),o=(0,wa.A)(t);return(0,s.useEffect)(()=>{if(o!==t&&t?.request?.range){const i=(e.logGroups??[]).filter(b=>b?.arn).map(b=>(b.arn??"").replace(/:\*$/,"")),l=e.logGroupNames;let c=i?.length?i:l;const d=t?.request?.range,u=d.from.toISOString(),p={end:d.to.toISOString(),start:u,timeType:"ABSOLUTE",tz:"UTC",editorString:e.expression??"",isLiveTail:!1,source:c??[]};a(wr(p,r.resources.getActualRegion(e.region)))}},[t,o,r,e]),s.createElement("a",{href:n,target:"_blank",rel:"noopener noreferrer"},s.createElement(kt.I,{name:"share-alt"})," CloudWatch Logs Insights")}var ut=m(32372);const xa=async(t,e,r,n)=>{const{id:a,loader:o}=e;return n?.dispose(),o().then(i=>t.languages.registerCompletionItemProvider(a,r.getCompletionProvider(t,e)))},dt=async(t,e,r)=>{const{id:n,loader:a}=e;if(!t.languages.getLanguages().find(i=>i.id===n))return t.languages.register({id:n}),a().then(i=>(t.languages.setMonarchTokensProvider(n,i.language),t.languages.setLanguageConfiguration(n,i.conf),t.languages.registerCompletionItemProvider(n,r.getCompletionProvider(t,e))))},Ra=/\s+by\s+/im,Qt=/([\w$@().]+)(?:(\s+as\s+)([\w$]+))?\s*,?\s*/iy;function kr(t){let e=[],r;if(r=t.match(Ra)){Qt.lastIndex=r.index+r[0].length;let n;for(;n=Qt.exec(t);)e.push(n[2]?n[3]:n[1]),Qt.lastIndex=n.index+n[0].length}return e}const La=t=>{const{query:e,datasource:r,onChange:n,ExtraFieldElement:a,data:o}=t,i=o?.error?.refId===e.refId,l=(0,s.useRef)(),c=(0,s.useRef)(),d=(0,s.useCallback)(async h=>{n(h)},[n]),u=(0,s.useCallback)(async()=>{c.current=await xa(l.current,Dt,r.logsCompletionItemProviderFunc({region:e.region,logGroups:e.logGroups}),c.current)},[r,e.logGroups,e.region]),g=(0,s.useCallback)(h=>{const S={...e,expression:h,statsGroups:kr(h)};n(S)},[n,e]),p=(0,s.useCallback)((h,S)=>{h.onDidFocusEditorText(()=>h.trigger(z.id,z.id,{})),h.addCommand(S.KeyMod.Shift|S.KeyCode.Enter,()=>{const v=h.getValue();g(v)})},[g]),b=async h=>{l.current=h,c.current=await dt(h,Dt,r.logsCompletionItemProviderFunc({region:e.region,logGroups:e.logGroups}))};return s.createElement(s.Fragment,null,s.createElement(ct,{region:e.region,datasource:r,legacyLogGroupNames:e.logGroupNames,logGroups:e.logGroups,onChange:h=>{d({...e,logGroups:h,logGroupNames:void 0})},legacyOnChange:h=>{d({...e,logGroupNames:h})}}),s.createElement("div",{className:"gf-form-inline gf-form-inline--nowrap flex-grow-1"},s.createElement("div",{className:"gf-form--grow flex-shrink-1"},s.createElement(ut.B,{height:"150px",width:"100%",showMiniMap:!1,monacoOptions:{scrollBeyondLastLine:!1,fontSize:14,lineNumbers:"off",renderLineHighlight:"none",scrollbar:{vertical:"hidden",horizontal:"hidden"},suggestFontSize:12,wordWrap:"on",padding:{top:6}},language:Dt.id,value:e.expression??"",onBlur:h=>{h!==e.expression&&g(h),c.current?.dispose()},onFocus:u,onBeforeEditorMount:b,onEditorDidMount:p,onEditorWillUnmount:()=>c.current?.dispose()})),a),i?s.createElement("div",{className:"query-row-break"},s.createElement("div",{className:"prom-query-field-info text-error"},o?.error?.message)):null)},Oa=(0,he.cV)(La);var Ma=m(3547),Fa=m(20084);const Na=[(0,Ma.e)(),(0,qt.D)({onlyIn:t=>t.object==="block"&&t.type==="code_block",getSyntax:t=>"cloudwatch"},{...Ht.languages,cloudwatch:vt})],Da=t=>{const{query:e,datasource:r,onChange:n,ExtraFieldElement:a,data:o}=t,i=o?.error?.refId===e.refId,l=r.languageProvider.cleanText,c=u=>{const g={...e,expression:u,statsGroups:kr(u)};n(g)},d=async u=>{const{datasource:g,query:p}=t,{logGroups:b}=p;if(!g.languageProvider)return{suggestions:[]};const{history:h,absoluteRange:S}=t,{prefix:v,text:x,value:I,wrapperClasses:M,labelKey:X,editor:me}=u;return await g.languageProvider.provideCompletionItems({text:x,value:I,prefix:v,wrapperClasses:M,labelKey:X,editor:me},{history:h,absoluteRange:S,logGroups:b,region:p.region})};return s.createElement(s.Fragment,null,s.createElement(ct,{region:e.region,datasource:r,legacyLogGroupNames:e.logGroupNames,logGroups:e.logGroups,onChange:u=>{n({...e,logGroups:u,logGroupNames:void 0})},legacyOnChange:u=>{n({...e,logGroupNames:u})}}),s.createElement("div",{className:"gf-form-inline gf-form-inline--nowrap flex-grow-1"},s.createElement("div",{className:"gf-form gf-form--grow flex-shrink-1"},s.createElement(Fa.X,{additionalPlugins:Na,query:e.expression??"",onChange:c,onTypeahead:d,cleanText:l,placeholder:"Enter a CloudWatch Logs Insights query (run with Shift+Enter)",portalOrigin:"cloudwatch"})),a),i?s.createElement("div",{className:"query-row-break"},s.createElement("div",{className:"prom-query-field-info text-error"},o?.error?.message)):null)},Ga=(0,he.cV)(Da),Vr=(0,T.css)` margin-left: 3px; flex-grow: 0; `,Wa=(0,s.memo)(function(e){const{query:r,data:n,datasource:a}=e;let o;if(n?.request?.range?.from){const{range:i}=n.request;o={from:i.from.valueOf(),to:i.to.valueOf()}}else o={from:Date.now()-1e4,to:Date.now()};return oe.$.featureToggles.cloudWatchLogsMonacoEditor?s.createElement(Oa,{...e,ExtraFieldElement:s.createElement(Kr.I,{className:`gf-form-label--btn ${Vr}`,width:"auto",tooltip:"Link to Graph in AWS"},s.createElement($r,{query:r,panelData:n,datasource:a}))}):s.createElement(Ga,{...e,history:[],absoluteRange:o,ExtraFieldElement:s.createElement(Kr.I,{className:`gf-form-label--btn ${Vr}`,width:"auto",tooltip:"Link to Graph in AWS"},s.createElement($r,{query:r,panelData:n,datasource:a}))})});var Pa=m(94354);const Ka=(t,e)=>{const r=(0,s.useMemo)(()=>Kt(t),[t]);return(0,s.useEffect)(()=>{r!==t&&e(r)},[r,t,e]),r};var $a=m(64698);class ka{constructor(){this.tokenTypes={Parenthesis:"delimiter.parenthesis.cloudwatch-dynamicLabels",Whitespace:"white.cloudwatch-dynamicLabels",Keyword:"keyword.cloudwatch-dynamicLabels",Delimiter:"delimiter.cloudwatch-dynamicLabels",Operator:"operator.cloudwatch-dynamicLabels",Identifier:"identifier.cloudwatch-dynamicLabels",Type:"type.cloudwatch-dynamicLabels",Function:"predefined.cloudwatch-dynamicLabels",Number:"number.cloudwatch-dynamicLabels",String:"string.cloudwatch-dynamicLabels",Variable:"variable.cloudwatch-dynamicLabels",Comment:"comment.cloudwatch-dynamicLabels",Regexp:"regexp.cloudwatch-dynamicLabels"}}getCompletionProvider(e,r){return{triggerCharacters:[" ","$",",","(","'"],provideCompletionItems:async(n,a)=>{const o=vr(e,r,n,a,this.tokenTypes),l=o?.isWhiteSpace()||o?.isParenthesis()||!o?.range?e.Range.fromPositions(a):o?.range,c=(g,p={})=>({label:g,insertText:g,kind:e.languages.CompletionItemKind.Field,range:l,sortText:re.Medium,...p});let d=[];const u=o?.next;return!o?.isFunction()&&(!u||u.isWhiteSpace())&&(d=$a.DYNAMIC_LABEL_PATTERNS.map(g=>c(g)),d.push(c("${PROP('Dim.')}",{sortText:re.High,insertText:"${PROP('Dim.$0')} ",insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet}))),{suggestions:d}}}}}const Qr={id:"cloudwatch-dynamicLabels",extensions:[],aliases:[],mimetypes:[],loader:()=>Promise.resolve().then(m.bind(m,64698))},Va=new ka;function Qa({label:t,width:e,onChange:r}){const n=(0,he.$j)(),a=(0,ie.n)({theme:n,width:e}),o=(0,s.useRef)(null),i=(0,s.useCallback)((l,c)=>{l.onDidFocusEditorText(()=>l.trigger(z.id,z.id,{})),l.addCommand(c.KeyMod.Shift|c.KeyCode.Enter,()=>{const u=l.getValue();r(u)});const d=o.current;d!==null&&l.layout({width:d.clientWidth,height:d.clientHeight})},[r]);return s.createElement("div",{ref:o,className:(0,T.cx)(a.wrapper)},s.createElement(ut.B,{containerStyles:(0,T.css)` border: 1px solid ${n.colors.action.disabledBackground}; &:hover { border-color: ${n.components.input.borderColor}; } `,monacoOptions:{scrollBeyondLastLine:!1,fontSize:14,lineNumbers:"off",renderLineHighlight:"none",overviewRulerLanes:0,scrollbar:{vertical:"hidden",horizontal:"hidden"},suggestFontSize:12,padding:{top:6}},language:Qr.id,value:t,onBlur:l=>{l!==t&&r(l)},onBeforeEditorMount:l=>dt(l,Qr,Va),onEditorDidMount:i}))}const Br={id:"cloudwatch-MetricMath",extensions:[],aliases:[],mimetypes:[],loader:()=>Promise.resolve().then(m.bind(m,74746))};function Ba({expression:t,onChange:e,datasource:r}){const n=(0,s.useRef)(null),a=(0,s.useCallback)((o,i)=>{o.onDidFocusEditorText(()=>o.trigger(z.id,z.id,{})),o.addCommand(i.KeyMod.Shift|i.KeyCode.Enter,()=>{const c=o.getValue();e(c)});const l=()=>{const c=n.current;if(c!==null){const d=Math.min(200,o.getContentHeight()),u=Math.max(32,d);c.style.height=`${u}px`,c.style.width="100%";const g=c.clientWidth;o.layout({width:g,height:u})}};o.onDidContentSizeChange(l),l()},[e]);return s.createElement("div",{ref:n},s.createElement(ut.B,{monacoOptions:{scrollBeyondLastLine:!1,fontSize:14,lineNumbers:"off",renderLineHighlight:"none",scrollbar:{vertical:"hidden",horizontal:"hidden"},suggestFontSize:12,wordWrap:"on",padding:{top:6}},language:Br.id,value:t,onBlur:o=>{o!==t&&e(o)},onBeforeEditorMount:o=>dt(o,Br,r.metricMathCompletionItemProvider),onEditorDidMount:a}))}var L=m(91621);class Ur{constructor(e=(0,Te.w)()){this.templateSrv=e}expressionToSqlQuery({select:e,from:r,where:n,groupBy:a,orderBy:o,orderByDirection:i,limit:l}){if(!r||!e?.name||!e?.parameters?.length)return;let c=[];return this.appendSelect(e,c),this.appendFrom(r,c),this.appendWhere(n,c,!0,n?.expressions?.length??0),this.appendGroupBy(a,c),this.appendOrderBy(o,i,c),this.appendLimit(l,c),c.join(" ")}appendSelect(e,r){r.push("SELECT"),this.appendFunction(e,r)}appendFrom(e,r){r.push("FROM"),e?.type===L._W.Function?this.appendFunction(e,r):r.push(this.formatValue(e?.property?.name??""))}appendWhere(e,r,n,a){if(!e)return;const o="expressions"in e&&e.expressions.length>0;if(n&&o&&r.push("WHERE"),e.type===L._W.And){const i=[];if(e.expressions.map(d=>this.appendWhere(d,i,!1,a)),i.length===0)return;const l=i.join(" AND "),c=!n&&a>1&&i.length>1;return r.push(c?`(${l})`:l)}if(e.type===L._W.Or){const i=[];if(e.expressions.map(d=>this.appendWhere(d,i,!1,a)),i.length===0)return;const l=i.join(" OR "),c=!n&&a>1&&i.length>1;r.push(c?`(${l})`:l);return}if(e.type===L._W.Operator)return this.appendOperator(e,r)}appendGroupBy(e,r){const n=[];for(const a of e?.expressions??[])a?.type!==L._W.GroupBy||!a.property.name||n.push(this.formatValue(a.property.name));n.length>0&&r.push(`GROUP BY ${n.join(", ")}`)}appendOrderBy(e,r,n){e&&(n.push("ORDER BY"),this.appendFunction(e,n),n.push(r??"ASC"))}appendLimit(e,r){e&&r.push(`LIMIT ${e}`)}appendOperator(e,r,n){const{property:a,operator:o}=e;!a.name||!o.name||!o.value||r.push(`${this.formatValue(a.name)} ${o.name} '${o.value}'`)}appendFunction(e,r){if(!e?.name)return;const n=(e.parameters??[]).map(a=>a.name&&this.formatValue(a.name)).filter(Boolean).join(", ");r.push(`${e.name}(${n})`)}formatValue(e){const r=/[/\s\.%-]/,n=/^\d/,a=this.templateSrv.replace(e,{},"raw");return r.test(a)||n.test(a)?`"${e}"`:e}}function Bt(t){return t?.parameters?.[0].name}function mt(t){if(t?.type===L._W.Property)return t.property.name;if(t?.type===L._W.Function)return t.parameters?.[0].name}function Ua(t){if(t?.type===L._W.Function&&t?.parameters?.length)return t?.parameters?.length<=1?[]:(t?.parameters.slice(1)).reduce((r,n)=>n.name?[...r,n.name]:r,[])}function za(t){return t?.type===L._W.Function&&t.name===A.SCHEMA}function ja(t){const e=t.property?.name,r=t.operator?.value,n=t.operator?.name;if(e&&r&&n)return{type:L._W.Operator,property:{type:L.Dw.String,name:e},operator:{value:r,name:n}}}function zr(t){return t.flatMap(e=>e.type===L._W.Operator?e:e.type===L._W.And||e.type===L._W.Or?zr(e.expressions):[])}function Ha(t){const e=t.where;return zr(e?.expressions??[])}function Ya(t){return t.flatMap(e=>e.type===L._W.GroupBy?e:[])}function Xa(t){const e=t.groupBy;return Ya(e?.expressions??[])}function qa(t){return t.reduce((e,r)=>r?{...e,[r]:null}:e,{})}function de(t,e){return{...t,sql:{...t.sql??{},...e}}}function Za(t,e){const r=t.sql??{};if(t.namespace=e||"",e===void 0)return de(t,{from:void 0});if(!r.from||r.from.type===L._W.Property)return de(t,{from:{type:L._W.Property,property:{type:L.Dw.String,name:e}}});if(r.from.type===L._W.Function){const n={type:L._W.FunctionParameter,name:e},a=(r.from.parameters??[]).slice(1);return de(t,{from:{type:L._W.Function,name:A.SCHEMA,parameters:[n,...a]}})}return t}function Ja(t,e){const r=t.sql??{};if(e=Array.isArray(e)?e.map(n=>n.value):[e.value],r.from?.type===L._W.Function&&r.from.parameters?.length){const n=(e??[]).map(o=>({type:L._W.FunctionParameter,name:o})),a=(r.from.parameters??[])[0];return de(t,{from:{type:L._W.Function,name:A.SCHEMA,parameters:[a,...n]}})}return t}function _a(t,e){const r={type:L._W.FunctionParameter,name:e};return de(t,{select:{type:L._W.Function,...t.sql?.select??{},parameters:[r]}})}function eo(t){const e={...t};return delete e.sql?.select?.parameters,e}function jr(t,e){return de(t,{select:{type:L._W.Function,...t.sql?.select??{},name:e}})}function to(t,e){return de(t,{orderBy:{type:L._W.Function,name:e}})}function ro(t,e){const r=mt((t.sql??{}).from);if(e){const n={type:L._W.FunctionParameter,name:r};return de(t,{from:{type:L._W.Function,name:A.SCHEMA,parameters:[n]}})}return de(t,{from:{type:L._W.Property,property:{type:L.Dw.String,name:r}}})}function no(t,e){return{type:L._W.Operator,property:{type:L.Dw.String,name:e},operator:t.operator??{}}}function so(t,e){return{type:L._W.Operator,property:t.property??{type:L.Dw.String},operator:{...t.operator,name:e}}}function ao(t,e){return{type:L._W.Operator,property:t.property??{type:L.Dw.String},operator:{...t.operator,value:e}}}function oo(t){return{type:L._W.GroupBy,property:{type:L.Dw.String,name:t}}}const io=A.STATISTICS.map(te.z),lo=({datasource:t,query:e,onQueryChange:r})=>{const n=e.sql??{},a=n.select?.name;(0,s.useEffect)(()=>{a||r(jr(e,A.STATISTICS[0]))},[a,r,e]);const o=Bt(n.select),i=mt(n.from),l=Ua(n.from),c=za(n.from),d=Ct(t),u=wt(t,{region:e.region,namespace:i}),g=(0,s.useMemo)(()=>qa(l??[]),[l]),p=Be(t,{region:e.region,namespace:i,metricName:o,dimensionFilters:g}),b=(0,s.useMemo)(()=>l?.length?[...p,...l.map(te.z)]:p,[p,l]),h=async v=>{const x=await S(v);r(x)},S=async v=>{let{region:x,sql:I,namespace:M}=v;return await t.resources.getMetrics({namespace:M,region:x}).then(X=>{X.some(me=>me.value===o)||(I=eo(v).sql)}),{...v,sql:I}};return s.createElement(s.Fragment,null,s.createElement(et.B,null,s.createElement(k.c,{label:"Namespace",width:16},s.createElement(Z.l6,{"aria-label":"Namespace",value:i?(0,te.z)(i):null,inputId:`${e.refId}-cloudwatch-sql-namespace`,options:d,allowCustomValue:!0,onChange:({value:v})=>v&&h(Za(e,v))})),s.createElement(k.c,{label:"With schema"},s.createElement(At.C,{id:`${e.refId}-cloudwatch-sql-withSchema`,value:c,onChange:v=>v.target instanceof HTMLInputElement&&r(ro(e,v.target.checked))})),c&&s.createElement(k.c,{label:"Schema labels",disabled:!i},s.createElement(Z.l6,{id:`${e.refId}-cloudwatch-sql-schema-label-keys`,width:"auto",isMulti:!0,value:l?l.map(te.z):null,options:b,allowCustomValue:!0,onChange:v=>v&&r(Ja(e,v))}))),s.createElement(et.B,null,s.createElement(k.c,{label:"Metric name",width:16},s.createElement(Z.l6,{"aria-label":"Metric name",value:o?(0,te.z)(o):null,options:u,allowCustomValue:!0,onChange:({value:v})=>v&&r(_a(e,v))})),s.createElement(k.c,{label:"Aggregation",width:16},s.createElement(Z.l6,{"aria-label":"Aggregation",value:a?(0,te.z)(a):null,options:fe(t,io),onChange:({value:v})=>v&&r(jr(e,v))}))))},co=A.COMPARISON_OPERATORS.map(te.z),uo=({query:t,onQueryChange:e,datasource:r})=>{const n=(0,s.useMemo)(()=>Ha(t.sql??{}),[t.sql]),[a,o]=(0,s.useState)(n),i=l=>{const c=l.map(g=>({type:L._W.Operator,property:g.property??{type:L.Dw.String},operator:g.operator??{name:A.EQUALS}}));o(c);const d=[];for(const g of c){const p=ja(g);p&&d.push(p)}const u=d.length?{type:L._W.And,expressions:d}:void 0;e(de(t,{where:u}))};return s.createElement(rt.o,{items:a,onChange:i,renderItem:mo(r,t)})};function mo(t,e){function r(n,a,o){return s.createElement(go,{datasource:t,query:e,filter:n,onChange:a,onDelete:o})}return r}const po=uo,go=t=>{const{datasource:e,query:r,filter:n,onChange:a,onDelete:o}=t,i=(0,he.of)(fo),l=r.sql??{},c=mt(l.from),d=Bt(l.select),u=Be(e,{region:r.region,namespace:c,metricName:d}),g=async()=>!n.property?.name||!c?[]:e.resources.getDimensionValues({region:r.region,namespace:c,metricName:d,dimensionKey:n.property.name}).then(v=>fe(e,v)),[p,b]=(0,Tt.A)(g,[r.region,c,d,n.property?.name]),h=Ue(e,n.property?.name),S=Ue(e,typeof n.operator?.value=="string"?n.operator?.value:void 0);return s.createElement("div",{className:i.container},s.createElement(ze.M,null,s.createElement(Z.l6,{width:"auto",value:n.property?.name?(0,te.z)(n.property?.name):null,options:u,allowCustomValue:!0,onChange:({value:v})=>v&&a(no(n,v))}),s.createElement(Z.l6,{width:"auto",value:n.operator?.name&&(0,te.z)(n.operator.name),options:co,onChange:({value:v})=>v&&a(so(n,v))}),s.createElement(Z.l6,{width:"auto",isLoading:p.loading,value:n.operator?.value&&typeof n.operator?.value=="string"?(0,te.z)(n.operator?.value):null,options:p.value,allowCustomValue:!0,onOpenMenu:b,onChange:({value:v})=>v&&a(ao(n,v))}),s.createElement(je.Z,{"aria-label":"remove",icon:"times",variant:"secondary",onClick:o})),h&&s.createElement(ge.F,{className:i.alert,title:h,severity:"error",topSpacing:1}),S&&s.createElement(ge.F,{className:i.alert,title:S,severity:"error",topSpacing:1}))},fo=()=>({container:(0,T.css)({display:"inline-block"}),alert:(0,T.css)({minWidth:"100%",width:"min-content"})}),ho=({query:t,datasource:e,onQueryChange:r})=>{const n=t.sql??{},a=(0,s.useMemo)(()=>Xa(t.sql??{}),[t.sql]),[o,i]=(0,s.useState)(a),l=mt(n.from),c=Bt(n.select),d=Be(e,{region:t.region,namespace:l,metricName:c}),u=(0,s.useMemo)(()=>d.filter(p=>!a.some(b=>b.property.name===p.value)),[d,a]),g=p=>{const b=p.map(v=>({type:L._W.GroupBy,property:{type:L.Dw.String,name:v.property?.name}}));i(b);const h=b.filter(v=>v.property?.name),S=h.length?{type:L._W.And,expressions:h}:void 0;r(de(t,{groupBy:S}))};return s.createElement(rt.o,{items:o,onChange:g,renderItem:yo(u)})};function yo(t){function e(r,n,a){return s.createElement(vo,{options:t,item:r,onChange:n,onDelete:a})}return e}const vo=t=>{const{options:e,item:r,onChange:n,onDelete:a}=t,o=r.property?.name;return s.createElement(ze.M,null,s.createElement(Z.l6,{"aria-label":`Group by ${o??"filter key"}`,width:"auto",value:o?(0,te.z)(o):null,options:e,allowCustomValue:!0,onChange:({value:i})=>i&&n(oo(i))}),s.createElement(je.Z,{"aria-label":"remove",icon:"times",variant:"secondary",onClick:a}))},Eo=ho,Hr=[{label:A.ASC,value:A.ASC},{label:A.DESC,value:A.DESC}],bo=({query:t,onQueryChange:e,datasource:r})=>{const n=t.sql??{},a=n.orderBy?.name,o=n.orderByDirection;return s.createElement(et.B,null,s.createElement(k.c,{label:"Order by",optional:!0,width:16},s.createElement(ze.M,null,s.createElement(Z.l6,{"aria-label":"Order by",onChange:({value:i})=>i&&e(to(t,i)),options:fe(r,A.STATISTICS.map(te.z)),value:a?(0,te.z)(a):null}),a&&s.createElement(je.Z,{"aria-label":"remove",icon:"times",variant:"secondary",onClick:()=>e(de(t,{orderBy:void 0}))}))),s.createElement(k.c,{label:"Direction",disabled:!a,width:16},s.createElement(Z.l6,{"aria-label":"Direction",inputId:"cloudwatch-sql-order-by-direction",value:o?(0,te.z)(o):Hr[0],options:fe(r,Hr),onChange:i=>i&&e(de(t,{orderByDirection:i.value}))})))},So=({query:t,datasource:e,onChange:r})=>{const n=t.sql??{},a=(0,s.useCallback)(l=>{const d=new Ur().expressionToSqlQuery(l.sql??{}),u={...l,sqlExpression:d};r(u)},[r]),[o,i]=(0,s.useState)();return(0,s.useEffect)(()=>{const c=new Ur().expressionToSqlQuery(t.sql??{});o!==c&&i(c)},[t,o,i]),s.createElement(ur.D,null,s.createElement(Ie.U,null,s.createElement(lo,{query:t,onQueryChange:a,datasource:e})),s.createElement(Ie.U,null,s.createElement(k.c,{label:"Filter",optional:!0},s.createElement(po,{query:t,onQueryChange:a,datasource:e}))),s.createElement(Ie.U,null,s.createElement(k.c,{label:"Group by",optional:!0},s.createElement(Eo,{query:t,onQueryChange:a,datasource:e})),s.createElement(bo,{query:t,onQueryChange:a,datasource:e}),s.createElement(k.c,{label:"Limit",optional:!0},s.createElement(ie.p,{id:`${t.refId}-cloudwatch-sql-builder-editor-limit`,value:n.limit,onChange:l=>{const c=l.currentTarget.valueAsNumber;a(de(t,{limit:isNaN(c)?void 0:c}))},type:"number",min:1}))),o&&s.createElement(Ie.U,null,!1,s.createElement("pre",null,o??"")))},Yr={id:"cloudwatch-sql",extensions:[".cloudwatchSql"],aliases:["CloudWatch","cloudwatch","CloudWatchSQL"],mimetypes:[],loader:()=>Promise.resolve().then(m.bind(m,85232))},Ao=({region:t,sql:e,onChange:r,datasource:n})=>{(0,s.useEffect)(()=>{n.sqlCompletionItemProvider.setRegion(t)},[t,n]);const a=(0,s.useCallback)((o,i)=>{o.onDidFocusEditorText(()=>o.trigger(z.id,z.id,{})),o.addCommand(i.KeyMod.Shift|i.KeyCode.Enter,()=>{const l=o.getValue();r(l)})},[r]);return s.createElement(ut.B,{height:"150px",language:Yr.id,value:e,onBlur:o=>{o!==e&&r(o)},showMiniMap:!1,showLineNumbers:!0,onBeforeEditorMount:o=>dt(o,Yr,n.sqlCompletionItemProvider),onEditorDidMount:a})},Xr=[{label:"Metric Search",value:y.d$.Search},{label:"Metric Query",value:y.d$.Query}],To=[{label:"Builder",value:y.Rx.Builder},{label:"Code",value:y.Rx.Code}],Io=t=>{const{query:e,datasource:r,extraHeaderElementLeft:n,extraHeaderElementRight:a,onChange:o}=t,[i,l]=(0,s.useState)(!1),[c,d]=(0,s.useState)(!1),u=Ka(e,t.onChange),g=(0,s.useCallback)(p=>{if(c&&e.metricQueryType===y.d$.Query&&e.metricEditorMode===y.Rx.Code){l(!0);return}o({...e,metricEditorMode:p})},[l,o,c,e]);return(0,s.useEffect)(()=>(n?.(s.createElement(_e.W,{"aria-label":"Metric editor mode",value:Xr.find(p=>p.value===e.metricQueryType),options:Xr,onChange:({value:p})=>{o({...e,metricQueryType:p})}})),a?.(s.createElement(s.Fragment,null,s.createElement(Pa.z,{options:To,size:"sm",value:e.metricEditorMode,onChange:g}),s.createElement(Dr.u,{isOpen:i,title:"Are you sure?",body:"You will lose manual changes done to the query if you go back to the visual builder.",confirmText:"Yes, I am sure.",dismissText:"No, continue editing the query manually.",icon:"exclamation-triangle",onConfirm:()=>{l(!1),o({...e,metricEditorMode:y.Rx.Builder})},onDismiss:()=>l(!1)}))),()=>{n?.(void 0),a?.(void 0)}),[e,c,r,o,n,a,i,g]),s.createElement(s.Fragment,null,s.createElement(Ee.$,{v:.5}),e.metricQueryType===y.d$.Search&&s.createElement(s.Fragment,null,e.metricEditorMode===y.Rx.Builder&&s.createElement(pr,{...t,refId:e.refId,metricStat:e,onChange:p=>t.onChange({...e,...p})}),e.metricEditorMode===y.Rx.Code&&s.createElement(Ba,{expression:e.expression??"",onChange:p=>t.onChange({...e,expression:p}),datasource:r})),e.metricQueryType===y.d$.Query&&s.createElement(s.Fragment,null,e.metricEditorMode===y.Rx.Code&&s.createElement(Ao,{region:e.region,sql:e.sqlExpression??"",onChange:p=>{c||d(!0),t.onChange({...u,sqlExpression:p})},datasource:r}),e.metricEditorMode===y.Rx.Builder&&s.createElement(s.Fragment,null,s.createElement(So,{query:e,onChange:t.onChange,datasource:r}))),s.createElement(Ee.$,{v:.5}),s.createElement(Ie.U,null,s.createElement(k.c,{label:"ID",width:26,optional:!0,tooltip:"ID can be used to reference other queries in math expressions. The ID can include numbers, letters, and underscore, and must start with a lowercase letter.",invalid:!!e.id&&!/^$|^[a-z][a-zA-Z0-9_]*$/.test(e.id)},s.createElement(ie.p,{id:`${e.refId}-cloudwatch-metric-query-editor-id`,onChange:p=>o({...u,id:p.target.value}),type:"text",value:e.id})),s.createElement(k.c,{label:"Period",width:26,tooltip:"Minimum interval between points in seconds."},s.createElement(ie.p,{id:`${e.refId}-cloudwatch-metric-query-editor-period`,value:e.period||"",placeholder:"auto",onChange:p=>o({...u,period:p.target.value})})),s.createElement(k.c,{label:"Label",width:26,optional:!0,tooltip:"Change time series legend name using Dynamic labels. See documentation for details."},s.createElement(Qa,{width:52,label:u.label??"",onChange:p=>t.onChange({...e,label:p})}))))};var Co=m(41987),wo=m(31347),xo=m(39938);const Ro=[{label:"CloudWatch Metrics",value:"Metrics"},{label:"CloudWatch Logs",value:"Logs"}],Lo=({query:t,onChange:e,datasource:r,extraHeaderElementLeft:n,extraHeaderElementRight:a,dataIsStale:o,data:i,onRunQuery:l})=>{const{queryMode:c,region:d}=t,u=Sn(r.resources,t.region),[g,p]=It(r),b=Ve(t)?!t.expression:!1,h=({value:x})=>{if(x&&x!==c){let I="";x==="Logs"&&(I=Nn),e({...r.getDefaultQuery(Co.Jk.Unknown),...t,expression:I,queryMode:x})}},S=async x=>{if(oe.$.featureToggles.cloudWatchCrossAccountQuerying&&De(t)){const I=await r.resources.isMonitoringAccount(x);e({...t,region:x,accountId:I?t.accountId:void 0})}else e({...t,region:x})},v=oe.$.featureToggles.cloudWatchCrossAccountQuerying&&u&&(t.queryMode==="Logs"||De(t)&&t.metricQueryType===y.d$.Search);return s.createElement(s.Fragment,null,s.createElement(ir.X,null,s.createElement(_e.W,{label:"Region",value:d,placeholder:"Select region",allowCustomValue:!0,onChange:({value:x})=>x&&S(x),options:g,isLoading:p}),s.createElement(_e.W,{"aria-label":"Query mode",value:c,options:Ro,onChange:h,inputId:`cloudwatch-query-mode-${t.refId}`,id:`cloudwatch-query-mode-${t.refId}`}),n,s.createElement(wo.Z,{grow:1}),v&&s.createElement(s.Fragment,null,s.createElement(xo.E,{text:"Monitoring account",color:"blue",tooltip:"AWS monitoring accounts view data from source accounts so you can centralize monitoring and troubleshoot activities"})),s.createElement(Le.$n,{variant:o?"primary":"secondary",size:"sm",onClick:l,icon:i?.state===Ae.Gu.Loading?"spinner":void 0,disabled:i?.state===Ae.Gu.Loading||b},"Run queries"),a))},Oo=t=>{const{query:e,onChange:r,data:n}=t,[a,o]=(0,s.useState)(!1),[i,l]=(0,s.useState)(),[c,d]=(0,s.useState)();(0,s.useEffect)(()=>{o(!1)},[n]);const u=(0,s.useCallback)(g=>{o(!0),r(g)},[r]);return s.createElement(s.Fragment,null,s.createElement(Lo,{...t,extraHeaderElementLeft:i,extraHeaderElementRight:c,dataIsStale:a}),De(e)&&s.createElement(Io,{...t,query:e,onRunQuery:()=>{},onChange:u,extraHeaderElementLeft:l,extraHeaderElementRight:d}),Ve(e)&&s.createElement(Wa,{...t,query:e,onChange:u}))};var Mo=m(14110),Fo=m(42809);const No=({payload:{dashboardId:t,orgId:e,grafanaVersion:r,queries:n}})=>{try{const a=n[Fo.id];if(!a?.length)return;let o=[],i=[];for(const c of a)if(!c.hide){if(Ve(c))c.logGroupNames?.length&&o.push(c);else if(De(c)){const d=Kt(c);cr(d)&&i.push(c)}}const l={grafana_version:r,dashboard_id:t,org_id:e,logs_queries_count:o?.length,metrics_queries_count:i?.length,metrics_search_count:0,metrics_search_builder_count:0,metrics_search_code_count:0,metrics_search_match_exact_count:0,metrics_query_count:0,metrics_query_builder_count:0,metrics_query_code_count:0,metrics_queries_with_account_count:0};for(const c of i)l.metrics_search_count+=+(c.metricQueryType===y.d$.Search),l.metrics_search_builder_count+=+Ut(c),l.metrics_search_code_count+=+(c.metricQueryType===y.d$.Search&&c.metricEditorMode===y.Rx.Code),l.metrics_search_match_exact_count+=+!!(Ut(c)&&c.matchExact),l.metrics_query_count+=+(c.metricQueryType===y.d$.Query),l.metrics_query_builder_count+=+(c.metricQueryType===y.d$.Query&&c.metricEditorMode===y.Rx.Builder),l.metrics_query_code_count+=+(c.metricQueryType===y.d$.Query&&c.metricEditorMode===y.Rx.Code),l.metrics_queries_with_account_count+=+!!(oe.$.featureToggles.cloudWatchCrossAccountQuerying&&Ut(c)&&c.accountId);(0,Mo.rR)("grafana_ds_cloudwatch_dashboard_loaded",l)}catch(a){console.error("error in cloudwatch tracking handler",a)}},Ut=t=>t.metricQueryType===y.d$.Search&&t.metricEditorMode===y.Rx.Builder,Do=new R.tD(Fr).setQueryEditorHelp(pn).setConfigEditor(Sa).setQueryEditor(Oo).setMetadataInspector(Ca);(0,E.J7)().subscribe(w.gc,No)},72774:pe=>{"use strict";pe.exports=function Q(m,R){if(m===R)return!0;if(m&&R&&typeof m=="object"&&typeof R=="object"){if(m.constructor!==R.constructor)return!1;var w,E,T;if(Array.isArray(m)){if(w=m.length,w!=R.length)return!1;for(E=w;E--!==0;)if(!Q(m[E],R[E]))return!1;return!0}if(m.constructor===RegExp)return m.source===R.source&&m.flags===R.flags;if(m.valueOf!==Object.prototype.valueOf)return m.valueOf()===R.valueOf();if(m.toString!==Object.prototype.toString)return m.toString()===R.toString();if(T=Object.keys(m),w=T.length,w!==Object.keys(R).length)return!1;for(E=w;E--!==0;)if(!Object.prototype.hasOwnProperty.call(R,T[E]))return!1;for(E=w;E--!==0;){var K=T[E];if(!(K==="_owner"&&m.$$typeof)&&!Q(m[K],R[K]))return!1}return!0}return m!==m&&R!==R}},50287:(pe,Q,m)=>{pe.exports=m(53995)},53995:(pe,Q)=>{(function(m){"use strict";m.stringify=function w(E){function T($){return/[^\w-.]/.test($)?$.replace(/[^\w-.]/g,function(N){return N==="$"?"!":(N=N.charCodeAt(0),N<256?"*"+("00"+N.toString(16)).slice(-2):"**"+("0000"+N.toString(16)).slice(-4))}):$}var K;switch(typeof E){case"number":return isFinite(E)?"~"+E:"~null";case"boolean":return"~"+E;case"string":return"~'"+T(E);case"object":if(!E)return"~null";if(K=[],Array.isArray(E)){for(var B=0;B<E.length;B++)K[B]=w(E[B])||"~null";return"~("+(K.join("")||"~")+")"}else{for(var D in E)if(E.hasOwnProperty(D)){var G=w(E[D]);G&&K.push(T(D)+G)}return"~("+K.join("~")+")"}default:return}};var R={true:!0,false:!1,null:null};m.parse=function(w){if(!w)return w;w=w.replace(/%(25)*27/g,"'");var E=0,T=w.length;function K(D){if(w.charAt(E)!==D)throw new Error("bad JSURL syntax: expected "+D+", got "+(w&&w.charAt(E)));E++}function B(){for(var D=E,G,$="";E<T&&(G=w.charAt(E))!=="~"&&G!==")";)switch(G){case"*":D<E&&($+=w.substring(D,E)),w.charAt(E+1)==="*"?($+=String.fromCharCode(parseInt(w.substring(E+2,E+6),16)),D=E+=6):($+=String.fromCharCode(parseInt(w.substring(E+1,E+3),16)),D=E+=3);break;case"!":D<E&&($+=w.substring(D,E)),$+="$",D=++E;break;default:E++}return $+w.substring(D,E)}return function D(){var G,$,N;switch(K("~"),$=w.charAt(E)){case"(":if(E++,w.charAt(E)==="~")if(G=[],w.charAt(E+1)===")")E++;else do G.push(D());while(w.charAt(E)==="~");else if(G={},w.charAt(E)!==")")do{var H=B();G[H]=D()}while(w.charAt(E)==="~"&&++E);K(")");break;case"'":E++,G=B();break;default:for(N=E++;E<T&&/[^)~]/.test(w.charAt(E));)E++;var J=w.substring(N,E);if(/[\d\-]/.test($))G=parseFloat(J);else if(G=R[J],typeof G>"u")throw new Error("bad value keyword: "+J)}return G}()},m.tryParse=function(w,E){try{return m.parse(w)}catch{return E}}})(Q)},45214:(pe,Q,m)=>{"use strict";m.d(Q,{A:()=>N});var R=m(96540),w=function(H){return H!==Object(H)},E=function(H,J,q){var se=(0,R.useRef)(void 0);(!se.current||!q(J,se.current))&&(se.current=J),(0,R.useEffect)(H,se.current)};const T=E;var K=m(72774),B=m.n(K);const D=B();var G=function(H){return H!==Object(H)},$=function(H,J){T(H,J,D)};const N=$}}]); //# sourceMappingURL=2571.345ecfd2b82551018f2e.js.map
Edit
Rename
Chmod
Delete
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