Submit
Path:
~
/
/
usr
/
share
/
grafana
/
public
/
build
/
File Content:
graphitePlugin.d59175976346917781fe.js.map
{"version":3,"file":"graphitePlugin.d59175976346917781fe.js","mappings":"2MAWA,MAAMA,MAAO,MAA8C,MAAM,EAK3DC,MAAmB,MAAoC,oBAAoB,EAC3EC,MAAiB,MAA0C,iBAAiB,EAC5EC,MAAe,MAA4B,eAAe,EAG1DC,MAAsB,MAAmE,uBAAuB,EAGhHC,MAAY,MAA2C,aAAa,EACpEC,MAAa,MAAkD,aAAa,EAC5EC,MAAU,MAAa,SAAS,EAGhCC,MAAc,MAA+B,cAAc,EAC3DC,MAAiB,MAAqC,iBAAiB,EACvEC,MAAe,MAAqD,eAAe,EACnFC,MAAsB,MAAmE,uBAAuB,EAGhHC,MAAc,MAAgC,cAAc,EAC5DC,MAAW,MAAa,mBAAmB,EAC3CC,MAAmB,MAAa,eAAe,EAExCC,EAAU,CACrB,KAAAf,GACA,iBAAAC,GACA,eAAAC,GACA,aAAAC,GACA,oBAAAC,GACA,WAAAE,GACA,UAAAD,GACA,QAAAE,GACA,YAAAC,GACA,eAAAC,GACA,aAAAC,GACA,oBAAAC,GACA,YAAAC,GACA,SAAAC,GACA,iBAAAC,EACF,E,6DC5CA,MAAME,EAAqB,CACzB,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAC9G,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAC5G,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAC5G,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,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ins/datasource/graphite/lexer.ts","webpack://grafana/./public/app/plugins/datasource/graphite/utils.ts","webpack://grafana/./public/app/plugins/datasource/graphite/parser.ts","webpack://grafana/./public/app/plugins/datasource/graphite/graphite_query.ts","webpack://grafana/./public/app/plugins/datasource/graphite/state/helpers.ts","webpack://grafana/./public/app/plugins/datasource/graphite/state/store.ts","webpack://grafana/./public/app/plugins/datasource/graphite/state/context.tsx","webpack://grafana/./public/app/plugins/datasource/graphite/types.ts","webpack://grafana/./public/app/plugins/datasource/graphite/components/helpers.ts","webpack://grafana/./public/app/plugins/datasource/graphite/components/AddGraphiteFunction.tsx","webpack://grafana/./public/app/plugins/datasource/graphite/components/FunctionEditorControls.tsx","webpack://grafana/./public/app/plugins/datasource/graphite/components/FunctionEditor.tsx","webpack://grafana/./public/app/plugins/datasource/graphite/components/FunctionParamEditor.tsx","webpack://grafana/./public/app/plugins/datasource/graphite/components/GraphiteFunctionEditor.tsx","webpack://grafana/./public/app/plugins/datasource/graphite/components/FunctionsSection.tsx","webpack://grafana/./public/app/plugins/datasource/graphite/components/GraphiteTextEditor.tsx","webpack://grafana/./public/app/plugins/datasource/graphite/state/providers.ts","webpack://grafana/./public/app/plugins/datasource/graphite/components/MetricSegment.tsx","webpack://grafana/./public/app/plugins/datasource/graphite/components/MetricsSection.tsx","webpack://grafana/./public/app/plugins/datasource/graphite/components/PlayButton.tsx","webpack://grafana/./public/app/plugins/datasource/graphite/components/TagEditor.tsx","webpack://grafana/./public/app/plugins/datasource/graphite/components/TagsSection.tsx","webpack://grafana/./public/app/plugins/datasource/graphite/components/SeriesSection.tsx","webpack://grafana/./public/app/plugins/datasource/graphite/components/GraphiteQueryEditor.tsx","webpack://grafana/./public/app/plugins/datasource/graphite/components/GraphiteVariableEditor.tsx","webpack://grafana/./public/app/plugins/datasource/graphite/meta.ts","webpack://grafana/./public/app/plugins/datasource/graphite/components/MetricTankMetaInspector.tsx","webpack://grafana/./public/app/plugins/datasource/graphite/versions.ts","webpack://grafana/./public/app/plugins/datasource/graphite/configuration/MappingsHelp.tsx","webpack://grafana/./public/app/plugins/datasource/graphite/configuration/MappingsConfiguration.tsx","webpack://grafana/./public/app/plugins/datasource/graphite/configuration/parseLokiLabelMappings.ts","webpack://grafana/./public/app/plugins/datasource/graphite/configuration/ConfigEditor.tsx","webpack://grafana/./public/app/core/utils/version.ts","webpack://grafana/./public/app/plugins/datasource/graphite/components/AnnotationsEditor.tsx","webpack://grafana/./public/app/plugins/datasource/graphite/gfunc.ts","webpack://grafana/./public/app/plugins/datasource/graphite/migrations.ts","webpack://grafana/./public/app/plugins/datasource/graphite/datasource.ts","webpack://grafana/./public/app/plugins/datasource/graphite/module.ts"],"sourcesContent":["import { createAction } from '@reduxjs/toolkit';\n\nimport { TimeRange } from '@grafana/data';\n\nimport { FuncInstance } from '../gfunc';\nimport { GraphiteQuery, GraphiteQueryEditorDependencies, GraphiteSegment, GraphiteTag } from '../types';\n\n/**\n * List of possible actions changing the state of QueryEditor\n */\n\nconst init = createAction<GraphiteQueryEditorDependencies>('init');\n\n/**\n * Synchronise editor dependencies with internal state.\n */\nconst timeRangeChanged = createAction<TimeRange | undefined>('time-range-changed');\nconst queriesChanged = createAction<GraphiteQuery[] | undefined>('queries-changed');\nconst queryChanged = createAction<GraphiteQuery>('query-changed');\n\n// Metrics & Tags\nconst segmentValueChanged = createAction<{ segment: GraphiteSegment | string; index: number }>('segment-value-changed');\n\n// Tags\nconst addNewTag = createAction<{ segment: GraphiteSegment }>('add-new-tag');\nconst tagChanged = createAction<{ tag: GraphiteTag; index: number }>('tag-changed');\nconst unpause = createAction('unpause');\n\n// Functions\nconst addFunction = createAction<{ name: string }>('add-function');\nconst removeFunction = createAction<{ func: FuncInstance }>('remove-function');\nconst moveFunction = createAction<{ func: FuncInstance; offset: number }>('move-function');\nconst updateFunctionParam = createAction<{ func: FuncInstance; index: number; value: string }>('change-function-param');\n\n// Text editor\nconst updateQuery = createAction<{ query: string }>('update-query');\nconst runQuery = createAction('run-current-query');\nconst toggleEditorMode = createAction('toggle-editor');\n\nexport const actions = {\n init,\n timeRangeChanged,\n queriesChanged,\n queryChanged,\n segmentValueChanged,\n tagChanged,\n addNewTag,\n unpause,\n addFunction,\n removeFunction,\n moveFunction,\n updateFunctionParam,\n updateQuery,\n runQuery,\n toggleEditorMode,\n};\n","import { bind } from 'lodash';\n\n// This is auto generated from the unicode tables.\n// The tables are at:\n// http://www.fileformat.info/info/unicode/category/Lu/list.htm\n// http://www.fileformat.info/info/unicode/category/Ll/list.htm\n// http://www.fileformat.info/info/unicode/category/Lt/list.htm\n// http://www.fileformat.info/info/unicode/category/Lm/list.htm\n// http://www.fileformat.info/info/unicode/category/Lo/list.htm\n// http://www.fileformat.info/info/unicode/category/Nl/list.htm\n\nconst unicodeLetterTable = [\n 170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886,\n 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1319, 1329, 1366, 1369, 1369,\n 1377, 1415, 1488, 1514, 1520, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786,\n 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069,\n 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2423, 2425,\n 2431, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525,\n 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649,\n 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749,\n 2768, 2768, 2784, 2785, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908,\n 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975,\n 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133,\n 3133, 3160, 3161, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3294, 3294,\n 3296, 3297, 3313, 3314, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3424, 3425, 3450, 3455, 3461,\n 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716,\n 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757,\n 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3805, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980,\n 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4256,\n 4293, 4304, 4346, 4348, 4348, 4352, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749,\n 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992,\n 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5905, 5920, 5937,\n 5952, 5969, 5984, 5996, 5998, 6000, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6263, 6272, 6312, 6314, 6314, 6320,\n 6389, 6400, 6428, 6480, 6509, 6512, 6516, 6528, 6571, 6593, 6599, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963,\n 6981, 6987, 7043, 7072, 7086, 7087, 7104, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7401, 7404, 7406, 7409, 7424,\n 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061,\n 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182,\n 8188, 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484,\n 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312,\n 11358, 11360, 11492, 11499, 11502, 11520, 11557, 11568, 11621, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694,\n 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11823, 11823, 12293, 12295, 12321,\n 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686,\n 12704, 12730, 12784, 12799, 13312, 13312, 19893, 19893, 19968, 19968, 40907, 40907, 40960, 42124, 42192, 42237, 42240,\n 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42647, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42894,\n 42896, 42897, 42912, 42921, 43002, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250,\n 43255, 43259, 43259, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43520, 43560, 43584, 43586,\n 43588, 43595, 43616, 43638, 43642, 43642, 43648, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714,\n 43714, 43739, 43741, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44002, 44032, 44032,\n 55203, 55203, 55216, 55238, 55243, 55291, 63744, 64045, 64048, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285,\n 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829,\n 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474,\n 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613,\n 65616, 65629, 65664, 65786, 65856, 65908, 66176, 66204, 66208, 66256, 66304, 66334, 66352, 66378, 66432, 66461, 66464,\n 66499, 66504, 66511, 66513, 66517, 66560, 66717, 67584, 67589, 67592, 67592, 67594, 67637, 67639, 67640, 67644, 67644,\n 67647, 67669, 67840, 67861, 67872, 67897, 68096, 68096, 68112, 68115, 68117, 68119, 68121, 68147, 68192, 68220, 68352,\n 68405, 68416, 68437, 68448, 68466, 68608, 68680, 69635, 69687, 69763, 69807, 73728, 74606, 74752, 74850, 77824, 78894,\n 92160, 92728, 110592, 110593, 119808, 119892, 119894, 119964, 119966, 119967, 119970, 119970, 119973, 119974, 119977,\n 119980, 119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086,\n 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144, 120146, 120485, 120488,\n 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688,\n 120712, 120714, 120744, 120746, 120770, 120772, 120779, 131072, 131072, 173782, 173782, 173824, 173824, 177972,\n 177972, 177984, 177984, 178205, 178205, 194560, 195101,\n];\n\nconst identifierStartTable: any[] = [];\n\nfor (let i = 0; i < 128; i++) {\n identifierStartTable[i] =\n (i >= 48 && i <= 57) || // 0-9\n i === 36 || // $\n i === 126 || // ~\n i === 124 || // |\n (i >= 65 && i <= 90) || // A-Z\n i === 95 || // _\n i === 45 || // -\n i === 42 || // *\n i === 58 || // :\n i === 91 || // templateStart [\n i === 93 || // templateEnd ]\n i === 63 || // ?\n i === 37 || // %\n i === 35 || // #\n i === 61 || // =\n (i >= 97 && i <= 122); // a-z\n}\n\nconst identifierPartTable = identifierStartTable;\n\nexport class Lexer {\n input: any;\n char: number;\n from: number;\n\n constructor(expression: any) {\n this.input = expression;\n this.char = 1;\n this.from = 1;\n }\n\n peek(i?: number) {\n return this.input.charAt(i || 0);\n }\n\n skip(i?: number) {\n i = i || 1;\n this.char += i;\n this.input = this.input.slice(i);\n }\n\n tokenize() {\n const list = [];\n let token = this.next();\n while (token) {\n list.push(token);\n token = this.next();\n }\n return list;\n }\n\n next() {\n this.from = this.char;\n\n // Move to the next non-space character.\n if (/\\s/.test(this.peek())) {\n while (/\\s/.test(this.peek())) {\n this.from += 1;\n this.skip();\n }\n\n if (this.peek() === '') {\n // EOL\n return null;\n }\n }\n\n let match = this.scanStringLiteral();\n if (match) {\n return match;\n }\n\n match = this.scanPunctuator() || this.scanNumericLiteral() || this.scanIdentifier() || this.scanTemplateSequence();\n\n if (match) {\n this.skip(match.value.length);\n return match;\n }\n\n // No token could be matched, give up.\n return null;\n }\n\n scanTemplateSequence() {\n if (this.peek() === '[' && this.peek(1) === '[') {\n return {\n type: 'templateStart',\n value: '[[',\n pos: this.char,\n };\n }\n\n if (this.peek() === ']' && this.peek(1) === ']') {\n return {\n type: 'templateEnd',\n value: '[[',\n pos: this.char,\n };\n }\n\n return null;\n }\n\n /*\n * Extract a JavaScript identifier out of the next sequence of\n * characters or return 'null' if its not possible. In addition,\n * to Identifier this method can also produce BooleanLiteral\n * (true/false) and NullLiteral (null).\n */\n scanIdentifier() {\n let id = '';\n let index = 0;\n let type, char;\n\n // Detects any character in the Unicode categories \"Uppercase\n // letter (Lu)\", \"Lowercase letter (Ll)\", \"Titlecase letter\n // (Lt)\", \"Modifier letter (Lm)\", \"Other letter (Lo)\", or\n // \"Letter number (Nl)\".\n //\n // Both approach and unicodeLetterTable were borrowed from\n // Google's Traceur.\n\n function isUnicodeLetter(code: number) {\n for (let i = 0; i < unicodeLetterTable.length; ) {\n if (code < unicodeLetterTable[i++]) {\n return false;\n }\n\n if (code <= unicodeLetterTable[i++]) {\n return true;\n }\n }\n\n return false;\n }\n\n function isHexDigit(str: string) {\n return /^[0-9a-fA-F]$/.test(str);\n }\n\n const readUnicodeEscapeSequence = bind(function (this: any) {\n index += 1;\n\n if (this.peek(index) !== 'u') {\n return null;\n }\n\n const ch1 = this.peek(index + 1);\n const ch2 = this.peek(index + 2);\n const ch3 = this.peek(index + 3);\n const ch4 = this.peek(index + 4);\n let code;\n\n if (isHexDigit(ch1) && isHexDigit(ch2) && isHexDigit(ch3) && isHexDigit(ch4)) {\n code = parseInt(ch1 + ch2 + ch3 + ch4, 16);\n\n if (isUnicodeLetter(code)) {\n index += 5;\n return '\\\\u' + ch1 + ch2 + ch3 + ch4;\n }\n\n return null;\n }\n\n return null;\n }, this);\n\n const getIdentifierStart = bind(function (this: any) {\n const chr = this.peek(index);\n const code = chr.charCodeAt(0);\n\n if (chr === '*') {\n index += 1;\n return chr;\n }\n\n if (code === 92) {\n return readUnicodeEscapeSequence();\n }\n\n if (code < 128) {\n if (identifierStartTable[code]) {\n index += 1;\n return chr;\n }\n\n return null;\n }\n\n if (isUnicodeLetter(code)) {\n index += 1;\n return chr;\n }\n\n return null;\n }, this);\n\n const getIdentifierPart = bind(function (this: any) {\n const chr = this.peek(index);\n const code = chr.charCodeAt(0);\n\n if (code === 92) {\n return readUnicodeEscapeSequence();\n }\n\n if (code < 128) {\n if (identifierPartTable[code]) {\n index += 1;\n return chr;\n }\n\n return null;\n }\n\n if (isUnicodeLetter(code)) {\n index += 1;\n return chr;\n }\n\n return null;\n }, this);\n\n char = getIdentifierStart();\n if (char === null) {\n return null;\n }\n\n id = char;\n for (;;) {\n char = getIdentifierPart();\n\n if (char === null) {\n break;\n }\n\n id += char;\n }\n\n switch (id) {\n case 'true': {\n type = 'bool';\n break;\n }\n case 'false': {\n type = 'bool';\n break;\n }\n default:\n type = 'identifier';\n }\n\n return {\n type: type,\n value: id,\n pos: this.char,\n };\n }\n\n /*\n * Extract a numeric literal out of the next sequence of\n * characters or return 'null' if its not possible. This method\n * supports all numeric literals described in section 7.8.3\n * of the EcmaScript 5 specification.\n *\n * This method's implementation was heavily influenced by the\n * scanNumericLiteral function in the Esprima parser's source code.\n */\n scanNumericLiteral(): any {\n let index = 0;\n let value = '';\n const length = this.input.length;\n let char = this.peek(index);\n let bad;\n\n function isDecimalDigit(str: string) {\n return /^[0-9]$/.test(str);\n }\n\n function isOctalDigit(str: string) {\n return /^[0-7]$/.test(str);\n }\n\n function isHexDigit(str: string) {\n return /^[0-9a-fA-F]$/.test(str);\n }\n\n function isIdentifierStart(ch: string) {\n return ch === '$' || ch === '_' || ch === '\\\\' || (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z');\n }\n\n // handle negative num literals\n if (char === '-') {\n value += char;\n index += 1;\n char = this.peek(index);\n }\n\n // Numbers must start either with a decimal digit or a point.\n if (char !== '.' && !isDecimalDigit(char)) {\n return null;\n }\n\n if (char !== '.') {\n value += this.peek(index);\n index += 1;\n char = this.peek(index);\n\n if (value === '0') {\n // Base-16 numbers.\n if (char === 'x' || char === 'X') {\n index += 1;\n value += char;\n\n while (index < length) {\n char = this.peek(index);\n if (!isHexDigit(char)) {\n break;\n }\n value += char;\n index += 1;\n }\n\n if (value.length <= 2) {\n // 0x\n return {\n type: 'number',\n value: value,\n isMalformed: true,\n pos: this.char,\n };\n }\n\n if (index < length) {\n char = this.peek(index);\n if (isIdentifierStart(char)) {\n return null;\n }\n }\n\n return {\n type: 'number',\n value: value,\n base: 16,\n isMalformed: false,\n pos: this.char,\n };\n }\n\n // Base-8 numbers.\n if (isOctalDigit(char)) {\n index += 1;\n value += char;\n bad = false;\n\n while (index < length) {\n char = this.peek(index);\n\n // Numbers like '019' (note the 9) are not valid octals\n // but we still parse them and mark as malformed.\n\n if (isDecimalDigit(char)) {\n bad = true;\n }\n if (!isOctalDigit(char)) {\n // if the char is a non punctuator then its not a valid number\n if (!this.isPunctuator(char)) {\n return null;\n }\n break;\n }\n value += char;\n index += 1;\n }\n\n if (index < length) {\n char = this.peek(index);\n if (isIdentifierStart(char)) {\n return null;\n }\n }\n\n return {\n type: 'number',\n value: value,\n base: 8,\n isMalformed: bad,\n };\n }\n\n // Decimal numbers that start with '0' such as '09' are illegal\n // but we still parse them and return as malformed.\n\n if (isDecimalDigit(char)) {\n index += 1;\n value += char;\n }\n }\n\n while (index < length) {\n char = this.peek(index);\n if (!isDecimalDigit(char)) {\n break;\n }\n value += char;\n index += 1;\n }\n }\n\n // Decimal digits.\n\n if (char === '.') {\n value += char;\n index += 1;\n\n while (index < length) {\n char = this.peek(index);\n if (!isDecimalDigit(char)) {\n break;\n }\n value += char;\n index += 1;\n }\n }\n\n // Exponent part.\n\n if (char === 'e' || char === 'E') {\n value += char;\n index += 1;\n char = this.peek(index);\n\n if (char === '+' || char === '-') {\n value += this.peek(index);\n index += 1;\n }\n\n char = this.peek(index);\n if (isDecimalDigit(char)) {\n value += char;\n index += 1;\n\n while (index < length) {\n char = this.peek(index);\n if (!isDecimalDigit(char)) {\n break;\n }\n value += char;\n index += 1;\n }\n } else {\n return null;\n }\n }\n\n if (index < length) {\n char = this.peek(index);\n if (!this.isPunctuator(char)) {\n return null;\n }\n }\n\n return {\n type: 'number',\n value: value,\n base: 10,\n pos: this.char,\n isMalformed: !isFinite(+value),\n };\n }\n\n isPunctuator(ch1: string) {\n switch (ch1) {\n case '.':\n case '(':\n case ')':\n case ',':\n case '{':\n case '}':\n return true;\n }\n\n return false;\n }\n\n scanPunctuator() {\n const ch1 = this.peek();\n\n if (this.isPunctuator(ch1)) {\n return {\n type: ch1,\n value: ch1,\n pos: this.char,\n };\n }\n\n return null;\n }\n\n /*\n * Extract a string out of the next sequence of characters and/or\n * lines or return 'null' if its not possible. Since strings can\n * span across multiple lines this method has to move the char\n * pointer.\n *\n * This method recognizes pseudo-multiline JavaScript strings:\n *\n * var str = \"hello\\\n * world\";\n */\n scanStringLiteral() {\n const quote = this.peek();\n\n // String must start with a quote.\n if (quote !== '\"' && quote !== \"'\") {\n return null;\n }\n\n let value = '';\n\n this.skip();\n\n while (this.peek() !== quote) {\n if (this.peek() === '') {\n // End Of Line\n return {\n type: 'string',\n value: value,\n isUnclosed: true,\n quote: quote,\n pos: this.char,\n };\n }\n\n const char = this.peek();\n const jump = 1; // A length of a jump, after we're done\n // parsing this character.\n\n value += char;\n this.skip(jump);\n }\n\n this.skip();\n return {\n type: 'string',\n value: value,\n isUnclosed: false,\n quote: quote,\n pos: this.char,\n };\n }\n}\n","import { last } from 'lodash';\n\nimport { GraphiteParserError } from './types';\n\n/**\n * Graphite-web before v1.6 returns HTTP 500 with full stack traces in an HTML page\n * when a query fails. It results in massive error alerts with HTML tags in the UI.\n * This function removes all HTML tags and keeps only the last line from the stack\n * trace which should be the most meaningful.\n */\nexport function reduceError(error: any) {\n if (error && error.status === 500 && error.data?.message?.startsWith('<body')) {\n // Remove all HTML tags and take the last line from the stack trace\n const newMessage = last<string>(\n error.data.message\n .replace(/(<([^>]+)>)/gi, '')\n .trim()\n .split(/\\n/)\n )!.replace(/u?&#[^;]+;/g, '');\n error.data.message = `Graphite encountered an unexpected error while handling your request. ${newMessage}`;\n }\n return error;\n}\n\nexport function isGraphiteParserError(e: unknown): e is GraphiteParserError {\n return typeof e === 'object' && e !== null && 'message' in e && 'pos' in e;\n}\n","import { Lexer } from './lexer';\nimport { GraphiteParserError } from './types';\nimport { isGraphiteParserError } from './utils';\n\nexport class Parser {\n expression: string;\n lexer: Lexer;\n tokens: AstNode[];\n index: number;\n\n constructor(expression: string) {\n this.expression = expression;\n this.lexer = new Lexer(expression);\n this.tokens = this.lexer.tokenize();\n this.index = 0;\n }\n\n getAst() {\n return this.start();\n }\n\n start(): AstNode | null {\n try {\n return this.functionCall() || this.metricExpression();\n } catch (e) {\n if (isGraphiteParserError(e)) {\n return {\n type: 'error',\n message: e.message,\n pos: e.pos,\n };\n }\n }\n return null;\n }\n\n curlyBraceSegment(): AstNode | null {\n if (this.match('identifier', '{') || this.match('{')) {\n let curlySegment = '';\n\n while (!this.match('') && !this.match('}')) {\n curlySegment += this.consumeToken().value;\n }\n\n if (!this.match('}')) {\n this.errorMark(\"Expected closing '}'\");\n }\n\n curlySegment += this.consumeToken().value;\n\n // if curly segment is directly followed by identifier\n // include it in the segment\n if (this.match('identifier')) {\n curlySegment += this.consumeToken().value;\n }\n\n return {\n type: 'segment',\n value: curlySegment,\n };\n } else {\n return null;\n }\n }\n\n metricSegment(): AstNode | null {\n const curly = this.curlyBraceSegment();\n if (curly) {\n return curly;\n }\n\n if (this.match('identifier') || this.match('number') || this.match('bool')) {\n // hack to handle float numbers in metric segments\n const tokenValue = this.consumeToken().value;\n const parts = tokenValue && typeof tokenValue === 'string' ? tokenValue.split('.') : '';\n if (parts.length === 2) {\n this.tokens.splice(this.index, 0, { type: '.' });\n this.tokens.splice(this.index + 1, 0, {\n type: 'number',\n value: parts[1],\n });\n }\n\n return {\n type: 'segment',\n value: parts[0],\n };\n }\n\n if (!this.match('templateStart')) {\n this.errorMark('Expected metric identifier');\n }\n\n this.consumeToken();\n\n if (!this.match('identifier')) {\n this.errorMark('Expected identifier after templateStart');\n }\n\n const node = {\n type: 'template',\n value: this.consumeToken().value,\n };\n\n if (!this.match('templateEnd')) {\n this.errorMark('Expected templateEnd');\n }\n\n this.consumeToken();\n return node;\n }\n\n metricExpression(): AstNode | null {\n if (!this.match('templateStart') && !this.match('identifier') && !this.match('number') && !this.match('{')) {\n return null;\n }\n\n const node: AstNode = {\n type: 'metric',\n segments: [],\n };\n\n const segments = this.metricSegment();\n\n if (node.segments && segments) {\n node.segments.push(segments);\n }\n\n while (this.match('.')) {\n this.consumeToken();\n\n const segment = this.metricSegment();\n if (!segment) {\n this.errorMark('Expected metric identifier');\n }\n if (node.segments && segment) {\n node.segments.push(segment);\n }\n }\n\n return node;\n }\n\n functionCall(): AstNode | null {\n if (!this.match('identifier', '(')) {\n return null;\n }\n\n let name = '';\n const token = this.consumeToken();\n if (typeof token.value === 'string') {\n name = token.value;\n }\n\n const node: AstNode = {\n type: 'function',\n name: name,\n };\n\n // consume left parenthesis\n this.consumeToken();\n\n node.params = this.functionParameters();\n\n if (!this.match(')')) {\n this.errorMark('Expected closing parenthesis');\n }\n\n this.consumeToken();\n\n return node;\n }\n\n boolExpression(): AstNode | null {\n if (!this.match('bool')) {\n return null;\n }\n\n return {\n type: 'bool',\n value: this.consumeToken().value === 'true',\n };\n }\n\n functionParameters(): AstNode[] | [] {\n if (this.match(')') || this.match('')) {\n return [];\n }\n\n const param =\n this.functionCall() ||\n this.numericLiteral() ||\n this.seriesRefExpression() ||\n this.boolExpression() ||\n this.metricExpression() ||\n this.stringLiteral();\n\n if (!this.match(',') && param) {\n return [param];\n }\n\n this.consumeToken();\n\n if (param) {\n return [param].concat(this.functionParameters());\n }\n return [];\n }\n\n seriesRefExpression(): AstNode | null {\n if (!this.match('identifier')) {\n return null;\n }\n\n const value = this.tokens[this.index].value;\n if (value && typeof value === 'string' && !value.match(/\\#[A-Z]/)) {\n return null;\n }\n\n const token = this.consumeToken();\n\n return {\n type: 'series-ref',\n value: token.value,\n };\n }\n\n numericLiteral(): AstNode | null {\n if (!this.match('number')) {\n return null;\n }\n\n const token = this.consumeToken();\n if (token && token.value && typeof token.value === 'string') {\n return {\n type: 'number',\n value: parseFloat(token.value),\n };\n }\n return null;\n }\n\n stringLiteral(): AstNode | null {\n if (!this.match('string')) {\n return null;\n }\n\n const token = this.consumeToken();\n if (token.isUnclosed && token.pos) {\n const error: GraphiteParserError = {\n message: 'Unclosed string parameter',\n pos: token.pos,\n };\n throw error;\n }\n\n return {\n type: 'string',\n value: token.value,\n };\n }\n\n errorMark(text: string) {\n const currentToken = this.tokens[this.index];\n const type = currentToken ? currentToken.type : 'end of string';\n const error: GraphiteParserError = {\n message: text + ' instead found ' + type,\n pos: currentToken && currentToken.pos ? currentToken.pos : this.lexer.char,\n };\n throw error;\n }\n\n // returns token value and incre\n consumeToken() {\n this.index++;\n return this.tokens[this.index - 1];\n }\n\n matchToken(type: string, index: number) {\n const token = this.tokens[this.index + index];\n return (token === undefined && type === '') || (token && token.type === type);\n }\n\n match(token1: string, token2?: string) {\n return this.matchToken(token1, 0) && (!token2 || this.matchToken(token2, 1));\n }\n}\n\n// Next steps, need to make this applicable to types in graphite_query.ts\nexport type AstNode = {\n type: string;\n name?: string;\n params?: AstNode[];\n value?: string | number | boolean;\n segments?: AstNode[];\n message?: string;\n pos?: number;\n isUnclosed?: boolean;\n};\n","import { compact, each, findIndex, flatten, get, join, keyBy, last, map, reduce, without } from 'lodash';\n\nimport { ScopedVars } from '@grafana/data';\nimport { TemplateSrv } from '@grafana/runtime';\nimport { arrayMove } from 'app/core/utils/arrayMove';\n\nimport { GraphiteDatasource } from './datasource';\nimport { FuncInstance } from './gfunc';\nimport { AstNode, Parser } from './parser';\nimport { GraphiteSegment } from './types';\n\nexport type GraphiteTagOperator = '=' | '=~' | '!=' | '!=~';\n\nexport type GraphiteTag = {\n key: string;\n operator: GraphiteTagOperator;\n value: string;\n};\n\nexport type GraphiteTarget = {\n refId: string | number;\n target: string;\n /**\n * Contains full query after interpolating sub-queries (e.g. \"function(#A)\" referencing query with refId=A)\n */\n targetFull: string;\n textEditor: boolean;\n paused: boolean;\n};\n\nexport default class GraphiteQuery {\n datasource: GraphiteDatasource;\n target: GraphiteTarget;\n functions: FuncInstance[] = [];\n segments: GraphiteSegment[] = [];\n tags: GraphiteTag[] = [];\n error: any;\n seriesByTagUsed = false;\n checkOtherSegmentsIndex = 0;\n removeTagValue: string;\n templateSrv: any;\n scopedVars: any;\n\n constructor(datasource: any, target: any, templateSrv?: TemplateSrv, scopedVars?: ScopedVars) {\n this.datasource = datasource;\n this.target = target;\n this.templateSrv = templateSrv;\n this.scopedVars = scopedVars;\n this.parseTarget();\n\n this.removeTagValue = '-- remove tag --';\n }\n\n parseTarget() {\n this.functions = [];\n this.segments = [];\n this.tags = [];\n this.seriesByTagUsed = false;\n this.error = null;\n\n if (this.target.textEditor) {\n return;\n }\n\n const parser = new Parser(this.target.target);\n const astNode = parser.getAst();\n if (astNode === null) {\n this.checkOtherSegmentsIndex = 0;\n return;\n }\n\n if (astNode.type === 'error') {\n this.error = astNode.message + ' at position: ' + astNode.pos;\n this.target.textEditor = true;\n return;\n }\n\n try {\n this.parseTargetRecursive(astNode, null);\n } catch (err) {\n if (err instanceof Error) {\n console.error('error parsing target:', err.message);\n this.error = err.message;\n }\n this.target.textEditor = true;\n }\n\n this.checkOtherSegmentsIndex = this.segments.length - 1;\n }\n\n getSegmentPathUpTo(index: number) {\n const arr = this.segments.slice(0, index);\n\n return reduce(\n arr,\n (result, segment) => {\n return result ? result + '.' + segment.value : segment.value;\n },\n ''\n );\n }\n\n parseTargetRecursive(astNode: any, func: any): any {\n if (astNode === null) {\n return null;\n }\n\n switch (astNode.type) {\n case 'function':\n const innerFunc = this.datasource.createFuncInstance(astNode.name, {\n withDefaultParams: false,\n });\n\n // bug fix for parsing multiple functions as params\n handleMultipleSeriesByTagsParams(astNode);\n\n each(astNode.params, (param) => {\n this.parseTargetRecursive(param, innerFunc);\n });\n\n innerFunc.updateText();\n this.functions.push(innerFunc);\n\n // extract tags from seriesByTag function and hide function\n if (innerFunc.def.name === 'seriesByTag' && !this.seriesByTagUsed) {\n this.seriesByTagUsed = true;\n innerFunc.hidden = true;\n this.tags = this.splitSeriesByTagParams(innerFunc);\n }\n\n break;\n case 'series-ref':\n if (this.segments.length > 0 || this.getSeriesByTagFuncIndex() >= 0) {\n this.addFunctionParameter(func, astNode.value);\n } else {\n this.segments.push(astNode);\n }\n break;\n case 'bool':\n case 'string':\n case 'number':\n this.addFunctionParameter(func, astNode.value);\n break;\n case 'metric':\n if (this.segments.length || this.tags.length) {\n this.addFunctionParameter(func, join(map(astNode.segments, 'value'), '.'));\n } else {\n this.segments = astNode.segments;\n }\n break;\n }\n }\n\n updateSegmentValue(segment: any, index: number) {\n this.segments[index].value = segment.value;\n }\n\n addSelectMetricSegment() {\n this.segments.push({ value: 'select metric' });\n }\n\n addFunction(newFunc: FuncInstance) {\n this.functions.push(newFunc);\n }\n\n addFunctionParameter(func: FuncInstance, value: string) {\n if (func.params.length >= func.def.params.length && !get(last(func.def.params), 'multiple', false)) {\n throw { message: 'too many parameters for function ' + func.def.name };\n }\n func.params.push(value);\n }\n\n removeFunction(func: any) {\n this.functions = without(this.functions, func);\n }\n\n moveFunction(func: FuncInstance, offset: number) {\n const index = this.functions.indexOf(func);\n arrayMove(this.functions, index, index + offset);\n }\n\n updateModelTarget(targets: any) {\n const wrapFunction = (target: string, func: FuncInstance) => {\n return func.render(target, (value: string) => {\n return this.templateSrv.replace(value, this.scopedVars);\n });\n };\n\n if (!this.target.textEditor) {\n const metricPath = this.getSegmentPathUpTo(this.segments.length).replace(/\\.?select metric$/, '');\n this.target.target = reduce(this.functions, wrapFunction, metricPath);\n }\n\n this.updateRenderedTarget(this.target, targets);\n\n // loop through other queries and update targetFull as needed\n for (const target of targets || []) {\n if (target.refId !== this.target.refId) {\n this.updateRenderedTarget(target, targets);\n }\n }\n\n // clean-up added param\n this.functions.forEach((func) => (func.added = false));\n }\n\n updateRenderedTarget(target: { refId: string | number; target: any; targetFull: any }, targets: any) {\n // render nested query\n const targetsByRefId = keyBy(targets, 'refId');\n\n // no references to self\n delete targetsByRefId[target.refId];\n\n const nestedSeriesRefRegex = /\\#([A-Z])/g;\n let targetWithNestedQueries = target.target;\n\n // Use ref count to track circular references\n each(targetsByRefId, (t, id) => {\n const regex = RegExp(`\\#(${id})`, 'g');\n const refMatches = targetWithNestedQueries.match(regex);\n t.refCount = refMatches?.length ?? 0;\n });\n\n // Keep interpolating until there are no query references\n // The reason for the loop is that the referenced query might contain another reference to another query\n while (targetWithNestedQueries.match(nestedSeriesRefRegex)) {\n const updated = targetWithNestedQueries.replace(nestedSeriesRefRegex, (match: string, g1: string) => {\n const t = targetsByRefId[g1];\n if (!t) {\n return match;\n }\n\n // no circular references\n if (t.refCount === 0) {\n delete targetsByRefId[g1];\n }\n t.refCount--;\n\n return t.target;\n });\n\n if (updated === targetWithNestedQueries) {\n break;\n }\n\n targetWithNestedQueries = updated;\n }\n\n delete target.targetFull;\n if (target.target !== targetWithNestedQueries) {\n target.targetFull = targetWithNestedQueries;\n }\n }\n\n splitSeriesByTagParams(func: { params: any }) {\n const tagPattern = /([^\\!=~]+)(\\!?=~?)(.*)/;\n return flatten(\n map(func.params, (param: string) => {\n const matches = tagPattern.exec(param);\n if (matches) {\n const tag = matches.slice(1);\n if (tag.length === 3) {\n return {\n key: tag[0],\n operator: tag[1] as GraphiteTagOperator,\n value: tag[2],\n };\n }\n }\n return [];\n })\n );\n }\n\n getSeriesByTagFuncIndex() {\n return findIndex(this.functions, (func) => func.def.name === 'seriesByTag');\n }\n\n getSeriesByTagFunc() {\n const seriesByTagFuncIndex = this.getSeriesByTagFuncIndex();\n if (seriesByTagFuncIndex >= 0) {\n return this.functions[seriesByTagFuncIndex];\n } else {\n return undefined;\n }\n }\n\n addTag(tag: { key: any; operator: GraphiteTagOperator; value: string }) {\n const newTagParam = renderTagString(tag);\n this.getSeriesByTagFunc()!.params.push(newTagParam);\n this.tags.push(tag);\n }\n\n removeTag(index: number) {\n this.getSeriesByTagFunc()!.params.splice(index, 1);\n this.tags.splice(index, 1);\n }\n\n updateTag(tag: { key: string; operator: GraphiteTagOperator; value: string }, tagIndex: number) {\n this.error = null;\n\n if (tag.key === this.removeTagValue) {\n this.removeTag(tagIndex);\n if (this.tags.length === 0) {\n this.removeFunction(this.getSeriesByTagFunc());\n this.checkOtherSegmentsIndex = 0;\n this.seriesByTagUsed = false;\n }\n return;\n }\n\n this.getSeriesByTagFunc()!.params[tagIndex] = renderTagString(tag);\n this.tags[tagIndex] = tag;\n }\n\n renderTagExpressions(excludeIndex = -1) {\n return compact(\n map(this.tags, (tagExpr, index) => {\n // Don't render tag that we want to lookup\n if (index !== excludeIndex) {\n return tagExpr.key + tagExpr.operator + tagExpr.value;\n } else {\n return undefined;\n }\n })\n );\n }\n}\n\nfunction renderTagString(tag: { key: any; operator?: any; value?: any }) {\n return tag.key + tag.operator + tag.value;\n}\n\n/**\n * mutates the second seriesByTag function into a string to fix a parsing bug\n * @param astNode\n * @param innerFunc\n */\nfunction handleMultipleSeriesByTagsParams(astNode: AstNode) {\n // if function has two params that are function seriesByTags keep the second as a string otherwise we have a parsing error\n if (astNode.params && astNode.params.length >= 2) {\n let count = 0;\n astNode.params = astNode.params.map((p: AstNode) => {\n if (p.type === 'function') {\n count += 1;\n }\n\n if (count === 2 && p.type === 'function' && p.name === 'seriesByTag') {\n // convert second function to a string\n const stringParams =\n p.params &&\n p.params.reduce((acc: string, p: AstNode, idx: number, paramsArr: AstNode[]) => {\n if (idx === 0 || idx !== paramsArr.length - 1) {\n return `${acc}'${p.value}',`;\n }\n\n return `${acc}'${p.value}'`;\n }, '');\n\n return {\n type: 'string',\n value: `${p.name}(${stringParams})`,\n };\n }\n\n return p;\n });\n }\n}\n","import { clone, some } from 'lodash';\n\nimport { createErrorNotification } from '../../../../core/copy/appNotification';\nimport { notifyApp } from '../../../../core/reducers/appNotification';\nimport { dispatch } from '../../../../store/store';\nimport { FuncInstance } from '../gfunc';\nimport { GraphiteQuery, GraphiteTagOperator } from '../types';\n\nimport { GraphiteQueryEditorState } from './store';\n\n/**\n * Helpers used by reducers and providers. They modify state object directly so should operate on a copy of the state.\n */\n\nexport const GRAPHITE_TAG_OPERATORS: GraphiteTagOperator[] = ['=', '!=', '=~', '!=~'];\n\n/**\n * Tag names and metric names are displayed in a single dropdown. This prefix is used to\n * distinguish both in the UI.\n */\nexport const TAG_PREFIX = 'tag: ';\n\n/**\n * Create new AST based on new query.\n * Build segments from parsed metric name and functions.\n */\nexport async function parseTarget(state: GraphiteQueryEditorState): Promise<void> {\n state.queryModel.parseTarget();\n await buildSegments(state);\n}\n\n/**\n * Create segments out of the current metric path + add \"select metrics\" if it's possible to add more to the path\n */\nexport async function buildSegments(state: GraphiteQueryEditorState, modifyLastSegment = true): Promise<void> {\n // Start with a shallow copy from the model, then check if \"select metric\" segment should be added at the end\n state.segments = clone(state.queryModel.segments);\n\n const checkOtherSegmentsIndex = state.queryModel.checkOtherSegmentsIndex || 0;\n\n await checkOtherSegments(state, checkOtherSegmentsIndex, modifyLastSegment);\n}\n\n/**\n * Add \"select metric\" segment at the end\n */\nexport function addSelectMetricSegment(state: GraphiteQueryEditorState): void {\n state.queryModel.addSelectMetricSegment();\n state.segments.push({ value: 'select metric', fake: true });\n}\n\n/**\n * Validates the state after adding or changing a segment:\n * - adds \"select metric\" only when more segments can be added to the metric name\n * - check if subsequent segments are still valid if in-between segment changes and\n * removes invalid segments.\n */\nexport async function checkOtherSegments(\n state: GraphiteQueryEditorState,\n fromIndex: number,\n modifyLastSegment = true\n): Promise<void> {\n if (state.queryModel.segments.length === 1 && state.queryModel.segments[0].type === 'series-ref') {\n return;\n }\n\n if (fromIndex === 0) {\n addSelectMetricSegment(state);\n return;\n }\n\n const currentFromIndex = fromIndex + 1;\n const path = state.queryModel.getSegmentPathUpTo(currentFromIndex);\n if (path === '') {\n return;\n }\n\n try {\n const segments = await state.datasource.metricFindQuery(path);\n if (segments.length === 0) {\n if (path !== '' && modifyLastSegment) {\n state.queryModel.segments = state.queryModel.segments.splice(0, currentFromIndex);\n state.segments = state.segments.splice(0, currentFromIndex);\n if (!some(state.segments, { fake: true })) {\n addSelectMetricSegment(state);\n }\n }\n } else if (segments[0].expandable) {\n if (state.segments.length === fromIndex) {\n addSelectMetricSegment(state);\n } else {\n await checkOtherSegments(state, currentFromIndex);\n }\n }\n } catch (err) {\n if (err instanceof Error) {\n handleMetricsAutoCompleteError(state, err);\n }\n }\n}\n\nexport function spliceSegments(state: GraphiteQueryEditorState, index: number): void {\n state.segments = state.segments.splice(0, index);\n state.queryModel.segments = state.queryModel.segments.splice(0, index);\n}\n\nexport function emptySegments(state: GraphiteQueryEditorState): void {\n state.queryModel.segments = [];\n state.segments = [];\n}\n\n/**\n * When seriesByTag function is added the UI changes it's state and only tags can be added from now.\n */\nexport async function addSeriesByTagFunc(state: GraphiteQueryEditorState, tag: string): Promise<void> {\n const newFunc = state.datasource.createFuncInstance('seriesByTag', {\n withDefaultParams: false,\n });\n const tagParam = `${tag}=`;\n newFunc.params = [tagParam];\n state.queryModel.addFunction(newFunc);\n newFunc.added = true;\n\n emptySegments(state);\n handleTargetChanged(state);\n await parseTarget(state);\n}\n\nexport function smartlyHandleNewAliasByNode(state: GraphiteQueryEditorState, func: FuncInstance): void {\n if (func.def.name !== 'aliasByNode') {\n return;\n }\n\n for (let i = 0; i < state.segments.length; i++) {\n if (state.segments[i].value.indexOf('*') >= 0) {\n func.params[0] = i;\n func.added = false;\n handleTargetChanged(state);\n return;\n }\n }\n}\n\n/**\n * Pauses running the query to allow selecting tag value. This is to prevent getting errors if the query is run\n * for a tag with no selected value.\n */\nexport function pause(state: GraphiteQueryEditorState): void {\n state.paused = true;\n}\n\nexport function removeTagPrefix(value: string): string {\n return value.replace(TAG_PREFIX, '');\n}\n\nexport function handleTargetChanged(state: GraphiteQueryEditorState): void {\n if (state.queryModel.error) {\n return;\n }\n\n let oldTarget = state.queryModel.target.target;\n // Interpolate from other queries:\n // Because of mixed data sources the list may contain queries for non-Graphite data sources. To ensure a valid query\n // is used for interpolation we should check required properties are passed though in theory it allows to interpolate\n // with queries that contain \"target\" property as well.\n state.queryModel.updateModelTarget(\n (state.queries || []).filter((query) => 'target' in query && typeof (query as GraphiteQuery).target === 'string')\n );\n\n // remove spaces from old and new targets\n const newTarget = state.queryModel.target.target.replace(/\\s+/g, '');\n oldTarget = oldTarget.replace(/\\s+/g, '');\n\n if (newTarget !== oldTarget && !state.paused) {\n state.refresh();\n }\n}\n\n/**\n * When metrics autocomplete fails - the error is shown, but only once per page view\n */\nexport function handleMetricsAutoCompleteError(\n state: GraphiteQueryEditorState,\n error: Error\n): GraphiteQueryEditorState {\n if (!state.metricAutoCompleteErrorShown) {\n state.metricAutoCompleteErrorShown = true;\n dispatch(notifyApp(createErrorNotification(`Fetching metrics failed: ${error.message}.`)));\n }\n return state;\n}\n\n/**\n * When tags autocomplete fails - the error is shown, but only once per page view\n */\nexport function handleTagsAutoCompleteError(state: GraphiteQueryEditorState, error: Error): GraphiteQueryEditorState {\n if (!state.tagsAutoCompleteErrorShown) {\n state.tagsAutoCompleteErrorShown = true;\n dispatch(notifyApp(createErrorNotification(`Fetching tags failed: ${error.message}.`)));\n }\n return state;\n}\n","import { AnyAction } from '@reduxjs/toolkit';\nimport { Action, Dispatch } from 'redux';\n\nimport { DataQuery, TimeRange } from '@grafana/data';\nimport { getTemplateSrv } from '@grafana/runtime';\n\nimport { TemplateSrv } from '../../../../features/templating/template_srv';\nimport { GraphiteDatasource } from '../datasource';\nimport { FuncDefs } from '../gfunc';\nimport GraphiteQuery, { GraphiteTarget } from '../graphite_query';\nimport { GraphiteSegment } from '../types';\n\nimport { actions } from './actions';\nimport {\n addSeriesByTagFunc,\n buildSegments,\n checkOtherSegments,\n emptySegments,\n handleTargetChanged,\n parseTarget,\n pause,\n removeTagPrefix,\n smartlyHandleNewAliasByNode,\n spliceSegments,\n} from './helpers';\n\nexport type GraphiteQueryEditorState = {\n // external dependencies\n datasource: GraphiteDatasource;\n target: GraphiteTarget;\n refresh: () => void;\n queries?: DataQuery[];\n templateSrv: TemplateSrv;\n range?: TimeRange;\n\n // internal\n supportsTags: boolean;\n paused: boolean;\n removeTagValue: string;\n funcDefs: FuncDefs | null;\n segments: GraphiteSegment[];\n queryModel: GraphiteQuery;\n error: Error | null;\n tagsAutoCompleteErrorShown: boolean;\n metricAutoCompleteErrorShown: boolean;\n};\n\nconst reducer = async (action: Action, state: GraphiteQueryEditorState): Promise<GraphiteQueryEditorState> => {\n state = { ...state };\n\n if (actions.init.match(action)) {\n const deps = action.payload;\n deps.target.target = deps.target.target || '';\n\n await deps.datasource.waitForFuncDefsLoaded();\n\n state = {\n ...state,\n ...deps,\n queryModel: new GraphiteQuery(deps.datasource, deps.target, getTemplateSrv()),\n supportsTags: deps.datasource.supportsTags,\n paused: false,\n removeTagValue: '-- remove tag --',\n funcDefs: deps.datasource.funcDefs,\n queries: deps.queries,\n };\n\n await buildSegments(state, false);\n }\n if (actions.timeRangeChanged.match(action)) {\n state.range = action.payload;\n }\n if (actions.queriesChanged.match(action)) {\n state.queries = action.payload;\n handleTargetChanged(state);\n }\n if (actions.queryChanged.match(action)) {\n state.target.target = action.payload.target || '';\n await parseTarget(state);\n handleTargetChanged(state);\n }\n if (actions.segmentValueChanged.match(action)) {\n const { segment: segmentOrString, index: segmentIndex } = action.payload;\n\n let segment;\n // is segment was changed to a string - create a new segment\n if (typeof segmentOrString === 'string') {\n segment = {\n value: segmentOrString,\n expandable: true,\n fake: false,\n };\n } else {\n segment = segmentOrString;\n }\n\n state.error = null;\n state.segments[segmentIndex] = segment;\n state.queryModel.updateSegmentValue(segment, segmentIndex);\n\n if (state.queryModel.functions.length > 0 && state.queryModel.functions[0].def.fake) {\n state.queryModel.functions = [];\n }\n\n if (segment.type === 'tag') {\n const tag = removeTagPrefix(segment.value);\n pause(state);\n await addSeriesByTagFunc(state, tag);\n return state;\n }\n\n // if newly selected segment can be expanded -> check if the path is correct\n if (segment.expandable) {\n await checkOtherSegments(state, segmentIndex + 1);\n } else {\n // if not expandable -> remove all other segments\n spliceSegments(state, segmentIndex + 1);\n }\n\n handleTargetChanged(state);\n }\n if (actions.tagChanged.match(action)) {\n const { tag, index: tagIndex } = action.payload;\n state.queryModel.updateTag(tag, tagIndex);\n handleTargetChanged(state);\n if (state.queryModel.tags.length === 0) {\n await checkOtherSegments(state, 0);\n state.paused = false;\n }\n }\n if (actions.addNewTag.match(action)) {\n const segment = action.payload.segment;\n const newTagKey = segment.value;\n const newTag = { key: newTagKey, operator: '=' as const, value: '' };\n state.queryModel.addTag(newTag);\n handleTargetChanged(state);\n }\n if (actions.unpause.match(action)) {\n state.paused = false;\n state.refresh();\n }\n if (actions.addFunction.match(action)) {\n const newFunc = state.datasource.createFuncInstance(action.payload.name, {\n withDefaultParams: true,\n });\n newFunc.added = true;\n state.queryModel.addFunction(newFunc);\n smartlyHandleNewAliasByNode(state, newFunc);\n\n if (state.segments.length === 1 && state.segments[0].fake) {\n emptySegments(state);\n }\n\n if (!newFunc.params.length && newFunc.added) {\n handleTargetChanged(state);\n }\n\n if (newFunc.def.name === 'seriesByTag') {\n await parseTarget(state);\n }\n }\n if (actions.removeFunction.match(action)) {\n state.queryModel.removeFunction(action.payload.func);\n handleTargetChanged(state);\n }\n if (actions.moveFunction.match(action)) {\n const { func, offset } = action.payload;\n state.queryModel.moveFunction(func, offset);\n handleTargetChanged(state);\n }\n if (actions.updateFunctionParam.match(action)) {\n const { func, index, value } = action.payload;\n func.updateParam(value, index);\n handleTargetChanged(state);\n }\n if (actions.updateQuery.match(action)) {\n state.target.target = action.payload.query;\n handleTargetChanged(state);\n }\n if (actions.runQuery.match(action)) {\n state.refresh();\n }\n if (actions.toggleEditorMode.match(action)) {\n state.target.textEditor = !state.target.textEditor;\n await parseTarget(state);\n }\n\n return { ...state };\n};\n\nexport const createStore = (onChange: (state: GraphiteQueryEditorState) => void): Dispatch<AnyAction> => {\n let state = {} as GraphiteQueryEditorState;\n\n const dispatch = async (action: AnyAction) => {\n state = await reducer(action, state);\n onChange(state);\n };\n\n return dispatch as Dispatch<AnyAction>;\n};\n","import { AnyAction } from '@reduxjs/toolkit';\nimport React, { createContext, Dispatch, PropsWithChildren, useContext, useEffect, useMemo, useState } from 'react';\nimport { usePrevious } from 'react-use';\n\nimport { QueryEditorProps } from '@grafana/data';\nimport { getTemplateSrv } from 'app/features/templating/template_srv';\n\nimport { GraphiteDatasource } from '../datasource';\nimport { GraphiteOptions, GraphiteQuery } from '../types';\n\nimport { actions } from './actions';\nimport { createStore, GraphiteQueryEditorState } from './store';\n\nconst DispatchContext = createContext<Dispatch<AnyAction>>({} as Dispatch<AnyAction>);\nconst GraphiteStateContext = createContext<GraphiteQueryEditorState>({} as GraphiteQueryEditorState);\n\nexport const useDispatch = () => {\n return useContext(DispatchContext);\n};\n\nexport const useGraphiteState = () => {\n return useContext(GraphiteStateContext);\n};\n\nexport type GraphiteQueryEditorProps = QueryEditorProps<GraphiteDatasource, GraphiteQuery, GraphiteOptions>;\n\nexport const GraphiteQueryEditorContext = ({\n datasource,\n onRunQuery,\n onChange,\n query,\n queries,\n range,\n children,\n}: PropsWithChildren<GraphiteQueryEditorProps>) => {\n const [state, setState] = useState<GraphiteQueryEditorState>();\n const [needsRefresh, setNeedsRefresh] = useState<boolean>(false);\n\n const dispatch = useMemo(() => {\n return createStore((state) => {\n setState(state);\n });\n }, []);\n\n // synchronise changes provided in props with editor's state\n const previousRange = usePrevious(range);\n useEffect(() => {\n if (JSON.stringify(previousRange?.raw) !== JSON.stringify(range?.raw)) {\n dispatch(actions.timeRangeChanged(range));\n }\n }, [dispatch, range, previousRange]);\n\n useEffect(\n () => {\n if (state) {\n dispatch(actions.queriesChanged(queries));\n }\n },\n // adding state to dependencies causes infinite loops\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [JSON.stringify(queries)]\n );\n\n useEffect(\n () => {\n if (state && state.target?.target !== query.target) {\n dispatch(actions.queryChanged(query));\n }\n },\n // adding state to dependencies causes infinite loops\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [dispatch, query]\n );\n\n useEffect(\n () => {\n if (needsRefresh && state) {\n setNeedsRefresh(false);\n onChange({ ...query, target: state.target.target, targetFull: state.target.targetFull });\n onRunQuery();\n }\n },\n // adding state to dependencies causes infinite loops\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [needsRefresh, JSON.stringify(query)]\n );\n\n if (!state) {\n dispatch(\n actions.init({\n target: query,\n datasource: datasource,\n range: range,\n templateSrv: getTemplateSrv(),\n // list of queries is passed only when the editor is in Dashboards or Alerting. This is to allow interpolation\n // of sub-queries which are stored in \"targetFull\" property. This is used by alerting in the backend.\n queries: queries || [],\n refresh: () => {\n // do not run onChange/onRunQuery straight away to ensure the internal state gets updated first\n // to avoid race conditions (onChange could update props before the reducer action finishes)\n setNeedsRefresh(true);\n },\n })\n );\n return null;\n } else {\n return (\n <GraphiteStateContext.Provider value={state}>\n <DispatchContext.Provider value={dispatch}>{children}</DispatchContext.Provider>\n </GraphiteStateContext.Provider>\n );\n }\n};\n","import { DataQuery, DataQueryRequest, DataSourceJsonData, TimeRange } from '@grafana/data';\n\nimport { TemplateSrv } from '../../../features/templating/template_srv';\n\nimport { GraphiteDatasource } from './datasource';\n\nexport enum GraphiteQueryType {\n Default = 'Default',\n Value = 'Value',\n MetricName = 'Metric Name',\n}\n\nexport interface GraphiteQuery extends DataQuery {\n queryType?: string;\n textEditor?: boolean;\n target?: string;\n targetFull?: string;\n tags?: string[];\n fromAnnotations?: boolean;\n}\n\nexport interface GraphiteOptions extends DataSourceJsonData {\n graphiteVersion: string;\n graphiteType: GraphiteType;\n rollupIndicatorEnabled?: boolean;\n importConfiguration: GraphiteQueryImportConfiguration;\n}\n\nexport enum GraphiteType {\n Default = 'default',\n Metrictank = 'metrictank',\n}\n\nexport interface MetricTankRequestMeta {\n [key: string]: any;\n}\n\nexport interface MetricTankSeriesMeta {\n 'schema-name': string;\n 'schema-retentions': string; //\"1s:35d:20min:5:1542274085,1min:38d:2h:1:true,10min:120d:6h:1:true,2h:2y:6h:2\",\n 'archive-read': number;\n 'archive-interval': number;\n 'aggnum-norm': number;\n 'consolidator-normfetch': string; //\"MaximumConsolidator\",\n 'aggnum-rc': number;\n 'consolidator-rc': string; //\"MaximumConsolidator\",\n count: number;\n}\n\nexport interface MetricTankMeta {\n request: MetricTankRequestMeta;\n info: MetricTankSeriesMeta[];\n}\n\nexport interface GraphiteParserError {\n message: string;\n pos: number;\n}\n\nexport type GraphiteQueryImportConfiguration = {\n loki: GraphiteToLokiQueryImportConfiguration;\n};\n\nexport type GraphiteToLokiQueryImportConfiguration = {\n mappings: GraphiteLokiMapping[];\n};\n\nexport type GraphiteLokiMapping = {\n matchers: GraphiteMetricLokiMatcher[];\n};\n\nexport type GraphiteMetricLokiMatcher = {\n value: string;\n labelName?: string;\n};\n\nexport type GraphiteSegment = {\n value: string;\n type?: 'tag' | 'metric' | 'series-ref' | 'template';\n expandable?: boolean;\n fake?: boolean;\n};\n\nexport type GraphiteTagOperator = '=' | '!=' | '=~' | '!=~';\n\nexport type GraphiteTag = {\n key: string;\n operator: GraphiteTagOperator;\n value: string;\n};\n\nexport type GraphiteQueryEditorDependencies = {\n target: any;\n datasource: GraphiteDatasource;\n range?: TimeRange;\n templateSrv: TemplateSrv;\n queries: DataQuery[];\n // schedule onChange/onRunQuery after the reducer actions finishes\n refresh: () => void;\n};\n\nexport interface GraphiteQueryRequest extends DataQueryRequest {\n format: string;\n}\n","import { forEach, sortBy } from 'lodash';\n\nimport { SelectableValue } from '@grafana/data';\n\nimport { FuncDefs, FuncInstance, ParamDef } from '../gfunc';\nimport { GraphiteQuery, GraphiteQueryType, GraphiteSegment } from '../types';\n\nimport { EditableParam } from './FunctionParamEditor';\n\nexport function mapStringsToSelectables<T extends string>(values: T[]): Array<SelectableValue<T>> {\n return values.map((value) => ({\n value,\n label: value,\n }));\n}\n\nexport function mapSegmentsToSelectables(segments: GraphiteSegment[]): Array<SelectableValue<GraphiteSegment>> {\n return segments.map((segment) => ({\n label: segment.value,\n value: segment,\n }));\n}\n\nexport function mapFuncDefsToSelectables(funcDefs: FuncDefs): Array<SelectableValue<string>> {\n const categories: any = {};\n\n forEach(funcDefs, (funcDef) => {\n if (!funcDef.category) {\n return;\n }\n if (!categories[funcDef.category]) {\n categories[funcDef.category] = { label: funcDef.category, value: funcDef.category, options: [] };\n }\n categories[funcDef.category].options.push({\n label: funcDef.name,\n value: funcDef.name,\n });\n });\n\n return sortBy(categories, 'label');\n}\n\nfunction createEditableParam(paramDef: ParamDef, additional: boolean, value?: string | number): EditableParam {\n return {\n name: paramDef.name,\n value: value?.toString() || '',\n optional: !!paramDef.optional || additional, // only first param is required when multiple are allowed\n multiple: !!paramDef.multiple,\n options:\n paramDef.options?.map((option: string | number) => ({\n value: option.toString(),\n label: option.toString(),\n })) ?? [],\n };\n}\n\n/**\n * Create a list of params that can be edited in the function editor.\n */\nexport function mapFuncInstanceToParams(func: FuncInstance): EditableParam[] {\n // list of required parameters (from func.def)\n const params: EditableParam[] = func.def.params.map((paramDef: ParamDef, index: number) =>\n createEditableParam(paramDef, false, func.params[index])\n );\n\n // list of additional (multiple or optional) params entered by the user\n while (params.length < func.params.length) {\n const paramDef = func.def.params[func.def.params.length - 1];\n const value = func.params[params.length];\n params.push(createEditableParam(paramDef, true, value));\n }\n\n // extra \"fake\" param to allow adding more multiple values at the end\n if (params.length && params[params.length - 1].value && params[params.length - 1]?.multiple) {\n const paramDef = func.def.params[func.def.params.length - 1];\n params.push(createEditableParam(paramDef, true, ''));\n }\n\n return params;\n}\n\nexport function convertToGraphiteQueryObject(query: string | GraphiteQuery): GraphiteQuery {\n if (typeof query === 'string') {\n return {\n refId: 'A',\n target: query,\n queryType: GraphiteQueryType.Default.toString(),\n };\n }\n return query;\n}\n","import { css, cx } from '@emotion/css';\nimport React, { useEffect, useMemo, useState } from 'react';\n\nimport { GrafanaTheme2, SelectableValue } from '@grafana/data';\nimport { Button, Segment, useStyles2 } from '@grafana/ui';\n\nimport { FuncDefs } from '../gfunc';\nimport { actions } from '../state/actions';\nimport { useDispatch } from '../state/context';\n\nimport { mapFuncDefsToSelectables } from './helpers';\n\ntype Props = {\n funcDefs: FuncDefs;\n};\n\nexport function AddGraphiteFunction({ funcDefs }: Props) {\n const dispatch = useDispatch();\n const [value, setValue] = useState<SelectableValue<string> | undefined>(undefined);\n const styles = useStyles2(getStyles);\n\n const options = useMemo(() => mapFuncDefsToSelectables(funcDefs), [funcDefs]);\n\n // Note: actions.addFunction will add a component that will have a dropdown or input in auto-focus\n // (the first param of the function). This auto-focus will cause onBlur() on AddGraphiteFunction's\n // Segment component and trigger onChange once again. (why? we call onChange if the user dismissed\n // the dropdown, see: SegmentSelect.onCloseMenu for more details). To avoid it we need to wait for\n // the Segment to disappear first (hence useEffect) and then dispatch the action that will add new\n // components.\n useEffect(() => {\n if (value?.value !== undefined) {\n dispatch(actions.addFunction({ name: value.value }));\n setValue(undefined);\n }\n }, [value, dispatch]);\n\n return (\n <Segment\n Component={<Button icon=\"plus\" variant=\"secondary\" className={cx(styles.button)} aria-label=\"Add new function\" />}\n options={options}\n onChange={setValue}\n inputMinWidth={150}\n />\n );\n}\n\nfunction getStyles(theme: GrafanaTheme2) {\n return {\n button: css`\n margin-right: ${theme.spacing(0.5)};\n `,\n };\n}\n","import React, { Suspense } from 'react';\n\nimport { Icon, Tooltip } from '@grafana/ui';\n\nimport { FuncInstance } from '../gfunc';\n\nexport interface FunctionEditorControlsProps {\n onMoveLeft: (func: FuncInstance) => void;\n onMoveRight: (func: FuncInstance) => void;\n onRemove: (func: FuncInstance) => void;\n}\n\nconst FunctionDescription = React.lazy(async () => {\n return {\n default(props: { description?: string }) {\n return <div>{props.description}</div>;\n },\n };\n});\n\nconst FunctionHelpButton = (props: { description?: string; name: string }) => {\n if (props.description) {\n let tooltip = (\n <Suspense fallback={<span>Loading description...</span>}>\n <FunctionDescription description={props.description} />\n </Suspense>\n );\n return (\n <Tooltip content={tooltip} placement={'bottom-end'}>\n <Icon className={props.description ? undefined : 'pointer'} name=\"question-circle\" />\n </Tooltip>\n );\n }\n\n return (\n <Icon\n className=\"pointer\"\n name=\"question-circle\"\n onClick={() => {\n window.open(\n 'http://graphite.readthedocs.org/en/latest/functions.html#graphite.render.functions.' + props.name,\n '_blank'\n );\n }}\n />\n );\n};\n\nexport const FunctionEditorControls = (\n props: FunctionEditorControlsProps & {\n func: FuncInstance;\n }\n) => {\n const { func, onMoveLeft, onMoveRight, onRemove } = props;\n return (\n <div\n style={{\n display: 'flex',\n width: '60px',\n justifyContent: 'space-between',\n }}\n >\n <Icon name=\"arrow-left\" onClick={() => onMoveLeft(func)} />\n <FunctionHelpButton name={func.def.name} description={func.def.description} />\n <Icon name=\"times\" onClick={() => onRemove(func)} />\n <Icon name=\"arrow-right\" onClick={() => onMoveRight(func)} />\n </div>\n );\n};\n","import { css } from '@emotion/css';\nimport React from 'react';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { Icon, Tooltip, useStyles2, type PopoverContent } from '@grafana/ui';\n\nimport { FuncInstance } from '../gfunc';\n\nimport { FunctionEditorControls, FunctionEditorControlsProps } from './FunctionEditorControls';\n\ninterface FunctionEditorProps extends FunctionEditorControlsProps {\n func: FuncInstance;\n}\n\nconst getStyles = (theme: GrafanaTheme2) => {\n return {\n icon: css({\n marginRight: theme.spacing(0.5),\n }),\n label: css({\n fontWeight: theme.typography.fontWeightMedium,\n fontSize: theme.typography.bodySmall.fontSize,\n cursor: 'pointer',\n display: 'inline-block',\n }),\n };\n};\n\nconst FunctionEditor = ({ onMoveLeft, onMoveRight, func, ...props }: FunctionEditorProps) => {\n const styles = useStyles2(getStyles);\n\n const renderContent: PopoverContent = ({ updatePopperPosition }) => (\n <FunctionEditorControls\n {...props}\n func={func}\n onMoveLeft={() => {\n onMoveLeft(func);\n updatePopperPosition?.();\n }}\n onMoveRight={() => {\n onMoveRight(func);\n updatePopperPosition?.();\n }}\n />\n );\n\n return (\n <>\n {func.def.unknown && (\n <Tooltip content={<TooltipContent />} placement=\"bottom\" interactive>\n <Icon data-testid=\"warning-icon\" name=\"exclamation-triangle\" size=\"xs\" className={styles.icon} />\n </Tooltip>\n )}\n <Tooltip content={renderContent} placement=\"top\" interactive>\n <span className={styles.label}>{func.def.name}</span>\n </Tooltip>\n </>\n );\n};\n\nconst TooltipContent = React.memo(() => {\n return (\n <span>\n This function is not supported. Check your function for typos and{' '}\n <a\n target=\"_blank\"\n className=\"external-link\"\n rel=\"noreferrer noopener\"\n href=\"https://graphite.readthedocs.io/en/latest/functions.html\"\n >\n read the docs\n </a>{' '}\n to see whether you need to upgrade your data source’s version to make this function available.\n </span>\n );\n});\nTooltipContent.displayName = 'FunctionEditorTooltipContent';\n\nexport { FunctionEditor };\n","import { css } from '@emotion/css';\nimport React from 'react';\n\nimport { GrafanaTheme2, SelectableValue } from '@grafana/data';\nimport { Segment, SegmentInput, useStyles2 } from '@grafana/ui';\n\nexport type EditableParam = {\n name: string;\n value: string;\n optional: boolean;\n multiple: boolean;\n options: Array<SelectableValue<string>>;\n};\n\ntype FieldEditorProps = {\n editableParam: EditableParam;\n onChange: (value: string) => void;\n onExpandedChange: (expanded: boolean) => void;\n autofocus: boolean;\n};\n\n/**\n * Render a function parameter with a segment dropdown for multiple options or simple input.\n */\nexport function FunctionParamEditor({ editableParam, onChange, onExpandedChange, autofocus }: FieldEditorProps) {\n const styles = useStyles2(getStyles);\n\n if (editableParam.options?.length > 0) {\n return (\n <Segment\n autofocus={autofocus}\n value={editableParam.value}\n inputPlaceholder={editableParam.name}\n className={styles.segment}\n options={editableParam.options}\n placeholder={' +' + editableParam.name}\n onChange={(value) => {\n onChange(value.value || '');\n }}\n onExpandedChange={onExpandedChange}\n inputMinWidth={150}\n allowCustomValue={true}\n allowEmptyValue={true}\n ></Segment>\n );\n } else {\n return (\n <SegmentInput\n autofocus={autofocus}\n className={styles.input}\n value={editableParam.value || ''}\n placeholder={' +' + editableParam.name}\n inputPlaceholder={editableParam.name}\n onChange={(value) => {\n onChange(value.toString());\n }}\n onExpandedChange={onExpandedChange}\n // input style\n style={{ height: '25px', paddingTop: '2px', marginTop: '2px', paddingLeft: '4px', minWidth: '100px' }}\n ></SegmentInput>\n );\n }\n}\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n segment: css({\n margin: 0,\n padding: 0,\n }),\n input: css`\n margin: 0;\n padding: 0;\n input {\n height: 25px;\n },\n `,\n});\n","import { css, cx } from '@emotion/css';\nimport React, { useState } from 'react';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { HorizontalGroup, InlineLabel, useStyles2 } from '@grafana/ui';\n\nimport { FuncInstance } from '../gfunc';\nimport { actions } from '../state/actions';\nimport { useDispatch } from '../state/context';\n\nimport { FunctionEditor } from './FunctionEditor';\nimport { EditableParam, FunctionParamEditor } from './FunctionParamEditor';\nimport { mapFuncInstanceToParams } from './helpers';\n\nexport type FunctionEditorProps = {\n func: FuncInstance;\n};\n\n/**\n * Allows editing function params and removing/moving a function (note: editing function name is not supported)\n */\nexport function GraphiteFunctionEditor({ func }: FunctionEditorProps) {\n const dispatch = useDispatch();\n const styles = useStyles2(getStyles);\n\n // keep track of mouse over and isExpanded state to display buttons for adding optional/multiple params\n // only when the user mouse over over the function editor OR any param editor is expanded.\n const [mouseOver, setIsMouseOver] = useState(false);\n const [expanded, setIsExpanded] = useState(false);\n\n let params = mapFuncInstanceToParams(func);\n params = params.filter((p: EditableParam, index: number) => {\n // func.added is set for newly added functions - see autofocus below\n return (index < func.def.params.length && !p.optional) || func.added || p.value || expanded || mouseOver;\n });\n\n return (\n <div\n className={cx(styles.container, { [styles.error]: func.def.unknown })}\n onBlur={() => setIsMouseOver(false)}\n onFocus={() => setIsMouseOver(true)}\n onMouseOver={() => setIsMouseOver(true)}\n onMouseOut={() => setIsMouseOver(false)}\n >\n <HorizontalGroup spacing=\"none\">\n <FunctionEditor\n func={func}\n onMoveLeft={() => {\n dispatch(actions.moveFunction({ func, offset: -1 }));\n }}\n onMoveRight={() => {\n dispatch(actions.moveFunction({ func, offset: 1 }));\n }}\n onRemove={() => {\n dispatch(actions.removeFunction({ func }));\n }}\n />\n <InlineLabel className={styles.label}>(</InlineLabel>\n {params.map((editableParam: EditableParam, index: number) => {\n return (\n <React.Fragment key={index}>\n <FunctionParamEditor\n autofocus={index === 0 && func.added}\n editableParam={editableParam}\n onChange={(value) => {\n if (value !== '' || editableParam.optional) {\n dispatch(actions.updateFunctionParam({ func, index, value }));\n }\n setIsExpanded(false);\n setIsMouseOver(false);\n }}\n onExpandedChange={setIsExpanded}\n />\n {index !== params.length - 1 ? ',' : ''}\n </React.Fragment>\n );\n })}\n <InlineLabel className={styles.label}>)</InlineLabel>\n </HorizontalGroup>\n </div>\n );\n}\n\nconst getStyles = (theme: GrafanaTheme2) => ({\n container: css({\n backgroundColor: theme.colors.background.secondary,\n borderRadius: theme.shape.radius.default,\n marginRight: theme.spacing(0.5),\n padding: `0 ${theme.spacing(1)}`,\n height: `${theme.v1.spacing.formInputHeight}px`,\n }),\n error: css`\n border: 1px solid ${theme.colors.error.main};\n `,\n label: css({\n padding: 0,\n margin: 0,\n }),\n button: css({\n padding: theme.spacing(0.5),\n }),\n});\n","import React from 'react';\n\nimport { SegmentSection } from '@grafana/ui';\n\nimport { FuncDefs, FuncInstance } from '../gfunc';\n\nimport { AddGraphiteFunction } from './AddGraphiteFunction';\nimport { GraphiteFunctionEditor } from './GraphiteFunctionEditor';\n\ntype Props = {\n functions: FuncInstance[];\n funcDefs: FuncDefs;\n};\n\nexport function FunctionsSection({ functions = [], funcDefs }: Props) {\n return (\n <SegmentSection label=\"Functions\" fill={true}>\n {functions.map((func: FuncInstance, index: number) => {\n return !func.hidden && <GraphiteFunctionEditor key={index} func={func} />;\n })}\n <AddGraphiteFunction funcDefs={funcDefs} />\n </SegmentSection>\n );\n}\n","import React, { useCallback } from 'react';\n\nimport { QueryField } from '@grafana/ui';\n\nimport { actions } from '../state/actions';\nimport { useDispatch } from '../state/context';\n\ntype Props = {\n rawQuery: string;\n};\n\nexport function GraphiteTextEditor({ rawQuery }: Props) {\n const dispatch = useDispatch();\n\n const updateQuery = useCallback(\n (query: string) => {\n dispatch(actions.updateQuery({ query }));\n },\n [dispatch]\n );\n\n const runQuery = useCallback(() => {\n dispatch(actions.runQuery());\n }, [dispatch]);\n\n return (\n <QueryField\n query={rawQuery}\n onChange={updateQuery}\n onBlur={runQuery}\n onRunQuery={runQuery}\n placeholder={'Enter a Graphite query (run with Shift+Enter)'}\n portalOrigin=\"graphite\"\n />\n );\n}\n","import { eachRight, map, remove } from 'lodash';\n\nimport { SelectableValue } from '@grafana/data';\n\nimport { mapSegmentsToSelectables, mapStringsToSelectables } from '../components/helpers';\nimport { GraphiteSegment, GraphiteTag, GraphiteTagOperator } from '../types';\n\nimport {\n TAG_PREFIX,\n GRAPHITE_TAG_OPERATORS,\n handleMetricsAutoCompleteError,\n handleTagsAutoCompleteError,\n} from './helpers';\nimport { GraphiteQueryEditorState } from './store';\n\n/**\n * All auto-complete lists are updated while typing. To avoid performance issues we do not render more\n * than MAX_SUGGESTIONS limits in a single dropdown.\n *\n * MAX_SUGGESTIONS is per metrics and tags separately. On the very first dropdown where metrics and tags are\n * combined together meaning it may end up with max of 2 * MAX_SUGGESTIONS items in total.\n */\nconst MAX_SUGGESTIONS = 5000;\n\n/**\n * Providers are hooks for views to provide temporal data for autocomplete. They don't modify the state.\n */\n\n/**\n * Return list of available options for a segment with given index\n *\n * It may be:\n * - mixed list of metrics and tags (only when nothing was selected)\n * - list of metric names (if a metric name was selected for this segment)\n */\nasync function getAltSegments(\n state: GraphiteQueryEditorState,\n index: number,\n prefix: string\n): Promise<GraphiteSegment[]> {\n let query = prefix.length > 0 ? '*' + prefix + '*' : '*';\n if (index > 0) {\n query = state.queryModel.getSegmentPathUpTo(index) + '.' + query;\n }\n const options = {\n range: state.range,\n requestId: 'get-alt-segments',\n };\n\n try {\n const segments = await state.datasource.metricFindQuery(query, options);\n const altSegments: GraphiteSegment[] = map(segments, (segment) => {\n return {\n value: segment.text,\n expandable: segment.expandable,\n };\n });\n\n if (index > 0 && altSegments.length === 0) {\n return altSegments;\n }\n\n // add query references\n if (index === 0) {\n eachRight(state.queries, (target) => {\n if (target.refId === state.queryModel.target.refId) {\n return;\n }\n\n altSegments.unshift({\n type: 'series-ref',\n value: '#' + target.refId,\n expandable: false,\n });\n });\n }\n\n // add template variables\n eachRight(state.templateSrv.getVariables(), (variable) => {\n altSegments.unshift({\n type: 'template',\n value: '$' + variable.name,\n expandable: true,\n });\n });\n\n // add wildcard option and limit number of suggestions (API doesn't support limiting\n // hence we are doing it here)\n altSegments.unshift({ value: '*', expandable: true });\n altSegments.splice(MAX_SUGGESTIONS);\n\n if (state.supportsTags && index === 0) {\n removeTaggedEntry(altSegments);\n return await addAltTagSegments(state, prefix, altSegments);\n } else {\n return altSegments;\n }\n } catch (err) {\n if (err instanceof Error) {\n handleMetricsAutoCompleteError(state, err);\n }\n }\n\n return [];\n}\n\n/**\n * Get the list of segments with tags and metrics. Suggestions are reduced in getAltSegments and addAltTagSegments so in case\n * we hit MAX_SUGGESTIONS limit there are always some tags and metrics shown.\n */\nexport async function getAltSegmentsSelectables(\n state: GraphiteQueryEditorState,\n index: number,\n prefix: string\n): Promise<Array<SelectableValue<GraphiteSegment>>> {\n return mapSegmentsToSelectables(await getAltSegments(state, index, prefix));\n}\n\nexport function getTagOperatorsSelectables(): Array<SelectableValue<GraphiteTagOperator>> {\n return mapStringsToSelectables(GRAPHITE_TAG_OPERATORS);\n}\n\n/**\n * Returns tags as dropdown options\n */\nasync function getTags(state: GraphiteQueryEditorState, index: number, tagPrefix: string): Promise<string[]> {\n try {\n const tagExpressions = state.queryModel.renderTagExpressions(index);\n const values = await state.datasource.getTagsAutoComplete(tagExpressions, tagPrefix, {\n range: state.range,\n limit: MAX_SUGGESTIONS,\n });\n\n const altTags = map(values, 'text');\n altTags.splice(0, 0, state.removeTagValue);\n return altTags;\n } catch (err) {\n if (err instanceof Error) {\n handleTagsAutoCompleteError(state, err);\n }\n }\n\n return [];\n}\n\nexport async function getTagsSelectables(\n state: GraphiteQueryEditorState,\n index: number,\n tagPrefix: string\n): Promise<Array<SelectableValue<string>>> {\n return mapStringsToSelectables(await getTags(state, index, tagPrefix));\n}\n\n/**\n * List of tags when a tag is added. getTags is used for editing.\n * When adding - segment is used. When editing - dropdown is used.\n */\nasync function getTagsAsSegments(state: GraphiteQueryEditorState, tagPrefix: string): Promise<GraphiteSegment[]> {\n let tagsAsSegments: GraphiteSegment[];\n try {\n const tagExpressions = state.queryModel.renderTagExpressions();\n const values = await state.datasource.getTagsAutoComplete(tagExpressions, tagPrefix, {\n range: state.range,\n limit: MAX_SUGGESTIONS,\n });\n tagsAsSegments = map(values, (val) => {\n return {\n value: val.text,\n type: 'tag',\n expandable: false,\n };\n });\n } catch (err) {\n tagsAsSegments = [];\n if (err instanceof Error) {\n handleTagsAutoCompleteError(state, err);\n }\n }\n\n return tagsAsSegments;\n}\n\n/**\n * Get list of tags, used when adding additional tags (first tag is selected from a joined list of metrics and tags)\n */\nexport async function getTagsAsSegmentsSelectables(\n state: GraphiteQueryEditorState,\n tagPrefix: string\n): Promise<Array<SelectableValue<GraphiteSegment>>> {\n return mapSegmentsToSelectables(await getTagsAsSegments(state, tagPrefix));\n}\n\nasync function getTagValues(\n state: GraphiteQueryEditorState,\n tag: GraphiteTag,\n index: number,\n valuePrefix: string\n): Promise<string[]> {\n const tagExpressions = state.queryModel.renderTagExpressions(index);\n const tagKey = tag.key;\n const values = await state.datasource.getTagValuesAutoComplete(tagExpressions, tagKey, valuePrefix, {\n limit: MAX_SUGGESTIONS,\n });\n const altValues = map(values, 'text');\n // Add template variables as additional values\n eachRight(state.templateSrv.getVariables(), (variable) => {\n altValues.push('${' + variable.name + ':regex}');\n });\n\n return altValues;\n}\n\nexport async function getTagValuesSelectables(\n state: GraphiteQueryEditorState,\n tag: GraphiteTag,\n index: number,\n valuePrefix: string\n): Promise<Array<SelectableValue<string>>> {\n return mapStringsToSelectables(await getTagValues(state, tag, index, valuePrefix));\n}\n\n/**\n * Add segments with tags prefixed with \"tag: \" to include them in the same list as metrics\n */\nasync function addAltTagSegments(\n state: GraphiteQueryEditorState,\n prefix: string,\n altSegments: GraphiteSegment[]\n): Promise<GraphiteSegment[]> {\n let tagSegments = await getTagsAsSegments(state, prefix);\n\n tagSegments = map(tagSegments, (segment) => {\n segment.value = TAG_PREFIX + segment.value;\n return segment;\n });\n\n return altSegments.concat(...tagSegments);\n}\n\nfunction removeTaggedEntry(altSegments: GraphiteSegment[]) {\n remove(altSegments, (s) => s.value === '_tagged');\n}\n","import { debounce } from 'lodash';\nimport React, { useCallback, useMemo } from 'react';\n\nimport { SelectableValue } from '@grafana/data';\nimport { SegmentAsync } from '@grafana/ui';\n\nimport { actions } from '../state/actions';\nimport { useDispatch } from '../state/context';\nimport { getAltSegmentsSelectables } from '../state/providers';\nimport { GraphiteQueryEditorState } from '../state/store';\nimport { GraphiteSegment } from '../types';\n\ntype Props = {\n segment: GraphiteSegment;\n metricIndex: number;\n state: GraphiteQueryEditorState;\n};\n\n/**\n * Represents a single metric node in the metric path at the given index. Allows to change the metric name to one of the\n * provided options or a custom value.\n *\n * Options for tag names and metric names are reloaded while user is typing with backend taking care of auto-complete\n * (auto-complete cannot be implemented in front-end because backend returns only limited number of entries)\n *\n * getAltSegmentsSelectables() also returns list of tags for segment with index=0. Once a tag is selected the editor\n * enters tag-adding mode (see SeriesSection and GraphiteQueryModel.seriesByTagUsed).\n */\nexport function MetricSegment({ metricIndex, segment, state }: Props) {\n const dispatch = useDispatch();\n const loadOptions = useCallback(\n (value: string | undefined) => {\n return getAltSegmentsSelectables(state, metricIndex, value || '');\n },\n [state, metricIndex]\n );\n const debouncedLoadOptions = useMemo(() => debounce(loadOptions, 200, { leading: true }), [loadOptions]);\n\n const onSegmentChanged = useCallback(\n (selectableValue: SelectableValue<GraphiteSegment | string>) => {\n // selectableValue.value is always defined because emptyValues are not allowed in SegmentAsync by default\n dispatch(actions.segmentValueChanged({ segment: selectableValue.value!, index: metricIndex }));\n },\n [dispatch, metricIndex]\n );\n\n // segmentValueChanged action will destroy SegmentAsync immediately if a tag is selected. To give time\n // for the clean up the action is debounced.\n const onSegmentChangedDebounced = useMemo(() => debounce(onSegmentChanged, 100), [onSegmentChanged]);\n\n return (\n <SegmentAsync<GraphiteSegment | string>\n value={segment.value}\n inputMinWidth={150}\n allowCustomValue={true}\n loadOptions={debouncedLoadOptions}\n reloadOptionsOnChange={true}\n onChange={onSegmentChangedDebounced}\n />\n );\n}\n","import React from 'react';\n\nimport { GraphiteQueryEditorState } from '../state/store';\nimport { GraphiteSegment } from '../types';\n\nimport { MetricSegment } from './MetricSegment';\n\ntype Props = {\n segments: GraphiteSegment[];\n state: GraphiteQueryEditorState;\n};\n\nexport function MetricsSection({ segments = [], state }: Props) {\n return (\n <>\n {segments.map((segment, index) => {\n return <MetricSegment segment={segment} metricIndex={index} key={index} state={state} />;\n })}\n </>\n );\n}\n","import React, { useCallback } from 'react';\n\nimport { Button } from '@grafana/ui';\n\nimport { actions } from '../state/actions';\nimport { useDispatch } from '../state/context';\n\nexport function PlayButton() {\n const dispatch = useDispatch();\n const onClick = useCallback(() => {\n dispatch(actions.unpause());\n }, [dispatch]);\n return <Button icon=\"play\" onClick={onClick} type=\"button\" variant=\"secondary\" aria-label=\"Unpause query\" />;\n}\n","import { debounce } from 'lodash';\nimport React, { useCallback, useMemo } from 'react';\n\nimport { Segment, SegmentAsync } from '@grafana/ui';\n\nimport { actions } from '../state/actions';\nimport { useDispatch } from '../state/context';\nimport { getTagOperatorsSelectables, getTagsSelectables, getTagValuesSelectables } from '../state/providers';\nimport { GraphiteQueryEditorState } from '../state/store';\nimport { GraphiteTag, GraphiteTagOperator } from '../types';\n\ntype Props = {\n tag: GraphiteTag;\n tagIndex: number;\n state: GraphiteQueryEditorState;\n};\n\n/**\n * Editor for a tag at given index. Allows changing the name of the tag, operator or value. Tag names are provided with\n * getTagsSelectables and contain only valid tags (it may depend on currently used tags). The dropdown for tag names is\n * also used for removing tag (with a special \"--remove tag--\" option provided by getTagsSelectables).\n *\n * Options for tag names and values are reloaded while user is typing with backend taking care of auto-complete\n * (auto-complete cannot be implemented in front-end because backend returns only limited number of entries)\n */\nexport function TagEditor({ tag, tagIndex, state }: Props) {\n const dispatch = useDispatch();\n const getTagsOptions = useCallback(\n (inputValue: string | undefined) => {\n return getTagsSelectables(state, tagIndex, inputValue || '');\n },\n [state, tagIndex]\n );\n const debouncedGetTagsOptions = useMemo(() => debounce(getTagsOptions, 200, { leading: true }), [getTagsOptions]);\n\n const getTagValueOptions = useCallback(\n (inputValue: string | undefined) => {\n return getTagValuesSelectables(state, tag, tagIndex, inputValue || '');\n },\n [state, tagIndex, tag]\n );\n const debouncedGetTagValueOptions = useMemo(\n () => debounce(getTagValueOptions, 200, { leading: true }),\n [getTagValueOptions]\n );\n\n return (\n <>\n <SegmentAsync\n inputMinWidth={150}\n value={tag.key}\n loadOptions={debouncedGetTagsOptions}\n reloadOptionsOnChange={true}\n onChange={(value) => {\n dispatch(\n actions.tagChanged({\n tag: { ...tag, key: value.value! },\n index: tagIndex,\n })\n );\n }}\n allowCustomValue={true}\n />\n <Segment<GraphiteTagOperator>\n inputMinWidth={50}\n value={tag.operator}\n options={getTagOperatorsSelectables()}\n onChange={(value) => {\n dispatch(\n actions.tagChanged({\n tag: { ...tag, operator: value.value! },\n index: tagIndex,\n })\n );\n }}\n />\n <SegmentAsync\n inputMinWidth={150}\n value={tag.value}\n loadOptions={debouncedGetTagValueOptions}\n reloadOptionsOnChange={true}\n onChange={(value) => {\n dispatch(\n actions.tagChanged({\n tag: { ...tag, value: value.value! },\n index: tagIndex,\n })\n );\n }}\n allowCustomValue={true}\n />\n </>\n );\n}\n","import { css } from '@emotion/css';\nimport { debounce } from 'lodash';\nimport React, { useCallback, useMemo } from 'react';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { Button, SegmentAsync, useStyles2 } from '@grafana/ui';\n\nimport { GraphiteTag } from '../graphite_query';\nimport { actions } from '../state/actions';\nimport { useDispatch } from '../state/context';\nimport { getTagsAsSegmentsSelectables } from '../state/providers';\nimport { GraphiteQueryEditorState } from '../state/store';\nimport { GraphiteSegment } from '../types';\n\nimport { PlayButton } from './PlayButton';\nimport { TagEditor } from './TagEditor';\n\ntype Props = {\n tags: GraphiteTag[];\n state: GraphiteQueryEditorState;\n};\n\n/**\n * Renders all tags and a button allowing to add more tags.\n *\n * Options for tag names are reloaded while user is typing with backend taking care of auto-complete\n * (auto-complete cannot be implemented in front-end because backend returns only limited number of entries)\n */\nexport function TagsSection({ tags, state }: Props) {\n const dispatch = useDispatch();\n const styles = useStyles2(getStyles);\n\n // Options are reloaded while user is typing with backend taking care of auto-complete (auto-complete cannot be\n // implemented in front-end because backend returns only limited number of entries)\n const getTagsAsSegmentsOptions = useCallback(\n (inputValue?: string) => {\n return getTagsAsSegmentsSelectables(state, inputValue || '');\n },\n [state]\n );\n const debouncedGetTagsAsSegments = useMemo(\n () => debounce(getTagsAsSegmentsOptions, 200, { leading: true }),\n [getTagsAsSegmentsOptions]\n );\n\n return (\n <>\n {tags.map((tag, index) => {\n return <TagEditor key={index} tagIndex={index} tag={tag} state={state} />;\n })}\n {tags.length && (\n <SegmentAsync<GraphiteSegment>\n inputMinWidth={150}\n onChange={(value) => {\n dispatch(actions.addNewTag({ segment: value.value! }));\n }}\n loadOptions={debouncedGetTagsAsSegments}\n reloadOptionsOnChange={true}\n Component={<Button icon=\"plus\" variant=\"secondary\" className={styles.button} aria-label=\"Add new tag\" />}\n />\n )}\n {state.paused && <PlayButton />}\n </>\n );\n}\n\nfunction getStyles(theme: GrafanaTheme2) {\n return {\n button: css`\n margin-right: ${theme.spacing(0.5)};\n `,\n };\n}\n","import React from 'react';\n\nimport { SegmentSection } from '@grafana/ui';\n\nimport { GraphiteQueryEditorState } from '../state/store';\n\nimport { MetricsSection } from './MetricsSection';\nimport { TagsSection } from './TagsSection';\n\ntype Props = {\n state: GraphiteQueryEditorState;\n};\n\nexport function SeriesSection({ state }: Props) {\n const sectionContent = state.queryModel?.seriesByTagUsed ? (\n <TagsSection tags={state.queryModel?.tags} state={state} />\n ) : (\n <MetricsSection segments={state.segments} state={state} />\n );\n\n return (\n <SegmentSection label=\"Series\" fill={true}>\n {sectionContent}\n </SegmentSection>\n );\n}\n","import { css } from '@emotion/css';\nimport React from 'react';\n\nimport { GrafanaTheme2 } from '@grafana/data';\nimport { Button, useStyles2 } from '@grafana/ui';\n\nimport { actions } from '../state/actions';\nimport { GraphiteQueryEditorContext, GraphiteQueryEditorProps, useDispatch, useGraphiteState } from '../state/context';\n\nimport { FunctionsSection } from './FunctionsSection';\nimport { GraphiteTextEditor } from './GraphiteTextEditor';\nimport { SeriesSection } from './SeriesSection';\n\nexport function GraphiteQueryEditor({\n datasource,\n onRunQuery,\n onChange,\n query,\n range,\n queries,\n}: GraphiteQueryEditorProps) {\n return (\n <GraphiteQueryEditorContext\n datasource={datasource}\n onRunQuery={onRunQuery}\n onChange={onChange}\n query={query}\n queries={queries}\n range={range}\n >\n <GraphiteQueryEditorContent />\n </GraphiteQueryEditorContext>\n );\n}\n\nfunction GraphiteQueryEditorContent() {\n const dispatch = useDispatch();\n const state = useGraphiteState();\n const styles = useStyles2(getStyles);\n\n return (\n <div className={styles.container}>\n <div className={styles.visualEditor}>\n {state.target?.textEditor && <GraphiteTextEditor rawQuery={state.target.target} />}\n {!state.target?.textEditor && (\n <>\n <SeriesSection state={state} />\n <FunctionsSection functions={state.queryModel?.functions} funcDefs={state.funcDefs!} />\n </>\n )}\n </div>\n <Button\n className={styles.toggleButton}\n icon=\"pen\"\n variant=\"secondary\"\n aria-label=\"Toggle editor mode\"\n onClick={() => {\n dispatch(actions.toggleEditorMode());\n }}\n />\n </div>\n );\n}\n\nfunction getStyles(theme: GrafanaTheme2) {\n return {\n container: css`\n display: flex;\n `,\n visualEditor: css`\n flex-grow: 1;\n `,\n toggleButton: css`\n margin-left: ${theme.spacing(0.5)};\n `,\n };\n}\n","import React, { useState } from 'react';\n\nimport { InlineField, Input, Select } from '@grafana/ui';\n\nimport { GraphiteQuery, GraphiteQueryType } from '../types';\n\nimport { convertToGraphiteQueryObject } from './helpers';\n\ninterface Props {\n query: GraphiteQuery | string;\n onChange: (query: GraphiteQuery, definition: string) => void;\n}\n\nconst GRAPHITE_QUERY_VARIABLE_TYPE_OPTIONS = [\n { label: 'Default Query', value: GraphiteQueryType.Default },\n { label: 'Value Query', value: GraphiteQueryType.Value },\n { label: 'Metric Name Query', value: GraphiteQueryType.MetricName },\n];\n\nexport const GraphiteVariableEditor = (props: Props) => {\n const { query, onChange } = props;\n const [value, setValue] = useState(convertToGraphiteQueryObject(query));\n\n return (\n <>\n <InlineField label=\"Select query type\" labelWidth={20}>\n <Select\n aria-label=\"select query type\"\n options={GRAPHITE_QUERY_VARIABLE_TYPE_OPTIONS}\n width={25}\n value={value.queryType ?? GraphiteQueryType.Default}\n onChange={(selectableValue) => {\n setValue({\n ...value,\n queryType: selectableValue.value,\n });\n\n if (value.target) {\n onChange(\n {\n ...value,\n queryType: selectableValue.value,\n },\n value.target ?? ''\n );\n }\n }}\n />\n </InlineField>\n <InlineField label=\"Query\" labelWidth={20} grow>\n <Input\n aria-label=\"Variable editor query input\"\n value={value.target}\n onBlur={() => onChange(value, value.target ?? '')}\n onChange={(e) => {\n setValue({\n ...value,\n target: e.currentTarget.value,\n });\n }}\n />\n </InlineField>\n </>\n );\n};\n","import { QueryResultMetaNotice } from '@grafana/data';\n\nimport { MetricTankSeriesMeta } from './types';\n\n// https://github.com/grafana/metrictank/blob/master/scripts/config/storage-schemas.conf#L15-L46\n\nexport interface RetentionInfo {\n interval: string;\n retention?: string;\n chunkspan?: string;\n numchunks?: number;\n ready?: boolean | number; // whether, or as of what data timestamp, the archive is ready for querying.\n}\n\nfunction toInteger(val?: string): number | undefined {\n if (val) {\n return parseInt(val, 10);\n }\n return undefined;\n}\n\nfunction toBooleanOrTimestamp(val?: string): number | boolean | undefined {\n if (val) {\n if (val === 'true') {\n return true;\n }\n if (val === 'false') {\n return false;\n }\n return parseInt(val, 10);\n }\n return undefined;\n}\n\nexport function getRollupNotice(metaList: MetricTankSeriesMeta[]): QueryResultMetaNotice | null {\n for (const meta of metaList) {\n const archiveIndex = meta['archive-read'];\n\n if (archiveIndex > 0) {\n const schema = parseSchemaRetentions(meta['schema-retentions']);\n const intervalString = schema[archiveIndex].interval;\n const func = (meta['consolidator-normfetch'] ?? '').replace('Consolidator', '');\n\n return {\n text: `Data is rolled up, aggregated over ${intervalString} using ${func} function`,\n severity: 'info',\n inspect: 'meta',\n };\n }\n }\n\n return null;\n}\n\nexport function getRuntimeConsolidationNotice(metaList: MetricTankSeriesMeta[]): QueryResultMetaNotice | null {\n for (const meta of metaList) {\n const runtimeNr = meta['aggnum-rc'];\n\n if (runtimeNr > 0) {\n const func = (meta['consolidator-rc'] ?? '').replace('Consolidator', '');\n\n return {\n text: `Data is runtime consolidated, ${runtimeNr} datapoints combined using ${func} function`,\n severity: 'info',\n inspect: 'meta',\n };\n }\n }\n\n return null;\n}\n\nexport function parseSchemaRetentions(spec: string): RetentionInfo[] {\n if (!spec) {\n return [];\n }\n return spec.split(',').map((str) => {\n const vals = str.split(':');\n return {\n interval: vals[0],\n retention: vals[1],\n chunkspan: vals[2],\n numchunks: toInteger(vals[3]),\n ready: toBooleanOrTimestamp(vals[4]),\n };\n });\n}\n","import { css, cx } from '@emotion/css';\nimport React, { PureComponent } from 'react';\n\nimport { MetadataInspectorProps, rangeUtil } from '@grafana/data';\nimport { stylesFactory } from '@grafana/ui';\nimport { config } from 'app/core/config';\n\nimport { GraphiteDatasource } from '../datasource';\nimport { getRollupNotice, getRuntimeConsolidationNotice, parseSchemaRetentions } from '../meta';\nimport { GraphiteOptions, GraphiteQuery, MetricTankSeriesMeta } from '../types';\n\nexport type Props = MetadataInspectorProps<GraphiteDatasource, GraphiteQuery, GraphiteOptions>;\n\nexport interface State {\n index: number;\n}\n\nexport class MetricTankMetaInspector extends PureComponent<Props, State> {\n renderMeta(meta: MetricTankSeriesMeta, key: string) {\n const styles = getStyles();\n const buckets = parseSchemaRetentions(meta['schema-retentions']);\n const rollupNotice = getRollupNotice([meta]);\n const runtimeNotice = getRuntimeConsolidationNotice([meta]);\n const normFunc = (meta['consolidator-normfetch'] ?? '').replace('Consolidator', '');\n\n const totalSeconds = buckets.reduce(\n (acc, bucket) => acc + (bucket.retention ? rangeUtil.intervalToSeconds(bucket.retention) : 0),\n 0\n );\n\n return (\n <div className={styles.metaItem} key={key}>\n <div className={styles.metaItemHeader}>\n Schema: {meta['schema-name']}\n <div className=\"small muted\">Series count: {meta.count}</div>\n </div>\n <div className={styles.metaItemBody}>\n <div className={styles.step}>\n <div className={styles.stepHeading}>Step 1: Fetch</div>\n <div className={styles.stepDescription}>\n First data is fetched, either from raw data archive or a rollup archive\n </div>\n\n {rollupNotice && <p>{rollupNotice.text}</p>}\n {!rollupNotice && <p>No rollup archive was used</p>}\n\n <div>\n {buckets.map((bucket, index) => {\n const bucketLength = bucket.retention ? rangeUtil.intervalToSeconds(bucket.retention) : 0;\n const lengthPercent = (bucketLength / totalSeconds) * 100;\n const isActive = index === meta['archive-read'];\n\n return (\n <div key={bucket.retention} className={styles.bucket}>\n <div className={styles.bucketInterval}>{bucket.interval}</div>\n <div\n className={cx(styles.bucketRetention, { [styles.bucketRetentionActive]: isActive })}\n style={{ flexGrow: lengthPercent }}\n />\n <div style={{ flexGrow: 100 - lengthPercent }}>{bucket.retention}</div>\n </div>\n );\n })}\n </div>\n </div>\n\n <div className={styles.step}>\n <div className={styles.stepHeading}>Step 2: Normalization</div>\n <div className={styles.stepDescription}>\n Normalization happens when series with different intervals between points are combined.\n </div>\n\n {meta['aggnum-norm'] > 1 && <p>Normalization did occur using {normFunc}</p>}\n {meta['aggnum-norm'] === 1 && <p>No normalization was needed</p>}\n </div>\n\n <div className={styles.step}>\n <div className={styles.stepHeading}>Step 3: Runtime consolidation</div>\n <div className={styles.stepDescription}>\n If there are too many data points at this point Metrictank will consolidate them down to below max data\n points (set in queries tab).\n </div>\n\n {runtimeNotice && <p>{runtimeNotice.text}</p>}\n {!runtimeNotice && <p>No runtime consolidation</p>}\n </div>\n </div>\n </div>\n );\n }\n\n render() {\n const { data } = this.props;\n\n // away to dedupe them\n const seriesMetas: Record<string, MetricTankSeriesMeta> = {};\n\n for (const series of data) {\n if (series?.meta?.custom?.seriesMetaList) {\n for (const metaItem of series.meta.custom.seriesMetaList as MetricTankSeriesMeta[]) {\n // key is to dedupe as many series will have identitical meta\n const key = `${JSON.stringify(metaItem)}`;\n\n if (seriesMetas[key]) {\n seriesMetas[key].count += metaItem.count;\n } else {\n seriesMetas[key] = metaItem;\n }\n }\n }\n }\n\n if (Object.keys(seriesMetas).length === 0) {\n return <div>No response meta data</div>;\n }\n\n return (\n <div>\n <h2 className=\"page-heading\">Metrictank Lineage</h2>\n {Object.keys(seriesMetas).map((key) => this.renderMeta(seriesMetas[key], key))}\n </div>\n );\n }\n}\n\nconst getStyles = stylesFactory(() => {\n const { theme } = config;\n const borderColor = theme.isDark ? theme.palette.gray25 : theme.palette.gray85;\n const background = theme.isDark ? theme.palette.dark1 : theme.palette.white;\n const headerBg = theme.isDark ? theme.palette.gray15 : theme.palette.gray85;\n\n return {\n metaItem: css`\n background: ${background};\n border: 1px solid ${borderColor};\n margin-bottom: ${theme.spacing.md};\n `,\n metaItemHeader: css`\n background: ${headerBg};\n padding: ${theme.spacing.xs} ${theme.spacing.md};\n font-size: ${theme.typography.size.md};\n display: flex;\n justify-content: space-between;\n `,\n metaItemBody: css`\n padding: ${theme.spacing.md};\n `,\n stepHeading: css`\n font-size: ${theme.typography.size.md};\n `,\n stepDescription: css`\n font-size: ${theme.typography.size.sm};\n color: ${theme.colors.textWeak};\n margin-bottom: ${theme.spacing.sm};\n `,\n step: css`\n margin-bottom: ${theme.spacing.lg};\n\n &:last-child {\n margin-bottom: 0;\n }\n `,\n bucket: css`\n display: flex;\n margin-bottom: ${theme.spacing.sm};\n border-radius: ${theme.border.radius.sm};\n `,\n bucketInterval: css`\n flex-grow: 0;\n width: 60px;\n `,\n bucketRetention: css`\n background: linear-gradient(0deg, ${theme.palette.blue85}, ${theme.palette.blue95});\n text-align: center;\n color: ${theme.palette.white};\n margin-right: ${theme.spacing.md};\n border-radius: ${theme.border.radius.sm};\n `,\n bucketRetentionActive: css`\n background: linear-gradient(0deg, ${theme.palette.greenBase}, ${theme.palette.greenShade});\n `,\n };\n});\n","import { last } from 'lodash';\n\nexport const GRAPHITE_VERSIONS = ['0.9', '1.0', '1.1'];\n\nexport const DEFAULT_GRAPHITE_VERSION = last(GRAPHITE_VERSIONS)!;\n","import React from 'react';\n\nimport { Alert } from '@grafana/ui';\n\ntype Props = {\n onDismiss: () => void;\n};\n\nexport default function MappingsHelp(props: Props): JSX.Element {\n return (\n <Alert severity=\"info\" title=\"How to map Graphite metrics to labels?\" onRemove={props.onDismiss}>\n <p>Mappings are currently supported only between Graphite and Loki queries.</p>\n <p>\n When you switch your data source from Graphite to Loki, your queries are mapped according to the mappings\n defined in the example below. To define a mapping, write the full path of the metric and replace nodes you want\n to map to label with the label name in parentheses. The value of the label is extracted from your Graphite query\n when you switch data sources.\n </p>\n <p>\n All tags are automatically mapped to labels regardless of the mapping configuration. Graphite matching patterns\n (using {}) are converted to Loki's regular expressions matching patterns. When you use functions\n in your queries, the metrics, and tags are extracted to match them with defined mappings.\n </p>\n <p>\n Example: for a mapping = <code>servers.(cluster).(server).*</code>:\n </p>\n <table>\n <thead>\n <tr>\n <th>Graphite query</th>\n <th>Mapped to Loki query</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>\n <code>\n alias(servers.<u>west</u>.<u>001</u>.cpu,1,2)\n </code>\n </td>\n <td>\n <code>\n {cluster="<u>west</u>", server="<u>001</u>"}\n </code>\n </td>\n </tr>\n <tr>\n <td>\n <code>\n alias(servers.*.<u>{001,002}</u>.*,1,2)\n </code>\n </td>\n <td>\n <code>\n {server=~"<u>(001|002)</u>"}\n </code>\n </td>\n </tr>\n <tr>\n <td>\n <code>interpolate(seriesByTag('foo=bar', 'server=002'), inf))</code>\n </td>\n <td>\n <code>{foo="bar", server="002"}</code>\n </td>\n </tr>\n </tbody>\n </table>\n </Alert>\n );\n}\n","import React, { ChangeEvent, useState } from 'react';\n\nimport { Button, Icon, InlineField, InlineFieldRow, Input } from '@grafana/ui';\n\nimport MappingsHelp from './MappingsHelp';\n\ntype Props = {\n mappings: string[];\n onChange: (mappings: string[]) => void;\n onDismiss: () => void;\n onRestoreHelp: () => void;\n showHelp: boolean;\n};\n\nexport const MappingsConfiguration = (props: Props): JSX.Element => {\n const [mappings, setMappings] = useState(props.mappings || []);\n\n return (\n <div>\n <h3 className=\"page-heading\">Label mappings</h3>\n {!props.showHelp && (\n <p>\n <Button fill=\"text\" onClick={props.onRestoreHelp}>\n Learn how label mappings work\n </Button>\n </p>\n )}\n {props.showHelp && <MappingsHelp onDismiss={props.onDismiss} />}\n\n <div className=\"gf-form-group\">\n {mappings.map((mapping, i) => (\n <InlineFieldRow key={i}>\n <InlineField label={`Mapping (${i + 1})`}>\n <Input\n width={50}\n onChange={(changeEvent: ChangeEvent<HTMLInputElement>) => {\n let newMappings = mappings.concat();\n newMappings[i] = changeEvent.target.value;\n setMappings(newMappings);\n }}\n onBlur={() => {\n props.onChange(mappings);\n }}\n placeholder=\"e.g. test.metric.(labelName).*\"\n value={mapping}\n />\n </InlineField>\n <Button\n type=\"button\"\n aria-label=\"Remove header\"\n variant=\"secondary\"\n size=\"xs\"\n onClick={(_) => {\n let newMappings = mappings.concat();\n newMappings.splice(i, 1);\n setMappings(newMappings);\n props.onChange(newMappings);\n }}\n >\n <Icon name=\"trash-alt\" />\n </Button>\n </InlineFieldRow>\n ))}\n <Button\n variant=\"secondary\"\n icon=\"plus\"\n type=\"button\"\n onClick={() => {\n setMappings([...mappings, '']);\n }}\n >\n Add label mapping\n </Button>\n </div>\n </div>\n );\n};\n","import { GraphiteLokiMapping } from '../types';\n\n/**\n * Converts a simple string used in LokiLogsMappings component (e.g. \"servers.(name).*\")\n * to data model saved in data source configuration.\n */\nexport function fromString(text: string): GraphiteLokiMapping {\n return {\n matchers: text.split('.').map((metricNode) => {\n if (metricNode.startsWith('(') && metricNode.endsWith(')')) {\n return {\n value: '*',\n labelName: metricNode.slice(1, -1),\n };\n } else {\n return { value: metricNode };\n }\n }),\n };\n}\n\n/**\n * Coverts configuration stored in data source configuration into a string displayed in LokiLogsMappings component.\n */\nexport function toString(mapping: GraphiteLokiMapping): string {\n return mapping.matchers\n .map((matcher) => {\n return matcher.labelName ? `(${matcher.labelName})` : `${matcher.value}`;\n })\n .join('.');\n}\n","import React, { PureComponent } from 'react';\n\nimport {\n DataSourcePluginOptionsEditorProps,\n updateDatasourcePluginJsonDataOption,\n onUpdateDatasourceJsonDataOptionSelect,\n onUpdateDatasourceJsonDataOptionChecked,\n} from '@grafana/data';\nimport { Alert, DataSourceHttpSettings, Field, FieldSet, Select, Switch } from '@grafana/ui';\nimport { config } from 'app/core/config';\nimport store from 'app/core/store';\n\nimport { GraphiteOptions, GraphiteType } from '../types';\nimport { DEFAULT_GRAPHITE_VERSION, GRAPHITE_VERSIONS } from '../versions';\n\nimport { MappingsConfiguration } from './MappingsConfiguration';\nimport { fromString, toString } from './parseLokiLabelMappings';\n\nexport const SHOW_MAPPINGS_HELP_KEY = 'grafana.datasources.graphite.config.showMappingsHelp';\n\nconst graphiteVersions = GRAPHITE_VERSIONS.map((version) => ({ label: `${version}.x`, value: version }));\n\nconst graphiteTypes = Object.entries(GraphiteType).map(([label, value]) => ({\n label,\n value,\n}));\n\nexport type Props = DataSourcePluginOptionsEditorProps<GraphiteOptions>;\n\ntype State = {\n showMappingsHelp: boolean;\n};\n\nexport class ConfigEditor extends PureComponent<Props, State> {\n constructor(props: Props) {\n super(props);\n this.state = {\n showMappingsHelp: store.getObject(SHOW_MAPPINGS_HELP_KEY, true),\n };\n }\n\n componentDidMount() {\n updateDatasourcePluginJsonDataOption(this.props, 'graphiteVersion', this.currentGraphiteVersion);\n }\n\n render() {\n const { options, onOptionsChange } = this.props;\n\n const currentVersion = graphiteVersions.find((item) => item.value === this.currentGraphiteVersion);\n\n return (\n <>\n {options.access === 'direct' && (\n <Alert title=\"Deprecation Notice\" severity=\"warning\">\n This data source uses browser access mode. This mode is deprecated and will be removed in the future. Please\n use server access mode instead.\n </Alert>\n )}\n <DataSourceHttpSettings\n defaultUrl=\"http://localhost:8080\"\n dataSourceConfig={options}\n onChange={onOptionsChange}\n secureSocksDSProxyEnabled={config.secureSocksDSProxyEnabled}\n />\n <FieldSet>\n <legend className=\"page-heading\">Graphite details</legend>\n <Field\n label=\"Version\"\n description=\"This option controls what functions are available in the Graphite query editor.\"\n >\n <Select\n id=\"graphite-version\"\n aria-label=\"Graphite version\"\n value={currentVersion}\n options={graphiteVersions}\n width={16}\n onChange={onUpdateDatasourceJsonDataOptionSelect(this.props, 'graphiteVersion')}\n />\n </Field>\n\n <Field\n label=\"Graphite backend type\"\n description=\"There are different types of Graphite compatible backends. Here you can specify the type you are using. For Metrictank, this will enable specific features, like query processing meta data. Metrictank\n is a multi-tenant timeseries engine for Graphite and friends.\"\n >\n <Select\n id=\"backend-type\"\n options={graphiteTypes}\n value={graphiteTypes.find((type) => type.value === options.jsonData.graphiteType)}\n width={16}\n onChange={onUpdateDatasourceJsonDataOptionSelect(this.props, 'graphiteType')}\n />\n </Field>\n {options.jsonData.graphiteType === GraphiteType.Metrictank && (\n <Field\n label=\"Rollup indicator\"\n description=\"Shows up as an info icon in panel headers when data is aggregated.\"\n >\n <Switch\n id=\"rollup-indicator\"\n value={!!options.jsonData.rollupIndicatorEnabled}\n onChange={onUpdateDatasourceJsonDataOptionChecked(this.props, 'rollupIndicatorEnabled')}\n />\n </Field>\n )}\n </FieldSet>\n <MappingsConfiguration\n mappings={(options.jsonData.importConfiguration?.loki?.mappings || []).map(toString)}\n showHelp={this.state.showMappingsHelp}\n onDismiss={() => {\n this.setState({ showMappingsHelp: false });\n store.setObject(SHOW_MAPPINGS_HELP_KEY, false);\n }}\n onRestoreHelp={() => {\n this.setState({ showMappingsHelp: true });\n store.setObject(SHOW_MAPPINGS_HELP_KEY, true);\n }}\n onChange={(mappings) => {\n onOptionsChange({\n ...options,\n jsonData: {\n ...options.jsonData,\n importConfiguration: {\n ...options.jsonData.importConfiguration,\n loki: {\n mappings: mappings.map(fromString),\n },\n },\n },\n });\n }}\n />\n </>\n );\n }\n\n private get currentGraphiteVersion() {\n return this.props.options.jsonData.graphiteVersion || DEFAULT_GRAPHITE_VERSION;\n }\n}\n","import { isNumber } from 'lodash';\n\nconst versionPattern = /^(\\d+)(?:\\.(\\d+))?(?:\\.(\\d+))?(?:-([0-9A-Za-z\\.]+))?/;\n\nexport class SemVersion {\n major: number;\n minor: number;\n patch: number;\n meta: string;\n\n constructor(version: string) {\n this.major = 0;\n this.minor = 0;\n this.patch = 0;\n this.meta = '';\n const match = versionPattern.exec(version);\n if (match) {\n this.major = Number(match[1]);\n this.minor = Number(match[2] || 0);\n this.patch = Number(match[3] || 0);\n this.meta = match[4];\n }\n }\n\n isGtOrEq(version: string): boolean {\n const compared = new SemVersion(version);\n\n for (let i = 0; i < this.comparable.length; ++i) {\n if (this.comparable[i] > compared.comparable[i]) {\n return true;\n }\n if (this.comparable[i] < compared.comparable[i]) {\n return false;\n }\n }\n return true;\n }\n\n isValid(): boolean {\n return isNumber(this.major);\n }\n\n get comparable() {\n return [this.major, this.minor, this.patch];\n }\n}\n\nexport function isVersionGtOrEq(a: string, b: string): boolean {\n const aSemver = new SemVersion(a);\n return aSemver.isGtOrEq(b);\n}\n","import React, { useState } from 'react';\n\nimport { QueryEditorProps } from '@grafana/data';\nimport { InlineFormLabel, Input, TagsInput } from '@grafana/ui';\n\nimport { GraphiteDatasource } from '../datasource';\nimport { GraphiteQuery, GraphiteOptions } from '../types';\n\nexport const AnnotationEditor = (props: QueryEditorProps<GraphiteDatasource, GraphiteQuery, GraphiteOptions>) => {\n const { query, onChange } = props;\n const [target, setTarget] = useState<string>(query.target ?? '');\n const [tags, setTags] = useState<string[]>(query.tags ?? []);\n const updateValue = <K extends keyof GraphiteQuery, V extends GraphiteQuery[K]>(key: K, val: V) => {\n if (key === 'tags') {\n onChange({\n ...query,\n [key]: val,\n fromAnnotations: true,\n queryType: key,\n });\n } else {\n onChange({\n ...query,\n [key]: val,\n fromAnnotations: true,\n textEditor: true,\n });\n }\n };\n\n const onTagsChange = (tagsInput: string[]) => {\n setTags(tagsInput);\n updateValue('tags', tagsInput);\n };\n\n return (\n <div className=\"gf-form-group\">\n <div className=\"gf-form\">\n <InlineFormLabel width={12}>Graphite Query</InlineFormLabel>\n <Input\n value={target}\n onChange={(e) => setTarget(e.currentTarget.value || '')}\n onBlur={() => updateValue('target', target)}\n placeholder=\"Example: statsd.application.counters.*.count\"\n />\n </div>\n\n <h5 className=\"section-heading\">Or</h5>\n\n <div className=\"gf-form\">\n <InlineFormLabel width={12}>Graphite events tags</InlineFormLabel>\n <TagsInput id=\"tags-input\" width={50} tags={tags} onChange={onTagsChange} placeholder=\"Example: event_tag\" />\n </div>\n </div>\n );\n};\n","import { assign, each, filter, forEach, get, includes, isString, last, map, toString, isFinite } from 'lodash';\n\nimport { InterpolateFunction } from '@grafana/data';\nimport { isVersionGtOrEq } from 'app/core/utils/version';\n\nexport type ParamDef = {\n name: string;\n type: string;\n options?: Array<string | number>;\n multiple?: boolean;\n optional?: boolean;\n version?: string;\n};\n\nexport interface FuncDef {\n name: string;\n params: ParamDef[];\n defaultParams: Array<string | number>;\n category?: string;\n shortName?: any;\n fake?: boolean;\n version?: string;\n description?: string;\n /**\n * True if the function was not found on the list of available function descriptions.\n */\n unknown?: boolean;\n}\n\nexport type FuncDefs = {\n [functionName in string]: FuncDef;\n};\n\nconst index: FuncDefs = {};\n\nfunction addFuncDef(funcDef: Partial<FuncDef> & { name: string; category: string }) {\n funcDef.params = funcDef.params || [];\n funcDef.defaultParams = funcDef.defaultParams || [];\n\n index[funcDef.name] = funcDef as FuncDef;\n if (funcDef.shortName) {\n index[funcDef.shortName] = funcDef as FuncDef;\n }\n}\n\nconst optionalSeriesRefArgs = [{ name: 'other', type: 'value_or_series', optional: true, multiple: true }];\n\naddFuncDef({\n name: 'scaleToSeconds',\n category: 'Transform',\n params: [{ name: 'seconds', type: 'int' }],\n defaultParams: [1],\n});\n\naddFuncDef({\n name: 'perSecond',\n category: 'Transform',\n params: [{ name: 'max value', type: 'int', optional: true }],\n defaultParams: [],\n});\n\naddFuncDef({\n name: 'holtWintersForecast',\n category: 'Calculate',\n});\n\naddFuncDef({\n name: 'holtWintersConfidenceBands',\n category: 'Calculate',\n params: [{ name: 'delta', type: 'int' }],\n defaultParams: [3],\n});\n\naddFuncDef({\n name: 'holtWintersAberration',\n category: 'Calculate',\n params: [{ name: 'delta', type: 'int' }],\n defaultParams: [3],\n});\n\naddFuncDef({\n name: 'nPercentile',\n category: 'Calculate',\n params: [{ name: 'Nth percentile', type: 'int' }],\n defaultParams: [95],\n});\n\naddFuncDef({\n name: 'diffSeries',\n params: optionalSeriesRefArgs,\n defaultParams: ['#A'],\n category: 'Combine',\n});\n\naddFuncDef({\n name: 'stddevSeries',\n params: optionalSeriesRefArgs,\n defaultParams: [''],\n category: 'Combine',\n});\n\naddFuncDef({\n name: 'divideSeries',\n params: optionalSeriesRefArgs,\n defaultParams: ['#A'],\n category: 'Combine',\n});\n\naddFuncDef({\n name: 'multiplySeries',\n params: optionalSeriesRefArgs,\n defaultParams: ['#A'],\n category: 'Combine',\n});\n\naddFuncDef({\n name: 'asPercent',\n params: optionalSeriesRefArgs,\n defaultParams: ['#A'],\n category: 'Combine',\n});\n\naddFuncDef({\n name: 'group',\n params: optionalSeriesRefArgs,\n defaultParams: ['#A', '#B'],\n category: 'Combine',\n});\n\naddFuncDef({\n name: 'sumSeries',\n shortName: 'sum',\n category: 'Combine',\n params: optionalSeriesRefArgs,\n defaultParams: [''],\n});\n\naddFuncDef({\n name: 'averageSeries',\n shortName: 'avg',\n category: 'Combine',\n params: optionalSeriesRefArgs,\n defaultParams: [''],\n});\n\naddFuncDef({\n name: 'rangeOfSeries',\n category: 'Combine',\n});\n\naddFuncDef({\n name: 'percentileOfSeries',\n category: 'Combine',\n params: [\n { name: 'n', type: 'int' },\n { name: 'interpolate', type: 'boolean', options: ['true', 'false'] },\n ],\n defaultParams: [95, 'false'],\n});\n\naddFuncDef({\n name: 'sumSeriesWithWildcards',\n category: 'Combine',\n params: [{ name: 'node', type: 'int', multiple: true }],\n defaultParams: [3],\n});\n\naddFuncDef({\n name: 'maxSeries',\n shortName: 'max',\n category: 'Combine',\n});\n\naddFuncDef({\n name: 'minSeries',\n shortName: 'min',\n category: 'Combine',\n});\n\naddFuncDef({\n name: 'averageSeriesWithWildcards',\n category: 'Combine',\n params: [{ name: 'node', type: 'int', multiple: true }],\n defaultParams: [3],\n});\n\naddFuncDef({\n name: 'alias',\n category: 'Alias',\n params: [{ name: 'alias', type: 'string' }],\n defaultParams: ['alias'],\n});\n\naddFuncDef({\n name: 'aliasSub',\n category: 'Alias',\n params: [\n { name: 'search', type: 'string' },\n { name: 'replace', type: 'string' },\n ],\n defaultParams: ['', '\\\\1'],\n});\n\naddFuncDef({\n name: 'consolidateBy',\n category: 'Special',\n params: [\n {\n name: 'function',\n type: 'string',\n options: ['sum', 'average', 'min', 'max'],\n },\n ],\n defaultParams: ['max'],\n});\n\naddFuncDef({\n name: 'cumulative',\n category: 'Special',\n params: [],\n defaultParams: [],\n});\n\naddFuncDef({\n name: 'groupByNode',\n category: 'Combine',\n params: [\n {\n name: 'node',\n type: 'int',\n options: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12],\n },\n {\n name: 'function',\n type: 'string',\n options: ['sum', 'avg', 'maxSeries'],\n },\n ],\n defaultParams: [3, 'sum'],\n});\n\naddFuncDef({\n name: 'aliasByNode',\n category: 'Alias',\n params: [\n {\n name: 'node',\n type: 'int',\n options: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12],\n multiple: true,\n },\n ],\n defaultParams: [3],\n});\n\naddFuncDef({\n name: 'substr',\n category: 'Special',\n params: [\n {\n name: 'start',\n type: 'int',\n options: [-6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12],\n },\n {\n name: 'stop',\n type: 'int',\n options: [-6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12],\n },\n ],\n defaultParams: [0, 0],\n});\n\naddFuncDef({\n name: 'sortByName',\n category: 'Sorting',\n params: [\n {\n name: 'natural',\n type: 'boolean',\n options: ['true', 'false'],\n optional: true,\n },\n ],\n defaultParams: ['false'],\n});\n\naddFuncDef({\n name: 'sortByMaxima',\n category: 'Sorting',\n});\n\naddFuncDef({\n name: 'sortByMinima',\n category: 'Sorting',\n});\n\naddFuncDef({\n name: 'sortByTotal',\n category: 'Sorting',\n});\n\naddFuncDef({\n name: 'aliasByMetric',\n category: 'Alias',\n});\n\naddFuncDef({\n name: 'randomWalk',\n fake: true,\n category: 'Special',\n params: [{ name: 'name', type: 'string' }],\n defaultParams: ['randomWalk'],\n});\n\naddFuncDef({\n name: 'countSeries',\n category: 'Combine',\n});\n\naddFuncDef({\n name: 'constantLine',\n category: 'Special',\n params: [{ name: 'value', type: 'int' }],\n defaultParams: [10],\n});\n\naddFuncDef({\n name: 'cactiStyle',\n category: 'Special',\n});\n\naddFuncDef({\n name: 'keepLastValue',\n category: 'Transform',\n params: [{ name: 'n', type: 'int' }],\n defaultParams: [100],\n});\n\naddFuncDef({\n name: 'changed',\n category: 'Special',\n params: [],\n defaultParams: [],\n});\n\naddFuncDef({\n name: 'scale',\n category: 'Transform',\n params: [{ name: 'factor', type: 'int' }],\n defaultParams: [1],\n});\n\naddFuncDef({\n name: 'offset',\n category: 'Transform',\n params: [{ name: 'amount', type: 'int' }],\n defaultParams: [10],\n});\n\naddFuncDef({\n name: 'transformNull',\n category: 'Transform',\n params: [{ name: 'amount', type: 'int' }],\n defaultParams: [0],\n});\n\naddFuncDef({\n name: 'integral',\n category: 'Transform',\n});\n\naddFuncDef({\n name: 'derivative',\n category: 'Transform',\n});\n\naddFuncDef({\n name: 'nonNegativeDerivative',\n category: 'Transform',\n params: [{ name: 'max value or 0', type: 'int', optional: true }],\n defaultParams: [''],\n});\n\naddFuncDef({\n name: 'timeShift',\n category: 'Transform',\n params: [\n {\n name: 'amount',\n type: 'select',\n options: ['1h', '6h', '12h', '1d', '2d', '7d', '14d', '30d'],\n },\n ],\n defaultParams: ['1d'],\n});\n\naddFuncDef({\n name: 'timeStack',\n category: 'Transform',\n params: [\n {\n name: 'timeShiftUnit',\n type: 'select',\n options: ['1h', '6h', '12h', '1d', '2d', '7d', '14d', '30d'],\n },\n { name: 'timeShiftStart', type: 'int' },\n { name: 'timeShiftEnd', type: 'int' },\n ],\n defaultParams: ['1d', 0, 7],\n});\n\naddFuncDef({\n name: 'summarize',\n category: 'Transform',\n params: [\n { name: 'interval', type: 'string' },\n {\n name: 'func',\n type: 'select',\n options: ['sum', 'avg', 'min', 'max', 'last'],\n },\n {\n name: 'alignToFrom',\n type: 'boolean',\n optional: true,\n options: ['false', 'true'],\n },\n ],\n defaultParams: ['1h', 'sum', 'false'],\n});\n\naddFuncDef({\n name: 'smartSummarize',\n category: 'Transform',\n params: [\n { name: 'interval', type: 'string' },\n {\n name: 'func',\n type: 'select',\n options: ['sum', 'avg', 'min', 'max', 'last'],\n },\n ],\n defaultParams: ['1h', 'sum'],\n});\n\naddFuncDef({\n name: 'absolute',\n category: 'Transform',\n});\n\naddFuncDef({\n name: 'hitcount',\n category: 'Transform',\n params: [{ name: 'interval', type: 'string' }],\n defaultParams: ['10s'],\n});\n\naddFuncDef({\n name: 'log',\n category: 'Transform',\n params: [{ name: 'base', type: 'int' }],\n defaultParams: ['10'],\n});\n\naddFuncDef({\n name: 'averageAbove',\n category: 'Filter Series',\n params: [{ name: 'n', type: 'int' }],\n defaultParams: [25],\n});\n\naddFuncDef({\n name: 'averageBelow',\n category: 'Filter Series',\n params: [{ name: 'n', type: 'int' }],\n defaultParams: [25],\n});\n\naddFuncDef({\n name: 'currentAbove',\n category: 'Filter Series',\n params: [{ name: 'n', type: 'int' }],\n defaultParams: [25],\n});\n\naddFuncDef({\n name: 'currentBelow',\n category: 'Filter Series',\n params: [{ name: 'n', type: 'int' }],\n defaultParams: [25],\n});\n\naddFuncDef({\n name: 'maximumAbove',\n category: 'Filter Series',\n params: [{ name: 'value', type: 'int' }],\n defaultParams: [0],\n});\n\naddFuncDef({\n name: 'maximumBelow',\n category: 'Filter Series',\n params: [{ name: 'value', type: 'int' }],\n defaultParams: [0],\n});\n\naddFuncDef({\n name: 'minimumAbove',\n category: 'Filter Series',\n params: [{ name: 'value', type: 'int' }],\n defaultParams: [0],\n});\n\naddFuncDef({\n name: 'minimumBelow',\n category: 'Filter Series',\n params: [{ name: 'value', type: 'int' }],\n defaultParams: [0],\n});\n\naddFuncDef({\n name: 'limit',\n category: 'Filter Series',\n params: [{ name: 'n', type: 'int' }],\n defaultParams: [5],\n});\n\naddFuncDef({\n name: 'mostDeviant',\n category: 'Filter Series',\n params: [{ name: 'n', type: 'int' }],\n defaultParams: [10],\n});\n\naddFuncDef({\n name: 'exclude',\n category: 'Filter Series',\n params: [{ name: 'exclude', type: 'string' }],\n defaultParams: ['exclude'],\n});\n\naddFuncDef({\n name: 'highestCurrent',\n category: 'Filter Series',\n params: [{ name: 'count', type: 'int' }],\n defaultParams: [5],\n});\n\naddFuncDef({\n name: 'highestMax',\n category: 'Filter Series',\n params: [{ name: 'count', type: 'int' }],\n defaultParams: [5],\n});\n\naddFuncDef({\n name: 'lowestCurrent',\n category: 'Filter Series',\n params: [{ name: 'count', type: 'int' }],\n defaultParams: [5],\n});\n\naddFuncDef({\n name: 'movingAverage',\n category: 'Calculate',\n params: [\n {\n name: 'windowSize',\n type: 'int_or_interval',\n options: ['5', '7', '10', '5min', '10min', '30min', '1hour'],\n },\n ],\n defaultParams: [10],\n});\n\naddFuncDef({\n name: 'movingMedian',\n category: 'Calculate',\n params: [\n {\n name: 'windowSize',\n type: 'int_or_interval',\n options: ['5', '7', '10', '5min', '10min', '30min', '1hour'],\n },\n ],\n defaultParams: ['5'],\n});\n\naddFuncDef({\n name: 'stdev',\n category: 'Calculate',\n params: [\n { name: 'n', type: 'int' },\n { name: 'tolerance', type: 'int' },\n ],\n defaultParams: [5, 0.1],\n});\n\naddFuncDef({\n name: 'highestAverage',\n category: 'Filter Series',\n params: [{ name: 'count', type: 'int' }],\n defaultParams: [5],\n});\n\naddFuncDef({\n name: 'lowestAverage',\n category: 'Filter Series',\n params: [{ name: 'count', type: 'int' }],\n defaultParams: [5],\n});\n\naddFuncDef({\n name: 'removeAbovePercentile',\n category: 'Filter Data',\n params: [{ name: 'n', type: 'int' }],\n defaultParams: [5],\n});\n\naddFuncDef({\n name: 'removeAboveValue',\n category: 'Filter Data',\n params: [{ name: 'n', type: 'int' }],\n defaultParams: [5],\n});\n\naddFuncDef({\n name: 'removeBelowPercentile',\n category: 'Filter Data',\n params: [{ name: 'n', type: 'int' }],\n defaultParams: [5],\n});\n\naddFuncDef({\n name: 'removeBelowValue',\n category: 'Filter Data',\n params: [{ name: 'n', type: 'int' }],\n defaultParams: [5],\n});\n\naddFuncDef({\n name: 'useSeriesAbove',\n category: 'Filter Series',\n params: [\n { name: 'value', type: 'int' },\n { name: 'search', type: 'string' },\n { name: 'replace', type: 'string' },\n ],\n defaultParams: [0, 'search', 'replace'],\n});\n\n////////////////////\n// Graphite 1.0.x //\n////////////////////\n\naddFuncDef({\n name: 'aggregateLine',\n category: 'Calculate',\n params: [\n {\n name: 'func',\n type: 'select',\n options: ['sum', 'avg', 'min', 'max', 'last'],\n },\n ],\n defaultParams: ['avg'],\n version: '1.0',\n});\n\naddFuncDef({\n name: 'averageOutsidePercentile',\n category: 'Filter Series',\n params: [{ name: 'n', type: 'int' }],\n defaultParams: [95],\n version: '1.0',\n});\n\naddFuncDef({\n name: 'delay',\n category: 'Transform',\n params: [{ name: 'steps', type: 'int' }],\n defaultParams: [1],\n version: '1.0',\n});\n\naddFuncDef({\n name: 'exponentialMovingAverage',\n category: 'Calculate',\n params: [\n {\n name: 'windowSize',\n type: 'int_or_interval',\n options: ['5', '7', '10', '5min', '10min', '30min', '1hour'],\n },\n ],\n defaultParams: [10],\n version: '1.0',\n});\n\naddFuncDef({\n name: 'fallbackSeries',\n category: 'Special',\n params: [{ name: 'fallback', type: 'string' }],\n defaultParams: ['constantLine(0)'],\n version: '1.0',\n});\n\naddFuncDef({\n name: 'grep',\n category: 'Filter Series',\n params: [{ name: 'grep', type: 'string' }],\n defaultParams: ['grep'],\n version: '1.0',\n});\n\naddFuncDef({\n name: 'groupByNodes',\n category: 'Combine',\n params: [\n {\n name: 'function',\n type: 'string',\n options: ['sum', 'avg', 'maxSeries'],\n },\n {\n name: 'node',\n type: 'int',\n options: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12],\n multiple: true,\n },\n ],\n defaultParams: ['sum', 3],\n version: '1.0',\n});\n\naddFuncDef({\n name: 'integralByInterval',\n category: 'Transform',\n params: [\n {\n name: 'intervalUnit',\n type: 'select',\n options: ['1h', '6h', '12h', '1d', '2d', '7d', '14d', '30d'],\n },\n ],\n defaultParams: ['1d'],\n version: '1.0',\n});\n\naddFuncDef({\n name: 'interpolate',\n category: 'Transform',\n params: [{ name: 'limit', type: 'int', optional: true }],\n defaultParams: [],\n version: '1.0',\n});\n\naddFuncDef({\n name: 'invert',\n category: 'Transform',\n version: '1.0',\n});\n\naddFuncDef({\n name: 'isNonNull',\n category: 'Combine',\n version: '1.0',\n});\n\naddFuncDef({\n name: 'linearRegression',\n category: 'Calculate',\n params: [\n {\n name: 'startSourceAt',\n type: 'select',\n options: ['-1h', '-6h', '-12h', '-1d', '-2d', '-7d', '-14d', '-30d'],\n optional: true,\n },\n {\n name: 'endSourceAt',\n type: 'select',\n options: ['-1h', '-6h', '-12h', '-1d', '-2d', '-7d', '-14d', '-30d'],\n optional: true,\n },\n ],\n defaultParams: [],\n version: '1.0',\n});\n\naddFuncDef({\n name: 'mapSeries',\n shortName: 'map',\n params: [{ name: 'node', type: 'int' }],\n defaultParams: [3],\n category: 'Combine',\n version: '1.0',\n});\n\naddFuncDef({\n name: 'movingMin',\n category: 'Calculate',\n params: [\n {\n name: 'windowSize',\n type: 'int_or_interval',\n options: ['5', '7', '10', '5min', '10min', '30min', '1hour'],\n },\n ],\n defaultParams: [10],\n version: '1.0',\n});\n\naddFuncDef({\n name: 'movingMax',\n category: 'Calculate',\n params: [\n {\n name: 'windowSize',\n type: 'int_or_interval',\n options: ['5', '7', '10', '5min', '10min', '30min', '1hour'],\n },\n ],\n defaultParams: [10],\n version: '1.0',\n});\n\naddFuncDef({\n name: 'movingSum',\n category: 'Calculate',\n params: [\n {\n name: 'windowSize',\n type: 'int_or_interval',\n options: ['5', '7', '10', '5min', '10min', '30min', '1hour'],\n },\n ],\n defaultParams: [10],\n version: '1.0',\n});\n\naddFuncDef({\n name: 'multiplySeriesWithWildcards',\n category: 'Combine',\n params: [\n {\n name: 'position',\n type: 'int',\n options: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12],\n multiple: true,\n },\n ],\n defaultParams: [2],\n version: '1.0',\n});\n\naddFuncDef({\n name: 'offsetToZero',\n category: 'Transform',\n version: '1.0',\n});\n\naddFuncDef({\n name: 'pow',\n category: 'Transform',\n params: [{ name: 'factor', type: 'int' }],\n defaultParams: [10],\n version: '1.0',\n});\n\naddFuncDef({\n name: 'powSeries',\n category: 'Transform',\n params: optionalSeriesRefArgs,\n defaultParams: [''],\n version: '1.0',\n});\n\naddFuncDef({\n name: 'reduceSeries',\n shortName: 'reduce',\n params: [\n {\n name: 'function',\n type: 'string',\n options: ['asPercent', 'diffSeries', 'divideSeries'],\n },\n {\n name: 'reduceNode',\n type: 'int',\n options: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],\n },\n { name: 'reduceMatchers', type: 'string', multiple: true },\n ],\n defaultParams: ['asPercent', 2, 'used_bytes'],\n category: 'Combine',\n version: '1.0',\n});\n\naddFuncDef({\n name: 'removeBetweenPercentile',\n category: 'Filter Series',\n params: [{ name: 'n', type: 'int' }],\n defaultParams: [95],\n version: '1.0',\n});\n\naddFuncDef({\n name: 'removeEmptySeries',\n category: 'Filter Series',\n version: '1.0',\n});\n\naddFuncDef({\n name: 'squareRoot',\n category: 'Transform',\n version: '1.0',\n});\n\naddFuncDef({\n name: 'timeSlice',\n category: 'Transform',\n params: [\n {\n name: 'startSliceAt',\n type: 'select',\n options: ['-1h', '-6h', '-12h', '-1d', '-2d', '-7d', '-14d', '-30d'],\n },\n {\n name: 'endSliceAt',\n type: 'select',\n options: ['-1h', '-6h', '-12h', '-1d', '-2d', '-7d', '-14d', '-30d'],\n optional: true,\n },\n ],\n defaultParams: ['-1h'],\n version: '1.0',\n});\n\naddFuncDef({\n name: 'weightedAverage',\n category: 'Combine',\n params: [\n { name: 'other', type: 'value_or_series', optional: true },\n {\n name: 'node',\n type: 'int',\n options: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12],\n },\n ],\n defaultParams: ['#A', 4],\n version: '1.0',\n});\n\naddFuncDef({\n name: 'seriesByTag',\n category: 'Special',\n params: [{ name: 'tagExpression', type: 'string', multiple: true }],\n version: '1.1',\n});\n\naddFuncDef({\n name: 'groupByTags',\n category: 'Combine',\n params: [\n {\n name: 'function',\n type: 'string',\n options: ['sum', 'avg', 'maxSeries'],\n },\n { name: 'tag', type: 'string', multiple: true },\n ],\n defaultParams: ['sum', 'tag'],\n version: '1.1',\n});\n\naddFuncDef({\n name: 'aliasByTags',\n category: 'Alias',\n params: [{ name: 'tag', type: 'string', multiple: true }],\n defaultParams: ['tag'],\n version: '1.1',\n});\n\nfunction isVersionRelatedFunction(obj: { version?: string }, graphiteVersion: string) {\n return !obj.version || isVersionGtOrEq(graphiteVersion, obj.version);\n}\n\nexport class FuncInstance {\n def: FuncDef;\n params: Array<string | number>;\n text: any;\n /**\n * True if this function was just added and not edited yet. It's used to focus on first\n * function param to edit it straight away after adding a function.\n */\n declare added: boolean;\n /**\n * Hidden functions are not displayed in UI but available in text editor\n * This is used for seriesByTagUsed function which when used switches\n * the editor to tag-only mode. Defined tags are provided to seriesByTagUsed\n * as parameters.\n */\n hidden?: boolean;\n\n constructor(funcDef: FuncDef, options?: { withDefaultParams: any }) {\n this.def = funcDef;\n this.params = [];\n\n if (options && options.withDefaultParams && funcDef.defaultParams) {\n this.params = funcDef.defaultParams.slice(0);\n }\n\n this.updateText();\n }\n\n render(metricExp: string, replaceVariables: InterpolateFunction): string {\n const str = this.def.name + '(';\n\n const parameters = map(this.params, (value, index) => {\n let paramType;\n\n if (index < this.def.params.length) {\n paramType = this.def.params[index].type;\n } else if (get(last(this.def.params), 'multiple')) {\n paramType = get(last(this.def.params), 'type');\n }\n\n // param types that should never be quoted\n const neverQuotedParams = ['value_or_series', 'boolean', 'int', 'float', 'node', 'int_or_infinity'];\n\n // functions that should not have param types quoted\n // https://github.com/grafana/grafana/issues/54924\n const neverQuotedFunctions = ['asPercent'];\n // params or functions that should never be quoted\n if (includes(neverQuotedParams, paramType) || includes(neverQuotedFunctions, this.def.name)) {\n return value;\n }\n\n const valueInterpolated = isString(value) ? replaceVariables(value) : value;\n\n // param types that might be quoted\n // To quote variables correctly we need to interpolate it to check if it contains a numeric or string value\n if (includes(['int_or_interval', 'node_or_tag'], paramType) && isFinite(+valueInterpolated)) {\n return toString(value);\n }\n\n return \"'\" + value + \"'\";\n });\n\n // don't send any blank parameters to graphite\n while (parameters[parameters.length - 1] === '') {\n parameters.pop();\n }\n\n if (metricExp) {\n parameters.unshift(metricExp);\n }\n\n return str + parameters.join(', ') + ')';\n }\n\n _hasMultipleParamsInString(strValue: string, index: number) {\n if (strValue.indexOf(',') === -1) {\n return false;\n }\n\n if (this.def.params[index + 1] && this.def.params[index + 1].optional) {\n return true;\n }\n\n if (index + 1 >= this.def.params.length && get(last(this.def.params), 'multiple')) {\n return true;\n }\n\n return false;\n }\n\n updateParam(strValue: string, index: number) {\n // handle optional parameters\n // if string contains ',' and next param is optional, split and update both\n if (this._hasMultipleParamsInString(strValue, index)) {\n each(strValue.split(','), (partVal, idx) => {\n this.updateParam(partVal.trim(), index + idx);\n });\n return;\n }\n\n if (strValue === '' && (index >= this.def.params.length || this.def.params[index].optional)) {\n this.params.splice(index, 1);\n } else {\n this.params[index] = strValue;\n }\n\n this.updateText();\n }\n\n updateText() {\n if (this.params.length === 0) {\n this.text = this.def.name + '()';\n return;\n }\n\n let text = this.def.name + '(';\n text += this.params.join(', ');\n text += ')';\n this.text = text;\n }\n}\n\nfunction createFuncInstance(funcDef: FuncDef | string, options?: { withDefaultParams: any }, idx?: any): FuncInstance {\n if (isString(funcDef)) {\n funcDef = getFuncDef(funcDef, idx);\n }\n return new FuncInstance(funcDef, options);\n}\n\nfunction getFuncDef(name: string, idx?: any): FuncDef {\n if (!(idx || index)[name]) {\n return { name: name, params: [{ name: '', type: '', multiple: true }], defaultParams: [''], unknown: true };\n }\n return (idx || index)[name];\n}\n\nfunction getFuncDefs(graphiteVersion: string, idx?: any): FuncDefs {\n const funcs: FuncDefs = {};\n forEach(idx || index, (funcDef: FuncDef) => {\n if (isVersionRelatedFunction(funcDef, graphiteVersion)) {\n funcs[funcDef.name] = assign({}, funcDef, {\n params: filter(funcDef.params, (param) => {\n return isVersionRelatedFunction(param, graphiteVersion);\n }),\n });\n }\n });\n return funcs;\n}\n\n// parse response from graphite /functions endpoint into internal format\nfunction parseFuncDefs(rawDefs: any): FuncDefs {\n const funcDefs: FuncDefs = {};\n\n forEach(rawDefs || {}, (funcDef, funcName) => {\n // skip graphite graph functions\n if (funcDef.group === 'Graph') {\n return;\n }\n\n let description = funcDef.description;\n if (description) {\n // tidy up some pydoc syntax that rst2html can't handle\n description = description\n .replace(/:py:func:`(.+)( <[^>]*>)?`/g, '``$1``')\n .replace(/.. seealso:: /g, 'See also: ')\n .replace(/.. code-block *:: *none/g, '.. code-block::');\n }\n\n const func: FuncDef = {\n name: funcDef.name,\n description,\n category: funcDef.group,\n params: [],\n defaultParams: [],\n fake: false,\n };\n\n // get rid of the first \"seriesList\" param\n if (/^seriesLists?$/.test(get(funcDef, 'params[0].type', ''))) {\n // handle functions that accept multiple seriesLists\n // we leave the param in place but mark it optional, so users can add more series if they wish\n if (funcDef.params[0].multiple) {\n funcDef.params[0].required = false;\n // otherwise chop off the first param, it'll be handled separately\n } else {\n funcDef.params.shift();\n }\n // tag function as fake\n } else {\n func.fake = true;\n }\n\n forEach(funcDef.params, (rawParam) => {\n const param: any = {\n name: rawParam.name,\n type: 'string',\n optional: !rawParam.required,\n multiple: !!rawParam.multiple,\n options: undefined,\n };\n\n if (rawParam.default !== undefined) {\n if (rawParam.default === Infinity) {\n func.defaultParams.push('inf');\n } else {\n func.defaultParams.push(toString(rawParam.default));\n }\n } else if (rawParam.suggestions) {\n func.defaultParams.push(toString(rawParam.suggestions[0]));\n } else {\n func.defaultParams.push('');\n }\n\n if (rawParam.type === 'boolean') {\n param.type = 'boolean';\n param.options = ['true', 'false'];\n } else if (rawParam.type === 'integer') {\n param.type = 'int';\n } else if (rawParam.type === 'float') {\n param.type = 'float';\n } else if (rawParam.type === 'node') {\n param.type = 'node';\n param.options = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'];\n } else if (rawParam.type === 'nodeOrTag') {\n param.type = 'node_or_tag';\n param.options = ['name', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'];\n } else if (rawParam.type === 'intOrInterval') {\n param.type = 'int_or_interval';\n } else if (rawParam.type === 'seriesList') {\n param.type = 'value_or_series';\n } else if (rawParam.type === 'intOrInf') {\n param.type = 'int_or_infinity';\n }\n\n if (rawParam.options) {\n param.options = map(rawParam.options, toString);\n } else if (rawParam.suggestions) {\n param.options = map(rawParam.suggestions, toString);\n }\n\n func.params.push(param);\n });\n\n funcDefs[funcName] = func;\n });\n\n return funcDefs;\n}\n\nexport default {\n createFuncInstance: createFuncInstance,\n getFuncDef: getFuncDef,\n getFuncDefs: getFuncDefs,\n parseFuncDefs: parseFuncDefs,\n};\n","type LegacyAnnotation = {\n target?: string;\n tags?: string;\n};\n\n// this becomes the target in the migrated annotations\nconst migrateLegacyAnnotation = (json: LegacyAnnotation) => {\n // return the target annotation\n if (typeof json.target === 'string' && json.target) {\n return {\n fromAnnotations: true,\n target: json.target,\n textEditor: true,\n };\n }\n\n // return the tags annotation\n return {\n queryType: 'tags',\n tags: (json.tags || '').split(' '),\n fromAnnotations: true,\n };\n};\n\n// eslint-ignore-next-line\nexport const prepareAnnotation = (json: any) => {\n // annotation attributes are either 'tags' or 'target'(a graphite query string)\n // because the new annotations will also have a target attribute, {}\n // we need to handle the ambiguous 'target' when migrating legacy annotations\n // so, to migrate legacy annotations\n // we check that target is a string\n // or\n // there is a tags attribute with no target\n const resultingTarget = json.target && typeof json.target !== 'string' ? json.target : migrateLegacyAnnotation(json);\n\n json.target = resultingTarget;\n\n return json;\n};\n","import { each, indexOf, isArray, isString, map as _map } from 'lodash';\nimport { lastValueFrom, merge, Observable, of, OperatorFunction, pipe, throwError } from 'rxjs';\nimport { catchError, map } from 'rxjs/operators';\n\nimport {\n AbstractLabelMatcher,\n AbstractLabelOperator,\n AbstractQuery,\n DataFrame,\n DataQueryRequest,\n DataQueryResponse,\n DataSourceApi,\n DataSourceWithQueryExportSupport,\n dateMath,\n dateTime,\n MetricFindValue,\n QueryResultMetaStat,\n ScopedVars,\n TimeRange,\n TimeZone,\n toDataFrame,\n getSearchFilterScopedVar,\n} from '@grafana/data';\nimport { getBackendSrv } from '@grafana/runtime';\nimport { isVersionGtOrEq, SemVersion } from 'app/core/utils/version';\nimport { getTemplateSrv, TemplateSrv } from 'app/features/templating/template_srv';\nimport { getRollupNotice, getRuntimeConsolidationNotice } from 'app/plugins/datasource/graphite/meta';\n\nimport { AnnotationEditor } from './components/AnnotationsEditor';\nimport { convertToGraphiteQueryObject } from './components/helpers';\nimport gfunc, { FuncDef, FuncDefs, FuncInstance } from './gfunc';\nimport GraphiteQueryModel from './graphite_query';\nimport { prepareAnnotation } from './migrations';\n// Types\nimport {\n GraphiteLokiMapping,\n GraphiteMetricLokiMatcher,\n GraphiteOptions,\n GraphiteQuery,\n GraphiteQueryImportConfiguration,\n GraphiteQueryRequest,\n GraphiteQueryType,\n GraphiteType,\n MetricTankRequestMeta,\n} from './types';\nimport { reduceError } from './utils';\nimport { DEFAULT_GRAPHITE_VERSION } from './versions';\n\nconst GRAPHITE_TAG_COMPARATORS = {\n '=': AbstractLabelOperator.Equal,\n '!=': AbstractLabelOperator.NotEqual,\n '=~': AbstractLabelOperator.EqualRegEx,\n '!=~': AbstractLabelOperator.NotEqualRegEx,\n};\n\n/**\n * Converts Graphite glob-like pattern to a regular expression\n */\nfunction convertGlobToRegEx(text: string): string {\n if (text.includes('*') || text.includes('{')) {\n return '^' + text.replace(/\\*/g, '.*').replace(/\\{/g, '(').replace(/}/g, ')').replace(/,/g, '|');\n } else {\n return text;\n }\n}\n\nexport class GraphiteDatasource\n extends DataSourceApi<GraphiteQuery, GraphiteOptions, GraphiteQueryImportConfiguration>\n implements DataSourceWithQueryExportSupport<GraphiteQuery>\n{\n basicAuth: string;\n url: string;\n name: string;\n graphiteVersion: any;\n supportsTags: boolean;\n isMetricTank: boolean;\n rollupIndicatorEnabled: boolean;\n cacheTimeout: any;\n withCredentials: boolean;\n funcDefs: FuncDefs | null = null;\n funcDefsPromise: Promise<FuncDefs> | null = null;\n _seriesRefLetters: string;\n requestCounter = 100;\n private readonly metricMappings: GraphiteLokiMapping[];\n\n constructor(\n instanceSettings: any,\n private readonly templateSrv: TemplateSrv = getTemplateSrv()\n ) {\n super(instanceSettings);\n this.basicAuth = instanceSettings.basicAuth;\n this.url = instanceSettings.url;\n this.name = instanceSettings.name;\n // graphiteVersion is set when a datasource is created but it hadn't been set in the past so we're\n // still falling back to the default behavior here for backwards compatibility (see also #17429)\n this.graphiteVersion = instanceSettings.jsonData.graphiteVersion || DEFAULT_GRAPHITE_VERSION;\n this.metricMappings = instanceSettings.jsonData.importConfiguration?.loki?.mappings || [];\n this.isMetricTank = instanceSettings.jsonData.graphiteType === GraphiteType.Metrictank;\n this.supportsTags = supportsTags(this.graphiteVersion);\n this.cacheTimeout = instanceSettings.cacheTimeout;\n this.rollupIndicatorEnabled = instanceSettings.jsonData.rollupIndicatorEnabled;\n this.withCredentials = instanceSettings.withCredentials;\n this.funcDefs = null;\n this.funcDefsPromise = null;\n this._seriesRefLetters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n this.annotations = {\n QueryEditor: AnnotationEditor,\n prepareAnnotation,\n };\n }\n\n getQueryOptionsInfo() {\n return {\n maxDataPoints: true,\n cacheTimeout: true,\n links: [\n {\n text: 'Help',\n url: 'http://docs.grafana.org/features/datasources/graphite/#using-graphite-in-grafana',\n },\n ],\n };\n }\n\n getImportQueryConfiguration(): GraphiteQueryImportConfiguration {\n return {\n loki: {\n mappings: this.metricMappings,\n },\n };\n }\n\n async exportToAbstractQueries(queries: GraphiteQuery[]): Promise<AbstractQuery[]> {\n return queries.map((query) => this.exportToAbstractQuery(query));\n }\n\n exportToAbstractQuery(query: GraphiteQuery): AbstractQuery {\n const graphiteQuery: GraphiteQueryModel = new GraphiteQueryModel(\n this,\n {\n ...query,\n target: query.target || '',\n textEditor: false,\n },\n getTemplateSrv()\n );\n graphiteQuery.parseTarget();\n\n let labels: AbstractLabelMatcher[] = [];\n const config = this.getImportQueryConfiguration().loki;\n\n if (graphiteQuery.seriesByTagUsed) {\n graphiteQuery.tags.forEach((tag) => {\n labels.push({\n name: tag.key,\n operator: GRAPHITE_TAG_COMPARATORS[tag.operator],\n value: tag.value,\n });\n });\n } else {\n const targetNodes = graphiteQuery.segments.map((segment) => segment.value);\n let mappings = config.mappings.filter((mapping) => mapping.matchers.length <= targetNodes.length);\n\n for (let mapping of mappings) {\n const matchers = mapping.matchers.concat();\n\n matchers.every((matcher: GraphiteMetricLokiMatcher, index: number) => {\n if (matcher.labelName) {\n let value = (targetNodes[index] as string)!;\n\n if (value === '*') {\n return true;\n }\n\n const converted = convertGlobToRegEx(value);\n labels.push({\n name: matcher.labelName,\n operator: converted !== value ? AbstractLabelOperator.EqualRegEx : AbstractLabelOperator.Equal,\n value: converted,\n });\n return true;\n }\n return targetNodes[index] === matcher.value || matcher.value === '*';\n });\n }\n }\n\n return {\n refId: query.refId,\n labelMatchers: labels,\n };\n }\n\n query(options: DataQueryRequest<GraphiteQuery>): Observable<DataQueryResponse> {\n if (options.targets.some((target: GraphiteQuery) => target.fromAnnotations)) {\n const streams: Array<Observable<DataQueryResponse>> = [];\n\n for (const target of options.targets) {\n streams.push(\n new Observable((subscriber) => {\n this.annotationEvents(options.range, target)\n .then((events) => subscriber.next({ data: [toDataFrame(events)] }))\n .catch((ex) => subscriber.error(new Error(ex)))\n .finally(() => subscriber.complete());\n })\n );\n }\n\n return merge(...streams);\n }\n\n // handle the queries here\n const graphOptions = {\n from: this.translateTime(options.range.from, false, options.timezone),\n until: this.translateTime(options.range.to, true, options.timezone),\n targets: options.targets,\n format: (options as GraphiteQueryRequest).format,\n cacheTimeout: options.cacheTimeout || this.cacheTimeout,\n maxDataPoints: options.maxDataPoints,\n };\n\n const params = this.buildGraphiteParams(graphOptions, options.scopedVars);\n if (params.length === 0) {\n return of({ data: [] });\n }\n\n if (this.isMetricTank) {\n params.push('meta=true');\n }\n\n const httpOptions: any = {\n method: 'POST',\n url: '/render',\n data: params.join('&'),\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n },\n };\n\n this.addTracingHeaders(httpOptions, options);\n\n if (options.panelId) {\n httpOptions.requestId = this.name + '.panelId.' + options.panelId;\n }\n\n return this.doGraphiteRequest(httpOptions).pipe(map(this.convertResponseToDataFrames));\n }\n\n addTracingHeaders(\n httpOptions: { headers: any },\n options: { dashboardId?: number; panelId?: number; panelPluginId?: string }\n ) {\n const proxyMode = !this.url.match(/^http/);\n if (proxyMode) {\n if (options.dashboardId) {\n httpOptions.headers['X-Dashboard-Id'] = options.dashboardId;\n }\n if (options.panelId) {\n httpOptions.headers['X-Panel-Id'] = options.panelId;\n }\n if (options.panelPluginId) {\n httpOptions.headers['X-Panel-Plugin-Id'] = options.panelPluginId;\n }\n }\n }\n\n convertResponseToDataFrames = (result: any): DataQueryResponse => {\n const data: DataFrame[] = [];\n if (!result || !result.data) {\n return { data };\n }\n\n // Series are either at the root or under a node called 'series'\n const series = result.data.series || result.data;\n\n if (!isArray(series)) {\n throw { message: 'Missing series in result', data: result };\n }\n\n for (let i = 0; i < series.length; i++) {\n const s = series[i];\n\n // Disables Grafana own series naming\n s.title = s.target;\n\n for (let y = 0; y < s.datapoints.length; y++) {\n s.datapoints[y][1] *= 1000;\n }\n\n const frame = toDataFrame(s);\n\n // Metrictank metadata\n if (s.meta) {\n frame.meta = {\n custom: {\n requestMetaList: result.data.meta, // info for the whole request\n seriesMetaList: s.meta, // Array of metadata\n },\n };\n\n if (this.rollupIndicatorEnabled) {\n const rollupNotice = getRollupNotice(s.meta);\n const runtimeNotice = getRuntimeConsolidationNotice(s.meta);\n\n if (rollupNotice) {\n frame.meta.notices = [rollupNotice];\n } else if (runtimeNotice) {\n frame.meta.notices = [runtimeNotice];\n }\n }\n\n // only add the request stats to the first frame\n if (i === 0 && result.data.meta.stats) {\n frame.meta.stats = this.getRequestStats(result.data.meta);\n }\n }\n\n data.push(frame);\n }\n\n return { data };\n };\n\n getRequestStats(meta: MetricTankRequestMeta): QueryResultMetaStat[] {\n const stats: QueryResultMetaStat[] = [];\n\n for (const key in meta.stats) {\n let unit: string | undefined = undefined;\n\n if (key.endsWith('.ms')) {\n unit = 'ms';\n }\n\n stats.push({ displayName: key, value: meta.stats[key], unit });\n }\n\n return stats;\n }\n\n parseTags(tagString: string) {\n let tags: string[] = [];\n tags = tagString.split(',');\n if (tags.length === 1) {\n tags = tagString.split(' ');\n if (tags[0] === '') {\n tags = [];\n }\n }\n return tags;\n }\n\n interpolateVariablesInQueries(queries: GraphiteQuery[], scopedVars: ScopedVars): GraphiteQuery[] {\n let expandedQueries = queries;\n if (queries && queries.length > 0) {\n expandedQueries = queries.map((query) => {\n const expandedQuery = {\n ...query,\n datasource: this.getRef(),\n target: this.templateSrv.replace(query.target ?? '', scopedVars),\n };\n return expandedQuery;\n });\n }\n return expandedQueries;\n }\n\n annotationEvents(range: any, target: any) {\n if (target.target) {\n // Graphite query as target as annotation\n const targetAnnotation = this.templateSrv.replace(target.target, {}, 'glob');\n const graphiteQuery = {\n range: range,\n targets: [{ target: targetAnnotation }],\n format: 'json',\n maxDataPoints: 100,\n } as unknown as DataQueryRequest<GraphiteQuery>;\n\n return lastValueFrom(\n this.query(graphiteQuery).pipe(\n map((result) => {\n const list = [];\n\n for (let i = 0; i < result.data.length; i++) {\n const target = result.data[i];\n\n for (let y = 0; y < target.length; y++) {\n const time = target.fields[0].values[y];\n const value = target.fields[1].values[y];\n\n if (!value) {\n continue;\n }\n\n list.push({\n annotation: target,\n time,\n title: target.name,\n });\n }\n }\n\n return list;\n })\n )\n );\n } else {\n // Graphite event/tag as annotation\n const tags = this.templateSrv.replace(target.tags?.join(' '));\n return this.events({ range: range, tags: tags }).then((results) => {\n const list = [];\n if (!isArray(results.data)) {\n console.error(`Unable to get annotations from ${results.url}.`);\n return [];\n }\n for (let i = 0; i < results.data.length; i++) {\n const e = results.data[i];\n\n let tags = e.tags;\n if (isString(e.tags)) {\n tags = this.parseTags(e.tags);\n }\n\n list.push({\n annotation: target,\n time: e.when * 1000,\n title: e.what,\n tags: tags,\n text: e.data,\n });\n }\n\n return list;\n });\n }\n }\n\n events(options: { range: TimeRange; tags: any; timezone?: any }) {\n try {\n let tags = '';\n if (options.tags) {\n tags = '&tags=' + options.tags;\n }\n return lastValueFrom(\n this.doGraphiteRequest({\n method: 'GET',\n url:\n '/events/get_data?from=' +\n this.translateTime(options.range.raw.from, false, options.timezone) +\n '&until=' +\n this.translateTime(options.range.raw.to, true, options.timezone) +\n tags,\n })\n );\n } catch (err) {\n return Promise.reject(err);\n }\n }\n\n targetContainsTemplate(target: GraphiteQuery) {\n return this.templateSrv.containsTemplate(target.target ?? '');\n }\n\n translateTime(date: any, roundUp: any, timezone: TimeZone) {\n if (isString(date)) {\n if (date === 'now') {\n return 'now';\n } else if (date.indexOf('now-') >= 0 && date.indexOf('/') === -1) {\n date = date.substring(3);\n date = date.replace('m', 'min');\n date = date.replace('M', 'mon');\n return date;\n }\n date = dateMath.parse(date, roundUp, timezone);\n }\n\n // graphite' s from filter is exclusive\n // here we step back one minute in order\n // to guarantee that we get all the data that\n // exists for the specified range\n if (roundUp) {\n if (date.get('s')) {\n date.add(1, 's');\n }\n } else if (roundUp === false) {\n if (date.get('s')) {\n date.subtract(1, 's');\n }\n }\n\n return date.unix();\n }\n\n metricFindQuery(findQuery: string | GraphiteQuery, optionalOptions?: any): Promise<MetricFindValue[]> {\n const options: any = optionalOptions || {};\n\n const queryObject = convertToGraphiteQueryObject(findQuery);\n if (queryObject.queryType === GraphiteQueryType.Value || queryObject.queryType === GraphiteQueryType.MetricName) {\n return this.requestMetricRender(queryObject, options, queryObject.queryType);\n }\n\n let query = queryObject.target ?? '';\n\n // First attempt to check for tag-related functions (using empty wildcard for interpolation)\n let interpolatedQuery = this.templateSrv.replace(\n query,\n getSearchFilterScopedVar({ query, wildcardChar: '', options: optionalOptions })\n );\n\n // special handling for tag_values(<tag>[,<expression>]*), this is used for template variables\n let allParams = interpolatedQuery.match(/^tag_values\\((.*)\\)$/);\n let expressions = allParams ? allParams[1].split(',').filter((p) => !!p) : undefined;\n if (expressions) {\n options.limit = 10000;\n return this.getTagValuesAutoComplete(expressions.slice(1), expressions[0], undefined, options);\n }\n\n // special handling for tags(<expression>[,<expression>]*), this is used for template variables\n allParams = interpolatedQuery.match(/^tags\\((.*)\\)$/);\n expressions = allParams ? allParams[1].split(',').filter((p) => !!p) : undefined;\n if (expressions) {\n options.limit = 10000;\n return this.getTagsAutoComplete(expressions, undefined, options);\n }\n\n // If no tag-related query was found, perform metric-based search (using * as the wildcard for interpolation)\n let useExpand = query.match(/^expand\\((.*)\\)$/);\n query = useExpand ? useExpand[1] : query;\n\n interpolatedQuery = this.templateSrv.replace(\n query,\n getSearchFilterScopedVar({ query, wildcardChar: '*', options: optionalOptions })\n );\n\n let range;\n if (options.range) {\n range = {\n from: this.translateTime(options.range.from, false, options.timezone),\n until: this.translateTime(options.range.to, true, options.timezone),\n };\n }\n\n if (useExpand) {\n return this.requestMetricExpand(interpolatedQuery, options.requestId, range);\n } else {\n return this.requestMetricFind(interpolatedQuery, options.requestId, range);\n }\n }\n\n /**\n * Search for metrics matching giving pattern using /metrics/render endpoint.\n * It will return all possible values or names and parse them based on queryType.\n * For example:\n *\n * queryType: GraphiteQueryType.Value\n * query: groupByNode(movingAverage(apps.country.IE.counters.requests.count, 10), 2, 'sum')\n * result: 239.4, 233.4, 230.8, 230.4, 233.9, 238, 239.8, 236.8, 235.8\n *\n * queryType: GraphiteQueryType.MetricName\n * query: highestAverage(carbon.agents.*.*, 5)\n * result: carbon.agents.aa6338c54341-a.memUsage, carbon.agents.aa6338c54341-a.committedPoints, carbon.agents.aa6338c54341-a.updateOperations, carbon.agents.aa6338c54341-a.metricsReceived, carbon.agents.aa6338c54341-a.activeConnections\n */\n private async requestMetricRender(\n queryObject: GraphiteQuery,\n options: any,\n queryType: GraphiteQueryType\n ): Promise<MetricFindValue[]> {\n const requestId: string = options.requestId ?? `Q${this.requestCounter++}`;\n const range: TimeRange = options.range ?? {\n from: dateTime().subtract(6, 'hour'),\n to: dateTime(),\n raw: {\n from: 'now - 6h',\n to: 'now',\n },\n };\n const queryReq: DataQueryRequest<GraphiteQuery> = {\n app: 'graphite-variable-editor',\n interval: '1s',\n intervalMs: 10000,\n startTime: Date.now(),\n targets: [{ ...queryObject }],\n timezone: 'browser',\n scopedVars: {},\n requestId,\n range,\n };\n const data: DataQueryResponse = await lastValueFrom(this.query(queryReq));\n\n let result: MetricFindValue[];\n\n if (queryType === GraphiteQueryType.Value) {\n result = data.data[0].fields[1].values\n .filter((f?: number) => !!f)\n .map((v: number) => ({\n text: v.toString(),\n value: v,\n expandable: false,\n }));\n } else if (queryType === GraphiteQueryType.MetricName) {\n result = data.data.map((series) => ({\n text: series.name,\n value: series.name,\n expandable: false,\n }));\n } else {\n result = [];\n }\n\n return Promise.resolve(result);\n }\n\n /**\n * Search for metrics matching giving pattern using /metrics/find endpoint. It will\n * return all possible values at the last level of the query, for example:\n *\n * metrics: prod.servers.001.cpu, prod.servers.002.cpu\n * query: *.servers.*\n * result: 001, 002\n *\n * For more complex searches use requestMetricExpand\n */\n private requestMetricFind(\n query: string,\n requestId: string,\n range?: { from: any; until: any }\n ): Promise<MetricFindValue[]> {\n const httpOptions: any = {\n method: 'POST',\n url: '/metrics/find',\n params: {},\n data: `query=${query}`,\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n },\n // for cancellations\n requestId: requestId,\n };\n\n if (range) {\n httpOptions.params.from = range.from;\n httpOptions.params.until = range.until;\n }\n\n return lastValueFrom(\n this.doGraphiteRequest(httpOptions).pipe(\n map((results: any) => {\n return _map(results.data, (metric) => {\n return {\n text: metric.text,\n expandable: metric.expandable ? true : false,\n };\n });\n })\n )\n );\n }\n\n /**\n * Search for metrics matching giving pattern using /metrics/expand endpoint.\n * The result will contain all metrics (with full name) matching provided query.\n * It's a more flexible version of /metrics/find endpoint (@see requestMetricFind)\n */\n private requestMetricExpand(\n query: string,\n requestId: string,\n range?: { from: any; until: any }\n ): Promise<MetricFindValue[]> {\n const httpOptions: any = {\n method: 'GET',\n url: '/metrics/expand',\n params: { query },\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n },\n // for cancellations\n requestId,\n };\n\n if (range) {\n httpOptions.params.from = range.from;\n httpOptions.params.until = range.until;\n }\n\n return lastValueFrom(\n this.doGraphiteRequest(httpOptions).pipe(\n map((results: any) => {\n return _map(results.data.results, (metric) => {\n return {\n text: metric,\n expandable: false,\n };\n });\n })\n )\n );\n }\n\n getTags(optionalOptions: any) {\n const options = optionalOptions || {};\n\n const httpOptions: any = {\n method: 'GET',\n url: '/tags',\n // for cancellations\n requestId: options.requestId,\n };\n\n if (options.range) {\n httpOptions.params.from = this.translateTime(options.range.from, false, options.timezone);\n httpOptions.params.until = this.translateTime(options.range.to, true, options.timezone);\n }\n\n return lastValueFrom(\n this.doGraphiteRequest(httpOptions).pipe(\n map((results: any) => {\n return _map(results.data, (tag) => {\n return {\n text: tag.tag,\n id: tag.id,\n };\n });\n })\n )\n );\n }\n\n getTagValues(options: any = {}) {\n const httpOptions: any = {\n method: 'GET',\n url: '/tags/' + this.templateSrv.replace(options.key),\n // for cancellations\n requestId: options.requestId,\n };\n\n if (options.range) {\n httpOptions.params.from = this.translateTime(options.range.from, false, options.timezone);\n httpOptions.params.until = this.translateTime(options.range.to, true, options.timezone);\n }\n\n return lastValueFrom(\n this.doGraphiteRequest(httpOptions).pipe(\n map((results: any) => {\n if (results.data && results.data.values) {\n return _map(results.data.values, (value) => {\n return {\n text: value.value,\n id: value.id,\n };\n });\n } else {\n return [];\n }\n })\n )\n );\n }\n\n getTagsAutoComplete(expressions: any[], tagPrefix: any, optionalOptions?: any) {\n const options = optionalOptions || {};\n\n const httpOptions: any = {\n method: 'GET',\n url: '/tags/autoComplete/tags',\n params: {\n expr: _map(expressions, (expression) => this.templateSrv.replace((expression || '').trim())),\n },\n // for cancellations\n requestId: options.requestId,\n };\n\n if (tagPrefix) {\n httpOptions.params.tagPrefix = tagPrefix;\n }\n if (options.limit) {\n httpOptions.params.limit = options.limit;\n }\n if (options.range) {\n httpOptions.params.from = this.translateTime(options.range.from, false, options.timezone);\n httpOptions.params.until = this.translateTime(options.range.to, true, options.timezone);\n }\n return lastValueFrom(this.doGraphiteRequest(httpOptions).pipe(mapToTags()));\n }\n\n getTagValuesAutoComplete(expressions: any[], tag: any, valuePrefix: any, optionalOptions: any) {\n const options = optionalOptions || {};\n\n const httpOptions: any = {\n method: 'GET',\n url: '/tags/autoComplete/values',\n params: {\n expr: _map(expressions, (expression) => this.templateSrv.replace((expression || '').trim())),\n tag: this.templateSrv.replace((tag || '').trim()),\n },\n // for cancellations\n requestId: options.requestId,\n };\n\n if (valuePrefix) {\n httpOptions.params.valuePrefix = valuePrefix;\n }\n if (options.limit) {\n httpOptions.params.limit = options.limit;\n }\n if (options.range) {\n httpOptions.params.from = this.translateTime(options.range.from, false, options.timezone);\n httpOptions.params.until = this.translateTime(options.range.to, true, options.timezone);\n }\n return lastValueFrom(this.doGraphiteRequest(httpOptions).pipe(mapToTags()));\n }\n\n getVersion(optionalOptions: any) {\n const options = optionalOptions || {};\n\n const httpOptions = {\n method: 'GET',\n url: '/version',\n requestId: options.requestId,\n };\n\n return lastValueFrom(\n this.doGraphiteRequest(httpOptions).pipe(\n map((results: any) => {\n if (results.data) {\n const semver = new SemVersion(results.data);\n return semver.isValid() ? results.data : '';\n }\n return '';\n }),\n catchError(() => {\n return of('');\n })\n )\n );\n }\n\n createFuncInstance(funcDef: string | FuncDef, options?: any): FuncInstance {\n return gfunc.createFuncInstance(funcDef, options, this.funcDefs);\n }\n\n getFuncDef(name: string) {\n return gfunc.getFuncDef(name, this.funcDefs);\n }\n\n waitForFuncDefsLoaded() {\n return this.getFuncDefs();\n }\n\n getFuncDefs() {\n if (this.funcDefsPromise !== null) {\n return this.funcDefsPromise;\n }\n\n if (!supportsFunctionIndex(this.graphiteVersion)) {\n this.funcDefs = gfunc.getFuncDefs(this.graphiteVersion);\n this.funcDefsPromise = Promise.resolve(this.funcDefs);\n return this.funcDefsPromise;\n }\n\n const httpOptions = {\n method: 'GET',\n url: '/functions',\n // add responseType because if this is not defined,\n // backend_srv defaults to json\n responseType: 'text',\n };\n\n return lastValueFrom(\n this.doGraphiteRequest(httpOptions).pipe(\n map((results: any) => {\n // Fix for a Graphite bug: https://github.com/graphite-project/graphite-web/issues/2609\n // There is a fix for it https://github.com/graphite-project/graphite-web/pull/2612 but\n // it was merged to master in July 2020 but it has never been released (the last Graphite\n // release was 1.1.7 - March 2020). The bug was introduced in Graphite 1.1.7, in versions\n // 1.1.0 - 1.1.6 /functions endpoint returns a valid JSON\n const fixedData = JSON.parse(results.data.replace(/\"default\": ?Infinity/g, '\"default\": 1e9999'));\n this.funcDefs = gfunc.parseFuncDefs(fixedData);\n return this.funcDefs;\n }),\n catchError((error) => {\n console.error('Fetching graphite functions error', error);\n this.funcDefs = gfunc.getFuncDefs(this.graphiteVersion);\n return of(this.funcDefs);\n })\n )\n );\n }\n\n testDatasource() {\n const query: DataQueryRequest<GraphiteQuery> = {\n app: 'graphite',\n interval: '10ms',\n intervalMs: 10,\n requestId: 'reqId',\n scopedVars: {},\n startTime: 0,\n timezone: 'browser',\n panelId: 3,\n rangeRaw: { from: 'now-1h', to: 'now' },\n range: {\n from: dateTime('now-1h'),\n to: dateTime('now'),\n raw: { from: 'now-1h', to: 'now' },\n },\n targets: [{ refId: 'A', target: 'constantLine(100)' }],\n maxDataPoints: 300,\n };\n\n return lastValueFrom(this.query(query)).then(() => ({ status: 'success', message: 'Data source is working' }));\n }\n\n doGraphiteRequest(options: {\n method?: string;\n url: any;\n requestId?: any;\n withCredentials?: any;\n headers?: any;\n inspect?: any;\n }) {\n if (this.basicAuth || this.withCredentials) {\n options.withCredentials = true;\n }\n if (this.basicAuth) {\n options.headers = options.headers || {};\n options.headers.Authorization = this.basicAuth;\n }\n\n options.url = this.url + options.url;\n options.inspect = { type: 'graphite' };\n\n return getBackendSrv()\n .fetch(options)\n .pipe(\n catchError((err) => {\n return throwError(reduceError(err));\n })\n );\n }\n\n buildGraphiteParams(options: any, scopedVars?: ScopedVars): string[] {\n const graphiteOptions = ['from', 'until', 'rawData', 'format', 'maxDataPoints', 'cacheTimeout'];\n const cleanOptions = [],\n targets: any = {};\n let target, targetValue, i;\n const regex = /\\#([A-Z])/g;\n const intervalFormatFixRegex = /'(\\d+)m'/gi;\n let hasTargets = false;\n\n options['format'] = 'json';\n\n function fixIntervalFormat(match: string) {\n return match.replace('m', 'min').replace('M', 'mon');\n }\n\n for (i = 0; i < options.targets.length; i++) {\n target = options.targets[i];\n if (!target.target) {\n continue;\n }\n\n if (!target.refId) {\n target.refId = this._seriesRefLetters[i];\n }\n\n targetValue = this.templateSrv.replace(target.target, scopedVars);\n targetValue = targetValue.replace(intervalFormatFixRegex, fixIntervalFormat);\n targets[target.refId] = targetValue;\n }\n\n function nestedSeriesRegexReplacer(match: any, g1: string | number) {\n return targets[g1] || match;\n }\n\n for (i = 0; i < options.targets.length; i++) {\n target = options.targets[i];\n if (!target.target) {\n continue;\n }\n\n targetValue = targets[target.refId];\n targetValue = targetValue.replace(regex, nestedSeriesRegexReplacer);\n targets[target.refId] = targetValue;\n\n if (!target.hide) {\n hasTargets = true;\n cleanOptions.push('target=' + encodeURIComponent(targetValue));\n }\n }\n\n each(options, (value, key) => {\n if (indexOf(graphiteOptions, key) === -1) {\n return;\n }\n if (value) {\n cleanOptions.push(key + '=' + encodeURIComponent(value));\n }\n });\n\n if (!hasTargets) {\n return [];\n }\n\n return cleanOptions;\n }\n}\n\nfunction supportsTags(version: string): boolean {\n return isVersionGtOrEq(version, '1.1');\n}\n\nfunction supportsFunctionIndex(version: string): boolean {\n return isVersionGtOrEq(version, '1.1');\n}\n\nfunction mapToTags(): OperatorFunction<any, Array<{ text: string }>> {\n return pipe(\n map((results) => {\n if (results.data) {\n return _map(results.data, (value) => {\n return { text: value };\n });\n } else {\n return [];\n }\n })\n );\n}\n","import { DataSourcePlugin } from '@grafana/data';\n\nimport { GraphiteQueryEditor } from './components/GraphiteQueryEditor';\nimport { GraphiteVariableEditor } from './components/GraphiteVariableEditor';\nimport { MetricTankMetaInspector } from './components/MetricTankMetaInspector';\nimport { ConfigEditor } from './configuration/ConfigEditor';\nimport { GraphiteDatasource } from './datasource';\n\nexport const plugin = new DataSourcePlugin(GraphiteDatasource)\n .setQueryEditor(GraphiteQueryEditor)\n .setConfigEditor(ConfigEditor)\n .setVariableQueryEditor(GraphiteVariableEditor)\n .setMetadataInspector(MetricTankMetaInspector);\n"],"names":["init","timeRangeChanged","queriesChanged","queryChanged","segmentValueChanged","addNewTag","tagChanged","unpause","addFunction","removeFunction","moveFunction","updateFunctionParam","updateQuery","runQuery","toggleEditorMode","actions","unicodeLetterTable","identifierStartTable","i","identifierPartTable","Lexer","expression","list","token","match","id","index","type","char","isUnicodeLetter","code","isHexDigit","str","readUnicodeEscapeSequence","ch1","ch2","ch3","ch4","getIdentifierStart","chr","getIdentifierPart","value","length","bad","isDecimalDigit","isOctalDigit","isIdentifierStart","ch","quote","jump","reduceError","error","newMessage","isGraphiteParserError","e","Parser","curlySegment","curly","tokenValue","parts","node","segments","segment","name","param","text","currentToken","token1","token2","GraphiteQuery","datasource","target","templateSrv","scopedVars","astNode","err","arr","result","func","innerFunc","handleMultipleSeriesByTagsParams","newFunc","offset","arrayMove","targets","wrapFunction","metricPath","targetsByRefId","nestedSeriesRefRegex","targetWithNestedQueries","t","regex","refMatches","updated","g1","tagPattern","matches","tag","seriesByTagFuncIndex","newTagParam","renderTagString","tagIndex","excludeIndex","tagExpr","count","p","stringParams","acc","idx","paramsArr","GRAPHITE_TAG_OPERATORS","TAG_PREFIX","parseTarget","state","buildSegments","modifyLastSegment","checkOtherSegmentsIndex","checkOtherSegments","addSelectMetricSegment","fromIndex","currentFromIndex","path","handleMetricsAutoCompleteError","spliceSegments","emptySegments","addSeriesByTagFunc","tagParam","handleTargetChanged","smartlyHandleNewAliasByNode","pause","removeTagPrefix","oldTarget","query","newTarget","handleTagsAutoCompleteError","reducer","action","deps","segmentOrString","segmentIndex","newTag","createStore","onChange","DispatchContext","GraphiteStateContext","useDispatch","useGraphiteState","GraphiteQueryEditorContext","onRunQuery","queries","range","children","setState","needsRefresh","setNeedsRefresh","dispatch","previousRange","usePrevious","GraphiteQueryType","GraphiteType","mapStringsToSelectables","values","mapSegmentsToSelectables","mapFuncDefsToSelectables","funcDefs","categories","funcDef","createEditableParam","paramDef","additional","option","mapFuncInstanceToParams","params","convertToGraphiteQueryObject","AddGraphiteFunction","setValue","styles","getStyles","options","Segment","Button","theme","FunctionDescription","props","FunctionHelpButton","tooltip","Tooltip","Icon","FunctionEditorControls","onMoveLeft","onMoveRight","onRemove","FunctionEditor","renderContent","updatePopperPosition","TooltipContent","FunctionParamEditor","editableParam","onExpandedChange","autofocus","SegmentInput","GraphiteFunctionEditor","mouseOver","setIsMouseOver","expanded","setIsExpanded","InlineLabel","FunctionsSection","functions","SegmentSection","GraphiteTextEditor","rawQuery","QueryField","MAX_SUGGESTIONS","getAltSegments","prefix","altSegments","variable","removeTaggedEntry","addAltTagSegments","getAltSegmentsSelectables","getTagOperatorsSelectables","getTags","tagPrefix","tagExpressions","altTags","getTagsSelectables","getTagsAsSegments","tagsAsSegments","val","getTagsAsSegmentsSelectables","getTagValues","valuePrefix","tagKey","altValues","getTagValuesSelectables","tagSegments","s","MetricSegment","metricIndex","loadOptions","debouncedLoadOptions","onSegmentChanged","selectableValue","onSegmentChangedDebounced","SegmentAsync","MetricsSection","PlayButton","onClick","TagEditor","getTagsOptions","inputValue","debouncedGetTagsOptions","getTagValueOptions","debouncedGetTagValueOptions","TagsSection","tags","getTagsAsSegmentsOptions","debouncedGetTagsAsSegments","SeriesSection","sectionContent","GraphiteQueryEditor","GraphiteQueryEditorContent","GRAPHITE_QUERY_VARIABLE_TYPE_OPTIONS","GraphiteVariableEditor","InlineField","Select","Input","toInteger","toBooleanOrTimestamp","getRollupNotice","metaList","meta","archiveIndex","intervalString","parseSchemaRetentions","getRuntimeConsolidationNotice","runtimeNr","spec","vals","MetricTankMetaInspector","key","buckets","rollupNotice","runtimeNotice","normFunc","totalSeconds","bucket","lengthPercent","isActive","data","seriesMetas","series","metaItem","stylesFactory","config","borderColor","background","headerBg","GRAPHITE_VERSIONS","DEFAULT_GRAPHITE_VERSION","MappingsHelp","Alert","MappingsConfiguration","mappings","setMappings","mapping","InlineFieldRow","changeEvent","newMappings","_","fromString","metricNode","matcher","SHOW_MAPPINGS_HELP_KEY","graphiteVersions","version","graphiteTypes","label","ConfigEditor","onOptionsChange","currentVersion","item","DataSourceHttpSettings","FieldSet","Field","Switch","versionPattern","SemVersion","compared","isVersionGtOrEq","a","b","AnnotationEditor","setTarget","setTags","updateValue","onTagsChange","tagsInput","TagsInput","addFuncDef","optionalSeriesRefArgs","isVersionRelatedFunction","obj","graphiteVersion","FuncInstance","metricExp","replaceVariables","parameters","paramType","neverQuotedParams","neverQuotedFunctions","valueInterpolated","strValue","partVal","createFuncInstance","getFuncDef","getFuncDefs","funcs","parseFuncDefs","rawDefs","funcName","description","rawParam","migrateLegacyAnnotation","json","prepareAnnotation","resultingTarget","GRAPHITE_TAG_COMPARATORS","convertGlobToRegEx","GraphiteDatasource","instanceSettings","y","frame","supportsTags","graphiteQuery","labels","targetNodes","converted","streams","Observable","subscriber","events","ex","merge","graphOptions","of","httpOptions","map","stats","unit","tagString","expandedQueries","targetAnnotation","lastValueFrom","time","results","date","roundUp","timezone","findQuery","optionalOptions","queryObject","interpolatedQuery","allParams","expressions","useExpand","queryType","requestId","queryReq","f","v","metric","mapToTags","catchError","gfunc","supportsFunctionIndex","fixedData","throwError","graphiteOptions","cleanOptions","targetValue","intervalFormatFixRegex","hasTargets","fixIntervalFormat","nestedSeriesRegexReplacer","pipe"],"sourceRoot":""}
Submit
FILE
FOLDER
INFO
Name
Size
Permission
Action
static
---
0755
0.c88fc16b6533c8976681.js
11857 bytes
0644
0.c88fc16b6533c8976681.js.map
46011 bytes
0644
1118.6d1cbbd2070e00a7483d.js
9459 bytes
0644
1118.6d1cbbd2070e00a7483d.js.map
22012 bytes
0644
1121.6c31bf81768d3312b0d4.js
11557 bytes
0644
1121.6c31bf81768d3312b0d4.js.map
40274 bytes
0644
1122.1b3b5a9bdf4a2fc70a83.js
4310 bytes
0644
1122.1b3b5a9bdf4a2fc70a83.js.map
9301 bytes
0644
1133.cd705902767ed2e9bf55.js
107191 bytes
0644
1133.cd705902767ed2e9bf55.js.map
459177 bytes
0644
1216.ddb58ad09e0c4e3f4079.js
12860 bytes
0644
1216.ddb58ad09e0c4e3f4079.js.map
47906 bytes
0644
1282.2347f27d5b3a18a42a1e.js
2965 bytes
0644
1282.2347f27d5b3a18a42a1e.js.map
6699 bytes
0644
1345.8570fef914aafab94513.js
2223 bytes
0644
1345.8570fef914aafab94513.js.map
5201 bytes
0644
1347.8ad23b870a6e21306189.js
32035 bytes
0644
1347.8ad23b870a6e21306189.js.map
89851 bytes
0644
1420.f2553cafc235b7c32261.js
14576 bytes
0644
1420.f2553cafc235b7c32261.js.map
32839 bytes
0644
1438.897db349b7f48a15b9eb.js
2830 bytes
0644
1438.897db349b7f48a15b9eb.js.map
6911 bytes
0644
1446.babd36e7134aac1046c4.js
1832 bytes
0644
1446.babd36e7134aac1046c4.js.map
3282 bytes
0644
1488.ff35935a06f41b02b6cc.js
316 bytes
0644
1488.ff35935a06f41b02b6cc.js.map
1206 bytes
0644
1560.30962127c91e5eae9982.js
8916 bytes
0644
1560.30962127c91e5eae9982.js.map
20515 bytes
0644
1660.e1f66118fb028d12074f.js
21866 bytes
0644
1660.e1f66118fb028d12074f.js.map
71039 bytes
0644
1698.68ff1ef08e94a87836b3.js
12570 bytes
0644
1698.68ff1ef08e94a87836b3.js.map
46006 bytes
0644
1708.f42a783c0f6c7a317d49.js
2249 bytes
0644
1708.f42a783c0f6c7a317d49.js.map
2954 bytes
0644
1710.d96221051fceaf8c89dd.js
10172 bytes
0644
1710.d96221051fceaf8c89dd.js.map
22097 bytes
0644
1740.e57d920c47a11759ade4.js
6204 bytes
0644
1740.e57d920c47a11759ade4.js.map
13740 bytes
0644
1888.0ede69d3190c536744b9.js
6822 bytes
0644
1888.0ede69d3190c536744b9.js.map
15421 bytes
0644
1914.58113477b565d57e8bfe.js
10710 bytes
0644
1914.58113477b565d57e8bfe.js.map
23555 bytes
0644
198.b84c0e4f5759344ae05a.js
8267 bytes
0644
198.b84c0e4f5759344ae05a.js.map
19446 bytes
0644
205.6c51b5e35c8147226738.js
3542 bytes
0644
205.6c51b5e35c8147226738.js.map
8376 bytes
0644
2058.0e5df44647184aaf02e2.js
1252 bytes
0644
2058.0e5df44647184aaf02e2.js.map
4744 bytes
0644
2077.12b2df3682085a92a810.js
34133 bytes
0644
2077.12b2df3682085a92a810.js.map
122011 bytes
0644
2094.259625d8acf28b9c7361.js
16518 bytes
0644
2094.259625d8acf28b9c7361.js.map
41269 bytes
0644
21.afca69f2d336e287a655.js
6172 bytes
0644
21.afca69f2d336e287a655.js.map
17305 bytes
0644
2136.9c8dcd43d3af327f51f5.js
498667 bytes
0644
2136.9c8dcd43d3af327f51f5.js.map
1908011 bytes
0644
2228.cf629cf4a83c5b6c2671.js
269 bytes
0644
2228.cf629cf4a83c5b6c2671.js.map
457 bytes
0644
2244.9324c28eca7d2ffb7568.js
3396 bytes
0644
2244.9324c28eca7d2ffb7568.js.map
7683 bytes
0644
2261.ac6a26854d5acee00776.js
106373 bytes
0644
2261.ac6a26854d5acee00776.js.map
478562 bytes
0644
2278.bdd73b14b6337c6b14e4.js
5754 bytes
0644
2278.bdd73b14b6337c6b14e4.js.map
13399 bytes
0644
2398.3de0e7aa3057b7dcf9da.js
8016 bytes
0644
2398.3de0e7aa3057b7dcf9da.js.map
18383 bytes
0644
2514.c86950e9813e27962050.js
1983 bytes
0644
2514.c86950e9813e27962050.js.map
4863 bytes
0644
2571.345ecfd2b82551018f2e.js
162139 bytes
0644
2571.345ecfd2b82551018f2e.js.map
2046 bytes
0644
2586.972e9a7d564398afee76.js
6385 bytes
0644
2586.972e9a7d564398afee76.js.map
14676 bytes
0644
2658.f4100815829c4d37d35c.js
5432 bytes
0644
2658.f4100815829c4d37d35c.js.map
13650 bytes
0644
2686.2fbaa7db9c01d59cad8d.js
2815 bytes
0644
2686.2fbaa7db9c01d59cad8d.js.map
6564 bytes
0644
2692.20098ad0182743d98d62.js
2282 bytes
0644
2692.20098ad0182743d98d62.js.map
5680 bytes
0644
2694.a31d749361a36eb167da.js
2726 bytes
0644
2694.a31d749361a36eb167da.js.map
3618 bytes
0644
2745.2e5ec1fdf377d2940fb4.js
33584 bytes
0644
2745.2e5ec1fdf377d2940fb4.js.map
120277 bytes
0644
2962.4c3147d8ee365fe296ef.js
7640 bytes
0644
2962.4c3147d8ee365fe296ef.js.map
17621 bytes
0644
3042.248a4194805a8500fd28.js
19010 bytes
0644
3042.248a4194805a8500fd28.js.map
38148 bytes
0644
3062.4e9a427c2a59d53f902e.js
4663 bytes
0644
3062.4e9a427c2a59d53f902e.js.map
10650 bytes
0644
3082.c09cff56c35d736ee8b6.js
52872 bytes
0644
3082.c09cff56c35d736ee8b6.js.map
56822 bytes
0644
3096.8d41728a4f5010bc56a2.js
4378 bytes
0644
3096.8d41728a4f5010bc56a2.js.map
10739 bytes
0644
3098.f22ad6dab13d06477be0.js
31462 bytes
0644
3098.f22ad6dab13d06477be0.js.map
85588 bytes
0644
3182.1d531f28507c00e391fc.js
13817 bytes
0644
3182.1d531f28507c00e391fc.js.map
26653 bytes
0644
3407.666eb88a718e66b93f72.js
34425 bytes
0644
3407.666eb88a718e66b93f72.js.map
103716 bytes
0644
3418.d31d882b87bd5a2ef66f.js
33061 bytes
0644
3418.d31d882b87bd5a2ef66f.js.map
114234 bytes
0644
3541.8d063e3d43d55745d89b.js
20582 bytes
0644
3541.8d063e3d43d55745d89b.js.map
67154 bytes
0644
3543.eecef49ce94da5ee0418.js
136752 bytes
0644
3543.eecef49ce94da5ee0418.js.map
446118 bytes
0644
3622.976b1aef94b333e450b9.js
1260 bytes
0644
3622.976b1aef94b333e450b9.js.map
2819 bytes
0644
3686.102abfc00452299017bb.js
87 bytes
0644
3718.3993946b7a0eb8f64b4d.js
23620 bytes
0644
3718.3993946b7a0eb8f64b4d.js.map
92024 bytes
0644
3726.3adfe210678d2cd26969.js
31765 bytes
0644
3726.3adfe210678d2cd26969.js.map
118227 bytes
0644
398.4e93ffb675609ea7a9c6.js
2990 bytes
0644
398.4e93ffb675609ea7a9c6.js.map
7145 bytes
0644
4114.953b39a9ce57caa0e87a.js
2536 bytes
0644
4114.953b39a9ce57caa0e87a.js.map
6028 bytes
0644
4120.67bf5d203ed4a2eb5f1b.js
3229 bytes
0644
4120.67bf5d203ed4a2eb5f1b.js.map
7533 bytes
0644
4209.c7060d489834063658f5.js
17352 bytes
0644
4209.c7060d489834063658f5.js.map
30980 bytes
0644
4254.c5f4a5512b252e3a5796.js
71716 bytes
0644
4254.c5f4a5512b252e3a5796.js.map
237783 bytes
0644
4289.d5662b0904798ff437e9.js
16496 bytes
0644
4289.d5662b0904798ff437e9.js.map
32015 bytes
0644
4334.bc078c368a20ed3257b6.js
2598 bytes
0644
4334.bc078c368a20ed3257b6.js.map
6308 bytes
0644
4630.b604ea691184ba563d59.js
5585 bytes
0644
4630.b604ea691184ba563d59.js.map
11866 bytes
0644
4680.358dfdd92851f69ecc97.js
4573 bytes
0644
4680.358dfdd92851f69ecc97.js.map
10841 bytes
0644
4698.696713071ff5d9929a11.js
3682 bytes
0644
4698.696713071ff5d9929a11.js.map
8967 bytes
0644
4787.bd938ea7cb58d64ee246.js
738 bytes
0644
4787.bd938ea7cb58d64ee246.js.map
2168 bytes
0644
4839.17a10e0ceca3eb8954b4.js
39585 bytes
0644
4839.17a10e0ceca3eb8954b4.js.map
145699 bytes
0644
494.8cf705bc1ea509187c88.js
3796 bytes
0644
494.8cf705bc1ea509187c88.js.map
8987 bytes
0644
4958.cd447d877778fc5af081.js
4923 bytes
0644
4958.cd447d877778fc5af081.js.map
11000 bytes
0644
4962.0da526ad79f816a15985.js
2242 bytes
0644
4962.0da526ad79f816a15985.js.map
4978 bytes
0644
50.7b1e44d5b9dbbed566be.js
617497 bytes
0644
50.7b1e44d5b9dbbed566be.js.map
2271464 bytes
0644
5017.003cacead1bba1cba035.js
3567142 bytes
0644
5017.003cacead1bba1cba035.js.map
13214665 bytes
0644
5130.4d31108de97088a3b014.js
2850 bytes
0644
5130.4d31108de97088a3b014.js.map
6536 bytes
0644
5196.064b914693b6a5591a48.js
4035 bytes
0644
5196.064b914693b6a5591a48.js.map
10273 bytes
0644
5240.eceb5f73f807ac22d800.js
704 bytes
0644
5240.eceb5f73f807ac22d800.js.map
2618 bytes
0644
5277.ce6608b6f47246e32767.js
269 bytes
0644
5277.ce6608b6f47246e32767.js.map
457 bytes
0644
5280.4348c762594edebf7d0e.js
16657 bytes
0644
5280.4348c762594edebf7d0e.js.map
89146 bytes
0644
5356.eabc0dc2021a3814a65f.js
10156 bytes
0644
5356.eabc0dc2021a3814a65f.js.map
25249 bytes
0644
5358.7c5e9e1b192582f3082d.js
6173 bytes
0644
5358.7c5e9e1b192582f3082d.js.map
19652 bytes
0644
5364.ac21c32fd45a27bc998a.js
3070 bytes
0644
5364.ac21c32fd45a27bc998a.js.map
7368 bytes
0644
5398.d0c11aa7c1232f4afe44.js
81872 bytes
0644
5398.d0c11aa7c1232f4afe44.js.map
769414 bytes
0644
5428.e85b0800b30feca9d7dc.js
330175 bytes
0644
5428.e85b0800b30feca9d7dc.js.map
530929 bytes
0644
5511.93023985e5c5efe49ae2.js
21275 bytes
0644
5511.93023985e5c5efe49ae2.js.map
93188 bytes
0644
5550.9284e42acc3f2bbdfc9d.js
7039 bytes
0644
5550.9284e42acc3f2bbdfc9d.js.map
16382 bytes
0644
558.701e8b4db7b852c4a10d.js
12211 bytes
0644
558.701e8b4db7b852c4a10d.js.map
24505 bytes
0644
5618.638c32d58d896f3f7261.js
3348 bytes
0644
5618.638c32d58d896f3f7261.js.map
8181 bytes
0644
5648.cb3fd92dbbc06f7d45d2.js
57392 bytes
0644
5648.cb3fd92dbbc06f7d45d2.js.map
60585 bytes
0644
5786.db7abc3b8e4f474a8f7b.js
5325 bytes
0644
5786.db7abc3b8e4f474a8f7b.js.map
11885 bytes
0644
5807.f05d997ece5811bbc849.js
2922915 bytes
0644
5807.f05d997ece5811bbc849.js.map
10524334 bytes
0644
5950.30ec6aaa9dcece6c3b3c.js
4616249 bytes
0644
5950.30ec6aaa9dcece6c3b3c.js.map
19277501 bytes
0644
6018.f4de7ac19ac8f0c774e6.js
5861 bytes
0644
6018.f4de7ac19ac8f0c774e6.js.map
13314 bytes
0644
6029.0549a3fcb50e73c4b256.js
409895 bytes
0644
6029.0549a3fcb50e73c4b256.js.map
998408 bytes
0644
6185.883629fcc773b4968b24.js
2258 bytes
0644
6185.883629fcc773b4968b24.js.map
4788 bytes
0644
6263.e4ef9aaa3073ebacc3a5.js
54594 bytes
0644
6263.e4ef9aaa3073ebacc3a5.js.map
242030 bytes
0644
6302.257b2eb06c25ee74090e.js
8440 bytes
0644
6302.257b2eb06c25ee74090e.js.map
19322 bytes
0644
6359.f824c85233ec703f8cea.js
11411 bytes
0644
6359.f824c85233ec703f8cea.js.map
41881 bytes
0644
6377.45d36c143a694fc45bd3.js
20571 bytes
0644
6377.45d36c143a694fc45bd3.js.map
79590 bytes
0644
6378.27b1e6d863a0a3b85962.js
977993 bytes
0644
6378.27b1e6d863a0a3b85962.js.map
3865587 bytes
0644
6414.192cf271de6ecbbbcb11.js
3984 bytes
0644
6414.192cf271de6ecbbbcb11.js.map
9134 bytes
0644
6446.b4b93ee91aa1bb57ea93.js
7731 bytes
0644
6446.b4b93ee91aa1bb57ea93.js.map
17485 bytes
0644
6464.f379e014f9909e621de6.js
34429 bytes
0644
6464.f379e014f9909e621de6.js.map
113303 bytes
0644
6499.9f52e0855fd4782a8b45.js
78297 bytes
0644
6499.9f52e0855fd4782a8b45.js.map
273155 bytes
0644
6587.bfb1ca0c32c6f325b0df.js
135004 bytes
0644
6587.bfb1ca0c32c6f325b0df.js.map
541974 bytes
0644
660.838743295c2108f3492d.js
43101 bytes
0644
660.838743295c2108f3492d.js.map
100340 bytes
0644
6678.a615dbe07b8a3e591e66.js
14725 bytes
0644
6678.a615dbe07b8a3e591e66.js.map
51145 bytes
0644
680.1a328432fae403eacab3.js
53846 bytes
0644
680.1a328432fae403eacab3.js.map
57615 bytes
0644
6830.0c200fec1efc2be388e2.js
5811 bytes
0644
6830.0c200fec1efc2be388e2.js.map
13972 bytes
0644
6934.fa19d392db34411fb300.js
168944 bytes
0644
6934.fa19d392db34411fb300.js.map
540337 bytes
0644
6940.9c5d3a2dcf9d7d58fa2c.js
3408 bytes
0644
6940.9c5d3a2dcf9d7d58fa2c.js.map
8039 bytes
0644
6969.f8f153735314f9426000.js
1119 bytes
0644
6969.f8f153735314f9426000.js.map
4230 bytes
0644
6990.cc2f5674128929a3f870.js
4418 bytes
0644
6990.cc2f5674128929a3f870.js.map
10503 bytes
0644
7048.117de444b1e1cb5a1360.js
4365 bytes
0644
7048.117de444b1e1cb5a1360.js.map
10316 bytes
0644
7166.480da6892ee84ee8bb53.js
593985 bytes
0644
7166.480da6892ee84ee8bb53.js.map
2430098 bytes
0644
7200.dc60128b9d612fc7b5b0.js
3634 bytes
0644
7200.dc60128b9d612fc7b5b0.js.map
8184 bytes
0644
7246.3adf293a34fa2043387b.js
4306 bytes
0644
7246.3adf293a34fa2043387b.js.map
9084 bytes
0644
7400.024c96bd5b99b8b47a63.js
14112 bytes
0644
7400.024c96bd5b99b8b47a63.js.map
64001 bytes
0644
7409.24316c87d08c1053c46a.js
3287 bytes
0644
7409.24316c87d08c1053c46a.js.map
11649 bytes
0644
7455.845968885abe369e6479.js
19801 bytes
0644
7455.845968885abe369e6479.js.map
77213 bytes
0644
7466.09e6e197d2507f62097d.js
11670 bytes
0644
7466.09e6e197d2507f62097d.js.map
24830 bytes
0644
7515.95323f0dfbd0de010e5c.js
1083 bytes
0644
7515.95323f0dfbd0de010e5c.js.map
1321 bytes
0644
7613.6334cff4df12cc157522.js
808779 bytes
0644
7613.6334cff4df12cc157522.js.map
991378 bytes
0644
7836.6a7e4207e70fc2dc235f.js
7192 bytes
0644
7836.6a7e4207e70fc2dc235f.js.map
17613 bytes
0644
7882.1a3cc418752c83396970.js
3743 bytes
0644
7882.1a3cc418752c83396970.js.map
14950 bytes
0644
7886.485c46f14540aa23cf70.js
8668 bytes
0644
7886.485c46f14540aa23cf70.js.map
20124 bytes
0644
7914.2b1a06c504df18e20fe4.js
2390 bytes
0644
7914.2b1a06c504df18e20fe4.js.map
6418 bytes
0644
7982.6761217193d3060dbf0e.js
188973 bytes
0644
7982.6761217193d3060dbf0e.js.map
1737667 bytes
0644
8054.094788468423bb88ee68.js
38124 bytes
0644
8054.094788468423bb88ee68.js.map
132296 bytes
0644
8107.92bd414247a1d05c014f.js
5144 bytes
0644
8107.92bd414247a1d05c014f.js.map
15320 bytes
0644
8230.2eedae6021a4715c6dea.js
2413 bytes
0644
8230.2eedae6021a4715c6dea.js.map
5812 bytes
0644
8332.f4b05d2f028641445650.js
3177 bytes
0644
8332.f4b05d2f028641445650.js.map
7186 bytes
0644
8334.c95ec0eb6900c0cf7e89.js
7803 bytes
0644
8334.c95ec0eb6900c0cf7e89.js.map
17714 bytes
0644
8390.1fd9505094c8cf8830ab.js
2096 bytes
0644
8390.1fd9505094c8cf8830ab.js.map
5157 bytes
0644
84.a6f8658e6a033d642231.js
30608 bytes
0644
84.a6f8658e6a033d642231.js.map
142543 bytes
0644
8494.4470c87b7093ddf70db7.js
2180 bytes
0644
8494.4470c87b7093ddf70db7.js.map
4863 bytes
0644
8542.1391ab96a455b01963a7.js
1514 bytes
0644
8542.1391ab96a455b01963a7.js.map
3249 bytes
0644
8566.e05562713181c6ca30fe.js
3852 bytes
0644
8566.e05562713181c6ca30fe.js.map
8781 bytes
0644
8730.3dcdd8cbf22c63b45d78.js
2109 bytes
0644
8730.3dcdd8cbf22c63b45d78.js.map
2893 bytes
0644
8786.1b0e43b80c82c73e2096.js
1535 bytes
0644
8786.1b0e43b80c82c73e2096.js.map
4055 bytes
0644
8902.37d0b14aa6ef24687b7b.js
2673 bytes
0644
8902.37d0b14aa6ef24687b7b.js.map
5993 bytes
0644
8990.5a822b8788ebf0bdba81.js
3969 bytes
0644
8990.5a822b8788ebf0bdba81.js.map
9161 bytes
0644
9034.200fc7a09b466256c9a9.js
3486 bytes
0644
9034.200fc7a09b466256c9a9.js.map
8180 bytes
0644
9038.7ae2448b9cc5c423aeca.js
4937 bytes
0644
9038.7ae2448b9cc5c423aeca.js.map
11973 bytes
0644
9118.3121c6b96ec7dc211973.js
48311 bytes
0644
9118.3121c6b96ec7dc211973.js.map
62149 bytes
0644
9150.9eb62d45f9b21cb38850.js
10056 bytes
0644
9150.9eb62d45f9b21cb38850.js.map
21143 bytes
0644
9199.9897e268d6d13e834d4c.js
2307 bytes
0644
9199.9897e268d6d13e834d4c.js.map
8853 bytes
0644
9320.c403e78b78aa6df1d0bd.js
336139 bytes
0644
9320.c403e78b78aa6df1d0bd.js.map
1624993 bytes
0644
9355.421530b20c759bb75633.js
22098 bytes
0644
9355.421530b20c759bb75633.js.map
66961 bytes
0644
9384.a0d5fc49f1b15b3e311e.js
2855 bytes
0644
9384.a0d5fc49f1b15b3e311e.js.map
3717 bytes
0644
9390.fa2af7f3d3d9600c08ee.js
4201 bytes
0644
9390.fa2af7f3d3d9600c08ee.js.map
9682 bytes
0644
946.f2494c0c39a9590349b9.js
9194 bytes
0644
946.f2494c0c39a9590349b9.js.map
22193 bytes
0644
9510.4cfa85a51931dc20573a.js
2949 bytes
0644
9510.4cfa85a51931dc20573a.js.map
6939 bytes
0644
9521.de2a74ca5eb365810ca5.js
46306 bytes
0644
9521.de2a74ca5eb365810ca5.js.map
51040 bytes
0644
9538.996ade7a03ccdb01942d.js
64493 bytes
0644
9538.996ade7a03ccdb01942d.js.map
49212 bytes
0644
9569.a8d60b39654a160cb917.js
27965 bytes
0644
9569.a8d60b39654a160cb917.js.map
99160 bytes
0644
9643.b408884004ca73c102bc.js
627 bytes
0644
9643.b408884004ca73c102bc.js.map
2195 bytes
0644
968.22e079d28acb4131d34c.js
4001 bytes
0644
968.22e079d28acb4131d34c.js.map
9740 bytes
0644
970.a61e37b9b897c8098261.js
5239 bytes
0644
970.a61e37b9b897c8098261.js.map
13858 bytes
0644
9711.d6e977bd60f0e5ba673d.js
13555 bytes
0644
9711.d6e977bd60f0e5ba673d.js.map
43973 bytes
0644
9737.3340c89ea96d33307cc7.js
1001 bytes
0644
9737.3340c89ea96d33307cc7.js.map
3504 bytes
0644
9739.5a801055fcf72bf4d06f.js
1147 bytes
0644
9739.5a801055fcf72bf4d06f.js.map
4390 bytes
0644
9772.49e918c9331237552c0b.js
141 bytes
0644
9772.49e918c9331237552c0b.js.map
416 bytes
0644
9838.b8f01dc360f0c2151291.js
4003 bytes
0644
9838.b8f01dc360f0c2151291.js.map
8118 bytes
0644
AdminAuthentication.b7044adf53b669e61a87.js
22504 bytes
0644
AdminAuthentication.b7044adf53b669e61a87.js.map
67352 bytes
0644
AdminEditOrgPage.96fb6c37346641f44246.js
6369 bytes
0644
AdminEditOrgPage.96fb6c37346641f44246.js.map
20602 bytes
0644
AdminFeatureTogglesPage.22157fe31f358f1c4f09.js
4939 bytes
0644
AdminFeatureTogglesPage.22157fe31f358f1c4f09.js.map
16531 bytes
0644
AdminListOrgsPage.f01c8496fd635e20124b.js
2702 bytes
0644
AdminListOrgsPage.f01c8496fd635e20124b.js.map
7735 bytes
0644
AdminSettings.845c6def917892a0c1f9.js
1903 bytes
0644
AdminSettings.845c6def917892a0c1f9.js.map
5580 bytes
0644
AlertAmRoutes.10a0d9a23a082caf12c8.js
54554 bytes
0644
AlertAmRoutes.10a0d9a23a082caf12c8.js.map
208792 bytes
0644
AlertGroups.efd523dc41621f9f7935.js
10088 bytes
0644
AlertGroups.efd523dc41621f9f7935.js.map
39108 bytes
0644
AlertRuleListIndex.f0b17a6119cc5ea575ed.js
44623 bytes
0644
AlertRuleListIndex.f0b17a6119cc5ea575ed.js.map
156842 bytes
0644
AlertRuleListLegacy.8e675db4469232c87308.js
6270 bytes
0644
AlertRuleListLegacy.8e675db4469232c87308.js.map
18086 bytes
0644
AlertSilences.4ff252ad4c0057124d5d.js
24687 bytes
0644
AlertSilences.4ff252ad4c0057124d5d.js.map
83377 bytes
0644
AlertTabCtrl.d3377d127a336a69beb5.js
9844 bytes
0644
AlertTabCtrl.d3377d127a336a69beb5.js.map
27934 bytes
0644
AlertingAdmin.e62f9c73a69abe6a1ac0.js
10523 bytes
0644
AlertingAdmin.e62f9c73a69abe6a1ac0.js.map
37393 bytes
0644
AlertingFeatureTogglePage.f971bb7b2ad4ceb0acbd.js
672 bytes
0644
AlertingFeatureTogglePage.f971bb7b2ad4ceb0acbd.js.map
1220 bytes
0644
AlertingHome.0d6be993ef4a3df37345.js
33492 bytes
0644
AlertingHome.0d6be993ef4a3df37345.js.map
106868 bytes
0644
AlertingRedirectToRule.37a0040f89e20b99b751.js
3648 bytes
0644
AlertingRedirectToRule.37a0040f89e20b99b751.js.map
10875 bytes
0644
AlertingRuleForm.66bb5b2724b31ae6a5a4.js
79931 bytes
0644
AlertingRuleForm.66bb5b2724b31ae6a5a4.js.map
292923 bytes
0644
AlertingUpgrade.c757b99e306db50cdb16.js
31333 bytes
0644
AlertingUpgrade.c757b99e306db50cdb16.js.map
98330 bytes
0644
AngularApp.7e72879caebef22a5217.js
72809 bytes
0644
AngularApp.7e72879caebef22a5217.js.map
102853 bytes
0644
ApiKeysPage.12b0cd511f7b1e9c50dc.js
8422 bytes
0644
ApiKeysPage.12b0cd511f7b1e9c50dc.js.map
23375 bytes
0644
BenchmarksPage.3a183df3d44714f9a96a.js
2941 bytes
0644
BenchmarksPage.3a183df3d44714f9a96a.js.map
9749 bytes
0644
ChangePasswordPage.5e0562f6a9674bd95cfe.js
470 bytes
0644
ChangePasswordPage.5e0562f6a9674bd95cfe.js.map
1195 bytes
0644
Connections.b53c715b9b9a782d8647.js
32448 bytes
0644
Connections.b53c715b9b9a782d8647.js.map
112998 bytes
0644
CorrelationsFeatureToggle.71addced22f59948b708.js
674 bytes
0644
CorrelationsFeatureToggle.71addced22f59948b708.js.map
1149 bytes
0644
CorrelationsPage.4e02feddf752bdf7cfe6.js
22725 bytes
0644
CorrelationsPage.4e02feddf752bdf7cfe6.js.map
69262 bytes
0644
CreateTeam.dbde5b87278cf087cc5e.js
3046 bytes
0644
CreateTeam.dbde5b87278cf087cc5e.js.map
9594 bytes
0644
DashboardImport.06e6c4c03113061aae6c.js
18153 bytes
0644
DashboardImport.06e6c4c03113061aae6c.js.map
58242 bytes
0644
DashboardListPage.dac1fe75fbaa4f9b1c23.js
30967 bytes
0644
DashboardListPage.dac1fe75fbaa4f9b1c23.js.map
108517 bytes
0644
DashboardPage.5e50193556ad6b828f5d.js
2786 bytes
0644
DashboardPage.5e50193556ad6b828f5d.js.map
8754 bytes
0644
DashboardPageProxy.9a6d60e5cac89c11c71c.js
65136 bytes
0644
DashboardPageProxy.9a6d60e5cac89c11c71c.js.map
226791 bytes
0644
DataTrailsPage.aa19ca6750eb3f91ac5d.js
331 bytes
0644
DataTrailsPage.aa19ca6750eb3f91ac5d.js.map
582 bytes
0644
EditNotificationChannelLegacy.75122e6dbfb215d89d81.js
10507 bytes
0644
EditNotificationChannelLegacy.75122e6dbfb215d89d81.js.map
37444 bytes
0644
EmbeddedDashboard.3856404d3d608c739864.js
1768 bytes
0644
EmbeddedDashboard.3856404d3d608c739864.js.map
5917 bytes
0644
FolderAlerting.a0fe69e3574320c8a74a.js
9633 bytes
0644
FolderAlerting.a0fe69e3574320c8a74a.js.map
29985 bytes
0644
FolderLibraryPanelsPage.95dd7bf6735e202a79d2.js
8599 bytes
0644
FolderLibraryPanelsPage.95dd7bf6735e202a79d2.js.map
25919 bytes
0644
LibraryPanelsPage.4a952d4aa9c21984995a.js
2704 bytes
0644
LibraryPanelsPage.4a952d4aa9c21984995a.js.map
7623 bytes
0644
ListPublicDashboardPage.469a693c4011a5193fcd.js
4713 bytes
0644
ListPublicDashboardPage.469a693c4011a5193fcd.js.map
14309 bytes
0644
MuteTimings.cb66b37f52c9ee3ce1da.js
20855 bytes
0644
MuteTimings.cb66b37f52c9ee3ce1da.js.map
58932 bytes
0644
NewNotificationChannelLegacy.1d57814bc534bb1a3681.js
9785 bytes
0644
NewNotificationChannelLegacy.1d57814bc534bb1a3681.js.map
32951 bytes
0644
NewOrgPage.2bb0e1cab09f0cbd0310.js
1325 bytes
0644
NewOrgPage.2bb0e1cab09f0cbd0310.js.map
3158 bytes
0644
NotificationsListLegacyPage.33212668898a6db361a8.js
2547 bytes
0644
NotificationsListLegacyPage.33212668898a6db361a8.js.map
6671 bytes
0644
NotificationsListPage.1eb9cb05bf88eee08291.js
1620 bytes
0644
NotificationsListPage.1eb9cb05bf88eee08291.js.map
3378 bytes
0644
NotificationsPage.d26b90d7348139106351.js
4646 bytes
0644
NotificationsPage.d26b90d7348139106351.js.map
25381 bytes
0644
OrgDetailsPage.2d5c98f188683c2e1d3b.js
6742 bytes
0644
OrgDetailsPage.2d5c98f188683c2e1d3b.js.map
17850 bytes
0644
PlaylistEditPage.d14b3673a1bb03ca0dbb.js
6892 bytes
0644
PlaylistEditPage.d14b3673a1bb03ca0dbb.js.map
19989 bytes
0644
PlaylistNewPage.13696f39b95b8416ede2.js
6583 bytes
0644
PlaylistNewPage.13696f39b95b8416ede2.js.map
19084 bytes
0644
PlaylistPage.8f45dcc09add615f90e8.js
7895 bytes
0644
PlaylistPage.8f45dcc09add615f90e8.js.map
25502 bytes
0644
PlaylistStartPage.8be462b13a24cddee188.js
275 bytes
0644
PlaylistStartPage.8be462b13a24cddee188.js.map
698 bytes
0644
PluginListPage.815b65d32380d0a800f7.js
12167 bytes
0644
PluginListPage.815b65d32380d0a800f7.js.map
43537 bytes
0644
PluginPage.c790de5e17a0b728dd3a.js
314 bytes
0644
PluginPage.c790de5e17a0b728dd3a.js.map
668 bytes
0644
ProfileFeatureTogglePage.a14257ebc5da1e8c85e0.js
552 bytes
0644
ProfileFeatureTogglePage.a14257ebc5da1e8c85e0.js.map
1012 bytes
0644
PublicDashboardPage.51c7c24941781e091898.js
4295 bytes
0644
PublicDashboardPage.51c7c24941781e091898.js.map
14393 bytes
0644
SelectOrgPage.695c19a5101a3a03ee28.js
1124 bytes
0644
SelectOrgPage.695c19a5101a3a03ee28.js.map
2993 bytes
0644
SendResetMailPage.f16b7172a87070f57227.js
1736 bytes
0644
SendResetMailPage.f16b7172a87070f57227.js.map
4350 bytes
0644
ServerStats.3fbd2493deb8f4598755.js
3863 bytes
0644
ServerStats.3fbd2493deb8f4598755.js.map
11534 bytes
0644
ServiceAccountCreatePage.4f989fb6cd2a41193ff0.js
2440 bytes
0644
ServiceAccountCreatePage.4f989fb6cd2a41193ff0.js.map
7939 bytes
0644
ServiceAccountPage.bc7c35b63b03ccc89628.js
14806 bytes
0644
ServiceAccountPage.bc7c35b63b03ccc89628.js.map
51593 bytes
0644
ServiceAccountsPage.baaa08c045390c05e276.js
14565 bytes
0644
ServiceAccountsPage.baaa08c045390c05e276.js.map
46399 bytes
0644
SignupInvited.81ad56aceb8dd1839e15.js
2360 bytes
0644
SignupInvited.81ad56aceb8dd1839e15.js.map
6096 bytes
0644
SnapshotListPage.519c760ed66124a771ff.js
3061 bytes
0644
SnapshotListPage.519c760ed66124a771ff.js.map
9043 bytes
0644
SoloPanelPage.c729750a88c3fa90d1cc.js
3229 bytes
0644
SoloPanelPage.c729750a88c3fa90d1cc.js.map
12316 bytes
0644
SoloPanelPageOld.6518c21ccaf29701fa97.js
1727 bytes
0644
SoloPanelPageOld.6518c21ccaf29701fa97.js.map
5509 bytes
0644
StoragePage.9b93a99e75f7f2842c11.js
14081 bytes
0644
StoragePage.9b93a99e75f7f2842c11.js.map
48740 bytes
0644
SupportBundles.567d512b3f919b8112e4.js
3058 bytes
0644
SupportBundles.567d512b3f919b8112e4.js.map
8751 bytes
0644
SupportBundlesCreate.fc6b6e4cf6366f751081.js
2779 bytes
0644
SupportBundlesCreate.fc6b6e4cf6366f751081.js.map
8882 bytes
0644
TeamList.2e23d37c91734f608f09.js
9019 bytes
0644
TeamList.2e23d37c91734f608f09.js.map
30348 bytes
0644
TeamPages.4f6177b4c6ec769c72d8.js
22839 bytes
0644
TeamPages.4f6177b4c6ec769c72d8.js.map
66001 bytes
0644
TestStuffPage.8ddabdd17d265b771b17.js
2654 bytes
0644
TestStuffPage.8ddabdd17d265b771b17.js.map
8058 bytes
0644
UserCreatePage.72e86cf2c9a3ce50cff3.js
1470 bytes
0644
UserCreatePage.72e86cf2c9a3ce50cff3.js.map
3788 bytes
0644
UserInvitePage.c8243c9cee4b06e10222.js
2576 bytes
0644
UserInvitePage.c8243c9cee4b06e10222.js.map
6594 bytes
0644
UserListPage.acbb5778a782ca90c7ba.js
25463 bytes
0644
UserListPage.acbb5778a782ca90c7ba.js.map
79671 bytes
0644
UserProfileEditPage.7cc4c218d9e4664250e3.js
14593 bytes
0644
UserProfileEditPage.7cc4c218d9e4664250e3.js.map
42901 bytes
0644
UsersListPage.1b61c82d62ca416b6f2f.js
8800 bytes
0644
UsersListPage.1b61c82d62ca416b6f2f.js.map
30059 bytes
0644
alert-rules-drawer-content.1fd9de3b496d077a5f3a.js
957 bytes
0644
alert-rules-drawer-content.1fd9de3b496d077a5f3a.js.map
3199 bytes
0644
alert-rules-toolbar-button.6f275f0d03748b6c297d.js
1429 bytes
0644
alert-rules-toolbar-button.6f275f0d03748b6c297d.js.map
4041 bytes
0644
alertmanagerPlugin.d13ca72afb3f996bb284.js
3810 bytes
0644
alertmanagerPlugin.d13ca72afb3f996bb284.js.map
10753 bytes
0644
app.b11fde05d43f9632a473.js
920821 bytes
0644
app.b11fde05d43f9632a473.js.map
69088 bytes
0644
assets-manifest.json
280835 bytes
0644
azureMonitorPlugin.0bc37a9d4e3bd8421cc0.js
232 bytes
0644
azureMonitorPlugin.0bc37a9d4e3bd8421cc0.js.map
600 bytes
0644
brace.fcd4b1c7e8b9264ab02c.js
371235 bytes
0644
brace.fcd4b1c7e8b9264ab02c.js.map
1132097 bytes
0644
canvasPanel.a46aa5e57d26b1fcc380.js
485254 bytes
0644
canvasPanel.a46aa5e57d26b1fcc380.js.map
2136916 bytes
0644
cloudMonitoringPlugin.c6ea431eae8e9ad2c7b1.js
198 bytes
0644
cloudMonitoringPlugin.c6ea431eae8e9ad2c7b1.js.map
555 bytes
0644
cloudwatchPlugin.06ef34f60000c4f7ea37.js
192 bytes
0644
cloudwatchPlugin.06ef34f60000c4f7ea37.js.map
544 bytes
0644
dark.7fa24d1908c1c96e6fcc.js
134 bytes
0644
elasticsearchPlugin.3f2edb012f5162b48903.js
214 bytes
0644
elasticsearchPlugin.3f2edb012f5162b48903.js.map
583 bytes
0644
explore-feature-toggle-page.897d9f08c342ad4c0702.js
612 bytes
0644
explore-feature-toggle-page.897d9f08c342ad4c0702.js.map
1280 bytes
0644
explore.476912733278e2a99729.js
165810 bytes
0644
explore.476912733278e2a99729.js.map
579148 bytes
0644
geomapPanel.14b9605971a38c51d262.js
417078 bytes
0644
geomapPanel.14b9605971a38c51d262.js.map
540371 bytes
0644
grafana.dark.8c716fbcf630eae84ced.css
209089 bytes
0644
grafana.light.b8b3904788f25480f4a1.css
209047 bytes
0644
grafanaPlugin.1cb208185a89de28dc3a.js
8654 bytes
0644
grafanaPlugin.1cb208185a89de28dc3a.js.map
28174 bytes
0644
graphPlugin.f47f722cdfc0ceb85136.js
70277 bytes
0644
graphPlugin.f47f722cdfc0ceb85136.js.map
243430 bytes
0644
graphitePlugin.d59175976346917781fe.js
75305 bytes
0644
graphitePlugin.d59175976346917781fe.js.map
272016 bytes
0644
heatmapPanel.f6f29a53ed0f682b4404.js
37545 bytes
0644
heatmapPanel.f6f29a53ed0f682b4404.js.map
158066 bytes
0644
influxdbPlugin.140a7777089f9559c11c.js
68843 bytes
0644
influxdbPlugin.140a7777089f9559c11c.js.map
265085 bytes
0644
jaegerPlugin.d254fd4a19ef0cb5b4f5.js
19727 bytes
0644
jaegerPlugin.d254fd4a19ef0cb5b4f5.js.map
65603 bytes
0644
light.af65e5ce03b9ed0aa2b1.js
134 bytes
0644
loki-query-field.a588d587d9d762b18f22.js
191 bytes
0644
loki-query-field.a588d587d9d762b18f22.js.map
548 bytes
0644
lokiPlugin.77364509de280321b6f8.js
185 bytes
0644
lokiPlugin.77364509de280321b6f8.js.map
536 bytes
0644
mixedPlugin.f36bd557a883d9a67538.js
180 bytes
0644
mssqlPlugin.88775f59ced74c2283c5.js
20457 bytes
0644
mssqlPlugin.88775f59ced74c2283c5.js.map
61420 bytes
0644
mysqlPlugin.72fb44411afd8165d201.js
17323 bytes
0644
mysqlPlugin.72fb44411afd8165d201.js.map
45415 bytes
0644
nodeGraphPanel.9a7cdd8efdae281cbe28.js
2107 bytes
0644
nodeGraphPanel.9a7cdd8efdae281cbe28.js.map
7132 bytes
0644
opentsdbPlugin.418b8c8ea0d97ed99edb.js
22866 bytes
0644
opentsdbPlugin.418b8c8ea0d97ed99edb.js.map
82180 bytes
0644
parcaPlugin.7f2e6dde7161b08ceed2.js
11184 bytes
0644
parcaPlugin.7f2e6dde7161b08ceed2.js.map
42340 bytes
0644
postgresPlugin.f88c598bae2653ae177b.js
18902 bytes
0644
postgresPlugin.f88c598bae2653ae177b.js.map
54304 bytes
0644
prom-query-field.ff217c474ea457bdd65e.js
14104 bytes
0644
prom-query-field.ff217c474ea457bdd65e.js.map
76811 bytes
0644
prometheusPlugin.2ba02c28d3f7293e903e.js
224 bytes
0644
prometheusPlugin.2ba02c28d3f7293e903e.js.map
699 bytes
0644
pyroscopePlugin.eb14b78419d619d90dca.js
22269 bytes
0644
pyroscopePlugin.eb14b78419d619d90dca.js.map
86896 bytes
0644
react-monaco-editor.988b1aa5e90b11f9941a.js
15759 bytes
0644
react-monaco-editor.988b1aa5e90b11f9941a.js.map
51544 bytes
0644
runtime.4b7e1b5735d2ed64b824.js
13640 bytes
0644
runtime.4b7e1b5735d2ed64b824.js.map
35122 bytes
0644
tableOldPlugin.8c72b8399d197aeebe16.js
25242 bytes
0644
tableOldPlugin.8c72b8399d197aeebe16.js.map
80497 bytes
0644
tempoPlugin.efa8c2a55984263b4b61.js
182 bytes
0644
tempoPlugin.efa8c2a55984263b4b61.js.map
529 bytes
0644
testDataDSPlugin.9717509b124d754e4f35.js
120550 bytes
0644
testDataDSPlugin.9717509b124d754e4f35.js.map
303302 bytes
0644
visjs-network.d93b3aa71ac24c8cde84.js
459653 bytes
0644
visjs-network.d93b3aa71ac24c8cde84.js.map
1951742 bytes
0644
zipkinPlugin.70f0f24b6d0b6e673ccb.js
13172 bytes
0644
zipkinPlugin.70f0f24b6d0b6e673ccb.js.map
46861 bytes
0644
N4ST4R_ID | Naxtarrr