diff --git a/dist/MANIFEST.txt b/dist/MANIFEST.txt deleted file mode 100644 index 54fa137..0000000 --- a/dist/MANIFEST.txt +++ /dev/null @@ -1,89 +0,0 @@ - ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA512 - -{ - "manifestVersion": "2.0.0", - "signatureType": "commercial", - "signedByOrg": "tencentcloud", - "signedByOrgName": "Tencent", - "rootUrls": [], - "plugin": "tencentcloud-monitor-app", - "version": "2.9.1", - "time": 1701760807736, - "keyId": "7e4d0c6a708866e7", - "files": { - "datasource/config-editor/config.html": "110380b35165fcfcffa797ab6841e9621bf5135881fa5e94f5f316a0600b5796", - "datasource/tencentcloud-monitor-app-backend_darwin_amd64": "372c8c0dff6541903c06ff7c6849ab0bc882903feacaab772dbf0f575079029e", - "datasource/module.js.LICENSE.txt": "0ba9498d31b16c120f53a8cea32162412a0b69ce8d2707893df316676ba7675c", - "datasource/tencentcloud-monitor-app-backend_linux_arm64": "6c0bc328f38ec638f65312d7fb451526e7c5653b623e848b57c4da6417a3020d", - "datasource/module.js.map": "524f6b6fec76e09404f849c485835737646c281ee6cf105e708603c80d9cfec1", - "datasource/plugin.json": "e957f9742fdfb27c9fee720dda99ad1cccee57b5b3b4e135b09ae77d0f156ebc", - "datasource/img/tencent-cloud.svg": "572e1abf6d2a4be854845b55219e8d0661f79b325f0659b5439dddb37a304a8a", - "datasource/tencentcloud-monitor-app-backend_linux_arm": "1b4be8e714c5252fe65d5b11eceb9ec489926ff0e066ad6fe1068006f178a807", - "datasource/query-ctrl/partials/query.editor.html": "443d863f1d1c9295467da9a4290d16e9211699d034502b76605ebf41b61a4011", - "datasource/module.js": "9ce781c0424f853353eedcb4abf1a20076b3241c0fe05f3a1149e53ba23aeea5", - "datasource/tencentcloud-monitor-app-backend_windows_amd64.exe": "188fba88f14b37d966fdf8ccfd20bdead7c63d6204233ac973f5f437c7c012d2", - "datasource/tencentcloud-monitor-app-backend_linux_amd64": "c23e795111459db0f453d7f6c748dfdeefbc1ddeb4bfcf16d355275456c4477e", - "datasource/tencentcloud-monitor-app-backend_darwin_arm64": "8d05974d39861d05e19bd7da540629acc89f0e656ed1ed1ca7e26da95980784c", - "LICENSE": "7d90d87fbfbc9369eb627fd38811e01dfd955d72269d5039e7c6119372baa1e3", - "CHANGELOG.md": "0596a172e06ba90b28ef8887553a6e97320a3bd01f77d81e8b3face21c848163", - "module.js.map": "645ce8e78546b398f214e2b8e71bba1ce77da3ee992f8eba1685665c53753413", - "image/datasource-config.png": "e31ceec33c6454f6335850791f9b35fc2be56a4e43dfc11a75435e16f025dc0f", - "image/variable-region-config.png": "d46215b565d2b851855fb48bf7ee73ef696e3b8cfc671a376743faa39b193f3c", - "image/variable-panel-query.png": "e17f91280df34695d7be10b3e355b6c91d4b43404243529dc7e75d1f9a8605fa", - "image/variable-cvm-dashboard.png": "f97220e1230b83b0110f7e11468538b44c48d8b70906509f5153f8895ed02653", - "plugin.json": "82e354da125e0463499c6a61531d0611ce5433498892a3079a4d8e32986a7d30", - "README.md": "6510f9156c1d9198895cb8dcce1f137ac88292d0ce922c5f31bbb19af76e78c6", - "img/tencent-cloud.svg": "572e1abf6d2a4be854845b55219e8d0661f79b325f0659b5439dddb37a304a8a", - "components/config.js": "ee5816a2a21eaa0ddde461cb4d663b832e88911785cb7b9956062592670ee547", - "components/config.js.map": "9c9d1415b017930a19ae821743cdca306c06e2a97ec9ee02011c31cbbfdffc03", - "components/config.html": "851e7cf915df590befbe6a56bf9bf4a17083de46ef93246a0bc6214d7be13464", - "module.js": "677bba38a6613a8f2db11d9bf290dca90ac076ffa28eaf6767ebf975daa9fb45", - "dashboards/example_redis_mem_en_dashboard.json": "66bde7943e04a3a42048535206d273c303e345a6bf5d57e6a1bc818e8799d360", - "dashboards/example_logService_clb_en_dashboard.json": "c6545c6b884ed84851d0e933badcd79a55fc85c2baf8487135f63b1105083fa2", - "dashboards/example_lb_dashboard.json": "9884b63f52a1564a57edf79626dfee97f0e0e80bcaa321cffcf747054204ca43", - "dashboards/example_mongodb_en_dashboard.json": "8937b7b66fadaf1b64566604a3343928c9221de2b6d0ec3bb1aeefc3b0c70c4f", - "dashboards/example_ckafka_dashboard.json": "a177e119c2d90923d10d2658edb50a3870f4d19394a808f79f7e1f3c4cfd10bd", - "dashboards/example_scf_en_dashboard.json": "db7b244a149aea2773c881e66c8ff1bfd54c2a7457986d60ebdd73afe965016e", - "dashboards/example_lb_en_dashboard.json": "1d2e3839b3683947c6c2692f8fc28f2a4fa65933256d8fc1711954c6cef4fb6c", - "dashboards/example_dcx_en_dashboard.json": "69de0cf23b3079b8e029fe07e360209436615fb5c5674b2c56f74a0a8ddb602a", - "dashboards/example_bwp_dashboard.json": "89db15438917ea9e5a69e4f7a3e18539f0c06256e971b455dc05b3b56737355a", - "dashboards/example_ckafka_en_dashboard.json": "c02083e966a2d76c6b2552dd6c9a01d0bbaaac4168303c236939011dedcf705e", - "dashboards/example_redis_en_dashboard.json": "1c4d3e8d65225763902416fcd98f27a130022a98eeb2a8a32286a35326e88282", - "dashboards/example_cmq_dashboard.json": "36a13eea477572c7ef63452d9f5fca5ee4259ac1ba105b5eb72eeb857739b30a", - "dashboards/example_cdn_en_dashboard.json": "114531ce0637f8d88ea3d462c73e1c026cdeb14e476b41625f377783a9e384d4", - "dashboards/example_mongodb_dashboard.json": "5b5fc22ba99f38b0ddafb3d2b535701931c1639aa62327649c5d175ef759a7e1", - "dashboards/example_v_clb_en_dashboard.json": "9378cefb48800d49446c7f180f522353b3ea0a5518dca2b17ff9e193171df574", - "dashboards/example_cynosdbmysql_en_dashboard.json": "b9737ec7e2fb4486f205fc5705fefac9f3cf7a8ecc3fe269a1648721fdf4e648", - "dashboards/example_redis_dashboard.json": "2da6d48e4e8e2f5fc90104450eeda36a7fb8c5592e4e8084a9a32b8ba4a0b884", - "dashboards/example_cvm_en_dashboard.json": "57cb8d0d67d440bec305ff5488f6ed5875bec62d1a7f1a01a4cd82e0aacb0c53", - "dashboards/example_v_clb_dashboard.json": "ec85ab538113f3e59254b6c3d80ddcb5cceb7102fadcdb381737a97ec25555c2", - "dashboards/example_cdn_dashboard.json": "ce11214c93a084ba03b0dfbb2da9eacd44736b37cdd678987e4799a6d6532b51", - "dashboards/example_cfs_dashboard.json": "2cca9aec30be53ec1f03f56b256575c13464f929337b6ccb64a9bb9a5dbe0384", - "dashboards/example_scf_dashboard.json": "7ec87e2c78167ae7ecbee9a8912e26cca1f197762aa23181b6733cff25ef412c", - "dashboards/example_redis_mem_dashboard.json": "8eb8842db376346e52218a1e5076cea31048b735acde2f1db7f1aad19ad6920e", - "dashboards/example_cdb_en_dashboard.json": "4e03dbd139c17f84a8f973e7ab85ca0355f2b59918975360e0e5adb367bce4a2", - "dashboards/example_logService_clb_dashboard.json": "ed47ab0b24528d9e04916405ed28d9542c10be8bf5be6ebfe8de2ff3e008d828", - "dashboards/example_clb_dashboard.json": "1bd06988a16054d24d819458c5e5cf9e20af44dd07c55ad6eb8591d11df40764", - "dashboards/example_cynosdbmysql_dashboard.json": "758af9c6e2d2c55dd3a18cea65db9a3f2fb2a9a050839c2c50a2c79364593b31", - "dashboards/example_cmq_en_dashboard.json": "5478e6d925033037cc0a8c120177e7d1f4a6c3c4eb560e7f303f1c4dbf3fca0b", - "dashboards/example_cvm_dashboard.json": "5cc8bed866fe72ba8b73a97022e968d3273ccb610f39bee5610cd720a6dc3a45", - "dashboards/example_cfs_en_dashboard.json": "b50c7b03bd4ddc29ddb88a8ca06c5dc9fabf6ac59edd32e4a5790464d98cae4a", - "dashboards/example_cdb_dashboard.json": "5fe576893f98383d7d341787b13e91fa742cf4efbde89f75ccb6922c450cfce0", - "dashboards/example_dcx_dashboard.json": "9adb8cdf97119cafd8c0573af8071613984939544d4eb77cabd901146815ff04", - "dashboards/example_bwp_en_dashboard.json": "c85dffb8d9d4c699b86b731b20eccdf5a26f53a515ee44afd7129a70582f35b9", - "dashboards/example_clb_en_dashboard.json": "d04247d09a2cec7af766e95ad7e10c253f6a11681a47842376117653a083d21d" - } -} ------BEGIN PGP SIGNATURE----- -Version: OpenPGP.js v4.10.10 -Comment: https://openpgpjs.org - -wrkEARMKAAYFAmVuzygAIQkQfk0ManCIZucWIQTzOyW2kQdOhGNlcPN+TQxq -cIhm59kGAgkBpmLoNT52slSpBGhektTn4u8dtzHpGSlYWPOPLp2WKteZZsMB -w5TsgftoMwBqKxBRUI9TnxxB697oE7U/UxwyrrACCQGDLX2gpmrneYu9tKnX -5QlJWULtwc/hrzQ2ywRLzGTygU9nRVSuvR7FvRLVkb9Zn3/PbKkTfdM/fn19 -ehiWJ+pkQw== -=vU3l ------END PGP SIGNATURE----- diff --git a/dist/components/config.js b/dist/components/config.js index 629b36f..e38b9a4 100644 --- a/dist/components/config.js +++ b/dist/components/config.js @@ -1,37185 +1,2 @@ -define("TencentCloudMonitorGrafanaApp", ["@grafana/data","@grafana/runtime","app/core/core_module","lodash","moment"], function(__WEBPACK_EXTERNAL_MODULE__grafana_data__, __WEBPACK_EXTERNAL_MODULE__grafana_runtime__, __WEBPACK_EXTERNAL_MODULE_grafana_app_core_core_module__, __WEBPACK_EXTERNAL_MODULE_lodash__, __WEBPACK_EXTERNAL_MODULE_moment__) { return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); -/******/ } -/******/ }; -/******/ -/******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ -/******/ // create a fake namespace object -/******/ // mode & 1: value is a module id, require it -/******/ // mode & 2: merge all properties of value into the ns -/******/ // mode & 4: return value when already ns object -/******/ // mode & 8|1: behave like require -/******/ __webpack_require__.t = function(value, mode) { -/******/ if(mode & 1) value = __webpack_require__(value); -/******/ if(mode & 8) return value; -/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; -/******/ var ns = Object.create(null); -/******/ __webpack_require__.r(ns); -/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); -/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); -/******/ return ns; -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = "/"; -/******/ -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = "./components/config.ts"); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ "../node_modules/qs/lib/formats.js": -/*!*****************************************!*\ - !*** ../node_modules/qs/lib/formats.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var replace = String.prototype.replace; -var percentTwenties = /%20/g; - -module.exports = { - 'default': 'RFC3986', - formatters: { - RFC1738: function (value) { - return replace.call(value, percentTwenties, '+'); - }, - RFC3986: function (value) { - return value; - } - }, - RFC1738: 'RFC1738', - RFC3986: 'RFC3986' -}; - - -/***/ }), - -/***/ "../node_modules/qs/lib/index.js": -/*!***************************************!*\ - !*** ../node_modules/qs/lib/index.js ***! - \***************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var stringify = __webpack_require__(/*! ./stringify */ "../node_modules/qs/lib/stringify.js"); -var parse = __webpack_require__(/*! ./parse */ "../node_modules/qs/lib/parse.js"); -var formats = __webpack_require__(/*! ./formats */ "../node_modules/qs/lib/formats.js"); - -module.exports = { - formats: formats, - parse: parse, - stringify: stringify -}; - - -/***/ }), - -/***/ "../node_modules/qs/lib/parse.js": -/*!***************************************!*\ - !*** ../node_modules/qs/lib/parse.js ***! - \***************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var utils = __webpack_require__(/*! ./utils */ "../node_modules/qs/lib/utils.js"); - -var has = Object.prototype.hasOwnProperty; - -var defaults = { - allowDots: false, - allowPrototypes: false, - arrayLimit: 20, - decoder: utils.decode, - delimiter: '&', - depth: 5, - parameterLimit: 1000, - plainObjects: false, - strictNullHandling: false -}; - -var parseValues = function parseQueryStringValues(str, options) { - var obj = {}; - var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str; - var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit; - var parts = cleanStr.split(options.delimiter, limit); - - for (var i = 0; i < parts.length; ++i) { - var part = parts[i]; - - var bracketEqualsPos = part.indexOf(']='); - var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1; - - var key, val; - if (pos === -1) { - key = options.decoder(part, defaults.decoder); - val = options.strictNullHandling ? null : ''; - } else { - key = options.decoder(part.slice(0, pos), defaults.decoder); - val = options.decoder(part.slice(pos + 1), defaults.decoder); - } - if (has.call(obj, key)) { - obj[key] = [].concat(obj[key]).concat(val); - } else { - obj[key] = val; - } - } - - return obj; -}; - -var parseObject = function (chain, val, options) { - var leaf = val; - - for (var i = chain.length - 1; i >= 0; --i) { - var obj; - var root = chain[i]; - - if (root === '[]') { - obj = []; - obj = obj.concat(leaf); - } else { - obj = options.plainObjects ? Object.create(null) : {}; - var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root; - var index = parseInt(cleanRoot, 10); - if ( - !isNaN(index) - && root !== cleanRoot - && String(index) === cleanRoot - && index >= 0 - && (options.parseArrays && index <= options.arrayLimit) - ) { - obj = []; - obj[index] = leaf; - } else { - obj[cleanRoot] = leaf; - } - } - - leaf = obj; - } - - return leaf; -}; - -var parseKeys = function parseQueryStringKeys(givenKey, val, options) { - if (!givenKey) { - return; - } - - // Transform dot notation to bracket notation - var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey; - - // The regex chunks - - var brackets = /(\[[^[\]]*])/; - var child = /(\[[^[\]]*])/g; - - // Get the parent - - var segment = brackets.exec(key); - var parent = segment ? key.slice(0, segment.index) : key; - - // Stash the parent if it exists - - var keys = []; - if (parent) { - // If we aren't using plain objects, optionally prefix keys - // that would overwrite object prototype properties - if (!options.plainObjects && has.call(Object.prototype, parent)) { - if (!options.allowPrototypes) { - return; - } - } - - keys.push(parent); - } - - // Loop through children appending to the array until we hit depth - - var i = 0; - while ((segment = child.exec(key)) !== null && i < options.depth) { - i += 1; - if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) { - if (!options.allowPrototypes) { - return; - } - } - keys.push(segment[1]); - } - - // If there's a remainder, just add whatever is left - - if (segment) { - keys.push('[' + key.slice(segment.index) + ']'); - } - - return parseObject(keys, val, options); -}; - -module.exports = function (str, opts) { - var options = opts ? utils.assign({}, opts) : {}; - - if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') { - throw new TypeError('Decoder has to be a function.'); - } - - options.ignoreQueryPrefix = options.ignoreQueryPrefix === true; - options.delimiter = typeof options.delimiter === 'string' || utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter; - options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth; - options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit; - options.parseArrays = options.parseArrays !== false; - options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder; - options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots; - options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects; - options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes; - options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit; - options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; - - if (str === '' || str === null || typeof str === 'undefined') { - return options.plainObjects ? Object.create(null) : {}; - } - - var tempObj = typeof str === 'string' ? parseValues(str, options) : str; - var obj = options.plainObjects ? Object.create(null) : {}; - - // Iterate over the keys and setup the new object - - var keys = Object.keys(tempObj); - for (var i = 0; i < keys.length; ++i) { - var key = keys[i]; - var newObj = parseKeys(key, tempObj[key], options); - obj = utils.merge(obj, newObj, options); - } - - return utils.compact(obj); -}; - - -/***/ }), - -/***/ "../node_modules/qs/lib/stringify.js": -/*!*******************************************!*\ - !*** ../node_modules/qs/lib/stringify.js ***! - \*******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var utils = __webpack_require__(/*! ./utils */ "../node_modules/qs/lib/utils.js"); -var formats = __webpack_require__(/*! ./formats */ "../node_modules/qs/lib/formats.js"); - -var arrayPrefixGenerators = { - brackets: function brackets(prefix) { // eslint-disable-line func-name-matching - return prefix + '[]'; - }, - indices: function indices(prefix, key) { // eslint-disable-line func-name-matching - return prefix + '[' + key + ']'; - }, - repeat: function repeat(prefix) { // eslint-disable-line func-name-matching - return prefix; - } -}; - -var toISO = Date.prototype.toISOString; - -var defaults = { - delimiter: '&', - encode: true, - encoder: utils.encode, - encodeValuesOnly: false, - serializeDate: function serializeDate(date) { // eslint-disable-line func-name-matching - return toISO.call(date); - }, - skipNulls: false, - strictNullHandling: false -}; - -var stringify = function stringify( // eslint-disable-line func-name-matching - object, - prefix, - generateArrayPrefix, - strictNullHandling, - skipNulls, - encoder, - filter, - sort, - allowDots, - serializeDate, - formatter, - encodeValuesOnly -) { - var obj = object; - if (typeof filter === 'function') { - obj = filter(prefix, obj); - } else if (obj instanceof Date) { - obj = serializeDate(obj); - } else if (obj === null) { - if (strictNullHandling) { - return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder) : prefix; - } - - obj = ''; - } - - if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || utils.isBuffer(obj)) { - if (encoder) { - var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder); - return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder))]; - } - return [formatter(prefix) + '=' + formatter(String(obj))]; - } - - var values = []; - - if (typeof obj === 'undefined') { - return values; - } - - var objKeys; - if (Array.isArray(filter)) { - objKeys = filter; - } else { - var keys = Object.keys(obj); - objKeys = sort ? keys.sort(sort) : keys; - } - - for (var i = 0; i < objKeys.length; ++i) { - var key = objKeys[i]; - - if (skipNulls && obj[key] === null) { - continue; - } - - if (Array.isArray(obj)) { - values = values.concat(stringify( - obj[key], - generateArrayPrefix(prefix, key), - generateArrayPrefix, - strictNullHandling, - skipNulls, - encoder, - filter, - sort, - allowDots, - serializeDate, - formatter, - encodeValuesOnly - )); - } else { - values = values.concat(stringify( - obj[key], - prefix + (allowDots ? '.' + key : '[' + key + ']'), - generateArrayPrefix, - strictNullHandling, - skipNulls, - encoder, - filter, - sort, - allowDots, - serializeDate, - formatter, - encodeValuesOnly - )); - } - } - - return values; -}; - -module.exports = function (object, opts) { - var obj = object; - var options = opts ? utils.assign({}, opts) : {}; - - if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') { - throw new TypeError('Encoder has to be a function.'); - } - - var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter; - var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; - var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls; - var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode; - var encoder = typeof options.encoder === 'function' ? options.encoder : defaults.encoder; - var sort = typeof options.sort === 'function' ? options.sort : null; - var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots; - var serializeDate = typeof options.serializeDate === 'function' ? options.serializeDate : defaults.serializeDate; - var encodeValuesOnly = typeof options.encodeValuesOnly === 'boolean' ? options.encodeValuesOnly : defaults.encodeValuesOnly; - if (typeof options.format === 'undefined') { - options.format = formats['default']; - } else if (!Object.prototype.hasOwnProperty.call(formats.formatters, options.format)) { - throw new TypeError('Unknown format option provided.'); - } - var formatter = formats.formatters[options.format]; - var objKeys; - var filter; - - if (typeof options.filter === 'function') { - filter = options.filter; - obj = filter('', obj); - } else if (Array.isArray(options.filter)) { - filter = options.filter; - objKeys = filter; - } - - var keys = []; - - if (typeof obj !== 'object' || obj === null) { - return ''; - } - - var arrayFormat; - if (options.arrayFormat in arrayPrefixGenerators) { - arrayFormat = options.arrayFormat; - } else if ('indices' in options) { - arrayFormat = options.indices ? 'indices' : 'repeat'; - } else { - arrayFormat = 'indices'; - } - - var generateArrayPrefix = arrayPrefixGenerators[arrayFormat]; - - if (!objKeys) { - objKeys = Object.keys(obj); - } - - if (sort) { - objKeys.sort(sort); - } - - for (var i = 0; i < objKeys.length; ++i) { - var key = objKeys[i]; - - if (skipNulls && obj[key] === null) { - continue; - } - - keys = keys.concat(stringify( - obj[key], - key, - generateArrayPrefix, - strictNullHandling, - skipNulls, - encode ? encoder : null, - filter, - sort, - allowDots, - serializeDate, - formatter, - encodeValuesOnly - )); - } - - var joined = keys.join(delimiter); - var prefix = options.addQueryPrefix === true ? '?' : ''; - - return joined.length > 0 ? prefix + joined : ''; -}; - - -/***/ }), - -/***/ "../node_modules/qs/lib/utils.js": -/*!***************************************!*\ - !*** ../node_modules/qs/lib/utils.js ***! - \***************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var has = Object.prototype.hasOwnProperty; - -var hexTable = (function () { - var array = []; - for (var i = 0; i < 256; ++i) { - array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase()); - } - - return array; -}()); - -var compactQueue = function compactQueue(queue) { - var obj; - - while (queue.length) { - var item = queue.pop(); - obj = item.obj[item.prop]; - - if (Array.isArray(obj)) { - var compacted = []; - - for (var j = 0; j < obj.length; ++j) { - if (typeof obj[j] !== 'undefined') { - compacted.push(obj[j]); - } - } - - item.obj[item.prop] = compacted; - } - } - - return obj; -}; - -var arrayToObject = function arrayToObject(source, options) { - var obj = options && options.plainObjects ? Object.create(null) : {}; - for (var i = 0; i < source.length; ++i) { - if (typeof source[i] !== 'undefined') { - obj[i] = source[i]; - } - } - - return obj; -}; - -var merge = function merge(target, source, options) { - if (!source) { - return target; - } - - if (typeof source !== 'object') { - if (Array.isArray(target)) { - target.push(source); - } else if (typeof target === 'object') { - if (options.plainObjects || options.allowPrototypes || !has.call(Object.prototype, source)) { - target[source] = true; - } - } else { - return [target, source]; - } - - return target; - } - - if (typeof target !== 'object') { - return [target].concat(source); - } - - var mergeTarget = target; - if (Array.isArray(target) && !Array.isArray(source)) { - mergeTarget = arrayToObject(target, options); - } - - if (Array.isArray(target) && Array.isArray(source)) { - source.forEach(function (item, i) { - if (has.call(target, i)) { - if (target[i] && typeof target[i] === 'object') { - target[i] = merge(target[i], item, options); - } else { - target.push(item); - } - } else { - target[i] = item; - } - }); - return target; - } - - return Object.keys(source).reduce(function (acc, key) { - var value = source[key]; - - if (has.call(acc, key)) { - acc[key] = merge(acc[key], value, options); - } else { - acc[key] = value; - } - return acc; - }, mergeTarget); -}; - -var assign = function assignSingleSource(target, source) { - return Object.keys(source).reduce(function (acc, key) { - acc[key] = source[key]; - return acc; - }, target); -}; - -var decode = function (str) { - try { - return decodeURIComponent(str.replace(/\+/g, ' ')); - } catch (e) { - return str; - } -}; - -var encode = function encode(str) { - // This code was originally written by Brian White (mscdex) for the io.js core querystring library. - // It has been adapted here for stricter adherence to RFC 3986 - if (str.length === 0) { - return str; - } - - var string = typeof str === 'string' ? str : String(str); - - var out = ''; - for (var i = 0; i < string.length; ++i) { - var c = string.charCodeAt(i); - - if ( - c === 0x2D // - - || c === 0x2E // . - || c === 0x5F // _ - || c === 0x7E // ~ - || (c >= 0x30 && c <= 0x39) // 0-9 - || (c >= 0x41 && c <= 0x5A) // a-z - || (c >= 0x61 && c <= 0x7A) // A-Z - ) { - out += string.charAt(i); - continue; - } - - if (c < 0x80) { - out = out + hexTable[c]; - continue; - } - - if (c < 0x800) { - out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); - continue; - } - - if (c < 0xD800 || c >= 0xE000) { - out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); - continue; - } - - i += 1; - c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); - out += hexTable[0xF0 | (c >> 18)] - + hexTable[0x80 | ((c >> 12) & 0x3F)] - + hexTable[0x80 | ((c >> 6) & 0x3F)] - + hexTable[0x80 | (c & 0x3F)]; - } - - return out; -}; - -var compact = function compact(value) { - var queue = [{ obj: { o: value }, prop: 'o' }]; - var refs = []; - - for (var i = 0; i < queue.length; ++i) { - var item = queue[i]; - var obj = item.obj[item.prop]; - - var keys = Object.keys(obj); - for (var j = 0; j < keys.length; ++j) { - var key = keys[j]; - var val = obj[key]; - if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) { - queue.push({ obj: obj, prop: key }); - refs.push(val); - } - } - } - - return compactQueue(queue); -}; - -var isRegExp = function isRegExp(obj) { - return Object.prototype.toString.call(obj) === '[object RegExp]'; -}; - -var isBuffer = function isBuffer(obj) { - if (obj === null || typeof obj === 'undefined') { - return false; - } - - return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); -}; - -module.exports = { - arrayToObject: arrayToObject, - assign: assign, - compact: compact, - decode: decode, - encode: encode, - isBuffer: isBuffer, - isRegExp: isRegExp, - merge: merge -}; - - -/***/ }), - -/***/ "./components/config.ts": -/*!******************************!*\ - !*** ./components/config.ts ***! - \******************************/ -/*! exports provided: MonitorAppConfigCtrl */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MonitorAppConfigCtrl", function() { return MonitorAppConfigCtrl; }); -/* harmony import */ var _grafana_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @grafana/runtime */ "@grafana/runtime"); -/* harmony import */ var _grafana_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_grafana_runtime__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _datasource_common_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../datasource/common/constants */ "./datasource/common/constants.ts"); -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - -var backendSrv = Object(_grafana_runtime__WEBPACK_IMPORTED_MODULE_0__["getBackendSrv"])(); -var tcFolder = { - uid: 'tencent-cloud-monitor', - title: '腾讯云监控', - folderId: null -}; -var tcFolder_EN = { - uid: 'tencent-cloud-monitor-english', - title: 'Tencent Cloud Monitor', - folderId: null -}; -/** - * 生成腾讯云专用目录 - * @returns - */ - -function getFolderId() { - var _a, _b; - - return __awaiter(this, void 0, void 0, function () { - var folders, folderId, folderEnId, folder, folderEn; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - if (tcFolder.folderId && tcFolder_EN.folderId) { - return [2 - /*return*/ - , [tcFolder.folderId, tcFolder_EN.folderId]]; - } - - return [4 - /*yield*/ - , backendSrv.get('/api/folders')]; - - case 1: - folders = _c.sent(); - folderId = (_a = folders.find(function (item) { - return item.uid === tcFolder.uid; - })) === null || _a === void 0 ? void 0 : _a.id; - folderEnId = (_b = folders.find(function (item) { - return item.uid === tcFolder_EN.uid; - })) === null || _b === void 0 ? void 0 : _b.id; - if (!!folderId) return [3 - /*break*/ - , 3]; - return [4 - /*yield*/ - , backendSrv.post('/api/folders', tcFolder)]; - - case 2: - folder = _c.sent(); - folderId = (folder === null || folder === void 0 ? void 0 : folder.id) || 0; - _c.label = 3; - - case 3: - if (!!folderEnId) return [3 - /*break*/ - , 5]; - return [4 - /*yield*/ - , backendSrv.post('/api/folders', tcFolder_EN)]; - - case 4: - folderEn = _c.sent(); - folderEnId = (folderEn === null || folderEn === void 0 ? void 0 : folderEn.id) || 0; - _c.label = 5; - - case 5: - tcFolder.folderId = folderId; - tcFolder_EN.folderId = folderEnId; - return [2 - /*return*/ - , [folderId, folderEnId]]; - } - }); - }); -} -/** - * 请求拦截器,拦截导入按钮的接口请求 - */ - - -function backendInterceptor() { - var _this = this; - - var oldPost = backendSrv.post.bind(Object(_grafana_runtime__WEBPACK_IMPORTED_MODULE_0__["getBackendSrv"])()); - var pluginId = window.location.pathname.split('/').filter(function (item) { - return item; - })[1]; - - backendSrv.post = function (url, data) { - return __awaiter(_this, void 0, void 0, function () { - var _a, folderId, folderEnId; - - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - if (!(url === '/api/dashboards/import' && data.pluginId === pluginId)) return [3 - /*break*/ - , 2]; - return [4 - /*yield*/ - , getFolderId()]; - - case 1: - _a = _b.sent(), folderId = _a[0], folderEnId = _a[1]; - data.folderId = data.path.endsWith('_en_dashboard.json') ? folderEnId : folderId; - _b.label = 2; - - case 2: - return [2 - /*return*/ - , oldPost(url, data)]; - } - }); - }); - }; -} - -backendInterceptor(); - -var MonitorAppConfigCtrl = -/** @class */ -function () { - MonitorAppConfigCtrl.$inject = ["$scope", "$injector", "$q"]; - - /** @ngInject */ - function MonitorAppConfigCtrl($scope, $injector, $q) { - var _a; - - this.appEditCtrl.setPostUpdateHook(this.postUpdate.bind(this)); - this.$q = $q; // Make sure it has a JSON Data spot - - if (!this.appModel) { - // eslint-disable-next-line @typescript-eslint/consistent-type-assertions - this.appModel = {}; - } // Required until we get the types sorted on appModel :( - - - var appModel = this.appModel; - - if (!appModel.jsonData) { - appModel.jsonData = {}; - } - - this.configured = false; - - if ((_a = this.appModel) === null || _a === void 0 ? void 0 : _a.enabled) { - var datasources = Object.values(_grafana_runtime__WEBPACK_IMPORTED_MODULE_0__["config"].datasources).filter(function (ds) { - return ds.type === _datasource_common_constants__WEBPACK_IMPORTED_MODULE_1__["TcDataSourceId"]; - }); - - if (datasources.length > 0) { - this.configured = true; - } - } - } - - MonitorAppConfigCtrl.prototype.moveToFolder = function (dashbaordUid, folderId) { - return __awaiter(this, void 0, void 0, function () { - var dashboard; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - return [4 - /*yield*/ - , backendSrv.get("/api/dashboards/uid/".concat(dashbaordUid))]; - - case 1: - dashboard = _a.sent().dashboard; // 移动目录 - - return [4 - /*yield*/ - , backendSrv.post('/api/dashboards/db/', { - dashboard: dashboard, - folderId: folderId, - message: '', - overwrite: true - })]; - - case 2: - // 移动目录 - _a.sent(); - - return [2 - /*return*/ - ]; - } - }); - }); - }; - - MonitorAppConfigCtrl.prototype.reviseDashboard = function () { - var _a; - - return __awaiter(this, void 0, void 0, function () { - var _b, folderId, folderEnId, rs, pmlist; - - var _this = this; - - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - return [4 - /*yield*/ - , getFolderId()]; - - case 1: - _b = _c.sent(), folderId = _b[0], folderEnId = _b[1]; - return [4 - /*yield*/ - , backendSrv.get("/api/plugins/".concat((_a = this.appModel) === null || _a === void 0 ? void 0 : _a.id, "/dashboards"))]; - - case 2: - rs = _c.sent(); - pmlist = rs.map(function (item) { - var importedUrl = item.importedUrl, - path = item.path; - var uid = importedUrl.split('/')[2]; - - if (uid) { - return _this.moveToFolder(uid, path.endsWith('_en_dashboard.json') ? folderEnId : folderId); - } else { - return Promise.resolve(); - } - }); - return [2 - /*return*/ - , Promise.all(pmlist)]; - } - }); - }); - }; - - MonitorAppConfigCtrl.prototype.postUpdate = function () { - var _a; - - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - if (!((_a = this.appModel) === null || _a === void 0 ? void 0 : _a.enabled)) { - return [2 - /*return*/ - ]; - } // enable或者update时,对预设dashboard进行修改 - - - return [4 - /*yield*/ - , this.reviseDashboard()]; - - case 1: - // enable或者update时,对预设dashboard进行修改 - _b.sent(); - - return [2 - /*return*/ - , this.$q.resolve(true)]; - } - }); - }); - }; - - MonitorAppConfigCtrl.templateUrl = 'components/config.html'; - return MonitorAppConfigCtrl; -}(); - - - -/***/ }), - -/***/ "./datasource/common/constants.ts": -/*!****************************************!*\ - !*** ./datasource/common/constants.ts ***! - \****************************************/ -/*! exports provided: TcDataSourceId, GetServiceAPIInfo, VARIABLE_ALIAS, GetServiceFromNamespace, GetLabelFromNamespace, ParseMetricQuery, ParseMetricRegex, ReplaceVariable, GetDimensions, ParseQueryResult, isVariable, GetRequestParams, GetRequestParamsV2, SliceLength, FilterKeys, parseDataFromBackendPlugin, IS_DEVELOPMENT_ENVIRONMENT, CoreApp */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TcDataSourceId", function() { return TcDataSourceId; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GetServiceAPIInfo", function() { return GetServiceAPIInfo; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VARIABLE_ALIAS", function() { return VARIABLE_ALIAS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GetServiceFromNamespace", function() { return GetServiceFromNamespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GetLabelFromNamespace", function() { return GetLabelFromNamespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ParseMetricQuery", function() { return ParseMetricQuery; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ParseMetricRegex", function() { return ParseMetricRegex; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReplaceVariable", function() { return ReplaceVariable; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GetDimensions", function() { return GetDimensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ParseQueryResult", function() { return ParseQueryResult; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isVariable", function() { return isVariable; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GetRequestParams", function() { return GetRequestParams; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GetRequestParamsV2", function() { return GetRequestParamsV2; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SliceLength", function() { return SliceLength; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FilterKeys", function() { return FilterKeys; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseDataFromBackendPlugin", function() { return parseDataFromBackendPlugin; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IS_DEVELOPMENT_ENVIRONMENT", function() { return IS_DEVELOPMENT_ENVIRONMENT; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CoreApp", function() { return CoreApp; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! qs */ "../node_modules/qs/lib/index.js"); -/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _tc_monitor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../tc_monitor */ "./datasource/tc_monitor/index.ts"); -/* harmony import */ var _sign__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./sign */ "./datasource/common/sign.ts"); -/* harmony import */ var _signV2__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./signV2 */ "./datasource/common/signV2.ts"); -/* harmony import */ var _grafana_runtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @grafana/runtime */ "@grafana/runtime"); -/* harmony import */ var _grafana_runtime__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_grafana_runtime__WEBPACK_IMPORTED_MODULE_5__); -/* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../locale */ "./locale/index.ts"); -/* harmony import */ var _plugin_json__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../plugin.json */ "./datasource/plugin.json"); -var _plugin_json__WEBPACK_IMPORTED_MODULE_7___namespace = /*#__PURE__*/__webpack_require__.t(/*! ../plugin.json */ "./datasource/plugin.json", 1); -var __assign = undefined && undefined.__assign || function () { - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - } - - return t; - }; - - return __assign.apply(this, arguments); -}; - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - -var __rest = undefined && undefined.__rest || function (s, e) { - var t = {}; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; - } - - if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; - } - return t; -}; - - - - - - - - - -var TcDataSourceId = _plugin_json__WEBPACK_IMPORTED_MODULE_7__.id; // the services of tencentcloud monitor api - -var FINACE_REGIONS = ['ap-shanghai-fsi', 'ap-shenzhen-fsi']; -var SERVICES_API_INFO = { - api: { - service: 'api', - version: '2020-11-06', - path: '/api', - host: 'api.tencentcloudapi.com' - }, - // monitor api info - monitor: { - service: 'monitor', - version: '2018-07-24', - path: '/monitor', - host: 'monitor.tencentcloudapi.com' - }, - // cls api info - cls: { - service: 'cls', - version: '2020-10-16', - path: '/cls', - host: 'cls.tencentcloudapi.com' - }, - // cvm api info - cvm: { - service: 'cvm', - version: '2017-03-12', - path: '/cvm', - host: 'cvm.tencentcloudapi.com' - }, - // cdb api info - cdb: { - service: 'cdb', - version: '2017-03-20', - path: '/cdb', - host: 'cdb.tencentcloudapi.com' - }, - // pcx api info - pcx: { - service: 'pcx', - version: '', - path: '/pcx', - host: 'vpc.api.qcloud.com' - }, - // vpc api info - vpc: { - service: 'vpc', - version: '2017-03-12', - path: '/vpc', - host: 'vpc.tencentcloudapi.com' - }, - // mongodb api info - mongodb: { - service: 'mongodb', - version: '2019-07-25', - path: '/mongodb', - host: 'mongodb.tencentcloudapi.com' - }, - // 负载均衡 clb - clb: { - service: 'clb', - version: '2018-03-17', - path: '/clb', - host: 'clb.tencentcloudapi.com' - }, - // postgresql api info - postgres: { - service: 'postgres', - version: '2017-03-12', - path: '/postgres', - host: 'postgres.tencentcloudapi.com' - }, - // cdn info - cdn: { - service: 'cdn', - version: '2018-06-06', - path: '/cdn', - host: 'cdn.tencentcloudapi.com' - }, - // redis info - redis: { - service: 'redis', - version: '2018-04-12', - path: '/redis', - host: 'redis.tencentcloudapi.com' - }, - scf: { - service: 'scf', - version: '2018-04-16', - path: '/scf', - host: 'scf.tencentcloudapi.com' - }, - cfs: { - service: 'cfs', - version: '2019-07-19', - path: '/cfs', - host: 'cfs.tencentcloudapi.com' - }, - ckafka: { - service: 'ckafka', - version: '2019-08-19', - path: '/ckafka', - host: 'ckafka.tencentcloudapi.com' - }, - // 专线接入实例列表 - dc: { - service: 'dc', - version: '2018-04-10', - path: '/dc', - host: 'dc.tencentcloudapi.com' - }, - // cynosdb实例列表 - cynosdb: { - service: 'cynosdb', - version: '2019-01-07', - path: '/cynosdb', - host: 'cynosdb.tencentcloudapi.com' - }, - // sqlserver实例列表 - sqlserver: { - service: 'sqlserver', - version: '2018-03-28', - path: '/sqlserver', - host: 'sqlserver.tencentcloudapi.com' - }, - // bm实例列表 - bm: { - service: 'bm', - version: '2018-04-23', - path: '/bm', - host: 'bm.tencentcloudapi.com' - }, - bmeip: { - service: 'bmeip', - version: '2018-06-25', - path: '/bmeip', - host: 'bmeip.tencentcloudapi.com' - }, - bmvpc: { - service: 'bmvpc', - version: '2018-06-25', - path: '/bmvpc', - host: 'bmvpc.tencentcloudapi.com' - }, - bmlb: { - service: 'bmlb', - version: '2018-06-25', - path: '/bmlb', - host: 'bmlb.tencentcloudapi.com' - }, - // ES集群实例 - es: { - service: 'es', - version: '2018-04-16', - path: '/es', - host: 'es.tencentcloudapi.com' - }, - // MapReduce - emr: { - service: 'emr', - version: '2019-01-03', - path: '/emr', - host: 'emr.tencentcloudapi.com' - }, - // CMQ消息队列 - cmq: { - service: 'cmq', - version: '2019-03-04', - path: '/cmq', - host: 'cmq.tencentcloudapi.com' - }, - cbs: { - service: 'cbs', - version: '2017-03-12', - path: '/cbs', - host: 'cbs.tencentcloudapi.com' - }, - // tcaplus实例 - tcaplusdb: { - service: 'tcaplusdb', - version: '2019-08-23', - path: '/tcaplusdb', - host: 'tcaplusdb.tencentcloudapi.com' - }, - // tcaplus实例 - dcdb: { - service: 'dcdb', - version: '2018-04-11', - path: '/dcdb', - host: 'dcdb.tencentcloudapi.com' - }, - // apigateway实例 - apigateway: { - service: 'apigateway', - version: '2018-08-08', - path: '/apigateway', - host: 'apigateway.tencentcloudapi.com' - }, - tdmq: { - service: 'tdmq', - version: '2020-02-17', - path: '/tdmq', - host: 'tdmq.tencentcloudapi.com' - }, - tdmq_rabbitmq: { - service: 'tdmq', - version: '2020-02-17', - path: '/tdmq', - host: 'tdmq.tencentcloudapi.com' - }, - tdmq_rocketmq: { - service: 'tdmq', - version: '2020-02-17', - path: '/tdmq', - host: 'tdmq.tencentcloudapi.com' - }, - gaap: { - service: 'gaap', - version: '2018-05-29', - path: '/gaap', - host: 'gaap.tencentcloudapi.com' - }, - ecm: { - service: 'ecm', - version: '2019-07-19', - path: '/ecm', - host: 'ecm.tencentcloudapi.com' - }, - gse: { - service: 'gse', - version: '2019-11-12', - path: '/gse', - host: 'gse.tencentcloudapi.com' - }, - lighthouse: { - service: 'lighthouse', - version: '2020-03-24', - path: '/lighthouse', - host: 'lighthouse.tencentcloudapi.com' - }, - tsf: { - service: 'tsf', - version: '2018-03-26', - path: '/tsf', - host: 'tsf.tencentcloudapi.com' - }, - rum: { - service: 'rum', - version: '2021-06-22', - path: '/rum', - host: 'rum.tencentcloudapi.com' - }, - tke: { - service: 'tke', - version: '2018-05-25', - path: '/tke', - host: 'tke.tencentcloudapi.com' - }, - ecdn: { - service: 'ecdn', - version: '2019-10-12', - path: '/ecdn', - host: 'ecdn.tencentcloudapi.com' - }, - waf: { - service: 'waf', - version: '2018-01-25', - path: '/waf', - host: 'waf.tencentcloudapi.com' - }, - region: { - service: 'region', - version: '2022-06-27', - path: '/region', - host: 'region.tencentcloudapi.com' - }, - apm: { - service: 'apm', - version: '2021-06-22', - path: '/apm', - host: 'apm.tencentcloudapi.com' - } // 不单独定义lb,因为lb同样用的是vpc的配置,同上 - // lb: { - // service: 'lb', - // version: '2017-03-12', - // path: '/lb', - // host: 'vpc.tencentcloudapi.com' - // } - // 负载均衡四层协议 lbPrivate - // lbPrivate: { - // service: 'lbPrivate', - // version: '2018-03-17', - // path: '/clb', - // host: 'clb.tencentcloudapi.com', - // }, - -}; -var FINACE_HOST = { - scf: { - 'ap-shanghai-fsi': { - path: '/fsi/scf/shanghai', - host: 'scf.ap-shanghai-fsi.tencentcloudapi.com' - }, - 'ap-shenzhen-fsi': { - path: '/fsi/scf/shenzhen', - host: 'scf.ap-shenzhen-fsi.tencentcloudapi.com' - } - }, - cfs: { - 'ap-shanghai-fsi': { - path: '/fsi/cfs/shanghai', - host: 'cfs.ap-shanghai-fsi.tencentcloudapi.com' - }, - 'ap-shenzhen-fsi': { - path: '/fsi/cfs/shenzhen', - host: 'cfs.ap-shenzhen-fsi.tencentcloudapi.com' - } - }, - ckafka: { - 'ap-shanghai-fsi': { - path: '/fsi/ckafka/shanghai', - host: 'ckafka.ap-shanghai-fsi.tencentcloudapi.com' - }, - 'ap-shenzhen-fsi': { - path: '/fsi/ckafka/shenzhen', - host: 'ckafka.ap-shenzhen-fsi.tencentcloudapi.com' - } - }, - clb: { - 'ap-shanghai-fsi': { - path: '/fsi/clb/shanghai', - host: 'clb.ap-shanghai-fsi.tencentcloudapi.com' - }, - 'ap-shenzhen-fsi': { - path: '/fsi/clb/shenzhen', - host: 'clb.ap-shenzhen-fsi.tencentcloudapi.com' - } - }, - mongodb: { - 'ap-shanghai-fsi': { - path: '/fsi/mongodb/shanghai', - host: 'mongodb.ap-shanghai-fsi.tencentcloudapi.com' - }, - 'ap-shenzhen-fsi': { - path: '/fsi/mongodb/shenzhen', - host: 'mongodb.ap-shenzhen-fsi.tencentcloudapi.com' - } - }, - vpc: { - 'ap-shanghai-fsi': { - path: '/fsi/vpc/shanghai', - host: 'vpc.ap-shanghai-fsi.tencentcloudapi.com' - }, - 'ap-shenzhen-fsi': { - path: '/fsi/vpc/shenzhen', - host: 'vpc.ap-shenzhen-fsi.tencentcloudapi.com' - } - }, - cvm: { - 'ap-shanghai-fsi': { - path: '/fsi/cvm/shanghai', - host: 'cvm.ap-shanghai-fsi.tencentcloudapi.com' - }, - 'ap-shenzhen-fsi': { - path: '/fsi/cvm/shenzhen', - host: 'cvm.ap-shenzhen-fsi.tencentcloudapi.com' - } - }, - cdb: { - 'ap-shanghai-fsi': { - path: '/fsi/cdb/shanghai', - host: 'cdb.ap-shanghai-fsi.tencentcloudapi.com' - }, - 'ap-shenzhen-fsi': { - path: '/fsi/cdb/shenzhen', - host: 'cdb.ap-shenzhen-fsi.tencentcloudapi.com' - } - }, - monitor: { - 'ap-shanghai-fsi': { - path: '/fsi/monitor/shanghai', - host: 'monitor.ap-shanghai-fsi.tencentcloudapi.com' - }, - 'ap-shenzhen-fsi': { - path: '/fsi/monitor/shenzhen', - host: 'monitor.ap-shenzhen-fsi.tencentcloudapi.com' - } - }, - postgres: { - 'ap-shanghai-fsi': { - path: '/fsi/postgres/shanghai', - host: 'postgres.ap-shanghai-fsi.tencentcloudapi.com' - }, - 'ap-shenzhen-fsi': { - path: '/fsi/postgres/shenzhen', - host: 'postgres.ap-shenzhen-fsi.tencentcloudapi.com' - } - }, - emr: { - 'ap-shanghai-fsi': { - path: '/fsi/emr/shanghai', - host: 'emr.ap-shanghai-fsi.tencentcloudapi.com' - }, - 'ap-shenzhen-fsi': { - path: '/fsi/emr/shenzhen', - host: 'emr.ap-shenzhen-fsi.tencentcloudapi.com' - } - }, - cmq: { - 'ap-shanghai-fsi': { - path: '/fsi/cmq/shanghai', - host: 'cmq.ap-shanghai-fsi.tencentcloudapi.com' - }, - 'ap-shenzhen-fsi': { - path: '/fsi/cmq/shenzhen', - host: 'cmq.ap-shenzhen-fsi.tencentcloudapi.com' - } - }, - cls: { - 'ap-shanghai-fsi': { - path: '/fsi/cls/shanghai', - host: 'cls.ap-shanghai-fsi.tencentcloudapi.com' - }, - 'ap-shenzhen-fsi': { - path: '/fsi/cls/shenzhen', - host: 'cls.ap-shenzhen-fsi.tencentcloudapi.com' - } - } -}; // 获取对应业务的 API 接口信息 - -function GetServiceAPIInfo(region, service) { - return __assign(__assign({}, SERVICES_API_INFO[service] || {}), getHostAndPath(region, service)); -} // get host and path for finance regions - -function getHostAndPath(region, service) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.indexOf(FINACE_REGIONS, region) === -1) { - return {}; - } - - return lodash__WEBPACK_IMPORTED_MODULE_0___default.a.find(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.find(FINACE_HOST, function (__, key) { - return key === service; - }), function (__, key) { - return key === region; - }) || {}; -} // 变量替换指定实例按照那个字段展示 - - -var VARIABLE_ALIAS = 'instancealias'; -function GetServiceFromNamespace(namespace) { - return lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.find(_tc_monitor__WEBPACK_IMPORTED_MODULE_2__["SERVICES"], function (service) { - return service.namespace === namespace; - }), 'service'); -} // 处理存量target中保存的qce/cvm - -function GetLabelFromNamespace(namespace) { - return lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.find(_tc_monitor__WEBPACK_IMPORTED_MODULE_2__["SERVICES"], function (service) { - return service.namespace === namespace || service.label === namespace; - }), 'label'); -} // parse template variable query params - -function ParseMetricQuery(query) { - if (query === void 0) { - query = ''; - } - - if (!query) { - return {}; - } - - var result = {}; - - var queries = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.split(query, '&'); - - lodash__WEBPACK_IMPORTED_MODULE_0___default.a.forEach(queries, function (item) { - var str = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.split(item, '='); - - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.trim(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(str, '0', ''))) { - var val = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.trim(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(str, '1', '')); - - try { - val = JSON.parse(val); - } catch (e) {// console.log({ val }); - } - - result[lodash__WEBPACK_IMPORTED_MODULE_0___default.a.toLower(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.trim(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(str, '0', '')))] = val; - } - }); - - return result; -} // parse template variable regex params - -function ParseMetricRegex(regex) { - if (regex === void 0) { - regex = ''; - } - - if (!regex) { - return []; - } - - regex = regex.replace(/:/g, ':'); - regex = regex.replace(/,/g, ','); - var regexParams = ParseMetricQuery(regex); - var result = []; - - lodash__WEBPACK_IMPORTED_MODULE_0___default.a.forEach(regexParams, function (value, key) { - if (key === 'tag:tag-key') { - var valuesArr = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.split(value, ','); - - lodash__WEBPACK_IMPORTED_MODULE_0___default.a.forEach(valuesArr, function (item) { - var temp = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.split(item, ':'); - - if (temp.length === 2) { - result.push({ - Name: "tag:".concat(temp[0]), - Values: temp.slice(1) - }); - } - }); - } else { - result.push({ - Name: key, - Values: lodash__WEBPACK_IMPORTED_MODULE_0___default.a.split(value, ',') - }); - } - }); - - return result; -} // get the actual value of template variable - -function parseVariableFormat(varname) { - varname = String(varname || ''); // $varname - - var varFlag = false; - var regResult1 = varname.match(/^\${?(\w+)}?/); - - if (regResult1) { - varFlag = true; - varname = "${".concat(regResult1[1], ":json}"); - } // [[varname]] - - - var regResult2 = varname.match(/^\[\[(\w+)(\:\w+)?\]\]/); - - if (regResult2) { - varFlag = true; - varname = "${".concat(regResult2[1], ":json}"); - } - - return { - varname: varname, - varFlag: varFlag - }; -} - -function ReplaceVariable(templateSrv, scopedVars, field, multiple) { - if (multiple === void 0) { - multiple = false; - } - - var _a = parseVariableFormat(field), - varname = _a.varname, - varFlag = _a.varFlag; - - var replaceVar = templateSrv.replace(varname, scopedVars); - - if (varFlag) { - try { - replaceVar = JSON.parse(replaceVar); - } catch (error) {} - } - - if (!multiple && lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isArray(replaceVar)) { - replaceVar = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(replaceVar, '0', ''); - } - - return replaceVar; -} // get dimensions for instance query param - -function GetDimensions(obj) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(obj)) { - return []; - } - - var dimensions = []; - - lodash__WEBPACK_IMPORTED_MODULE_0___default.a.forEach(obj, function (item) { - if (item.Value !== null && item.Value !== undefined && item.Value !== '') { - dimensions.push({ - Name: item.Name, - Value: typeof item.Value === 'string' ? item.Value : "".concat(item.Value) - }); - } - }); - - return dimensions; -} // parse query data result for panel - -function ParseQueryResult(response, instances, timeshift) { - if (instances === void 0) { - instances = []; - } - - if (timeshift === void 0) { - timeshift = 0; - } - - var instanceList = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.cloneDeep(instances); - - var dataPoints = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(response, 'DataPoints', []); - - return lodash__WEBPACK_IMPORTED_MODULE_0___default.a.map(dataPoints, function (dataPoint) { - var instanceAliasValue = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(dataPoint, 'Dimensions[0].Value'); - - for (var i = 0; i < instanceList.length; i++) { - if (isInstanceMatch(instanceList[i], lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(dataPoint, 'Dimensions', []))) { - instanceAliasValue = instanceList[i]._InstanceAliasValue; - instanceList.splice(i, 1); - break; - } - } - - return { - target: "".concat(response.MetricName, " - ").concat(instanceAliasValue), - datapoints: parseDataPoint(dataPoint, timeshift) - }; - }); -} // parse tencent cloud monitor response data to grafana panel data - -function parseDataPoint(dataPoint, timeshift) { - if (timeshift === void 0) { - timeshift = 0; - } - - var timestamps = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(dataPoint, 'Timestamps', []); - - var values = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(dataPoint, 'Values', []); - - var result = timestamps.map(function (timestamp, index) { - return [values[index], timestamp * 1000 + timeshift]; - }); - return result; -} // check whether instance is match or not - - -function isInstanceMatch(instance, dimensions) { - var match = true; // eslint-disable-next-line @typescript-eslint/prefer-for-of - - for (var i = 0; i < dimensions.length; i++) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(instance, dimensions[i].Name, '').toString() !== dimensions[i].Value.toString()) { - match = false; - break; - } - } - - return match; -} -/** - * 检查某个变量是否模板变量,即是否匹配 ${varnam} 或 [[varname]] - * - * @param field 变量字段名 - */ - - -function isVariable(value) { - if (value && (value.match(/^\${?(\w+)}?/) || value.match(/^\[\[(\w+)(\:\w+)?\]\]/))) { - return true; - } - - return false; -} -/** - * 腾讯云 API 3.0 接口协议 - * @param options 接口请求对象 { url: string, data?: object } - * @param service 产品名字 'cvm' - * @param signObj 接口请求相关信息 { region?: string, action: string } - * @param secretId - * @param secretKey - */ - -function GetRequestParams(options, service, signObj, secretId, datasourceId, backendSrv) { - if (signObj === void 0) { - signObj = {}; - } - - return __awaiter(this, void 0, void 0, function () { - var signParams, sign, _a, intranet, headerSigned; - - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - signParams = __assign(__assign(__assign({ - secretId: secretId, - payload: options.data || '' - }, signObj), lodash__WEBPACK_IMPORTED_MODULE_0___default.a.pick(GetServiceAPIInfo(signObj.region || '', service), ['service', 'host', 'version']) || {}), { - backendSrv: backendSrv, - datasourceId: datasourceId, - region: 'ap-guangzhou' - }); - sign = new _sign__WEBPACK_IMPORTED_MODULE_3__["default"](signParams); - return [4 - /*yield*/ - , sign.getHeader()]; - - case 1: - _a = _b.sent(), intranet = _a.intranet, headerSigned = __rest(_a, ["intranet"]); // 传入x-tc-language实现国际化 - // zh-CN en-US ko-KR ja-JP - - options.headers = Object.assign(options.headers || {}, __assign({}, headerSigned), { - 'x-tc-language': Object(_locale__WEBPACK_IMPORTED_MODULE_6__["getLanguage"])() - }); - options.method = 'POST'; - - if (intranet) { - options.url += '-internal'; - } - - return [2 - /*return*/ - , options]; - } - }); - }); -} -/** - * 腾讯云 API 2.0 接口协议 - * @param options 接口请求对象 { url: string, data?: object } - * @param service 产品名字 'cvm' - * @param signObj 接口请求相关信息 { region?: string, action: string } - * @param secretId - * @param secretKey - */ - -function GetRequestParamsV2(options, service, signObj, secretId, datasourceId, backendSrv) { - if (options === void 0) { - options = {}; - } - - if (signObj === void 0) { - signObj = {}; - } - - return __awaiter(this, void 0, void 0, function () { - var data, signParams, sign, _a, queryString, path, host, intranet; - - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - data = options.data || {}; - signParams = __assign(__assign(__assign({ - secretId: secretId, - data: data - }, signObj), lodash__WEBPACK_IMPORTED_MODULE_0___default.a.pick(GetServiceAPIInfo(signObj.region || '', service), ['host', 'version']) || {}), { - backendSrv: backendSrv, - datasourceId: datasourceId - }); - options.method = 'POST'; - sign = new _signV2__WEBPACK_IMPORTED_MODULE_4__["default"](signParams); - options.headers = Object.assign(options.headers || {}, { - 'Content-Type': 'application/x-www-form-urlencoded' - }); - return [4 - /*yield*/ - , sign.generateQueryString()]; - - case 1: - _a = _b.sent(), queryString = _a.queryString, path = _a.path, host = _a.host, intranet = _a.intranet; - options.data = qs__WEBPACK_IMPORTED_MODULE_1___default.a.stringify(__assign(__assign(__assign({}, options.data), queryString), host && { - host: host - })); - - if (intranet) { - // TODO: qcloud.com intranet host - console.log('got intranet for sign v2'); - } - - options.url += path; - return [2 - /*return*/ - , options]; - } - }); - }); -} -function SliceLength(total, len) { - if (total === void 0) { - total = 0; - } - - if (len === void 0) { - len = 1; - } - - var result = []; - var num = Math.ceil(total / len); - - for (var i = 1; i < num; i++) { - result.push({ - Offset: len * i - }); - } - - return result; -} -var FilterKeys = ['Namespace', 'Offset', 'Limit', 'SearchKey', 'Description', 'OrderBy', 'Order']; -function parseDataFromBackendPlugin(res) { - var data = Object(_grafana_runtime__WEBPACK_IMPORTED_MODULE_5__["toDataQueryResponse"])(res).data; - return { - authorization: lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(data, '[0].meta.custom', '') - }; -} -/** 当前环境是否为非生产环境 */ - -var IS_DEVELOPMENT_ENVIRONMENT = !("development" === 'production'); -/** - * @link https://github.com/grafana/grafana/blob/3c6e0e8ef85048af952367751e478c08342e17b4/packages/grafana-data/src/types/app.ts#L12 - */ - -var CoreApp; - -(function (CoreApp) { - CoreApp["CloudAlerting"] = "cloud-alerting"; - CoreApp["UnifiedAlerting"] = "unified-alerting"; - CoreApp["Dashboard"] = "dashboard"; - CoreApp["Explore"] = "explore"; - CoreApp["Unknown"] = "unknown"; - CoreApp["PanelEditor"] = "panel-editor"; - CoreApp["PanelViewer"] = "panel-viewer"; -})(CoreApp || (CoreApp = {})); - -/***/ }), - -/***/ "./datasource/common/datasourceStorage.ts": -/*!************************************************!*\ - !*** ./datasource/common/datasourceStorage.ts ***! - \************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _indexedDB__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./indexedDB */ "./datasource/common/indexedDB.ts"); -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - -var InstanceStorage = -/** @class */ -function () { - function InstanceStorage() { - // prefix = 'Datasource'; - // storageKey = 'grafanaInstanceCache'; - this.insKey = 'Instances'; - this.cacheWay = ''; - } - - InstanceStorage.prototype.setInstance = function (service, value) { - return this.setStorage(service, this.insKey, value, true); - }; - - InstanceStorage.prototype.getInstance = function (service) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.getStorage(service, this.insKey)]; - }); - }); - }; - - InstanceStorage.prototype.setExtraStorage = function (service, Ekey, EValue) { - return this.setStorage(service, Ekey, EValue, false); - }; - - InstanceStorage.prototype.getExtraStorage = function (service, Ekey) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.getStorage(service, Ekey)]; - }); - }); - }; - - InstanceStorage.prototype.setStorage = function (serviceKey, key, value, isCover) { - var _a; - - if (isCover === void 0) { - isCover = false; - } // console.log('set', serviceKey, key, value); - - - return _indexedDB__WEBPACK_IMPORTED_MODULE_0__["default"].addData((_a = { - service: serviceKey - }, _a[key] = value, _a), isCover); - }; // 获取到模版变量信息 - - - InstanceStorage.prototype.getStorage = function (service, key) { - return __awaiter(this, void 0, void 0, function () { - var storage; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - return [4 - /*yield*/ - , _indexedDB__WEBPACK_IMPORTED_MODULE_0__["default"].getData(service)]; - - case 1: - storage = _a.sent(); // console.log('get', key, storage); - - return [2 - /*return*/ - , key ? storage === null || storage === void 0 ? void 0 : storage[key] : storage]; - } - }); - }); - }; - - return InstanceStorage; -}(); - -/* harmony default export */ __webpack_exports__["default"] = (new InstanceStorage()); - -/***/ }), - -/***/ "./datasource/common/indexedDB.ts": -/*!****************************************!*\ - !*** ./datasource/common/indexedDB.ts ***! - \****************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -var __assign = undefined && undefined.__assign || function () { - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - } - - return t; - }; - - return __assign.apply(this, arguments); -}; - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; // interface UpdateProps { -// storeName: string; -// cursorKey: string; -// cursorValue?: any; -// data: any; -// } - - -var store = { - name: 'grafanaInstanceList', - key: 'service' -}; - -var promisify = function promisify(request, type) { - return new Promise(function (resolve, reject) { - request.onsuccess = function (event) { - var returnMap = { - event: event.target.result, - request: request.result, - msg: '操作成功' - }; - resolve(returnMap[type || 'msg']); - }; - - request.onerror = function (event) { - return reject(event.target.error || '操作失败'); - }; - }); -}; // 固定表名和数据库名 - - -var IndexedDB = -/** @class */ -function () { - function IndexedDB(props) { - this.name = 'grafanaDatabase'; - this.version = 1; - var _a = props.name, - name = _a === void 0 ? 'database' : _a, - _b = props.version, - version = _b === void 0 ? 1 : _b, - store = props.store; - this.name = name; - this.version = version; - this.initDB(store); - } - /** - * 初始化数据库 - * @param store 库表的结构 - */ - - - IndexedDB.prototype.initDB = function (store) { - var indexeddb = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB || window.msIndexedDB; - var request = indexeddb.open(this.name, this.version); - - request.onupgradeneeded = function (event) { - var db = event.target.result; - - if (db.objectStoreNames.contains(store.name)) {// 存在表store - } // 遍历store,设置数据表结构 - - - db.createObjectStore(store.name, { - keyPath: store.key - }); - }; - - request.onerror = function () { - return Promise.reject(new Error('初始化数据库失败')); - }; - - request.onsuccess = function () { - return Promise.resolve('初始化数据库成功'); - }; - }; - - IndexedDB.prototype.openDB = function () { - var indexeddb = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB || window.msIndexedDB; - var request = indexeddb.open(this.name, this.version); - return promisify(request, 'event'); - }; - /** - * 新增数据 - * @param storeName 表名 - * @param data 添加的数据 - */ - - - IndexedDB.prototype.insertData = function (storeName, data) { - return __awaiter(this, void 0, void 0, function () { - var db, transaction_1, objectStore, error_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2,, 3]); - - return [4 - /*yield*/ - , this.openDB()]; - - case 1: - db = _a.sent(); - transaction_1 = db.transaction(storeName, 'readwrite'); - objectStore = transaction_1.objectStore(storeName); - objectStore.add(data); // console.timeEnd('insertData'); - - return [2 - /*return*/ - , new Promise(function (resolve, reject) { - transaction_1.oncomplete = function () { - // console.timeEnd('insertData'); - resolve('所有数据插入成功'); - }; - - transaction_1.onerror = function (event) { - reject(event); - }; - })]; - - case 2: - error_1 = _a.sent(); - return [2 - /*return*/ - , Promise.reject(error_1)]; - - case 3: - return [2 - /*return*/ - ]; - } - }); - }); - }; - /** - * 更新数据 - * @param props 查询数据的参数以及要修改的值的参数 - */ - - - IndexedDB.prototype.addData = function (data, isCover) { - return __awaiter(this, void 0, void 0, function () { - var storeName, oldData, objectStore, newData, requestUpdate, error_2; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 3,, 4]); - - storeName = store.name; - return [4 - /*yield*/ - , this.getData(data.service)]; - - case 1: - oldData = _a.sent(); - return [4 - /*yield*/ - , this.getObjectStore(storeName, 'readwrite')]; - - case 2: - objectStore = _a.sent(); - - if (!oldData) { - // 不存在则新建 - this.insertData(storeName, data); - } - - newData = __assign(__assign({}, oldData), data); - if (isCover) newData = data; // 需要覆盖之前内容 - - requestUpdate = objectStore.put(newData); // console.timeEnd('updateData'); - - return [2 - /*return*/ - , promisify(requestUpdate)]; - - case 3: - error_2 = _a.sent(); - return [2 - /*return*/ - , Promise.reject(error_2)]; - - case 4: - return [2 - /*return*/ - ]; - } - }); - }); - }; - /** - * 获取数据库的值,返回查询到的第一项 - * @param storeName 表名/存储对象的键 - * @param cursorKey key - * @param cursorValue 要查询索引的值 - */ - - - IndexedDB.prototype.getData = function (seviceName) { - return __awaiter(this, void 0, void 0, function () { - var storeName, objectStore, request, error_3; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2,, 3]); - - storeName = store.name; - return [4 - /*yield*/ - , this.getObjectStore(storeName)]; - - case 1: - objectStore = _a.sent(); - request = objectStore.get(seviceName); // console.timeEnd('getData'); - - return [2 - /*return*/ - , promisify(request, 'request')]; - - case 2: - error_3 = _a.sent(); - return [2 - /*return*/ - , Promise.reject(error_3)]; - - case 3: - return [2 - /*return*/ - ]; - } - }); - }); - }; - - IndexedDB.prototype.getAllData = function (storeName) { - return __awaiter(this, void 0, void 0, function () { - var objectStore, request, result, error_4; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 3,, 4]); - - return [4 - /*yield*/ - , this.getObjectStore(storeName)]; - - case 1: - objectStore = _a.sent(); - request = objectStore.getAll(); - return [4 - /*yield*/ - , promisify(request, 'request')]; - - case 2: - result = _a.sent(); // console.timeEnd('getAllData'); - - return [2 - /*return*/ - , result ? result : []]; - - case 3: - error_4 = _a.sent(); - return [2 - /*return*/ - , Promise.reject(error_4)]; - - case 4: - return [2 - /*return*/ - ]; - } - }); - }); - }; - /** - * 获取对象仓库 - * @param storeName 表名 - * @param type readonly 或者 readwrite等 - */ - - - IndexedDB.prototype.getObjectStore = function (storeName, type) { - return __awaiter(this, void 0, Promise, function () { - var db, error_5; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2,, 3]); - - return [4 - /*yield*/ - , this.openDB()]; - - case 1: - db = _a.sent(); - return [2 - /*return*/ - , db.transaction(storeName, type).objectStore(storeName)]; - - case 2: - error_5 = _a.sent(); - return [2 - /*return*/ - , Promise.reject(error_5)]; - - case 3: - return [2 - /*return*/ - ]; - } - }); - }); - }; - - return IndexedDB; -}(); // console.log('testDDB') -// const indexDB = new IndexedDB({store}); -// indexDB.addData({service: 'cvm', instance: [{ins: 23}]}).then(e=>{ -// indexDB.getData('cvm').then(dd=>{console.log({dd})}) -// }) - - -/* harmony default export */ __webpack_exports__["default"] = (new IndexedDB({ - store: store -})); - -/***/ }), - -/***/ "./datasource/common/sign.ts": -/*!***********************************!*\ - !*** ./datasource/common/sign.ts ***! - \***********************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! moment */ "moment"); -/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_0__); -var __assign = undefined && undefined.__assign || function () { - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - } - - return t; - }; - - return __assign.apply(this, arguments); -}; - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - -var HttpRequestMethod = 'POST'; -var CanonicalUri = '/'; -var CanonicalQueryString = ''; -var ContentType = 'application/json'; - -var Sign = -/** @class */ -function () { - function Sign(options) { - var secretId = options.secretId, - service = options.service, - action = options.action, - host = options.host, - version = options.version, - _a = options.payload, - payload = _a === void 0 ? '' : _a, - region = options.region, - backendSrv = options.backendSrv, - datasourceId = options.datasourceId; - this.secretId = secretId; // this.secretKey = secretKey; - - this.service = service; - this.action = action; - this.host = host; - this.version = version; - this.payload = typeof payload === 'string' ? payload : JSON.stringify(payload); - this.region = region; - var nowDate = moment__WEBPACK_IMPORTED_MODULE_0___default()().utc(); - this.timestamp = nowDate.unix(); - this.date = nowDate.format('YYYY-MM-DD'); - this.backendSrv = backendSrv; - this.datasourceId = datasourceId; - } - - Sign.prototype.getHeader = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.getResourceHeader()]; - }); - }); - }; - - Sign.prototype.getResourceHeader = function () { - var _a, _b, _c; - - return __awaiter(this, void 0, void 0, function () { - var res, resp, err_1, authorization, token, intranet, grafanaVersion, headers; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - res = {}; - _d.label = 1; - - case 1: - _d.trys.push([1, 3,, 4]); - - return [4 - /*yield*/ - , this.backendSrv.datasourceRequest({ - url: "/api/datasources/".concat(this.datasourceId, "/resources/sign_v3"), - method: 'POST', - headers: { - 'Content-Type': 'application/json' - }, - data: { - Host: this.host, - Service: this.service, - Version: this.version, - Action: this.action, - Region: this.region, - Timestamp: this.timestamp, - Method: HttpRequestMethod, - Uri: CanonicalUri, - Query: CanonicalQueryString, - Body: this.payload, - Headers: { - 'content-type': ContentType, - host: this.host - } - } - })]; - - case 2: - resp = _d.sent(); - res = resp.data; - return [3 - /*break*/ - , 4]; - - case 3: - err_1 = _d.sent(); - return [3 - /*break*/ - , 4]; - - case 4: - authorization = res.authorization, token = res.token, intranet = res.intranet; - grafanaVersion = ((_c = (_b = (_a = window.grafanaBootData) === null || _a === void 0 ? void 0 : _a.settings) === null || _b === void 0 ? void 0 : _b.buildInfo) === null || _c === void 0 ? void 0 : _c.version) || '0.0.0'; - headers = __assign(__assign(__assign({ - Authorization: authorization, - 'Content-Type': ContentType, - 'X-TC-Action': this.action, - 'X-TC-Timestamp': this.timestamp.toString(), - 'X-TC-Version': this.version, - 'X-TC-RequestClient': "GF_".concat(grafanaVersion, "_PL_CM_").concat("2.9.1") - }, this.region && { - 'X-TC-Region': this.region - }), token && { - 'X-TC-Token': token - }), { - intranet: intranet - }); - return [2 - /*return*/ - , headers]; - } - }); - }); - }; - - return Sign; -}(); - -/* harmony default export */ __webpack_exports__["default"] = (Sign); - -/***/ }), - -/***/ "./datasource/common/signV2.ts": -/*!*************************************!*\ - !*** ./datasource/common/signV2.ts ***! - \*************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/** - * - * @param defaults 为对象 - * secretId - * secretKey - * action - * region - * host - */ -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - -var SignV2 = -/** @class */ -function () { - function SignV2(defaults) { - var _this = this; - - if (defaults === void 0) { - defaults = {}; - } - - this.defaults = { - path: '/v2/index.php', - method: 'POST' - }; - - this.generateQueryString = function () { - return __awaiter(_this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.getResourceQueryString()]; - }); - }); - }; - - this.defaults = Object.assign(this.defaults, defaults); - this.defaults.secretKey = ''; - this.backendSrv = defaults.backendSrv; - this.datasourceId = defaults.datasourceId; - } - - SignV2.prototype.getResourceQueryString = function () { - return __awaiter(this, void 0, void 0, function () { - var res, data, payload, resp, err_1, path, querystring, host, intranet; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - res = {}; - _a.label = 1; - - case 1: - _a.trys.push([1, 3,, 4]); - - data = this.defaults.data; - payload = typeof data === 'string' ? data : JSON.stringify(data); - return [4 - /*yield*/ - , this.backendSrv.datasourceRequest({ - url: "/api/datasources/".concat(this.datasourceId, "/resources/sign_v2"), - method: 'POST', - headers: { - 'Content-Type': 'application/json' - }, - data: { - Host: this.defaults.host, - Action: this.defaults.action, - Version: this.defaults.version, - Region: this.defaults.region, - Method: this.defaults.method, - Uri: this.defaults.path, - Query: '', - Body: payload - } - })]; - - case 2: - resp = _a.sent(); - res = resp.data; - return [3 - /*break*/ - , 4]; - - case 3: - err_1 = _a.sent(); - return [3 - /*break*/ - , 4]; - - case 4: - path = res.path, querystring = res.querystring, host = res.host, intranet = res.intranet; - return [2 - /*return*/ - , { - queryString: querystring, - path: path, - host: host, - intranet: intranet - }]; - } - }); - }); - }; - - return SignV2; -}(); - -/* harmony default export */ __webpack_exports__["default"] = (SignV2); - -/***/ }), - -/***/ "./datasource/common/utils.ts": -/*!************************************!*\ - !*** ./datasource/common/utils.ts ***! - \************************************/ -/*! exports provided: fetchAllFactory, instanceQueryParamsBaseParse, getNamesapceFromService, serviceGroupBy, isTargetEqual, getTimeShiftInMs */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fetchAllFactory", function() { return fetchAllFactory; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "instanceQueryParamsBaseParse", function() { return instanceQueryParamsBaseParse; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNamesapceFromService", function() { return getNamesapceFromService; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "serviceGroupBy", function() { return serviceGroupBy; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isTargetEqual", function() { return isTargetEqual; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTimeShiftInMs", function() { return getTimeShiftInMs; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _tc_monitor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../tc_monitor */ "./datasource/tc_monitor/index.ts"); -var __assign = undefined && undefined.__assign || function () { - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - } - - return t; - }; - - return __assign.apply(this, arguments); -}; - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - -/* 从分页数据获取全量数据 */ - -var PageSize = 50; - -function getFieldsValue(value, fields) { - return fields.map(function (item) { - return lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(value, item, lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(value, "Result.".concat(item), [])); - }); -} - -function fetchAllFactory(fetcher, _params, field) { - var _a, _b, _c, _d, _e, _f, _g, _h; - - return __awaiter(this, void 0, void 0, function () { - var params, rs, fields, TotalCount, firstLists, delta, batchCount, pmList, resultList; - return __generator(this, function (_j) { - switch (_j.label) { - case 0: - params = __assign({}, lodash__WEBPACK_IMPORTED_MODULE_0___default.a.omit(_params, ['isOffsetPage'])); - params.Limit = params.Limit || PageSize; // 默认给个Limit大小为50 - - params.Offset = (_a = params.Offset) !== null && _a !== void 0 ? _a : 0; // 默认给个Offset为0 - - return [4 - /*yield*/ - , fetcher(params)]; - - case 1: - rs = (_b = _j.sent()) !== null && _b !== void 0 ? _b : {}; - fields = Array.isArray(field) ? field : [field]; - TotalCount = (_h = (_f = (_e = (_c = rs.TotalCount) !== null && _c !== void 0 ? _c : (_d = rs.Result) === null || _d === void 0 ? void 0 : _d.TotalCount) !== null && _e !== void 0 ? _e : rs.TotalCnt) !== null && _f !== void 0 ? _f : (_g = rs.Result) === null || _g === void 0 ? void 0 : _g.TotalCnt) !== null && _h !== void 0 ? _h : 0; - firstLists = getFieldsValue(rs, fields); - - if (TotalCount === 0 || firstLists[0].length === TotalCount) { - // 只有一页,结束 - return [2 - /*return*/ - , firstLists]; - } - - delta = TotalCount - firstLists[0].length; - batchCount = Math.ceil(delta / PageSize); - pmList = new Array(batchCount).fill(0).map(function (_, index) { - params.Offset = _params.isOffsetPage ? 1 + index : (1 + index) * params.Limit; - return fetcher(params); - }); - return [4 - /*yield*/ - , Promise.all(pmList)]; - - case 2: - resultList = _j.sent(); - return [2 - /*return*/ - , resultList.reduce(function (acc, cur) { - var lists = getFieldsValue(cur, fields); // [[], [], []] + [[], [], []] - - acc.forEach(function (list, index) { - return list.push.apply(list, lists[index]); - }); - return acc; - }, firstLists)]; - } - }); - }); -} -/** - * 实例列表接口入参处理 - * - * @param queries 表单键入内容 - * @param isFilter 是否需要设置为Filters格式 - */ - -function instanceQueryParamsBaseParse(queries, isFilter) { - var params = {}; - - if (!lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(queries)) { - params.Limit = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Limit', 20) || 20; - params.Offset = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Offset', 0) || 0; - queries = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.omit(queries, ['Offset', 'Limit']); - var Filters_1 = []; - - lodash__WEBPACK_IMPORTED_MODULE_0___default.a.forEach(queries, function (item, key) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isArray(item)) { - item = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.compact(item); - - if (item.length > 0) { - if (isFilter) { - Filters_1.push({ - Name: key, - Values: lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(item).slice(0, 5) - }); - } else { - params[key] = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(item); - } - } - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isObject(item)) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isNumber(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', undefined)) || !lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', undefined))) { - if (isFilter) { - Filters_1.push({ - Name: key, - Values: lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', []).slice(0, 5) - }); - } else { - params[key] = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value'); - } - } - } else if (item !== null && item !== undefined && item !== '') { - if (isFilter) { - Filters_1.push({ - Name: key, - Values: item - }); - } else { - params[key] = item; - } - } - }); - - if (isFilter && Filters_1.length > 0) { - params.Filters = Filters_1; - return params; - } - } - - return params; -} -function getNamesapceFromService(serviceName) { - return lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.find(_tc_monitor__WEBPACK_IMPORTED_MODULE_1__["SERVICES"], function (service) { - return service.service === serviceName; - }), 'namespace'); -} -function serviceGroupBy(services) { - var result = services.reduce(function (acc, cur) { - var namespace = cur.namespace, - label = cur.label, - _a = cur.groupName, - groupName = _a === void 0 ? label : _a; - var existedGroup = acc.find(function (item) { - return item.label === groupName; - }); - - if (!existedGroup) { - acc.push({ - label: groupName, - value: groupName, - items: [{ - label: label, - value: namespace - }] - }); - return acc; - } - - existedGroup.items.push({ - label: label, - value: namespace - }); - return acc; - }, []); // 将只有一个子元素的项目进行特殊处理 - - var rs = result.map(function (item) { - return item.items.length === 1 ? { - label: item.items[0].label, - value: item.items[0].value - } : item; - }); - return rs; -} -var isTargetEqual = function isTargetEqual(newTargetString, oldTargetString, key) { - try { - var newTarget = JSON.parse(newTargetString); - var oldTarget = JSON.parse(oldTargetString); - return newTarget[key] === oldTarget[key]; - } catch (e) { - return newTargetString === oldTargetString; - } -}; -var getTimeShiftInMs = function getTimeShiftInMs(timeShift) { - var parts = /^(\d+)([d|h|m|s])$/.exec(timeShift); - - if (!parts) { - return 0; - } - - var amount = parseInt(parts[1], 10); - var unit = parts[2]; - - switch (unit) { - case 'd': - return amount * 86400 * 1000; - - case 'h': - return amount * 3600 * 1000; - - case 'm': - return amount * 60 * 1000; - - case 's': - return amount * 1000; - } - - return 0; -}; - -/***/ }), - -/***/ "./datasource/plugin.json": -/*!********************************!*\ - !*** ./datasource/plugin.json ***! - \********************************/ -/*! exports provided: type, name, id, backend, alerting, logs, metrics, annotations, executable, queryOptions, routes, info, default */ -/***/ (function(module) { - -module.exports = JSON.parse("{\"type\":\"datasource\",\"name\":\"Tencent Cloud Monitoring\",\"id\":\"tencentcloud-monitor-datasource\",\"backend\":true,\"alerting\":true,\"logs\":true,\"metrics\":true,\"annotations\":false,\"executable\":\"tencentcloud-monitor-app-backend\",\"queryOptions\":{\"maxDataPoints\":true},\"routes\":[{\"path\":\"cls-internal\",\"url\":\"https://cls.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"region-internal\",\"url\":\"https://region.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"api-internal\",\"url\":\"https://api.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"cmq-internal\",\"url\":\"https://cmq.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/cmq/shanghai-internal\",\"url\":\"https://cmq.ap-shanghai-fsi.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/cmq/shenzhen-internal\",\"url\":\"https://cmq.ap-shenzhen-fsi.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"emr-internal\",\"url\":\"https://emr.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/emr/shanghai-internal\",\"url\":\"https://emr.ap-shanghai-fsi.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/emr/shenzhen-internal\",\"url\":\"https://emr.ap-shenzhen-fsi.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"scf-internal\",\"url\":\"https://scf.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/scf/shanghai-internal\",\"url\":\"https://scf.ap-shanghai-fsi.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/scf/shenzhen-internal\",\"url\":\"https://scf.ap-shenzhen-fsi.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"cfs-internal\",\"url\":\"https://cfs.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/cfs/shanghai-internal\",\"url\":\"https://cfs.ap-shanghai-fsi.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/cfs/shenzhen-internal\",\"url\":\"https://cfs.ap-shenzhen-fsi.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"ckafka-internal\",\"url\":\"https://ckafka.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/ckafka/shanghai-internal\",\"url\":\"https://ckafka.ap-shanghai-fsi.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/ckafka/shenzhen-internal\",\"url\":\"https://ckafka.ap-shenzhen-fsi.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"clb-internal\",\"url\":\"https://clb.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/clb/shanghai-internal\",\"url\":\"https://clb.ap-shanghai-fsi.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/clb/shenzhen-internal\",\"url\":\"https://clb.ap-shenzhen-fsi.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"mongodb-internal\",\"url\":\"https://mongodb.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/mongodb/shanghai-internal\",\"url\":\"https://mongodb.ap-shanghai-fsi.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/mongodb/shenzhen-internal\",\"url\":\"https://mongodb.ap-shenzhen-fsi.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"vpc-internal\",\"url\":\"https://vpc.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/vpc/shanghai-internal\",\"url\":\"https://vpc.ap-shanghai-fsi.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/vpc/shenzhen-internal\",\"url\":\"https://vpc.ap-shenzhen-fsi.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"pcx-internal\",\"url\":\"https://vpc.api.qcloud.com.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/x-www-form-urlencoded\"}]},{\"path\":\"cvm-internal\",\"url\":\"https://cvm.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/cvm/shanghai-internal\",\"url\":\"https://cvm.ap-shanghai-fsi.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/cvm/shenzhen-internal\",\"url\":\"https://cvm.ap-shenzhen-fsi.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"monitor-internal\",\"url\":\"https://monitor.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/monitor/shanghai-internal\",\"url\":\"https://monitor.ap-shanghai-fsi.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/monitor/shenzhen-internal\",\"url\":\"https://monitor.ap-shenzhen-fsi.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"cdb-internal\",\"url\":\"https://cdb.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/cdb/shanghai-internal\",\"url\":\"https://cdb.ap-shanghai-fsi.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/cdb/shenzhen-internal\",\"url\":\"https://cdb.ap-shenzhen-fsi.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"postgres-internal\",\"url\":\"https://postgres.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/postgres/shanghai-internal\",\"url\":\"https://postgres.ap-shanghai-fsi.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/postgres/shenzhen-internal\",\"url\":\"https://postgres.ap-shenzhen-fsi.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"cdn-internal\",\"url\":\"https://cdn.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"redis-internal\",\"url\":\"https://redis.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"dcdb-internal\",\"url\":\"https://dcdb.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"dc-internal\",\"url\":\"https://dc.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"cynosdb-internal\",\"url\":\"https://cynosdb.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"sqlserver-internal\",\"url\":\"https://sqlserver.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"bmeip-internal\",\"url\":\"https://bmeip.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"bmvpc-internal\",\"url\":\"https://bmvpc.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"bmlb-internal\",\"url\":\"https://bmlb.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"bm-internal\",\"url\":\"https://bm.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"es-internal\",\"url\":\"https://es.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"cbs-internal\",\"url\":\"https://cbs.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"tcaplusdb-internal\",\"url\":\"https://tcaplusdb.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"apigateway-internal\",\"url\":\"https://apigateway.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"tdmq-internal\",\"url\":\"https://tdmq.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"gaap-internal\",\"url\":\"https://gaap.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"ecm-internal\",\"url\":\"https://ecm.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"gse-internal\",\"url\":\"https://gse.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"lighthouse-internal\",\"url\":\"https://lighthouse.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"tsf-internal\",\"url\":\"https://tsf.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"rum-internal\",\"url\":\"https://rum.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"tke-internal\",\"url\":\"https://tke.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"ecdn-internal\",\"url\":\"https://ecdn.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"waf-internal\",\"url\":\"https://waf.internal.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"apigateway\",\"url\":\"https://apigateway.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"api\",\"url\":\"https://api.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"cmq\",\"url\":\"https://cmq.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/cmq/shanghai\",\"url\":\"https://cmq.ap-shanghai-fsi.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/cmq/shenzhen\",\"url\":\"https://cmq.ap-shenzhen-fsi.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"emr\",\"url\":\"https://emr.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/emr/shanghai\",\"url\":\"https://emr.ap-shanghai-fsi.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/emr/shenzhen\",\"url\":\"https://emr.ap-shenzhen-fsi.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"scf\",\"url\":\"https://scf.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/scf/shanghai\",\"url\":\"https://scf.ap-shanghai-fsi.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/scf/shenzhen\",\"url\":\"https://scf.ap-shenzhen-fsi.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"cfs\",\"url\":\"https://cfs.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/cfs/shanghai\",\"url\":\"https://cfs.ap-shanghai-fsi.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/cfs/shenzhen\",\"url\":\"https://cfs.ap-shenzhen-fsi.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"ckafka\",\"url\":\"https://ckafka.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/ckafka/shanghai\",\"url\":\"https://ckafka.ap-shanghai-fsi.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/ckafka/shenzhen\",\"url\":\"https://ckafka.ap-shenzhen-fsi.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"clb\",\"url\":\"https://clb.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/clb/shanghai\",\"url\":\"https://clb.ap-shanghai-fsi.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/clb/shenzhen\",\"url\":\"https://clb.ap-shenzhen-fsi.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"mongodb\",\"url\":\"https://mongodb.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/mongodb/shanghai\",\"url\":\"https://mongodb.ap-shanghai-fsi.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/mongodb/shenzhen\",\"url\":\"https://mongodb.ap-shenzhen-fsi.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"vpc\",\"url\":\"https://vpc.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/vpc/shanghai\",\"url\":\"https://vpc.ap-shanghai-fsi.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/vpc/shenzhen\",\"url\":\"https://vpc.ap-shenzhen-fsi.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"pcx\",\"url\":\"https://vpc.api.qcloud.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/x-www-form-urlencoded\"}]},{\"path\":\"cvm\",\"url\":\"https://cvm.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/cvm/shanghai\",\"url\":\"https://cvm.ap-shanghai-fsi.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/cvm/shenzhen\",\"url\":\"https://cvm.ap-shenzhen-fsi.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"monitor\",\"url\":\"https://monitor.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/monitor/shanghai\",\"url\":\"https://monitor.ap-shanghai-fsi.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/monitor/shenzhen\",\"url\":\"https://monitor.ap-shenzhen-fsi.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"cdb\",\"url\":\"https://cdb.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/cdb/shanghai\",\"url\":\"https://cdb.ap-shanghai-fsi.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/cdb/shenzhen\",\"url\":\"https://cdb.ap-shenzhen-fsi.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"postgres\",\"url\":\"https://postgres.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/postgres/shanghai\",\"url\":\"https://postgres.ap-shanghai-fsi.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/postgres/shenzhen\",\"url\":\"https://postgres.ap-shenzhen-fsi.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"cdn\",\"url\":\"https://cdn.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"redis\",\"url\":\"https://redis.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"dcdb\",\"url\":\"https://dcdb.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"dc\",\"url\":\"https://dc.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"cynosdb\",\"url\":\"https://cynosdb.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"sqlserver\",\"url\":\"https://sqlserver.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"bmeip\",\"url\":\"https://bmeip.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"bmvpc\",\"url\":\"https://bmvpc.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"bmlb\",\"url\":\"https://bmlb.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"bm\",\"url\":\"https://bm.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"es\",\"url\":\"https://es.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"cbs\",\"url\":\"https://cbs.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"tcaplusdb\",\"url\":\"https://tcaplusdb.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"tdmq\",\"url\":\"https://tdmq.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"gaap\",\"url\":\"https://gaap.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"ecm\",\"url\":\"https://ecm.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"gse\",\"url\":\"https://gse.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"cls\",\"url\":\"https://cls.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/cls/shanghai\",\"url\":\"https://cls.ap-shanghai-fsi.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"fsi/cls/shenzhen\",\"url\":\"https://cls.ap-shenzhen-fsi.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"region\",\"url\":\"https://region.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"lighthouse\",\"url\":\"https://lighthouse.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"tsf\",\"url\":\"https://tsf.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"rum\",\"url\":\"https://rum.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"apm\",\"url\":\"https://apm.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"tke\",\"url\":\"https://tke.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"ecdn\",\"url\":\"https://ecdn.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]},{\"path\":\"waf\",\"url\":\"https://waf.tencentcloudapi.com\",\"headers\":[{\"name\":\"Content-Type\",\"content\":\"application/json\"}]}],\"info\":{\"author\":{\"name\":\"Tencent Cloud\"},\"logos\":{\"small\":\"img/tencent-cloud.svg\",\"large\":\"img/tencent-cloud.svg\"},\"description\":\"Data source for Tencent Cloud monitoring service\"}}"); - -/***/ }), - -/***/ "./datasource/tc_monitor sync recursive ^.*$": -/*!*****************************************!*\ - !*** ./datasource/tc_monitor sync ^.*$ ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var map = { - ".": "./datasource/tc_monitor/index.ts", - "./": "./datasource/tc_monitor/index.ts", - "./MonitorDatasource": "./datasource/tc_monitor/MonitorDatasource.ts", - "./MonitorDatasource.ts": "./datasource/tc_monitor/MonitorDatasource.ts", - "./_base/datasource": "./datasource/tc_monitor/_base/datasource.ts", - "./_base/datasource.ts": "./datasource/tc_monitor/_base/datasource.ts", - "./_base/query": "./datasource/tc_monitor/_base/query.ts", - "./_base/query.ts": "./datasource/tc_monitor/_base/query.ts", - "./_base/query_filter": "./datasource/tc_monitor/_base/query_filter.ts", - "./_base/query_filter.ts": "./datasource/tc_monitor/_base/query_filter.ts", - "./_base/types": "./datasource/tc_monitor/_base/types.ts", - "./_base/types.ts": "./datasource/tc_monitor/_base/types.ts", - "./apigateway/datasource": "./datasource/tc_monitor/apigateway/datasource.ts", - "./apigateway/datasource.ts": "./datasource/tc_monitor/apigateway/datasource.ts", - "./apigateway/query": "./datasource/tc_monitor/apigateway/query.ts", - "./apigateway/query.ts": "./datasource/tc_monitor/apigateway/query.ts", - "./apigateway/query_def": "./datasource/tc_monitor/apigateway/query_def.ts", - "./apigateway/query_def.ts": "./datasource/tc_monitor/apigateway/query_def.ts", - "./bmIntraLb/datasource": "./datasource/tc_monitor/bmIntraLb/datasource.ts", - "./bmIntraLb/datasource.ts": "./datasource/tc_monitor/bmIntraLb/datasource.ts", - "./bmIntraLb/query": "./datasource/tc_monitor/bmIntraLb/query.ts", - "./bmIntraLb/query.ts": "./datasource/tc_monitor/bmIntraLb/query.ts", - "./bmIntraLb/query_def": "./datasource/tc_monitor/bmIntraLb/query_def.ts", - "./bmIntraLb/query_def.ts": "./datasource/tc_monitor/bmIntraLb/query_def.ts", - "./bm_lb/datasource": "./datasource/tc_monitor/bm_lb/datasource.ts", - "./bm_lb/datasource.ts": "./datasource/tc_monitor/bm_lb/datasource.ts", - "./bm_lb/query": "./datasource/tc_monitor/bm_lb/query.ts", - "./bm_lb/query.ts": "./datasource/tc_monitor/bm_lb/query.ts", - "./bm_lb/query_def": "./datasource/tc_monitor/bm_lb/query_def.ts", - "./bm_lb/query_def.ts": "./datasource/tc_monitor/bm_lb/query_def.ts", - "./bm_pcx/datasource": "./datasource/tc_monitor/bm_pcx/datasource.ts", - "./bm_pcx/datasource.ts": "./datasource/tc_monitor/bm_pcx/datasource.ts", - "./bm_pcx/query": "./datasource/tc_monitor/bm_pcx/query.ts", - "./bm_pcx/query.ts": "./datasource/tc_monitor/bm_pcx/query.ts", - "./bm_pcx/query_def": "./datasource/tc_monitor/bm_pcx/query_def.ts", - "./bm_pcx/query_def.ts": "./datasource/tc_monitor/bm_pcx/query_def.ts", - "./bwp/datasource": "./datasource/tc_monitor/bwp/datasource.ts", - "./bwp/datasource.ts": "./datasource/tc_monitor/bwp/datasource.ts", - "./bwp/query": "./datasource/tc_monitor/bwp/query.ts", - "./bwp/query.ts": "./datasource/tc_monitor/bwp/query.ts", - "./bwp/query_def": "./datasource/tc_monitor/bwp/query_def.ts", - "./bwp/query_def.ts": "./datasource/tc_monitor/bwp/query_def.ts", - "./cbs/datasource": "./datasource/tc_monitor/cbs/datasource.ts", - "./cbs/datasource.ts": "./datasource/tc_monitor/cbs/datasource.ts", - "./cbs/query": "./datasource/tc_monitor/cbs/query.ts", - "./cbs/query.ts": "./datasource/tc_monitor/cbs/query.ts", - "./cbs/query_def": "./datasource/tc_monitor/cbs/query_def.ts", - "./cbs/query_def.ts": "./datasource/tc_monitor/cbs/query_def.ts", - "./cdb/datasource": "./datasource/tc_monitor/cdb/datasource.ts", - "./cdb/datasource.ts": "./datasource/tc_monitor/cdb/datasource.ts", - "./cdb/query": "./datasource/tc_monitor/cdb/query.ts", - "./cdb/query.ts": "./datasource/tc_monitor/cdb/query.ts", - "./cdb/query_def": "./datasource/tc_monitor/cdb/query_def.ts", - "./cdb/query_def.ts": "./datasource/tc_monitor/cdb/query_def.ts", - "./cdn/datasource": "./datasource/tc_monitor/cdn/datasource.ts", - "./cdn/datasource.ts": "./datasource/tc_monitor/cdn/datasource.ts", - "./cdn/query": "./datasource/tc_monitor/cdn/query.ts", - "./cdn/query.ts": "./datasource/tc_monitor/cdn/query.ts", - "./cdn/query_def": "./datasource/tc_monitor/cdn/query_def.ts", - "./cdn/query_def.ts": "./datasource/tc_monitor/cdn/query_def.ts", - "./cdn_province/datasource": "./datasource/tc_monitor/cdn_province/datasource.ts", - "./cdn_province/datasource.ts": "./datasource/tc_monitor/cdn_province/datasource.ts", - "./cdn_province/query": "./datasource/tc_monitor/cdn_province/query.ts", - "./cdn_province/query.ts": "./datasource/tc_monitor/cdn_province/query.ts", - "./cdn_province/query_def": "./datasource/tc_monitor/cdn_province/query_def.ts", - "./cdn_province/query_def.ts": "./datasource/tc_monitor/cdn_province/query_def.ts", - "./ceip_summary/datasource": "./datasource/tc_monitor/ceip_summary/datasource.ts", - "./ceip_summary/datasource.ts": "./datasource/tc_monitor/ceip_summary/datasource.ts", - "./ceip_summary/query": "./datasource/tc_monitor/ceip_summary/query.ts", - "./ceip_summary/query.ts": "./datasource/tc_monitor/ceip_summary/query.ts", - "./ceip_summary/query_def": "./datasource/tc_monitor/ceip_summary/query_def.ts", - "./ceip_summary/query_def.ts": "./datasource/tc_monitor/ceip_summary/query_def.ts", - "./ces/datasource": "./datasource/tc_monitor/ces/datasource.ts", - "./ces/datasource.ts": "./datasource/tc_monitor/ces/datasource.ts", - "./ces/query": "./datasource/tc_monitor/ces/query.ts", - "./ces/query.ts": "./datasource/tc_monitor/ces/query.ts", - "./ces/query_def": "./datasource/tc_monitor/ces/query_def.ts", - "./ces/query_def.ts": "./datasource/tc_monitor/ces/query_def.ts", - "./cfs/datasource": "./datasource/tc_monitor/cfs/datasource.ts", - "./cfs/datasource.ts": "./datasource/tc_monitor/cfs/datasource.ts", - "./cfs/query": "./datasource/tc_monitor/cfs/query.ts", - "./cfs/query.ts": "./datasource/tc_monitor/cfs/query.ts", - "./cfs/query_def": "./datasource/tc_monitor/cfs/query_def.ts", - "./cfs/query_def.ts": "./datasource/tc_monitor/cfs/query_def.ts", - "./ckafka/datasource": "./datasource/tc_monitor/ckafka/datasource.ts", - "./ckafka/datasource.ts": "./datasource/tc_monitor/ckafka/datasource.ts", - "./ckafka/query": "./datasource/tc_monitor/ckafka/query.ts", - "./ckafka/query.ts": "./datasource/tc_monitor/ckafka/query.ts", - "./ckafka/query_def": "./datasource/tc_monitor/ckafka/query_def.ts", - "./ckafka/query_def.ts": "./datasource/tc_monitor/ckafka/query_def.ts", - "./clb/datasource": "./datasource/tc_monitor/clb/datasource.ts", - "./clb/datasource.ts": "./datasource/tc_monitor/clb/datasource.ts", - "./clb/query": "./datasource/tc_monitor/clb/query.ts", - "./clb/query.ts": "./datasource/tc_monitor/clb/query.ts", - "./clb/query_def": "./datasource/tc_monitor/clb/query_def.ts", - "./clb/query_def.ts": "./datasource/tc_monitor/clb/query_def.ts", - "./cls/datasource": "./datasource/tc_monitor/cls/datasource.ts", - "./cls/datasource.ts": "./datasource/tc_monitor/cls/datasource.ts", - "./cls/query": "./datasource/tc_monitor/cls/query.ts", - "./cls/query.ts": "./datasource/tc_monitor/cls/query.ts", - "./cls/query_def": "./datasource/tc_monitor/cls/query_def.ts", - "./cls/query_def.ts": "./datasource/tc_monitor/cls/query_def.ts", - "./cmq/datasource": "./datasource/tc_monitor/cmq/datasource.ts", - "./cmq/datasource.ts": "./datasource/tc_monitor/cmq/datasource.ts", - "./cmq/query": "./datasource/tc_monitor/cmq/query.ts", - "./cmq/query.ts": "./datasource/tc_monitor/cmq/query.ts", - "./cmq/query_def": "./datasource/tc_monitor/cmq/query_def.ts", - "./cmq/query_def.ts": "./datasource/tc_monitor/cmq/query_def.ts", - "./cmq_topic/datasource": "./datasource/tc_monitor/cmq_topic/datasource.ts", - "./cmq_topic/datasource.ts": "./datasource/tc_monitor/cmq_topic/datasource.ts", - "./cmq_topic/query": "./datasource/tc_monitor/cmq_topic/query.ts", - "./cmq_topic/query.ts": "./datasource/tc_monitor/cmq_topic/query.ts", - "./cmq_topic/query_def": "./datasource/tc_monitor/cmq_topic/query_def.ts", - "./cmq_topic/query_def.ts": "./datasource/tc_monitor/cmq_topic/query_def.ts", - "./cos/datasource": "./datasource/tc_monitor/cos/datasource.ts", - "./cos/datasource.ts": "./datasource/tc_monitor/cos/datasource.ts", - "./cos/query_def": "./datasource/tc_monitor/cos/query_def.ts", - "./cos/query_def.ts": "./datasource/tc_monitor/cos/query_def.ts", - "./cpm/datasource": "./datasource/tc_monitor/cpm/datasource.ts", - "./cpm/datasource.ts": "./datasource/tc_monitor/cpm/datasource.ts", - "./cpm/query": "./datasource/tc_monitor/cpm/query.ts", - "./cpm/query.ts": "./datasource/tc_monitor/cpm/query.ts", - "./cpm/query_def": "./datasource/tc_monitor/cpm/query_def.ts", - "./cpm/query_def.ts": "./datasource/tc_monitor/cpm/query_def.ts", - "./cvm/datasource": "./datasource/tc_monitor/cvm/datasource.ts", - "./cvm/datasource.ts": "./datasource/tc_monitor/cvm/datasource.ts", - "./cvm/query": "./datasource/tc_monitor/cvm/query.ts", - "./cvm/query.ts": "./datasource/tc_monitor/cvm/query.ts", - "./cvm/query_def": "./datasource/tc_monitor/cvm/query_def.ts", - "./cvm/query_def.ts": "./datasource/tc_monitor/cvm/query_def.ts", - "./cynosdb_mysql/datasource": "./datasource/tc_monitor/cynosdb_mysql/datasource.ts", - "./cynosdb_mysql/datasource.ts": "./datasource/tc_monitor/cynosdb_mysql/datasource.ts", - "./cynosdb_mysql/query": "./datasource/tc_monitor/cynosdb_mysql/query.ts", - "./cynosdb_mysql/query.ts": "./datasource/tc_monitor/cynosdb_mysql/query.ts", - "./cynosdb_mysql/query_def": "./datasource/tc_monitor/cynosdb_mysql/query_def.ts", - "./cynosdb_mysql/query_def.ts": "./datasource/tc_monitor/cynosdb_mysql/query_def.ts", - "./dc/datasource": "./datasource/tc_monitor/dc/datasource.ts", - "./dc/datasource.ts": "./datasource/tc_monitor/dc/datasource.ts", - "./dc/query": "./datasource/tc_monitor/dc/query.ts", - "./dc/query.ts": "./datasource/tc_monitor/dc/query.ts", - "./dc/query_def": "./datasource/tc_monitor/dc/query_def.ts", - "./dc/query_def.ts": "./datasource/tc_monitor/dc/query_def.ts", - "./dcdb/datasource": "./datasource/tc_monitor/dcdb/datasource.ts", - "./dcdb/datasource.ts": "./datasource/tc_monitor/dcdb/datasource.ts", - "./dcdb/query": "./datasource/tc_monitor/dcdb/query.ts", - "./dcdb/query.ts": "./datasource/tc_monitor/dcdb/query.ts", - "./dcdb/query_def": "./datasource/tc_monitor/dcdb/query_def.ts", - "./dcdb/query_def.ts": "./datasource/tc_monitor/dcdb/query_def.ts", - "./dcg/datasource": "./datasource/tc_monitor/dcg/datasource.ts", - "./dcg/datasource.ts": "./datasource/tc_monitor/dcg/datasource.ts", - "./dcg/query": "./datasource/tc_monitor/dcg/query.ts", - "./dcg/query.ts": "./datasource/tc_monitor/dcg/query.ts", - "./dcg/query_def": "./datasource/tc_monitor/dcg/query_def.ts", - "./dcg/query_def.ts": "./datasource/tc_monitor/dcg/query_def.ts", - "./dcx/datasource": "./datasource/tc_monitor/dcx/datasource.ts", - "./dcx/datasource.ts": "./datasource/tc_monitor/dcx/datasource.ts", - "./dcx/query": "./datasource/tc_monitor/dcx/query.ts", - "./dcx/query.ts": "./datasource/tc_monitor/dcx/query.ts", - "./dcx/query_def": "./datasource/tc_monitor/dcx/query_def.ts", - "./dcx/query_def.ts": "./datasource/tc_monitor/dcx/query_def.ts", - "./ecdn/datasource": "./datasource/tc_monitor/ecdn/datasource.ts", - "./ecdn/datasource.ts": "./datasource/tc_monitor/ecdn/datasource.ts", - "./ecdn/query": "./datasource/tc_monitor/ecdn/query.ts", - "./ecdn/query.ts": "./datasource/tc_monitor/ecdn/query.ts", - "./ecdn/query_def": "./datasource/tc_monitor/ecdn/query_def.ts", - "./ecdn/query_def.ts": "./datasource/tc_monitor/ecdn/query_def.ts", - "./ecm/datasource": "./datasource/tc_monitor/ecm/datasource.ts", - "./ecm/datasource.ts": "./datasource/tc_monitor/ecm/datasource.ts", - "./ecm/query": "./datasource/tc_monitor/ecm/query.ts", - "./ecm/query.ts": "./datasource/tc_monitor/ecm/query.ts", - "./ecm/query_def": "./datasource/tc_monitor/ecm/query_def.ts", - "./ecm/query_def.ts": "./datasource/tc_monitor/ecm/query_def.ts", - "./ecm_block_storage/datasource": "./datasource/tc_monitor/ecm_block_storage/datasource.ts", - "./ecm_block_storage/datasource.ts": "./datasource/tc_monitor/ecm_block_storage/datasource.ts", - "./ecm_block_storage/query": "./datasource/tc_monitor/ecm_block_storage/query.ts", - "./ecm_block_storage/query.ts": "./datasource/tc_monitor/ecm_block_storage/query.ts", - "./ecm_block_storage/query_def": "./datasource/tc_monitor/ecm_block_storage/query_def.ts", - "./ecm_block_storage/query_def.ts": "./datasource/tc_monitor/ecm_block_storage/query_def.ts", - "./ecm_lb/datasource": "./datasource/tc_monitor/ecm_lb/datasource.ts", - "./ecm_lb/datasource.ts": "./datasource/tc_monitor/ecm_lb/datasource.ts", - "./ecm_lb/query": "./datasource/tc_monitor/ecm_lb/query.ts", - "./ecm_lb/query.ts": "./datasource/tc_monitor/ecm_lb/query.ts", - "./ecm_lb/query_def": "./datasource/tc_monitor/ecm_lb/query_def.ts", - "./ecm_lb/query_def.ts": "./datasource/tc_monitor/ecm_lb/query_def.ts", - "./gse/datasource": "./datasource/tc_monitor/gse/datasource.ts", - "./gse/datasource.ts": "./datasource/tc_monitor/gse/datasource.ts", - "./gse/query": "./datasource/tc_monitor/gse/query.ts", - "./gse/query.ts": "./datasource/tc_monitor/gse/query.ts", - "./gse/query_def": "./datasource/tc_monitor/gse/query_def.ts", - "./gse/query_def.ts": "./datasource/tc_monitor/gse/query_def.ts", - "./index": "./datasource/tc_monitor/index.ts", - "./index.ts": "./datasource/tc_monitor/index.ts", - "./lb/datasource": "./datasource/tc_monitor/lb/datasource.ts", - "./lb/datasource.ts": "./datasource/tc_monitor/lb/datasource.ts", - "./lb/query": "./datasource/tc_monitor/lb/query.ts", - "./lb/query.ts": "./datasource/tc_monitor/lb/query.ts", - "./lb/query_def": "./datasource/tc_monitor/lb/query_def.ts", - "./lb/query_def.ts": "./datasource/tc_monitor/lb/query_def.ts", - "./lighthouse/datasource": "./datasource/tc_monitor/lighthouse/datasource.ts", - "./lighthouse/datasource.ts": "./datasource/tc_monitor/lighthouse/datasource.ts", - "./lighthouse/query": "./datasource/tc_monitor/lighthouse/query.ts", - "./lighthouse/query.ts": "./datasource/tc_monitor/lighthouse/query.ts", - "./lighthouse/query_def": "./datasource/tc_monitor/lighthouse/query_def.ts", - "./lighthouse/query_def.ts": "./datasource/tc_monitor/lighthouse/query_def.ts", - "./mongodb/datasource": "./datasource/tc_monitor/mongodb/datasource.ts", - "./mongodb/datasource.ts": "./datasource/tc_monitor/mongodb/datasource.ts", - "./mongodb/query": "./datasource/tc_monitor/mongodb/query.ts", - "./mongodb/query.ts": "./datasource/tc_monitor/mongodb/query.ts", - "./mongodb/query_def": "./datasource/tc_monitor/mongodb/query_def.ts", - "./mongodb/query_def.ts": "./datasource/tc_monitor/mongodb/query_def.ts", - "./mr/datasource": "./datasource/tc_monitor/mr/datasource.ts", - "./mr/datasource.ts": "./datasource/tc_monitor/mr/datasource.ts", - "./mr/query": "./datasource/tc_monitor/mr/query.ts", - "./mr/query.ts": "./datasource/tc_monitor/mr/query.ts", - "./mr/query_def": "./datasource/tc_monitor/mr/query_def.ts", - "./mr/query_def.ts": "./datasource/tc_monitor/mr/query_def.ts", - "./nat_gateway/datasource": "./datasource/tc_monitor/nat_gateway/datasource.ts", - "./nat_gateway/datasource.ts": "./datasource/tc_monitor/nat_gateway/datasource.ts", - "./nat_gateway/query": "./datasource/tc_monitor/nat_gateway/query.ts", - "./nat_gateway/query.ts": "./datasource/tc_monitor/nat_gateway/query.ts", - "./nat_gateway/query_def": "./datasource/tc_monitor/nat_gateway/query_def.ts", - "./nat_gateway/query_def.ts": "./datasource/tc_monitor/nat_gateway/query_def.ts", - "./ov_cdn/datasource": "./datasource/tc_monitor/ov_cdn/datasource.ts", - "./ov_cdn/datasource.ts": "./datasource/tc_monitor/ov_cdn/datasource.ts", - "./ov_cdn/query": "./datasource/tc_monitor/ov_cdn/query.ts", - "./ov_cdn/query.ts": "./datasource/tc_monitor/ov_cdn/query.ts", - "./ov_cdn/query_def": "./datasource/tc_monitor/ov_cdn/query_def.ts", - "./ov_cdn/query_def.ts": "./datasource/tc_monitor/ov_cdn/query_def.ts", - "./pcx/datasource": "./datasource/tc_monitor/pcx/datasource.ts", - "./pcx/datasource.ts": "./datasource/tc_monitor/pcx/datasource.ts", - "./pcx/query": "./datasource/tc_monitor/pcx/query.ts", - "./pcx/query.ts": "./datasource/tc_monitor/pcx/query.ts", - "./pcx/query_def": "./datasource/tc_monitor/pcx/query_def.ts", - "./pcx/query_def.ts": "./datasource/tc_monitor/pcx/query_def.ts", - "./postgresql/datasource": "./datasource/tc_monitor/postgresql/datasource.ts", - "./postgresql/datasource.ts": "./datasource/tc_monitor/postgresql/datasource.ts", - "./postgresql/query": "./datasource/tc_monitor/postgresql/query.ts", - "./postgresql/query.ts": "./datasource/tc_monitor/postgresql/query.ts", - "./postgresql/query_def": "./datasource/tc_monitor/postgresql/query_def.ts", - "./postgresql/query_def.ts": "./datasource/tc_monitor/postgresql/query_def.ts", - "./qaap/datasource": "./datasource/tc_monitor/qaap/datasource.ts", - "./qaap/datasource.ts": "./datasource/tc_monitor/qaap/datasource.ts", - "./qaap/query": "./datasource/tc_monitor/qaap/query.ts", - "./qaap/query.ts": "./datasource/tc_monitor/qaap/query.ts", - "./qaap/query_def": "./datasource/tc_monitor/qaap/query_def.ts", - "./qaap/query_def.ts": "./datasource/tc_monitor/qaap/query_def.ts", - "./redis/datasource": "./datasource/tc_monitor/redis/datasource.ts", - "./redis/datasource.ts": "./datasource/tc_monitor/redis/datasource.ts", - "./redis/query": "./datasource/tc_monitor/redis/query.ts", - "./redis/query.ts": "./datasource/tc_monitor/redis/query.ts", - "./redis/query_def": "./datasource/tc_monitor/redis/query_def.ts", - "./redis/query_def.ts": "./datasource/tc_monitor/redis/query_def.ts", - "./redis_mem/datasource": "./datasource/tc_monitor/redis_mem/datasource.ts", - "./redis_mem/datasource.ts": "./datasource/tc_monitor/redis_mem/datasource.ts", - "./redis_mem/query": "./datasource/tc_monitor/redis_mem/query.ts", - "./redis_mem/query.ts": "./datasource/tc_monitor/redis_mem/query.ts", - "./redis_mem/query_def": "./datasource/tc_monitor/redis_mem/query_def.ts", - "./redis_mem/query_def.ts": "./datasource/tc_monitor/redis_mem/query_def.ts", - "./scf/datasource": "./datasource/tc_monitor/scf/datasource.ts", - "./scf/datasource.ts": "./datasource/tc_monitor/scf/datasource.ts", - "./scf/query": "./datasource/tc_monitor/scf/query.ts", - "./scf/query.ts": "./datasource/tc_monitor/scf/query.ts", - "./scf/query_def": "./datasource/tc_monitor/scf/query_def.ts", - "./scf/query_def.ts": "./datasource/tc_monitor/scf/query_def.ts", - "./sqlserver/datasource": "./datasource/tc_monitor/sqlserver/datasource.ts", - "./sqlserver/datasource.ts": "./datasource/tc_monitor/sqlserver/datasource.ts", - "./sqlserver/query": "./datasource/tc_monitor/sqlserver/query.ts", - "./sqlserver/query.ts": "./datasource/tc_monitor/sqlserver/query.ts", - "./sqlserver/query_def": "./datasource/tc_monitor/sqlserver/query_def.ts", - "./sqlserver/query_def.ts": "./datasource/tc_monitor/sqlserver/query_def.ts", - "./tcaplus/datasource": "./datasource/tc_monitor/tcaplus/datasource.ts", - "./tcaplus/datasource.ts": "./datasource/tc_monitor/tcaplus/datasource.ts", - "./tcaplus/query": "./datasource/tc_monitor/tcaplus/query.ts", - "./tcaplus/query.ts": "./datasource/tc_monitor/tcaplus/query.ts", - "./tcaplus/query_def": "./datasource/tc_monitor/tcaplus/query_def.ts", - "./tcaplus/query_def.ts": "./datasource/tc_monitor/tcaplus/query_def.ts", - "./tdmq/datasource": "./datasource/tc_monitor/tdmq/datasource.ts", - "./tdmq/datasource.ts": "./datasource/tc_monitor/tdmq/datasource.ts", - "./tdmq/query": "./datasource/tc_monitor/tdmq/query.ts", - "./tdmq/query.ts": "./datasource/tc_monitor/tdmq/query.ts", - "./tdmq/query_def": "./datasource/tc_monitor/tdmq/query_def.ts", - "./tdmq/query_def.ts": "./datasource/tc_monitor/tdmq/query_def.ts", - "./tdmq_rabbitmq/datasource": "./datasource/tc_monitor/tdmq_rabbitmq/datasource.ts", - "./tdmq_rabbitmq/datasource.ts": "./datasource/tc_monitor/tdmq_rabbitmq/datasource.ts", - "./tdmq_rabbitmq/query": "./datasource/tc_monitor/tdmq_rabbitmq/query.ts", - "./tdmq_rabbitmq/query.ts": "./datasource/tc_monitor/tdmq_rabbitmq/query.ts", - "./tdmq_rabbitmq/query_def": "./datasource/tc_monitor/tdmq_rabbitmq/query_def.ts", - "./tdmq_rabbitmq/query_def.ts": "./datasource/tc_monitor/tdmq_rabbitmq/query_def.ts", - "./tdmq_rocketmq/datasource": "./datasource/tc_monitor/tdmq_rocketmq/datasource.ts", - "./tdmq_rocketmq/datasource.ts": "./datasource/tc_monitor/tdmq_rocketmq/datasource.ts", - "./tdmq_rocketmq/query": "./datasource/tc_monitor/tdmq_rocketmq/query.ts", - "./tdmq_rocketmq/query.ts": "./datasource/tc_monitor/tdmq_rocketmq/query.ts", - "./tdmq_rocketmq/query_def": "./datasource/tc_monitor/tdmq_rocketmq/query_def.ts", - "./tdmq_rocketmq/query_def.ts": "./datasource/tc_monitor/tdmq_rocketmq/query_def.ts", - "./tke/datasource": "./datasource/tc_monitor/tke/datasource.ts", - "./tke/datasource.ts": "./datasource/tc_monitor/tke/datasource.ts", - "./tke/query": "./datasource/tc_monitor/tke/query.ts", - "./tke/query.ts": "./datasource/tc_monitor/tke/query.ts", - "./tke/query_def": "./datasource/tc_monitor/tke/query_def.ts", - "./tke/query_def.ts": "./datasource/tc_monitor/tke/query_def.ts", - "./tsf/datasource": "./datasource/tc_monitor/tsf/datasource.ts", - "./tsf/datasource.ts": "./datasource/tc_monitor/tsf/datasource.ts", - "./tsf/query": "./datasource/tc_monitor/tsf/query.ts", - "./tsf/query.ts": "./datasource/tc_monitor/tsf/query.ts", - "./tsf/query_def": "./datasource/tc_monitor/tsf/query_def.ts", - "./tsf/query_def.ts": "./datasource/tc_monitor/tsf/query_def.ts", - "./v_clb/datasource": "./datasource/tc_monitor/v_clb/datasource.ts", - "./v_clb/datasource.ts": "./datasource/tc_monitor/v_clb/datasource.ts", - "./v_clb/query": "./datasource/tc_monitor/v_clb/query.ts", - "./v_clb/query.ts": "./datasource/tc_monitor/v_clb/query.ts", - "./v_clb/query_def": "./datasource/tc_monitor/v_clb/query_def.ts", - "./v_clb/query_def.ts": "./datasource/tc_monitor/v_clb/query_def.ts", - "./vbc/datasource": "./datasource/tc_monitor/vbc/datasource.ts", - "./vbc/datasource.ts": "./datasource/tc_monitor/vbc/datasource.ts", - "./vbc/query": "./datasource/tc_monitor/vbc/query.ts", - "./vbc/query.ts": "./datasource/tc_monitor/vbc/query.ts", - "./vbc/query_def": "./datasource/tc_monitor/vbc/query_def.ts", - "./vbc/query_def.ts": "./datasource/tc_monitor/vbc/query_def.ts", - "./vpc_net_detect/datasource": "./datasource/tc_monitor/vpc_net_detect/datasource.ts", - "./vpc_net_detect/datasource.ts": "./datasource/tc_monitor/vpc_net_detect/datasource.ts", - "./vpc_net_detect/query": "./datasource/tc_monitor/vpc_net_detect/query.ts", - "./vpc_net_detect/query.ts": "./datasource/tc_monitor/vpc_net_detect/query.ts", - "./vpc_net_detect/query_def": "./datasource/tc_monitor/vpc_net_detect/query_def.ts", - "./vpc_net_detect/query_def.ts": "./datasource/tc_monitor/vpc_net_detect/query_def.ts", - "./vpngw/datasource": "./datasource/tc_monitor/vpngw/datasource.ts", - "./vpngw/datasource.ts": "./datasource/tc_monitor/vpngw/datasource.ts", - "./vpngw/query": "./datasource/tc_monitor/vpngw/query.ts", - "./vpngw/query.ts": "./datasource/tc_monitor/vpngw/query.ts", - "./vpngw/query_def": "./datasource/tc_monitor/vpngw/query_def.ts", - "./vpngw/query_def.ts": "./datasource/tc_monitor/vpngw/query_def.ts", - "./vpnx/datasource": "./datasource/tc_monitor/vpnx/datasource.ts", - "./vpnx/datasource.ts": "./datasource/tc_monitor/vpnx/datasource.ts", - "./vpnx/query": "./datasource/tc_monitor/vpnx/query.ts", - "./vpnx/query.ts": "./datasource/tc_monitor/vpnx/query.ts", - "./vpnx/query_def": "./datasource/tc_monitor/vpnx/query_def.ts", - "./vpnx/query_def.ts": "./datasource/tc_monitor/vpnx/query_def.ts", - "./waf/datasource": "./datasource/tc_monitor/waf/datasource.ts", - "./waf/datasource.ts": "./datasource/tc_monitor/waf/datasource.ts", - "./waf/query": "./datasource/tc_monitor/waf/query.ts", - "./waf/query.ts": "./datasource/tc_monitor/waf/query.ts", - "./waf/query_def": "./datasource/tc_monitor/waf/query_def.ts", - "./waf/query_def.ts": "./datasource/tc_monitor/waf/query_def.ts" -}; - - -function webpackContext(req) { - var id = webpackContextResolve(req); - return __webpack_require__(id); -} -function webpackContextResolve(req) { - if(!__webpack_require__.o(map, req)) { - var e = new Error("Cannot find module '" + req + "'"); - e.code = 'MODULE_NOT_FOUND'; - throw e; - } - return map[req]; -} -webpackContext.keys = function webpackContextKeys() { - return Object.keys(map); -}; -webpackContext.resolve = webpackContextResolve; -module.exports = webpackContext; -webpackContext.id = "./datasource/tc_monitor sync recursive ^.*$"; - -/***/ }), - -/***/ "./datasource/tc_monitor sync recursive ^\\.\\/[a-zA-Z]\\w+\\/(datasource)|(query(_def)?)\\.ts$": -/*!***************************************************************************************!*\ - !*** ./datasource/tc_monitor sync ^\.\/[a-zA-Z]\w+\/(datasource)|(query(_def)?)\.ts$ ***! - \***************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var map = { - "./_base/query.ts": "./datasource/tc_monitor/_base/query.ts", - "./apigateway/datasource": "./datasource/tc_monitor/apigateway/datasource.ts", - "./apigateway/datasource.ts": "./datasource/tc_monitor/apigateway/datasource.ts", - "./apigateway/query.ts": "./datasource/tc_monitor/apigateway/query.ts", - "./apigateway/query_def.ts": "./datasource/tc_monitor/apigateway/query_def.ts", - "./bmIntraLb/datasource": "./datasource/tc_monitor/bmIntraLb/datasource.ts", - "./bmIntraLb/datasource.ts": "./datasource/tc_monitor/bmIntraLb/datasource.ts", - "./bmIntraLb/query.ts": "./datasource/tc_monitor/bmIntraLb/query.ts", - "./bmIntraLb/query_def.ts": "./datasource/tc_monitor/bmIntraLb/query_def.ts", - "./bm_lb/datasource": "./datasource/tc_monitor/bm_lb/datasource.ts", - "./bm_lb/datasource.ts": "./datasource/tc_monitor/bm_lb/datasource.ts", - "./bm_lb/query.ts": "./datasource/tc_monitor/bm_lb/query.ts", - "./bm_lb/query_def.ts": "./datasource/tc_monitor/bm_lb/query_def.ts", - "./bm_pcx/datasource": "./datasource/tc_monitor/bm_pcx/datasource.ts", - "./bm_pcx/datasource.ts": "./datasource/tc_monitor/bm_pcx/datasource.ts", - "./bm_pcx/query.ts": "./datasource/tc_monitor/bm_pcx/query.ts", - "./bm_pcx/query_def.ts": "./datasource/tc_monitor/bm_pcx/query_def.ts", - "./bwp/datasource": "./datasource/tc_monitor/bwp/datasource.ts", - "./bwp/datasource.ts": "./datasource/tc_monitor/bwp/datasource.ts", - "./bwp/query.ts": "./datasource/tc_monitor/bwp/query.ts", - "./bwp/query_def.ts": "./datasource/tc_monitor/bwp/query_def.ts", - "./cbs/datasource": "./datasource/tc_monitor/cbs/datasource.ts", - "./cbs/datasource.ts": "./datasource/tc_monitor/cbs/datasource.ts", - "./cbs/query.ts": "./datasource/tc_monitor/cbs/query.ts", - "./cbs/query_def.ts": "./datasource/tc_monitor/cbs/query_def.ts", - "./cdb/datasource": "./datasource/tc_monitor/cdb/datasource.ts", - "./cdb/datasource.ts": "./datasource/tc_monitor/cdb/datasource.ts", - "./cdb/query.ts": "./datasource/tc_monitor/cdb/query.ts", - "./cdb/query_def.ts": "./datasource/tc_monitor/cdb/query_def.ts", - "./cdn/datasource": "./datasource/tc_monitor/cdn/datasource.ts", - "./cdn/datasource.ts": "./datasource/tc_monitor/cdn/datasource.ts", - "./cdn/query.ts": "./datasource/tc_monitor/cdn/query.ts", - "./cdn/query_def.ts": "./datasource/tc_monitor/cdn/query_def.ts", - "./cdn_province/datasource": "./datasource/tc_monitor/cdn_province/datasource.ts", - "./cdn_province/datasource.ts": "./datasource/tc_monitor/cdn_province/datasource.ts", - "./cdn_province/query.ts": "./datasource/tc_monitor/cdn_province/query.ts", - "./cdn_province/query_def.ts": "./datasource/tc_monitor/cdn_province/query_def.ts", - "./ceip_summary/datasource": "./datasource/tc_monitor/ceip_summary/datasource.ts", - "./ceip_summary/datasource.ts": "./datasource/tc_monitor/ceip_summary/datasource.ts", - "./ceip_summary/query.ts": "./datasource/tc_monitor/ceip_summary/query.ts", - "./ceip_summary/query_def.ts": "./datasource/tc_monitor/ceip_summary/query_def.ts", - "./ces/datasource": "./datasource/tc_monitor/ces/datasource.ts", - "./ces/datasource.ts": "./datasource/tc_monitor/ces/datasource.ts", - "./ces/query.ts": "./datasource/tc_monitor/ces/query.ts", - "./ces/query_def.ts": "./datasource/tc_monitor/ces/query_def.ts", - "./cfs/datasource": "./datasource/tc_monitor/cfs/datasource.ts", - "./cfs/datasource.ts": "./datasource/tc_monitor/cfs/datasource.ts", - "./cfs/query.ts": "./datasource/tc_monitor/cfs/query.ts", - "./cfs/query_def.ts": "./datasource/tc_monitor/cfs/query_def.ts", - "./ckafka/datasource": "./datasource/tc_monitor/ckafka/datasource.ts", - "./ckafka/datasource.ts": "./datasource/tc_monitor/ckafka/datasource.ts", - "./ckafka/query.ts": "./datasource/tc_monitor/ckafka/query.ts", - "./ckafka/query_def.ts": "./datasource/tc_monitor/ckafka/query_def.ts", - "./clb/datasource": "./datasource/tc_monitor/clb/datasource.ts", - "./clb/datasource.ts": "./datasource/tc_monitor/clb/datasource.ts", - "./clb/query.ts": "./datasource/tc_monitor/clb/query.ts", - "./clb/query_def.ts": "./datasource/tc_monitor/clb/query_def.ts", - "./cls/datasource": "./datasource/tc_monitor/cls/datasource.ts", - "./cls/datasource.ts": "./datasource/tc_monitor/cls/datasource.ts", - "./cls/query.ts": "./datasource/tc_monitor/cls/query.ts", - "./cls/query_def.ts": "./datasource/tc_monitor/cls/query_def.ts", - "./cmq/datasource": "./datasource/tc_monitor/cmq/datasource.ts", - "./cmq/datasource.ts": "./datasource/tc_monitor/cmq/datasource.ts", - "./cmq/query.ts": "./datasource/tc_monitor/cmq/query.ts", - "./cmq/query_def.ts": "./datasource/tc_monitor/cmq/query_def.ts", - "./cmq_topic/datasource": "./datasource/tc_monitor/cmq_topic/datasource.ts", - "./cmq_topic/datasource.ts": "./datasource/tc_monitor/cmq_topic/datasource.ts", - "./cmq_topic/query.ts": "./datasource/tc_monitor/cmq_topic/query.ts", - "./cmq_topic/query_def.ts": "./datasource/tc_monitor/cmq_topic/query_def.ts", - "./cos/datasource": "./datasource/tc_monitor/cos/datasource.ts", - "./cos/datasource.ts": "./datasource/tc_monitor/cos/datasource.ts", - "./cos/query_def.ts": "./datasource/tc_monitor/cos/query_def.ts", - "./cpm/datasource": "./datasource/tc_monitor/cpm/datasource.ts", - "./cpm/datasource.ts": "./datasource/tc_monitor/cpm/datasource.ts", - "./cpm/query.ts": "./datasource/tc_monitor/cpm/query.ts", - "./cpm/query_def.ts": "./datasource/tc_monitor/cpm/query_def.ts", - "./cvm/datasource": "./datasource/tc_monitor/cvm/datasource.ts", - "./cvm/datasource.ts": "./datasource/tc_monitor/cvm/datasource.ts", - "./cvm/query.ts": "./datasource/tc_monitor/cvm/query.ts", - "./cvm/query_def.ts": "./datasource/tc_monitor/cvm/query_def.ts", - "./cynosdb_mysql/datasource": "./datasource/tc_monitor/cynosdb_mysql/datasource.ts", - "./cynosdb_mysql/datasource.ts": "./datasource/tc_monitor/cynosdb_mysql/datasource.ts", - "./cynosdb_mysql/query.ts": "./datasource/tc_monitor/cynosdb_mysql/query.ts", - "./cynosdb_mysql/query_def.ts": "./datasource/tc_monitor/cynosdb_mysql/query_def.ts", - "./dc/datasource": "./datasource/tc_monitor/dc/datasource.ts", - "./dc/datasource.ts": "./datasource/tc_monitor/dc/datasource.ts", - "./dc/query.ts": "./datasource/tc_monitor/dc/query.ts", - "./dc/query_def.ts": "./datasource/tc_monitor/dc/query_def.ts", - "./dcdb/datasource": "./datasource/tc_monitor/dcdb/datasource.ts", - "./dcdb/datasource.ts": "./datasource/tc_monitor/dcdb/datasource.ts", - "./dcdb/query.ts": "./datasource/tc_monitor/dcdb/query.ts", - "./dcdb/query_def.ts": "./datasource/tc_monitor/dcdb/query_def.ts", - "./dcg/datasource": "./datasource/tc_monitor/dcg/datasource.ts", - "./dcg/datasource.ts": "./datasource/tc_monitor/dcg/datasource.ts", - "./dcg/query.ts": "./datasource/tc_monitor/dcg/query.ts", - "./dcg/query_def.ts": "./datasource/tc_monitor/dcg/query_def.ts", - "./dcx/datasource": "./datasource/tc_monitor/dcx/datasource.ts", - "./dcx/datasource.ts": "./datasource/tc_monitor/dcx/datasource.ts", - "./dcx/query.ts": "./datasource/tc_monitor/dcx/query.ts", - "./dcx/query_def.ts": "./datasource/tc_monitor/dcx/query_def.ts", - "./ecdn/datasource": "./datasource/tc_monitor/ecdn/datasource.ts", - "./ecdn/datasource.ts": "./datasource/tc_monitor/ecdn/datasource.ts", - "./ecdn/query.ts": "./datasource/tc_monitor/ecdn/query.ts", - "./ecdn/query_def.ts": "./datasource/tc_monitor/ecdn/query_def.ts", - "./ecm/datasource": "./datasource/tc_monitor/ecm/datasource.ts", - "./ecm/datasource.ts": "./datasource/tc_monitor/ecm/datasource.ts", - "./ecm/query.ts": "./datasource/tc_monitor/ecm/query.ts", - "./ecm/query_def.ts": "./datasource/tc_monitor/ecm/query_def.ts", - "./ecm_block_storage/datasource": "./datasource/tc_monitor/ecm_block_storage/datasource.ts", - "./ecm_block_storage/datasource.ts": "./datasource/tc_monitor/ecm_block_storage/datasource.ts", - "./ecm_block_storage/query.ts": "./datasource/tc_monitor/ecm_block_storage/query.ts", - "./ecm_block_storage/query_def.ts": "./datasource/tc_monitor/ecm_block_storage/query_def.ts", - "./ecm_lb/datasource": "./datasource/tc_monitor/ecm_lb/datasource.ts", - "./ecm_lb/datasource.ts": "./datasource/tc_monitor/ecm_lb/datasource.ts", - "./ecm_lb/query.ts": "./datasource/tc_monitor/ecm_lb/query.ts", - "./ecm_lb/query_def.ts": "./datasource/tc_monitor/ecm_lb/query_def.ts", - "./gse/datasource": "./datasource/tc_monitor/gse/datasource.ts", - "./gse/datasource.ts": "./datasource/tc_monitor/gse/datasource.ts", - "./gse/query.ts": "./datasource/tc_monitor/gse/query.ts", - "./gse/query_def.ts": "./datasource/tc_monitor/gse/query_def.ts", - "./lb/datasource": "./datasource/tc_monitor/lb/datasource.ts", - "./lb/datasource.ts": "./datasource/tc_monitor/lb/datasource.ts", - "./lb/query.ts": "./datasource/tc_monitor/lb/query.ts", - "./lb/query_def.ts": "./datasource/tc_monitor/lb/query_def.ts", - "./lighthouse/datasource": "./datasource/tc_monitor/lighthouse/datasource.ts", - "./lighthouse/datasource.ts": "./datasource/tc_monitor/lighthouse/datasource.ts", - "./lighthouse/query.ts": "./datasource/tc_monitor/lighthouse/query.ts", - "./lighthouse/query_def.ts": "./datasource/tc_monitor/lighthouse/query_def.ts", - "./mongodb/datasource": "./datasource/tc_monitor/mongodb/datasource.ts", - "./mongodb/datasource.ts": "./datasource/tc_monitor/mongodb/datasource.ts", - "./mongodb/query.ts": "./datasource/tc_monitor/mongodb/query.ts", - "./mongodb/query_def.ts": "./datasource/tc_monitor/mongodb/query_def.ts", - "./mr/datasource": "./datasource/tc_monitor/mr/datasource.ts", - "./mr/datasource.ts": "./datasource/tc_monitor/mr/datasource.ts", - "./mr/query.ts": "./datasource/tc_monitor/mr/query.ts", - "./mr/query_def.ts": "./datasource/tc_monitor/mr/query_def.ts", - "./nat_gateway/datasource": "./datasource/tc_monitor/nat_gateway/datasource.ts", - "./nat_gateway/datasource.ts": "./datasource/tc_monitor/nat_gateway/datasource.ts", - "./nat_gateway/query.ts": "./datasource/tc_monitor/nat_gateway/query.ts", - "./nat_gateway/query_def.ts": "./datasource/tc_monitor/nat_gateway/query_def.ts", - "./ov_cdn/datasource": "./datasource/tc_monitor/ov_cdn/datasource.ts", - "./ov_cdn/datasource.ts": "./datasource/tc_monitor/ov_cdn/datasource.ts", - "./ov_cdn/query.ts": "./datasource/tc_monitor/ov_cdn/query.ts", - "./ov_cdn/query_def.ts": "./datasource/tc_monitor/ov_cdn/query_def.ts", - "./pcx/datasource": "./datasource/tc_monitor/pcx/datasource.ts", - "./pcx/datasource.ts": "./datasource/tc_monitor/pcx/datasource.ts", - "./pcx/query.ts": "./datasource/tc_monitor/pcx/query.ts", - "./pcx/query_def.ts": "./datasource/tc_monitor/pcx/query_def.ts", - "./postgresql/datasource": "./datasource/tc_monitor/postgresql/datasource.ts", - "./postgresql/datasource.ts": "./datasource/tc_monitor/postgresql/datasource.ts", - "./postgresql/query.ts": "./datasource/tc_monitor/postgresql/query.ts", - "./postgresql/query_def.ts": "./datasource/tc_monitor/postgresql/query_def.ts", - "./qaap/datasource": "./datasource/tc_monitor/qaap/datasource.ts", - "./qaap/datasource.ts": "./datasource/tc_monitor/qaap/datasource.ts", - "./qaap/query.ts": "./datasource/tc_monitor/qaap/query.ts", - "./qaap/query_def.ts": "./datasource/tc_monitor/qaap/query_def.ts", - "./redis/datasource": "./datasource/tc_monitor/redis/datasource.ts", - "./redis/datasource.ts": "./datasource/tc_monitor/redis/datasource.ts", - "./redis/query.ts": "./datasource/tc_monitor/redis/query.ts", - "./redis/query_def.ts": "./datasource/tc_monitor/redis/query_def.ts", - "./redis_mem/datasource": "./datasource/tc_monitor/redis_mem/datasource.ts", - "./redis_mem/datasource.ts": "./datasource/tc_monitor/redis_mem/datasource.ts", - "./redis_mem/query.ts": "./datasource/tc_monitor/redis_mem/query.ts", - "./redis_mem/query_def.ts": "./datasource/tc_monitor/redis_mem/query_def.ts", - "./scf/datasource": "./datasource/tc_monitor/scf/datasource.ts", - "./scf/datasource.ts": "./datasource/tc_monitor/scf/datasource.ts", - "./scf/query.ts": "./datasource/tc_monitor/scf/query.ts", - "./scf/query_def.ts": "./datasource/tc_monitor/scf/query_def.ts", - "./sqlserver/datasource": "./datasource/tc_monitor/sqlserver/datasource.ts", - "./sqlserver/datasource.ts": "./datasource/tc_monitor/sqlserver/datasource.ts", - "./sqlserver/query.ts": "./datasource/tc_monitor/sqlserver/query.ts", - "./sqlserver/query_def.ts": "./datasource/tc_monitor/sqlserver/query_def.ts", - "./tcaplus/datasource": "./datasource/tc_monitor/tcaplus/datasource.ts", - "./tcaplus/datasource.ts": "./datasource/tc_monitor/tcaplus/datasource.ts", - "./tcaplus/query.ts": "./datasource/tc_monitor/tcaplus/query.ts", - "./tcaplus/query_def.ts": "./datasource/tc_monitor/tcaplus/query_def.ts", - "./tdmq/datasource": "./datasource/tc_monitor/tdmq/datasource.ts", - "./tdmq/datasource.ts": "./datasource/tc_monitor/tdmq/datasource.ts", - "./tdmq/query.ts": "./datasource/tc_monitor/tdmq/query.ts", - "./tdmq/query_def.ts": "./datasource/tc_monitor/tdmq/query_def.ts", - "./tdmq_rabbitmq/datasource": "./datasource/tc_monitor/tdmq_rabbitmq/datasource.ts", - "./tdmq_rabbitmq/datasource.ts": "./datasource/tc_monitor/tdmq_rabbitmq/datasource.ts", - "./tdmq_rabbitmq/query.ts": "./datasource/tc_monitor/tdmq_rabbitmq/query.ts", - "./tdmq_rabbitmq/query_def.ts": "./datasource/tc_monitor/tdmq_rabbitmq/query_def.ts", - "./tdmq_rocketmq/datasource": "./datasource/tc_monitor/tdmq_rocketmq/datasource.ts", - "./tdmq_rocketmq/datasource.ts": "./datasource/tc_monitor/tdmq_rocketmq/datasource.ts", - "./tdmq_rocketmq/query.ts": "./datasource/tc_monitor/tdmq_rocketmq/query.ts", - "./tdmq_rocketmq/query_def.ts": "./datasource/tc_monitor/tdmq_rocketmq/query_def.ts", - "./tke/datasource": "./datasource/tc_monitor/tke/datasource.ts", - "./tke/datasource.ts": "./datasource/tc_monitor/tke/datasource.ts", - "./tke/query.ts": "./datasource/tc_monitor/tke/query.ts", - "./tke/query_def.ts": "./datasource/tc_monitor/tke/query_def.ts", - "./tsf/datasource": "./datasource/tc_monitor/tsf/datasource.ts", - "./tsf/datasource.ts": "./datasource/tc_monitor/tsf/datasource.ts", - "./tsf/query.ts": "./datasource/tc_monitor/tsf/query.ts", - "./tsf/query_def.ts": "./datasource/tc_monitor/tsf/query_def.ts", - "./v_clb/datasource": "./datasource/tc_monitor/v_clb/datasource.ts", - "./v_clb/datasource.ts": "./datasource/tc_monitor/v_clb/datasource.ts", - "./v_clb/query.ts": "./datasource/tc_monitor/v_clb/query.ts", - "./v_clb/query_def.ts": "./datasource/tc_monitor/v_clb/query_def.ts", - "./vbc/datasource": "./datasource/tc_monitor/vbc/datasource.ts", - "./vbc/datasource.ts": "./datasource/tc_monitor/vbc/datasource.ts", - "./vbc/query.ts": "./datasource/tc_monitor/vbc/query.ts", - "./vbc/query_def.ts": "./datasource/tc_monitor/vbc/query_def.ts", - "./vpc_net_detect/datasource": "./datasource/tc_monitor/vpc_net_detect/datasource.ts", - "./vpc_net_detect/datasource.ts": "./datasource/tc_monitor/vpc_net_detect/datasource.ts", - "./vpc_net_detect/query.ts": "./datasource/tc_monitor/vpc_net_detect/query.ts", - "./vpc_net_detect/query_def.ts": "./datasource/tc_monitor/vpc_net_detect/query_def.ts", - "./vpngw/datasource": "./datasource/tc_monitor/vpngw/datasource.ts", - "./vpngw/datasource.ts": "./datasource/tc_monitor/vpngw/datasource.ts", - "./vpngw/query.ts": "./datasource/tc_monitor/vpngw/query.ts", - "./vpngw/query_def.ts": "./datasource/tc_monitor/vpngw/query_def.ts", - "./vpnx/datasource": "./datasource/tc_monitor/vpnx/datasource.ts", - "./vpnx/datasource.ts": "./datasource/tc_monitor/vpnx/datasource.ts", - "./vpnx/query.ts": "./datasource/tc_monitor/vpnx/query.ts", - "./vpnx/query_def.ts": "./datasource/tc_monitor/vpnx/query_def.ts", - "./waf/datasource": "./datasource/tc_monitor/waf/datasource.ts", - "./waf/datasource.ts": "./datasource/tc_monitor/waf/datasource.ts", - "./waf/query.ts": "./datasource/tc_monitor/waf/query.ts", - "./waf/query_def.ts": "./datasource/tc_monitor/waf/query_def.ts" -}; - - -function webpackContext(req) { - var id = webpackContextResolve(req); - return __webpack_require__(id); -} -function webpackContextResolve(req) { - if(!__webpack_require__.o(map, req)) { - var e = new Error("Cannot find module '" + req + "'"); - e.code = 'MODULE_NOT_FOUND'; - throw e; - } - return map[req]; -} -webpackContext.keys = function webpackContextKeys() { - return Object.keys(map); -}; -webpackContext.resolve = webpackContextResolve; -module.exports = webpackContext; -webpackContext.id = "./datasource/tc_monitor sync recursive ^\\.\\/[a-zA-Z]\\w+\\/(datasource)|(query(_def)?)\\.ts$"; - -/***/ }), - -/***/ "./datasource/tc_monitor/MonitorDatasource.ts": -/*!****************************************************!*\ - !*** ./datasource/tc_monitor/MonitorDatasource.ts ***! - \****************************************************/ -/*! exports provided: TCMonitorDatasource */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TCMonitorDatasource", function() { return TCMonitorDatasource; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index */ "./datasource/tc_monitor/index.ts"); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/constants */ "./datasource/common/constants.ts"); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/utils */ "./datasource/common/utils.ts"); -/* harmony import */ var _grafana_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @grafana/data */ "@grafana/data"); -/* harmony import */ var _grafana_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_grafana_data__WEBPACK_IMPORTED_MODULE_4__); - - - - - - -var TCMonitorDatasource = -/** @class */ -function () { - TCMonitorDatasource.$inject = ["instanceSettings", "backendSrv", "templateSrv"]; - - /** @ngInject */ - function TCMonitorDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = this; - - this.instanceSettings = instanceSettings; - this.backendSrv = backendSrv; - this.templateSrv = templateSrv; - - lodash__WEBPACK_IMPORTED_MODULE_0___default.a.forEach(_index__WEBPACK_IMPORTED_MODULE_1__["Datasources"], function (_class, key) { - _this[key] = new _class(_this.instanceSettings, _this.backendSrv, _this.templateSrv); - }); - } // 根据 Datasource Config 配置时勾选的监控服务项,获取相应的命名空间 - - - TCMonitorDatasource.prototype.getNamespaces = function () { - var _this = this; - - var namespaces = []; - - lodash__WEBPACK_IMPORTED_MODULE_0___default.a.forEach(_index__WEBPACK_IMPORTED_MODULE_1__["SERVICES"], function (service) { - if (_this.instanceSettings.jsonData[service.service] === true) { - // namespaces.push(service.namespace); - namespaces.push(service); - } - }); - - return namespaces; - }; - - TCMonitorDatasource.prototype.getCascaderNamespaces = function () { - var _this = this; - - var validServices = _index__WEBPACK_IMPORTED_MODULE_1__["SERVICES"].filter(function (service) { - return _this.instanceSettings.jsonData[service.service]; - }); - return Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["serviceGroupBy"])(validServices); - }; - - TCMonitorDatasource.prototype.getSelectedServices = function () { - var namespaces = this.getNamespaces(); - return lodash__WEBPACK_IMPORTED_MODULE_0___default.a.map(namespaces, function (_a) { - var namespace = _a.namespace; - return Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["GetServiceFromNamespace"])(namespace); - }); - }; - /** - * 根据 Panel 的配置项,获取相应的监控数据 - * - * @param options Panel 的配置参数,示例如下 - * { - * cacheTimeout: undefined, - * dashboardId: 41, - * interval: "30s", - * intervalMs: 30000, - * maxDataPoints: 554, - * panelId: 2, - * range: { - * from: Moment, - * to: Moment, - * raw: {from: "now-6h", to: "now"} - * }, - * rangeRaw: {from: "now-6h", to: "now"}, - * scopedVars: {__interval: {…}, __interval_ms: {…}} - * targets: [ - * { - * namespace: "QCE/CVM", - * refId: "A", - * service: "cvm", - * showInstanceDetails: false, - * cvm: { - * dimensionObject: {InstanceId: {…}} - * instance: "", - * instanceAlias: "InstanceId", - * metricName: "AccOuttraffic", - * metricUnit: "MB", - * period: 10, - * queries: {Filters: {…}, InstanceIds: Array(1), Limit: 20, Offset: 0, filtersChecked: false, …}, - * region: "ap-beijing" - * }, - * cdb: {}, - * }, - * ], - * timezone: "browser" - * } - * @return 返回数据对象,示例如下 - * { - * data: [ - * { - * "target": "AccOuttraffic - ins-123", - * "datapoints": [ - * [861, 1450754160000], - * [767, 1450754220000] - * ] - * } - * ] - * } - */ - - - TCMonitorDatasource.prototype.query = function (options) { - var _this = this; - - var promises = []; - var services = this.getSelectedServices(); - - lodash__WEBPACK_IMPORTED_MODULE_0___default.a.forEach(services, function (service) { - var optionsTemp = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.cloneDeep(options); - - var targets = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.filter(optionsTemp.targets, function (item) { - return item.service === service; - }); - - optionsTemp.targets = targets; - - if (optionsTemp.targets.length > 0) { - var promiseTemp = _this["".concat(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.toUpper(service), "Datasource")].query(optionsTemp); - - if (promiseTemp) { - promises.push(promiseTemp); - } - } - }); - - if (promises.length === 0) { - return Promise.resolve({ - data: [], - state: _grafana_data__WEBPACK_IMPORTED_MODULE_4__["LoadingState"].Done - }); - } - - return Promise.all(promises).then(function (results) { - return { - data: lodash__WEBPACK_IMPORTED_MODULE_0___default.a.flatten(results), - state: _grafana_data__WEBPACK_IMPORTED_MODULE_4__["LoadingState"].Done - }; - }); - }; - /** - * 获取模板变量的选择项列表 - * - * @param query 模板变量配置填写的 Query 参数字符串 - */ - - - TCMonitorDatasource.prototype.metricFindQuery = function (query, options) { - var queries = Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["ParseMetricQuery"])(query); - var service = Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["GetServiceFromNamespace"])(queries['namespace'] || ''); - - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(queries) || !queries['namespace'] || !queries['action'] || !service) { - return Promise.resolve([]); - } - - if (this["".concat(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.toUpper(service), "Datasource")].metricFindQuery) { - var result = this["".concat(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.toUpper(service), "Datasource")].metricFindQuery(queries, lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(options, 'variable.regex', undefined)); - - if (result) { - return result; - } - } - - return Promise.resolve([]); - }; - /** - * 获取地域列表 - * @param service - */ - - - TCMonitorDatasource.prototype.getRegions = function (service) { - if (this["".concat(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.toUpper(service), "Datasource")].getRegions) { - return this["".concat(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.toUpper(service), "Datasource")].getRegions(); - } - - return []; - }; - /** - * 获取监控指标列表 - * @param service - * @param region - */ - - - TCMonitorDatasource.prototype.getMetrics = function (service, region) { - return this["".concat(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.toUpper(service), "Datasource")].getMetrics(region); - }; - /** - * 获取可用区列表 - * @param service - * @param region - */ - - - TCMonitorDatasource.prototype.getZones = function (service, region) { - if (this["".concat(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.toUpper(service), "Datasource")].getZones) { - return this["".concat(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.toUpper(service), "Datasource")].getZones(region); - } - - return []; - }; - /** - * 获取filter中dropdown列表 - * @param service - * @param param - */ - - - TCMonitorDatasource.prototype.getFilterDropdown = function (service, param) { - if (this["".concat(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.toUpper(service), "Datasource")].getFilterDropdown) { - return this["".concat(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.toUpper(service), "Datasource")].getFilterDropdown(param); - } - - return []; - }; - /** - * 获取实例列表 - * @param service - * @param region - * @param params - */ - - - TCMonitorDatasource.prototype.getInstances = function (service, region, params) { - return this["".concat(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.toUpper(service), "Datasource")].getInstances(region, params); - }; - /** - * 获取监听器列表 - * @param service - * @param region - * @param params - */ - - - TCMonitorDatasource.prototype.getListeners = function (service, region, instance) { - if (!this["".concat(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.toUpper(service), "Datasource")].getListeners) { - return []; - } - - return this["".concat(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.toUpper(service), "Datasource")].getListeners(region, instance); - }; - /** - * 获取 私有网络列表 - * @param service - */ - - - TCMonitorDatasource.prototype.getVpcIds = function (service, region) { - if (this["".concat(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.toUpper(service), "Datasource")].getVpcIds) { - return this["".concat(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.toUpper(service), "Datasource")].getVpcIds(region); - } - }; // 在 Datasource Config 配置时,验证 SerectId、SerectKey 的有效性,并测试勾选的监控服务项的对应 API 连通性 - - - TCMonitorDatasource.prototype.testDatasource = function () { - var _this = this; - - var promises = []; - var services = this.getSelectedServices(); - - lodash__WEBPACK_IMPORTED_MODULE_0___default.a.forEach(services, function (service) { - promises.push(_this["".concat(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.toUpper(service), "Datasource")].testDatasource()); - }); - - if (promises.length === 0) { - return Promise.resolve(null); - } - - return Promise.all(promises).then(function (results) { - var status = 'success'; - var message = 'DataSource Connection OK'; - - var errorMsg = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.reduce(results, function (acc, cur) { - if (cur.status === 'error') { - if (acc === '') acc += 'Oops! Found an error in: '; - acc += "".concat(cur.service, ": ").concat(cur.message, "; \n"); - } - - return acc; - }, ''); - - if (errorMsg) { - status = 'error'; - message = errorMsg; - } - - return { - status: status, - message: message, - title: lodash__WEBPACK_IMPORTED_MODULE_0___default.a.upperFirst(status) - }; - }); - }; - - TCMonitorDatasource.prototype.getServiceFn = function (service, fnName) { - var _this = this; - - return function () { - var _a; - - var argu = []; - - for (var _i = 0; _i < arguments.length; _i++) { - argu[_i] = arguments[_i]; - } - - if (!_this["".concat(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.toUpper(service), "Datasource")][fnName]) { - return []; - } - - return (_a = _this["".concat(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.toUpper(service), "Datasource")])[fnName].apply(_a, argu); - }; - }; - - return TCMonitorDatasource; -}(); - - - -/***/ }), - -/***/ "./datasource/tc_monitor/_base/datasource.ts": -/*!***************************************************!*\ - !*** ./datasource/tc_monitor/_base/datasource.ts ***! - \***************************************************/ -/*! exports provided: BaseDatasource */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BaseDatasource", function() { return BaseDatasource; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! moment */ "moment"); -/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/constants */ "./datasource/common/constants.ts"); -/* harmony import */ var _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/datasourceStorage */ "./datasource/common/datasourceStorage.ts"); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); -/* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../locale */ "./locale/index.ts"); -var __assign = undefined && undefined.__assign || function () { - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - } - - return t; - }; - - return __assign.apply(this, arguments); -}; - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - -var __spreadArray = undefined && undefined.__spreadArray || function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -}; - - - - - - - - -var BaseDatasource = -/** @class */ -function () { - BaseDatasource.$inject = ["instanceSettings", "backendSrv", "templateSrv"]; - - /** @ngInject */ - function BaseDatasource(instanceSettings, backendSrv, templateSrv) { - this.instanceListCache = []; - this.extraMetricDims = []; - this.checkKeys = []; - this.MetricReqConfig = {}; - this.extrasAlias = []; - /* - 一个配置:(用于处理除了InstanceId之外的)(Record中的key是指标修正之后的维度,即通过InvalidDemsion处理后) - 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、 - 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。为空则取即通过InvalidDemsion处理后的key - 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。即:templateQueryIdMap中内容。联合上面2的内容筛选出原始sourceMap - 4 通过这个dim和sourceMap获取维度值。即sourceMap[dim] - */ - - this.queryMonitorExtraConfg = {}; - this.CandiateDimensions = {}; - this.instanceSettings = instanceSettings; - this.backendSrv = backendSrv; - this.templateSrv = templateSrv; - this.url = instanceSettings.url; - this.secretId = (instanceSettings.jsonData || {}).secretId || ''; - Object(_locale__WEBPACK_IMPORTED_MODULE_5__["setLanguage"])(instanceSettings.jsonData.language || _locale__WEBPACK_IMPORTED_MODULE_5__["Language"].Chinese); - } - - Object.defineProperty(BaseDatasource.prototype, "namespace", { - get: function get() { - // 需要注意的是this.service来自于原型上,在实例中导入时注入 - return this.Namespace || Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["getNamesapceFromService"])(this.service); - }, - enumerable: false, - configurable: true - }); // 获取额外要显示到图例里的内容 - - BaseDatasource.prototype.getOtherAlias = function (instance, target) { - var _this = this; - - var _a; - - var result = ''; - var alias = instance._InstanceAliasValue; - (_a = this.extrasAlias) === null || _a === void 0 ? void 0 : _a.forEach(function (extra) { - var extraAlia = _this.getVariable(target[extra]); - - if (extraAlia && alias.indexOf(extraAlia) === -1) { - result += " - ".concat(extraAlia); - } - }); - return result; - }; - /* 格式化模板变量上的显示 */ - - - BaseDatasource.prototype.getAliasValue = function (instance, alias) { - var result = instance[alias]; - return Array.isArray(result) ? result.join() : result; - }; - - BaseDatasource.prototype.formatVarDisplay = function (instance, displayTpl, instanceAlias) { - var _this = this; // 获取display=aaa${InstanceName}bbb${InstanceId}ccc - - - if (displayTpl) { - return displayTpl.replace(/\$\{(\w+)\}/g, function (a, b) { - if (!b || !_this.InstanceAliasList.includes(b)) { - return ''; - } - - return _this.getAliasValue(instance, b); - }); - } - - return this.getAliasValue(instance, instanceAlias); - }; - /** - * @param query 模板变量配置填写的 Query 参数对象,由顶层将字符串转换为了对象 - */ - - - BaseDatasource.prototype.metricFindQuery = function (query, regex) { - var _a; - - return __awaiter(this, void 0, void 0, function () { - var action, namespace, display, _b, payload, region, _c, instancealias, regionQuery, result, res, instance, instanceCache, error_1; - - var _this = this; - - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - action = query.action, namespace = query.namespace, display = query.display, _b = query.payload, payload = _b === void 0 ? {} : _b; - region = query.region, _c = query.instancealias, instancealias = _c === void 0 ? this.templateQueryIdMap.instance : _c; - - if (!action || !namespace) { - return [2 - /*return*/ - , []]; - } // 支持payload里传入模板变量 - - - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isObject(payload)) { - lodash__WEBPACK_IMPORTED_MODULE_0___default.a.forEach(payload, function (value, key) { - payload[key] = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isString(value) ? _this.getVariable(value) : value; - }); - } - - regionQuery = action.match(/^DescribeRegions$/i); - - if (regionQuery) { - return [2 - /*return*/ - , this.getRegions()]; - } - - region = this.getVariable(region); // 将模板region转换为真实值 - - if (!(region && action.match(/^DescribeInstances/i))) return [3 - /*break*/ - , 3]; - return [4 - /*yield*/ - , this.getVariableInstances(region, payload)]; - - case 1: - result = _d.sent(); - instancealias = this.InstanceAliasList.includes(instancealias) ? instancealias : this.templateQueryIdMap.instance; - res = result.flatMap(function (item) { - var insAlias = _this.formatVarDisplay(item, display, instancealias); - - item._InstanceAliasValue = insAlias; // FIXME: - - if (!item[instancealias]) return []; - return [{ - text: insAlias, - value: item[_this.templateQueryIdMap.instance] - }]; - }); // 缓存全量实例列表 - - return [4 - /*yield*/ - , _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_3__["default"].setInstance(this.service, result)]; - - case 2: - // 缓存全量实例列表 - _d.sent(); - - return [2 - /*return*/ - , res]; - - case 3: - instance = this.getVariable(query['instance']); - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isArray(instance)) instance = instance[0]; // 有额外维度,仅支持实例单选情况 - - if (!(region && action && instance)) return [3 - /*break*/ - , 8]; - _d.label = 4; - - case 4: - _d.trys.push([4, 6,, 7]); - - return [4 - /*yield*/ - , _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_3__["default"].getInstance(this.service)]; - - case 5: - instanceCache = _d.sent(); - instance = (_a = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.cloneDeep(instanceCache.find(function (item) { - return item[_this.templateQueryIdMap.instance] === instance; - }))) !== null && _a !== void 0 ? _a : {}; - return [3 - /*break*/ - , 7]; - - case 6: - error_1 = _d.sent(); - return [3 - /*break*/ - , 7]; - - case 7: - return [2 - /*return*/ - , this.fetchMetricData(action, region, instance, query)]; - - case 8: - return [2 - /*return*/ - , Promise.resolve([])]; - } - }); - }); - }; // 获取指标数据 - - - BaseDatasource.prototype.fetchMetricData = function (action, region, instance, query) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , []]; - }); - }); - }; - /** - * 根据 Panel 的配置项,获取相应的监控数据 - * - * @param options Panel 的配置参数 - * @return 返回数据数组,示例如下 - * [ - * { - * "target": "AccOuttraffic - ins-123", - * "datapoints": [ - * [861, 1450754160000], - * [767, 1450754220000] - * ] - * } - * ] - */ - - - BaseDatasource.prototype.dimensionsFormat = function (dimKeys, ins, dimensionObject, target, service, options) { - var _a; - - return __awaiter(this, void 0, void 0, function () { - var _loop_1, this_1, _i, dimKeys_1, key; - - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - _loop_1 = function _loop_1(key) { - var keyTmp, invalidDim, extraDimValue, _c, dim_KeyInStorage, _d, dim_KeyInTarget, dim_KeyInMap_1, dim_KeyInIns, extraIns_1, extraSourceMap, error_2, extraStorage, isStringOrNumber, insAlias, otherAlias; - - return __generator(this, function (_e) { - switch (_e.label) { - case 0: - keyTmp = key; - invalidDim = this_1.InvalidDimensions || this_1.getInvalidDimensions(this_1, target[service]); - - if (invalidDim[key]) { - // 从【维度中】的字段到【实例中】字段的映射。 { functionName: FunctionName } - keyTmp = invalidDim[key]; - ins[key] = ins[keyTmp]; - } - - extraDimValue = this_1.getVariable(target[service][keyTmp]); - if (!this_1.queryMonitorExtraConfg[keyTmp]) return [3 - /*break*/ - , 5]; - _c = this_1.queryMonitorExtraConfg[keyTmp], dim_KeyInStorage = _c.dim_KeyInStorage, _d = _c.dim_KeyInTarget, dim_KeyInTarget = _d === void 0 ? keyTmp : _d, dim_KeyInMap_1 = _c.dim_KeyInMap, dim_KeyInIns = _c.dim_KeyInIns; - extraIns_1 = Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["ReplaceVariable"])(this_1.templateSrv, options.scopedVars, target[service][dim_KeyInTarget], true); - extraSourceMap = {}; - _e.label = 1; - - case 1: - _e.trys.push([1, 2,, 4]); - - extraSourceMap = JSON.parse(extraIns_1); // 兼容json字符串的 形式 - - return [3 - /*break*/ - , 4]; - - case 2: - error_2 = _e.sent(); - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isArray(extraIns_1)) extraIns_1 = extraIns_1[0]; // 如果多个,取第一个。除了实例ID 暂不支持其他纬度多选 - - return [4 - /*yield*/ - , _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_3__["default"].getExtraStorage(this_1.service, dim_KeyInStorage)]; - - case 3: - extraStorage = _e.sent(); - extraSourceMap = (_a = extraStorage === null || extraStorage === void 0 ? void 0 : extraStorage.find(function (item) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isArray(item[dim_KeyInMap_1])) { - return item[dim_KeyInMap_1][0] === extraIns_1; - } - - return item[dim_KeyInMap_1] === extraIns_1; - })) !== null && _a !== void 0 ? _a : {}; - return [3 - /*break*/ - , 4]; - - case 4: - isStringOrNumber = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isString(extraSourceMap) || lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isNumber(extraSourceMap); - insAlias = ins._InstanceAliasValue; - otherAlias = isStringOrNumber ? extraSourceMap : extraSourceMap._InstanceAliasValue; - - if (otherAlias && insAlias.indexOf(otherAlias) === -1) { - ins._InstanceAliasValue += " - ".concat(otherAlias); - } - - extraDimValue = isStringOrNumber ? extraSourceMap : extraSourceMap === null || extraSourceMap === void 0 ? void 0 : extraSourceMap[dim_KeyInIns || keyTmp]; - return [3 - /*break*/ - , 6]; - - case 5: - ins._InstanceAliasValue += this_1.getOtherAlias(ins, target[service]); - _e.label = 6; - - case 6: - if (Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["getTimeShiftInMs"])(target[service].timeshift) > 0 && ins._InstanceAliasValue.indexOf(target[service].timeshift) === -1) { - ins._InstanceAliasValue += "_".concat(target[service].timeshift); - } // 设置instance,针对额外的维度,需要注意模板变量的值 - // ins[key] = ins[keyTmp] ?? extraDimValue; - - - ins[key] = this_1.getDimensionsVal(ins, keyTmp, extraDimValue); // cynosdb产品接口返回维度和入参不一致 - - if (this_1.checkKeys.length > 0) { - this_1.checkKeys.forEach(function (Ekey) { - ins[Ekey] = ins[key]; - }); - } - - dimensionObject[key] = { - Name: key, - Value: ins[key] - }; - return [2 - /*return*/ - ]; - } - }); - }; - - this_1 = this; - _i = 0, dimKeys_1 = dimKeys; - _b.label = 1; - - case 1: - if (!(_i < dimKeys_1.length)) return [3 - /*break*/ - , 4]; - key = dimKeys_1[_i]; - return [5 - /*yield**/ - , _loop_1(key)]; - - case 2: - _b.sent(); - - _b.label = 3; - - case 3: - _i++; - return [3 - /*break*/ - , 1]; - - case 4: - return [2 - /*return*/ - , dimensionObject]; - } - }); - }); - }; - - BaseDatasource.prototype.getDimensionsVal = function (ins, key, extraDimValue) { - var dimVal = ins[key]; - - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(dimVal) && this.CandiateDimensions[key]) { - dimVal = ins[this.CandiateDimensions[key]]; - } - - return dimVal !== null && dimVal !== void 0 ? dimVal : extraDimValue; - }; - - BaseDatasource.prototype.query = function (options) { - var _this = this; - - var service = this.service; // 强制声明非空 - - var queries = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.filter(options.targets, function (item) { - // 过滤无效的查询 target - return item.hide !== true && !!item.namespace && !!item[service].metricName && !lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["ReplaceVariable"])(_this.templateSrv, options.scopedVars, item[service].region, false)) && !lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["ReplaceVariable"])(_this.templateSrv, options.scopedVars, item[service].instance, true)); - }).reduce(function (prev, target) { - if (Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["getTimeShiftInMs"])(target[service].timeshift) > 0) { - var cloneTarget = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.cloneDeep(target); - - cloneTarget[service].timeshift = ''; - return __spreadArray(__spreadArray([], prev, true), [cloneTarget, target], false); - } - - return __spreadArray(__spreadArray([], prev, true), [target], false); - }, []).map(function (target) { - return __awaiter(_this, void 0, void 0, function () { - var instances, instanceCache, timeshift, region, insInReq, _i, instances_1, ins, dimensionObject, dimKeys, dimResult, data; - - var _this = this; - - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - instances = Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["ReplaceVariable"])(this.templateSrv, options.scopedVars, target[service].instance, true); - return [4 - /*yield*/ - , _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_3__["default"].getInstance(this.service)]; - - case 1: - instanceCache = _a.sent(); - timeshift = Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["getTimeShiftInMs"])(target[service].timeshift); - instances = [].concat(instances).map(function (inst) { - var _a, _b; - - try { - return JSON.parse(inst); // 兼容json字符串的 形式 - } catch (error) { - // 如果没拿到缓存,取默认实例组 - if (!instanceCache) return (_a = _this.getDefaultInsObj) === null || _a === void 0 ? void 0 : _a.call(_this, inst); - return (_b = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.cloneDeep(instanceCache.find(function (item) { - return item[_this.templateQueryIdMap.instance] === inst; - }))) !== null && _b !== void 0 ? _b : {}; - } - }); - region = Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["ReplaceVariable"])(this.templateSrv, options.scopedVars, target[service].region, false); - insInReq = []; - _i = 0, instances_1 = instances; - _a.label = 2; - - case 2: - if (!(_i < instances_1.length)) return [3 - /*break*/ - , 5]; - ins = instances_1[_i]; - dimensionObject = target[service].dimensionObject; - dimKeys = Object.keys(dimensionObject); - return [4 - /*yield*/ - , this.dimensionsFormat(dimKeys, ins, dimensionObject, target, service, options)]; - - case 3: - dimResult = _a.sent(); - insInReq.push([{ - Dimensions: Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["GetDimensions"])(dimResult) - }]); - _a.label = 4; - - case 4: - _i++; - return [3 - /*break*/ - , 2]; - - case 5: - data = { - StartTime: moment__WEBPACK_IMPORTED_MODULE_1___default()(options.range.from).subtract(timeshift).format(), - EndTime: moment__WEBPACK_IMPORTED_MODULE_1___default()(options.range.to).subtract(timeshift).format(), - Period: target[service].period || 300, - Instances: lodash__WEBPACK_IMPORTED_MODULE_0___default.a.flatMap(insInReq), - Namespace: target.namespace, - MetricName: target[service].metricName - }; - return [2 - /*return*/ - , this.getMonitorData(data, region, instances, target[service], options)]; - } - }); - }); - }); - - if (queries.length === 0) { - return []; - } - - return Promise.all(queries).then(function (responses) { - return lodash__WEBPACK_IMPORTED_MODULE_0___default.a.flatten(responses); - })["catch"](function (error) { - return []; - }); - }; - - BaseDatasource.prototype.getDefaultInsObj = function (ins) { - return {}; - }; - - BaseDatasource.prototype.getInstanceReqConfig = function (selfIns) { - return {}; - }; - - BaseDatasource.prototype.getInvalidDimensions = function (selfIns, target) { - return {}; - }; // 获取某个变量的实际值,this.templateSrv.replace() 函数返回实际值的字符串 - - - BaseDatasource.prototype.getVariable = function (metric) { - var rs = this.templateSrv.replace((metric || '').trim()); - var valStr = rs.match(/\{([\w-,]+)\}/); // 判断是否为多选 - - if (valStr) { - return valStr[1].split(','); - } - - return rs; - }; - /** - * 获取 监控数据 - * @param params 获取监控数据的请求参数 - * @param region 地域信息 - * @param instances 实例列表,用于对返回结果的匹配解析 - */ - - - BaseDatasource.prototype.getMonitorData = function (params, region, instances, target, options) { - var serviceInfo = Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["GetServiceAPIInfo"])(region, 'monitor'); - var timeshift = Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["getTimeShiftInMs"])(target.timeshift); - return this.doRequest({ - url: this.url + serviceInfo.path, - data: params - }, serviceInfo.service, { - action: 'GetMonitorData', - region: region - }).then(function (response) { - return Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["ParseQueryResult"])(response, instances, timeshift); - }); - }; - - BaseDatasource.prototype.getRegions = function () { - return this.doRequest({ - url: this.url + '/cvm' - }, 'cvm', { - action: 'DescribeRegions' - }).then(function (response) { - return lodash__WEBPACK_IMPORTED_MODULE_0___default.a.filter(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.map(response.RegionSet || [], function (item) { - return { - text: item.RegionName, - value: item.Region, - RegionState: item.RegionState - }; - }), function (item) { - return item.RegionState === 'AVAILABLE'; - }); - }); - }; - - BaseDatasource.prototype.getMetrics = function (region) { - var _this = this; - - if (region === void 0) { - region = 'ap-guangzhou'; - } - - var serviceInfo = Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["GetServiceAPIInfo"])(region, 'monitor'); - return this.doRequest({ - url: this.url + serviceInfo.path, - data: { - Namespace: this.namespace - } - }, serviceInfo.service, { - region: region, - action: 'DescribeBaseMetrics' - }).then(function (response) { - var res = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.filter(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.filter(response.MetricSet || [], function (item) { - return !(item.Namespace !== _this.namespace || !item.MetricName); - })); - - var resFilterFn = _this.MetricReqConfig.resultFilter; - - if (resFilterFn) { - return res.map(function (item) { - return resFilterFn(item); - }); - } - - return res; - }); - }; - - BaseDatasource.prototype.getInstances = function (region, params) { - if (params === void 0) { - params = {}; - } - - var _a = this.InstanceReqConfig || this.getInstanceReqConfig(this), - _b = _a.service, - service = _b === void 0 ? this.service : _b, - action = _a.action, - field = _a.responseField, - interceptor = _a.interceptor; - - params = __assign({ - Offset: 0, - Limit: 100 - }, params); - var serviceInfo = Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["GetServiceAPIInfo"])(region, service); - return this.doRequest({ - url: this.url + serviceInfo.path, - data: (interceptor === null || interceptor === void 0 ? void 0 : interceptor.request) ? interceptor.request(params) : params - }, serviceInfo.service, { - region: region, - action: action - }).then(function (response) { - var _a, _b; // 处理异常,则不按正常的情况处理,直接抛出错误 - - - if (response === null || response === void 0 ? void 0 : response.Error) { - console.error(response.Error); - return response; - } - - var result; // 先,field处理 - - if (field) { - result = (_b = (_a = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(response, field)) !== null && _a !== void 0 ? _a : lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(response, "Result.".concat(field))) !== null && _b !== void 0 ? _b : []; - } // 后,拦截器处理 - - - if (interceptor === null || interceptor === void 0 ? void 0 : interceptor.response) { - result = interceptor.response(result); - } - - return result; - }); - }; - - BaseDatasource.prototype.getVariableInstances = function (region, query) { - var _this = this; - - if (query === void 0) { - query = {}; - } - - var result = []; - - var params = __assign({ - Offset: 0, - Limit: 100 - }, query); - - var _a = this.InstanceReqConfig || this.getInstanceReqConfig(this), - _b = _a.service, - service = _b === void 0 ? this.service : _b, - action = _a.action, - field = _a.responseField, - interceptor = _a.interceptor; - - var serviceInfo = Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["GetServiceAPIInfo"])(region, service); - return this.doRequest({ - url: this.url + serviceInfo.path, - data: (interceptor === null || interceptor === void 0 ? void 0 : interceptor.request) ? interceptor.request(params) : params - }, serviceInfo.service, { - region: region, - action: action - }).then(function (response) { - var _a, _b, _c, _d, _e, _f; - - result = (_b = (_a = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(response, field)) !== null && _a !== void 0 ? _a : lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(response, "Result.".concat(field))) !== null && _b !== void 0 ? _b : []; - var total = (_f = (_e = (_d = (_c = response.TotalCount) !== null && _c !== void 0 ? _c : response.TotalCnt) !== null && _d !== void 0 ? _d : response.TotalNumber) !== null && _e !== void 0 ? _e : lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(response, "Result.TotalCount")) !== null && _f !== void 0 ? _f : 0; - - if (result.length >= total) { - return (interceptor === null || interceptor === void 0 ? void 0 : interceptor.response) ? interceptor.response(result) : result; - } else { - var param = Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["SliceLength"])(total, (params === null || params === void 0 ? void 0 : params.Limit) || 100); - var promises_1 = []; - - lodash__WEBPACK_IMPORTED_MODULE_0___default.a.forEach(param, function (item) { - promises_1.push(_this.getInstances(region, __assign(__assign({}, item), query))); - }); - - return Promise.all(promises_1).then(function (responses) { - lodash__WEBPACK_IMPORTED_MODULE_0___default.a.forEach(responses, function (item) { - result = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.concat(result, item); - }); - - return (interceptor === null || interceptor === void 0 ? void 0 : interceptor.response) ? interceptor.response(result) : result; - })["catch"](function (error) { - return (interceptor === null || interceptor === void 0 ? void 0 : interceptor.response) ? interceptor.response(result) : result; - }); - } - }); - }; // 检查某变量字段是否有值 - - - BaseDatasource.prototype.isValidConfigField = function (field) { - return field && field.length > 0; - }; - - BaseDatasource.prototype.testDatasource = function () { - // const { service = this.service, action } = this.InstanceReqConfig; - // const serviceInfo = GetServiceAPIInfo('ap-guangzhou', service); - var _this = this; - - if (!this.isValidConfigField(this.secretId)) { - return { - service: this.service, - status: 'error', - message: 'The SecretId/SecretKey field is required.' - }; - } - - return Promise.all([this.getRegions(), this.getMetrics(), // this.doRequest( - // { - // url: this.url + serviceInfo.path, - // data: { - // Offset: 0, - // Limit: 1, - // }, - // }, - // service, - // { region: 'ap-guangzhou', action }, - // ), - this.getInstances('ap-guangzhou', { - Offset: 0, - Limit: 1 - })]).then(function (responses) { - var cvmErr = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(responses, '[0].Error', {}); - - var monitorErr = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(responses, '[1].Error', {}); - - var serviceErr = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(responses, '[2].Error', {}); // const cvmAuthFail = _.get(cvmErr, 'Code', '').indexOf('AuthFailure') !== -1; - // const monitorAuthFail = _.get(monitorErr, 'Code', '').indexOf('AuthFailure') !== -1; - // const serviceAuthFail = _.get(serviceErr, 'Code', '').indexOf('AuthFailure') !== -1; - - - var cvmAuthFail = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(cvmErr, 'Code', ''); - - var monitorAuthFail = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(monitorErr, 'Code', ''); - - var serviceAuthFail = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(serviceErr, 'Code', ''); - - if (cvmAuthFail || monitorAuthFail || serviceAuthFail) { - var messages = []; - - if (cvmAuthFail) { - messages.push(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(cvmErr, 'Code')); - } - - if (monitorAuthFail) { - messages.push(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(monitorErr, 'Code')); - } - - if (serviceAuthFail) { - messages.push(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(serviceErr, 'Code')); - } - - var message = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.join(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.compact(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(messages)), '; '); - - return { - service: _this.service, - status: 'error', - message: message - }; - } else { - return { - namespace: _this.namespace, - service: _this.service, - status: 'success', - message: "Successfully queried the ".concat(_this.service, " service."), - title: 'Success' - }; - } - })["catch"](function (error) { - var message = "".concat(_this.service, " service:"); - message += error.statusText ? error.statusText + '; ' : ''; - - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(error, 'data.error.code', '')) { - message += error.data.error.code + '. ' + error.data.error.message; - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(error, 'data.error', '')) { - message += error.data.error; - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(error, 'data', '')) { - message += error.data; - } else { - message += "Cannot connect to ".concat(_this.service, " service."); - } - - return { - service: _this.service, - status: 'error', - message: message - }; - }); - }; - - BaseDatasource.prototype.doRequest = function (options, service, signObj) { - if (signObj === void 0) { - signObj = {}; - } - - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - return [4 - /*yield*/ - , Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["GetRequestParams"])(options, service, signObj, this.secretId, this.instanceSettings.id, this.backendSrv)]; - - case 1: - options = _a.sent(); - return [2 - /*return*/ - , this.backendSrv.datasourceRequest(options).then(function (response) { - return lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(response, 'data.Response', {}); - })["catch"](function (error) { - throw error; - })]; - } - }); - }); - }; - - return BaseDatasource; -}(); - - - -/***/ }), - -/***/ "./datasource/tc_monitor/_base/query.ts": -/*!**********************************************!*\ - !*** ./datasource/tc_monitor/_base/query.ts ***! - \**********************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! grafana/app/core/core_module */ "grafana/app/core/core_module"); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/constants */ "./datasource/common/constants.ts"); - - - -function classFactory(detailConfig) { - return ( - /** @class */ - function () { - QueryCtrl.$inject = ["$scope", "$rootScope"]; - - /** @ngInject */ - function QueryCtrl($scope, $rootScope) { - Object.assign($scope, detailConfig); - - $scope.getDropdown = function (field) { - var service = Object(_common_constants__WEBPACK_IMPORTED_MODULE_1__["GetServiceFromNamespace"])($scope.namespace); - return $scope.datasource.getFilterDropdown(service, { - field: field, - region: $scope.region - }); - }; - } - - return QueryCtrl; - }() - ); -} - -var template = "\n
\n
\n \n
\n
\n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n
\n"; - -function queryDDOFactory(QueryCtrl) { - return function queryDDO() { - return { - template: template, - controller: QueryCtrl, - restrict: 'E', - scope: { - target: '=', - showDetail: '=', - region: '=', - datasource: '=', - getDropdownOptions: '&', - onChange: '&' - } - }; - }; -} - -/* harmony default export */ __webpack_exports__["default"] = (function (name, config) { - // QueryCtrl._config = config; - var newQueryIns = classFactory(config); - grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default.a.directive(name, queryDDOFactory(newQueryIns)); -}); - -/***/ }), - -/***/ "./datasource/tc_monitor/_base/query_filter.ts": -/*!*****************************************************!*\ - !*** ./datasource/tc_monitor/_base/query_filter.ts ***! - \*****************************************************/ -/*! exports provided: queryDDO, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryDDO", function() { return queryDDO; }); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! grafana/app/core/core_module */ "grafana/app/core/core_module"); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__); - - -var SPQueryCtrl = -/** @class */ -function () { - SPQueryCtrl.$inject = ["$scope", "$rootScope"]; - - /** @ngInject */ - function SPQueryCtrl($scope, $rootScope) { - Object.assign($scope, SPQueryCtrl._config); - - $scope.onChecked = function (srcField, dstField) { - if ($scope.target.queries[srcField] === true) { - $scope.target.queries[dstField] = false; - } - - $scope.onChange(); - }; - - $scope.init(); - } - - return SPQueryCtrl; -}(); - -var template = "\n
\n\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n \n \n \n
\n
\n
\n"; -function queryDDO() { - return { - template: template, - controller: SPQueryCtrl, - restrict: 'E', - scope: { - target: '=', - showDetail: '=', - region: '=', - datasource: '=', - getDropdownOptions: '&', - onChange: '&' - } - }; -} -/* harmony default export */ __webpack_exports__["default"] = (function (name, config) { - SPQueryCtrl._config = config; - grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default.a.directive(name, queryDDO); -}); - -/***/ }), - -/***/ "./datasource/tc_monitor/_base/types.ts": -/*!**********************************************!*\ - !*** ./datasource/tc_monitor/_base/types.ts ***! - \**********************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); - - -/***/ }), - -/***/ "./datasource/tc_monitor/apigateway/datasource.ts": -/*!********************************************************!*\ - !*** ./datasource/tc_monitor/apigateway/datasource.ts ***! - \********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/apigateway/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/constants */ "./datasource/common/constants.ts"); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); -/* harmony import */ var _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/datasourceStorage */ "./datasource/common/datasourceStorage.ts"); -/* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../locale */ "./locale/index.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - - - - - -var DCDatasource = -/** @class */ -function (_super) { - __extends(DCDatasource, _super); - - function DCDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = _query_def__WEBPACK_IMPORTED_MODULE_0__["namespace"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["APIGATEWAYInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["APIGATEWAYInvalidDemensions"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_0__["templateQueryIdMap"]; // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致 - - _this.InstanceReqConfig = { - service: 'apigateway', - action: 'DescribeServicesStatus', - responseField: 'ServiceSet' - }; - _this.keyInStorage = _query_def__WEBPACK_IMPORTED_MODULE_0__["keyInStorage"]; - _this.queryMonitorExtraConfg = _query_def__WEBPACK_IMPORTED_MODULE_0__["queryMonitorExtraConfg"]; - return _this; - } // getFilterDropdown({ field }) { - // return super.getRegions(); - // } - - - DCDatasource.prototype.getRegions = function () { - return Promise.resolve(_query_def__WEBPACK_IMPORTED_MODULE_0__["regionSupported"].map(function (_a) { - var value = _a.value; - return { - value: value, - text: Object(_locale__WEBPACK_IMPORTED_MODULE_5__["t"])(value) - }; - })); - }; - - DCDatasource.prototype.getEnvironmentNameList = function (params) { - return __awaiter(this, void 0, void 0, function () { - var region, instanceId, serviceInfo, res, rs; - - var _this = this; - - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - region = params.region, instanceId = params.instanceId; - serviceInfo = Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["GetServiceAPIInfo"])(region, this.service); - return [4 - /*yield*/ - , Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["fetchAllFactory"])(function (data) { - return _this.doRequest({ - url: _this.url + serviceInfo.path, - data: data - }, serviceInfo.service, { - region: region, - action: 'DescribeServiceEnvironmentList' - }); - }, { - ServiceId: instanceId - }, 'EnvironmentList')]; - - case 1: - res = _a.sent(); - rs = res[0]; - return [2 - /*return*/ - , rs]; - } - }); - }); - }; - - DCDatasource.prototype.fetchMetricData = function (action, region, instance) { - return __awaiter(this, void 0, void 0, function () { - var rs, result; - - var _this = this; - - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!(action === 'DescribeServiceEnvironmentList')) return [3 - /*break*/ - , 3]; - return [4 - /*yield*/ - , this.getEnvironmentNameList({ - region: region, - instanceId: instance[this.templateQueryIdMap.instance] - })]; - - case 1: - rs = _a.sent(); - result = rs.map(function (o) { - o._InstanceAliasValue = o[_this.templateQueryIdMap.environmentName]; - return { - text: o[_this.templateQueryIdMap.environmentName], - value: o[_this.templateQueryIdMap.environmentName] - }; - }); - return [4 - /*yield*/ - , _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_4__["default"].setExtraStorage(this.service, this.keyInStorage.environmentList, rs)]; - - case 2: - _a.sent(); - - return [2 - /*return*/ - , result]; - - case 3: - return [2 - /*return*/ - , []]; - } - }); - }); - }; - - return DCDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (DCDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/apigateway/query.ts": -/*!***************************************************!*\ - !*** ./datasource/tc_monitor/apigateway/query.ts ***! - \***************************************************/ -/*! exports provided: QueryCtrl, sQuery */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueryCtrl", function() { return QueryCtrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sQuery", function() { return sQuery; }); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! grafana/app/core/core_module */ "grafana/app/core/core_module"); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/apigateway/query_def.ts"); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/constants */ "./datasource/common/constants.ts"); -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - - -var QueryCtrl = -/** @class */ -function () { - QueryCtrl.$inject = ["$scope", "$rootScope"]; - - /** @ngInject */ - function QueryCtrl($scope, $rootScope) { - var _this = this; - - $scope.init = function () { - $scope.APIGATEWAYFilterFieldsDescriptor = _query_def__WEBPACK_IMPORTED_MODULE_1__["APIGATEWAYFilterFieldsDescriptor"]; - $scope.namespace = _query_def__WEBPACK_IMPORTED_MODULE_1__["namespace"]; - }; - - $scope.getInstanceId = function () { - var instance = $scope.target.instance; - var service = Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["GetServiceFromNamespace"])($scope.namespace); // console.log({namespace, service}); - - instance = $scope.datasource.getServiceFn(service, 'getVariable')(instance); - - if (!instance) { - return ''; - } - - try { - instance = JSON.parse(instance)[_query_def__WEBPACK_IMPORTED_MODULE_1__["templateQueryIdMap"].instance]; - } catch (error) {// console.log(); - } - - return instance; - }; - - $scope.getExtraDropdown = function (target) { - return __awaiter(_this, void 0, void 0, function () { - var service, instanceId, region, rs, result; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - service = Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["GetServiceFromNamespace"])($scope.namespace); - instanceId = $scope.getInstanceId(); - region = $scope.datasource.getServiceFn(service, 'getVariable')(target.region); - return [4 - /*yield*/ - , $scope.datasource.getServiceFn(service, 'getEnvironmentNameList')({ - region: region, - instanceId: instanceId - })]; - - case 1: - rs = _a.sent(); - result = rs.map(function (o) { - return { - text: o.EnvironmentName, - value: JSON.stringify(o) - }; - }); - return [2 - /*return*/ - , result]; - } - }); - }); - }; - - $scope.init(); - } - - return QueryCtrl; -}(); - - -var template = "\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n"; -function sQuery() { - return { - template: template, - controller: QueryCtrl, - restrict: 'E', - scope: { - target: '=', - showDetail: '=', - region: '=', - datasource: '=', - getDropdownOptions: '&', - onChange: '&', - onRefresh: '&', - dims: '=' - } - }; -} -grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default.a.directive(_query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorName"], sQuery); - -/***/ }), - -/***/ "./datasource/tc_monitor/apigateway/query_def.ts": -/*!*******************************************************!*\ - !*** ./datasource/tc_monitor/apigateway/query_def.ts ***! - \*******************************************************/ -/*! exports provided: default, APIGATEWAYFilterFieldsDescriptor, templateQueryIdMap, APIGATEWAYInstanceAliasList, APIGATEWAYInvalidDemensions, namespace, queryEditorName, queryEditorConfig, regionSupported, queryMonitorExtraConfg, keyInStorage, APIGATEWAYGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "APIGATEWAYFilterFieldsDescriptor", function() { return APIGATEWAYFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "APIGATEWAYInstanceAliasList", function() { return APIGATEWAYInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "APIGATEWAYInvalidDemensions", function() { return APIGATEWAYInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorName", function() { return queryEditorName; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorConfig", function() { return queryEditorConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "regionSupported", function() { return regionSupported; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryMonitorExtraConfg", function() { return queryMonitorExtraConfg; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keyInStorage", function() { return keyInStorage; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "APIGATEWAYGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); - -var namespace = 'QCE/APIGATEWAY'; // 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称 - -var queryEditorName = 'apigatewayQuery'; -var APIGATEWAYInvalidDemensions = { - serviceId: 'ServiceId', - environmentName: 'EnvironmentName', - apiid: 'Apiid', - apiId: 'Apiid' -}; // 需和文件名对应 - -var APIGATEWAYInstanceAliasList = ['ServiceId', 'ServiceName']; -var templateQueryIdMap = { - instance: 'ServiceId', - environmentName: 'EnvironmentName' -}; // 需要缓存到storage的内容的key列表 - -var keyInStorage = { - environmentList: 'EnvironmentList' -}; -/* -如果有InstanceId额外的维度,原则上都需要传入此map结构配置 -key的含义: - 经过InvalidDemensions处理后的string。topicId =》TopicId。 - 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId -value的含义: - 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、 - 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。 - 默认取通过InvalidDemsion处理后的key - 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。 - 即:templateQueryIdMap中内容。 - 联合上面2的内容筛选出原始sourceMap -*/ - -var queryMonitorExtraConfg = { - EnvironmentName: { - dim_KeyInStorage: keyInStorage.environmentList, - dim_KeyInTarget: 'EnvironmentName', - dim_KeyInMap: templateQueryIdMap.environmentName - } -}; // select类型需要注意是{},multi后缀是[],dropdown是'' - -var APIGATEWAYFilterFields = { - Limit: 20, - Offset: 0, - ServiceId: [], - ServiceName: [], - NotUsagePlanId: [], - Environment: [], - IpVersion: [] -}; -var APIGATEWAYFilterFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputNumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputNumber', - min: 1, - max: 100 -}, { - key: 'ServiceId', - enDescriptor: 'ServiceId', - cnDescriptor: '服务id', - link: '', - type: 'inputMulti' -}, { - key: 'ServiceName', - enDescriptor: 'ServiceName', - cnDescriptor: '服务名称', - link: '', - type: 'inputMulti' -}, { - key: 'NotUsagePlanId', - enDescriptor: 'NotUsagePlanId', - cnDescriptor: 'NotUsagePlanId', - link: '', - type: 'inputMulti' -}, { - key: 'Environment', - enDescriptor: 'Environment', - cnDescriptor: '环境名称', - link: '', - type: 'inputMulti' -}, { - key: 'IpVersion', - enDescriptor: 'IpVersion', - cnDescriptor: 'IP版本', - link: '', - type: 'inputMulti' -}]; // 各产品实例列表detail配置 - -var queryEditorConfig = { - instanceDocUrl: 'https://cloud.tencent.com/document/api/628/45198', - namespace: namespace, - fieldDescriptor: APIGATEWAYFilterFieldsDescriptor -}; -var APIGATEWAY_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'ServiceId', - EnvironmentName: '', - queries: APIGATEWAYFilterFields -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - return Object(_common_utils__WEBPACK_IMPORTED_MODULE_0__["instanceQueryParamsBaseParse"])(queries, true); -} // regions for dropdown - - -var regionSupported = [{ - value: 'ap-beijing' -}, { - value: 'ap-chengdu' -}, { - value: 'ap-chongqing' -}, { - value: 'ap-guangzhou' -}, { - value: 'ap-hongkong' -}, { - value: 'ap-mumbai' -}, { - value: 'ap-nanjing' -}, { - value: 'ap-shanghai' -}, { - value: 'ap-shanghai-fsi' -}, { - value: 'ap-shenzhen-fsi' -}, { - value: 'ap-singapore' -}, { - value: 'ap-tokyo' -}, { - value: 'eu-frankfurt' -}, { - value: 'na-ashburn' -}, { - value: 'na-siliconvalley' -}, { - value: 'na-toronto' -}]; -/* harmony default export */ __webpack_exports__["default"] = (APIGATEWAY_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/bmIntraLb/datasource.ts": -/*!*******************************************************!*\ - !*** ./datasource/tc_monitor/bmIntraLb/datasource.ts ***! - \*******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/bmIntraLb/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../locale */ "./locale/index.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __assign = undefined && undefined.__assign || function () { - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - } - - return t; - }; - - return __assign.apply(this, arguments); -}; - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - - - -var DCDatasource = -/** @class */ -function (_super) { - __extends(DCDatasource, _super); - - function DCDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = _query_def__WEBPACK_IMPORTED_MODULE_0__["namespace"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["BMINTRALBInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["BMINTRALBInvalidDemensions"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_0__["templateQueryIdMap"]; // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致 - - _this.InstanceReqConfig = { - service: 'bmlb', - action: 'DescribeLoadBalancers', - responseField: 'LoadBalancerSet', - interceptor: { - request: function request(params) { - return __assign(__assign({}, params), { - LoadBalancerType: 'internal' - }); - } // 设置一些请求参数的 默认值 - - } - }; - _this.RegionMap = {}; - return _this; - } // 重写getRegion - - - DCDatasource.prototype.getRegions = function () { - var _this = this; - - return this.doRequest({ - url: this.url + '/bm' - }, 'bm', { - action: 'DescribeRegions', - region: 'ap-guangzhou' - }).then(function (response) { - // 缓存,后面获取可用区zone - _this.RegionMap = lodash__WEBPACK_IMPORTED_MODULE_2___default.a.keyBy(response.RegionInfoSet, 'Region'); - return lodash__WEBPACK_IMPORTED_MODULE_2___default.a.map(response.RegionInfoSet || [], function (item) { - return { - text: Object(_locale__WEBPACK_IMPORTED_MODULE_3__["t"])(item.Region), - value: item.Region - }; - }); - }); - }; - - DCDatasource.prototype.getMetrics = function (region) { - if (region === void 0) { - region = 'ap-guangzhou'; - } - - return __awaiter(this, void 0, void 0, function () { - var rawSet; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - return [4 - /*yield*/ - , _super.prototype.getMetrics.call(this, region)]; - - case 1: - rawSet = _a.sent(); - return [2 - /*return*/ - , lodash__WEBPACK_IMPORTED_MODULE_2___default.a.compact(rawSet.map(function (item) { - if (Object(_query_def__WEBPACK_IMPORTED_MODULE_0__["isValidMetric"])(item)) { - return item; - } - - return null; - }))]; - } - }); - }); - }; - - return DCDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (DCDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/bmIntraLb/query.ts": -/*!**************************************************!*\ - !*** ./datasource/tc_monitor/bmIntraLb/query.ts ***! - \**************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _base_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_base/query */ "./datasource/tc_monitor/_base/query.ts"); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/bmIntraLb/query_def.ts"); - - -Object(_base_query__WEBPACK_IMPORTED_MODULE_0__["default"])(_query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorName"], _query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorConfig"]); - -/***/ }), - -/***/ "./datasource/tc_monitor/bmIntraLb/query_def.ts": -/*!******************************************************!*\ - !*** ./datasource/tc_monitor/bmIntraLb/query_def.ts ***! - \******************************************************/ -/*! exports provided: default, BMINTRALBFilterFieldsDescriptor, templateQueryIdMap, BMINTRALBInstanceAliasList, BMINTRALBInvalidDemensions, namespace, queryEditorName, queryEditorConfig, isValidMetric, BMINTRALBGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BMINTRALBFilterFieldsDescriptor", function() { return BMINTRALBFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BMINTRALBInstanceAliasList", function() { return BMINTRALBInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BMINTRALBInvalidDemensions", function() { return BMINTRALBInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorName", function() { return queryEditorName; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorConfig", function() { return queryEditorConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isValidMetric", function() { return isValidMetric; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BMINTRALBGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); - - -var namespace = 'QCE/BM_INTRA_LB'; // 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称 - -var queryEditorName = 'bmIntraLbQuery'; -var BMINTRALBInvalidDemensions = { - vip: 'LoadBalancerVips', - vpcId: 'VpcId' -}; // 要和文件名方式一致,ceip_summary=>CEIPSUMMARY - -var BMINTRALBInstanceAliasList = ['LoadBalancerId', 'LoadBalancerVips', 'LoadBalancerName']; -var templateQueryIdMap = { - instance: 'LoadBalancerId' -}; // select类型需要注意是{},multi后缀是[],dropdown是类型 - -var BMINTRALBFilterFields = { - Limit: 20, - Offset: 0, - LoadBalancerIds: [], - LoadBalancerName: [], - LoadBalancerVips: [] -}; -var BMINTRALBFilterFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputNumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputNumber', - min: 1, - max: 100 -}, { - key: 'LoadBalancerIds', - enDescriptor: 'LoadBalancerIds', - cnDescriptor: '负载均衡器ID数组', - link: '', - type: 'inputMulti' -}, { - key: 'LoadBalancerName', - enDescriptor: 'LoadBalancerName', - cnDescriptor: '负载均衡器名称', - link: '', - type: 'inputMulti' -}, { - key: 'LoadBalancerVips', - enDescriptor: 'LoadBalancerVips', - cnDescriptor: '负载均衡获得的公网IP地址', - link: '', - type: 'inputMulti' -}]; // 各产品实例列表detail配置 - -var queryEditorConfig = { - instanceDocUrl: 'https://cloud.tencent.com/document/api/1027/33280', - namespace: namespace, - fieldDescriptor: BMINTRALBFilterFieldsDescriptor -}; -var BMINTRALB_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'LoadBalancerId', - queries: BMINTRALBFilterFields -}; -var BMLBValidMetricsT = ['Inpkg', 'Outpkg', 'Intraffic', 'Outtraffic', 'Connum', 'Req']; - -function isValidMetric(metric) { - var validMetrics = lodash__WEBPACK_IMPORTED_MODULE_1___default.a.map(BMLBValidMetricsT, lodash__WEBPACK_IMPORTED_MODULE_1___default.a.toUpper); - - return lodash__WEBPACK_IMPORTED_MODULE_1___default.a.indexOf(validMetrics, lodash__WEBPACK_IMPORTED_MODULE_1___default.a.toUpper(metric.MetricName)) !== -1; -} - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - return Object(_common_utils__WEBPACK_IMPORTED_MODULE_0__["instanceQueryParamsBaseParse"])(queries, false); -} - -/* harmony default export */ __webpack_exports__["default"] = (BMINTRALB_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/bm_lb/datasource.ts": -/*!***************************************************!*\ - !*** ./datasource/tc_monitor/bm_lb/datasource.ts ***! - \***************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/bm_lb/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../locale */ "./locale/index.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __assign = undefined && undefined.__assign || function () { - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - } - - return t; - }; - - return __assign.apply(this, arguments); -}; - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - - - -var DCDatasource = -/** @class */ -function (_super) { - __extends(DCDatasource, _super); - - function DCDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = _query_def__WEBPACK_IMPORTED_MODULE_0__["namespace"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["BMLBInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["CPMInvalidDemensions"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_0__["templateQueryIdMap"]; // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致 - - _this.InstanceReqConfig = { - service: 'bmlb', - action: 'DescribeLoadBalancers', - responseField: 'LoadBalancerSet', - interceptor: { - request: function request(params) { - return __assign(__assign({}, params), { - LoadBalancerType: 'open' - }); - } // 设置一些请求参数的 默认值 - - } - }; - _this.RegionMap = {}; - return _this; - } - - DCDatasource.prototype.getMetrics = function (region) { - if (region === void 0) { - region = 'ap-guangzhou'; - } - - return __awaiter(this, void 0, void 0, function () { - var rawSet; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - return [4 - /*yield*/ - , _super.prototype.getMetrics.call(this, region)]; - - case 1: - rawSet = _a.sent(); - return [2 - /*return*/ - , lodash__WEBPACK_IMPORTED_MODULE_2___default.a.compact(rawSet.map(function (item) { - if (Object(_query_def__WEBPACK_IMPORTED_MODULE_0__["isValidMetric"])(item)) { - return item; - } - - return null; - }))]; - } - }); - }); - }; // 重写getRegion - - - DCDatasource.prototype.getRegions = function () { - var _this = this; - - return this.doRequest({ - url: this.url + '/bm' - }, 'bm', { - action: 'DescribeRegions', - region: 'ap-guangzhou' - }).then(function (response) { - // 缓存,后面获取可用区zone - _this.RegionMap = lodash__WEBPACK_IMPORTED_MODULE_2___default.a.keyBy(response.RegionInfoSet, 'Region'); - return lodash__WEBPACK_IMPORTED_MODULE_2___default.a.map(response.RegionInfoSet || [], function (item) { - return { - text: Object(_locale__WEBPACK_IMPORTED_MODULE_3__["t"])(item.Region), - value: item.Region - }; - }); - }); - }; - - return DCDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (DCDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/bm_lb/query.ts": -/*!**********************************************!*\ - !*** ./datasource/tc_monitor/bm_lb/query.ts ***! - \**********************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _base_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_base/query */ "./datasource/tc_monitor/_base/query.ts"); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/bm_lb/query_def.ts"); - - -Object(_base_query__WEBPACK_IMPORTED_MODULE_0__["default"])(_query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorName"], _query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorConfig"]); - -/***/ }), - -/***/ "./datasource/tc_monitor/bm_lb/query_def.ts": -/*!**************************************************!*\ - !*** ./datasource/tc_monitor/bm_lb/query_def.ts ***! - \**************************************************/ -/*! exports provided: default, CPMFilterFieldsDescriptor, templateQueryIdMap, BMLBInstanceAliasList, CPMInvalidDemensions, namespace, queryEditorName, queryEditorConfig, isValidMetric, BMLBGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CPMFilterFieldsDescriptor", function() { return CPMFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BMLBInstanceAliasList", function() { return BMLBInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CPMInvalidDemensions", function() { return CPMInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorName", function() { return queryEditorName; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorConfig", function() { return queryEditorConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isValidMetric", function() { return isValidMetric; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BMLBGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); - - -var namespace = 'QCE/BM_LB'; // 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称 - -var queryEditorName = 'bmLbQuery'; -var CPMInvalidDemensions = { - vip: 'LoadBalancerVips' -}; // 要和文件名方式一致,ceip_summary=>CEIPSUMMARY - -var BMLBInstanceAliasList = ['LoadBalancerId', 'LoadBalancerVips', 'LoadBalancerName']; -var templateQueryIdMap = { - instance: 'LoadBalancerId' -}; // select类型需要注意是{},multi后缀是[],dropdown是类型 - -var CPMFilterFields = { - Limit: 20, - Offset: 0, - LoadBalancerIds: [], - LoadBalancerName: [], - LoadBalancerVips: [] -}; -var CPMFilterFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputNumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputNumber', - min: 1, - max: 100 -}, { - key: 'LoadBalancerIds', - enDescriptor: 'LoadBalancerIds', - cnDescriptor: '负载均衡器ID数组', - link: '', - type: 'inputMulti' -}, { - key: 'LoadBalancerName', - enDescriptor: 'LoadBalancerName', - cnDescriptor: '负载均衡器名称', - link: '', - type: 'inputMulti' -}, { - key: 'LoadBalancerVips', - enDescriptor: 'LoadBalancerVips', - cnDescriptor: '负载均衡获得的公网IP地址', - link: '', - type: 'inputMulti' -}]; // 各产品实例列表detail配置 - -var queryEditorConfig = { - instanceDocUrl: 'https://cloud.tencent.com/document/api/1027/33280', - namespace: namespace, - fieldDescriptor: CPMFilterFieldsDescriptor -}; -var CPM_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'LoadBalancerId', - queries: CPMFilterFields -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - return Object(_common_utils__WEBPACK_IMPORTED_MODULE_0__["instanceQueryParamsBaseParse"])(queries, false); -} - -var BMLBValidMetricsT = ['Inpkg', 'Outpkg', 'Intraffic', 'Outtraffic', 'Connum', 'Req']; - -function isValidMetric(metric) { - var validMetrics = lodash__WEBPACK_IMPORTED_MODULE_1___default.a.map(BMLBValidMetricsT, lodash__WEBPACK_IMPORTED_MODULE_1___default.a.toUpper); - - return lodash__WEBPACK_IMPORTED_MODULE_1___default.a.indexOf(validMetrics, lodash__WEBPACK_IMPORTED_MODULE_1___default.a.toUpper(metric.MetricName)) !== -1; -} - -/* harmony default export */ __webpack_exports__["default"] = (CPM_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/bm_pcx/datasource.ts": -/*!****************************************************!*\ - !*** ./datasource/tc_monitor/bm_pcx/datasource.ts ***! - \****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/bm_pcx/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../locale */ "./locale/index.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - - - - - - -var DCDatasource = -/** @class */ -function (_super) { - __extends(DCDatasource, _super); - - function DCDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = _query_def__WEBPACK_IMPORTED_MODULE_0__["namespace"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["BMPCXInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["BMPCXInvalidDemensions"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_0__["templateQueryIdMap"]; // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致 - - _this.InstanceReqConfig = { - service: 'bmvpc', - action: 'DescribeVpcPeerConnections', - responseField: 'VpcPeerConnectionSet' - }; - _this.MetricReqConfig = { - resultFilter: _query_def__WEBPACK_IMPORTED_MODULE_0__["modifyDimensons"] - }; - _this.RegionMap = {}; - return _this; - } // 重写getRegion - - - DCDatasource.prototype.getRegions = function () { - var _this = this; - - return this.doRequest({ - url: this.url + '/bm' - }, 'bm', { - action: 'DescribeRegions', - region: 'ap-guangzhou' - }).then(function (response) { - // 缓存,后面获取可用区zone - _this.RegionMap = lodash__WEBPACK_IMPORTED_MODULE_2___default.a.keyBy(response.RegionInfoSet, 'Region'); - return lodash__WEBPACK_IMPORTED_MODULE_2___default.a.map(response.RegionInfoSet || [], function (item) { - return { - text: Object(_locale__WEBPACK_IMPORTED_MODULE_3__["t"])(item.Region), - value: item.Region - }; - }); - }); - }; - - return DCDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (DCDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/bm_pcx/query.ts": -/*!***********************************************!*\ - !*** ./datasource/tc_monitor/bm_pcx/query.ts ***! - \***********************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _base_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_base/query */ "./datasource/tc_monitor/_base/query.ts"); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/bm_pcx/query_def.ts"); - - -Object(_base_query__WEBPACK_IMPORTED_MODULE_0__["default"])(_query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorName"], _query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorConfig"]); - -/***/ }), - -/***/ "./datasource/tc_monitor/bm_pcx/query_def.ts": -/*!***************************************************!*\ - !*** ./datasource/tc_monitor/bm_pcx/query_def.ts ***! - \***************************************************/ -/*! exports provided: default, BMPCXFilterFieldsDescriptor, templateQueryIdMap, BMPCXInstanceAliasList, BMPCXInvalidDemensions, namespace, queryEditorName, queryEditorConfig, modifyDimensons, BMPCXGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BMPCXFilterFieldsDescriptor", function() { return BMPCXFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BMPCXInstanceAliasList", function() { return BMPCXInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BMPCXInvalidDemensions", function() { return BMPCXInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorName", function() { return queryEditorName; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorConfig", function() { return queryEditorConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "modifyDimensons", function() { return modifyDimensons; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BMPCXGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); - - -var namespace = 'QCE/BM_PCX'; // 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称 - -var queryEditorName = 'bmPcxQuery'; -var BMPCXInvalidDemensions = { - peeringConnectionId: 'VpcPeerConnectionId' -}; // 要和文件名方式一致,ceip_summary=>CEIPSUMMARY - -var BMPCXInstanceAliasList = ['VpcPeerConnectionId', 'VpcPeerConnectionName']; -var templateQueryIdMap = { - instance: 'VpcPeerConnectionId' -}; // select类型需要注意是{},multi后缀是[],dropdown是类型 - -var BMPCXFilterFields = { - Limit: 20, - Offset: 0, - VpcPeerConnectionIds: [] -}; -var BMPCXFilterFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputNumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputNumber', - min: 1, - max: 100 -}, { - key: 'VpcPeerConnectionIds', - enDescriptor: 'VpcPeerConnectionIds', - cnDescriptor: '对等连接实例ID', - link: '', - type: 'inputMulti' -}]; // 各产品实例列表detail配置 - -var queryEditorConfig = { - instanceDocUrl: 'https://cloud.tencent.com/document/product/1024/36903', - namespace: namespace, - fieldDescriptor: BMPCXFilterFieldsDescriptor -}; -var BMPCX_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'VpcPeerConnectionId', - queries: BMPCXFilterFields -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - return Object(_common_utils__WEBPACK_IMPORTED_MODULE_0__["instanceQueryParamsBaseParse"])(queries, false); -} - -function modifyDimensons(metricItem) { - var metricTmp = lodash__WEBPACK_IMPORTED_MODULE_1___default.a.cloneDeep(metricItem); - - metricTmp.Dimensions.forEach(function (item) { - item.Dimensions = ['peeringConnectionId']; - }); - return metricTmp; -} - -/* harmony default export */ __webpack_exports__["default"] = (BMPCX_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/bwp/datasource.ts": -/*!*************************************************!*\ - !*** ./datasource/tc_monitor/bwp/datasource.ts ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/bwp/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - - - - -var BWPDatasource = -/** @class */ -function (_super) { - __extends(BWPDatasource, _super); - - function BWPDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = 'QCE/BWP'; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["BWPInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["BWPInvalidDemensions"]; - _this.templateQueryIdMap = { - instance: 'BandwidthPackageId' - }; - _this.InstanceReqConfig = { - service: 'vpc', - action: 'DescribeBandwidthPackages', - responseField: 'BandwidthPackageSet' - }; - return _this; - } - - return BWPDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (BWPDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/bwp/query.ts": -/*!********************************************!*\ - !*** ./datasource/tc_monitor/bwp/query.ts ***! - \********************************************/ -/*! exports provided: BWPQueryCtrl, bwpQuery */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BWPQueryCtrl", function() { return BWPQueryCtrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bwpQuery", function() { return bwpQuery; }); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! grafana/app/core/core_module */ "grafana/app/core/core_module"); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/bwp/query_def.ts"); - - - -var BWPQueryCtrl = -/** @class */ -function () { - BWPQueryCtrl.$inject = ["$scope", "$rootScope"]; - - /** @ngInject */ - function BWPQueryCtrl($scope, $rootScope) { - $scope.init = function () { - $scope.BWPFilterFieldsDescriptor = _query_def__WEBPACK_IMPORTED_MODULE_1__["BWPFilterFieldsDescriptor"]; - }; - - $scope.onChecked = function (srcField, dstField) { - if ($scope.target.queries[srcField] === true) { - $scope.target.queries[dstField] = false; - } - - $scope.onChange(); - }; - - $scope.getDropdown = function (field) { - switch (field) { - case 'zone': - return $scope.getZones(); - - default: - return []; - } - }; - - $scope.getZones = function () { - if (!$scope.region) { - return []; - } - - return $scope.datasource.getZones('cvm', $scope.region); - }; - - $scope.init(); - } - - return BWPQueryCtrl; -}(); - - -var template = "\n
\n\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n \n \n \n
\n
\n\n
\n"; -function bwpQuery() { - return { - template: template, - controller: BWPQueryCtrl, - restrict: 'E', - scope: { - target: '=', - showDetail: '=', - region: '=', - datasource: '=', - getDropdownOptions: '&', - onChange: '&' - } - }; -} -grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default.a.directive('bwpQuery', bwpQuery); - -/***/ }), - -/***/ "./datasource/tc_monitor/bwp/query_def.ts": -/*!************************************************!*\ - !*** ./datasource/tc_monitor/bwp/query_def.ts ***! - \************************************************/ -/*! exports provided: default, BWPFilterFieldsDescriptor, templateQueryIdMap, BWPInstanceAliasList, BWPInvalidDemensions, BWPGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BWPFilterFieldsDescriptor", function() { return BWPFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BWPInstanceAliasList", function() { return BWPInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BWPInvalidDemensions", function() { return BWPInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BWPGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -var __assign = undefined && undefined.__assign || function () { - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - } - - return t; - }; - - return __assign.apply(this, arguments); -}; - - -var networkTypes = [{ - text: 'BGP', - value: 'BGP' -}, { - text: 'SINGLEISP', - value: 'SINGLEISP' -}, { - text: 'ANYCAST', - value: 'ANYCAST' -}]; -var chargeTypes = [{ - text: 'top5计费', - value: 'TOP5_POSTPAID_BY_MONTH' -}, { - text: '月95计费', - value: 'PERCENT95_POSTPAID_BY_MONTH' -}]; -var BWPFilterFields = { - 'bandwidth-package_id': [], - 'bandwidth-package-name': [], - 'network-type': [], - 'charge-type': [] -}; -var BWPFilterFieldsDescriptor = [{ - key: 'bandwidth-package_id', - enDescriptor: 'BandwidthPackage Id', - cnDescriptor: '带宽包ID', - link: '', - type: 'inputmulti' -}, { - key: 'bandwidth-package-name', - enDescriptor: 'BandwidthPackage Name', - cnDescriptor: '带宽包名称', - link: '', - type: 'inputmulti' -}, { - key: 'network-type', - enDescriptor: 'network type', - cnDescriptor: '带宽包类型', - link: '', - type: 'select', - list: networkTypes -}, { - key: 'charge-type', - enDescriptor: 'charge type', - cnDescriptor: '带宽包计费类型', - link: '', - type: 'select', - list: chargeTypes -}]; -var BWP_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'BandwidthPackageId', - queries: { - Limit: 20, - Offset: 0, - instanceIdsChecked: false, - filtersChecked: false, - BandwidthPackageIds: [''], - Filters: __assign({}, BWPFilterFields) - } -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - var params = {}; - - if (!lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(queries)) { - params.Limit = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Limit', 20) || 20; - params.Offset = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Offset', 0) || 0; - - if (queries.instanceIdsChecked) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isArray(queries.BandwidthPackageIds)) { - var BandwidthPackageIds = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.compact(queries.BandwidthPackageIds); - - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(BandwidthPackageIds).length > 0) { - params.BandwidthPackageIds = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(BandwidthPackageIds).slice(0, 100); - } - } - } else if (queries.filtersChecked) { - var Filters_1 = []; - - lodash__WEBPACK_IMPORTED_MODULE_0___default.a.forEach(queries.Filters, function (item, key) { - if (Filters_1.length > 9) { - return; - } - - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isArray(item)) { - item = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.compact(item); - - if (item.length > 0) { - Filters_1.push({ - Name: key, - Values: lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(item).slice(0, 5) - }); - } - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isObject(item)) { - if (!lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', []))) { - Filters_1.push({ - Name: key, - Values: lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', []).slice(0, 5) - }); - } - } - }); - - if (Filters_1.length > 0) { - params.Filters = Filters_1; - } - } - } - - return params; -} - -var BWPInstanceAliasList = ['BandwidthPackageId', 'BandwidthPackageName']; -var templateQueryIdMap = { - instance: 'BandwidthPackageId' -}; -var BWPInvalidDemensions = { - bandwidthPackageId: 'BandwidthPackageId' -}; -/* harmony default export */ __webpack_exports__["default"] = (BWP_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/cbs/datasource.ts": -/*!*************************************************!*\ - !*** ./datasource/tc_monitor/cbs/datasource.ts ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/cbs/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - - -var DCDatasource = -/** @class */ -function (_super) { - __extends(DCDatasource, _super); - - function DCDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = _query_def__WEBPACK_IMPORTED_MODULE_0__["namespace"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["CBSInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["CBSInvalidDemensions"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_0__["templateQueryIdMap"]; // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致 - - _this.InstanceReqConfig = { - service: 'cbs', - action: 'DescribeDisks', - responseField: 'DiskSet' - }; - return _this; - } - - DCDatasource.prototype.getMetrics = function (region) { - if (region === void 0) { - region = 'ap-guangzhou'; - } - - return __awaiter(this, void 0, void 0, function () { - var rawSet; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - return [4 - /*yield*/ - , _super.prototype.getMetrics.call(this, region)]; - - case 1: - rawSet = _a.sent(); - return [2 - /*return*/ - , lodash__WEBPACK_IMPORTED_MODULE_2___default.a.filter(rawSet, _query_def__WEBPACK_IMPORTED_MODULE_0__["isValidMetric"])]; - } - }); - }); - }; - - return DCDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (DCDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/cbs/query.ts": -/*!********************************************!*\ - !*** ./datasource/tc_monitor/cbs/query.ts ***! - \********************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _base_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_base/query */ "./datasource/tc_monitor/_base/query.ts"); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/cbs/query_def.ts"); - - -Object(_base_query__WEBPACK_IMPORTED_MODULE_0__["default"])(_query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorName"], _query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorConfig"]); - -/***/ }), - -/***/ "./datasource/tc_monitor/cbs/query_def.ts": -/*!************************************************!*\ - !*** ./datasource/tc_monitor/cbs/query_def.ts ***! - \************************************************/ -/*! exports provided: default, CBSFilterFieldsDescriptor, templateQueryIdMap, CBSInstanceAliasList, CBSInvalidDemensions, namespace, queryEditorName, queryEditorConfig, isValidMetric, CBSGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CBSFilterFieldsDescriptor", function() { return CBSFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CBSInstanceAliasList", function() { return CBSInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CBSInvalidDemensions", function() { return CBSInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorName", function() { return queryEditorName; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorConfig", function() { return queryEditorConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isValidMetric", function() { return isValidMetric; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CBSGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); - - -var namespace = 'QCE/BLOCK_STORAGE'; -var queryEditorName = 'cbsQuery'; -var CBSInvalidDemensions = { - diskId: 'DiskId', - InstanceId: 'InstanceId', - diskname: 'DiskName', - unInstanceId: 'InstanceId' -}; -var CBSInstanceAliasList = ['DiskId', 'DiskName']; -var templateQueryIdMap = { - instance: 'DiskId' -}; // select类型需要注意是{},multi后缀是[] - -var CBSFilterFields = { - Limit: 20, - Offset: 0, - DiskIds: [], - OrderField: [], - Order: [], - ReturnBindAutoSnapshotPolicy: false -}; -var CBSFilterFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputNumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputNumber', - min: 1, - max: 100 -}, { - key: 'DiskIds', - enDescriptor: 'DiskIds', - cnDescriptor: '云硬盘ID', - link: '', - type: 'inputMulti' -}, { - key: 'Order', - enDescriptor: 'Order', - cnDescriptor: '排列顺序', - link: '', - type: 'select', - list: [{ - text: '升序排列', - value: 'ASC' - }, { - text: '降序排列', - value: 'DESC' - }] -}, { - key: 'OrderField', - enDescriptor: 'OrderField', - cnDescriptor: '排序的依据字段', - link: '', - type: 'select', - list: [{ - text: '云盘的创建时间排序', - value: 'CREATE_TIME' - }, { - text: '云盘的到期时间排序', - value: 'DEADLINE' - }] -}, { - key: 'ReturnBindAutoSnapshotPolicy', - enDescriptor: 'ReturnBindAutoSnapshotPolicy', - cnDescriptor: '否需要返回云盘绑定的定期快照策略ID', - link: '', - type: 'switch' -}]; // 各产品实例列表detail配置 - -var queryEditorConfig = { - instanceDocUrl: 'https://cloud.tencent.com/document/api/362/16315', - namespace: namespace, - fieldDescriptor: CBSFilterFieldsDescriptor -}; -var CBS_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'DiskId', - queries: CBSFilterFields -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - return Object(_common_utils__WEBPACK_IMPORTED_MODULE_1__["instanceQueryParamsBaseParse"])(queries, false); -} - -function isValidMetric(metricObj) { - if (metricObj === void 0) { - metricObj = {}; - } - - var dimension = lodash__WEBPACK_IMPORTED_MODULE_0__["get"](metricObj, 'Dimensions[0].Dimensions'); // console.log('dimension', dimension, dimension.length === 1 && _.indexOf(dimension, 'diskId') !== -1); - - - return dimension.length === 1 && lodash__WEBPACK_IMPORTED_MODULE_0__["indexOf"](dimension, 'diskId') !== -1; -} - -/* harmony default export */ __webpack_exports__["default"] = (CBS_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/cdb/datasource.ts": -/*!*************************************************!*\ - !*** ./datasource/tc_monitor/cdb/datasource.ts ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/cdb/query_def.ts"); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/constants */ "./datasource/common/constants.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - - - -var CDBDatasource = -/** @class */ -function (_super) { - __extends(CDBDatasource, _super); - - function CDBDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = 'QCE/CDB'; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_1__["CDBInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_1__["CDBInvalidDemensions"]; - _this.templateQueryIdMap = { - instance: 'InstanceId' - }; - _this.InstanceReqConfig = { - service: 'cdb', - action: 'DescribeDBInstances', - responseField: 'Items' - }; - return _this; - } - - CDBDatasource.prototype.getMetrics = function (region) { - if (region === void 0) { - region = 'ap-guangzhou'; - } - - return __awaiter(this, void 0, void 0, function () { - var rawSet; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - return [4 - /*yield*/ - , _super.prototype.getMetrics.call(this, region)]; - - case 1: - rawSet = _a.sent(); - return [2 - /*return*/ - , lodash__WEBPACK_IMPORTED_MODULE_0___default.a.compact(rawSet.map(function (item) { - if (Object(_query_def__WEBPACK_IMPORTED_MODULE_1__["isValidMetric"])(item)) { - return Object(_query_def__WEBPACK_IMPORTED_MODULE_1__["modifyDimensons"])(item); - } - - return null; - }))]; - } - }); - }); - }; - /** - * 获取 可用区 - * @param region 地域信息 - */ - - - CDBDatasource.prototype.getZones = function (region) { - var serviceInfo = Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["GetServiceAPIInfo"])(region, 'cvm'); - return this.doRequest({ - url: this.url + serviceInfo.path - }, serviceInfo.service, { - region: region, - action: 'DescribeZones' - }).then(function (response) { - return lodash__WEBPACK_IMPORTED_MODULE_0___default.a.filter(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.map(response.ZoneSet || [], function (item) { - return { - text: item.ZoneName, - value: item.ZoneId, - ZoneState: item.ZoneState, - Zone: item.Zone - }; - }), function (item) { - return item.ZoneState === 'AVAILABLE'; - }); - }); - }; // 仅对维度组合是InstanceId和InstanceType的指标,其他指标不支持 - - - CDBDatasource.prototype.getDefaultInsObj = function (ins) { - var _a; - - return _a = {}, _a[_query_def__WEBPACK_IMPORTED_MODULE_1__["templateQueryIdMap"].instance] = ins, _a.InstanceType = 1, _a; - }; - - return CDBDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_3__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (CDBDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/cdb/query.ts": -/*!********************************************!*\ - !*** ./datasource/tc_monitor/cdb/query.ts ***! - \********************************************/ -/*! exports provided: CDBQueryCtrl, cdbQuery */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CDBQueryCtrl", function() { return CDBQueryCtrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cdbQuery", function() { return cdbQuery; }); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! grafana/app/core/core_module */ "grafana/app/core/core_module"); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/cdb/query_def.ts"); - - - -var CDBQueryCtrl = -/** @class */ -function () { - CDBQueryCtrl.$inject = ["$scope", "$rootScope"]; - - /** @ngInject */ - function CDBQueryCtrl($scope, $rootScope) { - $scope.init = function () { - $scope.CDBFieldsDescriptor = _query_def__WEBPACK_IMPORTED_MODULE_1__["CDBFieldsDescriptor"]; - }; - - $scope.onChecked = function (srcField, dstField) { - if ($scope.target.queries[srcField] === true) { - $scope.target.queries[dstField] = false; - } - - $scope.onChange(); - }; - - $scope.getDropdown = function (field) { - switch (field) { - case 'ZoneIds': - return $scope.getZones(); - - default: - return []; - } - }; - - $scope.getZones = function () { - if (!$scope.region) { - return []; - } - - return $scope.datasource.getZones('cdb', $scope.region); - }; - - $scope.init(); - } - - return CDBQueryCtrl; -}(); - - -var template = "\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n"; -function cdbQuery() { - return { - template: template, - controller: CDBQueryCtrl, - restrict: 'E', - scope: { - target: '=', - showDetail: '=', - region: '=', - datasource: '=', - getDropdownOptions: '&', - onChange: '&' - } - }; -} -grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default.a.directive('cdbQuery', cdbQuery); - -/***/ }), - -/***/ "./datasource/tc_monitor/cdb/query_def.ts": -/*!************************************************!*\ - !*** ./datasource/tc_monitor/cdb/query_def.ts ***! - \************************************************/ -/*! exports provided: default, CDBFieldsDescriptor, CDBInstanceAliasList, templateQueryIdMap, CDBInvalidDemensions, isValidMetric, modifyDimensons, CDBGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CDBFieldsDescriptor", function() { return CDBFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CDBInstanceAliasList", function() { return CDBInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CDBInvalidDemensions", function() { return CDBInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isValidMetric", function() { return isValidMetric; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "modifyDimensons", function() { return modifyDimensons; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CDBGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -var __assign = undefined && undefined.__assign || function () { - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - } - - return t; - }; - - return __assign.apply(this, arguments); -}; - - -var InstanceTypes = [{ - text: '主实例', - value: 1 -}, { - text: '备灾实例', - value: 2 -}, { - text: '只读实例', - value: 3 -}]; -var Status = [{ - text: '创建中', - value: 0 -}, { - text: '运行中', - value: 1 -}, { - text: '隔离中', - value: 4 -}, { - text: '已隔离', - value: 5 -}]; -var PayTypes = [{ - text: '包年包月', - value: 0 -}, { - text: '小时计费', - value: 1 -}]; -var TaskStatus = [{ - text: '没有任务', - value: 0 -}, { - text: '升级中', - value: 1 -}, { - text: '数据导入中', - value: 2 -}, { - text: '开放Slave中', - value: 3 -}, { - text: '外网访问开通中', - value: 4 -}, { - text: '批量操作执行中', - value: 5 -}, { - text: '回档中', - value: 6 -}, { - text: '外网访问关闭中', - value: 7 -}, { - text: '密码修改中', - value: 8 -}, { - text: '实例名修改中', - value: 9 -}, { - text: '重启中', - value: 10 -}, { - text: '自建迁移中', - value: 12 -}, { - text: '删除库表中', - value: 13 -}, { - text: '灾备实例创建同步中', - value: 14 -}, { - text: '升级待切换', - value: 15 -}, { - text: '升级切换中', - value: 16 -}, { - text: '升级切换完成', - value: 17 -}]; -var EngineVersions = [{ - text: '5.1', - value: '5.1' -}, { - text: '5.5', - value: '5.5' -}, { - text: '5.6', - value: '5.6' -}, { - text: '5.7', - value: '5.7' -}]; -var OrderBy = [{ - text: 'InstanceId', - value: 'InstanceId' -}, { - text: 'InstanceName', - value: 'InstanceName' -}, { - text: 'CreateTime', - value: 'CreateTime' -}, { - text: 'DeadlineTime', - value: 'DeadlineTime' -}]; -var OrderDirection = [{ - text: 'ASC', - value: 'ASC' -}, { - text: 'DESC', - value: 'DESC' -}]; -var InitFlag = [{ - text: '未初始化', - value: 0 -}, { - text: '初始化', - value: 1 -}]; -var CdbErrors = [{ - text: '未锁定', - value: 0 -}, { - text: '锁定', - value: 1 -}]; -var CDBFields = { - ProjectId: '', - InstanceTypes: {}, - Vips: [], - Status: {}, - Offset: 0, - Limit: 20, - SecurityGroupId: '', - PayTypes: {}, - InstanceNames: [], - TaskStatus: {}, - EngineVersions: {}, - VpcIds: [], - ZoneIds: [], - SubnetIds: [], - CdbErrors: {}, - OrderBy: {}, - OrderDirection: {}, - InstanceIds: [], - InitFlag: {} -}; -var CDBFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputnumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputnumber', - min: 1, - max: 100 -}, { - key: 'InstanceNames', - enDescriptor: 'Instance Name', - cnDescriptor: '实例名称', - link: '', - type: 'inputmulti' -}, { - key: 'InstanceIds', - enDescriptor: 'Instance ID', - cnDescriptor: '实例ID', - link: '', - type: 'inputmulti' -}, { - key: 'ZoneIds', - enDescriptor: 'Zone ID', - cnDescriptor: '可用区的ID', - link: '', - type: 'dropdownmulti' -}, { - key: 'InstanceTypes', - enDescriptor: 'Instance Type', - cnDescriptor: '实例类型', - link: '', - multiple: true, - type: 'select', - list: InstanceTypes -}, { - key: 'EngineVersions', - enDescriptor: 'Engine Version', - cnDescriptor: '实例数据库引擎版本', - link: '', - multiple: true, - type: 'select', - list: EngineVersions -}, { - key: 'TaskStatus', - enDescriptor: 'Task Status', - cnDescriptor: '实例任务', - link: '', - multiple: true, - type: 'select', - list: TaskStatus -}, { - key: 'InitFlag', - enDescriptor: 'Init Flag', - cnDescriptor: '实例初始化状态', - link: '', - multiple: true, - type: 'select', - list: InitFlag -}, { - key: 'PayTypes', - enDescriptor: 'Pay Type', - cnDescriptor: '付费类型', - link: '', - multiple: true, - type: 'select', - list: PayTypes -}, { - key: 'CdbErrors', - enDescriptor: 'CDB Errors', - cnDescriptor: '实例锁定标记', - link: '', - multiple: true, - type: 'select', - list: CdbErrors -}, { - key: 'Status', - enDescriptor: 'Status', - cnDescriptor: '实例状态', - link: '', - multiple: true, - type: 'select', - list: Status -}, { - key: 'OrderBy', - enDescriptor: 'OrderBy', - cnDescriptor: '排序字段', - link: '', - type: 'select', - list: OrderBy -}, { - key: 'OrderDirection', - enDescriptor: 'Order Direction', - cnDescriptor: '排序方式', - link: '', - type: 'select', - list: OrderDirection -}, { - key: 'Vips', - enDescriptor: 'Vip', - cnDescriptor: '实例内网IP地址', - link: '', - type: 'inputmulti' -}, { - key: 'VpcIds', - enDescriptor: 'Vpc ID', - cnDescriptor: '私有网络ID', - link: 'https://cloud.tencent.com/document/api/215/15778', - type: 'inputmulti' -}, { - key: 'SubnetIds', - enDescriptor: 'Subnet ID', - cnDescriptor: '子网ID', - link: 'https://cloud.tencent.com/document/api/215/15784', - type: 'inputmulti' -}, { - key: 'ProjectId', - enDescriptor: 'Project ID', - cnDescriptor: '项目ID', - link: 'https://cloud.tencent.com/document/product/378/4400', - type: 'input' -}, { - key: 'SecurityGroupId', - enDescriptor: 'Security Group ID', - cnDescriptor: '安全组ID', - link: 'https://cloud.tencent.com/document/api/236/15854', - type: 'input' -}]; -var CDB_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'InstanceId', - queries: __assign({}, CDBFields) -}; -var CDBInstanceAliasList = ['InstanceId', 'InstanceName', 'Vip']; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - var params = {}; - - if (!lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(queries)) { - params.Limit = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Limit', 20) || 20; - params.Offset = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Offset', 0) || 0; - queries = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.omit(queries, ['Offset', 'Limit']); - - lodash__WEBPACK_IMPORTED_MODULE_0___default.a.forEach(queries, function (item, key) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isArray(item)) { - item = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.compact(item); - - if (item.length > 0) { - params[key] = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(item); - } - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isObject(item)) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isNumber(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', undefined)) || !lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', undefined))) { - params[key] = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value'); - } - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isNumber(item) || !lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(item)) { - params[key] = item; - } - }); - } - - return params; -} - -function isValidMetric(metricObj) { - if (metricObj === void 0) { - metricObj = {}; - } - - var dimension = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(metricObj, 'Dimensions[0].Dimensions'); - - return dimension.length === 2 && (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.indexOf(dimension, 'instanceid') !== -1 && lodash__WEBPACK_IMPORTED_MODULE_0___default.a.indexOf(dimension, 'insttype') !== -1 || lodash__WEBPACK_IMPORTED_MODULE_0___default.a.indexOf(dimension, 'InstanceId') !== -1 && lodash__WEBPACK_IMPORTED_MODULE_0___default.a.indexOf(dimension, 'InstanceType') !== -1); -} - -function modifyDimensons(metricItem) { - var metricTmp = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.cloneDeep(metricItem); - - metricTmp.Dimensions.forEach(function (item) { - item.Dimensions = item.Dimensions.map(function (i) { - return CDBInvalidDemensions[i] || i; - }); - }); - return metricTmp; -} - -var CDBInvalidDemensions = { - instanceid: 'InstanceId', - insttype: 'InstanceType', - region: 'Region' -}; -var templateQueryIdMap = { - instance: 'InstanceId' -}; -/* harmony default export */ __webpack_exports__["default"] = (CDB_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/cdn/datasource.ts": -/*!*************************************************!*\ - !*** ./datasource/tc_monitor/cdn/datasource.ts ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/cdn/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __assign = undefined && undefined.__assign || function () { - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - } - - return t; - }; - - return __assign.apply(this, arguments); -}; - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - -var CDNDatasource = -/** @class */ -function (_super) { - __extends(CDNDatasource, _super); - - function CDNDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = 'QCE/CDN'; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["CDNInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["CDNInvalidDemensions"]; - _this.templateQueryIdMap = { - instance: 'Domain' - }; - _this.InstanceReqConfig = { - service: 'cdn', - action: 'DescribeDomains', - responseField: 'Domains' - }; - return _this; - } - - CDNDatasource.prototype.metricFindQuery = function (query, regex) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , _super.prototype.metricFindQuery.call(this, __assign(__assign({}, query), { - region: 'ap-guangzhou' - }), regex)]; - }); - }); - }; - - return CDNDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (CDNDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/cdn/query.ts": -/*!********************************************!*\ - !*** ./datasource/tc_monitor/cdn/query.ts ***! - \********************************************/ -/*! exports provided: CDNQueryCtrl, cdnQuery */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CDNQueryCtrl", function() { return CDNQueryCtrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cdnQuery", function() { return cdnQuery; }); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! grafana/app/core/core_module */ "grafana/app/core/core_module"); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/cdn/query_def.ts"); - - - -var CDNQueryCtrl = -/** @class */ -function () { - CDNQueryCtrl.$inject = ["$scope", "$rootScope"]; - - /** @ngInject */ - function CDNQueryCtrl($scope, $rootScope) { - $scope.init = function () { - $scope.CDNFilterFieldsDescriptor = _query_def__WEBPACK_IMPORTED_MODULE_1__["CDNFilterFieldsDescriptor"]; - }; // $scope.onChecked = (srcField, dstField) => { - // if ($scope.target.queries[srcField] === true) { - // $scope.target.queries[dstField] = false; - // } - // $scope.onChange(); - // }; - // $scope.getDropdown = (field) => { - // switch (field) { - // case 'zone': - // return $scope.getZones(); - // default: - // return []; - // } - // }; - // $scope.getZones = () => { - // if (!$scope.region) { - // return []; - // } - // return $scope.datasource.getZones('cvm', $scope.region); - // }; - - - $scope.init(); - } - - return CDNQueryCtrl; -}(); - - -var template = "\n
\n\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n\n\n\n\n
\n\n
\n"; -function cdnQuery() { - return { - template: template, - controller: CDNQueryCtrl, - restrict: 'E', - scope: { - target: '=', - showDetail: '=', - region: '=', - datasource: '=', - getDropdownOptions: '&', - onChange: '&' - } - }; -} -grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default.a.directive('cdnQuery', cdnQuery); - -/***/ }), - -/***/ "./datasource/tc_monitor/cdn/query_def.ts": -/*!************************************************!*\ - !*** ./datasource/tc_monitor/cdn/query_def.ts ***! - \************************************************/ -/*! exports provided: default, CDNFilterFieldsDescriptor, templateQueryIdMap, CDNInstanceAliasList, CDNInvalidDemensions, CDNGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CDNFilterFieldsDescriptor", function() { return CDNFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CDNInstanceAliasList", function() { return CDNInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CDNInvalidDemensions", function() { return CDNInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CDNGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -var __assign = undefined && undefined.__assign || function () { - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - } - - return t; - }; - - return __assign.apply(this, arguments); -}; - - -var CDNFilterFields = { - origin: [], - domain: [], - resourceId: [], - status: {}, - serviceType: {}, - projectId: [], - domainType: {}, - fullUrlCache: {}, - https: {}, - originPullProtocol: {}, - tagKey: [] -}; -var CDNFilterFieldsDescriptor = [{ - key: 'origin', - enDescriptor: 'origin', - cnDescriptor: '主源站', - link: '', - type: 'inputmulti' -}, { - key: 'domain', - enDescriptor: 'domain', - cnDescriptor: '域名', - link: '', - type: 'inputmulti' -}, { - key: 'resourceId', - enDescriptor: 'resourceId', - cnDescriptor: '域名id', - link: '', - type: 'inputmulti' -}, { - key: 'status', - enDescriptor: 'status', - cnDescriptor: '域名状态', - link: '', - type: 'select', - list: [{ - text: 'online', - value: 'online' - }, { - text: 'offline', - value: 'offline' - }, { - text: 'processing', - value: 'processing' - }] -}, { - key: 'serviceType', - enDescriptor: 'serviceType', - cnDescriptor: '业务类型', - link: '', - type: 'select', - list: [{ - text: 'web', - value: 'web' - }, { - text: 'download', - value: 'download' - }, { - text: 'media', - value: 'media' - }] -}, { - key: 'projectId', - enDescriptor: 'projectId', - cnDescriptor: '项目ID', - link: '', - type: 'inputNumbermulti' -}, { - key: 'domainType', - enDescriptor: 'domainType', - cnDescriptor: '主源站类型', - link: '', - type: 'select', - list: [{ - text: '自有源', - value: 'cname' - }, { - text: 'cos接入', - value: 'cos' - }] -}, { - key: 'fullUrlCache', - enDescriptor: 'fullUrlCache', - cnDescriptor: '全路径缓存', - link: '', - type: 'select', - list: [{ - text: '打开', - value: 'on' - }, { - text: '关闭', - value: 'off' - }] -}, { - key: 'https', - enDescriptor: 'https', - cnDescriptor: '是否配置https', - link: '', - type: 'select', - list: [{ - text: 'on', - value: 'on' - }, { - text: 'off', - value: 'off' - }, { - text: 'processing', - value: 'processing' - }] -}, { - key: 'originPullProtocol', - enDescriptor: 'originPullProtocol', - cnDescriptor: '回源协议类型', - link: '', - type: 'select', - list: [{ - text: 'http', - value: 'http' - }, { - text: 'follow', - value: 'follow' - }, { - text: 'https', - value: 'https' - }] -}, { - key: 'tagKey', - enDescriptor: 'tagKey', - cnDescriptor: '标签键', - link: '', - type: 'inputmulti' -}]; -var CDN_STATE = { - region: 'ap-guangzhou', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'Domain', - queries: { - Limit: 20, - Offset: 0, - Filters: __assign({}, CDNFilterFields) - } -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - var params = {}; - - if (!lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(queries)) { - params.Limit = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Limit', 20) || 20; - params.Offset = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Offset', 0) || 0; - var Filters_1 = []; - - lodash__WEBPACK_IMPORTED_MODULE_0___default.a.forEach(queries.Filters, function (item, key) { - // console.log('item', item, queries); - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isArray(item)) { - item = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.compact(item); - - if (item.length > 0) { - Filters_1.push({ - Name: key, - Value: lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(item).slice(0, 5) - }); - } - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isObject(item)) { - if (!lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', []))) { - Filters_1.push({ - Name: key, - Value: lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', []).slice(0, 5) - }); - } - } - }); - - if (Filters_1.length > 0) { - params.Filters = Filters_1; - } - } - - return params; -} - -var CDNInstanceAliasList = ['Domain', 'ProjectId']; -var CDNInvalidDemensions = { - projectId: 'ProjectId', - domain: 'Domain' -}; -var templateQueryIdMap = { - instance: 'Domain' -}; -/* harmony default export */ __webpack_exports__["default"] = (CDN_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/cdn_province/datasource.ts": -/*!**********************************************************!*\ - !*** ./datasource/tc_monitor/cdn_province/datasource.ts ***! - \**********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/cdn_province/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/constants */ "./datasource/common/constants.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __assign = undefined && undefined.__assign || function () { - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - } - - return t; - }; - - return __assign.apply(this, arguments); -}; - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - - -var DCDatasource = -/** @class */ -function (_super) { - __extends(DCDatasource, _super); - - function DCDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = _query_def__WEBPACK_IMPORTED_MODULE_0__["namespace"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["CDNPROVINCEInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["CDNPROVINCEInvalidDemensions"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_0__["templateQueryIdMap"]; // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致 - - _this.InstanceReqConfig = { - service: 'cdn', - action: 'DescribeDomains', - responseField: 'Domains' - }; - _this.extrasAlias = ['isp', 'district']; - return _this; - } // getFilterDropdown({ field }) { - // return super.getRegions(); - // } - - - DCDatasource.prototype.metricFindQuery = function (query, regex) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , _super.prototype.metricFindQuery.call(this, __assign(__assign({}, query), { - region: 'ap-guangzhou' - }), regex)]; - }); - }); - }; - - DCDatasource.prototype.getConsumerList = function (params) { - return __awaiter(this, void 0, void 0, function () { - var region, field, serviceInfo, rs; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - region = params.region, field = params.field; - serviceInfo = Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["GetServiceAPIInfo"])(region, 'cdn'); - return [4 - /*yield*/ - , this.doRequest({ - url: this.url + serviceInfo.path, - data: { - Name: field - } - }, serviceInfo.service, { - action: 'DescribeMapInfo' - })]; - - case 1: - rs = _a.sent(); - return [2 - /*return*/ - , (rs.MapInfoList || []).map(function (o) { - return { - text: o.Name, - value: o.Name - }; - })]; - } - }); - }); - }; - - DCDatasource.prototype.fetchMetricData = function (action, region, instance, query) { - return __awaiter(this, void 0, void 0, function () { - var field, rs; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!(action === 'DescribeMapInfo')) return [3 - /*break*/ - , 2]; - field = query.name; - return [4 - /*yield*/ - , this.getConsumerList({ - region: region, - field: field - })]; - - case 1: - rs = _a.sent(); - return [2 - /*return*/ - , rs]; - - case 2: - return [2 - /*return*/ - , []]; - } - }); - }); - }; - - return DCDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (DCDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/cdn_province/query.ts": -/*!*****************************************************!*\ - !*** ./datasource/tc_monitor/cdn_province/query.ts ***! - \*****************************************************/ -/*! exports provided: QueryCtrl, sQuery */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueryCtrl", function() { return QueryCtrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sQuery", function() { return sQuery; }); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! grafana/app/core/core_module */ "grafana/app/core/core_module"); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/cdn_province/query_def.ts"); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/constants */ "./datasource/common/constants.ts"); -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - -var ExtraFields = [{ - label: 'Isp', - field: 'isp' -}, { - label: 'Province', - field: 'district' -}]; - -var QueryCtrl = -/** @class */ -function () { - QueryCtrl.$inject = ["$scope", "$rootScope"]; - - /** @ngInject */ - function QueryCtrl($scope, $rootScope) { - var _this = this; - - $scope.init = function () { - $scope.CDNPROVINCEFilterFieldsDescriptor = _query_def__WEBPACK_IMPORTED_MODULE_1__["CDNPROVINCEFilterFieldsDescriptor"]; - $scope.ExtraFields = ExtraFields; - $scope.namespace = _query_def__WEBPACK_IMPORTED_MODULE_1__["namespace"]; - }; - - $scope.getExtraDropdown = function (target, field) { - return __awaiter(_this, void 0, void 0, function () { - var service, region, rs; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - service = Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["GetServiceFromNamespace"])($scope.namespace); - region = $scope.datasource.getServiceFn(service, 'getVariable')(target.region); - return [4 - /*yield*/ - , $scope.datasource.getServiceFn(service, 'getConsumerList')({ - region: region, - field: field - })]; - - case 1: - rs = _a.sent(); - return [2 - /*return*/ - , rs]; - } - }); - }); - }; - - $scope.init(); - } - - return QueryCtrl; -}(); - - -var template = "\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n"; -function sQuery() { - return { - template: template, - controller: QueryCtrl, - restrict: 'E', - scope: { - target: '=', - showDetail: '=', - region: '=', - datasource: '=', - getDropdownOptions: '&', - onChange: '&', - onRefresh: '&', - dims: '=' - } - }; -} -grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default.a.directive(_query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorName"], sQuery); - -/***/ }), - -/***/ "./datasource/tc_monitor/cdn_province/query_def.ts": -/*!*********************************************************!*\ - !*** ./datasource/tc_monitor/cdn_province/query_def.ts ***! - \*********************************************************/ -/*! exports provided: default, CDNPROVINCEFilterFieldsDescriptor, templateQueryIdMap, CDNPROVINCEInstanceAliasList, CDNPROVINCEInvalidDemensions, namespace, queryEditorName, CDNPROVINCEGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CDNPROVINCEFilterFieldsDescriptor", function() { return CDNPROVINCEFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CDNPROVINCEInstanceAliasList", function() { return CDNPROVINCEInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CDNPROVINCEInvalidDemensions", function() { return CDNPROVINCEInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorName", function() { return queryEditorName; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CDNPROVINCEGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); - -var namespace = 'QCE/CDN_LOG_DATA'; // 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称 - -var queryEditorName = 'cdnProvinceQuery'; -var CDNPROVINCEInvalidDemensions = { - domain: 'Domain', - // isp: 'Isp', - projectid: 'ProjectId', - province: 'district', - appid: 'AppId' -}; // 需和文件名对应 - -var CDNPROVINCEInstanceAliasList = ['Domain', 'ProjectId']; -var templateQueryIdMap = { - instance: 'Domain' -}; // select类型需要注意是{},multi后缀是[],dropdown是'' - -var CDNPROVINCEFilterFields = { - Limit: 20, - Offset: 0, - origin: [], - domain: [], - resourceId: [], - status: {}, - serviceType: {}, - projectId: [], - domainType: {}, - fullUrlCache: {}, - https: {}, - originPullProtocol: {}, - tagKey: [] -}; -var CDNPROVINCEFilterFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputNumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputNumber', - min: 1, - max: 100 -}, { - key: 'origin', - enDescriptor: 'origin', - cnDescriptor: '主源站', - link: '', - type: 'inputMulti' -}, { - key: 'domain', - enDescriptor: 'domain', - cnDescriptor: '域名', - link: '', - type: 'inputMulti' -}, { - key: 'resourceId', - enDescriptor: 'resourceId', - cnDescriptor: '域名id', - link: '', - type: 'inputMulti' -}, { - key: 'status', - enDescriptor: 'status', - cnDescriptor: '域名状态', - link: '', - type: 'select', - list: [{ - text: 'online', - value: 'online' - }, { - text: 'offline', - value: 'offline' - }, { - text: 'processing', - value: 'processing' - }] -}, { - key: 'serviceType', - enDescriptor: 'serviceType', - cnDescriptor: '业务类型', - link: '', - type: 'select', - list: [{ - text: 'web', - value: 'web' - }, { - text: 'download', - value: 'download' - }, { - text: 'media', - value: 'media' - }] -}, { - key: 'projectId', - enDescriptor: 'projectId', - cnDescriptor: '项目ID', - link: '', - type: 'inputNumberMulti' -}, { - key: 'domainType', - enDescriptor: 'domainType', - cnDescriptor: '主源站类型', - link: '', - type: 'select', - list: [{ - text: '自有源', - value: 'cname' - }, { - text: 'cos接入', - value: 'cos' - }] -}, { - key: 'fullUrlCache', - enDescriptor: 'fullUrlCache', - cnDescriptor: '全路径缓存', - link: '', - type: 'select', - list: [{ - text: '打开', - value: 'on' - }, { - text: '关闭', - value: 'off' - }] -}, { - key: 'https', - enDescriptor: 'https', - cnDescriptor: '是否配置https', - link: '', - type: 'select', - list: [{ - text: 'on', - value: 'on' - }, { - text: 'off', - value: 'off' - }, { - text: 'processing', - value: 'processing' - }] -}, { - key: 'originPullProtocol', - enDescriptor: 'originPullProtocol', - cnDescriptor: '回源协议类型', - link: '', - type: 'select', - list: [{ - text: 'http', - value: 'http' - }, { - text: 'follow', - value: 'follow' - }, { - text: 'https', - value: 'https' - }] -}, { - key: 'tagKey', - enDescriptor: 'tagKey', - cnDescriptor: '标签键', - link: '', - type: 'inputMulti' -}]; -var CDNPROVINCE_STATE = { - region: 'ap-guangzhou', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'Domain', - // Isp Province分别在两个接口,单独保存在state - isp: '', - district: '', - queries: CDNPROVINCEFilterFields -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - return Object(_common_utils__WEBPACK_IMPORTED_MODULE_0__["instanceQueryParamsBaseParse"])(queries, true); -} // const regionSupported = [ -// { text: '华北地区(北京)', value: 'ap-beijing' }, -// { text: '西南地区(成都)', value: 'ap-chengdu' }, -// { text: '西南地区(重庆)', value: 'ap-chongqing' }, -// { text: '华南地区(广州)', value: 'ap-guangzhou' }, -// { text: '港澳台地区(中国香港)', value: 'ap-hongkong' }, -// { text: '亚太南部(孟买)', value: 'ap-mumbai' }, -// { text: '华东地区(南京)', value: 'ap-nanjing' }, -// { text: '华东地区(上海)', value: 'ap-shanghai' }, -// { text: '华东地区(上海金融)', value: 'ap-shanghai-fsi' }, -// { text: '华南地区(深圳金融)', value: 'ap-shenzhen-fsi' }, -// { text: '亚太东南(新加坡)', value: 'ap-singapore' }, -// { text: '亚太东北(东京)', value: 'ap-tokyo' }, -// { text: '欧洲地区(法兰克福)', value: 'eu-frankfurt' }, -// { text: '美国东部(弗吉尼亚)', value: 'na-ashburn' }, -// { text: '美国西部(硅谷)', value: 'na-siliconvalley' }, -// { text: '北美地区(多伦多)', value: 'na-toronto' }, -// ]; - - -/* harmony default export */ __webpack_exports__["default"] = (CDNPROVINCE_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/ceip_summary/datasource.ts": -/*!**********************************************************!*\ - !*** ./datasource/tc_monitor/ceip_summary/datasource.ts ***! - \**********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/ceip_summary/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - - - - -var DCDatasource = -/** @class */ -function (_super) { - __extends(DCDatasource, _super); - - function DCDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = _query_def__WEBPACK_IMPORTED_MODULE_0__["namespace"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["CEIPSUMMARYInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["CEIPInvalidDemensions"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_0__["templateQueryIdMap"]; // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致 - - _this.InstanceReqConfig = { - service: 'vpc', - action: 'DescribeAddresses', - responseField: 'AddressSet', - interceptor: { - request: function request(params) { - var Filters = params.Filters; - - if (!Filters) { - params.Filters = []; - } - - params.Filters.push({ - Name: 'address-type', - Values: ['AnycastEIP'] - }); - return params; - } // 设置一些请求参数的 默认值 - // response: (data: unknown[]) =>[ - // { - // AddressId: 'AddressId', - // AddressIp: '111.22.3.4' - // }, - // ], - - } - }; - _this.MetricReqConfig = { - resultFilter: _query_def__WEBPACK_IMPORTED_MODULE_0__["modifyDimensons"] - }; - return _this; - } - - return DCDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (DCDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/ceip_summary/query.ts": -/*!*****************************************************!*\ - !*** ./datasource/tc_monitor/ceip_summary/query.ts ***! - \*****************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _base_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_base/query */ "./datasource/tc_monitor/_base/query.ts"); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/ceip_summary/query_def.ts"); - - -Object(_base_query__WEBPACK_IMPORTED_MODULE_0__["default"])(_query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorName"], _query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorConfig"]); - -/***/ }), - -/***/ "./datasource/tc_monitor/ceip_summary/query_def.ts": -/*!*********************************************************!*\ - !*** ./datasource/tc_monitor/ceip_summary/query_def.ts ***! - \*********************************************************/ -/*! exports provided: default, CEIPFilterFieldsDescriptor, templateQueryIdMap, CEIPSUMMARYInstanceAliasList, CEIPInvalidDemensions, namespace, queryEditorName, modifyDimensons, queryEditorConfig, CEIPSUMMARYGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CEIPFilterFieldsDescriptor", function() { return CEIPFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CEIPSUMMARYInstanceAliasList", function() { return CEIPSUMMARYInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CEIPInvalidDemensions", function() { return CEIPInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorName", function() { return queryEditorName; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "modifyDimensons", function() { return modifyDimensons; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorConfig", function() { return queryEditorConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CEIPSUMMARYGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); - - -var namespace = 'QCE/CEIP_SUMMARY'; // 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称 - -var queryEditorName = 'ceipSummaryQuery'; -var CEIPInvalidDemensions = { - vip: 'AddressIp', - eip: 'AddressIp' -}; // 要和文件名方式一致,ceip_summary=>CEIPSUMMARY - -var CEIPSUMMARYInstanceAliasList = ['AddressId', 'AddressName', 'AddressIp']; -var templateQueryIdMap = { - instance: 'AddressId' -}; // select类型需要注意是{},multi后缀是[] - -var CEIPFilterFields = { - Limit: 20, - Offset: 0, - 'address-id': [], - 'address-name': [], - 'address-ip': [], - 'address-status': {}, - 'is-arrears': {}, - 'address-isp': {}, - 'instance-id': [], - 'private-ip-address': [], - 'network-interface-id': [] -}; -var CEIPFilterFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputNumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputNumber', - min: 1, - max: 100 -}, { - key: 'address-id', - enDescriptor: 'address-id', - cnDescriptor: ' EIP 的唯一 ID', - link: '', - type: 'inputMulti' -}, { - key: 'address-name', - enDescriptor: 'address-name', - cnDescriptor: 'EIP 名称', - link: '', - type: 'inputMulti' -}, { - key: 'address-ip', - enDescriptor: 'address-ip', - cnDescriptor: 'EIP 的 IP 地址', - link: '', - type: 'inputMulti' -}, { - key: 'address-status', - enDescriptor: 'address-status', - cnDescriptor: 'EIP 的状态', - link: '', - type: 'select', - multiple: true, - list: [{ - text: 'CREATING', - value: 'CREATING' - }, { - text: 'BINDING', - value: 'BINDING' - }, { - text: 'BIND', - value: 'BIND' - }, { - text: 'UNBINDING', - value: 'UNBINDING' - }, { - text: 'UNBIND', - value: 'UNBIND' - }, { - text: 'OFFLINING', - value: 'OFFLINING' - }, { - text: 'BIND_ENI', - value: 'BIND_ENI' - }] -}, { - key: 'instance-id', - enDescriptor: 'instance-id', - cnDescriptor: 'EIP 绑定的实例 ID', - link: '', - type: 'inputMulti' -}, { - key: 'private-ip-address', - enDescriptor: 'private-ip-address', - cnDescriptor: 'EIP 绑定的内网 IP ', - link: '', - type: 'inputMulti' -}, { - key: 'network-interface-id', - enDescriptor: 'network-interface-id', - cnDescriptor: ' EIP 绑定的弹性网卡 ID', - link: '', - type: 'inputMulti' -}, { - key: 'is-arrears', - enDescriptor: 'is-arrears', - cnDescriptor: 'EIP 是否欠费', - link: '', - type: 'select', - multiple: true, - list: [{ - text: '欠费状态', - value: 'TRUE' - }, { - text: '费用状态正常', - value: 'FALSE' - }] -}, { - key: 'address-isp', - enDescriptor: 'address-isp', - cnDescriptor: '运营商类型', - link: '', - type: 'select', - multiple: true, - list: [{ - text: 'BGP', - value: 'BGP' - }, { - text: 'CMCC', - value: 'CMCC' - }, { - text: 'CUCC', - value: 'CUCC' - }, { - text: 'CTCC', - value: 'CTCC' - }] -}]; // 各产品实例列表detail配置 - -var queryEditorConfig = { - instanceDocUrl: 'https://cloud.tencent.com/document/api/215/16702', - namespace: namespace, - fieldDescriptor: CEIPFilterFieldsDescriptor -}; -var CEIP_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'AddressId', - queries: CEIPFilterFields -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - return Object(_common_utils__WEBPACK_IMPORTED_MODULE_1__["instanceQueryParamsBaseParse"])(queries, true); -} - -function modifyDimensons(metricItem) { - var metricTmp = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.cloneDeep(metricItem); - - metricTmp.Dimensions.forEach(function (item) { - item.Dimensions = ['eip']; - }); - return metricTmp; -} - -/* harmony default export */ __webpack_exports__["default"] = (CEIP_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/ces/datasource.ts": -/*!*************************************************!*\ - !*** ./datasource/tc_monitor/ces/datasource.ts ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/ces/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - - - - -var DCDatasource = -/** @class */ -function (_super) { - __extends(DCDatasource, _super); - - function DCDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = _query_def__WEBPACK_IMPORTED_MODULE_0__["namespace"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["CESInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["CESInvalidDemensions"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_0__["templateQueryIdMap"]; // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致 - - _this.InstanceReqConfig = { - service: 'es', - action: 'DescribeInstances', - responseField: 'InstanceList' - }; - return _this; - } - - return DCDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (DCDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/ces/query.ts": -/*!********************************************!*\ - !*** ./datasource/tc_monitor/ces/query.ts ***! - \********************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _base_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_base/query */ "./datasource/tc_monitor/_base/query.ts"); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/ces/query_def.ts"); - - -Object(_base_query__WEBPACK_IMPORTED_MODULE_0__["default"])(_query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorName"], _query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorConfig"]); - -/***/ }), - -/***/ "./datasource/tc_monitor/ces/query_def.ts": -/*!************************************************!*\ - !*** ./datasource/tc_monitor/ces/query_def.ts ***! - \************************************************/ -/*! exports provided: default, CESFilterFieldsDescriptor, templateQueryIdMap, CESInstanceAliasList, CESInvalidDemensions, namespace, queryEditorName, queryEditorConfig, CESGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CESFilterFieldsDescriptor", function() { return CESFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CESInstanceAliasList", function() { return CESInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CESInvalidDemensions", function() { return CESInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorName", function() { return queryEditorName; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorConfig", function() { return queryEditorConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CESGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); - -var namespace = 'QCE/CES'; // 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称 - -var queryEditorName = 'cesQuery'; -var CESInvalidDemensions = { - uInstanceId: 'InstanceId' -}; -var CESInstanceAliasList = ['InstanceId', 'InstanceName']; -var templateQueryIdMap = { - instance: 'InstanceId' -}; // select类型需要注意是{},multi后缀是[],dropdown是类型 - -var CESFilterFields = { - Limit: 20, - Offset: 0, - InstanceIds: [], - InstanceNames: [], - OrderByKey: {}, - OrderByType: {}, - IpList: [] -}; -var CESFilterFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputNumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputNumber', - min: 1, - max: 100 -}, { - key: 'InstanceIds', - enDescriptor: 'InstanceIds', - cnDescriptor: '集群实例ID列表', - link: '', - type: 'inputMulti' -}, { - key: 'InstanceNames', - enDescriptor: 'InstanceNames', - cnDescriptor: '集群实例名称列表', - link: '', - type: 'inputMulti' -}, { - key: 'OrderByKey', - enDescriptor: 'OrderByKey', - cnDescriptor: '排序字段', - link: '', - type: 'select', - list: [{ - text: '实例ID', - value: 1 - }, { - text: '实例名称', - value: 2 - }, { - text: '可用区', - value: 3 - }, { - text: '创建时间', - value: 4 - }] -}, { - key: 'OrderByType', - enDescriptor: 'OrderByType', - cnDescriptor: '排序方式', - link: '', - type: 'select', - list: [{ - text: '升序', - value: 0 - }, { - text: '降序', - value: 1 - }] -}, { - key: 'IpList', - enDescriptor: 'IpList', - cnDescriptor: '私有网络vip列表', - link: '', - type: 'inputMulti' -}]; // 各产品实例列表detail配置 - -var queryEditorConfig = { - instanceDocUrl: 'https://cloud.tencent.com/document/api/845/30631', - namespace: namespace, - fieldDescriptor: CESFilterFieldsDescriptor -}; -var CES_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'InstanceId', - queries: CESFilterFields -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - return Object(_common_utils__WEBPACK_IMPORTED_MODULE_0__["instanceQueryParamsBaseParse"])(queries, false); -} - -/* harmony default export */ __webpack_exports__["default"] = (CES_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/cfs/datasource.ts": -/*!*************************************************!*\ - !*** ./datasource/tc_monitor/cfs/datasource.ts ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/cfs/query_def.ts"); -/* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../locale */ "./locale/index.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - - - - - -var CFSDatasource = -/** @class */ -function (_super) { - __extends(CFSDatasource, _super); - - function CFSDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.templateQueryIdMap = { - instance: 'FileSystemId' - }; - _this.extrasAlias = ['version']; - _this.Namespace = 'QCE/CFS'; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_1__["CFSInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_1__["CFSInvalidDemensions"]; - _this.InstanceReqConfig = { - service: 'cfs', - action: 'DescribeCfsFileSystems', - responseField: 'FileSystems' - }; - return _this; - } - - CFSDatasource.prototype.getRegions = function () { - return Promise.resolve(_query_def__WEBPACK_IMPORTED_MODULE_1__["regionSupported"].map(function (_a) { - var value = _a.value; - return { - value: value, - text: Object(_locale__WEBPACK_IMPORTED_MODULE_2__["t"])(value) - }; - })); - }; - - return CFSDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_0__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (CFSDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/cfs/query.ts": -/*!********************************************!*\ - !*** ./datasource/tc_monitor/cfs/query.ts ***! - \********************************************/ -/*! exports provided: SCFQueryCtrl, scfQuery */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SCFQueryCtrl", function() { return SCFQueryCtrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scfQuery", function() { return scfQuery; }); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! grafana/app/core/core_module */ "grafana/app/core/core_module"); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/cfs/query_def.ts"); -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - -var SCFQueryCtrl = -/** @class */ -function () { - SCFQueryCtrl.$inject = ["$scope", "$rootScope"]; - - /** @ngInject */ - function SCFQueryCtrl($scope, $rootScope) { - var _this = this; - - $scope.init = function () { - $scope.CFSQueryDescriptor = _query_def__WEBPACK_IMPORTED_MODULE_1__["CFSQueryDescriptor"]; - }; - - $scope.getVersions = function (target) { - return __awaiter(_this, void 0, void 0, function () { - var instance, region, fetcher; - return __generator(this, function (_a) { - instance = target.instance, region = target.region; - fetcher = $scope.datasource.getServiceFn('scf', 'getVersions'); - if (!instance || !region) return [2 - /*return*/ - , []]; - return [2 - /*return*/ - , fetcher(region, { - FunctionName: JSON.parse(instance).FunctionName - }).then(function (res) { - // console.log(res, 'res'); - return res; - })]; - }); - }); - }; // $scope.onChecked = (srcField, dstField) => { - // if ($scope.target.queries[srcField] === true) { - // $scope.target.queries[dstField] = false; - // } - // $scope.onChange(); - // }; - // $scope.getDropdown = (field) => { - // switch (field) { - // case 'zone': - // return $scope.getZones(); - // default: - // return []; - // } - // }; - // $scope.getZones = () => { - // if (!$scope.region) { - // return []; - // } - // return $scope.datasource.getZones('cvm', $scope.region); - // }; - - - $scope.init(); - } - - return SCFQueryCtrl; -}(); - - -var template = "\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n
\n"; -function scfQuery() { - return { - template: template, - controller: SCFQueryCtrl, - restrict: 'E', - scope: { - target: '=', - showDetail: '=', - region: '=', - datasource: '=', - getDropdownOptions: '&', - onChange: '&' - } - }; -} -grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default.a.directive('cfsQuery', scfQuery); - -/***/ }), - -/***/ "./datasource/tc_monitor/cfs/query_def.ts": -/*!************************************************!*\ - !*** ./datasource/tc_monitor/cfs/query_def.ts ***! - \************************************************/ -/*! exports provided: CFSQueryDescriptor, default, CFSInstanceAliasList, CFSInvalidDemensions, templateQueryIdMap, regionSupported, CFSGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CFSQueryDescriptor", function() { return CFSQueryDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CFSInstanceAliasList", function() { return CFSInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CFSInvalidDemensions", function() { return CFSInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "regionSupported", function() { return regionSupported; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CFSGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); - -var CFSQueryDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputnumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputnumber', - min: 1, - max: 100 -}, { - key: 'FileSystemId', - enDescriptor: 'File System Id', - cnDescriptor: '文件系统 ID', - link: '', - type: 'input' -}, { - key: 'VpcId', - enDescriptor: 'VpcId', - cnDescriptor: '私有网络(VPC) ID', - link: '', - type: 'input' -}, { - key: 'SubnetId', - enDescriptor: 'SubnetId', - cnDescriptor: '子网 ID', - link: '', - type: 'input' -}]; -var CFS_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'FileSystemId', - version: '', - queries: { - Offset: 0, - Limit: 20, - FileSystemId: '', - VpcId: '', - SubnetId: '' - } -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - var params = {}; - - if (!lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(queries)) { - params.Limit = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Limit', 20) || 20; - params.Offset = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Offset', 0) || 0; - queries = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.omit(queries, ['Offset', 'Limit']); - - lodash__WEBPACK_IMPORTED_MODULE_0___default.a.forEach(queries, function (item, key) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isArray(item)) { - item = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.compact(item); - - if (item.length > 0) { - params[key] = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(item); - } - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isObject(item)) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isNumber(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', undefined)) || !lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', undefined))) { - params[key] = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value'); - } - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isNumber(item) || !lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(item)) { - params[key] = item; - } - }); - } - - return params; -} - -var CFSInstanceAliasList = ['FileSystemId', 'FsName']; // 向实例里面塞dimensions对应的值,dimension中的key对应到实例中的key - -var CFSInvalidDemensions = {// functionName: 'FunctionName', - // namespace: 'Namespace' -}; -var regionSupported = [{ - value: 'ap-beijing' -}, { - value: 'ap-chengdu' -}, { - value: 'ap-chongqing' -}, { - value: 'ap-guangzhou' -}, { - value: 'ap-hongkong' -}, { - value: 'ap-mumbai' -}, { - value: 'ap-nanjing' -}, { - value: 'ap-seoul' -}, { - value: 'ap-shanghai' -}, { - value: 'ap-shanghai-fsi' -}, { - value: 'ap-shenzhen-fsi' -}, { - value: 'ap-singapore' -}, { - value: 'ap-tokyo' -}, { - value: 'eu-frankfurt' -}, { - value: 'na-siliconvalley' -}, { - value: 'na-toronto' -}]; -var templateQueryIdMap = { - instance: 'InstanceId' -}; -/* harmony default export */ __webpack_exports__["default"] = (CFS_STATE); - // monitor监控数据默认支持的维度 -// export const SCFDefaultDimensionList = ['functionName', 'namespace', 'version']; - -/***/ }), - -/***/ "./datasource/tc_monitor/ckafka/datasource.ts": -/*!****************************************************!*\ - !*** ./datasource/tc_monitor/ckafka/datasource.ts ***! - \****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/constants */ "./datasource/common/constants.ts"); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/ckafka/query_def.ts"); -/* harmony import */ var _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/datasourceStorage */ "./datasource/common/datasourceStorage.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - - - - - -var CKFKADatasource = -/** @class */ -function (_super) { - __extends(CKFKADatasource, _super); - - function CKFKADatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = 'QCE/CKAFKA'; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_4__["CKAFKAInstanceAliasList"]; - _this.TopicAliasList = _query_def__WEBPACK_IMPORTED_MODULE_4__["CKAFKATopicAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_4__["CKAFKAInvalidDemensions"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_4__["templateQueryIdMap"]; - _this.InstanceReqConfig = { - service: 'ckafka', - action: 'DescribeInstances', - responseField: 'InstanceList' - }; - _this.extraMetricDims = ['topicId']; // extrasAlias = ['topicId', 'consumerGroup', 'partition']; - - _this.keyInStorage = _query_def__WEBPACK_IMPORTED_MODULE_4__["keyInStorage"]; - _this.queryMonitorExtraConfg = _query_def__WEBPACK_IMPORTED_MODULE_4__["queryMonitorExtraConfg"]; - _this.consumerGroupCache = {}; - return _this; - } - - CKFKADatasource.prototype.getConsumerGroups = function (region, params) { - var _a, _b, _c; - - return __awaiter(this, void 0, void 0, function () { - var serviceInfo, InstanceId, _d, groupname, _e, topicid, consumerGoup, topicList, GroupList, TopicList, PartitionList, GroupDetailList, SubscribedInfos, partitions; - - var _this = this; - - return __generator(this, function (_f) { - switch (_f.label) { - case 0: - serviceInfo = Object(_common_constants__WEBPACK_IMPORTED_MODULE_1__["GetServiceAPIInfo"])(region, 'ckafka'); - InstanceId = params.InstanceId, _d = params.groupname, groupname = _d === void 0 ? '' : _d, _e = params.topicid, topicid = _e === void 0 ? '' : _e; - groupname = this.getVariable(groupname); // 将模板转换为真实值 - - topicid = this.getVariable(topicid); // 将模板转换为真实值 - - try { - groupname = JSON.parse(groupname)[_query_def__WEBPACK_IMPORTED_MODULE_4__["templateQueryIdMap"].groupName]; - topicid = JSON.parse(topicid)[_query_def__WEBPACK_IMPORTED_MODULE_4__["templateQueryIdMap"].topicId]; - } catch (e) {} - - consumerGoup = this.consumerGroupCache[InstanceId]; - if (!!consumerGoup) return [3 - /*break*/ - , 3]; - return [4 - /*yield*/ - , Object(_common_utils__WEBPACK_IMPORTED_MODULE_2__["fetchAllFactory"])(function (data) { - return _this.doRequest({ - url: _this.url + serviceInfo.path, - data: data - }, serviceInfo.service, { - region: region, - action: 'DescribeConsumerGroup' - }); - }, lodash__WEBPACK_IMPORTED_MODULE_0___default.a.pick(params, 'InstanceId'), ['GroupListForMonitor', 'TopicListForMonitor', 'PartitionListForMonitor', 'GroupList'])]; - - case 1: - // 从分页数据,获取全量数据 - consumerGoup = _f.sent(); - return [4 - /*yield*/ - , Object(_common_utils__WEBPACK_IMPORTED_MODULE_2__["fetchAllFactory"])(function (data) { - return _this.doRequest({ - url: _this.url + serviceInfo.path, - data: data - }, serviceInfo.service, { - region: region, - action: 'DescribeTopic' - }); - }, lodash__WEBPACK_IMPORTED_MODULE_0___default.a.pick(params, 'InstanceId'), ['TopicList'])]; - - case 2: - topicList = _f.sent(); - consumerGoup[1] = Object(lodash__WEBPACK_IMPORTED_MODULE_0__["flattenDeep"])(topicList); - console.log({ - consumerGoup: consumerGoup, - topicList: topicList - }); - this.consumerGroupCache[InstanceId] = consumerGoup; - _f.label = 3; - - case 3: - GroupList = consumerGoup[0], TopicList = consumerGoup[1], PartitionList = consumerGoup[2], GroupDetailList = consumerGoup[3]; // 无重复数组 - - TopicList = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniqBy(TopicList, function (item) { - return item.TopicId; - }); - GroupList = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniqBy(GroupList, function (item) { - return item.GroupName; - }); - PartitionList = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniqBy(PartitionList, function (item) { - return item.PartitionId; - }); - GroupDetailList = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniqBy(GroupDetailList, function (item) { - return item.ConsumerGroupName; - }); - SubscribedInfos = ((_a = GroupDetailList.find(function (d) { - return d.ConsumerGroupName === groupname; - })) === null || _a === void 0 ? void 0 : _a.SubscribedInfo) || []; - partitions = ((_c = (_b = SubscribedInfos.find(function (sub) { - return sub.TopicId === topicid; - })) === null || _b === void 0 ? void 0 : _b.Partition) === null || _c === void 0 ? void 0 : _c.map(function (p) { - var _a; - - return _a = {}, _a[_query_def__WEBPACK_IMPORTED_MODULE_4__["templateQueryIdMap"].partition] = p, _a; - })) || []; - return [2 - /*return*/ - , { - GroupList: GroupList, - TopicList: SubscribedInfos.length > 0 ? SubscribedInfos.map(function (_a) { - var TopicId = _a.TopicId, - TopicName = _a.TopicName; - return { - TopicId: TopicId, - TopicName: TopicName - }; - }) : TopicList, - PartitionList: partitions.length > 0 ? partitions : PartitionList - }]; - } - }); - }); - }; - - CKFKADatasource.prototype.formatTopicVarDisplay = function (topic, displayTpl, topicAlias) { - var _this = this; - - if (displayTpl) { - return displayTpl.replace(/\$\{(\w+)\}/g, function (a, b) { - if (!b || !_this.TopicAliasList.includes(b)) { - return ''; - } - - return _this.getAliasValue(topic, b); - }); - } - - return this.getAliasValue(topic, topicAlias); - }; // 查询指标下的数据 - - - CKFKADatasource.prototype.fetchMetricData = function (action, region, instance, query) { - return __awaiter(this, void 0, void 0, function () { - var topicalias, groupname, topicid, result, display, TopicList, GroupList, PartitionList, rs; - - var _this = this; - - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - topicalias = query.topicalias, groupname = query.groupname, topicid = query.topicid; - return [4 - /*yield*/ - , this.getConsumerGroups(region, { - InstanceId: instance.InstanceId, - groupname: groupname, - topicid: topicid - })]; - - case 1: - result = _a.sent(); - display = query.display; - TopicList = result.TopicList, GroupList = result.GroupList, PartitionList = result.PartitionList; - topicalias = this.TopicAliasList.includes(topicalias) ? topicalias : this.templateQueryIdMap.topicId; - rs = { - GroupList: GroupList.map(function (group) { - group._InstanceAliasValue = group.GroupName; - return { - text: group.GroupName, - value: group[_query_def__WEBPACK_IMPORTED_MODULE_4__["templateQueryIdMap"].groupName] - }; - }), - TopicList: TopicList.map(function (topic) { - var topicAlias = _this.formatTopicVarDisplay(topic, display, topicalias); - - topic._InstanceAliasValue = topicAlias || topic[_query_def__WEBPACK_IMPORTED_MODULE_4__["templateQueryIdMap"].topicId]; - return { - text: topicAlias || topic[_query_def__WEBPACK_IMPORTED_MODULE_4__["templateQueryIdMap"].topicId], - value: topic[_query_def__WEBPACK_IMPORTED_MODULE_4__["templateQueryIdMap"].topicId], - TopicName: topic.TopicName - }; - }), - PartitionList: PartitionList.map(function (par) { - par._InstanceAliasValue = par[_query_def__WEBPACK_IMPORTED_MODULE_4__["templateQueryIdMap"].partition]; - return { - text: par[_query_def__WEBPACK_IMPORTED_MODULE_4__["templateQueryIdMap"].partition], - value: par[_query_def__WEBPACK_IMPORTED_MODULE_4__["templateQueryIdMap"].partition] - }; - }) - }; - return [4 - /*yield*/ - , _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_5__["default"].setExtraStorage(this.service, this.keyInStorage.TopicList, TopicList)]; - - case 2: - _a.sent(); - - return [4 - /*yield*/ - , _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_5__["default"].setExtraStorage(this.service, this.keyInStorage.GroupList, GroupList)]; - - case 3: - _a.sent(); - - return [4 - /*yield*/ - , _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_5__["default"].setExtraStorage(this.service, this.keyInStorage.PartitionList, PartitionList)]; - - case 4: - _a.sent(); // console.log({ res1, res2, res3 }); - // console.log({rs}); - // 根据action返回指定的维度数据列表 - - - switch (action) { - case 'DescribeTopicList': - return [2 - /*return*/ - , rs.TopicList]; - - case 'DescribeGroup': - return [2 - /*return*/ - , rs.GroupList]; - - case 'DescribePartion': - return [2 - /*return*/ - , rs.PartitionList]; - - default: - return [2 - /*return*/ - , []]; - } - - return [2 - /*return*/ - ]; - } - }); - }); - }; - - return CKFKADatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_3__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (CKFKADatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/ckafka/query.ts": -/*!***********************************************!*\ - !*** ./datasource/tc_monitor/ckafka/query.ts ***! - \***********************************************/ -/*! exports provided: CKAFKAQueryCtrl, scfQuery */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CKAFKAQueryCtrl", function() { return CKAFKAQueryCtrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scfQuery", function() { return scfQuery; }); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! grafana/app/core/core_module */ "grafana/app/core/core_module"); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/ckafka/query_def.ts"); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - -var ExtraFields = [{ - label: 'ConsumerGroup', - field: 'consumerGroup' -}, { - label: 'TopicId', - field: 'topicId' -}, { - label: 'Partition', - field: 'partition' -}]; - -var CKAFKAQueryCtrl = -/** @class */ -function () { - CKAFKAQueryCtrl.$inject = ["$scope", "$rootScope"]; - - /** @ngInject */ - function CKAFKAQueryCtrl($scope, $rootScope) { - var _this = this; - - $scope.init = function () { - $scope.CKAFKAQueryDescriptor = _query_def__WEBPACK_IMPORTED_MODULE_1__["CKAFKAQueryDescriptor"]; - }; - - $scope.getDropdown = function (field) { - switch (field) { - default: - return []; - } - }; - - $scope.onInstanceChange = function (n, o) { - if (Object(_common_utils__WEBPACK_IMPORTED_MODULE_2__["isTargetEqual"])(n, o, 'LoadBalancerId')) return; - $scope.target.consumerGroup = ''; - $scope.target.topicId = ''; - $scope.target.topicName = ''; - $scope.target.partition = ''; - }; - - $scope.getExtraFields = function () { - return ExtraFields.filter(function (item) { - var _a; - - return item.field in ((_a = $scope.dims) !== null && _a !== void 0 ? _a : {}); - }); - }; - - $scope.getInstanceId = function () { - var instance = $scope.target.instance; - instance = $scope.datasource.getServiceFn('ckafka', 'getVariable')(instance); - if (Array.isArray(instance)) instance = instance[0]; - - if (!instance) { - return ''; - } - - try { - instance = JSON.parse(instance).InstanceId; - } catch (error) {// console.log(); - } - - return instance; - }; - - $scope.getExtraDropdown = function (target, field) { - return __awaiter(_this, void 0, void 0, function () { - var InstanceId, fetcher, region, res, TopicList, GroupList, PartitionList, data; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - InstanceId = $scope.getInstanceId(); - fetcher = $scope.datasource.getServiceFn('ckafka', 'getConsumerGroups'); - region = $scope.datasource.getServiceFn('ckafka', 'getVariable')(target.region); - return [4 - /*yield*/ - , fetcher(region, { - InstanceId: InstanceId, - groupname: target.consumerGroup, - topicid: target.topicId - })]; - - case 1: - res = _a.sent(); - TopicList = res.TopicList, GroupList = res.GroupList, PartitionList = res.PartitionList; - data = { - GroupList: GroupList.map(function (group) { - group._InstanceAliasValue = group.GroupName; - return { - text: group.GroupName, - value: JSON.stringify(group) - }; - }), - TopicList: TopicList.map(function (topic) { - topic._InstanceAliasValue = topic[_query_def__WEBPACK_IMPORTED_MODULE_1__["templateQueryIdMap"].topicId]; - return { - text: topic[_query_def__WEBPACK_IMPORTED_MODULE_1__["templateQueryIdMap"].topicId], - value: JSON.stringify(topic) // 为了获取多维度的值,这里完全可以使用JSON.stringify()将整个对象放进去 - - }; - }), - PartitionList: PartitionList.map(function (par) { - par._InstanceAliasValue = par[_query_def__WEBPACK_IMPORTED_MODULE_1__["templateQueryIdMap"].partition]; - return { - text: String(par[_query_def__WEBPACK_IMPORTED_MODULE_1__["templateQueryIdMap"].partition]), - value: JSON.stringify(par) - }; - }) - }; - - switch (field) { - case 'consumerGroup': - return [2 - /*return*/ - , data.GroupList]; - - case 'topicId': - return [2 - /*return*/ - , data.TopicList]; - - case 'partition': - return [2 - /*return*/ - , data.PartitionList]; - } - - return [2 - /*return*/ - ]; - } - }); - }); - }; - - $scope.init(); - } - - return CKAFKAQueryCtrl; -}(); - - -var template = "\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n\n
\n"; -function scfQuery() { - return { - template: template, - controller: CKAFKAQueryCtrl, - restrict: 'E', - scope: { - target: '=', - showDetail: '=', - region: '=', - datasource: '=', - getDropdownOptions: '&', - onChange: '&', - onRefresh: '&', - dims: '=', - instance: '=' - }, - link: function link(scope, element, attrs) { - scope.$watch('target.instance', function (newValue, oldValue) { - var _a; - - (_a = scope.onInstanceChange) === null || _a === void 0 ? void 0 : _a.call(scope, newValue, oldValue); - }); - } - }; -} -grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default.a.directive('ckafkaQuery', scfQuery); - -/***/ }), - -/***/ "./datasource/tc_monitor/ckafka/query_def.ts": -/*!***************************************************!*\ - !*** ./datasource/tc_monitor/ckafka/query_def.ts ***! - \***************************************************/ -/*! exports provided: CKAFKAQueryDescriptor, default, CKAFKAInstanceAliasList, CKAFKATopicAliasList, CKAFKAInvalidDemensions, templateQueryIdMap, keyInStorage, queryMonitorExtraConfg, CKAFKAGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CKAFKAQueryDescriptor", function() { return CKAFKAQueryDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CKAFKAInstanceAliasList", function() { return CKAFKAInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CKAFKATopicAliasList", function() { return CKAFKATopicAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CKAFKAInvalidDemensions", function() { return CKAFKAInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keyInStorage", function() { return keyInStorage; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryMonitorExtraConfg", function() { return queryMonitorExtraConfg; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CKAFKAGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); - -var CKAFKAQueryDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputnumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为10,最小值为1,最大值为100', - link: '', - type: 'inputnumber', - min: 1, - max: 100 -}, { - key: 'InstanceId', - enDescriptor: 'InstanceId', - cnDescriptor: '按照实例ID过滤', - link: '', - type: 'input' -}, { - key: 'SearchWord', - enDescriptor: 'SearchWord', - cnDescriptor: '按照实例名称过滤,支持模糊查询', - link: '', - type: 'input' -}, { - key: 'TagKey', - enDescriptor: 'TagKey', - cnDescriptor: '匹配标签key值', - link: '', - type: 'input' -}, { - key: 'Status', - enDescriptor: 'Status', - cnDescriptor: '实例的状态,不填默认返回全部', - link: '', - type: 'select', - multiple: true, - list: [{ - text: '创建中', - value: 0 - }, { - text: '运行中', - value: 1 - }, { - text: '删除中', - value: 2 - }] -}]; -var CKAFKA_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'InstanceId', - topicId: '', - topicName: '', - consumerGroup: '', - partition: '', - queries: { - Offset: 0, - Limit: 10, - Status: [], - InstanceId: '', - SearchWord: '', - TagKey: '' - } -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - var params = {}; - - if (!lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(queries)) { - params.Limit = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Limit', 20) || 20; - params.Offset = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Offset', 0) || 0; - queries = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.omit(queries, ['Offset', 'Limit']); - - lodash__WEBPACK_IMPORTED_MODULE_0___default.a.forEach(queries, function (item, key) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isArray(item)) { - item = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.compact(item); - - if (item.length > 0) { - params[key] = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(item); - } - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isObject(item)) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isNumber(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', undefined)) || !lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', undefined))) { - params[key] = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value'); - } - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isNumber(item) || !lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(item)) { - params[key] = item; - } - }); - } - - return params; -} - -var CKAFKAInstanceAliasList = ['InstanceId', 'InstanceName']; -var CKAFKATopicAliasList = ['TopicId', 'TopicName']; // 保存在模板变量value中的key - -var templateQueryIdMap = { - instance: 'InstanceId', - topicId: 'TopicId', - groupName: 'GroupName', - partition: 'PartitionId' -}; // 向实例里面塞dimensions对应的值,dimension中的key对应到实例中的key - -var CKAFKAInvalidDemensions = new Proxy({ - topicId: 'TopicId', - topicName: 'TopicName', - consumerGroup: 'GroupName', - partition: 'PartitionId' -}, { - get: function get(obj, prop) { - if (String(prop).toLocaleLowerCase() === 'instanceid') return 'InstanceId'; - return obj[prop]; - } -}); // 需要缓存到storage的内容的key列表 - -var keyInStorage = { - TopicList: 'TopicList', - GroupList: 'GroupList', - PartitionList: 'PartitionList' -}; -/* -如果有InstanceId额外的维度,原则上都需要传入此map结构配置 -key的含义: - 经过InvalidDemensions处理后的string。topicId =》TopicId。 - 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId -value的含义: - 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、 - 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。 - 默认取通过InvalidDemsion处理后的key - 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。 - 即:templateQueryIdMap中内容。 - 联合上面2的内容筛选出原始sourceMap -*/ - -var queryMonitorExtraConfg = { - TopicId: { - dim_KeyInStorage: keyInStorage.TopicList, - dim_KeyInTarget: 'topicId', - dim_KeyInMap: templateQueryIdMap.topicId - }, - // topicName和topicId是同一个storage中的source,所以根据topicId帅选 - TopicName: { - dim_KeyInStorage: keyInStorage.TopicList, - dim_KeyInTarget: 'topicId', - dim_KeyInMap: templateQueryIdMap.topicId - }, - GroupName: { - dim_KeyInStorage: keyInStorage.GroupList, - dim_KeyInTarget: 'consumerGroup', - dim_KeyInMap: templateQueryIdMap.groupName - }, - PartitionId: { - dim_KeyInStorage: keyInStorage.PartitionList, - dim_KeyInTarget: 'partition', - dim_KeyInMap: templateQueryIdMap.partition - } -}; -/* harmony default export */ __webpack_exports__["default"] = (CKAFKA_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/clb/datasource.ts": -/*!*************************************************!*\ - !*** ./datasource/tc_monitor/clb/datasource.ts ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/clb/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/constants */ "./datasource/common/constants.ts"); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); -/* harmony import */ var _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/datasourceStorage */ "./datasource/common/datasourceStorage.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __assign = undefined && undefined.__assign || function () { - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - } - - return t; - }; - - return __assign.apply(this, arguments); -}; - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - - - - - -var DCDatasource = -/** @class */ -function (_super) { - __extends(DCDatasource, _super); - - function DCDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; // Namespace = namespace; - - - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["InstanceAliasList"]; - _this.ListenerAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["LOADBALANCEListenerAliasList"]; - _this.ServerAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["LOADBALANCEServerAliasList"]; - _this.CandiateDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["CANDIATEDIMENSIONS"]; // InvalidDimensions = LOADBALANCEVALIDDIMENSIONS; - - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_0__["templateQueryIdMap"]; // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致 - // InstanceReqConfig = { - // service: 'clb', - // action: 'DescribeLoadBalancers', - // responseField: 'LoadBalancerSet', - // }; - - _this.keyInStorage = _query_def__WEBPACK_IMPORTED_MODULE_0__["keyInStorage"]; - _this.queryMonitorExtraConfg = _query_def__WEBPACK_IMPORTED_MODULE_0__["queryMonitorExtraConfg"]; - return _this; - } // getFilterDropdown({ field }) { - // return super.getRegions(); - // } - - - DCDatasource.prototype.getInvalidDimensions = function (selfIns, tagret) { - if (selfIns.service === 'lbPrivate' || selfIns.service === 'lbPublic' && tagret.servers) return __assign(__assign({}, _query_def__WEBPACK_IMPORTED_MODULE_0__["LOADBALANCEVALIDDIMENSIONS"]), { - vpcId: 'NumericalVpcId' - }); - return _query_def__WEBPACK_IMPORTED_MODULE_0__["LOADBALANCEVALIDDIMENSIONS"]; - }; - - DCDatasource.prototype.getInstanceReqConfig = function (selfIns) { - var res = { - service: 'clb', - action: 'DescribeLoadBalancers', - responseField: 'LoadBalancerSet' - }; - - if (selfIns.service === 'lbPrivate' || selfIns.service === 'loadBalance') { - res.interceptor = { - request: function request(param) { - return __assign(__assign({}, param), { - LoadBalancerType: 'INTERNAL' - }); - } - }; - } - - if (selfIns.service === 'lbPublic') { - res.interceptor = { - request: function request(param) { - return __assign(__assign({}, param), { - LoadBalancerType: 'OPEN' - }); - } - }; - } - - return res; - }; - - DCDatasource.prototype.getListenerList = function (params) { - return __awaiter(this, void 0, void 0, function () { - var region, instanceId, serviceInfo, res, rs; - - var _this = this; - - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - region = params.region, instanceId = params.instanceId; - serviceInfo = Object(_common_constants__WEBPACK_IMPORTED_MODULE_3__["GetServiceAPIInfo"])(region, 'clb'); - return [4 - /*yield*/ - , Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["fetchAllFactory"])(function (data) { - return _this.doRequest({ - url: _this.url + serviceInfo.path, - data: data - }, serviceInfo.service, { - region: region, - action: 'DescribeListeners' - }); - }, { - LoadBalancerId: instanceId - }, 'Listeners')]; - - case 1: - res = _a.sent(); - rs = res[0]; - return [2 - /*return*/ - , rs]; - } - }); - }); - }; - - DCDatasource.prototype.formatVariableDisplay = function (data, displayTpl, alias, aliasList) { - var _this = this; - - if (displayTpl) { - return displayTpl.replace(/\$\{(\w+)\}/g, function (a, b) { - if (!b || !aliasList.includes(b)) { - return ''; - } - - return _this.getAliasValue(data, b); - }); - } - - return this.getAliasValue(data, alias); - }; - - DCDatasource.prototype.getServerList = function (params) { - return __awaiter(this, void 0, void 0, function () { - var region, instanceId, listenerId, serviceInfo, res, Listeners, serversList; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - region = params.region, instanceId = params.instanceId, listenerId = params.listenerId; - serviceInfo = Object(_common_constants__WEBPACK_IMPORTED_MODULE_3__["GetServiceAPIInfo"])(region, 'clb'); - return [4 - /*yield*/ - , this.doRequest({ - url: this.url + serviceInfo.path, - data: { - LoadBalancerId: instanceId, - ListenerIds: [listenerId] - } - }, serviceInfo.service, { - region: region, - action: 'DescribeTargets' - })]; - - case 1: - res = _a.sent(); - Listeners = res.Listeners; - serversList = lodash__WEBPACK_IMPORTED_MODULE_2___default.a.reduce(Listeners, function (prev, item) { - var Rules = item.Rules, - Targets = item.Targets; - - if (!lodash__WEBPACK_IMPORTED_MODULE_2___default.a.isEmpty(Rules)) { - return lodash__WEBPACK_IMPORTED_MODULE_2___default.a.concat(prev, lodash__WEBPACK_IMPORTED_MODULE_2___default.a.flatten(lodash__WEBPACK_IMPORTED_MODULE_2___default.a.map(Rules, function (elem) { - return lodash__WEBPACK_IMPORTED_MODULE_2___default.a.isEmpty(elem.Targets) ? [] : elem.Targets; - }))); - } - - if (!lodash__WEBPACK_IMPORTED_MODULE_2___default.a.isEmpty(Targets)) { - return lodash__WEBPACK_IMPORTED_MODULE_2___default.a.concat(prev, Targets); - } - - return prev; - }, []); - return [2 - /*return*/ - , serversList]; - } - }); - }); - }; - - DCDatasource.prototype.fetchMetricData = function (action, region, instance, query) { - return __awaiter(this, void 0, void 0, function () { - var display, rs, listeneralias_1, result, listenerid, serverprivateip, serveralias, serverPrivateIp_1, serversList, serverAlias_1, result; - - var _this = this; - - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - display = query.display; - if (!(action === 'DescribeListeners')) return [3 - /*break*/ - , 3]; - return [4 - /*yield*/ - , this.getListenerList({ - region: region, - instanceId: instance[this.templateQueryIdMap.instance] - })]; - - case 1: - rs = _a.sent(); - listeneralias_1 = query.listeneralias; - listeneralias_1 = this.ListenerAliasList.includes(listeneralias_1) ? listeneralias_1 : this.templateQueryIdMap.listener; - result = rs.flatMap(function (o) { - var listenAlias = _this.formatVariableDisplay(o, display, listeneralias_1, _this.ListenerAliasList); - - var lisId = o[_this.templateQueryIdMap.listener]; - o._InstanceAliasValue = listenAlias || lisId; // if (!o[listeneralias]) return []; - - return { - text: listenAlias || lisId, - value: lisId - }; - }); - return [4 - /*yield*/ - , _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_5__["default"].setExtraStorage(this.service, this.keyInStorage.listener, rs)]; - - case 2: - _a.sent(); - - return [2 - /*return*/ - , result]; - - case 3: - if (!(action === 'DescribeServer' || action === 'DescribeServerPort')) return [3 - /*break*/ - , 6]; - listenerid = query.listenerid, serverprivateip = query.serverprivateip, serveralias = query.serveralias; - serverPrivateIp_1 = this.getVariable(serverprivateip); - return [4 - /*yield*/ - , this.getServerList({ - region: region, - instanceId: instance[this.templateQueryIdMap.instance], - listenerId: this.getVariable(listenerid) - })]; - - case 4: - serversList = _a.sent(); - serverAlias_1 = this.ServerAliasList.includes(serveralias) ? serveralias : this.templateQueryIdMap.servers; - result = lodash__WEBPACK_IMPORTED_MODULE_2___default.a.chain(serversList).filter(function (item) { - if (action === 'DescribeServer') { - return true; - } - - return serverPrivateIp_1 === lodash__WEBPACK_IMPORTED_MODULE_2___default.a.get(item, 'PrivateIpAddresses.0'); - }).map(function (item) { - var alias = _this.formatVariableDisplay(item, display, serverAlias_1, _this.ServerAliasList); - - var id = item[_this.templateQueryIdMap.servers][0]; - item._InstanceAliasValue = alias || id; - return action === 'DescribeServer' ? { - text: alias || id, - value: id - } : { - text: "".concat(lodash__WEBPACK_IMPORTED_MODULE_2___default.a.get(item, 'Port')), - value: lodash__WEBPACK_IMPORTED_MODULE_2___default.a.get(item, 'Port') - }; - }).value(); - return [4 - /*yield*/ - , _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_5__["default"].setExtraStorage(this.service, this.keyInStorage.servers, serversList)]; - - case 5: - _a.sent(); - - return [2 - /*return*/ - , action === 'DescribeServer' ? result : lodash__WEBPACK_IMPORTED_MODULE_2___default.a.uniqBy(result, 'text')]; - - case 6: - return [2 - /*return*/ - , []]; - } - }); - }); - }; - - return DCDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (DCDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/clb/query.ts": -/*!********************************************!*\ - !*** ./datasource/tc_monitor/clb/query.ts ***! - \********************************************/ -/*! exports provided: QueryCtrl, sQuery */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueryCtrl", function() { return QueryCtrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sQuery", function() { return sQuery; }); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! grafana/app/core/core_module */ "grafana/app/core/core_module"); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/clb/query_def.ts"); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/constants */ "./datasource/common/constants.ts"); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - - - - -var QueryCtrl = -/** @class */ -function () { - QueryCtrl.$inject = ["$scope", "$rootScope"]; - - /** @ngInject */ - function QueryCtrl($scope, $rootScope) { - var _this = this; - - $scope.init = function () { - $scope.LOADBALANCEFieldsDescriptor = _query_def__WEBPACK_IMPORTED_MODULE_2__["LOADBALANCEFieldsDescriptor"]; - $scope.serversList = []; - }; - - $scope.onFieldChange = function (field) { - $scope.onRefresh(); - }; - - $scope.onInstanceChange = function (n, o) { - if (Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["isTargetEqual"])(n, o, 'InstanceId')) return; - $scope.target.listener = ''; - $scope.target.servers = ''; - $scope.target.serverPort = ''; - }; - - $scope.getVariableId = function (data, type) { - var variableData = data; - var service = Object(_common_constants__WEBPACK_IMPORTED_MODULE_3__["GetServiceFromNamespace"])(_query_def__WEBPACK_IMPORTED_MODULE_2__["namespace"]); - variableData = $scope.datasource.getServiceFn(service, 'getVariable')(variableData); - - if (!variableData) { - return ''; - } - - try { - variableData = JSON.parse(variableData)[_query_def__WEBPACK_IMPORTED_MODULE_2__["templateQueryIdMap"][type]]; - } catch (error) {// console.log(); - } - - return variableData; - }; - - $scope.getExtraDropdown = function (target) { - return __awaiter(_this, void 0, void 0, function () { - var instance, service, instanceId, region, rs, result; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - instance = $scope.target.instance; - service = Object(_common_constants__WEBPACK_IMPORTED_MODULE_3__["GetServiceFromNamespace"])(_query_def__WEBPACK_IMPORTED_MODULE_2__["namespace"]); - instanceId = $scope.getVariableId(instance, 'instance'); - region = $scope.datasource.getServiceFn(service, 'getVariable')(target.region); - return [4 - /*yield*/ - , $scope.datasource.getServiceFn(service, 'getListenerList')({ - region: region, - instanceId: instanceId - })]; - - case 1: - rs = _a.sent(); - result = rs.map(function (o) { - o._InstanceAliasValue = o[_query_def__WEBPACK_IMPORTED_MODULE_2__["templateQueryIdMap"].listener]; - return { - text: o[_query_def__WEBPACK_IMPORTED_MODULE_2__["templateQueryIdMap"].listener], - value: JSON.stringify(o) - }; - }); - return [2 - /*return*/ - , result]; - } - }); - }); - }; - - $scope.getServersDropdown = function (target) { - return __awaiter(_this, void 0, void 0, function () { - var _a, instance, listener, service, instanceId, listenerId, region, serversList, res; - - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - _a = $scope.target, instance = _a.instance, listener = _a.listener; - service = Object(_common_constants__WEBPACK_IMPORTED_MODULE_3__["GetServiceFromNamespace"])(_query_def__WEBPACK_IMPORTED_MODULE_2__["namespace"]); - instanceId = $scope.getVariableId(instance, 'instance'); - listenerId = $scope.getVariableId(listener, 'listener'); - region = $scope.datasource.getServiceFn(service, 'getVariable')(target.region); - return [4 - /*yield*/ - , $scope.datasource.getServiceFn(service, 'getServerList')({ - region: region, - instanceId: instanceId, - listenerId: listenerId - })]; - - case 1: - serversList = _b.sent(); - $scope.serversList = serversList; - res = Object(lodash__WEBPACK_IMPORTED_MODULE_1__["chain"])(serversList).map(function (item) { - item._InstanceAliasValue = Object(lodash__WEBPACK_IMPORTED_MODULE_1__["get"])(item, 'PrivateIpAddresses.0'); - return { - text: Object(lodash__WEBPACK_IMPORTED_MODULE_1__["get"])(item, 'PrivateIpAddresses.0'), - value: JSON.stringify(item) - }; - }).uniqBy('text').value(); - return [2 - /*return*/ - , res]; - } - }); - }); - }; - - $scope.getServerPortDropdown = function (target) { - return __awaiter(_this, void 0, void 0, function () { - var servers, serverPortList, serversSource_1; - return __generator(this, function (_a) { - servers = $scope.target.servers; - serverPortList = []; - - try { - serversSource_1 = JSON.parse(servers); - serverPortList = Object(lodash__WEBPACK_IMPORTED_MODULE_1__["chain"])($scope.serversList).filter(function (item) { - return Object(lodash__WEBPACK_IMPORTED_MODULE_1__["get"])(serversSource_1, 'PrivateIpAddresses.0') === Object(lodash__WEBPACK_IMPORTED_MODULE_1__["get"])(item, 'PrivateIpAddresses.0'); - }).map(function (item) { - item._InstanceAliasValue = Object(lodash__WEBPACK_IMPORTED_MODULE_1__["get"])(item, 'Port'); - return { - text: "".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_1__["get"])(item, 'Port')), - value: JSON.stringify(item) - }; - }).value(); - } catch (error) {} - - return [2 - /*return*/ - , serverPortList]; - }); - }); - }; - - $scope.init(); - } - - return QueryCtrl; -}(); - - -var template = "\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n
\n\n\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n \n
\n \n \n
\n
\n
\n"); -function sQuery() { - return { - template: template, - controller: QueryCtrl, - restrict: 'E', - scope: { - target: '=', - namespace: '=', - showDetail: '=', - region: '=', - datasource: '=', - getDropdownOptions: '&', - onChange: '&', - onRefresh: '&', - dims: '=' - }, - link: function link(scope, element, attrs) { - scope.$watch('target.instance', function (newValue, oldValue) { - var _a; - - (_a = scope.onInstanceChange) === null || _a === void 0 ? void 0 : _a.call(scope, newValue, oldValue); - }); - } - }; -} -grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default.a.directive('clbQuery', sQuery); - -/***/ }), - -/***/ "./datasource/tc_monitor/clb/query_def.ts": -/*!************************************************!*\ - !*** ./datasource/tc_monitor/clb/query_def.ts ***! - \************************************************/ -/*! exports provided: default, LOADBALANCEFieldsDescriptor, InstanceAliasList, LOADBALANCEListenerAliasList, LOADBALANCEServerAliasList, LOADBALANCEVALIDDIMENSIONS, templateQueryIdMap, CANDIATEDIMENSIONS, queryMonitorExtraConfg, keyInStorage, queryEditorConfig, namespace, queryEditorName, GetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LOADBALANCEFieldsDescriptor", function() { return LOADBALANCEFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InstanceAliasList", function() { return InstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LOADBALANCEListenerAliasList", function() { return LOADBALANCEListenerAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LOADBALANCEServerAliasList", function() { return LOADBALANCEServerAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LOADBALANCEVALIDDIMENSIONS", function() { return LOADBALANCEVALIDDIMENSIONS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CANDIATEDIMENSIONS", function() { return CANDIATEDIMENSIONS; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryMonitorExtraConfg", function() { return queryMonitorExtraConfg; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keyInStorage", function() { return keyInStorage; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorConfig", function() { return queryEditorConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorName", function() { return queryEditorName; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); - -var namespace = 'QCE/LOADBALANCE'; // 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称 - -var queryEditorName = 'loadBalanceQuery'; -var ForwardTypes = [{ - text: '通用的负载均衡', - value: 1 -}, { - text: '传统的负载均衡', - value: 0 -}]; -var OrderBy = [{ - text: 'LoadBalancerName', - value: 'LoadBalancerName' -}, { - text: 'CreateTime', - value: 'CreateTime' -}, { - text: 'Domain', - value: 'Domain' -}, { - text: 'LoadBalancerType', - value: 'LoadBalancerType' -}]; -var OrderType = [{ - text: '升序', - value: 0 -}, { - text: '降序', - value: 1 -}]; -var WithRs = [{ - text: '没有绑定后端服务', - value: 0 -}, { - text: '绑定后端服务', - value: 1 -}, { - text: '查询全部', - value: -1 -}]; -var LOADBALANCEFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputNumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1', - link: '', - type: 'inputNumber', - min: 1 -}, { - key: 'LoadBalancerIds', - enDescriptor: 'LoadBalancer ID', - cnDescriptor: '实例ID', - link: '', - type: 'inputMulti' -}, { - key: 'LoadBalancerName', - enDescriptor: 'LoadBalancer Name', - cnDescriptor: '实例名称', - link: '', - type: 'input' -}, { - key: 'Forward', - enDescriptor: 'Forward', - cnDescriptor: '负载均衡实例类型', - link: '', - type: 'select', - list: ForwardTypes -}, { - key: 'Domain', - enDescriptor: 'Domain', - cnDescriptor: '域名,腾讯云为负载均衡实例分配的域名,本参数仅对传统型公网负载均衡才有意义', - link: '', - type: 'input' -}, { - key: 'LoadBalancerVips', - enDescriptor: 'LoadBalancer Vips', - cnDescriptor: '负载均衡实例的 VIP 地址', - link: '', - type: 'inputMulti' -}, { - key: 'BackendPrivateIps', - enDescriptor: 'BackendPrivate Ips', - cnDescriptor: '负载均衡绑定的后端服务的内网 IP', - link: '', - type: 'inputMulti' -}, { - key: 'BackendPublicIps', - enDescriptor: 'BackendPublic Ips', - cnDescriptor: '负载均衡绑定的后端服务的外网 IP', - link: '', - type: 'inputMulti' -}, { - key: 'ProjectId', - enDescriptor: 'Project ID', - cnDescriptor: '负载均衡实例所属的项目 ID', - link: '', - type: 'inputNumber' -}, { - key: 'VpcId', - enDescriptor: 'Vpc ID', - cnDescriptor: '负载均衡实例所属私有网络', - link: '', - type: 'input' -}, { - key: 'SecurityGroup', - enDescriptor: 'Security Group', - cnDescriptor: '安全组ID', - link: '', - type: 'input' -}, { - key: 'MasterZone', - enDescriptor: 'Master Zone', - cnDescriptor: '主可用区ID', - link: '', - type: 'input' -}, { - key: 'WithRs', - enDescriptor: 'WithRs', - cnDescriptor: '负载均衡是否绑定后端服务', - link: '', - type: 'select', - list: WithRs -}, { - key: 'OrderBy', - enDescriptor: 'OrderBy', - cnDescriptor: '排序字段', - link: '', - type: 'select', - list: OrderBy -}, { - key: 'OrderType', - enDescriptor: 'OrderByType', - cnDescriptor: '排序方式', - link: '', - type: 'select', - list: OrderType -}]; // 各产品实例列表detail配置 - -var queryEditorConfig = { - instanceDocUrl: 'https://cloud.tencent.com/document/api/214/30685', - namespace: namespace, - fieldDescriptor: LOADBALANCEFieldsDescriptor -}; -var LBFields = { - LoadBalancerIds: [], - Forward: undefined, - LoadBalancerName: '', - Domain: '', - LoadBalancerVips: [], - BackendPublicIps: [], - BackendPrivateIps: [], - Limit: 20, - Offset: 0, - ProjectId: undefined, - WithRs: {}, - VpcId: '', - SecurityGroup: '', - MasterZone: '', - OrderBy: {}, - OrderType: {} -}; -var LOADBALANCE_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'LoadBalancerId', - Port: '', - Protocol: '', - listener: '', - servers: '', - serverPort: '', - // listenerAlias: 'ListenerId', - queries: LBFields -}; // function GetInstanceQueryParams(queries: any = {}) { -// const params: any = {}; -// if (!_.isEmpty(queries)) { -// params.Limit = _.get(queries, 'Limit', 20) || 20; -// params.Offset = _.get(queries, 'Offset', 0) || 0; -// queries = _.omit(queries, ['Offset', 'Limit']); -// _.forEach(queries, (item: any, key) => { -// if (_.isArray(item)) { -// item = _.compact(item); -// if (item.length > 0) { -// params[key] = _.uniq(item); -// } -// } else if (_.isObject(item)) { -// if (_.isNumber(_.get(item, 'value', undefined)) || !_.isEmpty(_.get(item, 'value', undefined))) { -// params[key] = _.get(item, 'value'); -// } -// } else if (_.isNumber(item) || !_.isEmpty(item)) { -// params[key] = item; -// } -// }); -// } -// return params; -// } - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - return Object(_common_utils__WEBPACK_IMPORTED_MODULE_0__["instanceQueryParamsBaseParse"])(queries, false); -} - -var InstanceAliasList = ['LoadBalancerId', 'LoadBalancerName', 'LoadBalancerVips']; -var LOADBALANCEListenerAliasList = ['ListenerId', 'ListenerName', 'Port']; -var LOADBALANCEServerAliasList = ['PrivateIpAddresses', 'InstanceId']; -var LOADBALANCEVALIDDIMENSIONS = { - vip: 'LoadBalancerVips', - // vpcId: 'NumericalVpcId', - loadBalancerPort: 'Port', - protocol: 'Protocol', - lanIp: 'PrivateIpAddresses', - port: 'ServerPort' -}; // 对于ipv6类型,vip应该取AddressIPv6。 - -var CANDIATEDIMENSIONS = { - LoadBalancerVips: 'AddressIPv6' -}; // dimensionObject[item] = { Name: item, Value: '' }; -// const LOADBALANCE_INSTANCE_DIMENSIONOBJECTS = { -// vip: { Name: 'vip', Value: '' }, -// }; -// const LOADBALANCE_LISTENER_DIMENSIONOBJECTS = { -// vip: { Name: 'vip', Value: '' }, -// loadBalancerPort: { Name: 'loadBalancerPort', Value: '' }, -// protocol: { Name: 'protocol', Value: '' }, -// }; - -var templateQueryIdMap = { - instance: 'LoadBalancerId', - listener: 'ListenerId', - servers: 'PrivateIpAddresses', - port: 'Port' -}; // 需要缓存到storage的内容的key列表 - -var keyInStorage = { - listener: 'ListenerList', - servers: 'ServersList' -}; -/* -如果有InstanceId额外的维度,原则上都需要传入此map结构配置 -key的含义: - 经过InvalidDemensions处理后的string。topicId =》TopicId。 - 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId -value的含义: - 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、 - 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。 - 默认取通过InvalidDemsion处理后的key - 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。 - 即:templateQueryIdMap中内容。 - 联合上面2的内容筛选出原始sourceMap -*/ - -var queryMonitorExtraConfg = { - Port: { - dim_KeyInStorage: keyInStorage.listener, - dim_KeyInTarget: 'listener', - dim_KeyInMap: templateQueryIdMap.listener - }, - Protocol: { - dim_KeyInStorage: keyInStorage.listener, - dim_KeyInTarget: 'listener', - dim_KeyInMap: templateQueryIdMap.listener - }, - PrivateIpAddresses: { - dim_KeyInStorage: keyInStorage.servers, - dim_KeyInTarget: 'servers', - dim_KeyInMap: templateQueryIdMap.servers - }, - ServerPort: { - dim_KeyInStorage: keyInStorage.servers, - dim_KeyInTarget: 'serverPort', - dim_KeyInIns: 'Port', - dim_KeyInMap: templateQueryIdMap.port - } -}; -/* harmony default export */ __webpack_exports__["default"] = (LOADBALANCE_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/cls/datasource.ts": -/*!*************************************************!*\ - !*** ./datasource/tc_monitor/cls/datasource.ts ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/cls/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../locale */ "./locale/index.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - - - -var DCDatasource = -/** @class */ -function (_super) { - __extends(DCDatasource, _super); - - function DCDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = _query_def__WEBPACK_IMPORTED_MODULE_0__["namespace"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["CLSInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["CLSInvalidDemensions"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_0__["templateQueryIdMap"]; // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致 - - _this.InstanceReqConfig = { - service: 'cls', - action: 'DescribeTopics', - responseField: 'Topics' - }; - return _this; - } // getFilterDropdown({ field }) { - // return super.getRegions(); - // } - - - DCDatasource.prototype.getRegions = function () { - return Promise.resolve(_query_def__WEBPACK_IMPORTED_MODULE_0__["regionSupported"].map(function (_a) { - var value = _a.value; - return { - value: value, - text: Object(_locale__WEBPACK_IMPORTED_MODULE_3__["t"])(value) - }; - })); - }; // async getInstances(region, params = {}) { - // const superRes = await super.getInstances(region, params); - // console.log({ superRes }); - // } - - - DCDatasource.prototype.getMetrics = function (region) { - if (region === void 0) { - region = 'ap-guangzhou'; - } - - return __awaiter(this, void 0, void 0, function () { - var rawSet; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - return [4 - /*yield*/ - , _super.prototype.getMetrics.call(this, region)]; - - case 1: - rawSet = _a.sent(); - return [2 - /*return*/ - , lodash__WEBPACK_IMPORTED_MODULE_2___default.a.compact(rawSet.map(function (item) { - return Object(_query_def__WEBPACK_IMPORTED_MODULE_0__["modifyDimensons"])(item); - }))]; - } - }); - }); - }; - - return DCDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (DCDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/cls/query.ts": -/*!********************************************!*\ - !*** ./datasource/tc_monitor/cls/query.ts ***! - \********************************************/ -/*! exports provided: QueryCtrl, sQuery */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueryCtrl", function() { return QueryCtrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sQuery", function() { return sQuery; }); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! grafana/app/core/core_module */ "grafana/app/core/core_module"); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/cls/query_def.ts"); - - - -var QueryCtrl = -/** @class */ -function () { - QueryCtrl.$inject = ["$scope", "$rootScope"]; - - /** @ngInject */ - function QueryCtrl($scope, $rootScope) { - $scope.init = function () { - $scope.GSEFilterFieldsDescriptor = _query_def__WEBPACK_IMPORTED_MODULE_1__["CLSFilterFieldsDescriptor"]; - }; - - $scope.init(); - } - - return QueryCtrl; -}(); - - -var template = "\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n
\n \n \n
\n
\n
\n
\n"; -function sQuery() { - return { - template: template, - controller: QueryCtrl, - restrict: 'E', - scope: { - target: '=', - showDetail: '=', - region: '=', - datasource: '=', - getDropdownOptions: '&', - onChange: '&', - onRefresh: '&', - dims: '=' - } - }; -} -grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default.a.directive(_query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorName"], sQuery); - -/***/ }), - -/***/ "./datasource/tc_monitor/cls/query_def.ts": -/*!************************************************!*\ - !*** ./datasource/tc_monitor/cls/query_def.ts ***! - \************************************************/ -/*! exports provided: default, CLSFilterFieldsDescriptor, templateQueryIdMap, CLSInstanceAliasList, CLSInvalidDemensions, namespace, queryEditorName, queryEditorConfig, regionSupported, modifyDimensons, CLSGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CLSFilterFieldsDescriptor", function() { return CLSFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CLSInstanceAliasList", function() { return CLSInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CLSInvalidDemensions", function() { return CLSInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorName", function() { return queryEditorName; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorConfig", function() { return queryEditorConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "regionSupported", function() { return regionSupported; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "modifyDimensons", function() { return modifyDimensons; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CLSGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); - - -var namespace = 'QCE/CLS'; -var queryEditorName = 'clsQuery'; -var CLSInvalidDemensions = {// instanceid: 'TopicId', -}; // 需和文件名对应 - -var CLSInstanceAliasList = ['TopicId', 'TopicName']; -var templateQueryIdMap = { - instance: 'TopicId' -}; // 需要缓存到storage的内容的key列表 -// const keyInStorage = { -// fleet: 'fleet', // 实例队列 -// queue: 'queueName', // 会话队列 -// }; - -/* -如果有InstanceId额外的维度,原则上都需要传入此map结构配置 -key的含义: - 经过InvalidDemensions处理后的string。topicId =》TopicId。 - 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId -value的含义: - 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、 - 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。 - 默认取通过InvalidDemsion处理后的key - 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。 - 即:templateQueryIdMap中内容。 - 联合上面2的内容筛选出原始sourceMap -*/ -// const queryMonitorExtraConfg = { -// FleetId: { -// dim_KeyInStorage: keyInStorage.fleet, -// dim_KeyInTarget: 'FleetId', -// dim_KeyInMap: templateQueryIdMap.FleetId, -// }, -// Name: { -// dim_KeyInStorage: keyInStorage.queue, -// dim_KeyInTarget: 'Name', -// dim_KeyInMap: templateQueryIdMap.Name, -// }, -// }; -// select类型需要注意是{},multi后缀是[],dropdown是'' - -var CLSFilterFields = { - Limit: 20, - Offset: 0, - topicName: [], - topicId: [], - logsetName: [], - logsetId: [], - tagKey: [], - 'tag:tagKey': [], - storageType: {} -}; -var CLSFilterFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputNumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputNumber', - min: 1, - max: 100 -}, { - key: 'topicName', - enDescriptor: 'topicName', - cnDescriptor: '日志主题名称', - link: '', - type: 'inputMulti' -}, { - key: 'topicId', - enDescriptor: 'topicId', - cnDescriptor: '日志主题ID', - link: '', - type: 'inputMulti' -}, { - key: 'logsetName', - enDescriptor: 'logsetName', - cnDescriptor: '日志集名称', - link: '', - type: 'inputMulti' -}, { - key: 'logsetId', - enDescriptor: 'logsetId', - cnDescriptor: '日志集ID', - link: '', - type: 'inputMulti' -}, { - key: 'tagKey', - enDescriptor: 'tagKey', - cnDescriptor: '标签键', - link: '', - type: 'inputMulti' -}, { - key: 'tag:tagKey', - enDescriptor: 'tag - tagKey', - cnDescriptor: '标签键值对', - link: '', - type: 'inputMulti' -}, { - key: 'storageType', - enDescriptor: 'storageType', - cnDescriptor: '日志主题的存储类型', - link: '', - type: 'select', - list: [{ - text: '实时存储', - value: 'hot' - }, { - text: '离线存储', - value: 'cold' - }] -}]; // 各产品实例列表detail配置 - -var queryEditorConfig = { - instanceDocUrl: 'https://cloud.tencent.com/document/api/614/56454', - namespace: namespace, - fieldDescriptor: CLSFilterFieldsDescriptor -}; -var CLS_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'TopicId', - uin: '', - queries: CLSFilterFields -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - return Object(_common_utils__WEBPACK_IMPORTED_MODULE_0__["instanceQueryParamsBaseParse"])(queries, true); -} // regions for dropdown - - -var regionSupported = [{ - value: 'ap-bangkok' -}, { - value: 'ap-beijing' -}, { - value: 'ap-chengdu' -}, { - value: 'ap-chongqing' -}, { - value: 'ap-guangzhou' -}, { - value: 'ap-hongkong' -}, { - value: 'ap-jakarta' -}, { - value: 'ap-mumbai' -}, { - value: 'ap-seoul' -}, { - value: 'ap-nanjing' -}, { - value: 'ap-shanghai' -}, { - value: 'ap-shanghai-fsi' -}, { - value: 'ap-shenzhen-fsi' -}, { - value: 'ap-singapore' -}, { - value: 'ap-tokyo' -}, { - value: 'eu-frankfurt' -}, { - value: 'eu-moscow' -}, { - value: 'na-ashburn' -}, { - value: 'na-siliconvalley' -}, { - value: 'na-toronto' -}]; - -function modifyDimensons(metricItem) { - var metricTmp = lodash__WEBPACK_IMPORTED_MODULE_1___default.a.cloneDeep(metricItem); - - metricTmp.Dimensions.forEach(function (item) { - // item.Dimensions = item.Dimensions.map((v) => CLSInvalidDemensions[v] || v); - item.Dimensions = ['uin', 'TopicId']; - }); - return metricTmp; -} - -/* harmony default export */ __webpack_exports__["default"] = (CLS_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/cmq/datasource.ts": -/*!*************************************************!*\ - !*** ./datasource/tc_monitor/cmq/datasource.ts ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/cmq/query_def.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - -var __spreadArray = undefined && undefined.__spreadArray || function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -}; - - - - -var CmqDatasource = -/** @class */ -function (_super) { - __extends(CmqDatasource, _super); - - function CmqDatasource() { - var _this = _super !== null && _super.apply(this, arguments) || this; - - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_1__["InvalidDemensions"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_1__["InstanceAliasList"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_1__["templateQueryIdMap"]; - _this.InstanceReqConfig = { - service: 'cmq', - action: 'DescribeQueueDetail', - responseField: 'QueueSet' - }; - return _this; - } - - CmqDatasource.prototype.getMetrics = function (region) { - if (region === void 0) { - region = 'ap-guangzhou'; - } - - return __awaiter(this, void 0, void 0, function () { - var rawMetric; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - return [4 - /*yield*/ - , _super.prototype.getMetrics.call(this, region)]; - - case 1: - rawMetric = _a.sent(); - return [2 - /*return*/ - , rawMetric.map(function (metric) { - var dims = metric.Dimensions[0].Dimensions; - dims = Array.from(new Set(__spreadArray(__spreadArray([], dims, true), ['queueId', 'queueName'], false))); - metric.Dimensions[0].Dimensions = dims; - return metric; - })]; - } - }); - }); - }; - - return CmqDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_0__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (CmqDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/cmq/query.ts": -/*!********************************************!*\ - !*** ./datasource/tc_monitor/cmq/query.ts ***! - \********************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _base_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_base/query */ "./datasource/tc_monitor/_base/query.ts"); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/cmq/query_def.ts"); - - -Object(_base_query__WEBPACK_IMPORTED_MODULE_0__["default"])('cmqQuery', { - fieldDescriptor: _query_def__WEBPACK_IMPORTED_MODULE_1__["InstanceQueryDescriptor"], - instanceDocUrl: 'https://cloud.tencent.com/document/api/406/42624', - namespace: 'QCE/CMQ' -}); - -/***/ }), - -/***/ "./datasource/tc_monitor/cmq/query_def.ts": -/*!************************************************!*\ - !*** ./datasource/tc_monitor/cmq/query_def.ts ***! - \************************************************/ -/*! exports provided: InstanceQueryDescriptor, InvalidDemensions, templateQueryIdMap, InstanceAliasList, GetInstanceQueryParams, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InstanceQueryDescriptor", function() { return InstanceQueryDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InvalidDemensions", function() { return InvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InstanceAliasList", function() { return InstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); - -var InstanceQueryDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputNumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为10,最小值为1,最大值为100', - link: '', - type: 'inputNumber', - min: 1, - max: 50 -}, { - key: 'QueueName', - enDescriptor: 'QueueName', - cnDescriptor: '精确匹配QueueName', - link: '', - type: 'input' -}, { - key: 'TagKey', - enDescriptor: 'TagKey', - cnDescriptor: '标签搜索', - link: '', - type: 'input' -}]; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - var params = {}; - - if (!lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(queries)) { - params.Limit = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Limit', 20) || 20; - params.Offset = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Offset', 0) || 0; - queries = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.omit(queries, ['Offset', 'Limit']); - - lodash__WEBPACK_IMPORTED_MODULE_0___default.a.forEach(queries, function (item, key) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isArray(item)) { - item = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.compact(item); - - if (item.length > 0) { - params[key] = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(item); - } - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isObject(item)) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isNumber(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', undefined)) || !lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', undefined))) { - params[key] = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value'); - } - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isNumber(item) || !lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(item)) { - params[key] = item; - } - }); - } - - return params; -} // 向实例里面塞dimensions对应的值,dimension中的key对应到实例中的key - - -var InvalidDemensions = { - queueId: 'QueueId', - queueName: 'QueueName' -}; -var templateQueryIdMap = { - instance: 'QueueName' -}; // 与名称挂钩的变量 - -var InstanceAliasList = ['QueueName', 'QueueId']; - // 界面状态模型,default - -/* harmony default export */ __webpack_exports__["default"] = ({ - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'QueueName', - queries: { - Offset: 0, - Limit: 20, - QueueName: '', - TagKey: '' - } -}); - -/***/ }), - -/***/ "./datasource/tc_monitor/cmq_topic/datasource.ts": -/*!*******************************************************!*\ - !*** ./datasource/tc_monitor/cmq_topic/datasource.ts ***! - \*******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/constants */ "./datasource/common/constants.ts"); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/cmq_topic/query_def.ts"); -/* harmony import */ var _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/datasourceStorage */ "./datasource/common/datasourceStorage.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - - - - -var CmqTopicDatasource = -/** @class */ -function (_super) { - __extends(CmqTopicDatasource, _super); - - function CmqTopicDatasource() { - var _this = _super !== null && _super.apply(this, arguments) || this; - - _this.Namespace = 'QCE/CMQTOPIC'; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_3__["InvalidDemensions"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_3__["InstanceAliasList"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_3__["templateQueryIdMap"]; - _this.InstanceReqConfig = { - service: 'cmq', - action: 'DescribeTopicDetail', - responseField: 'TopicSet' - }; - _this.keyInStorage = _query_def__WEBPACK_IMPORTED_MODULE_3__["keyInStorage"]; - _this.queryMonitorExtraConfg = _query_def__WEBPACK_IMPORTED_MODULE_3__["queryMonitorExtraConfg"]; - _this.extraMetricDims = ['subscriptionId']; // 多选 - - return _this; - } - - CmqTopicDatasource.prototype.fetchAllSubscription = function (region, params) { - return __awaiter(this, void 0, void 0, function () { - var serviceInfo, rs; - - var _this = this; - - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - serviceInfo = Object(_common_constants__WEBPACK_IMPORTED_MODULE_0__["GetServiceAPIInfo"])(region, 'cmq'); - return [4 - /*yield*/ - , Object(_common_utils__WEBPACK_IMPORTED_MODULE_1__["fetchAllFactory"])(function (data) { - return _this.doRequest({ - url: _this.url + serviceInfo.path, - data: data - }, serviceInfo.service, { - region: region, - action: 'DescribeSubscriptionDetail' - }); - }, params, 'SubscriptionSet')]; - - case 1: - rs = _a.sent(); - return [2 - /*return*/ - , rs[0]]; - } - }); - }); - }; - - CmqTopicDatasource.prototype.fetchMetricData = function (action, region, instance) { - return __awaiter(this, void 0, void 0, function () { - var result, _a, rs; - - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - _a = action; - - switch (_a) { - case 'DescribeSubscriptionDetail': - return [3 - /*break*/ - , 1]; - } - - return [3 - /*break*/ - , 4]; - - case 1: - return [4 - /*yield*/ - , this.fetchAllSubscription(region, { - TopicName: instance.TopicName - })]; - - case 2: - result = _b.sent(); - rs = result.map(function (item) { - item._InstanceAliasValue = item.SubscriptionId; - return { - text: item.SubscriptionId, - value: item[_query_def__WEBPACK_IMPORTED_MODULE_3__["templateQueryIdMap"].subscription] - }; - }); - return [4 - /*yield*/ - , _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_4__["default"].setExtraStorage(this.service, this.keyInStorage.subscriptionId, result)]; - - case 3: - _b.sent(); - - return [2 - /*return*/ - , rs]; - - case 4: - return [2 - /*return*/ - , []]; - } - }); - }); - }; - - CmqTopicDatasource.prototype.getMetrics = function (region) { - if (region === void 0) { - region = 'ap-guangzhou'; - } - - return __awaiter(this, void 0, void 0, function () { - var rawMetric; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - return [4 - /*yield*/ - , _super.prototype.getMetrics.call(this, region)]; - - case 1: - rawMetric = _a.sent(); - return [2 - /*return*/ - , rawMetric.map(function (metric) { - var dims = metric.Dimensions[0].Dimensions; - dims.push('topicId'); - - if (['NumOfNotify', 'NumOfSuccNotify'].includes(metric.MetricName)) { - dims.push('subscriptionId'); - } - - dims = Array.from(new Set(dims)); - metric.Dimensions[0].Dimensions = dims; - return metric; - })]; - } - }); - }); - }; - - return CmqTopicDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_2__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (CmqTopicDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/cmq_topic/query.ts": -/*!**************************************************!*\ - !*** ./datasource/tc_monitor/cmq_topic/query.ts ***! - \**************************************************/ -/*! exports provided: CmqTopicQueryCtrl, scfQuery */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CmqTopicQueryCtrl", function() { return CmqTopicQueryCtrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scfQuery", function() { return scfQuery; }); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! grafana/app/core/core_module */ "grafana/app/core/core_module"); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/cmq_topic/query_def.ts"); -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - -var ExtraFields = [{ - label: 'Subscription(订阅)', - field: 'subscriptionId' -}]; - -var CmqTopicQueryCtrl = -/** @class */ -function () { - CmqTopicQueryCtrl.$inject = ["$scope", "$rootScope"]; - - /** @ngInject */ - function CmqTopicQueryCtrl($scope, $rootScope) { - var _this = this; - - $scope.init = function () { - $scope.InstanceQueryDescriptor = _query_def__WEBPACK_IMPORTED_MODULE_1__["InstanceQueryDescriptor"]; - }; - - $scope.getDropdown = function (field) { - switch (field) { - default: - return []; - } - }; // 各个实例下的订阅,由于不想每次都重复发请求,所以这里做了一层缓存,数据结构为{ [instanceId]: { } } - - - $scope.cacheMap = {}; - - $scope.getExtraFields = function () { - return ExtraFields.filter(function (item) { - var _a; - - return item.field in ((_a = $scope.dims) !== null && _a !== void 0 ? _a : {}); - }); - }; - - $scope.getTopicName = function () { - var instance = $scope.target.instance; - instance = $scope.datasource.getServiceFn('cmqTopic', 'getVariable')(instance); - - if (!instance) { - return ''; - } - - try { - instance = JSON.parse(instance).TopicName; - } catch (error) {// console.log(); - } - - return instance; - }; - - $scope.onExtraFieldChange = function (field) { - $scope.onRefresh(); - }; - - $scope.getExtraDropdown = function (target, field) { - return __awaiter(_this, void 0, void 0, function () { - var TopicName, data, region, fetcher, datas; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!(field === 'subscriptionId')) return [3 - /*break*/ - , 3]; - TopicName = $scope.getTopicName(); - data = $scope.cacheMap[TopicName]; - if (!!data) return [3 - /*break*/ - , 2]; - region = $scope.datasource.getServiceFn('cmqTopic', 'getVariable')(target.region); - fetcher = $scope.datasource.getServiceFn('cmqTopic', 'fetchAllSubscription'); - return [4 - /*yield*/ - , fetcher(region, { - TopicName: TopicName - })]; - - case 1: - datas = _a.sent(); - data = datas.map(function (item) { - item._InstanceAliasValue = item.SubscriptionId; - return { - text: item.SubscriptionId, - value: JSON.stringify(item) - }; - }); - _a.label = 2; - - case 2: - // 缓存 - $scope.cacheMap[TopicName] = data; - return [2 - /*return*/ - , data]; - - case 3: - return [2 - /*return*/ - , []]; - } - }); - }); - }; - - $scope.init(); - } - - return CmqTopicQueryCtrl; -}(); - - -var template = "\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n\n
\n"; -function scfQuery() { - return { - template: template, - controller: CmqTopicQueryCtrl, - restrict: 'E', - scope: { - target: '=', - showDetail: '=', - region: '=', - datasource: '=', - getDropdownOptions: '&', - onChange: '&', - onRefresh: '&', - dims: '=' - } - }; -} -grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default.a.directive('cmqTopicQuery', scfQuery); - -/***/ }), - -/***/ "./datasource/tc_monitor/cmq_topic/query_def.ts": -/*!******************************************************!*\ - !*** ./datasource/tc_monitor/cmq_topic/query_def.ts ***! - \******************************************************/ -/*! exports provided: InstanceQueryDescriptor, InvalidDemensions, templateQueryIdMap, InstanceAliasList, GetInstanceQueryParams, queryMonitorExtraConfg, keyInStorage, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InstanceQueryDescriptor", function() { return InstanceQueryDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InvalidDemensions", function() { return InvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InstanceAliasList", function() { return InstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryMonitorExtraConfg", function() { return queryMonitorExtraConfg; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keyInStorage", function() { return keyInStorage; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); - -var InstanceQueryDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputNumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为10,最小值为1,最大值为100', - link: '', - type: 'inputNumber', - min: 1, - max: 50 -}, { - key: 'TopicName', - enDescriptor: 'TopicName', - cnDescriptor: '精确匹配TopicName', - link: '', - type: 'input' -}, { - key: 'TagKey', - enDescriptor: 'TagKey', - cnDescriptor: '标签搜索', - link: '', - type: 'input' -}]; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - var params = {}; - - if (!lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(queries)) { - params.Limit = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Limit', 20) || 20; - params.Offset = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Offset', 0) || 0; - queries = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.omit(queries, ['Offset', 'Limit']); - - lodash__WEBPACK_IMPORTED_MODULE_0___default.a.forEach(queries, function (item, key) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isArray(item)) { - item = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.compact(item); - - if (item.length > 0) { - params[key] = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(item); - } - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isObject(item)) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isNumber(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', undefined)) || !lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', undefined))) { - params[key] = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value'); - } - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isNumber(item) || !lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(item)) { - params[key] = item; - } - }); - } - - return params; -} // 向实例里面塞dimensions对应的值,dimension中的key对应到实例中的key - - -var InvalidDemensions = { - topicId: 'TopicId' -}; // 因为cmq那边,以TopciName为主键 - -var templateQueryIdMap = { - instance: 'TopicName', - subscription: 'SubscriptionId' -}; // 需要缓存到storage的内容的key列表 - -var keyInStorage = { - subscriptionId: 'subscriptionId' -}; -/* -如果有InstanceId额外的维度,原则上都需要传入此map结构配置 -key的含义: - 经过InvalidDemensions处理后的string。topicId =》TopicId。 - 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId -value的含义: - 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、 - 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。 - 默认取通过InvalidDemsion处理后的key - 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。 - 即:templateQueryIdMap中内容。 - 联合上面2的内容筛选出原始sourceMap -*/ - -var queryMonitorExtraConfg = { - subscriptionId: { - dim_KeyInStorage: keyInStorage.subscriptionId, - dim_KeyInTarget: 'subscriptionId', - dim_KeyInMap: templateQueryIdMap.subscription - } -}; // 与名称挂钩的变量 - -var InstanceAliasList = ['TopicName', 'TopicId']; - // 界面状态模型,default - -/* harmony default export */ __webpack_exports__["default"] = ({ - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'TopicName', - subscriptionId: '', - queries: { - Offset: 0, - Limit: 20, - TopicName: '', - TagKey: '' - } -}); - -/***/ }), - -/***/ "./datasource/tc_monitor/cos/datasource.ts": -/*!*************************************************!*\ - !*** ./datasource/tc_monitor/cos/datasource.ts ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __assign = undefined && undefined.__assign || function () { - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - } - - return t; - }; - - return __assign.apply(this, arguments); -}; - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - -var CosDatasource = -/** @class */ -function (_super) { - __extends(CosDatasource, _super); - - function CosDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.InvalidDimensions = {}; - _this.InstanceAliasList = ['BucketName']; - _this.templateQueryIdMap = { - instance: 'BucketName' - }; - _this.InstanceReqConfig = {}; // 不必要的配置 - - _this.cosURL = "/api/datasources/".concat(_this.instanceSettings.id, "/resources/tc_cos_list"); - return _this; - } - - CosDatasource.prototype.getInstances = function (region) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.backendSrv.datasourceRequest({ - url: this.cosURL, - method: 'GET', - params: { - region: region - }, - headers: { - 'Content-Type': 'application/json' - } - }).then(function (res) { - var data = res.data; - data = data || {}; - var Buckets = data.Buckets; - Buckets = Buckets || []; // name contains appid,see detail https://cloud.tencent.com/document/product/436/8291 - - return Buckets.map(function (item) { - return __assign(__assign({}, item), { - BucketName: item.Name, - bucket: item.Name, - appid: item.Name.split('-').slice(-1)[0] - }); - }); - })]; - }); - }); - }; - - CosDatasource.prototype.getVariableInstances = function (region) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.getInstances(region)]; - }); - }); - }; - - return CosDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_0__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (CosDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/cos/query_def.ts": -/*!************************************************!*\ - !*** ./datasource/tc_monitor/cos/query_def.ts ***! - \************************************************/ -/*! exports provided: InstanceAliasList, GetInstanceQueryParams, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InstanceAliasList", function() { return InstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); - - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - var params = {}; - - if (!lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(queries)) { - params.Limit = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Limit', 20) || 20; - params.Offset = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Offset', 0) || 0; - queries = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.omit(queries, ['Offset', 'Limit']); - - lodash__WEBPACK_IMPORTED_MODULE_0___default.a.forEach(queries, function (item, key) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isArray(item)) { - item = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.compact(item); - - if (item.length > 0) { - params[key] = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(item); - } - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isObject(item)) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isNumber(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', undefined)) || !lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', undefined))) { - params[key] = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value'); - } - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isNumber(item) || !lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(item)) { - params[key] = item; - } - }); - } - - return params; -} // 与名称挂钩的变量 - - -var InstanceAliasList = ['BucketName']; - // 界面状态模型,default - -/* harmony default export */ __webpack_exports__["default"] = ({ - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'BucketName', - queries: {} -}); - -/***/ }), - -/***/ "./datasource/tc_monitor/cpm/datasource.ts": -/*!*************************************************!*\ - !*** ./datasource/tc_monitor/cpm/datasource.ts ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/cpm/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/constants */ "./datasource/common/constants.ts"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../locale */ "./locale/index.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - - - - -var DCDatasource = -/** @class */ -function (_super) { - __extends(DCDatasource, _super); - - function DCDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = _query_def__WEBPACK_IMPORTED_MODULE_0__["namespace"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["CPMInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["CPMInvalidDemensions"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_0__["templateQueryIdMap"]; // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致 - - _this.InstanceReqConfig = { - service: 'bm', - action: 'DescribeDevices', - responseField: 'DeviceInfoSet' - }; - _this.RegionMap = {}; - return _this; - } // 重写getRegion - - - DCDatasource.prototype.getRegions = function () { - var _this = this; - - return this.doRequest({ - url: this.url + '/bm' - }, 'bm', { - action: 'DescribeRegions', - region: 'ap-guangzhou' - }).then(function (response) { - // 缓存,后面获取可用区zone - _this.RegionMap = lodash__WEBPACK_IMPORTED_MODULE_3___default.a.keyBy(response.RegionInfoSet, 'Region'); - return lodash__WEBPACK_IMPORTED_MODULE_3___default.a.map(response.RegionInfoSet || [], function (item) { - return { - text: Object(_locale__WEBPACK_IMPORTED_MODULE_4__["t"])(item.Region), - value: item.Region - }; - }); - }); - }; - - DCDatasource.prototype.getMetrics = function (region) { - if (region === void 0) { - region = 'ap-guangzhou'; - } - - return __awaiter(this, void 0, void 0, function () { - var rawSet; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - return [4 - /*yield*/ - , _super.prototype.getMetrics.call(this, region)]; - - case 1: - rawSet = _a.sent(); - return [2 - /*return*/ - , rawSet.map(function (item) { - return Object(_query_def__WEBPACK_IMPORTED_MODULE_0__["modifyDimensons"])(item); - })]; - } - }); - }); - }; - - DCDatasource.prototype.getFilterDropdown = function (_a) { - var field = _a.field, - region = _a.region; - - if (field === 'DeviceClassCode') { - var serviceInfo = Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["GetServiceAPIInfo"])(region, 'bm'); - return this.doRequest({ - url: this.url + serviceInfo.path - }, 'bm', { - region: region, - action: 'DescribeDeviceClass' - }).then(function (response) { - return lodash__WEBPACK_IMPORTED_MODULE_3___default.a.map(response.DeviceClassSet || [], function (item) { - return { - text: item.DeviceClassCode, - value: item.DeviceClassCode - }; - }); - }); - } - - return []; - }; - - return DCDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (DCDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/cpm/query.ts": -/*!********************************************!*\ - !*** ./datasource/tc_monitor/cpm/query.ts ***! - \********************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _base_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_base/query */ "./datasource/tc_monitor/_base/query.ts"); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/cpm/query_def.ts"); - - -Object(_base_query__WEBPACK_IMPORTED_MODULE_0__["default"])(_query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorName"], _query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorConfig"]); - -/***/ }), - -/***/ "./datasource/tc_monitor/cpm/query_def.ts": -/*!************************************************!*\ - !*** ./datasource/tc_monitor/cpm/query_def.ts ***! - \************************************************/ -/*! exports provided: default, CPMFilterFieldsDescriptor, templateQueryIdMap, CPMInstanceAliasList, CPMInvalidDemensions, namespace, queryEditorName, queryEditorConfig, modifyDimensons, CPMGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CPMFilterFieldsDescriptor", function() { return CPMFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CPMInstanceAliasList", function() { return CPMInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CPMInvalidDemensions", function() { return CPMInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorName", function() { return queryEditorName; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorConfig", function() { return queryEditorConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "modifyDimensons", function() { return modifyDimensons; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CPMGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); - - -var namespace = 'QCE/CPM'; // 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称 - -var queryEditorName = 'cpmQuery'; -var CPMInvalidDemensions = { - instanceId: 'InstanceId' // uniqid: 'InstanceId', - -}; -var CPMInstanceAliasList = ['InstanceId', 'Name']; -var templateQueryIdMap = { - instance: 'InstanceId' -}; // select类型需要注意是{},multi后缀是[],dropdown是'' - -var CPMFilterFields = { - Limit: 20, - Offset: 0, - DeviceClassCode: '', - InstanceIds: [], - WanIps: [], - LanIps: [], - Alias: '', - VagueIp: '', - AutoRenewFlag: {}, - VpcId: '', - SubnetId: '', - DeviceType: {}, - IsLuckyDevice: {} -}; -var CPMFilterFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputNumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputNumber', - min: 1, - max: 100 -}, { - key: 'DeviceClassCode', - enDescriptor: 'DeviceClassCode', - cnDescriptor: '机型ID', - link: '', - type: 'dropdown' -}, { - key: 'InstanceIds', - enDescriptor: 'InstanceIds', - cnDescriptor: '设备ID数组', - link: '', - type: 'inputMulti' -}, { - key: 'WanIps', - enDescriptor: 'WanIps', - cnDescriptor: '外网IP数组', - link: '', - type: 'inputMulti' -}, { - key: 'LanIps', - enDescriptor: 'LanIps', - cnDescriptor: '内网IP数组', - link: '', - type: 'inputMulti' -}, { - key: 'Alias', - enDescriptor: 'Alias', - cnDescriptor: '设备名称', - link: '', - type: 'input' -}, { - key: 'VagueIp', - enDescriptor: 'VagueIp', - cnDescriptor: '模糊IP查询', - link: '', - type: 'input' -}, { - key: 'AutoRenewFlag', - enDescriptor: 'AutoRenewFlag', - cnDescriptor: '自动续费标志', - link: '', - type: 'select', - list: [{ - text: '不自动续费', - value: 0 - }, { - text: '自动续费', - value: 1 - }] -}, { - key: 'VpcId', - enDescriptor: 'VpcId', - cnDescriptor: '私有网络唯一ID', - link: '', - type: 'input' -}, { - key: 'SubnetId', - enDescriptor: 'SubnetId', - cnDescriptor: '子网唯一ID', - link: '', - type: 'input' -}, { - key: 'DeviceType', - enDescriptor: 'DeviceType', - cnDescriptor: '子网实例ID', - link: '', - type: 'select', - list: [{ - text: '计算型', - value: 'compute' - }, { - text: '标准型', - value: 'standard' - }, { - text: '存储型', - value: 'storage' - }] -}, { - key: 'IsLuckyDevice', - enDescriptor: 'IsLuckyDevice', - cnDescriptor: '竞价实例机器过滤', - link: '', - type: 'select', - list: [{ - text: '非竞价实例机器', - value: 0 - }, { - text: '竞价实例的机器', - value: 1 - }] -}]; // 各产品实例列表detail配置 - -var queryEditorConfig = { - instanceDocUrl: 'https://cloud.tencent.com/document/api/386/32904', - namespace: namespace, - fieldDescriptor: CPMFilterFieldsDescriptor -}; -var CPM_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'InstanceId', - queries: CPMFilterFields -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - return Object(_common_utils__WEBPACK_IMPORTED_MODULE_0__["instanceQueryParamsBaseParse"])(queries, false); -} - -function modifyDimensons(metricItem) { - var metricTmp = lodash__WEBPACK_IMPORTED_MODULE_1___default.a.cloneDeep(metricItem); - - metricTmp.Dimensions.forEach(function (item) { - item.Dimensions = ['instanceId']; - }); - return metricTmp; -} - -/* harmony default export */ __webpack_exports__["default"] = (CPM_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/cvm/datasource.ts": -/*!*************************************************!*\ - !*** ./datasource/tc_monitor/cvm/datasource.ts ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/cvm/query_def.ts"); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/constants */ "./datasource/common/constants.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - - - -var CVMDatasource = -/** @class */ -function (_super) { - __extends(CVMDatasource, _super); - - function CVMDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = 'QCE/CVM'; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_1__["CVMInstanceAliasList"]; - _this.InvalidDimensions = {}; - _this.templateQueryIdMap = { - instance: 'InstanceId' - }; - _this.InstanceReqConfig = { - service: 'cvm', - action: 'DescribeInstances', - responseField: 'InstanceSet' - }; - return _this; - } - - CVMDatasource.prototype.getMetrics = function (region) { - if (region === void 0) { - region = 'ap-guangzhou'; - } - - return __awaiter(this, void 0, void 0, function () { - var rawSet; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - return [4 - /*yield*/ - , _super.prototype.getMetrics.call(this, region)]; - - case 1: - rawSet = _a.sent(); - return [2 - /*return*/ - , lodash__WEBPACK_IMPORTED_MODULE_0___default.a.compact(rawSet.map(function (item) { - if (Object(_query_def__WEBPACK_IMPORTED_MODULE_1__["isValidMetric"])(item)) { - return Object(_query_def__WEBPACK_IMPORTED_MODULE_1__["modifyDimensons"])(item); - } - - return null; - }))]; - } - }); - }); - }; - - CVMDatasource.prototype.getRegions = function () { - return this.doRequest({ - url: this.url + '/api', - data: { - Product: 'cvm' - } - }, 'api', { - action: 'DescribeRegions' - }).then(function (response) { - return lodash__WEBPACK_IMPORTED_MODULE_0___default.a.filter(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.map(response.RegionSet || [], function (item) { - return { - text: item.RegionName, - value: item.Region, - RegionState: item.RegionState - }; - }), function (item) { - return item.RegionState === 'AVAILABLE'; - }); - }); - }; - - CVMDatasource.prototype.getZones = function (region) { - var serviceInfo = Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["GetServiceAPIInfo"])(region, 'api'); - return this.doRequest({ - url: this.url + serviceInfo.path, - data: { - Product: 'cvm' - } - }, serviceInfo.service, { - region: region, - action: 'DescribeZones' - }).then(function (response) { - return lodash__WEBPACK_IMPORTED_MODULE_0___default.a.filter(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.map(response.ZoneSet || [], function (item) { - return { - text: item.ZoneName, - value: item.Zone, - ZoneState: item.ZoneState, - Zone: item.Zone - }; - }), function (item) { - return item.ZoneState === 'AVAILABLE'; - }); - }); - }; - - return CVMDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_3__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (CVMDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/cvm/query.ts": -/*!********************************************!*\ - !*** ./datasource/tc_monitor/cvm/query.ts ***! - \********************************************/ -/*! exports provided: CVMQueryCtrl, cvmQuery */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CVMQueryCtrl", function() { return CVMQueryCtrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cvmQuery", function() { return cvmQuery; }); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! grafana/app/core/core_module */ "grafana/app/core/core_module"); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/cvm/query_def.ts"); - - - -var CVMQueryCtrl = -/** @class */ -function () { - CVMQueryCtrl.$inject = ["$scope", "$rootScope"]; - - /** @ngInject */ - function CVMQueryCtrl($scope, $rootScope) { - $scope.init = function () { - $scope.CVMFilterFieldsDescriptor = _query_def__WEBPACK_IMPORTED_MODULE_1__["CVMFilterFieldsDescriptor"]; - }; - - $scope.onChecked = function (srcField, dstField) { - if ($scope.target.queries[srcField] === true) { - $scope.target.queries[dstField] = false; - } - - $scope.onChange(); - }; - - $scope.getDropdown = function (field) { - switch (field) { - case 'zone': - return $scope.getZones(); - - default: - return []; - } - }; - - $scope.getZones = function () { - if (!$scope.region) { - return []; - } - - return $scope.datasource.getZones('cvm', $scope.region); - }; - - $scope.init(); - } - - return CVMQueryCtrl; -}(); - - -var template = "\n
\n\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n \n \n \n
\n
\n\n
\n"; -function cvmQuery() { - return { - template: template, - controller: CVMQueryCtrl, - restrict: 'E', - scope: { - target: '=', - showDetail: '=', - region: '=', - datasource: '=', - getDropdownOptions: '&', - onChange: '&' - } - }; -} -grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default.a.directive('cvmQuery', cvmQuery); - -/***/ }), - -/***/ "./datasource/tc_monitor/cvm/query_def.ts": -/*!************************************************!*\ - !*** ./datasource/tc_monitor/cvm/query_def.ts ***! - \************************************************/ -/*! exports provided: default, CVMFilterFieldsDescriptor, CVMInstanceAliasList, isValidMetric, modifyDimensons, templateQueryIdMap, CVMGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CVMFilterFieldsDescriptor", function() { return CVMFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CVMInstanceAliasList", function() { return CVMInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isValidMetric", function() { return isValidMetric; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "modifyDimensons", function() { return modifyDimensons; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CVMGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -var __assign = undefined && undefined.__assign || function () { - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - } - - return t; - }; - - return __assign.apply(this, arguments); -}; - - -var instanceChargeTypes = [{ - text: '预付费', - value: 'PREPAID' -}, { - text: '后付费', - value: 'POSTPAID_BY_HOUR' -}, { - text: 'CDH付费', - value: 'CDHPAID' -}]; -var CVMFilterFields = { - zone: [], - 'project-id': [], - 'host-id': [], - 'vpc-id': [], - 'subnet-id': [], - 'instance-id': [], - 'security-group-id': [], - 'instance-name': [], - 'instance-charge-type': {}, - 'private-ip-address': [], - 'public-ip-address': [], - 'tag-key': [] -}; -var CVMFilterFieldsDescriptor = [{ - key: 'zone', - enDescriptor: 'Zone', - cnDescriptor: '可用区', - link: '', - type: 'dropdownmulti' -}, { - key: 'project-id', - enDescriptor: 'Project ID', - cnDescriptor: '项目ID', - link: 'https://cloud.tencent.com/document/api/378/4400', - type: 'inputNumbermulti' -}, { - key: 'host-id', - enDescriptor: 'CDH ID', - cnDescriptor: 'CDH ID', - link: 'https://cloud.tencent.com/document/product/416/19730', - type: 'inputmulti' -}, { - key: 'vpc-id', - enDescriptor: 'VPC ID', - cnDescriptor: 'VPC ID', - link: '', - type: 'inputmulti' -}, { - key: 'subnet-id', - enDescriptor: 'Subnet ID', - cnDescriptor: '子网ID', - link: '', - type: 'inputmulti' -}, { - key: 'instance-id', - enDescriptor: 'Instance ID', - cnDescriptor: '实例ID', - link: '', - type: 'inputmulti' -}, { - key: 'security-group-id', - enDescriptor: 'Security Group ID', - cnDescriptor: '安全组ID', - link: '', - type: 'inputmulti' -}, { - key: 'instance-name', - enDescriptor: 'Instance Name', - cnDescriptor: '实例名称', - link: '', - type: 'inputmulti' -}, { - key: 'tag-key', - enDescriptor: '标签简', - cnDescriptor: '标签简', - link: '', - type: 'inputmulti' -}, { - key: 'instance-charge-type', - enDescriptor: 'Instance Charge Type', - cnDescriptor: '实例计费模式', - link: '', - type: 'select', - list: instanceChargeTypes -}, { - key: 'private-ip-address', - enDescriptor: 'Private IP Address', - cnDescriptor: '实例主网卡的内网IP', - link: '', - type: 'inputmulti' -}, { - key: 'public-ip-address', - enDescriptor: 'Public IP Address', - cnDescriptor: '实例主网卡的公网IP,包含实例创建时自动分配的IP和实例创建后手动绑定的弹性IP', - link: '', - type: 'inputmulti' -}]; -var CVM_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'InstanceId', - queries: { - Limit: 20, - Offset: 0, - instanceIdsChecked: false, - filtersChecked: false, - InstanceIds: [''], - Filters: __assign({}, CVMFilterFields) - } -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - var params = {}; - - if (!lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(queries)) { - params.Limit = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Limit', 20) || 20; - params.Offset = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Offset', 0) || 0; - - if (queries.instanceIdsChecked) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isArray(queries.InstanceIds)) { - var InstanceIds = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.compact(queries.InstanceIds); - - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(InstanceIds).length > 0) { - params.InstanceIds = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(InstanceIds).slice(0, 100); - } - } - } else if (queries.filtersChecked) { - var Filters_1 = []; - - lodash__WEBPACK_IMPORTED_MODULE_0___default.a.forEach(queries.Filters, function (item, key) { - if (Filters_1.length > 9) { - return; - } - - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isArray(item)) { - item = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.compact(item); - - if (item.length > 0) { - Filters_1.push({ - Name: key, - Values: lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(item).slice(0, 5) - }); - } - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isObject(item)) { - if (!lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', []))) { - Filters_1.push({ - Name: key, - Values: lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', []).slice(0, 5) - }); - } - } - }); - - if (Filters_1.length > 0) { - params.Filters = Filters_1; - } - } - } - - return params; -} - -var CVMInstanceAliasList = ['InstanceId', 'InstanceName', 'PrivateIpAddresses', 'PublicIpAddresses']; -var CVMValidMetricsT = ['CPUUsage', 'CpuLoadavg', 'Cpuloadavg5m', 'Cpuloadavg15m', 'BaseCpuUsage', 'GpuMemTotal', 'GpuMemUsage', 'GpuMemUsed', 'GpuPowDraw', 'GpuPowLimit', 'GpuPowUsage', 'GpuTemp', 'GpuUtil', 'LanOuttraffic', 'LanIntraffic', 'LanOutpkg', 'LanInpkg', 'WanOuttraffic', 'WanIntraffic', 'WanOutpkg', 'WanInpkg', 'AccOuttraffic', 'TcpCurrEstab', 'TimeOffset', 'MemUsed', 'MemUsage', 'CvmDiskUsage', 'BaseCpuUsage', 'VmDiskReadIops']; // const CVMInvalidDemensions = { -// 'vm_uuid': 'InstanceId', -// 'vmUuid': 'InstanceId', -// }; - -var templateQueryIdMap = { - instance: 'InstanceId' -}; - -function isValidMetric(metric) { - var CVMValidMetrics = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.map(CVMValidMetricsT, lodash__WEBPACK_IMPORTED_MODULE_0___default.a.toUpper); - - return lodash__WEBPACK_IMPORTED_MODULE_0___default.a.indexOf(CVMValidMetrics, lodash__WEBPACK_IMPORTED_MODULE_0___default.a.toUpper(metric.MetricName)) !== -1; -} - -function modifyDimensons(metricItem) { - var metricTmp = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.cloneDeep(metricItem); - - metricTmp.Dimensions.forEach(function (item) { - item.Dimensions = ['InstanceId']; - }); - return metricTmp; -} - -/* harmony default export */ __webpack_exports__["default"] = (CVM_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/cynosdb_mysql/datasource.ts": -/*!***********************************************************!*\ - !*** ./datasource/tc_monitor/cynosdb_mysql/datasource.ts ***! - \***********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/cynosdb_mysql/query_def.ts"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - // import { t } from '../../../locale'; - -var CYNOSDBMYSQLDatasource = -/** @class */ -function (_super) { - __extends(CYNOSDBMYSQLDatasource, _super); - - function CYNOSDBMYSQLDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = _query_def__WEBPACK_IMPORTED_MODULE_0__["namespace"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["CYNOSDBMYSQLInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["CYNOSDBInvalidDemensions"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_0__["templateQueryIdMap"]; - _this.checkKeys = _query_def__WEBPACK_IMPORTED_MODULE_0__["checkKeys"]; // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致 - - _this.InstanceReqConfig = { - service: 'cynosdb', - action: 'DescribeInstances', - responseField: 'InstanceSet' - }; - return _this; - } - - CYNOSDBMYSQLDatasource.prototype.getMetrics = function (region) { - if (region === void 0) { - region = 'ap-guangzhou'; - } - - return __awaiter(this, void 0, void 0, function () { - var rawSet; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - return [4 - /*yield*/ - , _super.prototype.getMetrics.call(this, region)]; - - case 1: - rawSet = _a.sent(); - return [2 - /*return*/ - , rawSet.map(function (item) { - return Object(_query_def__WEBPACK_IMPORTED_MODULE_0__["modifyDimensons"])(item); - })]; - } - }); - }); - }; // getRegions() { - // return Promise.resolve(regionSupported.map(({ value }) => ({ value, text: t(value) }))); - // } - - - CYNOSDBMYSQLDatasource.prototype.getRegions = function () { - return this.doRequest({ - url: this.url + '/api', - data: { - Product: 'cynosdbmysql' - } - }, 'api', { - action: 'DescribeRegions' - }).then(function (response) { - return lodash__WEBPACK_IMPORTED_MODULE_1___default.a.filter(lodash__WEBPACK_IMPORTED_MODULE_1___default.a.map(response.RegionSet || [], function (item) { - return { - text: item.RegionName, - value: item.Region, - RegionState: item.RegionState - }; - }), function (item) { - return item.RegionState === 'AVAILABLE'; - }); - }); - }; // 仅对维度组合是InstanceId的指标,其他指标不支持 - - - CYNOSDBMYSQLDatasource.prototype.getDefaultInsObj = function (ins) { - var _a; - - return _a = {}, _a[_query_def__WEBPACK_IMPORTED_MODULE_0__["templateQueryIdMap"].instance] = ins, _a; - }; - - return CYNOSDBMYSQLDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_2__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (CYNOSDBMYSQLDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/cynosdb_mysql/query.ts": -/*!******************************************************!*\ - !*** ./datasource/tc_monitor/cynosdb_mysql/query.ts ***! - \******************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _base_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_base/query */ "./datasource/tc_monitor/_base/query.ts"); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/cynosdb_mysql/query_def.ts"); - - -Object(_base_query__WEBPACK_IMPORTED_MODULE_0__["default"])(_query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorName"], _query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorConfig"]); - -/***/ }), - -/***/ "./datasource/tc_monitor/cynosdb_mysql/query_def.ts": -/*!**********************************************************!*\ - !*** ./datasource/tc_monitor/cynosdb_mysql/query_def.ts ***! - \**********************************************************/ -/*! exports provided: default, cynosdbMysqlFilterFieldsDescriptor, templateQueryIdMap, CYNOSDBMYSQLInstanceAliasList, CYNOSDBInvalidDemensions, namespace, queryEditorName, queryEditorConfig, regionSupported, modifyDimensons, checkKeys, CYNOSDBMYSQLGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cynosdbMysqlFilterFieldsDescriptor", function() { return cynosdbMysqlFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CYNOSDBMYSQLInstanceAliasList", function() { return CYNOSDBMYSQLInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CYNOSDBInvalidDemensions", function() { return CYNOSDBInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorName", function() { return queryEditorName; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorConfig", function() { return queryEditorConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "regionSupported", function() { return regionSupported; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "modifyDimensons", function() { return modifyDimensons; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "checkKeys", function() { return checkKeys; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CYNOSDBMYSQLGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); - - -var namespace = 'QCE/CYNOSDB_MYSQL'; // 按照驼峰方式命名,和SERVICES保持一致,abcDeF会成为angular组件名字 - -var queryEditorName = 'cynosdbMysqlQuery'; -var cynosdbMysqlFilterFields = { - Limit: 20, - Offset: 0, - OrderBy: {}, - OrderByType: {}, - InstanceIds: [], - DbType: {} // Status: '', - -}; -var cynosdbMysqlFilterFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputNumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputNumber', - min: 1, - max: 1000 -}, { - key: 'InstanceIds', - enDescriptor: 'InstanceIds', - cnDescriptor: '实例id列表', - link: '', - type: 'inputMulti' -}, { - key: 'OrderBy', - enDescriptor: 'OrderBy', - cnDescriptor: '排序字段', - link: '', - type: 'select', - list: [{ - text: '创建时间', - value: 'CREATETIME' - }, { - text: '过期时间', - value: 'PERIODENDTIME' - }] -}, { - key: 'OrderByType', - enDescriptor: 'OrderByType', - cnDescriptor: '排序类型', - link: '', - type: 'select', - list: [{ - text: '升序', - value: 'ASC' - }, { - text: '降序', - value: 'DESC' - }] -}, { - key: 'DbType', - enDescriptor: 'DbType', - cnDescriptor: '引擎类型', - link: '', - type: 'select', - list: [{ - text: 'MYSQL', - value: 'MYSQL' - }, { - text: 'POSTGRESQL', - value: 'POSTGRESQL' - }] -} // { -// key: 'Status', -// enDescriptor: 'Status', -// cnDescriptor: '实例状态', -// link: '', -// type: 'input', -// }, -]; // regions for dropdown - -var regionSupported = [{ - value: 'ap-beijing' -}, { - value: 'ap-guangzhou' -}, { - value: 'ap-nanjing' -}, { - value: 'ap-shanghai' -}]; -var queryEditorConfig = { - instanceDocUrl: 'https://cloud.tencent.com/document/api/1003/48334', - namespace: namespace, - fieldDescriptor: cynosdbMysqlFilterFieldsDescriptor -}; -var CYNOSDB_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'InstanceId', - queries: cynosdbMysqlFilterFields -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - return Object(_common_utils__WEBPACK_IMPORTED_MODULE_1__["instanceQueryParamsBaseParse"])(queries, false); -} // 和文件名字一样CYNOSDBMYSQL - - -var CYNOSDBMYSQLInstanceAliasList = ['InstanceId', 'InstanceName']; -var templateQueryIdMap = { - instance: 'InstanceId' -}; -var CYNOSDBInvalidDemensions = { - instanceid: 'InstanceId', - instanceId: 'InstanceId' -}; -var checkKeys = ['instanceId']; - -function modifyDimensons(metricItem) { - var metricTmp = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.cloneDeep(metricItem); - - metricTmp.Dimensions.forEach(function (item) { - item.Dimensions = ['InstanceId']; - }); - return metricTmp; -} - -/* harmony default export */ __webpack_exports__["default"] = (CYNOSDB_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/dc/datasource.ts": -/*!************************************************!*\ - !*** ./datasource/tc_monitor/dc/datasource.ts ***! - \************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/dc/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - -var DCDatasource = -/** @class */ -function (_super) { - __extends(DCDatasource, _super); - - function DCDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = _query_def__WEBPACK_IMPORTED_MODULE_0__["namespace"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["DCInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["DCInvalidDemensions"]; - _this.templateQueryIdMap = { - instance: 'DirectConnectId' - }; - _this.InstanceReqConfig = { - service: 'dc', - action: 'DescribeDirectConnects', - responseField: 'DirectConnectSet' - }; - return _this; - } - - DCDatasource.prototype.getMetrics = function (region) { - if (region === void 0) { - region = 'ap-guangzhou'; - } - - return __awaiter(this, void 0, void 0, function () { - var rawSet; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - return [4 - /*yield*/ - , _super.prototype.getMetrics.call(this, region)]; - - case 1: - rawSet = _a.sent(); - return [2 - /*return*/ - , rawSet.map(function (item) { - return Object(_query_def__WEBPACK_IMPORTED_MODULE_0__["modifyDimensons"])(item); - })]; - } - }); - }); - }; - - return DCDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (DCDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/dc/query.ts": -/*!*******************************************!*\ - !*** ./datasource/tc_monitor/dc/query.ts ***! - \*******************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _base_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_base/query */ "./datasource/tc_monitor/_base/query.ts"); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/dc/query_def.ts"); - - -Object(_base_query__WEBPACK_IMPORTED_MODULE_0__["default"])(_query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorName"], _query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorConfig"]); - -/***/ }), - -/***/ "./datasource/tc_monitor/dc/query_def.ts": -/*!***********************************************!*\ - !*** ./datasource/tc_monitor/dc/query_def.ts ***! - \***********************************************/ -/*! exports provided: default, DCFilterFieldsDescriptor, templateQueryIdMap, DCInstanceAliasList, DCInvalidDemensions, namespace, queryEditorName, queryEditorConfig, modifyDimensons, DCGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DCFilterFieldsDescriptor", function() { return DCFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DCInstanceAliasList", function() { return DCInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DCInvalidDemensions", function() { return DCInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorName", function() { return queryEditorName; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorConfig", function() { return queryEditorConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "modifyDimensons", function() { return modifyDimensons; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DCGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); - - -var namespace = 'QCE/DC'; -var queryEditorName = 'dcQuery'; -var DCFilterFields = { - Limit: 20, - Offset: 0, - DirectConnectIds: [] -}; -var DCFilterFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputNumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputNumber', - min: 1, - max: 100 -}, { - key: 'DirectConnectIds', - enDescriptor: 'DirectConnectIds', - cnDescriptor: '物理专线 ID', - link: '', - type: 'inputMulti' -}]; -var queryEditorConfig = { - instanceDocUrl: 'https://cloud.tencent.com/document/api/216/34826', - namespace: namespace, - fieldDescriptor: DCFilterFieldsDescriptor -}; -var DC_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'DirectConnectId', - queries: DCFilterFields -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - return Object(_common_utils__WEBPACK_IMPORTED_MODULE_1__["instanceQueryParamsBaseParse"])(queries, false); -} - -var DCInstanceAliasList = ['DirectConnectId', 'DirectConnectName']; -var templateQueryIdMap = { - instance: 'DirectConnectId' -}; -var DCInvalidDemensions = { - directConnectId: 'DirectConnectId', - directconnectid: 'DirectConnectId' -}; - -function modifyDimensons(metricItem) { - var metricTmp = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.cloneDeep(metricItem); - - metricTmp.Dimensions.forEach(function (item) { - item.Dimensions = ['directConnectId']; - }); - return metricTmp; -} - -/* harmony default export */ __webpack_exports__["default"] = (DC_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/dcdb/datasource.ts": -/*!**************************************************!*\ - !*** ./datasource/tc_monitor/dcdb/datasource.ts ***! - \**************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/dcdb/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/constants */ "./datasource/common/constants.ts"); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); -/* harmony import */ var _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/datasourceStorage */ "./datasource/common/datasourceStorage.ts"); -/* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../locale */ "./locale/index.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - - - - - - -var DCDatasource = -/** @class */ -function (_super) { - __extends(DCDatasource, _super); - - function DCDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = _query_def__WEBPACK_IMPORTED_MODULE_0__["namespace"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["DCDBInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["DCDBInvalidDemensions"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_0__["templateQueryIdMap"]; // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致 - - _this.InstanceReqConfig = { - service: 'dcdb', - action: 'DescribeDCDBInstances', - responseField: 'Instances' - }; - _this.keyInStorage = _query_def__WEBPACK_IMPORTED_MODULE_0__["keyInStorage"]; - _this.queryMonitorExtraConfg = _query_def__WEBPACK_IMPORTED_MODULE_0__["queryMonitorExtraConfg"]; - _this.extraActionMap = { - DescribeDCDBShards: { - service: 'dcdb', - action: 'DescribeDCDBShards', - responseField: 'Shards', - pickKey: 'ShardInstanceId' - }, - DescribeDCDBInstanceNodeInfo: { - service: 'dcdb', - action: 'DescribeDCDBInstanceNodeInfo', - responseField: 'NodesInfo', - pickKey: 'NodeId' - } - }; - return _this; - } // 重写getRegion, 入参的region用广州 - - - DCDatasource.prototype.getRegions = function () { - return this.doRequest({ - url: this.url + '/dcdb' - }, 'dcdb', { - action: 'DescribeDCDBSaleInfo', - region: 'ap-guangzhou' - }).then(function (response) { - return lodash__WEBPACK_IMPORTED_MODULE_2___default.a.map(response.RegionList || [], function (item) { - return { - text: Object(_locale__WEBPACK_IMPORTED_MODULE_6__["t"])(item.Region), - value: item.Region, - RegionState: item.RegionState - }; - }); - }); - }; - - DCDatasource.prototype.getMetrics = function (region) { - if (region === void 0) { - region = 'ap-guangzhou'; - } - - return __awaiter(this, void 0, void 0, function () { - var rawSet; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - return [4 - /*yield*/ - , _super.prototype.getMetrics.call(this, region)]; - - case 1: - rawSet = _a.sent(); - return [2 - /*return*/ - , lodash__WEBPACK_IMPORTED_MODULE_2___default.a.compact(rawSet.map(function (item) { - return Object(_query_def__WEBPACK_IMPORTED_MODULE_0__["modifyDimensons"])(item); - }))]; - } - }); - }); - }; - - DCDatasource.prototype.getConsumerList = function (params) { - return __awaiter(this, void 0, void 0, function () { - var region, act, payload, _a, service, action, responseField, serviceInfo, rs; - - var _this = this; - - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - region = params.region, act = params.action, payload = params.payload; - _a = this.extraActionMap[act], service = _a.service, action = _a.action, responseField = _a.responseField; - serviceInfo = Object(_common_constants__WEBPACK_IMPORTED_MODULE_3__["GetServiceAPIInfo"])(region, service); - return [4 - /*yield*/ - , Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["fetchAllFactory"])(function (data) { - return _this.doRequest({ - url: _this.url + serviceInfo.path, - data: data - }, serviceInfo.service, { - region: region, - action: action - }); - }, payload, responseField)]; - - case 1: - rs = _b.sent(); - return [2 - /*return*/ - , rs[0]]; - } - }); - }); - }; - - DCDatasource.prototype.fetchMetricData = function (action, region, instance, query) { - return __awaiter(this, void 0, void 0, function () { - var payload, rs, pickKey_1, result; - - var _this = this; - - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - payload = { - InstanceId: instance[this.templateQueryIdMap.instance], - Limit: 100 - }; - if (!(Object.keys(this.extraActionMap).indexOf(action) !== -1)) return [3 - /*break*/ - , 3]; - return [4 - /*yield*/ - , this.getConsumerList({ - region: region, - action: action, - payload: payload - })]; - - case 1: - rs = _a.sent(); - pickKey_1 = this.extraActionMap[action].pickKey; - result = rs.map(function (o) { - o._InstanceAliasValue = o[_this.templateQueryIdMap[pickKey_1]]; - return { - text: o[_this.templateQueryIdMap[pickKey_1]], - value: o[_this.templateQueryIdMap[pickKey_1]] - }; - }); - return [4 - /*yield*/ - , _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_5__["default"].setExtraStorage(this.service, this.keyInStorage[pickKey_1], rs)]; - - case 2: - _a.sent(); - - return [2 - /*return*/ - , result]; - - case 3: - return [2 - /*return*/ - , []]; - } - }); - }); - }; - - return DCDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (DCDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/dcdb/query.ts": -/*!*********************************************!*\ - !*** ./datasource/tc_monitor/dcdb/query.ts ***! - \*********************************************/ -/*! exports provided: QueryCtrl, sQuery */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueryCtrl", function() { return QueryCtrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sQuery", function() { return sQuery; }); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! grafana/app/core/core_module */ "grafana/app/core/core_module"); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/dcdb/query_def.ts"); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/constants */ "./datasource/common/constants.ts"); -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - -var ExtraFields = [{ - label: 'nodeid', - field: 'NodeId', - action: 'DescribeDCDBInstanceNodeInfo' -}, { - label: 'shardid', - field: 'ShardId', - action: 'DescribeDCDBShards' -}]; -var dropdownTextConfig = { - DescribeDCDBInstanceNodeInfo: 'NodeId', - DescribeDCDBShards: 'ShardInstanceId' -}; - -var QueryCtrl = -/** @class */ -function () { - QueryCtrl.$inject = ["$scope", "$rootScope"]; - - /** @ngInject */ - function QueryCtrl($scope, $rootScope) { - var _this = this; - - $scope.init = function () { - $scope.DCDBFilterFieldsDescriptor = _query_def__WEBPACK_IMPORTED_MODULE_1__["DCDBFilterFieldsDescriptor"]; - $scope.ExtraFields = ExtraFields; - $scope.namespace = _query_def__WEBPACK_IMPORTED_MODULE_1__["namespace"]; - }; - - $scope.getInstanceId = function () { - var instance = $scope.target.instance; - var service = Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["GetServiceFromNamespace"])($scope.namespace); - instance = $scope.datasource.getServiceFn(service, 'getVariable')(instance); - - if (!instance) { - return ''; - } - - try { - instance = JSON.parse(instance)[_query_def__WEBPACK_IMPORTED_MODULE_1__["templateQueryIdMap"].instance]; - } catch (error) {// console.log(); - } - - return instance; - }; - - $scope.getExtraFields = function () { - return ExtraFields.filter(function (item) { - var _a, _b; - - return item.field in ((_a = $scope.dims) !== null && _a !== void 0 ? _a : {}) || item.label in ((_b = $scope.dims) !== null && _b !== void 0 ? _b : {}); - }); - }; - - $scope.getExtraDropdown = function (target, action) { - return __awaiter(_this, void 0, void 0, function () { - var service, region, instanceId, payload, rs, result; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - service = Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["GetServiceFromNamespace"])($scope.namespace); - region = $scope.datasource.getServiceFn(service, 'getVariable')(target.region); - instanceId = $scope.getInstanceId(); - payload = { - InstanceId: instanceId, - Limit: 100 - }; - return [4 - /*yield*/ - , $scope.datasource.getServiceFn(service, 'getConsumerList')({ - region: region, - action: action, - payload: payload - })]; - - case 1: - rs = _a.sent(); - result = rs.map(function (o) { - o._InstanceAliasValue = o[_query_def__WEBPACK_IMPORTED_MODULE_1__["templateQueryIdMap"][dropdownTextConfig[action]]]; - return { - text: o[_query_def__WEBPACK_IMPORTED_MODULE_1__["templateQueryIdMap"][dropdownTextConfig[action]]], - value: JSON.stringify(o) - }; - }); - return [2 - /*return*/ - , result]; - } - }); - }); - }; - - $scope.init(); - } - - return QueryCtrl; -}(); - - -var template = "\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n"; -function sQuery() { - return { - template: template, - controller: QueryCtrl, - restrict: 'E', - scope: { - target: '=', - showDetail: '=', - region: '=', - datasource: '=', - getDropdownOptions: '&', - onChange: '&', - onRefresh: '&', - dims: '=' - } - }; -} -grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default.a.directive(_query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorName"], sQuery); - -/***/ }), - -/***/ "./datasource/tc_monitor/dcdb/query_def.ts": -/*!*************************************************!*\ - !*** ./datasource/tc_monitor/dcdb/query_def.ts ***! - \*************************************************/ -/*! exports provided: default, DCDBFilterFieldsDescriptor, templateQueryIdMap, DCDBInstanceAliasList, DCDBInvalidDemensions, namespace, queryEditorName, queryEditorConfig, regionSupported, keyInStorage, modifyDimensons, queryMonitorExtraConfg, DCDBGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DCDBFilterFieldsDescriptor", function() { return DCDBFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DCDBInstanceAliasList", function() { return DCDBInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DCDBInvalidDemensions", function() { return DCDBInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorName", function() { return queryEditorName; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorConfig", function() { return queryEditorConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "regionSupported", function() { return regionSupported; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keyInStorage", function() { return keyInStorage; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "modifyDimensons", function() { return modifyDimensons; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryMonitorExtraConfg", function() { return queryMonitorExtraConfg; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DCDBGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); - - -var namespace = 'QCE/TDMYSQL'; // 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称 - -var queryEditorName = 'dcdbQuery'; -var DCDBInvalidDemensions = { - nodeid: 'NodeId', - instanceid: 'InstanceId', - shardid: 'ShardInstanceId', - ShardId: 'ShardInstanceId' -}; // 需和文件名对应 - -var DCDBInstanceAliasList = ['InstanceId', 'InstanceName']; -var templateQueryIdMap = { - instance: 'InstanceId', - NodeId: 'NodeId', - ShardInstanceId: 'ShardInstanceId' -}; // select类型需要注意是{},multi后缀是[],dropdown是'' - -var DCDBFilterFields = { - Limit: 20, - Offset: 0, - InstanceIds: [], - SearchName: '', - SearchKey: '', - ProjectIds: [], - // IsFilterVpc - VpcId: '', - SubnetId: '', - OrderBy: {}, - OrderByType: {}, - // IsFilterExcluster: {}, - ExclusterType: {}, - ExclusterIds: [], - FilterInstanceType: {} -}; -var DCDBFilterFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputNumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputNumber', - min: 1, - max: 100 -}, { - key: 'InstanceIds', - enDescriptor: 'InstanceIds', - cnDescriptor: '实例 ID 查询', - link: '', - type: 'inputMulti' -}, { - key: 'SearchName', - enDescriptor: 'SearchName', - cnDescriptor: '搜索的字段名,当前支持的值有:instancename、vip、all', - link: '', - type: 'input' -}, { - key: 'SearchKey', - enDescriptor: 'SearchKey', - cnDescriptor: '搜索的关键字', - link: '', - type: 'input' -}, { - key: 'ProjectIds', - enDescriptor: 'ProjectIds', - cnDescriptor: '按项目 ID 查询', - link: '', - type: 'inputNumberMulti' -}, { - key: 'VpcId', - enDescriptor: 'VpcId', - cnDescriptor: '私有网络 ID', - link: '', - type: 'input' -}, { - key: 'SubnetId', - enDescriptor: 'SubnetId', - cnDescriptor: '私有网络的子网 ID', - link: '', - type: 'input' -}, { - key: 'OrderBy', - enDescriptor: 'OrderBy', - cnDescriptor: '排序字段', - link: '', - type: 'select', - list: [{ - text: 'projectId', - value: 'projectId' - }, { - text: 'createtime', - value: 'createtime' - }, { - text: 'instancename', - value: 'instancename' - }] -}, { - key: 'OrderByType', - enDescriptor: 'OrderByType', - cnDescriptor: '私有网络 ID', - link: '', - type: 'select', - list: [{ - text: 'desc', - value: 'desc' - }, { - text: 'asc', - value: 'asc' - }] -}, { - key: 'ExclusterType', - enDescriptor: 'ExclusterType', - cnDescriptor: '集群类型', - link: '', - type: 'select', - list: [{ - text: '非独享集群', - value: 1 - }, { - text: '独享集群', - value: 2 - }, { - text: '全部', - value: 0 - }, { - text: 'asc', - value: 'asc' - }] -}, { - key: 'ExclusterIds', - enDescriptor: 'ExclusterIds', - cnDescriptor: '独享集群ID', - link: '', - type: 'inputMulti' -}, { - key: 'FilterInstanceType', - enDescriptor: 'FilterInstanceType', - cnDescriptor: '实例类型过滤', - link: '', - type: 'select', - multiple: true, - list: [{ - text: '独享实例', - value: 1 - }, { - text: '主实例', - value: 2 - }, { - text: '灾备实例', - value: 3 - }] -}]; // 各产品实例列表detail配置 - -var queryEditorConfig = { - instanceDocUrl: 'https://cloud.tencent.com/document/api/557/16140', - namespace: namespace, - fieldDescriptor: DCDBFilterFieldsDescriptor -}; -var DCDB_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'InstanceId', - ShardId: '', - NodeId: '', - queries: DCDBFilterFields -}; -var modifyMetricConf = { - shardid: 'ShardId', - instanceid: 'InstanceId', - nodeid: 'NodeId' -}; - -function modifyDimensons(metricItem) { - var metricTmp = Object(lodash__WEBPACK_IMPORTED_MODULE_0__["cloneDeep"])(metricItem); - metricTmp.Dimensions.forEach(function (item) { - item.Dimensions = item.Dimensions.map(function (v) { - return modifyMetricConf[v] || v; - }); - }); - return metricTmp; -} - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - var params = Object(_common_utils__WEBPACK_IMPORTED_MODULE_1__["instanceQueryParamsBaseParse"])(queries, false); // 特殊处理 - - params.IsFilterVpc = false; - params.IsFilterExcluster = false; - if (params.VpcId || params.SubnetId) params.IsFilterVpc = true; - if (params.ExclusterType) params.IsFilterExcluster = true; - if (Object(lodash__WEBPACK_IMPORTED_MODULE_0__["isArray"])(params.FilterInstanceType)) params.FilterInstanceType = params.FilterInstanceType.join(','); - return params; -} // 需要缓存到storage的内容的key列表 - - -var keyInStorage = { - NodeId: 'NodeId', - ShardInstanceId: 'ShardId' -}; -/* -如果有InstanceId额外的维度,原则上都需要传入此map结构配置 -key的含义: - 经过InvalidDemensions处理后的string。topicId =》TopicId。 - 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId -value的含义: - 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、 - 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。 - 默认取通过InvalidDemsion处理后的key - 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。 - 即:templateQueryIdMap中内容。 - 联合上面2的内容筛选出原始sourceMap -*/ - -var queryMonitorExtraConfg = { - NodeId: { - dim_KeyInStorage: keyInStorage.NodeId, - dim_KeyInTarget: 'NodeId', - dim_KeyInMap: templateQueryIdMap.NodeId - }, - ShardInstanceId: { - dim_KeyInStorage: keyInStorage.ShardInstanceId, - dim_KeyInTarget: 'ShardId', - dim_KeyInMap: templateQueryIdMap.ShardInstanceId - } -}; // 和其他产品的展示保持一致 - -var regionSupported = [{ - text: '华北地区(北京)', - value: 'ap-beijing' -}, { - text: '西南地区(成都)', - value: 'ap-chengdu' -}, { - text: '西南地区(重庆)', - value: 'ap-chongqing' -}, { - text: '华南地区(广州)', - value: 'ap-guangzhou' -}, { - text: '港澳台地区(中国香港)', - value: 'ap-hongkong' -}, { - text: '亚太南部(孟买)', - value: 'ap-mumbai' -}, { - text: '华东地区(南京)', - value: 'ap-nanjing' -}, { - text: '华东地区(上海)', - value: 'ap-shanghai' -}, { - text: '华东地区(上海金融)', - value: 'ap-shanghai-fsi' -}, { - text: '华南地区(深圳金融)', - value: 'ap-shenzhen-fsi' -}, { - text: '亚太东南(新加坡)', - value: 'ap-singapore' -}, { - text: '亚太东北(东京)', - value: 'ap-tokyo' -}, { - text: '欧洲地区(法兰克福)', - value: 'eu-frankfurt' -}, { - text: '美国东部(弗吉尼亚)', - value: 'na-ashburn' -}, { - text: '美国西部(硅谷)', - value: 'na-siliconvalley' -}, { - text: '北美地区(多伦多)', - value: 'na-toronto' -}]; -/* harmony default export */ __webpack_exports__["default"] = (DCDB_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/dcg/datasource.ts": -/*!*************************************************!*\ - !*** ./datasource/tc_monitor/dcg/datasource.ts ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/dcg/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - - - - -var DCDatasource = -/** @class */ -function (_super) { - __extends(DCDatasource, _super); - - function DCDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = _query_def__WEBPACK_IMPORTED_MODULE_0__["namespace"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["DCGInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["DCGInvalidDemensions"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_0__["templateQueryIdMap"]; // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致 - - _this.InstanceReqConfig = { - service: 'vpc', - action: 'DescribeDirectConnectGateways', - responseField: 'DirectConnectGatewaySet' - }; - return _this; - } - - return DCDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (DCDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/dcg/query.ts": -/*!********************************************!*\ - !*** ./datasource/tc_monitor/dcg/query.ts ***! - \********************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _base_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_base/query */ "./datasource/tc_monitor/_base/query.ts"); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/dcg/query_def.ts"); - - -Object(_base_query__WEBPACK_IMPORTED_MODULE_0__["default"])(_query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorName"], _query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorConfig"]); - -/***/ }), - -/***/ "./datasource/tc_monitor/dcg/query_def.ts": -/*!************************************************!*\ - !*** ./datasource/tc_monitor/dcg/query_def.ts ***! - \************************************************/ -/*! exports provided: default, DCGFilterFieldsDescriptor, templateQueryIdMap, DCGInstanceAliasList, DCGInvalidDemensions, namespace, queryEditorName, queryEditorConfig, DCGGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DCGFilterFieldsDescriptor", function() { return DCGFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DCGInstanceAliasList", function() { return DCGInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DCGInvalidDemensions", function() { return DCGInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorName", function() { return queryEditorName; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorConfig", function() { return queryEditorConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DCGGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); - -var namespace = 'QCE/DCG'; -var queryEditorName = 'dcgQuery'; -var DCGInvalidDemensions = { - directConnectGatewayId: 'DirectConnectGatewayId' -}; -var DCGInstanceAliasList = ['DirectConnectGatewayId', 'DirectConnectGatewayName']; -var templateQueryIdMap = { - instance: 'DirectConnectGatewayId' -}; // select类型需要注意是{},multi后缀是[] - -var DCGFilterFields = { - Limit: 20, - Offset: 0, - 'direct-connect-gateway-id': [], - 'direct-connect-gateway-name': [], - 'direct-connect-gateway-ip': [], - 'gateway-type': {}, - 'network-type': {}, - 'ccn-id': [], - 'vpc-id': [] -}; -var DCGFilterFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputNumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputNumber', - min: 1, - max: 100 -}, { - key: 'direct-connect-gateway-id', - enDescriptor: 'direct-connect-gateway-id', - cnDescriptor: '专线网关唯一ID', - link: '', - type: 'inputMulti' -}, { - key: 'direct-connect-gateway-name', - enDescriptor: 'direct-connect-gateway-name', - cnDescriptor: '专线网关名称', - link: '', - type: 'inputMulti' -}, { - key: 'direct-connect-gateway-ip', - enDescriptor: 'direct-connect-gateway-ip', - cnDescriptor: '专线网关IP', - link: '', - type: 'inputMulti' -}, { - key: 'gateway-type', - enDescriptor: 'gateway-type', - cnDescriptor: '网关类型', - link: '', - type: 'select', - multiple: true, - list: [{ - text: '普通型', - value: 'NORMAL' - }, { - text: 'NAT型', - value: 'NAT' - }] -}, { - key: 'network-type', - enDescriptor: 'network-type', - cnDescriptor: '网络类型', - link: '', - type: 'select', - multiple: true, - list: [{ - text: '私有网络类型', - value: 'VPC' - }, { - text: '云联网类型', - value: 'CCN' - }] -}, { - key: 'ccn-id', - enDescriptor: 'ccn-id', - cnDescriptor: '专线网关所在云联网ID', - link: '', - type: 'inputMulti' -}, { - key: 'vpc-id', - enDescriptor: 'vpc-id', - cnDescriptor: '专线网关所在私有网络ID', - link: '', - type: 'inputMulti' -}]; // 各产品实例列表detail配置 - -var queryEditorConfig = { - instanceDocUrl: 'https://cloud.tencent.com/document/api/215/30644', - namespace: namespace, - fieldDescriptor: DCGFilterFieldsDescriptor -}; -var DCG_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'DirectConnectGatewayId', - queries: DCGFilterFields -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - return Object(_common_utils__WEBPACK_IMPORTED_MODULE_0__["instanceQueryParamsBaseParse"])(queries, true); -} - -/* harmony default export */ __webpack_exports__["default"] = (DCG_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/dcx/datasource.ts": -/*!*************************************************!*\ - !*** ./datasource/tc_monitor/dcx/datasource.ts ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/dcx/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - -var DCXDatasource = -/** @class */ -function (_super) { - __extends(DCXDatasource, _super); - - function DCXDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = _query_def__WEBPACK_IMPORTED_MODULE_0__["namespace"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["DCXInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["DCXInvalidDemensions"]; - _this.templateQueryIdMap = { - instance: 'DirectConnectTunnelId' - }; - _this.InstanceReqConfig = { - service: 'dc', - action: 'DescribeDirectConnectTunnels', - responseField: 'DirectConnectTunnelSet' - }; - return _this; - } - - DCXDatasource.prototype.getMetrics = function (region) { - if (region === void 0) { - region = 'ap-guangzhou'; - } - - return __awaiter(this, void 0, void 0, function () { - var rawSet; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - return [4 - /*yield*/ - , _super.prototype.getMetrics.call(this, region)]; - - case 1: - rawSet = _a.sent(); - return [2 - /*return*/ - , rawSet.map(function (item) { - return Object(_query_def__WEBPACK_IMPORTED_MODULE_0__["modifyDimensons"])(item); - })]; - } - }); - }); - }; - - return DCXDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (DCXDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/dcx/query.ts": -/*!********************************************!*\ - !*** ./datasource/tc_monitor/dcx/query.ts ***! - \********************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _base_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_base/query */ "./datasource/tc_monitor/_base/query.ts"); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/dcx/query_def.ts"); - - -Object(_base_query__WEBPACK_IMPORTED_MODULE_0__["default"])(_query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorName"], _query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorConfig"]); - -/***/ }), - -/***/ "./datasource/tc_monitor/dcx/query_def.ts": -/*!************************************************!*\ - !*** ./datasource/tc_monitor/dcx/query_def.ts ***! - \************************************************/ -/*! exports provided: default, DCXFilterFieldsDescriptor, templateQueryIdMap, DCXInstanceAliasList, DCXInvalidDemensions, namespace, queryEditorName, queryEditorConfig, modifyDimensons, DCXGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DCXFilterFieldsDescriptor", function() { return DCXFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DCXInstanceAliasList", function() { return DCXInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DCXInvalidDemensions", function() { return DCXInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorName", function() { return queryEditorName; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorConfig", function() { return queryEditorConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "modifyDimensons", function() { return modifyDimensons; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DCXGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); -var __assign = undefined && undefined.__assign || function () { - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - } - - return t; - }; - - return __assign.apply(this, arguments); -}; - - - -var namespace = 'QCE/DCX'; -var queryEditorName = 'dcxQuery'; -var DCXFilterFields = { - 'direct-connect-tunnel-name': [], - 'direct-connect-tunnel-id': [], - 'direct-connect-id': [] -}; -var DCXFilterFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputNumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputNumber', - min: 1, - max: 100 -}, { - key: 'direct-connect-tunnel-name', - enDescriptor: 'direct-connect-tunnel-name', - cnDescriptor: '专用通道名称', - link: '', - type: 'inputMulti' -}, { - key: 'direct-connect-tunnel-id', - enDescriptor: 'direct-connect-tunnel-id', - cnDescriptor: '专用通道实例ID', - link: '', - type: 'inputMulti' -}, { - key: 'direct-connect-id', - enDescriptor: 'direct-connect-id', - cnDescriptor: '物理专线实例ID', - link: '', - type: 'inputMulti' -}]; -var queryEditorConfig = { - instanceDocUrl: 'https://cloud.tencent.com/document/api/216/19819', - namespace: namespace, - fieldDescriptor: DCXFilterFieldsDescriptor -}; -var DCX_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'DirectConnectTunnelId', - queries: __assign({ - Limit: 20, - Offset: 0 - }, DCXFilterFields) -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - return Object(_common_utils__WEBPACK_IMPORTED_MODULE_1__["instanceQueryParamsBaseParse"])(queries, true); -} - -var DCXInstanceAliasList = ['DirectConnectTunnelId', 'DirectConnectTunnelName']; -var templateQueryIdMap = { - instance: 'DirectConnectTunnelId' -}; -var DCXInvalidDemensions = { - directconnectconnid: 'DirectConnectTunnelId', - directConnectConnId: 'DirectConnectTunnelId' -}; - -function modifyDimensons(metricItem) { - var metricTmp = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.cloneDeep(metricItem); - - metricTmp.Dimensions.forEach(function (item) { - item.Dimensions = ['directConnectConnId']; - }); - return metricTmp; -} - -/* harmony default export */ __webpack_exports__["default"] = (DCX_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/ecdn/datasource.ts": -/*!**************************************************!*\ - !*** ./datasource/tc_monitor/ecdn/datasource.ts ***! - \**************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/ecdn/query_def.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - -var ECDNDatasource = -/** @class */ -function (_super) { - __extends(ECDNDatasource, _super); - - function ECDNDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = _query_def__WEBPACK_IMPORTED_MODULE_1__["namespace"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_1__["ECDNInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_1__["ECDNInvalidDemensions"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_1__["templateQueryIdMap"]; - _this.InstanceReqConfig = { - service: 'ecdn', - action: 'DescribeDomains', - responseField: 'Domains' - }; - return _this; - } - - ECDNDatasource.prototype.getMetrics = function (region) { - if (region === void 0) { - region = 'ap-guangzhou'; - } - - return __awaiter(this, void 0, void 0, function () { - var rawSet; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - return [4 - /*yield*/ - , _super.prototype.getMetrics.call(this, region)]; - - case 1: - rawSet = _a.sent(); - return [2 - /*return*/ - , rawSet.map(function (item) { - return Object(_query_def__WEBPACK_IMPORTED_MODULE_1__["modifyDimensons"])(item); - })]; - } - }); - }); - }; - - return ECDNDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_0__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (ECDNDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/ecdn/query.ts": -/*!*********************************************!*\ - !*** ./datasource/tc_monitor/ecdn/query.ts ***! - \*********************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _base_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_base/query */ "./datasource/tc_monitor/_base/query.ts"); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/ecdn/query_def.ts"); - - -Object(_base_query__WEBPACK_IMPORTED_MODULE_0__["default"])(_query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorName"], _query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorConfig"]); - -/***/ }), - -/***/ "./datasource/tc_monitor/ecdn/query_def.ts": -/*!*************************************************!*\ - !*** ./datasource/tc_monitor/ecdn/query_def.ts ***! - \*************************************************/ -/*! exports provided: default, ECDNFilterFieldsDescriptor, templateQueryIdMap, ECDNInstanceAliasList, ECDNInvalidDemensions, namespace, queryEditorName, queryEditorConfig, modifyDimensons, ECDNGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ECDNFilterFieldsDescriptor", function() { return ECDNFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ECDNInstanceAliasList", function() { return ECDNInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ECDNInvalidDemensions", function() { return ECDNInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorName", function() { return queryEditorName; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorConfig", function() { return queryEditorConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "modifyDimensons", function() { return modifyDimensons; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ECDNGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -var __assign = undefined && undefined.__assign || function () { - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - } - - return t; - }; - - return __assign.apply(this, arguments); -}; - - -var namespace = 'QCE/DSA'; -var queryEditorName = 'ecdnQuery'; -var ECDNInstanceAliasList = ['Domain']; -var templateQueryIdMap = { - instance: 'Domain' -}; -var ECDNInvalidDemensions = { - domain: 'Domain', - projectid: 'ProjectId' -}; -var ECDN_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'Domain', - queries: { - Limit: 100, - Offset: 0, - origin: [], - domain: [], - resourceId: [], - status: [], - disable: [], - projectId: [], - fullUrlCache: [], - https: [], - originPullProtocol: [], - area: [], - tagKey: [] - } -}; -var ECDNFilterFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputNumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputNumber', - min: 1, - max: 100 -}, { - key: 'origin', - enDescriptor: 'Origin', - cnDescriptor: '主源站', - link: '', - type: 'inputMulti' -}, { - key: 'domain', - enDescriptor: 'Domain', - cnDescriptor: '域名', - link: '', - type: 'inputMulti' -}, { - key: 'resourceId', - enDescriptor: 'ResourceId', - cnDescriptor: '域名id', - link: '', - type: 'inputMulti' -}, { - key: 'status', - enDescriptor: 'Status', - cnDescriptor: '域名状态', - link: '', - type: 'select', - list: [{ - text: 'online', - value: 'online' - }, { - text: 'offline', - value: 'offline' - }, { - text: 'processing', - value: 'processing' - }] -}, { - key: 'disable', - enDescriptor: 'Disable', - cnDescriptor: '域名封禁状态', - link: '', - type: 'select', - list: [{ - text: 'normal', - value: 'normal' - }, { - text: 'unlicensed', - value: 'unlicensed' - }] -}, { - key: 'projectId', - enDescriptor: 'ProjectId', - cnDescriptor: '项目ID', - link: '', - type: 'inputMulti' -}, { - key: 'fullUrlCache', - enDescriptor: 'FullUrlCache', - cnDescriptor: '全路径缓存', - link: '', - type: 'select', - list: [{ - text: 'on', - value: 'on' - }, { - text: 'off', - value: 'off' - }] -}, { - key: 'https', - enDescriptor: 'Https', - cnDescriptor: '是否配置https', - link: '', - type: 'select', - list: [{ - text: 'on', - value: 'on' - }, { - text: 'off', - value: 'off' - }, { - text: 'processing', - value: 'processing' - }] -}, { - key: 'originPullProtocol', - enDescriptor: 'OriginPullProtocol', - cnDescriptor: '回源协议类型', - link: '', - type: 'select', - list: [{ - text: 'http', - value: 'http' - }, { - text: 'https', - value: 'https' - }, { - text: 'follow', - value: 'follow' - }] -}, { - key: 'area', - enDescriptor: 'Area', - cnDescriptor: '加速区域', - link: '', - type: 'select', - list: [{ - text: 'mainland', - value: 'mainland' - }, { - text: 'overseas', - value: 'overseas' - }, { - text: 'global', - value: 'global' - }] -}, { - key: 'tagKey', - enDescriptor: 'TagKey', - cnDescriptor: '标签键', - link: '', - type: 'inputMulti' -}]; -var queryEditorConfig = { - instanceDocUrl: 'https://cloud.tencent.com/document/api/570/42462', - namespace: namespace, - fieldDescriptor: ECDNFilterFieldsDescriptor -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - var params = {}; - - if (!Object(lodash__WEBPACK_IMPORTED_MODULE_0__["isEmpty"])(queries)) { - params.Limit = Object(lodash__WEBPACK_IMPORTED_MODULE_0__["get"])(queries, 'Limit', 20) || 20; - params.Offset = Object(lodash__WEBPACK_IMPORTED_MODULE_0__["get"])(queries, 'Offset', 0) || 0; - - var _queries = Object(lodash__WEBPACK_IMPORTED_MODULE_0__["omit"])(queries, ['Offset', 'Limit']); - - var Filters_1 = []; - Object(lodash__WEBPACK_IMPORTED_MODULE_0__["forEach"])(_queries, function (item, key) { - if (Object(lodash__WEBPACK_IMPORTED_MODULE_0__["isArray"])(item)) { - item = Object(lodash__WEBPACK_IMPORTED_MODULE_0__["compact"])(item); - - if (item.length > 0) { - Filters_1.push({ - Name: key, - Value: Object(lodash__WEBPACK_IMPORTED_MODULE_0__["uniq"])(item).slice(0, 5) - }); - } - } else if (Object(lodash__WEBPACK_IMPORTED_MODULE_0__["isObject"])(item)) { - if (!Object(lodash__WEBPACK_IMPORTED_MODULE_0__["isEmpty"])(Object(lodash__WEBPACK_IMPORTED_MODULE_0__["get"])(item, 'value', []))) { - Filters_1.push({ - Name: key, - Value: [Object(lodash__WEBPACK_IMPORTED_MODULE_0__["get"])(item, 'value', [])].slice(0, 5) - }); - } - } - }); - - if (Filters_1.length > 0) { - params.Filters = Filters_1.map(function (item) { - if (item.Name === 'domain') { - return __assign(__assign({}, item), { - Fuzzy: true - }); - } - - return item; - }); - return params; - } - } - - return params; -} - -function modifyDimensons(metricItem) { - var metricTmp = Object(lodash__WEBPACK_IMPORTED_MODULE_0__["cloneDeep"])(metricItem); - metricTmp.Dimensions.forEach(function (item) { - item.Dimensions = ['domain', 'projectid']; - }); - return metricTmp; -} - -/* harmony default export */ __webpack_exports__["default"] = (ECDN_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/ecm/datasource.ts": -/*!*************************************************!*\ - !*** ./datasource/tc_monitor/ecm/datasource.ts ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/ecm/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __assign = undefined && undefined.__assign || function () { - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - } - - return t; - }; - - return __assign.apply(this, arguments); -}; - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - -var DCDatasource = -/** @class */ -function (_super) { - __extends(DCDatasource, _super); - - function DCDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = _query_def__WEBPACK_IMPORTED_MODULE_0__["namespace"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["ECMInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["ECMInvalidDemensions"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_0__["templateQueryIdMap"]; // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致 - - _this.InstanceReqConfig = { - service: 'ecm', - action: 'DescribeInstances', - responseField: 'InstanceSet' - }; - _this.MetricReqConfig = { - resultFilter: _query_def__WEBPACK_IMPORTED_MODULE_0__["modifyDimensons"] - }; - return _this; - } - - DCDatasource.prototype.metricFindQuery = function (query, regex) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , _super.prototype.metricFindQuery.call(this, __assign(__assign({}, query), { - region: 'ap-guangzhou' - }), regex)]; - }); - }); - }; - - return DCDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (DCDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/ecm/query.ts": -/*!********************************************!*\ - !*** ./datasource/tc_monitor/ecm/query.ts ***! - \********************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _base_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_base/query */ "./datasource/tc_monitor/_base/query.ts"); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/ecm/query_def.ts"); - - -Object(_base_query__WEBPACK_IMPORTED_MODULE_0__["default"])(_query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorName"], _query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorConfig"]); - -/***/ }), - -/***/ "./datasource/tc_monitor/ecm/query_def.ts": -/*!************************************************!*\ - !*** ./datasource/tc_monitor/ecm/query_def.ts ***! - \************************************************/ -/*! exports provided: default, ECMFilterFieldsDescriptor, templateQueryIdMap, ECMInstanceAliasList, ECMInvalidDemensions, namespace, queryEditorName, queryEditorConfig, modifyDimensons, ECMGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ECMFilterFieldsDescriptor", function() { return ECMFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ECMInstanceAliasList", function() { return ECMInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ECMInvalidDemensions", function() { return ECMInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorName", function() { return queryEditorName; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorConfig", function() { return queryEditorConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "modifyDimensons", function() { return modifyDimensons; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ECMGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); - - -var namespace = 'QCE/ECM'; -var queryEditorName = 'ecmQuery'; -var ECMInvalidDemensions = { - // diskId: 'InstanceId', - uuid: 'UUID' // unInstanceId: 'InstanceId', - -}; -var ECMInstanceAliasList = ['InstanceId', 'InstanceName']; -var templateQueryIdMap = { - instance: 'InstanceId' -}; // select类型需要注意是{},multi后缀是[] - -var ECMFilterFields = { - Limit: 20, - Offset: 0, - zone: [], - 'zone-name': [], - 'module-id': [], - 'module-name': [], - 'instance-id': [], - 'instance-name': [], - 'ip-address': [], - 'instance-uuid': [], - 'instance-state': {}, - 'internet-service-provider': [], - 'instance-family': [], - 'image-id': [], - 'vpc-id': [], - 'subnet-id': [] -}; -var ECMFilterFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputNumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputNumber', - min: 1, - max: 100 -}, { - key: 'zone', - enDescriptor: 'zone', - cnDescriptor: '可用区英文标识', - link: '', - type: 'dropdownMulti' -}, { - key: 'zone-name', - enDescriptor: 'zone-name', - cnDescriptor: '排列顺序', - link: '', - type: 'inputMulti' -}, { - key: 'module-id', - enDescriptor: 'module-id', - cnDescriptor: '模块ID', - link: '', - type: 'inputMulti' -}, { - key: 'module-name', - enDescriptor: 'module-name', - cnDescriptor: '模块名称', - link: '', - type: 'inputMulti' -}, { - key: 'instance-id', - enDescriptor: 'instance-id', - cnDescriptor: '实例ID', - link: '', - type: 'inputMulti' -}, { - key: 'instance-name', - enDescriptor: 'instance-name', - cnDescriptor: '实例名称', - link: '', - type: 'inputMulti' -}, { - key: 'ip-address', - enDescriptor: 'ip-address', - cnDescriptor: '内网/公网IP', - link: '', - type: 'inputMulti' -}, { - key: 'instance-uuid', - enDescriptor: 'instance-uuid', - cnDescriptor: '实例uuid', - link: '', - type: 'inputMulti' -}, { - key: 'instance-state', - enDescriptor: 'instance-state', - cnDescriptor: '实例状态', - link: '', - type: 'select', - multiple: true, - list: [{ - text: '创建中', - value: 'PENDING' - }, { - text: '创建失败', - value: 'LAUNCH_FAILED' - }, { - text: '运行中', - value: 'RUNNING' - }, { - text: '关机', - value: 'STOPPED' - }, { - text: '开机中', - value: 'STARTING' - }, { - text: '关机中', - value: 'STOPPING' - }, { - text: '重启中', - value: 'REBOOTING' - }, { - text: '停止待销毁', - value: 'SHUTDOWN' - }, { - text: '销毁中', - value: 'TERMINATING' - }] -}, { - key: 'internet-service-provider', - enDescriptor: 'internet-service-provider', - cnDescriptor: '公网IP所属的运营商', - link: '', - type: 'inputMulti' -}, { - key: 'instance-family', - enDescriptor: 'instance-family', - cnDescriptor: '机型family', - link: '', - type: 'inputMulti' -}, { - key: 'image-id', - enDescriptor: 'image-id', - cnDescriptor: '镜像ID', - link: '', - type: 'inputMulti' -}, { - key: 'vpc-id', - enDescriptor: 'vpc-id', - cnDescriptor: '实例的vpc id', - link: '', - type: 'inputMulti' -}, { - key: 'subnet-id', - enDescriptor: 'subnet-id', - cnDescriptor: '实例的subnet id', - link: '', - type: 'inputMulti' -}]; // 各产品实例列表detail配置 - -var queryEditorConfig = { - instanceDocUrl: 'https://cloud.tencent.com/document/api/1108/42565', - namespace: namespace, - fieldDescriptor: ECMFilterFieldsDescriptor -}; -var ECM_STATE = { - region: 'ap-guangzhou', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'InstanceId', - queries: ECMFilterFields -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - return Object(_common_utils__WEBPACK_IMPORTED_MODULE_1__["instanceQueryParamsBaseParse"])(queries, true); -} // function isValidMetric(metricObj: any = {}) { -// const dimension = _.get(metricObj, 'Dimensions[0].Dimensions'); -// // console.log('dimension', dimension, dimension.length === 1 && _.indexOf(dimension, 'diskId') !== -1); -// return dimension.length === 1 &&( _.indexOf(dimension, 'UUID') !== -1 || _.indexOf(dimension, 'uuid') !== -1); -// } - - -function modifyDimensons(metricItem) { - var metricTmp = lodash__WEBPACK_IMPORTED_MODULE_0__["cloneDeep"](metricItem); - - metricTmp.Dimensions.forEach(function (item) { - item.Dimensions = ['UUID']; - }); - return metricTmp; -} - -/* harmony default export */ __webpack_exports__["default"] = (ECM_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/ecm_block_storage/datasource.ts": -/*!***************************************************************!*\ - !*** ./datasource/tc_monitor/ecm_block_storage/datasource.ts ***! - \***************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/ecm_block_storage/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/datasourceStorage */ "./datasource/common/datasourceStorage.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - - - -var DCDatasource = -/** @class */ -function (_super) { - __extends(DCDatasource, _super); - - function DCDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = _query_def__WEBPACK_IMPORTED_MODULE_0__["namespace"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["ECMBLOCKSTORAGEInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["ECMBLOCKSTORAGEInvalidDemensions"]; - _this.queryMonitorExtraConfg = _query_def__WEBPACK_IMPORTED_MODULE_0__["queryMonitorExtraConfg"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_0__["templateQueryIdMap"]; - _this.keyInStorage = _query_def__WEBPACK_IMPORTED_MODULE_0__["keyInStorage"]; // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致 - - _this.InstanceReqConfig = { - service: 'ecm', - action: 'DescribeInstances', - responseField: 'InstanceSet' - }; - return _this; - } - - DCDatasource.prototype.getDiskList = function (params) { - var _a; - - return __awaiter(this, void 0, void 0, function () { - var payload, InstanceId, instanceCache, instanceObj, dataDisks; - - var _this = this; - - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - payload = params.payload; - InstanceId = payload.InstanceId; - return [4 - /*yield*/ - , _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_3__["default"].getInstance(this.service)]; - - case 1: - instanceCache = _b.sent(); - instanceObj = (_a = lodash__WEBPACK_IMPORTED_MODULE_2___default.a.cloneDeep(instanceCache.find(function (item) { - return item[_this.templateQueryIdMap.instance] === InstanceId; - }))) !== null && _a !== void 0 ? _a : {}; - dataDisks = instanceObj.DataDisks; - return [2 - /*return*/ - , dataDisks]; - } - }); - }); - }; - - DCDatasource.prototype.fetchMetricData = function (action, region, instance, query) { - return __awaiter(this, void 0, void 0, function () { - var payload, rs, result; - - var _this = this; - - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - payload = { - InstanceId: instance, - Limit: 100 - }; - return [4 - /*yield*/ - , this.getDiskList({ - region: region, - action: action, - payload: payload - })]; - - case 1: - rs = _a.sent(); - result = rs.map(function (o) { - o._InstanceAliasValue = o[_this.templateQueryIdMap.diskId]; - return { - text: o[_this.templateQueryIdMap.diskId], - value: o[_this.templateQueryIdMap.diskId] - }; - }); - return [4 - /*yield*/ - , _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_3__["default"].setExtraStorage(this.service, this.keyInStorage.diskId, rs)]; - - case 2: - _a.sent(); - - return [2 - /*return*/ - , result]; - } - }); - }); - }; - - return DCDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (DCDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/ecm_block_storage/query.ts": -/*!**********************************************************!*\ - !*** ./datasource/tc_monitor/ecm_block_storage/query.ts ***! - \**********************************************************/ -/*! exports provided: QueryCtrl, sQuery */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueryCtrl", function() { return QueryCtrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sQuery", function() { return sQuery; }); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! grafana/app/core/core_module */ "grafana/app/core/core_module"); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/ecm_block_storage/query_def.ts"); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/constants */ "./datasource/common/constants.ts"); - - - -var ExtraFields = [// { -// label: 'nodeid', -// field: 'NodeId', -// action: 'DescribeInstanceNodeInfo', -// }, -{ - label: 'diskId', - field: 'diskId' -}]; - -var QueryCtrl = -/** @class */ -function () { - QueryCtrl.$inject = ["$scope", "$rootScope"]; - - /** @ngInject */ - function QueryCtrl($scope, $rootScope) { - $scope.init = function () { - $scope.ECMBLOCKSTORAGEFilterFieldsDescriptor = _query_def__WEBPACK_IMPORTED_MODULE_1__["ECMBLOCKSTORAGEFilterFieldsDescriptor"]; - $scope.ExtraFields = ExtraFields; - $scope.namespace = _query_def__WEBPACK_IMPORTED_MODULE_1__["namespace"]; - }; // $scope.getInstanceId = () => { - // let { instance } = $scope.target; - // const service = GetServiceFromNamespace($scope.namespace); - // instance = $scope.datasource.getServiceFn(service, 'getVariable')(instance); - // if (!instance) { - // return ''; - // } - // try { - // instance = JSON.parse(instance)[templateQueryIdMap.instance]; - // } catch (error) { - // console.log(); - // } - // return instance; - // }; - - - $scope.getExtraFields = function () { - return ExtraFields.filter(function (item) { - var _a, _b; - - return item.field in ((_a = $scope.dims) !== null && _a !== void 0 ? _a : {}) || item.label in ((_b = $scope.dims) !== null && _b !== void 0 ? _b : {}); - }); - }; - - $scope.getExtraDropdown = function (target, action) { - var instance = target.instance; - var service = Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["GetServiceFromNamespace"])($scope.namespace); - instance = $scope.datasource.getServiceFn(service, 'getVariable')(instance); - - try { - instance = JSON.parse(instance); - var dataDisks = instance.DataDisks; - return dataDisks.map(function (o) { - o._InstanceAliasValue = o[_query_def__WEBPACK_IMPORTED_MODULE_1__["templateQueryIdMap"].diskId]; - return { - text: o[_query_def__WEBPACK_IMPORTED_MODULE_1__["templateQueryIdMap"].diskId], - value: JSON.stringify(o) - }; - }); - } catch (error) { - // console.log('instance error', instance); - var payload = { - InstanceId: instance - }; - var rs = $scope.datasource.getServiceFn(service, 'getDiskList')({ - payload: payload - }); - var result = rs.map(function (o) { - return { - text: o[_query_def__WEBPACK_IMPORTED_MODULE_1__["templateQueryIdMap"].diskId], - value: JSON.stringify(o) - }; - }); - return result; - } - }; - - $scope.init(); - } - - return QueryCtrl; -}(); - - -var template = "\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n"; -function sQuery() { - return { - template: template, - controller: QueryCtrl, - restrict: 'E', - scope: { - target: '=', - showDetail: '=', - region: '=', - datasource: '=', - getDropdownOptions: '&', - onChange: '&', - onRefresh: '&', - dims: '=' - } - }; -} -grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default.a.directive(_query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorName"], sQuery); - -/***/ }), - -/***/ "./datasource/tc_monitor/ecm_block_storage/query_def.ts": -/*!**************************************************************!*\ - !*** ./datasource/tc_monitor/ecm_block_storage/query_def.ts ***! - \**************************************************************/ -/*! exports provided: default, ECMBLOCKSTORAGEFilterFieldsDescriptor, templateQueryIdMap, ECMBLOCKSTORAGEInstanceAliasList, ECMBLOCKSTORAGEInvalidDemensions, namespace, queryEditorName, queryEditorConfig, keyInStorage, queryMonitorExtraConfg, ECMBLOCKSTORAGEGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ECMBLOCKSTORAGEFilterFieldsDescriptor", function() { return ECMBLOCKSTORAGEFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ECMBLOCKSTORAGEInstanceAliasList", function() { return ECMBLOCKSTORAGEInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ECMBLOCKSTORAGEInvalidDemensions", function() { return ECMBLOCKSTORAGEInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorName", function() { return queryEditorName; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorConfig", function() { return queryEditorConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keyInStorage", function() { return keyInStorage; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryMonitorExtraConfg", function() { return queryMonitorExtraConfg; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ECMBLOCKSTORAGEGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); - -var namespace = 'QCE/ECM_BLOCK_STORAGE'; // 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称 - -var queryEditorName = 'ecmBlockStorageQuery'; -var ECMBLOCKSTORAGEInvalidDemensions = { - uuid: 'UUID', - diskId: 'DiskId' -}; // 需和文件名对应 - -var ECMBLOCKSTORAGEInstanceAliasList = ['InstanceId', 'InstanceName']; -var templateQueryIdMap = { - instance: 'InstanceId', - diskId: 'DiskId' -}; // select类型需要注意是{},multi后缀是[],dropdown是'' - -var ECMBLOCKSTORAGEFilterFields = { - Limit: 20, - Offset: 0, - 'zone-name': [], - 'module-id': [], - 'module-name': [], - 'instance-id': [], - 'instance-name': [], - 'ip-address': [], - 'instance-uuid': [], - 'instance-state': {}, - 'internet-service-provider': [], - 'instance-family': [], - 'image-id': [], - 'vpc-id': [], - 'subnet-id': [] -}; -var ECMBLOCKSTORAGEFilterFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputNumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputNumber', - min: 1, - max: 100 -}, { - key: 'zone-name', - enDescriptor: 'zone-name', - cnDescriptor: '排列顺序', - link: '', - type: 'inputMulti' -}, { - key: 'module-id', - enDescriptor: 'module-id', - cnDescriptor: '模块ID', - link: '', - type: 'inputMulti' -}, { - key: 'module-name', - enDescriptor: 'module-name', - cnDescriptor: '模块名称', - link: '', - type: 'inputMulti' -}, { - key: 'instance-id', - enDescriptor: 'instance-id', - cnDescriptor: '实例ID', - link: '', - type: 'inputMulti' -}, { - key: 'instance-name', - enDescriptor: 'instance-name', - cnDescriptor: '实例名称', - link: '', - type: 'inputMulti' -}, { - key: 'ip-address', - enDescriptor: 'ip-address', - cnDescriptor: '内网/公网IP', - link: '', - type: 'inputMulti' -}, { - key: 'instance-uuid', - enDescriptor: 'instance-uuid', - cnDescriptor: '实例uuid', - link: '', - type: 'inputMulti' -}, { - key: 'instance-state', - enDescriptor: 'instance-state', - cnDescriptor: '实例状态', - link: '', - type: 'select', - multiple: true, - list: [{ - text: '创建中', - value: 'PENDING' - }, { - text: '创建失败', - value: 'LAUNCH_FAILED' - }, { - text: '运行中', - value: 'RUNNING' - }, { - text: '关机', - value: 'STOPPED' - }, { - text: '开机中', - value: 'STARTING' - }, { - text: '关机中', - value: 'STOPPING' - }, { - text: '重启中', - value: 'REBOOTING' - }, { - text: '停止待销毁', - value: 'SHUTDOWN' - }, { - text: '销毁中', - value: 'TERMINATING' - }] -}, { - key: 'internet-service-provider', - enDescriptor: 'internet-service-provider', - cnDescriptor: '公网IP所属的运营商', - link: '', - type: 'inputMulti' -}, { - key: 'instance-family', - enDescriptor: 'instance-family', - cnDescriptor: '机型family', - link: '', - type: 'inputMulti' -}, { - key: 'image-id', - enDescriptor: 'image-id', - cnDescriptor: '镜像ID', - link: '', - type: 'inputMulti' -}, { - key: 'vpc-id', - enDescriptor: 'vpc-id', - cnDescriptor: '实例的vpc id', - link: '', - type: 'inputMulti' -}, { - key: 'subnet-id', - enDescriptor: 'subnet-id', - cnDescriptor: '实例的subnet id', - link: '', - type: 'inputMulti' -}]; // 各产品实例列表detail配置 - -var queryEditorConfig = { - instanceDocUrl: 'https://cloud.tencent.com/document/api/1108/42565', - namespace: namespace, - fieldDescriptor: ECMBLOCKSTORAGEFilterFieldsDescriptor -}; -var ECMBLOCKSTORAGE_STATE = { - region: 'ap-guangzhou', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'InstanceId', - diskId: '', - queries: ECMBLOCKSTORAGEFilterFields -}; // 需要缓存到storage的内容的key列表 - -var keyInStorage = { - diskId: 'diskId' -}; -/* -如果有InstanceId额外的维度,原则上都需要传入此map结构配置 -key的含义: - 经过InvalidDemensions处理后的string。topicId =》TopicId。 - 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId -value的含义: - 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、 - 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。 - 默认取通过InvalidDemsion处理后的key - 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。 - 即:templateQueryIdMap中内容。 - 联合上面2的内容筛选出原始sourceMap -*/ - -var queryMonitorExtraConfg = { - DiskId: { - dim_KeyInStorage: keyInStorage.diskId, - dim_KeyInTarget: 'diskId', - dim_KeyInMap: templateQueryIdMap.diskId - } -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - return Object(_common_utils__WEBPACK_IMPORTED_MODULE_0__["instanceQueryParamsBaseParse"])(queries, true); -} - -/* harmony default export */ __webpack_exports__["default"] = (ECMBLOCKSTORAGE_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/ecm_lb/datasource.ts": -/*!****************************************************!*\ - !*** ./datasource/tc_monitor/ecm_lb/datasource.ts ***! - \****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/ecm_lb/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __assign = undefined && undefined.__assign || function () { - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - } - - return t; - }; - - return __assign.apply(this, arguments); -}; - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - -var DCDatasource = -/** @class */ -function (_super) { - __extends(DCDatasource, _super); - - function DCDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = _query_def__WEBPACK_IMPORTED_MODULE_0__["namespace"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["ECMLBInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["ECMLBInvalidDemensions"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_0__["templateQueryIdMap"]; // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致 - - _this.InstanceReqConfig = { - service: 'ecm', - action: 'DescribeLoadBalancers', - responseField: 'LoadBalancerSet' - }; - return _this; - } - - DCDatasource.prototype.metricFindQuery = function (query, regex) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , _super.prototype.metricFindQuery.call(this, __assign(__assign({}, query), { - region: 'ap-guangzhou' - }), regex)]; - }); - }); - }; - - return DCDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (DCDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/ecm_lb/query.ts": -/*!***********************************************!*\ - !*** ./datasource/tc_monitor/ecm_lb/query.ts ***! - \***********************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _base_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_base/query */ "./datasource/tc_monitor/_base/query.ts"); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/ecm_lb/query_def.ts"); - - -Object(_base_query__WEBPACK_IMPORTED_MODULE_0__["default"])(_query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorName"], _query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorConfig"]); - -/***/ }), - -/***/ "./datasource/tc_monitor/ecm_lb/query_def.ts": -/*!***************************************************!*\ - !*** ./datasource/tc_monitor/ecm_lb/query_def.ts ***! - \***************************************************/ -/*! exports provided: default, ECMLBFilterFieldsDescriptor, templateQueryIdMap, ECMLBInstanceAliasList, ECMLBInvalidDemensions, namespace, queryEditorName, queryEditorConfig, modifyDimensons, ECMLBGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ECMLBFilterFieldsDescriptor", function() { return ECMLBFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ECMLBInstanceAliasList", function() { return ECMLBInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ECMLBInvalidDemensions", function() { return ECMLBInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorName", function() { return queryEditorName; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorConfig", function() { return queryEditorConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "modifyDimensons", function() { return modifyDimensons; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ECMLBGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); - - -var namespace = 'QCE/ECM_LB'; -var queryEditorName = 'ecmLbQuery'; -var ECMLBInvalidDemensions = { - vip: 'LoadBalancerVips' -}; -var ECMLBInstanceAliasList = ['LoadBalancerId', 'LoadBalancerName']; -var templateQueryIdMap = { - instance: 'LoadBalancerId' -}; // select类型需要注意是{},multi后缀是[] - -var ECMLBFilterFields = { - Limit: 20, - Offset: 0, - LoadBalancerIds: [], - LoadBalancerName: [], - LoadBalancerVips: [], - BackendPrivateIps: [], - VpcId: '' -}; -var ECMLBFilterFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputNumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputNumber', - min: 1, - max: 100 -}, { - key: 'LoadBalancerIds', - enDescriptor: 'LoadBalancerIds', - cnDescriptor: '负载均衡器ID数组', - link: '', - type: 'inputMulti' -}, { - key: 'LoadBalancerName', - enDescriptor: 'LoadBalancerName', - cnDescriptor: '负载均衡器名称', - link: '', - type: 'inputMulti' -}, { - key: 'LoadBalancerVips', - enDescriptor: 'LoadBalancerVips', - cnDescriptor: '负载均衡获得的公网IP地址', - link: '', - type: 'inputMulti' -}, { - key: 'BackendPrivateIps', - enDescriptor: 'BackendPrivateIps', - cnDescriptor: '绑定的后端服务的内网 IP', - link: '', - type: 'inputMulti' -}, { - key: 'VpcId', - enDescriptor: 'VpcId', - cnDescriptor: '实例所属私有网络唯一ID', - link: '', - type: 'input' -}]; // 各产品实例列表detail配置 - -var queryEditorConfig = { - instanceDocUrl: 'https://cloud.tencent.com/document/api/1108/48459', - namespace: namespace, - fieldDescriptor: ECMLBFilterFieldsDescriptor -}; -var ECM_STATE = { - region: 'ap-guangzhou', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'LoadBalancerId', - queries: ECMLBFilterFields -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - return Object(_common_utils__WEBPACK_IMPORTED_MODULE_1__["instanceQueryParamsBaseParse"])(queries, false); -} // function isValidMetric(metricObj: any = {}) { -// const dimension = _.get(metricObj, 'Dimensions[0].Dimensions'); -// // console.log('dimension', dimension, dimension.length === 1 && _.indexOf(dimension, 'diskId') !== -1); -// return dimension.length === 1 &&( _.indexOf(dimension, 'UUID') !== -1 || _.indexOf(dimension, 'uuid') !== -1); -// } - - -function modifyDimensons(metricItem) { - var metricTmp = lodash__WEBPACK_IMPORTED_MODULE_0__["cloneDeep"](metricItem); - - metricTmp.Dimensions.forEach(function (item) {// item.Dimensions = ['UUID']; - }); - return metricTmp; -} - -/* harmony default export */ __webpack_exports__["default"] = (ECM_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/gse/datasource.ts": -/*!*************************************************!*\ - !*** ./datasource/tc_monitor/gse/datasource.ts ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/gse/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/constants */ "./datasource/common/constants.ts"); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); -/* harmony import */ var _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/datasourceStorage */ "./datasource/common/datasourceStorage.ts"); -/* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../locale */ "./locale/index.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - - - - - - -var DCDatasource = -/** @class */ -function (_super) { - __extends(DCDatasource, _super); - - function DCDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = _query_def__WEBPACK_IMPORTED_MODULE_0__["namespace"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["GSEInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["GSEInvalidDemensions"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_0__["templateQueryIdMap"]; - _this.queryMonitorExtraConfg = _query_def__WEBPACK_IMPORTED_MODULE_0__["queryMonitorExtraConfg"]; // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致 - - _this.InstanceReqConfig = { - service: 'gse', - action: 'DescribeInstances', - responseField: 'Instances' - }; - _this.keyInStorage = _query_def__WEBPACK_IMPORTED_MODULE_0__["keyInStorage"]; - return _this; - } // getFilterDropdown({ field }) { - // return super.getRegions(); - // } - - - DCDatasource.prototype.getRegions = function () { - return Promise.resolve(_query_def__WEBPACK_IMPORTED_MODULE_0__["regionSupported"].map(function (_a) { - var value = _a.value; - return { - value: value, - text: Object(_locale__WEBPACK_IMPORTED_MODULE_6__["t"])(value) - }; - })); - }; - - DCDatasource.prototype.getMetrics = function (region) { - if (region === void 0) { - region = 'ap-guangzhou'; - } - - return __awaiter(this, void 0, void 0, function () { - var rawSet; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - return [4 - /*yield*/ - , _super.prototype.getMetrics.call(this, region)]; - - case 1: - rawSet = _a.sent(); - return [2 - /*return*/ - , lodash__WEBPACK_IMPORTED_MODULE_2___default.a.compact(rawSet.map(function (item) { - return Object(_query_def__WEBPACK_IMPORTED_MODULE_0__["modifyDimensons"])(item); - }))]; - } - }); - }); - }; - - DCDatasource.prototype.getQueueNameList = function (params) { - return __awaiter(this, void 0, void 0, function () { - var region, serviceInfo, res, rs; - - var _this = this; - - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - region = params.region; - serviceInfo = Object(_common_constants__WEBPACK_IMPORTED_MODULE_3__["GetServiceAPIInfo"])(region, this.service); - return [4 - /*yield*/ - , Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["fetchAllFactory"])(function (data) { - return _this.doRequest({ - url: _this.url + serviceInfo.path, - data: data - }, serviceInfo.service, { - region: region, - action: 'DescribeGameServerSessionQueues' - }); - }, {}, 'GameServerSessionQueues')]; - - case 1: - res = _a.sent(); - rs = res[0]; - return [2 - /*return*/ - , rs]; - } - }); - }); - }; - - DCDatasource.prototype.getFleetList = function (params) { - return __awaiter(this, void 0, void 0, function () { - var region, serviceInfo, res, rs; - - var _this = this; - - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - region = params.region; - serviceInfo = Object(_common_constants__WEBPACK_IMPORTED_MODULE_3__["GetServiceAPIInfo"])(region, this.service); - return [4 - /*yield*/ - , Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["fetchAllFactory"])(function (data) { - return _this.doRequest({ - url: _this.url + serviceInfo.path, - data: data - }, serviceInfo.service, { - region: region, - action: 'ListFleets' - }); - }, {}, 'FleetIds')]; - - case 1: - res = _a.sent(); - rs = res[0]; - return [2 - /*return*/ - , rs.map(function (r) { - var _a; - - return _a = {}, _a[_this.templateQueryIdMap.FleetId] = r, _a; - })]; - } - }); - }); - }; - - DCDatasource.prototype.fetchMetricData = function (action, region, instance) { - return __awaiter(this, void 0, void 0, function () { - var rs, result, rs, result; - - var _this = this; - - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!(action === 'DescribeGameServerSessionQueues')) return [3 - /*break*/ - , 3]; - return [4 - /*yield*/ - , this.getQueueNameList({ - region: region, - instanceId: instance[this.templateQueryIdMap.instance] - })]; - - case 1: - rs = _a.sent(); - result = rs.map(function (o) { - o._InstanceAliasValue = o[_this.templateQueryIdMap.Name]; - return { - text: o[_this.templateQueryIdMap.Name], - value: o[_this.templateQueryIdMap.Name] - }; - }); - return [4 - /*yield*/ - , _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_5__["default"].setExtraStorage(this.service, this.keyInStorage.queue, rs)]; - - case 2: - _a.sent(); - - return [2 - /*return*/ - , result]; - - case 3: - if (!(action === 'ListFleets')) return [3 - /*break*/ - , 6]; - return [4 - /*yield*/ - , this.getFleetList({ - region: region, - instanceId: instance[this.templateQueryIdMap.instance] - })]; - - case 4: - rs = _a.sent(); - result = rs.map(function (o) { - o._InstanceAliasValue = o[_this.templateQueryIdMap.FleetId]; - return { - text: o[_this.templateQueryIdMap.FleetId], - value: o[_this.templateQueryIdMap.FleetId] - }; - }); - return [4 - /*yield*/ - , _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_5__["default"].setExtraStorage(this.service, this.keyInStorage.fleet, rs)]; - - case 5: - _a.sent(); - - return [2 - /*return*/ - , result]; - - case 6: - return [2 - /*return*/ - , []]; - } - }); - }); - }; - - return DCDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (DCDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/gse/query.ts": -/*!********************************************!*\ - !*** ./datasource/tc_monitor/gse/query.ts ***! - \********************************************/ -/*! exports provided: QueryCtrl, sQuery */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueryCtrl", function() { return QueryCtrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sQuery", function() { return sQuery; }); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! grafana/app/core/core_module */ "grafana/app/core/core_module"); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/gse/query_def.ts"); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/constants */ "./datasource/common/constants.ts"); -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - -var ExtraFields = [{ - label: 'fleetId', - field: 'FleetId' -}, { - label: 'queueName', - field: 'Name' -}]; -var actionMaps = { - FleetId: 'getFleetList', - Name: 'getQueueNameList' -}; - -var QueryCtrl = -/** @class */ -function () { - QueryCtrl.$inject = ["$scope", "$rootScope"]; - - /** @ngInject */ - function QueryCtrl($scope, $rootScope) { - var _this = this; - - $scope.init = function () { - $scope.GSEFilterFieldsDescriptor = _query_def__WEBPACK_IMPORTED_MODULE_1__["GSEFilterFieldsDescriptor"]; - $scope.namespace = _query_def__WEBPACK_IMPORTED_MODULE_1__["namespace"]; - }; - - $scope.getExtraFields = function () { - return ExtraFields.filter(function (item) { - var _a; - - return item.field in ((_a = $scope.dims) !== null && _a !== void 0 ? _a : {}); - }); - }; - - $scope.getInstanceId = function () { - var instance = $scope.target.instance; - var service = Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["GetServiceFromNamespace"])($scope.namespace); // console.log({namespace, service}); - - instance = $scope.datasource.getServiceFn(service, 'getVariable')(instance); - - if (!instance) { - return ''; - } - - try { - instance = JSON.parse(instance)[_query_def__WEBPACK_IMPORTED_MODULE_1__["templateQueryIdMap"].instance]; - } catch (error) {// console.log(); - } - - return instance; - }; - - $scope.getExtraDropdown = function (target, field) { - return __awaiter(_this, void 0, void 0, function () { - var service, instanceId, region, rs, result; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - service = Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["GetServiceFromNamespace"])($scope.namespace); - instanceId = $scope.getInstanceId(); - region = $scope.datasource.getServiceFn(service, 'getVariable')(target.region); - return [4 - /*yield*/ - , $scope.datasource.getServiceFn(service, actionMaps[field])({ - region: region, - instanceId: instanceId - })]; - - case 1: - rs = _a.sent(); - result = rs.map(function (o) { - o._InstanceAliasValue = o[_query_def__WEBPACK_IMPORTED_MODULE_1__["templateQueryIdMap"][field]]; - return { - text: o[_query_def__WEBPACK_IMPORTED_MODULE_1__["templateQueryIdMap"][field]], - value: JSON.stringify(o) - }; - }); - return [2 - /*return*/ - , result]; - } - }); - }); - }; - - $scope.init(); - } - - return QueryCtrl; -}(); - - -var template = "\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n"; -function sQuery() { - return { - template: template, - controller: QueryCtrl, - restrict: 'E', - scope: { - target: '=', - showDetail: '=', - region: '=', - datasource: '=', - getDropdownOptions: '&', - onChange: '&', - onRefresh: '&', - dims: '=' - } - }; -} -grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default.a.directive(_query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorName"], sQuery); - -/***/ }), - -/***/ "./datasource/tc_monitor/gse/query_def.ts": -/*!************************************************!*\ - !*** ./datasource/tc_monitor/gse/query_def.ts ***! - \************************************************/ -/*! exports provided: default, GSEFilterFieldsDescriptor, templateQueryIdMap, GSEInstanceAliasList, GSEInvalidDemensions, namespace, queryEditorName, queryEditorConfig, regionSupported, modifyDimensons, queryMonitorExtraConfg, fleetId, keyInStorage, GSEGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GSEFilterFieldsDescriptor", function() { return GSEFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GSEInstanceAliasList", function() { return GSEInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GSEInvalidDemensions", function() { return GSEInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorName", function() { return queryEditorName; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorConfig", function() { return queryEditorConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "regionSupported", function() { return regionSupported; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "modifyDimensons", function() { return modifyDimensons; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryMonitorExtraConfg", function() { return queryMonitorExtraConfg; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fleetId", function() { return fleetId; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keyInStorage", function() { return keyInStorage; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GSEGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); - - -var namespace = 'QCE/GSE'; -var fleetId = 'FleetId'; // 为和cvm其他产品保持一致,即将string[]改为Array<{fleetid: xxx}>,在此声明key -// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称 - -var queryEditorName = 'gseQuery'; -var GSEInvalidDemensions = { - instanceid: 'InstanceId', - fleetid: 'FleetId', - queuename: 'Name' -}; // 需和文件名对应 - -var GSEInstanceAliasList = ['InstanceId', 'PrivateIpAddress', 'IpAddress']; -var templateQueryIdMap = { - instance: 'InstanceId', - Name: 'Name', - FleetId: fleetId -}; // 需要缓存到storage的内容的key列表 - -var keyInStorage = { - fleet: 'fleet', - queue: 'queueName' // 会话队列 - -}; -/* -如果有InstanceId额外的维度,原则上都需要传入此map结构配置 -key的含义: - 经过InvalidDemensions处理后的string。topicId =》TopicId。 - 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId -value的含义: - 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、 - 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。 - 默认取通过InvalidDemsion处理后的key - 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。 - 即:templateQueryIdMap中内容。 - 联合上面2的内容筛选出原始sourceMap -*/ - -var queryMonitorExtraConfg = { - FleetId: { - dim_KeyInStorage: keyInStorage.fleet, - dim_KeyInTarget: 'FleetId', - dim_KeyInMap: templateQueryIdMap.FleetId - }, - Name: { - dim_KeyInStorage: keyInStorage.queue, - dim_KeyInTarget: 'Name', - dim_KeyInMap: templateQueryIdMap.Name - } -}; // select类型需要注意是{},multi后缀是[],dropdown是'' - -var GSEFilterFields = { - Limit: 20, - Offset: 0, - InstanceId: '', - FleetId: '' -}; -var GSEFilterFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputNumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputNumber', - min: 1, - max: 100 -}, { - key: 'InstanceId', - enDescriptor: 'resourceName', - cnDescriptor: '资源名称', - link: '', - type: 'input' -}, { - key: 'FleetId', - enDescriptor: 'tagKey', - cnDescriptor: '标签键', - link: '', - type: 'input' -}]; // 各产品实例列表detail配置 - -var queryEditorConfig = { - instanceDocUrl: 'https://cloud.tencent.com/document/api/1165/42604', - namespace: namespace, - fieldDescriptor: GSEFilterFieldsDescriptor -}; -var GSE_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'InstanceId', - FleetId: '', - Name: '', - queries: GSEFilterFields -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - return Object(_common_utils__WEBPACK_IMPORTED_MODULE_0__["instanceQueryParamsBaseParse"])(queries, true); -} // regions for dropdown - - -var regionSupported = [{ - value: 'ap-bangkok' -}, { - value: 'ap-beijing' -}, { - value: 'ap-chengdu' -}, // { value: 'ap-chongqing' }, -{ - value: 'ap-guangzhou' -}, { - value: 'ap-hongkong' -}, { - value: 'ap-mumbai' -}, { - value: 'ap-seoul' -}, { - value: 'ap-nanjing' -}, { - value: 'ap-shanghai' -}, // { value: 'ap-shanghai-fsi' }, -// { value: 'ap-shenzhen-fsi' }, -{ - value: 'ap-singapore' -}, { - value: 'ap-tokyo' -}, { - value: 'eu-frankfurt' -}, { - value: 'na-ashburn' -}, { - value: 'na-siliconvalley' -} // { value: 'na-toronto' }, -]; - -function modifyDimensons(metricItem) { - var metricTmp = lodash__WEBPACK_IMPORTED_MODULE_1___default.a.cloneDeep(metricItem); - - metricTmp.Dimensions.forEach(function (item) { - item.Dimensions = item.Dimensions.map(function (v) { - return GSEInvalidDemensions[v] || v; - }); - }); - return metricTmp; -} - -/* harmony default export */ __webpack_exports__["default"] = (GSE_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/index.ts": -/*!****************************************!*\ - !*** ./datasource/tc_monitor/index.ts ***! - \****************************************/ -/*! exports provided: InitServiceState, SERVICES, Datasources, InstanceAliasList, GetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InitServiceState", function() { return InitStates; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SERVICES", function() { return SERVICES; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Datasources", function() { return Datasources; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InstanceAliasList", function() { return InstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../locale */ "./locale/index.ts"); -var __spreadArray = undefined && undefined.__spreadArray || function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -}; - - -var SERVICES = [{ - service: 'cvm', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('CVM'); - }, - - namespace: 'QCE/CVM', - href: 'https://cloud.tencent.com/document/api/213/15688' -}, { - service: 'cdb', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('CDB'); - }, - - namespace: 'QCE/CDB', - href: 'https://cloud.tencent.com/document/api/236/15829', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('cloud_database'); - } - -}, { - service: 'mongoDB', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('CMONGO'); - }, - - namespace: 'QCE/CMONGO', - href: 'https://cloud.tencent.com/document/api/240/38568', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('cloud_database'); - } - -}, { - service: 'postgres', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('POSTGRES'); - }, - - namespace: 'QCE/POSTGRES', - href: 'https://cloud.tencent.com/document/product/248/45105', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('cloud_database'); - } - -}, { - service: 'redis', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('REDIS'); - }, - - namespace: 'QCE/REDIS', - href: 'https://cloud.tencent.com/document/product/248/45110', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('cloud_database'); - } - -}, { - service: 'redisMem', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('REDIS_MEM'); - }, - - namespace: 'QCE/REDIS_MEM', - href: 'https://cloud.tencent.com/document/product/248/49729', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('cloud_database'); - } - -}, { - service: 'sqlserver', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('SQLSERVER'); - }, - - namespace: 'QCE/SQLSERVER', - href: 'https://cloud.tencent.com/document/product/248/45146', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('cloud_database'); - } - -}, { - service: 'cynosdbMysql', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('CYNOSDB_MYSQL'); - }, - - namespace: 'QCE/CYNOSDB_MYSQL', - href: 'https://cloud.tencent.com/document/product/248/45106', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('cloud_database'); - } - -}, { - service: 'tcaplus', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('TCAPLUS'); - }, - - namespace: 'QCE/TCAPLUS', - href: 'https://cloud.tencent.com/document/product/248/45107', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('cloud_database'); - } - -}, { - service: 'dcdb', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('TDMYSQL'); - }, - - namespace: 'QCE/TDMYSQL', - href: 'https://cloud.tencent.com/document/product/248/45108' -}, { - service: 'pcx', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('PCX'); - }, - - namespace: 'QCE/PCX', - href: 'https://cloud.tencent.com/document/product/215/5181', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('virtual_private_cloud'); - } - -}, { - service: 'bwp', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('BWP'); - }, - - namespace: 'QCE/BWP', - href: 'https://cloud.tencent.com/document/api/215/19209', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('virtual_private_cloud'); - } - -}, { - service: 'natGateway', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('NAT_GATEWAY'); - }, - - namespace: 'QCE/NAT_GATEWAY', - href: 'https://cloud.tencent.com/document/api/215/36034', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('virtual_private_cloud'); - } - -}, { - service: 'vpngw', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('VPNGW'); - }, - - namespace: 'QCE/VPNGW', - href: 'https://cloud.tencent.com/document/product/248/45070', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('virtual_private_cloud'); - } - -}, { - service: 'vpnx', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('VPNX'); - }, - - namespace: 'QCE/VPNX', - href: 'https://cloud.tencent.com/document/product/248/45071', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('virtual_private_cloud'); - } - -}, { - service: 'dcg', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('DCG'); - }, - - namespace: 'QCE/DCG', - href: 'https://cloud.tencent.com/document/product/248/45072', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('virtual_private_cloud'); - } - -}, { - service: 'ceipSummary', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('CEIP_SUMMARY'); - }, - - namespace: 'QCE/CEIP_SUMMARY', - href: 'https://cloud.tencent.com/document/product/248/50381', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('virtual_private_cloud'); - } - -}, { - service: 'vpcNetDetect', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('VPC_NET_DETECT'); - }, - - namespace: 'QCE/VPC_NET_DETECT', - href: 'https://cloud.tencent.com/document/product/248/50384', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('virtual_private_cloud'); - } - -}, { - service: 'vbc', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('VBC'); - }, - - namespace: 'QCE/VBC', - href: 'https://cloud.tencent.com/document/product/248/45073', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('virtual_private_cloud'); - } - -}, { - service: 'lb', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('LB'); - }, - - namespace: 'QCE/LB', - href: 'https://cloud.tencent.com/document/product/248/45099', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('virtual_private_cloud'); - } - -}, { - service: 'lbPublic', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('LB_PUBLIC'); - }, - - namespace: 'QCE/LB_PUBLIC', - href: 'https://cloud.tencent.com/document/product/248/51898', - - get groupName() { - return "".concat(Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('cloud_load_balancer'), "(").concat(Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('multi_scene'), ")"); - } - -}, { - service: 'lbPrivate', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('LB_PRIVATE'); - }, - - namespace: 'QCE/LB_PRIVATE', - href: 'https://cloud.tencent.com/document/product/248/51899', - - get groupName() { - return "".concat(Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('cloud_load_balancer'), "(").concat(Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('multi_scene'), ")"); - } - -}, { - service: 'loadBalance', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('LOADBALANCE'); - }, - - namespace: 'QCE/LOADBALANCE', - href: 'https://cloud.tencent.com/document/product/248/51901', - - get groupName() { - return "".concat(Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('cloud_load_balancer'), "(").concat(Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('multi_scene'), ")"); - } - -}, { - service: 'vClb', - - get label() { - return "".concat(Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('cloud_load_balancer'), "(").concat(Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('lite'), ")"); - }, - - namespace: 'QCE/V_CLB', - href: 'https://cloud.tencent.com/document/product/248/51901', - - get groupName() { - return "".concat(Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('cloud_load_balancer'), "(").concat(Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('lite'), ")"); - } - -}, { - service: 'cdn', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('CDN'); - }, - - namespace: 'QCE/CDN', - hideRegion: true, - href: 'https://cloud.tencent.com/document/product/248/50386', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('content_delivery_network'); - } - -}, { - service: 'cdnProvince', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('CDN_LOG_DATA'); - }, - - namespace: 'QCE/CDN_LOG_DATA', - hideRegion: true, - href: 'https://cloud.tencent.com/document/product/248/50388', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('content_delivery_network'); - } - -}, { - service: 'ovCdn', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('OV_CDN'); - }, - - namespace: 'QCE/OV_CDN', - hideRegion: true, - href: 'https://cloud.tencent.com/document/product/248/50387', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('content_delivery_network'); - } - -}, { - service: 'scf', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('SCF_V2'); - }, - - namespace: 'QCE/SCF_V2', - href: 'https://cloud.tencent.com/document/product/248/45130' -}, { - service: 'cfs', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('CFS'); - }, - - namespace: 'QCE/CFS', - href: 'https://cloud.tencent.com/document/product/248/45143' -}, { - service: 'cos', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('COS'); - }, - - namespace: 'QCE/COS', - href: 'https://cloud.tencent.com/document/product/248/45140' -}, { - service: 'ckafka', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('CKAFKA'); - }, - - namespace: 'QCE/CKAFKA', - href: 'https://cloud.tencent.com/document/product/248/45121', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('message_queue'); - } - -}, { - service: 'cmq', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('CMQ'); - }, - - namespace: 'QCE/CMQ', - href: 'https://cloud.tencent.com/document/product/248/45114', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('message_queue'); - } - -}, { - service: 'cmqTopic', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('CMQTOPIC'); - }, - - namespace: 'QCE/CMQTOPIC', - href: 'https://cloud.tencent.com/document/product/248/45113', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('message_queue'); - } - -}, { - service: 'tdmq', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('TDMQ'); - }, - - namespace: 'QCE/TDMQ', - href: 'https://cloud.tencent.com/document/product/248/51450', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('message_queue'); - } - -}, { - service: 'tdmqRocketmq', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('TDMQ_ROCKETMQ'); - }, - - namespace: 'QCE/ROCKETMQ', - href: 'https://cloud.tencent.com/document/product/248/51450', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('message_queue'); - } - -}, { - service: 'tdmqRabbitmq', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('TDMQ_RABBITMQ'); - }, - - namespace: 'QCE/RABBITMQ', - href: 'https://cloud.tencent.com/document/product/248/51450', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('message_queue'); - } - -}, { - service: 'dcx', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('DCX'); - }, - - namespace: 'QCE/DCX', - href: 'https://cloud.tencent.com/document/product/248/45101', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('direct_connect'); - } - -}, { - service: 'dc', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('DC'); - }, - - namespace: 'QCE/DC', - href: 'https://cloud.tencent.com/document/product/248/45102', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('direct_connect'); - } - -}, { - service: 'cpm', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('CPM'); - }, - - namespace: 'QCE/CPM', - href: 'https://cloud.tencent.com/document/product/248/45881', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('cloud_physical_machine'); - } - -}, { - service: 'bmPcx', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('BM_PCX'); - }, - - namespace: 'QCE/BM_PCX', - href: 'https://cloud.tencent.com/document/product/248/45884', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('cloud_physical_machine'); - } - -}, { - service: 'bmLb', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('BM_LB'); - }, - - namespace: 'QCE/BM_LB', - href: 'https://cloud.tencent.com/document/product/248/45886', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('cloud_physical_machine'); - } - -}, { - service: 'bmIntraLb', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('BM_INTRA_LB'); - }, - - namespace: 'QCE/BM_INTRA_LB', - href: 'https://cloud.tencent.com/document/product/248/45885', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('cloud_physical_machine'); - } - -}, { - service: 'ces', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('CES'); - }, - - namespace: 'QCE/CES', - href: 'https://cloud.tencent.com/document/product/248/45129' -}, { - service: 'mrHDFS', - - get label() { - return "".concat(Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('elastic_mapReduce'), "(HDFS)"); - }, - - namespace: 'QCE/TXMR_HDFS', - href: 'https://cloud.tencent.com/document/product/248/44797', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('elastic_mapReduce'); - } - -}, { - service: 'mrHBASE', - - get label() { - return "".concat(Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('elastic_mapReduce'), "(HBASE)"); - }, - - namespace: 'QCE/TXMR_HBASE', - href: 'https://cloud.tencent.com/document/product/248/45567', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('elastic_mapReduce'); - } - -}, { - service: 'mrHIVE', - - get label() { - return "".concat(Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('elastic_mapReduce'), "(HIVE)"); - }, - - namespace: 'QCE/TXMR_HIVE', - href: 'https://cloud.tencent.com/document/product/248/45569', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('elastic_mapReduce'); - } - -}, { - service: 'mrNODE', - - get label() { - return "".concat(Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('elastic_mapReduce'), "(NODE)"); - }, - - namespace: 'QCE/TXMR_NODE', - href: 'https://cloud.tencent.com/document/product/248/45570', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('elastic_mapReduce'); - } - -}, { - service: 'mrPRESTO', - - get label() { - return "".concat(Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('elastic_mapReduce'), "(PRESTO)"); - }, - - namespace: 'QCE/TXMR_PRESTO', - href: 'https://cloud.tencent.com/document/product/248/45571', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('elastic_mapReduce'); - } - -}, { - service: 'mrSPARK', - - get label() { - return "".concat(Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('elastic_mapReduce'), "(SPARK)"); - }, - - namespace: 'QCE/TXMR_SPARK', - href: 'https://cloud.tencent.com/document/product/248/45572', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('elastic_mapReduce'); - } - -}, { - service: 'mrYARN', - - get label() { - return "".concat(Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('elastic_mapReduce'), "(YARN)"); - }, - - namespace: 'QCE/TXMR_YARN', - href: 'https://cloud.tencent.com/document/product/248/45573', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('elastic_mapReduce'); - } - -}, { - service: 'mrZOOKEEPER', - - get label() { - return "".concat(Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('elastic_mapReduce'), "(ZOOKEEPER)"); - }, - - namespace: 'QCE/TXMR_ZOOKEEPER', - href: 'https://cloud.tencent.com/document/product/248/45574', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('elastic_mapReduce'); - } - -}, { - service: 'cbs', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('BLOCK_STORAGE'); - }, - - namespace: 'QCE/BLOCK_STORAGE', - href: 'https://cloud.tencent.com/document/product/362/2345' -}, { - service: 'apigateway', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('APIGATEWAY'); - }, - - namespace: 'QCE/APIGATEWAY', - href: 'https://cloud.tencent.com/document/product/248/45127' -}, { - service: 'qaap', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('QAAP'); - }, - - namespace: 'QCE/QAAP', - href: 'https://cloud.tencent.com/document/product/608' -}, { - service: 'ecm', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('ECM'); - }, - - hideRegion: true, - namespace: 'QCE/ECM', - href: 'https://cloud.tencent.com/document/product/1108', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('edge_computing_machine'); - } - -}, { - service: 'ecmBlockStorage', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('ECM_BLOCK_STORAGE'); - }, - - hideRegion: true, - namespace: 'QCE/ECM_BLOCK_STORAGE', - href: 'https://cloud.tencent.com/document/product/1108', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('edge_computing_machine'); - } - -}, { - service: 'ecmLb', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('ECM_LB'); - }, - - hideRegion: true, - namespace: 'QCE/ECM_LB', - href: 'https://cloud.tencent.com/document/product/1108', - - get groupName() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('edge_computing_machine'); - } - -}, { - service: 'gse', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('GSE'); - }, - - namespace: 'QCE/GSE', - href: 'https://cloud.tencent.com/document/product/1165' -}, { - service: 'cls', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('CLS'); - }, - - namespace: 'QCE/CLS', - href: 'https://cloud.tencent.com/document/product/614' -}, { - service: 'tke', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('TKE'); - }, - - namespace: 'QCE/TKE2', - href: 'https://cloud.tencent.com/document/product/457' -}, { - service: 'ecdn', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('ECDN'); - }, - - namespace: 'QCE/DSA', - href: 'https://cloud.tencent.com/document/product/570' -}, // { -// service: 'lighthouse', -// label: '轻量应用服务器(LIGHTHOUSE)', -// namespace: 'QCE/LIGHTHOUSE', -// href: 'https://cloud.tencent.com/document/product/1207', -// }, -// { -// service: 'tsf', -// label: ' 微服务平台(TSF)', -// namespace: 'QCE/TSF', -// href: 'https://cloud.tencent.com/document/product/649', -// }, -{ - service: 'waf', - - get label() { - return Object(_locale__WEBPACK_IMPORTED_MODULE_0__["t"])('WAF'); - }, - - // hideRegion: true, - namespace: 'QCE/WAF', - href: 'https://cloud.tencent.com/document/product/627' -}]; -var Datasources = {}; -var InitStates = {}; -var InstanceAliasList = {}; -var GetInstanceQueryParams = {}; -/** - * 由于目录命名不规范,导致需要使用额外逻辑保证正确性。从目录到具体service的映射 - */ - -var hackModuleName = { - // lb_loadBalance: 'loadBalance', - postgresql: 'postgres', - mongodb: 'mongoDB', - clb: ['lbPrivate', 'lbPublic', 'loadBalance'], - mr: ['mrHDFS', 'mrHBASE', 'mrHIVE', 'mrNODE', 'mrPRESTO', 'mrSPARK', 'mrYARN', 'mrZOOKEEPER'] -}; - -var requireModule = __webpack_require__("./datasource/tc_monitor sync recursive ^\\.\\/[a-zA-Z]\\w+\\/(datasource)|(query(_def)?)\\.ts$"); - -requireModule.keys().forEach(function (filePath) { - var _a; - - var _b = filePath.split('/'), - moduleName = _b[1], - fileName = _b[2]; // hack: 这里是由于产品目录命名不规范,所以才会多这么一段代码 - - - moduleName = (_a = hackModuleName[moduleName]) !== null && _a !== void 0 ? _a : moduleName; // 目录与模块的映射关系,不管是一对一还是一对多,均按数组进行统一处理 - - [].concat(moduleName).forEach(function (module) { - var _a, _b; // 这个service就是产品配置中的service,需要注意这里的service是根据目录名称算出来的,因此目录名称一定要和service对应 - - - var service = module.replace(/_([a-zA-Z])/g, function (_, b) { - return b.toUpperCase(); - }); - var prefix = service.toUpperCase(); // 命名规则 - // datasource - - if (fileName === 'datasource.ts') { - var Cls_1 = __webpack_require__("./datasource/tc_monitor sync recursive ^.*$")("".concat(filePath))["default"]; // 想办法为实例注入service,不能为prototype或则类本身注入,因为会造成互相污染,详尽mrDatasource - - - Datasources["".concat(prefix, "Datasource")] = - /** @class */ - function () { - function class_1() { - var params = []; - - for (var _i = 0; _i < arguments.length; _i++) { - params[_i] = arguments[_i]; - } - - var target = new (Cls_1.bind.apply(Cls_1, __spreadArray(__spreadArray([void 0], params, false), [service], false)))(); - target.service = service; // eslint-disable-next-line no-constructor-return - - return target; - } - - return class_1; - }(); - } // query - - - if (fileName === 'query.ts') { - __webpack_require__("./datasource/tc_monitor sync recursive ^.*$")("".concat(filePath)); - } // query_def - - - if (fileName === 'query_def.ts') { - var alias = "".concat(prefix, "InstanceAliasList"); - var getParams = "".concat(prefix, "GetInstanceQueryParams"); - - var target = __webpack_require__("./datasource/tc_monitor sync recursive ^.*$")("".concat(filePath)); - - InitStates[service] = target["default"]; // FIXME: 这里需不需要深拷贝? - - InstanceAliasList[alias] = (_a = target[alias]) !== null && _a !== void 0 ? _a : target['InstanceAliasList']; - GetInstanceQueryParams[getParams] = (_b = target[getParams]) !== null && _b !== void 0 ? _b : target['GetInstanceQueryParams']; - } - }); -}); - // console.log(Datasources, InitStates, InstanceAliasList, GetInstanceQueryParams); - -/***/ }), - -/***/ "./datasource/tc_monitor/lb/datasource.ts": -/*!************************************************!*\ - !*** ./datasource/tc_monitor/lb/datasource.ts ***! - \************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/lb/query_def.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - -var SCFDatasource = -/** @class */ -function (_super) { - __extends(SCFDatasource, _super); - - function SCFDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = 'QCE/LB'; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_1__["LBInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_1__["LBInvalidDemensions"]; - _this.templateQueryIdMap = { - instance: 'AddressId' - }; - _this.InstanceReqConfig = { - service: 'vpc', - action: 'DescribeAddresses', - responseField: 'AddressSet', - interceptor: { - request: function request(params) { - var Filters = params.Filters; - - if (!Filters) { - params.Filters = []; - } - - params.Filters.push({ - Name: 'address-type', - Values: ['EIP'] - }); - return params; - } // 设置一些请求参数的 默认值 - - } - }; - return _this; - } - - SCFDatasource.prototype.getMetrics = function (region) { - if (region === void 0) { - region = 'ap-guangzhou'; - } - - return __awaiter(this, void 0, void 0, function () { - var rawSet; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - return [4 - /*yield*/ - , _super.prototype.getMetrics.call(this, region)]; - - case 1: - rawSet = _a.sent(); - return [2 - /*return*/ - , rawSet.filter(function (item) { - var _a, _b, _c; - /* hack:这里多加了筛选条件,是因为后端数据不准确,坑啊! 只拿取包含eip的指标 */ - - - return (_c = (_b = (_a = item.Dimensions) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.Dimensions) === null || _c === void 0 ? void 0 : _c.includes('eip'); - })]; - } - }); - }); - }; - - return SCFDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_0__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (SCFDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/lb/query.ts": -/*!*******************************************!*\ - !*** ./datasource/tc_monitor/lb/query.ts ***! - \*******************************************/ -/*! exports provided: LBQueryCtrl, lbQuery */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LBQueryCtrl", function() { return LBQueryCtrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lbQuery", function() { return lbQuery; }); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! grafana/app/core/core_module */ "grafana/app/core/core_module"); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/lb/query_def.ts"); - - - -var LBQueryCtrl = -/** @class */ -function () { - LBQueryCtrl.$inject = ["$scope", "$rootScope"]; - - /** @ngInject */ - function LBQueryCtrl($scope, $rootScope) { - $scope.init = function () { - // $scope.LBQueryDescriptor = LBQueryDescriptor; - $scope.LBFilterDescriptor = _query_def__WEBPACK_IMPORTED_MODULE_1__["LBFilterDescriptor"]; - }; - - $scope.onChecked = function (srcField, dstField) { - if ($scope.target.queries[srcField] === true) { - $scope.target.queries[dstField] = false; - } - - $scope.onChange(); - }; - - $scope.getDropdown = function (field) { - switch (field) { - case 'zone': - return $scope.getZones(); - - default: - return []; - } - }; - - $scope.getZones = function () { - if (!$scope.region) { - return []; - } - - return $scope.datasource.getZones('cvm', $scope.region); - }; - - $scope.init(); - } - - return LBQueryCtrl; -}(); - - -var template = "\n
\n\n\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n\n\n
\n
\n \n \n \n \n \n
\n
\n\n
\n"; -function lbQuery() { - return { - template: template, - controller: LBQueryCtrl, - restrict: 'E', - scope: { - target: '=', - showDetail: '=', - region: '=', - datasource: '=', - getDropdownOptions: '&', - onChange: '&' - } - }; -} -grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default.a.directive('lbQuery', lbQuery); - -/***/ }), - -/***/ "./datasource/tc_monitor/lb/query_def.ts": -/*!***********************************************!*\ - !*** ./datasource/tc_monitor/lb/query_def.ts ***! - \***********************************************/ -/*! exports provided: LBFilterDescriptor, default, LBInstanceAliasList, LBInvalidDemensions, templateQueryIdMap, LBGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LBFilterDescriptor", function() { return LBFilterDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LBInstanceAliasList", function() { return LBInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LBInvalidDemensions", function() { return LBInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LBGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -var _a; - - // export const LBQueryDescriptor = [{ -// key: 'Offset', -// enDescriptor: 'Offset', -// cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', -// link: '', -// type: 'inputnumber', -// min: 0, -// }, -// { -// key: 'Limit', -// enDescriptor: 'Limit', -// cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为2000', -// link: '', -// type: 'inputnumber', -// min: 1, -// max: 2000, -// }, -// { -// key: 'AddressId', -// enDescriptor: 'Address Id', -// cnDescriptor: '标识 EIP 的唯一 ID ', -// link: '', -// type: 'inputmulti', -// } -// ]; - -var LBFilterDescriptor = [{ - key: 'address-id', - enDescriptor: 'Address ID', - cnDescriptor: 'EIP 的唯一 ID ', - link: '', - type: 'inputmulti' -}, { - key: 'address-name', - enDescriptor: 'Address Name', - cnDescriptor: 'EIP 名称 ', - link: '', - type: 'inputmulti' -}, { - key: 'address-ip', - enDescriptor: 'Address IP', - cnDescriptor: 'EIP 的 IP 地址 ', - link: '', - type: 'inputmulti' -}, { - key: 'address-status', - enDescriptor: 'Address Status', - cnDescriptor: 'EIP 的状态', - link: '', - type: 'select', - list: [{ - value: 'CREATING', - text: 'CREATING' - }, { - value: 'BINDING', - text: 'BINDING' - }, { - value: 'BIND', - text: 'BIND' - }, { - value: 'UNBINDING', - text: 'UNBINDING' - }, { - value: 'UNBIND', - text: 'UNBIND' - }, { - value: 'OFFLINING', - text: 'OFFLINING' - }, { - value: 'BIND_ENI', - text: 'BIND_ENI' - }] -}, { - key: 'instance-id', - enDescriptor: 'Instance ID', - cnDescriptor: '实例ID ', - link: '', - type: 'inputmulti' -}, { - key: 'private-ip-address', - enDescriptor: 'Private IP Address', - cnDescriptor: 'EIP 绑定的内网 IP', - link: '', - type: 'inputmulti' -}, { - key: 'network-interface-id', - enDescriptor: 'Network Interface ID', - cnDescriptor: 'EIP 绑定的弹性网卡 ID', - link: '', - type: 'inputmulti' -}, { - key: 'is-arrears', - enDescriptor: 'Arrears', - cnDescriptor: 'EIP 是否欠费 ', - link: '', - type: 'select', - list: [{ - text: '正常', - value: 'FALSE' - }, { - text: '欠费', - value: 'TRUE' - }] -}]; // const LBFilterFields = { -// "address-id": [], -// "address-name": [], -// "address-ip": [], -// "address-status ": [], -// "instance-id ": [], -// "private-ip-address": [], -// "network-interface-id ": [], -// "is-arrears ": [], -// }; - -var InstanceKey = 'AddressIds'; -var LB_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'AddressId', - version: '', - queries: (_a = { - Offset: 0, - Limit: 20 - }, _a[InstanceKey] = [''], _a.Filters = { - 'address-id': [], - 'address-name': [], - 'address-ip': [], - 'address-status ': [], - 'instance-id ': [], - 'private-ip-address': [], - 'network-interface-id ': [], - 'is-arrears ': [] - }, _a) -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - var params = {}; - - if (!lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(queries)) { - params.Limit = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Limit', 20) || 20; - params.Offset = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Offset', 0) || 0; - - if (queries.instanceIdsChecked) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isArray(queries[InstanceKey])) { - var InstanceIds = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.compact(queries[InstanceKey]); - - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(InstanceIds).length > 0) { - params[InstanceKey] = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(InstanceIds).slice(0, 100); - } - } - } else if (queries.filtersChecked) { - var Filters_1 = []; - - lodash__WEBPACK_IMPORTED_MODULE_0___default.a.forEach(queries.Filters, function (item, key) { - if (Filters_1.length > 9) { - return; - } - - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isArray(item)) { - item = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.compact(item); - - if (item.length > 0) { - Filters_1.push({ - Name: key, - Values: lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(item).slice(0, 5) - }); - } - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isObject(item)) { - if (!lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', []))) { - Filters_1.push({ - Name: key, - Values: lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', []).slice(0, 5) - }); - } - } - }); - - if (Filters_1.length > 0) { - params.Filters = Filters_1; - } - } - } - - return params; -} - -var LBInstanceAliasList = ['AddressId', 'AddressName', 'AddressIp']; // 维度eip对应于实例中的哪个字段?映射 - -var LBInvalidDemensions = { - eip: 'AddressIp' -}; -var templateQueryIdMap = { - instance: 'AddressId' -}; // 从monitor维度到LB实例对应字段的映射 -// export const metric2Instance = { -// functionName: 'FunctionName', -// namespace: 'Namespace' -// }; - -/* harmony default export */ __webpack_exports__["default"] = (LB_STATE); - // monitor监控数据默认支持的维度 -// export const LBDefaultDimensionList = ['functionName', 'namespace', 'version']; - -/***/ }), - -/***/ "./datasource/tc_monitor/lighthouse/datasource.ts": -/*!********************************************************!*\ - !*** ./datasource/tc_monitor/lighthouse/datasource.ts ***! - \********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/lighthouse/query_def.ts"); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/constants */ "./datasource/common/constants.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - - - -var LighthouseDatasource = -/** @class */ -function (_super) { - __extends(LighthouseDatasource, _super); - - function LighthouseDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = 'QCE/LIGHTHOUSE'; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_1__["LIGHTHOUSEInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_1__["LighthouseInvalidDemensions"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_1__["templateQueryIdMap"]; - _this.InstanceReqConfig = { - service: 'lighthouse', - action: 'DescribeInstances', - responseField: 'InstanceSet' - }; - return _this; - } - - LighthouseDatasource.prototype.getRegions = function () { - return this.doRequest({ - url: this.url + '/api', - data: { - Product: 'lighthouse' - } - }, 'api', { - action: 'DescribeRegions' - }).then(function (response) { - return lodash__WEBPACK_IMPORTED_MODULE_0___default.a.filter(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.map(response.RegionSet || [], function (item) { - return { - text: item.RegionName, - value: item.Region, - RegionState: item.RegionState - }; - }), function (item) { - return item.RegionState === 'AVAILABLE'; - }); - }); - }; - - LighthouseDatasource.prototype.getZones = function (region) { - var serviceInfo = Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["GetServiceAPIInfo"])(region, 'api'); - return this.doRequest({ - url: this.url + serviceInfo.path, - data: { - Product: 'lighthouse' - } - }, serviceInfo.service, { - region: region, - action: 'DescribeZones' - }).then(function (response) { - return lodash__WEBPACK_IMPORTED_MODULE_0___default.a.filter(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.map(response.ZoneSet || [], function (item) { - return { - text: item.ZoneName, - value: item.Zone, - ZoneState: item.ZoneState, - Zone: item.Zone - }; - }), function (item) { - return item.ZoneState === 'AVAILABLE'; - }); - }); - }; - - LighthouseDatasource.prototype.getMetrics = function (region) { - if (region === void 0) { - region = 'ap-guangzhou'; - } - - return __awaiter(this, void 0, void 0, function () { - var rawSet; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - return [4 - /*yield*/ - , _super.prototype.getMetrics.call(this, region)]; - - case 1: - rawSet = _a.sent(); - return [2 - /*return*/ - , lodash__WEBPACK_IMPORTED_MODULE_0___default.a.compact(rawSet.map(function (item) { - return Object(_query_def__WEBPACK_IMPORTED_MODULE_1__["modifyDimensons"])(item); - }))]; - } - }); - }); - }; - - return LighthouseDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_3__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (LighthouseDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/lighthouse/query.ts": -/*!***************************************************!*\ - !*** ./datasource/tc_monitor/lighthouse/query.ts ***! - \***************************************************/ -/*! exports provided: LighthouseQueryCtrl, lighthouseQuery */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LighthouseQueryCtrl", function() { return LighthouseQueryCtrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lighthouseQuery", function() { return lighthouseQuery; }); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! grafana/app/core/core_module */ "grafana/app/core/core_module"); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/lighthouse/query_def.ts"); - - - -var LighthouseQueryCtrl = -/** @class */ -function () { - LighthouseQueryCtrl.$inject = ["$scope", "$rootScope"]; - - /** @ngInject */ - function LighthouseQueryCtrl($scope, $rootScope) { - $scope.init = function () { - $scope.LighthouseFilterFieldsDescriptor = _query_def__WEBPACK_IMPORTED_MODULE_1__["LighthouseFilterFieldsDescriptor"]; - }; - - $scope.onChecked = function (srcField, dstField) { - if ($scope.target.queries[srcField] === true) { - $scope.target.queries[dstField] = false; - } - - $scope.onChange(); - }; - - $scope.getDropdown = function (field) { - switch (field) { - case 'zone': - return $scope.getZones(); - - default: - return []; - } - }; - - $scope.getZones = function () { - if (!$scope.region) { - return []; - } - - return $scope.datasource.getZones('lighthouse', $scope.region); - }; - - $scope.init(); - } - - return LighthouseQueryCtrl; -}(); - - -var template = "\n
\n \n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n \n \n \n
\n
\n
\n"; -function lighthouseQuery() { - return { - template: template, - controller: LighthouseQueryCtrl, - restrict: 'E', - scope: { - target: '=', - showDetail: '=', - region: '=', - datasource: '=', - getDropdownOptions: '&', - onChange: '&' - } - }; -} -grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default.a.directive('lighthouseQuery', lighthouseQuery); - -/***/ }), - -/***/ "./datasource/tc_monitor/lighthouse/query_def.ts": -/*!*******************************************************!*\ - !*** ./datasource/tc_monitor/lighthouse/query_def.ts ***! - \*******************************************************/ -/*! exports provided: default, LighthouseFilterFieldsDescriptor, LIGHTHOUSEInstanceAliasList, LighthouseInvalidDemensions, templateQueryIdMap, modifyDimensons, LIGHTHOUSEGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LighthouseFilterFieldsDescriptor", function() { return LighthouseFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LIGHTHOUSEInstanceAliasList", function() { return LIGHTHOUSEInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LighthouseInvalidDemensions", function() { return LighthouseInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "modifyDimensons", function() { return modifyDimensons; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LIGHTHOUSEGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -var __assign = undefined && undefined.__assign || function () { - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - } - - return t; - }; - - return __assign.apply(this, arguments); -}; - - -var LighthouseStateType = [{ - text: '创建中', - value: 'PENDING' -}, { - text: '创建失败', - value: 'LAUNCH_FAILED' -}, { - text: '运行中', - value: 'RUNNING' -}, { - text: '关机', - value: 'STOPPED' -}, { - text: '开机中', - value: 'STARTING' -}, { - text: '关机中', - value: 'STOPPING' -}, { - text: '重启中', - value: 'REBOOTING' -}, { - text: '停止待销毁', - value: 'SHUTDOWN' -}, { - text: '销毁中', - value: 'TERMINATING' -}]; -var LighthouseFilterFields = { - zone: [], - 'instance-name': [], - 'instance-state': {}, - 'private-ip-address': [], - 'public-ip-address': [] -}; -var LighthouseFilterFieldsDescriptor = [{ - key: 'instance-name', - enDescriptor: 'Instance Name', - cnDescriptor: '实例名称', - link: '', - type: 'inputmulti' -}, { - key: 'private-ip-address', - enDescriptor: 'Private IP Address', - cnDescriptor: '实例主网卡的内网IP', - link: '', - type: 'inputmulti' -}, { - key: 'public-ip-address', - enDescriptor: 'Public IP Address', - cnDescriptor: '实例主网卡的公网IP', - link: '', - type: 'inputmulti' -}, { - key: 'zone', - enDescriptor: 'Zone', - cnDescriptor: '可用区', - link: '', - type: 'dropdownmulti' -}, { - key: 'instance-state', - enDescriptor: 'Instance State', - cnDescriptor: '实例状态', - link: '', - type: 'select', - list: LighthouseStateType -}]; -var LIGHTHOUSE_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'InstanceId', - queries: { - Limit: 20, - Offset: 0, - instanceIdsChecked: false, - filtersChecked: false, - InstanceIds: [''], - Filters: __assign({}, LighthouseFilterFields) - } -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - var params = {}; - - if (!lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(queries)) { - params.Limit = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Limit', 20) || 20; - params.Offset = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Offset', 0) || 0; - - if (queries.instanceIdsChecked) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isArray(queries.InstanceIds)) { - var InstanceIds = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.compact(queries.InstanceIds); - - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(InstanceIds).length > 0) { - params.InstanceIds = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(InstanceIds).slice(0, 100); - } - } - } else if (queries.filtersChecked) { - var Filters_1 = []; - - lodash__WEBPACK_IMPORTED_MODULE_0___default.a.forEach(queries.Filters, function (item, key) { - if (Filters_1.length > 9) { - return; - } - - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isArray(item)) { - item = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.compact(item); - - if (item.length > 0) { - Filters_1.push({ - Name: key, - Values: lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(item).slice(0, 5) - }); - } - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isObject(item)) { - if (!lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', []))) { - Filters_1.push({ - Name: key, - Values: lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', []).slice(0, 5) - }); - } - } - }); - - if (Filters_1.length > 0) { - params.Filters = Filters_1; - } - } - } - - return params; -} - -var LIGHTHOUSEInstanceAliasList = ['InstanceId', 'InstanceName', 'PrivateIpAddresses', 'PublicIpAddresses']; -var LighthouseInvalidDemensions = { - instanceid: 'InstanceId' -}; -var templateQueryIdMap = { - instance: 'InstanceId' -}; - -function modifyDimensons(metricItem) { - var metricTmp = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.cloneDeep(metricItem); - - metricTmp.Dimensions.forEach(function (item) { - item.Dimensions = ['InstanceId']; - }); - return metricTmp; -} - -/* harmony default export */ __webpack_exports__["default"] = (LIGHTHOUSE_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/mongodb/datasource.ts": -/*!*****************************************************!*\ - !*** ./datasource/tc_monitor/mongodb/datasource.ts ***! - \*****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/mongodb/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -/* harmony import */ var _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/datasourceStorage */ "./datasource/common/datasourceStorage.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - -var __spreadArray = undefined && undefined.__spreadArray || function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -}; - - - - - - -var MONGODBDatasource = -/** @class */ -function (_super) { - __extends(MONGODBDatasource, _super); - - function MONGODBDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = 'QCE/CMONGO'; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_1__["MONGODBInstanceAliasList"]; - _this.ReplicaAliasList = ['ReplicaSetId', 'ReplicaSetName']; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_1__["templateQueryIdMap"]; - _this.queryMonitorExtraConfg = _query_def__WEBPACK_IMPORTED_MODULE_1__["queryMonitorExtraConfg"]; - _this.InstanceReqConfig = { - service: 'mongodb', - action: 'DescribeDBInstances', - responseField: 'InstanceDetails' - }; - return _this; - } - - MONGODBDatasource.prototype.getInvalidDimensions = function (selfIns, target) { - if (target.node && target.node !== '') { - return { - target: 'Node' - }; - } - - if (target.replica && target.replica !== '') { - return { - target: 'Replica' - }; - } - - return _query_def__WEBPACK_IMPORTED_MODULE_1__["MONGODBInvalidDemensions"]; - }; - - MONGODBDatasource.prototype.formatVariableDisplay = function (data, displayTpl, alias, aliasList) { - var _this = this; - - if (displayTpl) { - return displayTpl.replace(/\$\{(\w+)\}/g, function (a, b) { - if (!b || !aliasList.includes(b)) { - return ''; - } - - return _this.getAliasValue(data, b); - }); - } - - return this.getAliasValue(data, alias); - }; - - MONGODBDatasource.prototype.fetchMetricData = function (action, region, instance, query) { - return __awaiter(this, void 0, void 0, function () { - var display, res, replicaalias_1, result, res, replicasetid, targetReplica_1, result; - - var _this = this; - - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - display = query.display; - if (!(action === 'DescribeReplicas')) return [3 - /*break*/ - , 3]; - return [4 - /*yield*/ - , this.getInstances(region, { - InstanceIds: [instance[this.templateQueryIdMap.instance]] - })]; - - case 1: - res = _a.sent()[0]; - replicaalias_1 = query.replicaalias; - replicaalias_1 = this.ReplicaAliasList.includes(replicaalias_1) ? replicaalias_1 : this.templateQueryIdMap.replica; - result = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.map(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(res, 'ReplicaSets', []), function (item) { - var replicaAlias = _this.formatVariableDisplay(item, display, replicaalias_1, _this.ReplicaAliasList); - - item._InstanceAliasValue = replicaAlias || item[_this.templateQueryIdMap.replica]; - return { - text: item.ReplicaSetId, - value: item.ReplicaSetId - }; - }); - return [4 - /*yield*/ - , _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_3__["default"].setExtraStorage(this.service, this.queryMonitorExtraConfg.Replica.dim_KeyInStorage, lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(res, 'ReplicaSets', []))]; - - case 2: - _a.sent(); - - return [2 - /*return*/ - , result]; - - case 3: - if (!(action === 'DescribeReplicaNodes')) return [3 - /*break*/ - , 6]; - return [4 - /*yield*/ - , this.getInstances(region, { - InstanceIds: [instance[this.templateQueryIdMap.instance]] - })]; - - case 4: - res = _a.sent()[0]; - replicasetid = query.replicasetid; - targetReplica_1 = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.find(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(res, 'ReplicaSets', []), { - ReplicaSetId: this.getVariable(replicasetid) - }); - result = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.times(targetReplica_1.SecondaryNum, function (index) { - var nodeId = "".concat(targetReplica_1.ReplicaSetId, "-node-slave").concat(index); - return { - text: nodeId, - value: nodeId - }; - }); - - if (targetReplica_1) { - result = __spreadArray([{ - text: "".concat(targetReplica_1.ReplicaSetId, "-node-primary"), - value: "".concat(targetReplica_1.ReplicaSetId, "-node-primary") - }], result, true); - } - - return [4 - /*yield*/ - , _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_3__["default"].setExtraStorage(this.service, this.queryMonitorExtraConfg.Node.dim_KeyInStorage, result.map(function (item) { - return { - NodeId: item.value, - _InstanceAliasValue: item.value - }; - }))]; - - case 5: - _a.sent(); - - return [2 - /*return*/ - , result]; - - case 6: - return [2 - /*return*/ - , []]; - } - }); - }); - }; - - return MONGODBDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_2__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (MONGODBDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/mongodb/query.ts": -/*!************************************************!*\ - !*** ./datasource/tc_monitor/mongodb/query.ts ***! - \************************************************/ -/*! exports provided: MongoDBQueryCtrl, mongodbQuery */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MongoDBQueryCtrl", function() { return MongoDBQueryCtrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mongodbQuery", function() { return mongodbQuery; }); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! grafana/app/core/core_module */ "grafana/app/core/core_module"); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/mongodb/query_def.ts"); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/constants */ "./datasource/common/constants.ts"); -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - -var __spreadArray = undefined && undefined.__spreadArray || function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -}; - - - - - - -var MongoDBQueryCtrl = -/** @class */ -function () { - MongoDBQueryCtrl.$inject = ["$scope", "$rootScope"]; - - /** @ngInject */ - function MongoDBQueryCtrl($scope, $rootScope) { - var _this = this; - - $scope.init = function () { - $scope.MONGODBFieldsDescriptor = _query_def__WEBPACK_IMPORTED_MODULE_2__["MONGODBFieldsDescriptor"]; - }; - - $scope.onChecked = function (srcField, dstField) { - if ($scope.target.queries[srcField] === true) { - $scope.target.queries[dstField] = false; - } - - $scope.onChange(); - }; - - $scope.getDropdown = function (field) { - switch (field) { - default: - return []; - } - }; - - $scope.onInstanceChange = function (n, o) { - if (n === o) { - return; - } - - $scope.target.replica = ''; - $scope.target.node = ''; - }; - - $scope.getVariableId = function (data, type) { - var variableData = data; - var service = Object(_common_constants__WEBPACK_IMPORTED_MODULE_3__["GetServiceFromNamespace"])('QCE/CMONGO'); - variableData = $scope.datasource.getServiceFn(service, 'getVariable')(variableData); - - if (!variableData) { - return ''; - } - - try { - variableData = JSON.parse(variableData)[_query_def__WEBPACK_IMPORTED_MODULE_2__["templateQueryIdMap"][type]]; - } catch (error) {// console.log(); - } - - return variableData; - }; - - $scope.getExtraDropdown = function (target, type) { - return __awaiter(_this, void 0, void 0, function () { - var _a, instance, replica, service, instanceId, region, res, replicaId, targetReplica_1, options; - - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - _a = $scope.target, instance = _a.instance, replica = _a.replica; - service = Object(_common_constants__WEBPACK_IMPORTED_MODULE_3__["GetServiceFromNamespace"])('QCE/CMONGO'); - instanceId = $scope.getVariableId(instance, 'instance'); - region = $scope.datasource.getServiceFn(service, 'getVariable')(target.region); - return [4 - /*yield*/ - , $scope.datasource.getServiceFn(service, 'getInstances')(region, { - InstanceIds: [instanceId] - })]; - - case 1: - res = _b.sent()[0]; - - if (type === 'replica') { - return [2 - /*return*/ - , Object(lodash__WEBPACK_IMPORTED_MODULE_1__["map"])(Object(lodash__WEBPACK_IMPORTED_MODULE_1__["get"])(res, 'ReplicaSets', []), function (item) { - item._InstanceAliasValue = item.ReplicaSetId; - return { - text: item.ReplicaSetId, - value: JSON.stringify(item) - }; - })]; - } - - if (type === 'node' && replica !== '') { - replicaId = $scope.getVariableId(replica, 'replica'); - targetReplica_1 = Object(lodash__WEBPACK_IMPORTED_MODULE_1__["find"])(Object(lodash__WEBPACK_IMPORTED_MODULE_1__["get"])(res, 'ReplicaSets', []), { - ReplicaSetId: replicaId - }); - options = Object(lodash__WEBPACK_IMPORTED_MODULE_1__["times"])(targetReplica_1.SecondaryNum, function (index) { - var nodeId = "".concat(targetReplica_1.ReplicaSetId, "-node-slave").concat(index); - return { - text: nodeId, - value: JSON.stringify({ - NodeId: nodeId, - _InstanceAliasValue: "".concat(targetReplica_1.ReplicaSetId, " - ").concat(nodeId) - }) - }; - }); - return [2 - /*return*/ - , __spreadArray([{ - text: "".concat(targetReplica_1.ReplicaSetId, "-node-primary"), - value: JSON.stringify({ - NodeId: "".concat(targetReplica_1.ReplicaSetId, "-node-primary"), - _InstanceAliasValue: "".concat(targetReplica_1.ReplicaSetId, " - ").concat("".concat(targetReplica_1.ReplicaSetId, "-node-primary")) - }) - }], options, true)]; - } - - return [2 - /*return*/ - , []]; - } - }); - }); - }; - - $scope.init(); - } - - return MongoDBQueryCtrl; -}(); - - -var template = "\n
\n \n
\n
\n \n \n \n \n \n \n \n
\n
\n
\n\n
\n
\n \n
\n \n \n
\n
\n
\n\n
\n
\n \n
\n \n \n
\n
\n
\n"; -function mongodbQuery() { - return { - template: template, - controller: MongoDBQueryCtrl, - restrict: 'E', - scope: { - target: '=', - showDetail: '=', - region: '=', - datasource: '=', - onRefresh: '&', - onChange: '&' - }, - link: function link(scope, element, attrs) { - scope.$watch('target.instance', function (newValue, oldValue) { - var _a; - - (_a = scope.onInstanceChange) === null || _a === void 0 ? void 0 : _a.call(scope, newValue, oldValue); - }); - } - }; -} -grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default.a.directive('mongodbQuery', mongodbQuery); - -/***/ }), - -/***/ "./datasource/tc_monitor/mongodb/query_def.ts": -/*!****************************************************!*\ - !*** ./datasource/tc_monitor/mongodb/query_def.ts ***! - \****************************************************/ -/*! exports provided: default, MONGODBFieldsDescriptor, MONGODBInvalidDemensions, MONGODBInstanceAliasList, templateQueryIdMap, queryMonitorExtraConfg, MONGODBGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MONGODBFieldsDescriptor", function() { return MONGODBFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MONGODBInvalidDemensions", function() { return MONGODBInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MONGODBInstanceAliasList", function() { return MONGODBInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryMonitorExtraConfg", function() { return queryMonitorExtraConfg; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MONGODBGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -var __assign = undefined && undefined.__assign || function () { - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - } - - return t; - }; - - return __assign.apply(this, arguments); -}; - - -var InstanceTypes = [{ - text: '所有实例', - value: 0 -}, { - text: '正式实例', - value: 1 -}, { - text: '临时实例', - value: 2 -}, { - text: '只读实例', - value: 3 -}, { - text: '正式,只读,灾备实例', - value: -1 -}]; -var ClusterTypes = [{ - text: '副本集实例', - value: 0 -}, { - text: '分片实例', - value: 1 -}, { - text: '所有实例', - value: -1 -}]; -var Status = [{ - text: '待初始化', - value: 0 -}, { - text: '流程执行中', - value: 1 -}, { - text: '实例有效', - value: 2 -}, { - text: '实例已过期', - value: -2 -}]; -var PayMode = [{ - text: '按量计费', - value: 0 -}, { - text: '包年包月', - value: 1 -}, { - text: '按量包年包月计费', - value: -1 -}]; -var OrderBy = [{ - text: 'ProjectId', - value: 'ProjectId' -}, { - text: 'InstanceName', - value: 'InstanceName' -}, { - text: 'CreateTime', - value: 'CreateTime' -}]; -var OrderByType = [{ - text: '升序', - value: 'ASC' -}, { - text: '降序', - value: 'DESC' -}]; -var MongoDBFields = { - InstanceIds: [], - InstanceType: {}, - ClusterType: {}, - Status: [], - VpcId: '', - SubnetId: '', - PayMode: {}, - Limit: 20, - Offset: 0, - OrderBy: '', - OrderByType: '' -}; -var MONGODBFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputnumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputnumber', - min: 1, - max: 100 -}, { - key: 'InstanceIds', - enDescriptor: 'InstancesIds', - cnDescriptor: '实例名称', - type: 'inputmulti' -}, { - key: 'InstanceType', - enDescriptor: 'InstanceType', - cnDescriptor: '实例类型', - link: '', - type: 'select', - list: InstanceTypes -}, { - key: 'ClusterType', - enDescriptor: 'ClusterType', - cnDescriptor: '集群类型', - link: '', - type: 'select', - list: ClusterTypes -}, { - key: 'Status', - enDescriptor: 'Status', - cnDescriptor: '实例状态', - link: '', - multiple: true, - type: 'select', - list: Status -}, { - key: 'VpcId', - enDescriptor: 'VpcId', - cnDescriptor: '私有网络的ID', - link: '', - type: 'input' -}, { - key: 'SubnetId', - enDescriptor: 'SubnetId', - cnDescriptor: '私有网络的子网ID,基础网络则不传该参数。入参设置该参数的同时,必须设置相应的VpcId', - link: '', - type: 'input' -}, { - key: 'PayMode', - enDescriptor: 'PayMode', - cnDescriptor: '付费类型', - link: '', - type: 'select', - list: PayMode -}, { - key: 'OrderBy', - enDescriptor: 'OrderBy', - cnDescriptor: '排序字段', - link: '', - type: 'select', - list: OrderBy -}, { - key: 'OrderByType', - enDescriptor: 'OrderByType', - cnDescriptor: '排序方式', - link: '', - type: 'select', - list: OrderByType -}]; -var MONGODB_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'InstanceId', - queries: __assign({}, MongoDBFields) -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - var params = {}; - - if (!lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(queries)) { - params.Limit = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Limit', 20) || 20; - params.Offset = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Offset', 0) || 0; - queries = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.omit(queries, ['Offset', 'Limit']); - - lodash__WEBPACK_IMPORTED_MODULE_0___default.a.forEach(queries, function (item, key) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isArray(item)) { - item = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.compact(item); - - if (item.length > 0) { - params[key] = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(item); - } - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isObject(item)) { - // select 单选 - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isNumber(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', undefined)) || !lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', undefined))) { - params[key] = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value'); - } - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isNumber(item) || !lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(item)) { - params[key] = item; - } - }); - } - - return params; -} - -var MONGODBInstanceAliasList = ['InstanceId', 'InstanceName']; -var MONGODBInvalidDemensions = { - target: 'InstanceId' -}; -var templateQueryIdMap = { - instance: 'InstanceId', - replica: 'ReplicaSetId' -}; -var queryMonitorExtraConfg = { - Replica: { - dim_KeyInStorage: 'ReplicaSets', - dim_KeyInTarget: 'replica', - dim_KeyInMap: 'ReplicaSetId', - dim_KeyInIns: 'ReplicaSetId' - }, - Node: { - dim_KeyInStorage: 'ReplicaNodeSets', - dim_KeyInTarget: 'node', - dim_KeyInMap: 'NodeId', - dim_KeyInIns: 'NodeId' - } -}; -/* harmony default export */ __webpack_exports__["default"] = (MONGODB_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/mr/datasource.ts": -/*!************************************************!*\ - !*** ./datasource/tc_monitor/mr/datasource.ts ***! - \************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/constants */ "./datasource/common/constants.ts"); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/mr/query_def.ts"); -/* harmony import */ var _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/datasourceStorage */ "./datasource/common/datasourceStorage.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __assign = undefined && undefined.__assign || function () { - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - } - - return t; - }; - - return __assign.apply(this, arguments); -}; - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - - - - -var MrHdfsDatasource = -/** @class */ -function (_super) { - __extends(MrHdfsDatasource, _super); - - function MrHdfsDatasource() { - var _this = _super !== null && _super.apply(this, arguments) || this; - - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_3__["InvalidDemensions"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_3__["InstanceAliasList"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_3__["templateQueryIdMap"]; - _this.extrasAlias = []; - _this.keyInStorage = _query_def__WEBPACK_IMPORTED_MODULE_3__["keyInStorage"]; - _this.queryMonitorExtraConfg = _query_def__WEBPACK_IMPORTED_MODULE_3__["queryMonitorExtraConfg"]; - _this.InstanceReqConfig = { - service: 'emr', - action: 'DescribeInstances', - responseField: 'ClusterList', - interceptor: { - request: function request(params) { - return __assign(__assign({}, params), { - DisplayStrategy: params.DisplayStrategy || 'monitorManage', - ProjectId: params.ProjectId || -1 - }); - }, - response: function response(data) { - return data.map(function (_a) { - var ClusterId = _a.ClusterId, - ClusterName = _a.ClusterName; - return { - ClusterId: ClusterId, - ClusterName: ClusterName - }; - }); - } - } - }; - return _this; - } - - MrHdfsDatasource.prototype.fetchAllNodes = function (region, params) { - return __awaiter(this, void 0, void 0, function () { - var serviceInfo, rs; - - var _this = this; - - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - serviceInfo = Object(_common_constants__WEBPACK_IMPORTED_MODULE_0__["GetServiceAPIInfo"])(region, 'emr'); - return [4 - /*yield*/ - , Object(_common_utils__WEBPACK_IMPORTED_MODULE_1__["fetchAllFactory"])(function (data) { - return _this.doRequest({ - url: _this.url + serviceInfo.path, - data: data - }, serviceInfo.service, { - region: region, - action: 'DescribeClusterNodes' - }); - }, __assign(__assign({}, params), { - isOffsetPage: true - }), 'NodeList')]; - - case 1: - rs = _a.sent(); // return rs[0].map((item) => ({ text: item.Ip, value: item.Ip })); - - return [2 - /*return*/ - , rs[0]]; - } - }); - }); - }; - - MrHdfsDatasource.prototype.fetchMetricData = function (action, region, instance) { - return __awaiter(this, void 0, void 0, function () { - var result, _a, resultT; - - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - _a = action; - - switch (_a) { - case 'DescribeClusterNodes': - return [3 - /*break*/ - , 1]; - } - - return [3 - /*break*/ - , 4]; - - case 1: - return [4 - /*yield*/ - , this.fetchAllNodes(region, { - InstanceId: instance.ClusterId, - NodeFlag: 'all' - })]; - - case 2: - resultT = _b.sent(); - result = resultT.map(function (item) { - item._InstanceAliasValue = item[_query_def__WEBPACK_IMPORTED_MODULE_3__["templateQueryIdMap"].node]; - return { - text: item[_query_def__WEBPACK_IMPORTED_MODULE_3__["templateQueryIdMap"].node], - value: item[_query_def__WEBPACK_IMPORTED_MODULE_3__["templateQueryIdMap"].node] - }; - }); - return [4 - /*yield*/ - , _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_4__["default"].setExtraStorage(this.service, this.keyInStorage.node, resultT)]; - - case 3: - _b.sent(); - - return [2 - /*return*/ - , result]; - - case 4: - return [2 - /*return*/ - , []]; - } - }); - }); - }; - - return MrHdfsDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_2__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (MrHdfsDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/mr/query.ts": -/*!*******************************************!*\ - !*** ./datasource/tc_monitor/mr/query.ts ***! - \*******************************************/ -/*! exports provided: MrQueryCtrl, mrQuery */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MrQueryCtrl", function() { return MrQueryCtrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mrQuery", function() { return mrQuery; }); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/mr/query_def.ts"); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! grafana/app/core/core_module */ "grafana/app/core/core_module"); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_1__); -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - -var ExtraFields = [{ - label: 'NodeIP', - field: 'nodeIP' -}]; - -var MrQueryCtrl = -/** @class */ -function () { - MrQueryCtrl.$inject = ["$scope", "$rootScope"]; - - /** @ngInject */ - function MrQueryCtrl($scope, $rootScope) { - var _this = this; - - $scope.init = function () { - $scope.InstanceQueryDescriptor = _query_def__WEBPACK_IMPORTED_MODULE_0__["InstanceQueryDescriptor"]; - }; - - $scope.getDropdown = function (field) { - switch (field) { - default: - return []; - } - }; // 各个实例下的订阅,由于不想每次都重复发请求,所以这里做了一层缓存,数据结构为{ [instanceId]: { } } - - - $scope.cacheMap = {}; - - $scope.getExtraFields = function () { - var _a; - - return Object.keys((_a = $scope.dims) !== null && _a !== void 0 ? _a : {}).some(function (item) { - return item.startsWith('host4'); - }) ? ExtraFields : []; // return ExtraFields; - }; - - $scope.getInstanceId = function () { - var instance = $scope.target.instance; - instance = $scope.datasource.getServiceFn('mrHDFS', 'getVariable')(instance); - - if (!instance) { - return ''; - } - - try { - instance = JSON.parse(instance).ClusterId; - } catch (error) {// console.log(); - } - - return instance; - }; - - $scope.onExtraFieldChange = function (field) { - $scope.onRefresh(); - }; - - $scope.getExtraDropdown = function (target, field) { - return __awaiter(_this, void 0, void 0, function () { - var InstanceId, data, region, fetcher, dataT; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!(field === 'nodeIP')) return [3 - /*break*/ - , 3]; - InstanceId = $scope.getInstanceId(); - data = $scope.cacheMap[InstanceId]; - if (!!data) return [3 - /*break*/ - , 2]; - region = $scope.datasource.getServiceFn('mrHDFS', 'getVariable')(target.region); - fetcher = $scope.datasource.getServiceFn('mrHDFS', 'fetchAllNodes'); - return [4 - /*yield*/ - , fetcher(region, { - InstanceId: InstanceId, - NodeFlag: 'all' - })]; - - case 1: - dataT = _a.sent(); - data = dataT.map(function (item) { - item._InstanceAliasValue = item[_query_def__WEBPACK_IMPORTED_MODULE_0__["templateQueryIdMap"].node]; - return { - text: item[_query_def__WEBPACK_IMPORTED_MODULE_0__["templateQueryIdMap"].node], - value: JSON.stringify(item) - }; - }); - _a.label = 2; - - case 2: - // 缓存 - $scope.cacheMap[InstanceId] = data; - return [2 - /*return*/ - , data]; - - case 3: - return [2 - /*return*/ - , []]; - } - }); - }); - }; - - $scope.init(); - } - - return MrQueryCtrl; -}(); - - -var template = "\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n
\n
\n
\n \n
\n\n \n \n
\n
\n
\n
\n\n
\n"; -function mrQuery() { - return { - template: template, - controller: MrQueryCtrl, - restrict: 'E', - scope: { - target: '=', - showDetail: '=', - region: '=', - datasource: '=', - getDropdownOptions: '&', - onChange: '&', - onRefresh: '&', - dims: '=' - } - }; -} -grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_1___default.a.directive('mrQuery', mrQuery); - -/***/ }), - -/***/ "./datasource/tc_monitor/mr/query_def.ts": -/*!***********************************************!*\ - !*** ./datasource/tc_monitor/mr/query_def.ts ***! - \***********************************************/ -/*! exports provided: InstanceQueryDescriptor, InvalidDemensions, templateQueryIdMap, InstanceAliasList, GetInstanceQueryParams, queryMonitorExtraConfg, keyInStorage, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InstanceQueryDescriptor", function() { return InstanceQueryDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InvalidDemensions", function() { return InvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InstanceAliasList", function() { return InstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryMonitorExtraConfg", function() { return queryMonitorExtraConfg; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keyInStorage", function() { return keyInStorage; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); - -var InstanceQueryDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputnumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为10,最小值为1,最大值为100', - link: '', - type: 'inputnumber', - min: 1, - max: 100 -}, { - key: 'InstanceIds', - enDescriptor: 'InstanceIds', - cnDescriptor: '按照一个或者多个实例ID查询。实例ID形如: emr-xxxxxxxx ', - link: '', - type: 'inputmulti' -}, { - key: 'OrderField', - enDescriptor: 'OrderBy', - cnDescriptor: '排序字段', - link: '', - type: 'select', - list: [{ - text: '实例ID', - value: 'clusterId' - }, { - text: '创建时间', - value: 'addTime' - }, { - text: '状态', - value: 'status' - }] -}, { - key: 'Asc', - enDescriptor: 'Order Direction', - cnDescriptor: '排序方式', - link: '', - type: 'select', - list: [{ - text: '降序', - value: 0 - }, { - text: '升序', - value: 1 - }] -}, { - key: 'ProjectId', - enDescriptor: 'ProjectId', - cnDescriptor: '实例所属项目ID', - link: '', - type: 'inputnumber' -}, { - key: 'DisplayStrategy', - enDescriptor: 'DisplayStrategy', - cnDescriptor: '集群筛选策略', - link: '', - type: 'select', - list: [{ - text: '未销毁的实例', - value: 'clusterList' - }, { - text: '正常运行的实例', - value: 'monitorManage' - }] -}]; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - var params = {}; - - if (!lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(queries)) { - params.Limit = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Limit', 20) || 20; - params.Offset = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Offset', 0) || 0; - queries = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.omit(queries, ['Offset', 'Limit']); - - lodash__WEBPACK_IMPORTED_MODULE_0___default.a.forEach(queries, function (item, key) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isArray(item)) { - item = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.compact(item); - - if (item.length > 0) { - params[key] = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(item); - } - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isObject(item)) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isNumber(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', undefined)) || !lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', undefined))) { - params[key] = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value'); - } - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isNumber(item) || !lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(item)) { - params[key] = item; - } - }); - } - - return params; -} // 向实例里面塞dimensions对应的值,dimension中的key对应到实例中的key - - -var InvalidDemensions = new Proxy({}, { - get: function get(target, k, receiver) { - if (typeof k === 'string') { - if (k.startsWith('id4')) return 'ClusterId'; // id4**** - - if (k.startsWith('host4')) return 'Ip'; // host4*** - } - - return Reflect.get(target, k, receiver); - }, - has: function has(target, propKey) { - return true; - } -}); -var templateQueryIdMap = { - instance: 'ClusterId', - node: 'Ip' -}; // 需要缓存到storage的内容的key列表 - -var keyInStorage = { - node: 'nodeIP' -}; -/** - * 如果有InstanceId额外的维度,原则上都需要传入此map结构配置 - * - * `key` 的含义: - * 经过InvalidDemensions处理后的string。topicId => TopicId。 - * 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId - * - * `value` 的含义: - * @param {1} dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、 - * @param {2} dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。 - * 默认取通过InvalidDemsion处理后的key - * @param {3} dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。 - * 即:templateQueryIdMap中内容。 - * 联合上面 2 的内容筛选出原始sourceMap - */ - -var queryMonitorExtraConfg = { - Ip: { - dim_KeyInStorage: keyInStorage.node, - dim_KeyInTarget: 'nodeIP', - dim_KeyInMap: templateQueryIdMap.node - } -}; // 与名称挂钩的变量 - -var InstanceAliasList = ['ClusterId', 'ClusterName']; - // 界面状态模型,default - -/* harmony default export */ __webpack_exports__["default"] = ({ - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'ClusterId', - nodeIP: '', - queries: { - Offset: 0, - Limit: 10, - DisplayStrategy: '', - OrderBy: {}, - Order: {}, - InstanceIds: [], - ProjectId: -1, - OrderField: '', - Asc: '' - } -}); - -/***/ }), - -/***/ "./datasource/tc_monitor/nat_gateway/datasource.ts": -/*!*********************************************************!*\ - !*** ./datasource/tc_monitor/nat_gateway/datasource.ts ***! - \*********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/nat_gateway/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - - - - -var NATGATEWAYDatasource = -/** @class */ -function (_super) { - __extends(NATGATEWAYDatasource, _super); - - function NATGATEWAYDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = 'QCE/NAT_GATEWAY'; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["NATGATEWAYInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["NATInvalidDemensions"]; - _this.templateQueryIdMap = { - instance: 'NatGatewayId' - }; - _this.InstanceReqConfig = { - service: 'vpc', - action: 'DescribeNatGateways', - responseField: 'NatGatewaySet' - }; - return _this; - } - - return NATGATEWAYDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (NATGATEWAYDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/nat_gateway/query.ts": -/*!****************************************************!*\ - !*** ./datasource/tc_monitor/nat_gateway/query.ts ***! - \****************************************************/ -/*! exports provided: NatGatewayQueryCtrl, natGatewayQuery */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NatGatewayQueryCtrl", function() { return NatGatewayQueryCtrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "natGatewayQuery", function() { return natGatewayQuery; }); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! grafana/app/core/core_module */ "grafana/app/core/core_module"); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/nat_gateway/query_def.ts"); - - - -var NatGatewayQueryCtrl = -/** @class */ -function () { - NatGatewayQueryCtrl.$inject = ["$scope", "$rootScope"]; - - /** @ngInject */ - function NatGatewayQueryCtrl($scope, $rootScope) { - $scope.init = function () { - $scope.NATGatewayFilterFieldsDescriptor = _query_def__WEBPACK_IMPORTED_MODULE_1__["NATGatewayFilterFieldsDescriptor"]; - }; - - $scope.onChecked = function (srcField, dstField) { - if ($scope.target.queries[srcField] === true) { - $scope.target.queries[dstField] = false; - } - - $scope.onChange(); - }; - - $scope.getDropdown = function (field) { - switch (field) { - default: - return []; - } - }; - - $scope.init(); - } - - return NatGatewayQueryCtrl; -}(); - - -var template = "\n
\n\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n \n \n \n
\n
\n\n
\n"; -function natGatewayQuery() { - return { - template: template, - controller: NatGatewayQueryCtrl, - restrict: 'E', - scope: { - target: '=', - showDetail: '=', - region: '=', - datasource: '=', - getDropdownOptions: '&', - onChange: '&' - } - }; -} -grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default.a.directive('natGatewayQuery', natGatewayQuery); - -/***/ }), - -/***/ "./datasource/tc_monitor/nat_gateway/query_def.ts": -/*!********************************************************!*\ - !*** ./datasource/tc_monitor/nat_gateway/query_def.ts ***! - \********************************************************/ -/*! exports provided: default, NATGatewayFilterFieldsDescriptor, NATGATEWAYInstanceAliasList, templateQueryIdMap, NATInvalidDemensions, NATGATEWAYGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NATGatewayFilterFieldsDescriptor", function() { return NATGatewayFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NATGATEWAYInstanceAliasList", function() { return NATGATEWAYInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NATInvalidDemensions", function() { return NATInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NATGATEWAYGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -var __assign = undefined && undefined.__assign || function () { - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - } - - return t; - }; - - return __assign.apply(this, arguments); -}; - - -var NATGATEWAYInstanceAliasList = ['NatGatewayId', 'NatGatewayName']; -var NATGatewayFilterFields = { - 'nat-gateway-id': [], - 'nat-gateway-name': [], - 'vpc-id': [] -}; -var NATGatewayFilterFieldsDescriptor = [{ - key: 'nat-gateway-id', - enDescriptor: 'NatGateway ID', - cnDescriptor: 'NAT网关统一 ID', - link: '', - type: 'inputmulti' -}, { - key: 'nat-gateway-name', - enDescriptor: 'NatGateway Name', - cnDescriptor: 'NatGateway Name', - link: '', - type: 'inputmulti' -}, { - key: 'vpc-id', - enDescriptor: 'VPC ID', - cnDescriptor: '私有网络 ID', - link: '', - type: 'inputmulti' -}]; -var NATGATEWAY_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'NatGatewayId', - queries: { - Limit: 20, - Offset: 0, - instanceIdsChecked: false, - filtersChecked: false, - NatGatewayIds: [''], - Filters: __assign({}, NATGatewayFilterFields) - } -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - var params = {}; - - if (!lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(queries)) { - params.Limit = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Limit', 20) || 20; - params.Offset = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Offset', 0) || 0; - - if (queries.instanceIdsChecked) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isArray(queries.NatGatewayIds)) { - var NatGatewayIds = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.compact(queries.NatGatewayIds); - - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(NatGatewayIds).length > 0) { - params.InstanceIds = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(NatGatewayIds).slice(0, 100); - } - } - } else if (queries.filtersChecked) { - var Filters_1 = []; - - lodash__WEBPACK_IMPORTED_MODULE_0___default.a.forEach(queries.Filters, function (item, key) { - if (Filters_1.length > 9) { - return; - } - - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isArray(item)) { - item = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.compact(item); - - if (item.length > 0) { - Filters_1.push({ - Name: key, - Values: lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(item).slice(0, 5) - }); - } - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isObject(item)) { - if (!lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', []))) { - Filters_1.push({ - Name: key, - Values: lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', []).slice(0, 5) - }); - } - } - }); - - if (Filters_1.length > 0) { - params.Filters = Filters_1; - } - } - } - - return params; -} - -var templateQueryIdMap = { - instance: 'NatGatewayId' -}; -var NATInvalidDemensions = { - natId: 'NatGatewayId' -}; -/* harmony default export */ __webpack_exports__["default"] = (NATGATEWAY_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/ov_cdn/datasource.ts": -/*!****************************************************!*\ - !*** ./datasource/tc_monitor/ov_cdn/datasource.ts ***! - \****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/ov_cdn/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __assign = undefined && undefined.__assign || function () { - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - } - - return t; - }; - - return __assign.apply(this, arguments); -}; - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - -var OVCDNDatasource = -/** @class */ -function (_super) { - __extends(OVCDNDatasource, _super); - - function OVCDNDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = 'QCE/OV_CDN'; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["OVCDNInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["OVCDNInvalidDemensions"]; - _this.templateQueryIdMap = { - instance: 'Domain' - }; - _this.InstanceReqConfig = { - service: 'cdn', - action: 'DescribeDomains', - responseField: 'Domains' - }; - return _this; - } - - OVCDNDatasource.prototype.metricFindQuery = function (query, regex) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , _super.prototype.metricFindQuery.call(this, __assign(__assign({}, query), { - region: 'ap-guangzhou' - }), regex)]; - }); - }); - }; - - return OVCDNDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (OVCDNDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/ov_cdn/query.ts": -/*!***********************************************!*\ - !*** ./datasource/tc_monitor/ov_cdn/query.ts ***! - \***********************************************/ -/*! exports provided: OVCDNQueryCtrl, ovCdnQuery */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OVCDNQueryCtrl", function() { return OVCDNQueryCtrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ovCdnQuery", function() { return ovCdnQuery; }); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! grafana/app/core/core_module */ "grafana/app/core/core_module"); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/ov_cdn/query_def.ts"); - - - -var OVCDNQueryCtrl = -/** @class */ -function () { - OVCDNQueryCtrl.$inject = ["$scope", "$rootScope"]; - - /** @ngInject */ - function OVCDNQueryCtrl($scope, $rootScope) { - $scope.init = function () { - $scope.OVCDNFilterFieldsDescriptor = _query_def__WEBPACK_IMPORTED_MODULE_1__["OVCDNFilterFieldsDescriptor"]; - }; // $scope.onChecked = (srcField, dstField) => { - // if ($scope.target.queries[srcField] === true) { - // $scope.target.queries[dstField] = false; - // } - // $scope.onChange(); - // }; - // $scope.getDropdown = (field) => { - // switch (field) { - // case 'zone': - // return $scope.getZones(); - // default: - // return []; - // } - // }; - // $scope.getZones = () => { - // if (!$scope.region) { - // return []; - // } - // return $scope.datasource.getZones('cvm', $scope.region); - // }; - - - $scope.init(); - } - - return OVCDNQueryCtrl; -}(); - - -var template = "\n
\n\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n\n\n\n\n
\n\n
\n"; -function ovCdnQuery() { - return { - template: template, - controller: OVCDNQueryCtrl, - restrict: 'E', - scope: { - target: '=', - showDetail: '=', - region: '=', - datasource: '=', - getDropdownOptions: '&', - onChange: '&' - } - }; -} -grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default.a.directive('ovCdnQuery', ovCdnQuery); - -/***/ }), - -/***/ "./datasource/tc_monitor/ov_cdn/query_def.ts": -/*!***************************************************!*\ - !*** ./datasource/tc_monitor/ov_cdn/query_def.ts ***! - \***************************************************/ -/*! exports provided: default, OVCDNFilterFieldsDescriptor, OVCDNInstanceAliasList, templateQueryIdMap, OVCDNInvalidDemensions, OVCDNGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OVCDNFilterFieldsDescriptor", function() { return OVCDNFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OVCDNInstanceAliasList", function() { return OVCDNInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OVCDNInvalidDemensions", function() { return OVCDNInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OVCDNGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -var __assign = undefined && undefined.__assign || function () { - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - } - - return t; - }; - - return __assign.apply(this, arguments); -}; - - -var CDNFilterFields = { - origin: [], - domain: [], - resourceId: [], - status: [], - serviceType: [], - projectId: [], - domainType: [], - fullUrlCache: [], - https: [], - originPullProtocol: [], - tagKey: [] -}; -var OVCDNFilterFieldsDescriptor = [{ - key: 'origin', - enDescriptor: 'origin', - cnDescriptor: '主源站', - link: '', - type: 'inputmulti' -}, { - key: 'domain', - enDescriptor: 'domain', - cnDescriptor: '域名', - link: '', - type: 'inputmulti' -}, { - key: 'resourceId', - enDescriptor: 'resourceId', - cnDescriptor: '域名id', - link: '', - type: 'inputmulti' -}, { - key: 'status', - enDescriptor: 'status', - cnDescriptor: '域名状态', - link: '', - type: 'select', - list: [{ - text: 'online', - value: 'online' - }, { - text: 'offline', - value: 'offline' - }, { - text: 'processing', - value: 'processing' - }] -}, { - key: 'serviceType', - enDescriptor: 'serviceType', - cnDescriptor: '业务类型', - link: '', - type: 'select', - list: [{ - text: 'web', - value: 'web' - }, { - text: 'download', - value: 'download' - }, { - text: 'media', - value: 'media' - }] -}, { - key: 'projectId', - enDescriptor: 'projectId', - cnDescriptor: '项目ID', - link: '', - type: 'inputNumbermulti' -}, { - key: 'domainType', - enDescriptor: 'domainType', - cnDescriptor: '主源站类型', - link: '', - type: 'select', - list: [{ - text: '自有源', - value: 'cname' - }, { - text: 'cos接入', - value: 'cos' - }] -}, { - key: 'fullUrlCache', - enDescriptor: 'fullUrlCache', - cnDescriptor: '全路径缓存', - link: '', - type: 'select', - list: [{ - text: '打开', - value: 'on' - }, { - text: '关闭', - value: 'off' - }] -}, { - key: 'https', - enDescriptor: 'https', - cnDescriptor: '是否配置https', - link: '', - type: 'select', - list: [{ - text: 'on', - value: 'on' - }, { - text: 'off', - value: 'off' - }, { - text: 'processing', - value: 'processing' - }] -}, { - key: 'originPullProtocol', - enDescriptor: 'originPullProtocol', - cnDescriptor: '回源协议类型', - link: '', - type: 'select', - list: [{ - text: 'http', - value: 'http' - }, { - text: 'follow', - value: 'follow' - }, { - text: 'https', - value: 'https' - }] -}, { - key: 'tagKey', - enDescriptor: 'tagKey', - cnDescriptor: '标签键', - link: '', - type: 'inputmulti' -}]; -var OVCDN_STATE = { - region: 'ap-guangzhou', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'Domain', - queries: { - Limit: 20, - Offset: 0, - Filters: __assign({}, CDNFilterFields) - } -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - var params = {}; - - if (!lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(queries)) { - params.Limit = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Limit', 20) || 20; - params.Offset = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Offset', 0) || 0; - var Filters_1 = []; - - lodash__WEBPACK_IMPORTED_MODULE_0___default.a.forEach(queries.Filters, function (item, key) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isArray(item)) { - item = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.compact(item); - - if (item.length > 0) { - Filters_1.push({ - Name: key, - Value: lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(item).slice(0, 5) - }); - } - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isObject(item)) { - if (!lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', []))) { - Filters_1.push({ - Name: key, - Value: lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', []).slice(0, 5) - }); - } - } - }); - - if (Filters_1.length > 0) { - params.Filters = Filters_1; - } - } - - return params; -} - -var OVCDNInstanceAliasList = ['Domain', 'ResourceId']; -var OVCDNInvalidDemensions = { - projectId: 'ProjectId', - domain: 'Domain' -}; -var templateQueryIdMap = { - instance: 'Domain' -}; -/* harmony default export */ __webpack_exports__["default"] = (OVCDN_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/pcx/datasource.ts": -/*!*************************************************!*\ - !*** ./datasource/tc_monitor/pcx/datasource.ts ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/pcx/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/constants */ "./datasource/common/constants.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __assign = undefined && undefined.__assign || function () { - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - } - - return t; - }; - - return __assign.apply(this, arguments); -}; - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - - - -var DCDatasource = -/** @class */ -function (_super) { - __extends(DCDatasource, _super); - - function DCDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = _query_def__WEBPACK_IMPORTED_MODULE_0__["namespace"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["PCXInstanceAliasList"]; - _this.InvalidDimensions = {}; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_0__["templateQueryIdMap"]; // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致 - - _this.InstanceReqConfig = { - service: 'xx', - action: 'xx', - responseField: 'xx' - }; - return _this; - } - - DCDatasource.prototype.getInstances = function (region, params) { - if (region === void 0) { - region = 'ap-guangzhou'; - } - - if (params === void 0) { - params = {}; - } - - params = __assign({ - offset: 0, - limit: 50 - }, params); - var serviceInfo = Object(_common_constants__WEBPACK_IMPORTED_MODULE_3__["GetServiceAPIInfo"])(region, 'pcx'); - return this.doRequestV2({ - url: this.url + serviceInfo.path, - data: params - }, serviceInfo.service, { - region: region, - action: 'DescribeVpcPeeringConnections' - }).then(function (response) { - return response.data || []; - }); - }; - /** - * 模板变量中获取全量的 PCX 实例列表 - * @param region 地域信息 - */ - - - DCDatasource.prototype.getVariableInstances = function (region, query) { - var _this = this; - - var result = []; - - var params = __assign({ - Offset: 0, - Limit: 50 - }, query); - - var serviceInfo = Object(_common_constants__WEBPACK_IMPORTED_MODULE_3__["GetServiceAPIInfo"])(region, 'pcx'); - return this.doRequestV2({ - url: this.url + serviceInfo.path, - data: params - }, serviceInfo.service, { - region: region, - action: 'DescribeVpcPeeringConnections' - }).then(function (response) { - result = response.data || []; - var total = response.totalCount || 0; - - if (result.length >= total) { - return result; - } else { - var param = Object(_common_constants__WEBPACK_IMPORTED_MODULE_3__["SliceLength"])(total, 50); - var promises_1 = []; - - lodash__WEBPACK_IMPORTED_MODULE_2___default.a.forEach(param, function (item) { - promises_1.push(_this.getInstances(region, item)); - }); - - return Promise.all(promises_1).then(function (responses) { - lodash__WEBPACK_IMPORTED_MODULE_2___default.a.forEach(responses, function (item) { - result = lodash__WEBPACK_IMPORTED_MODULE_2___default.a.concat(result, item); - }); - - return result; - })["catch"](function (error) { - return result; - }); - } - }); - }; - - DCDatasource.prototype.getVpcId = function (region, params) { - if (params === void 0) { - params = {}; - } - - params = __assign({ - Offset: 0, - Limit: 20 - }, params); // TODO 等待腾讯云接口查问题 - - params.Offset = String(params.Offset); - params.Limit = String(params.Limit); - var serviceInfo = Object(_common_constants__WEBPACK_IMPORTED_MODULE_3__["GetServiceAPIInfo"])(region, 'vpc'); - return this.doRequest({ - url: this.url + serviceInfo.path, - data: params - }, serviceInfo.service, { - region: region, - action: 'DescribeVpcs' - }).then(function (response) { - return lodash__WEBPACK_IMPORTED_MODULE_2___default.a.map(response.VpcSet || [], function (item) { - return { - text: item.VpcId, - value: item.VpcId - }; - }); - }); - }; - - DCDatasource.prototype.getVpcIds = function (region) { - var _this = this; - - var result = []; - var params = { - Offset: 0, - Limit: 100 - }; // TODO 等待腾讯云接口查问题 - - params.Offset = String(params.Offset); - params.Limit = String(params.Limit); - var serviceInfo = Object(_common_constants__WEBPACK_IMPORTED_MODULE_3__["GetServiceAPIInfo"])(region, 'vpc'); - return this.doRequest({ - url: this.url + serviceInfo.path, - data: params - }, serviceInfo.service, { - region: region, - action: 'DescribeVpcs' - }).then(function (response) { - result = lodash__WEBPACK_IMPORTED_MODULE_2___default.a.map(response.VpcSet || [], function (item) { - return { - text: item.VpcId, - value: item.VpcId - }; - }); - var total = response.TotalCount || 0; - - if (result.length >= total) { - return result; - } else { - var param = Object(_common_constants__WEBPACK_IMPORTED_MODULE_3__["SliceLength"])(total, 100); - var promises_2 = []; - - lodash__WEBPACK_IMPORTED_MODULE_2___default.a.forEach(param, function (item) { - promises_2.push(_this.getVpcId(region, item)); - }); - - return Promise.all(promises_2).then(function (responses) { - lodash__WEBPACK_IMPORTED_MODULE_2___default.a.forEach(responses, function (item) { - result = lodash__WEBPACK_IMPORTED_MODULE_2___default.a.concat(result, item); - }); - - return result; - })["catch"](function (error) { - return result; - }); - } - }); - }; - /** - * 腾讯云 API 2.0 请求接口 - * @param options - * @param service - * @param signObj - */ - - - DCDatasource.prototype.doRequestV2 = function (options, service, signObj) { - if (signObj === void 0) { - signObj = {}; - } - - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - return [4 - /*yield*/ - , Object(_common_constants__WEBPACK_IMPORTED_MODULE_3__["GetRequestParamsV2"])(options, service, signObj, this.secretId, this.instanceSettings.id, this.backendSrv)]; - - case 1: - options = _a.sent(); - return [2 - /*return*/ - , this.backendSrv.datasourceRequest(options).then(function (response) { - return lodash__WEBPACK_IMPORTED_MODULE_2___default.a.get(response, 'data', {}); - })["catch"](function (error) { - throw error; - })]; - } - }); - }); - }; - - return DCDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (DCDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/pcx/query.ts": -/*!********************************************!*\ - !*** ./datasource/tc_monitor/pcx/query.ts ***! - \********************************************/ -/*! exports provided: PCXQueryCtrl, pcxQuery */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PCXQueryCtrl", function() { return PCXQueryCtrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pcxQuery", function() { return pcxQuery; }); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! grafana/app/core/core_module */ "grafana/app/core/core_module"); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/pcx/query_def.ts"); - - - -var PCXQueryCtrl = -/** @class */ -function () { - PCXQueryCtrl.$inject = ["$scope", "$rootScope"]; - - /** @ngInject */ - function PCXQueryCtrl($scope, $rootScope) { - $scope.init = function () { - $scope.PCXFieldsDescriptor = _query_def__WEBPACK_IMPORTED_MODULE_1__["PCXFieldsDescriptor"]; - }; - - $scope.onChecked = function (srcField, dstField) { - if ($scope.target.queries[srcField] === true) { - $scope.target.queries[dstField] = false; - } - - $scope.onChange(); - }; - - $scope.getDropdown = function (field) { - switch (field) { - case 'vpcId': - return $scope.getVpcIds(); - - default: - return []; - } - }; - - $scope.getVpcIds = function () { - if (!$scope.region) { - return []; - } - - return $scope.datasource.getVpcIds('pcx', $scope.region); - }; - - $scope.init(); - } - - return PCXQueryCtrl; -}(); - - -var template = "\n
\n \n
\n
\n \n \n \n \n \n \n \n
\n
\n\n
\n"; -function pcxQuery() { - return { - template: template, - controller: PCXQueryCtrl, - restrict: 'E', - scope: { - target: '=', - showDetail: '=', - region: '=', - datasource: '=', - onChange: '&' - } - }; -} -grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default.a.directive('pcxQuery', pcxQuery); - -/***/ }), - -/***/ "./datasource/tc_monitor/pcx/query_def.ts": -/*!************************************************!*\ - !*** ./datasource/tc_monitor/pcx/query_def.ts ***! - \************************************************/ -/*! exports provided: default, PCXInstanceAliasList, PCXFieldsDescriptor, templateQueryIdMap, namespace, PCXGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PCXInstanceAliasList", function() { return PCXInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PCXFieldsDescriptor", function() { return PCXFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PCXGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -var __assign = undefined && undefined.__assign || function () { - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - } - - return t; - }; - - return __assign.apply(this, arguments); -}; - - -var namespace = 'QCE/PCX'; -var PCXFields = { - limit: 20, - offset: 0, - peeringConnectionId: '', - peeringConnectionName: '', - vpcId: '', - state: undefined -}; -var PCX_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'peeringConnectionId', - queries: __assign({}, PCXFields) -}; -var StateTypes = [{ - text: '申请中', - value: 0 -}, { - text: '连接成功', - value: 1 -}, { - text: '已过期', - value: 2 -}, { - text: '对端已拒绝', - value: 3 -}, { - text: '对端已删除', - value: 4 -}]; -var PCXFieldsDescriptor = [{ - key: 'offset', - enDescriptor: 'offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputnumber', - min: 0 -}, { - key: 'limit', - enDescriptor: 'limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为50', - link: '', - type: 'inputnumber', - min: 1, - max: 50 -}, { - key: 'peeringConnectionId', - enDescriptor: 'PeeringConnection Id', - cnDescriptor: '私有网络对等连接 ID', - link: '', - type: 'input' -}, { - key: 'peeringConnectionName', - enDescriptor: 'PeeringConnection Name', - cnDescriptor: '对等连接名称', - link: '', - type: 'input' -}, { - key: 'vpcId', - enDescriptor: 'vpcId', - cnDescriptor: '发起方私有网络 ID 值', - link: 'https://cloud.tencent.com/document/api/215/1372', - type: 'dropdown' -}, { - key: 'state', - enDescriptor: 'state', - cnDescriptor: '连接状态', - link: '', - type: 'select', - list: StateTypes -}]; -var PCXInstanceAliasList = ['peeringConnectionId', 'peeringConnectionName']; -var templateQueryIdMap = { - instance: 'peeringConnectionId' -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - var params = {}; - - if (!lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(queries)) { - params.limit = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'limit', 20) || 20; - params.offset = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'offset', 0) || 0; - queries = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.omit(queries, ['offset', 'limit']); - - lodash__WEBPACK_IMPORTED_MODULE_0___default.a.forEach(queries, function (item, key) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isArray(item)) { - item = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.compact(item); - - if (item.length > 0) { - params[key] = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(item); - } - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isObject(item)) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isNumber(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', undefined)) || !lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', undefined))) { - params[key] = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value'); - } - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isNumber(item) || !lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(item)) { - params[key] = item; - } - }); - } - - return params; -} - -/* harmony default export */ __webpack_exports__["default"] = (PCX_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/postgresql/datasource.ts": -/*!********************************************************!*\ - !*** ./datasource/tc_monitor/postgresql/datasource.ts ***! - \********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/postgresql/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - - - - -var CDBDatasource = -/** @class */ -function (_super) { - __extends(CDBDatasource, _super); - - function CDBDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = _query_def__WEBPACK_IMPORTED_MODULE_0__["namespace"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["POSTGRESInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["PostgreInvalidDemensions"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_0__["templateQueryIdMap"]; - _this.InstanceReqConfig = { - service: 'postgres', - action: 'DescribeDBInstances', - responseField: 'DBInstanceSet' - }; - _this.MetricReqConfig = { - resultFilter: _query_def__WEBPACK_IMPORTED_MODULE_0__["modifyDimensons"] - }; - return _this; - } - - return CDBDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (CDBDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/postgresql/query.ts": -/*!***************************************************!*\ - !*** ./datasource/tc_monitor/postgresql/query.ts ***! - \***************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _base_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_base/query */ "./datasource/tc_monitor/_base/query.ts"); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/postgresql/query_def.ts"); - - -Object(_base_query__WEBPACK_IMPORTED_MODULE_0__["default"])(_query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorName"], _query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorConfig"]); - -/***/ }), - -/***/ "./datasource/tc_monitor/postgresql/query_def.ts": -/*!*******************************************************!*\ - !*** ./datasource/tc_monitor/postgresql/query_def.ts ***! - \*******************************************************/ -/*! exports provided: default, PostgresFieldsDescriptor, POSTGRESInstanceAliasList, templateQueryIdMap, modifyDimensons, namespace, queryEditorName, queryEditorConfig, PostgreInvalidDemensions, POSTGRESGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PostgresFieldsDescriptor", function() { return PostgresFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "POSTGRESInstanceAliasList", function() { return POSTGRESInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "modifyDimensons", function() { return modifyDimensons; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorName", function() { return queryEditorName; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorConfig", function() { return queryEditorConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PostgreInvalidDemensions", function() { return PostgreInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "POSTGRESGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); -var __assign = undefined && undefined.__assign || function () { - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - } - - return t; - }; - - return __assign.apply(this, arguments); -}; - - - -var namespace = 'QCE/POSTGRES'; // 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称 - -var queryEditorName = 'postgresQuery'; -var PostgresFields = { - 'db-instance-id': [], - 'db-instance-name': [] -}; -var PostgresFieldsDescriptor = [{ - key: 'db-instance-id', - enDescriptor: 'DB Instance ID', - cnDescriptor: 'DB 实例ID', - link: '', - type: 'inputMulti', - min: 0 -}, { - key: 'db-instance-name', - enDescriptor: 'DB Instance Name', - cnDescriptor: 'DB 实例名称', - link: '', - type: 'inputMulti' -}]; // 各产品实例列表detail配置 - -var queryEditorConfig = { - instanceDocUrl: 'https://cloud.tencent.com/document/api/409/16773', - namespace: namespace, - fieldDescriptor: PostgresFieldsDescriptor -}; -var POSTGRESInstanceAliasList = ['DBInstanceId', 'DBInstanceName']; -var POSTGRES_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'DBInstanceId', - queries: { - Limit: 20, - Offset: 0, - Filters: __assign({}, PostgresFields) - } -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - return Object(_common_utils__WEBPACK_IMPORTED_MODULE_1__["instanceQueryParamsBaseParse"])(queries, true); -} - -function modifyDimensons(metricItem) { - var metricTmp = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.cloneDeep(metricItem); - - metricTmp.Dimensions.forEach(function (item) { - item.Dimensions = ['resourceId']; - }); - return metricTmp; -} - -var PostgreInvalidDemensions = { - uid: 'DBInstanceId', - resourceId: 'DBInstanceId' -}; -var templateQueryIdMap = { - instance: 'DBInstanceId' -}; -/* harmony default export */ __webpack_exports__["default"] = (POSTGRES_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/qaap/datasource.ts": -/*!**************************************************!*\ - !*** ./datasource/tc_monitor/qaap/datasource.ts ***! - \**************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/qaap/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - - -var QAAPDatasource = -/** @class */ -function (_super) { - __extends(QAAPDatasource, _super); // MetricReqConfig = { - // resultFilter: modifyDimensons, - // }; - - - function QAAPDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = _query_def__WEBPACK_IMPORTED_MODULE_1__["namespace"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_1__["QAAPInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_1__["QAAPInvalidDemensions"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_1__["templateQueryIdMap"]; // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致 - - _this.InstanceReqConfig = { - service: 'gaap', - action: 'DescribeProxies', - responseField: 'ProxySet', - interceptor: {// response: (data: unknown[]) =>[ - // { - // "NetDetectId": "netd-12345678", - // }, - // ], - } - }; - return _this; - } - - QAAPDatasource.prototype.getMetrics = function (region) { - if (region === void 0) { - region = 'ap-guangzhou'; - } - - return __awaiter(this, void 0, void 0, function () { - var rawSet; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - return [4 - /*yield*/ - , _super.prototype.getMetrics.call(this, region)]; - - case 1: - rawSet = _a.sent(); - return [2 - /*return*/ - , rawSet.filter(function (item) { - return Object(lodash__WEBPACK_IMPORTED_MODULE_0__["get"])(item, 'Dimensions.length') === 1 && Object(lodash__WEBPACK_IMPORTED_MODULE_0__["get"])(item, 'Dimensions[0].Dimensions.length') === 1 && Object(lodash__WEBPACK_IMPORTED_MODULE_0__["get"])(item, 'Dimensions[0].Dimensions[0]') === 'channelId'; - })]; - } - }); - }); - }; - - return QAAPDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_2__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (QAAPDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/qaap/query.ts": -/*!*********************************************!*\ - !*** ./datasource/tc_monitor/qaap/query.ts ***! - \*********************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _base_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_base/query */ "./datasource/tc_monitor/_base/query.ts"); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/qaap/query_def.ts"); - - -Object(_base_query__WEBPACK_IMPORTED_MODULE_0__["default"])(_query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorName"], _query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorConfig"]); - -/***/ }), - -/***/ "./datasource/tc_monitor/qaap/query_def.ts": -/*!*************************************************!*\ - !*** ./datasource/tc_monitor/qaap/query_def.ts ***! - \*************************************************/ -/*! exports provided: default, QAAPFilterFieldsDescriptor, templateQueryIdMap, QAAPInstanceAliasList, QAAPInvalidDemensions, namespace, queryEditorName, queryEditorConfig, modifyDimensons, QAAPGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QAAPFilterFieldsDescriptor", function() { return QAAPFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QAAPInstanceAliasList", function() { return QAAPInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QAAPInvalidDemensions", function() { return QAAPInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorName", function() { return queryEditorName; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorConfig", function() { return queryEditorConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "modifyDimensons", function() { return modifyDimensons; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QAAPGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); - - -var namespace = 'QCE/QAAP'; // 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称 - -var queryEditorName = 'qaapQuery'; -var QAAPInvalidDemensions = { - channelId: 'InstanceId' -}; -var QAAPInstanceAliasList = ['InstanceId']; -var templateQueryIdMap = { - instance: 'InstanceId' -}; // select类型需要注意是{},multi后缀是[] - -var QAAPFilterFields = { - Limit: 20, - Offset: 0, - ProjectId: [], - AccessRegion: [], - RealServerRegion: [], - GroupId: [] -}; -var QAAPFilterFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputNumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputNumber', - min: 1, - max: 100 -}, { - key: 'ProjectId', - enDescriptor: 'ProjectId', - cnDescriptor: '项目ID', - link: '', - type: 'inputMulti' -}, { - key: 'AccessRegion', - enDescriptor: 'AccessRegion', - cnDescriptor: '接入地域', - link: '', - type: 'inputMulti' -}, { - key: 'RealServerRegion', - enDescriptor: 'RealServerRegion', - cnDescriptor: '源站地域', - link: '', - type: 'inputMulti' -}, { - key: 'GroupId', - enDescriptor: 'GroupId', - cnDescriptor: '通道组ID', - link: '', - type: 'inputMulti' -}]; // 各产品实例列表detail配置 - -var queryEditorConfig = { - instanceDocUrl: 'https://cloud.tencent.com/document/api/608/36963', - namespace: namespace, - fieldDescriptor: QAAPFilterFieldsDescriptor -}; -var QAAP_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'InstanceId', - queries: QAAPFilterFields -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - return Object(_common_utils__WEBPACK_IMPORTED_MODULE_1__["instanceQueryParamsBaseParse"])(queries, true); -} - -function modifyDimensons(metricItem) { - var metricTmp = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.cloneDeep(metricItem); // metricTmp.Dimensions.forEach((item) => { - // item.Dimensions = ['netDetectId']; - // }); - - - return metricTmp; -} - -/* harmony default export */ __webpack_exports__["default"] = (QAAP_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/redis/datasource.ts": -/*!***************************************************!*\ - !*** ./datasource/tc_monitor/redis/datasource.ts ***! - \***************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/redis/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __assign = undefined && undefined.__assign || function () { - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - } - - return t; - }; - - return __assign.apply(this, arguments); -}; - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - -var REDISDatasource = -/** @class */ -function (_super) { - __extends(REDISDatasource, _super); - - function REDISDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = 'QCE/REDIS'; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["REDISInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["RedisInvalidDemensions"]; - _this.templateQueryIdMap = { - instance: 'InstanceId' - }; - _this.InstanceReqConfig = { - service: 'redis', - action: 'DescribeInstances', - responseField: 'InstanceSet', - interceptor: { - request: function request(params) { - return __assign(__assign({}, params), { - MonitorVersion: '1m' - }); - } - } - }; - return _this; - } - - REDISDatasource.prototype.getMetrics = function (region) { - if (region === void 0) { - region = 'ap-guangzhou'; - } - - return __awaiter(this, void 0, void 0, function () { - var rawSet; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - return [4 - /*yield*/ - , _super.prototype.getMetrics.call(this, region)]; - - case 1: - rawSet = _a.sent(); - return [2 - /*return*/ - , rawSet.filter(function (item) { - return Object(_query_def__WEBPACK_IMPORTED_MODULE_0__["isValidMetric"])(item); - })]; - } - }); - }); - }; - - return REDISDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (REDISDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/redis/query.ts": -/*!**********************************************!*\ - !*** ./datasource/tc_monitor/redis/query.ts ***! - \**********************************************/ -/*! exports provided: RedisQueryCtrl, redisQuery */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RedisQueryCtrl", function() { return RedisQueryCtrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "redisQuery", function() { return redisQuery; }); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! grafana/app/core/core_module */ "grafana/app/core/core_module"); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/redis/query_def.ts"); - - - -var RedisQueryCtrl = -/** @class */ -function () { - RedisQueryCtrl.$inject = ["$scope", "$rootScope"]; - - /** @ngInject */ - function RedisQueryCtrl($scope, $rootScope) { - $scope.init = function () { - $scope.RedisFieldsDescriptor = _query_def__WEBPACK_IMPORTED_MODULE_1__["RedisFieldsDescriptor"]; - }; - - $scope.onChecked = function (srcField, dstField) { - if ($scope.target.queries[srcField] === true) { - $scope.target.queries[dstField] = false; - } - - $scope.onChange(); - }; - - $scope.getDropdown = function (field) { - switch (field) { - default: - return []; - } - }; - - $scope.init(); - } - - return RedisQueryCtrl; -}(); - - -var template = "\n
\n \n
\n
\n \n \n \n \n \n \n \n
\n
\n\n
\n"; -function redisQuery() { - return { - template: template, - controller: RedisQueryCtrl, - restrict: 'E', - scope: { - target: '=', - showDetail: '=', - region: '=', - datasource: '=', - onChange: '&' - } - }; -} -grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default.a.directive('redisQuery', redisQuery); - -/***/ }), - -/***/ "./datasource/tc_monitor/redis/query_def.ts": -/*!**************************************************!*\ - !*** ./datasource/tc_monitor/redis/query_def.ts ***! - \**************************************************/ -/*! exports provided: default, RedisFieldsDescriptor, RedisInvalidDemensions, templateQueryIdMap, REDISInstanceAliasList, isValidMetric, REDISGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RedisFieldsDescriptor", function() { return RedisFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RedisInvalidDemensions", function() { return RedisInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "REDISInstanceAliasList", function() { return REDISInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isValidMetric", function() { return isValidMetric; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "REDISGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -var __assign = undefined && undefined.__assign || function () { - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - } - - return t; - }; - - return __assign.apply(this, arguments); -}; - - -var BillingMode = [{ - text: '按量计费', - value: 'postpaid' -}, { - text: '包年包月', - value: 'prepaid' -}]; -var AutoRenew = [{ - text: '手动续费', - value: 0 -}, { - text: '自动续费', - value: 1 -}, { - text: '明确不自动续费', - value: 2 -}]; -var Status = [{ - text: '待初始化', - value: 0 -}, { - text: '流程执行中', - value: 1 -}, { - text: '运行中', - value: 2 -}, { - text: '已隔离', - value: -2 -}, { - text: '待删除', - value: -3 -}]; -var TypeVersion = [{ - text: '单机版', - value: 1 -}, { - text: '主从版', - value: 2 -}, { - text: '集群版', - value: 3 -}]; -var OrderBy = [{ - text: 'projectId', - value: 'projectId' -}, { - text: 'instancename', - value: 'instancename' -}, { - text: 'createtime', - value: 'createtime' -}, { - text: 'type', - value: 'type' -}, { - text: 'curDeadline', - value: 'curDeadline' -}]; -var OrderType = [{ - text: '升序', - value: 0 -}, { - text: '降序', - value: 1 -}]; -var Type = [{ - text: 'Redis老集群版', - value: 1 -}, { - text: 'Redis 2.8主从版', - value: 2 -}, { - text: 'CKV主从版', - value: 3 -}, { - text: 'CKV集群版', - value: 4 -}, { - text: 'Redis 2.8单机版', - value: 5 -}, { - text: 'Redis 4.0主从版', - value: 6 -}, { - text: 'Redis 4.0集群版', - value: 7 -}, { - text: 'Redis5.0主从版', - value: 8 -}, { - text: 'Redis5.0集群版', - value: 9 -}]; -var RedisFields = { - InstanceId: '', - OrderBy: '', - OrderType: null, - VpcIds: [], - SubnetIds: [], - ProjectIds: [], - SearchKey: '', - InstanceName: '', - UniqVpcIds: [], - UniqSubnetIds: [], - Status: [], - TypeVersion: null, - EngineName: '', - AutoRenew: null, - BillingMode: '', - Type: null -}; -var RedisFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputnumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputnumber', - min: 1, - max: 100 -}, { - key: 'InstanceId', - enDescriptor: 'InstancesId', - cnDescriptor: '实例id', - type: 'input' -}, { - key: 'OrderBy', - enDescriptor: 'OrderBy', - cnDescriptor: '排序字段', - link: '', - type: 'select', - list: OrderBy -}, { - key: 'OrderType', - enDescriptor: 'OrderType', - cnDescriptor: '排序字段', - link: '', - type: 'select', - list: OrderType -}, { - key: 'VpcIds', - enDescriptor: 'VpcIds', - cnDescriptor: '私有网络ID数组,数组下标从0开始,如果不传则默认选择基础网络,如:47525', - link: '', - type: 'inputmulti' -}, { - key: 'SubnetIds', - enDescriptor: 'SubnetIds', - cnDescriptor: '子网ID数组,数组下标从0开始,如:56854', - link: '', - type: 'inputmulti' -}, { - key: 'ProjectIds', - enDescriptor: 'ProjectIds', - cnDescriptor: '项目ID 组成的数组', - link: '', - type: 'inputmulti' -}, { - key: 'SearchKey', - enDescriptor: 'SearchKey', - cnDescriptor: '查找实例的ID', - link: '', - type: 'input' -}, { - key: 'InstanceName', - enDescriptor: 'InstanceName', - cnDescriptor: '实例名称', - link: '', - type: 'input' -}, { - key: 'UniqVpcIds', - enDescriptor: 'UniqVpcIds', - cnDescriptor: '私有网络ID数组,数组下标从0开始,如果不传则默认选择基础网络,如:vpc-sad23jfdfk', - link: '', - type: 'inputmulti' -}, { - key: 'UniqSubnetIds', - enDescriptor: 'UniqSubnetIds', - cnDescriptor: '子网ID数组,数组下标从0开始,如:subnet-fdj24n34j2', - link: '', - type: 'inputmulti' -}, { - key: 'Status', - enDescriptor: 'Status', - cnDescriptor: '实例状态', - multiple: true, - type: 'select', - list: Status -}, { - key: 'TypeVersion', - enDescriptor: 'TypeVersion', - cnDescriptor: '类型版本', - link: '', - type: 'select', - list: TypeVersion -}, { - key: 'EngineName', - enDescriptor: 'EngineName', - cnDescriptor: '引擎信息:Redis-2.8,Redis-4.0,CKV', - link: '', - type: 'input' -}, { - key: 'AutoRenew', - enDescriptor: 'AutoRenew', - cnDescriptor: '续费模式', - multiple: true, - type: 'select', - list: AutoRenew -}, { - key: 'BillingMode', - enDescriptor: 'BillingMode', - cnDescriptor: '计费模式:postpaid-按量计费;prepaid-包年包月', - link: '', - type: 'select', - list: BillingMode -}, { - key: 'Type', - enDescriptor: 'Type', - cnDescriptor: '实例类型', - link: '', - type: 'select', - list: Type -}]; -var REDIS_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'InstanceId', - queries: __assign({}, RedisFields) -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - var params = {}; - - if (!lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(queries)) { - params.Limit = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Limit', 20) || 20; - params.Offset = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Offset', 0) || 0; - queries = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.omit(queries, ['Offset', 'Limit']); - - lodash__WEBPACK_IMPORTED_MODULE_0___default.a.forEach(queries, function (item, key) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isArray(item)) { - item = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.compact(item); - - if (item.length > 0) { - params[key] = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(item); - } - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isObject(item)) { - // select 单选 - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isNumber(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', undefined)) || !lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', undefined))) { - params[key] = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value'); - } - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isNumber(item) || !lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(item)) { - params[key] = item; - } - }); - } - - return params; -} - -function isValidMetric(metricObj) { - if (metricObj === void 0) { - metricObj = {}; - } - - var dimension = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(metricObj, 'Dimensions[0].Dimensions'); - - return dimension.length === 1 && lodash__WEBPACK_IMPORTED_MODULE_0___default.a.indexOf(dimension, 'instanceid') !== -1; -} - -var REDISInstanceAliasList = ['InstanceId', 'InstanceName', 'WanIp']; -var RedisInvalidDemensions = { - redis_uuid: 'InstanceId', - instanceid: 'InstanceId' -}; -var templateQueryIdMap = { - instance: 'InstanceId' -}; -/* harmony default export */ __webpack_exports__["default"] = (REDIS_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/redis_mem/datasource.ts": -/*!*******************************************************!*\ - !*** ./datasource/tc_monitor/redis_mem/datasource.ts ***! - \*******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/redis_mem/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/constants */ "./datasource/common/constants.ts"); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __assign = undefined && undefined.__assign || function () { - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - } - - return t; - }; - - return __assign.apply(this, arguments); -}; - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - - - - -var REDISDatasource = -/** @class */ -function (_super) { - __extends(REDISDatasource, _super); - - function REDISDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = _query_def__WEBPACK_IMPORTED_MODULE_1__["namespace"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_1__["REDISMEMInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_1__["RedisMemInvalidDemensions"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_1__["templateQueryIdMap"]; - _this.extrasAlias = [_query_def__WEBPACK_IMPORTED_MODULE_1__["RedisMemInvalidDemensions"].pnodeid, _query_def__WEBPACK_IMPORTED_MODULE_1__["RedisMemInvalidDemensions"].rnodeid]; - _this.InstanceReqConfig = { - service: 'redis', - action: 'DescribeInstances', - responseField: 'InstanceSet', - interceptor: { - request: function request(params) { - return __assign(__assign({}, params), { - MonitorVersion: '5s' - }); - } - } - }; - return _this; - } - - REDISDatasource.prototype.getInstanceNodeInfo = function (params) { - return __awaiter(this, void 0, void 0, function () { - var region, instanceId, serviceInfo, res; - - var _this = this; - - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - region = params.region, instanceId = params.instanceId; - serviceInfo = Object(_common_constants__WEBPACK_IMPORTED_MODULE_3__["GetServiceAPIInfo"])(region, 'redis'); - return [4 - /*yield*/ - , Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["fetchAllFactory"])(function (data) { - return _this.doRequest({ - url: _this.url + serviceInfo.path, - data: data - }, serviceInfo.service, { - region: region, - action: 'DescribeInstanceNodeInfo' - }); - }, { - InstanceId: instanceId - }, _query_def__WEBPACK_IMPORTED_MODULE_1__["NodeType"])]; - - case 1: - res = _a.sent(); - return [2 - /*return*/ - , res]; - } - }); - }); - }; - - REDISDatasource.prototype.fetchMetricData = function (action, region, instance, query) { - return __awaiter(this, void 0, void 0, function () { - var rs, nodetype, ndoeTypeIndex; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!(action === 'DescribeInstanceNodeInfo')) return [3 - /*break*/ - , 2]; - return [4 - /*yield*/ - , this.getInstanceNodeInfo({ - region: region, - instanceId: instance[this.templateQueryIdMap.instance] - })]; - - case 1: - rs = _a.sent(); - nodetype = query.nodetype; - ndoeTypeIndex = _query_def__WEBPACK_IMPORTED_MODULE_1__["NodeType"].indexOf(nodetype); - return [2 - /*return*/ - , ndoeTypeIndex === -1 ? [] : lodash__WEBPACK_IMPORTED_MODULE_0___default.a.map(rs[ndoeTypeIndex], function (item) { - return { - text: item.NodeId, - value: item.NodeId - }; - })]; - - case 2: - return [2 - /*return*/ - , []]; - } - }); - }); - }; - - return REDISDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_2__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (REDISDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/redis_mem/query.ts": -/*!**************************************************!*\ - !*** ./datasource/tc_monitor/redis_mem/query.ts ***! - \**************************************************/ -/*! exports provided: RedisMemQueryCtrl, redisMemQuery */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RedisMemQueryCtrl", function() { return RedisMemQueryCtrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "redisMemQuery", function() { return redisMemQuery; }); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! grafana/app/core/core_module */ "grafana/app/core/core_module"); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/redis_mem/query_def.ts"); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/constants */ "./datasource/common/constants.ts"); -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - - - -var RedisMemQueryCtrl = -/** @class */ -function () { - RedisMemQueryCtrl.$inject = ["$scope", "$rootScope"]; - - /** @ngInject */ - function RedisMemQueryCtrl($scope, $rootScope) { - var _this = this; - - $scope.init = function () { - $scope.RedisMemFieldsDescriptor = _query_def__WEBPACK_IMPORTED_MODULE_2__["RedisMemFieldsDescriptor"]; - }; - - $scope.clearExtrasAlias = function () { - $scope.target.rnodeid = ''; - $scope.target.pnodeid = ''; - }; - - $scope.onChecked = function (srcField, dstField) { - if ($scope.target.queries[srcField] === true) { - $scope.target.queries[dstField] = false; - } - - $scope.onChange(); - }; - - $scope.getDropdown = function (field) { - switch (field) { - default: - return []; - } - }; - - $scope.getVariableId = function (data, type) { - var variableData = data; - var service = Object(_common_constants__WEBPACK_IMPORTED_MODULE_3__["GetServiceFromNamespace"])(_query_def__WEBPACK_IMPORTED_MODULE_2__["namespace"]); - variableData = $scope.datasource.getServiceFn(service, 'getVariable')(variableData); - - if (!variableData) { - return ''; - } - - try { - variableData = JSON.parse(variableData)[_query_def__WEBPACK_IMPORTED_MODULE_2__["templateQueryIdMap"][type]]; - } catch (error) {} - - return variableData; - }; - - $scope.getExtraDropdown = function (target, nodetype) { - return __awaiter(_this, void 0, void 0, function () { - var instance, service, instanceId, region, rs, ndoeTypeIndex; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - instance = $scope.target.instance; - service = Object(_common_constants__WEBPACK_IMPORTED_MODULE_3__["GetServiceFromNamespace"])(_query_def__WEBPACK_IMPORTED_MODULE_2__["namespace"]); - instanceId = $scope.getVariableId(instance, 'instance'); - region = $scope.datasource.getServiceFn(service, 'getVariable')(target.region); - return [4 - /*yield*/ - , $scope.datasource.getServiceFn(service, 'getInstanceNodeInfo')({ - region: region, - instanceId: instanceId - })]; - - case 1: - rs = _a.sent(); - ndoeTypeIndex = _query_def__WEBPACK_IMPORTED_MODULE_2__["NodeType"].indexOf(nodetype); - return [2 - /*return*/ - , ndoeTypeIndex === -1 ? [] : Object(lodash__WEBPACK_IMPORTED_MODULE_1__["map"])(rs[ndoeTypeIndex], function (item) { - return { - text: item.NodeId, - value: item.NodeId - }; - })]; - } - }); - }); - }; - - $scope.init(); - } - - return RedisMemQueryCtrl; -}(); - - -var template = "\n
\n \n
\n
\n \n \n \n \n \n \n \n
\n
\n\n
\n\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n \n
\n \n \n
\n
\n
\n"; -function redisMemQuery() { - return { - template: template, - controller: RedisMemQueryCtrl, - restrict: 'E', - scope: { - target: '=', - showDetail: '=', - region: '=', - datasource: '=', - onChange: '&', - onRefresh: '&', - dims: '=' - }, - link: function link(scope, element, attrs) { - scope.$watch('target.instance', function () { - var _a; - - (_a = scope.clearExtrasAlias) === null || _a === void 0 ? void 0 : _a.call(scope); - }); - scope.$watch('target.metricName', function () { - var _a; - - (_a = scope.clearExtrasAlias) === null || _a === void 0 ? void 0 : _a.call(scope); - }); - } - }; -} -grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default.a.directive('redisMemQuery', redisMemQuery); - -/***/ }), - -/***/ "./datasource/tc_monitor/redis_mem/query_def.ts": -/*!******************************************************!*\ - !*** ./datasource/tc_monitor/redis_mem/query_def.ts ***! - \******************************************************/ -/*! exports provided: default, RedisMemFieldsDescriptor, RedisMemInvalidDemensions, REDISMEMInstanceAliasList, templateQueryIdMap, namespace, NodeType, REDISMEMGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RedisMemFieldsDescriptor", function() { return RedisMemFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RedisMemInvalidDemensions", function() { return RedisMemInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "REDISMEMInstanceAliasList", function() { return REDISMEMInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NodeType", function() { return NodeType; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "REDISMEMGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -var __assign = undefined && undefined.__assign || function () { - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - } - - return t; - }; - - return __assign.apply(this, arguments); -}; - - -var namespace = 'QCE/REDIS_MEM'; -var BillingMode = [{ - text: '按量计费', - value: 'postpaid' -}, { - text: '包年包月', - value: 'prepaid' -}]; -var AutoRenew = [{ - text: '手动续费', - value: 0 -}, { - text: '自动续费', - value: 1 -}, { - text: '明确不自动续费', - value: 2 -}]; -var Status = [{ - text: '待初始化', - value: 0 -}, { - text: '流程执行中', - value: 1 -}, { - text: '运行中', - value: 2 -}, { - text: '已隔离', - value: -2 -}, { - text: '待删除', - value: -3 -}]; -var TypeVersion = [{ - text: '单机版', - value: 1 -}, { - text: '主从版', - value: 2 -}, { - text: '集群版', - value: 3 -}]; -var OrderBy = [{ - text: 'projectId', - value: 'projectId' -}, { - text: 'instancename', - value: 'instancename' -}, { - text: 'createtime', - value: 'createtime' -}, { - text: 'type', - value: 'type' -}, { - text: 'curDeadline', - value: 'curDeadline' -}]; -var OrderType = [{ - text: '升序', - value: 0 -}, { - text: '降序', - value: 1 -}]; -var Type = [{ - text: 'Redis老集群版', - value: 1 -}, { - text: 'Redis 2.8主从版', - value: 2 -}, { - text: 'CKV主从版', - value: 3 -}, { - text: 'CKV集群版', - value: 4 -}, { - text: 'Redis 2.8单机版', - value: 5 -}, { - text: 'Redis 4.0主从版', - value: 6 -}, { - text: 'Redis 4.0集群版', - value: 7 -}, { - text: 'Redis5.0主从版', - value: 8 -}, { - text: 'Redis5.0集群版', - value: 9 -}]; -var RedisFields = { - InstanceId: '', - OrderBy: '', - OrderType: null, - VpcIds: [], - SubnetIds: [], - ProjectIds: [], - SearchKey: '', - InstanceName: '', - UniqVpcIds: [], - UniqSubnetIds: [], - Status: [], - TypeVersion: null, - EngineName: '', - AutoRenew: null, - BillingMode: '', - Type: null -}; -var RedisMemFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputnumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputnumber', - min: 1, - max: 100 -}, { - key: 'InstanceId', - enDescriptor: 'InstancesId', - cnDescriptor: '实例id', - type: 'input' -}, { - key: 'OrderBy', - enDescriptor: 'OrderBy', - cnDescriptor: '排序字段', - link: '', - type: 'select', - list: OrderBy -}, { - key: 'OrderType', - enDescriptor: 'OrderType', - cnDescriptor: '排序字段', - link: '', - type: 'select', - list: OrderType -}, { - key: 'VpcIds', - enDescriptor: 'VpcIds', - cnDescriptor: '私有网络ID数组,数组下标从0开始,如果不传则默认选择基础网络,如:47525', - link: '', - type: 'inputmulti' -}, { - key: 'SubnetIds', - enDescriptor: 'SubnetIds', - cnDescriptor: '子网ID数组,数组下标从0开始,如:56854', - link: '', - type: 'inputmulti' -}, { - key: 'ProjectIds', - enDescriptor: 'ProjectIds', - cnDescriptor: '项目ID 组成的数组', - link: '', - type: 'inputmulti' -}, { - key: 'SearchKey', - enDescriptor: 'SearchKey', - cnDescriptor: '查找实例的ID', - link: '', - type: 'input' -}, { - key: 'InstanceName', - enDescriptor: 'InstanceName', - cnDescriptor: '实例名称', - link: '', - type: 'input' -}, { - key: 'UniqVpcIds', - enDescriptor: 'UniqVpcIds', - cnDescriptor: '私有网络ID数组,数组下标从0开始,如果不传则默认选择基础网络,如:vpc-sad23jfdfk', - link: '', - type: 'inputmulti' -}, { - key: 'UniqSubnetIds', - enDescriptor: 'UniqSubnetIds', - cnDescriptor: '子网ID数组,数组下标从0开始,如:subnet-fdj24n34j2', - link: '', - type: 'inputmulti' -}, { - key: 'Status', - enDescriptor: 'Status', - cnDescriptor: '实例状态', - multiple: true, - type: 'select', - list: Status -}, { - key: 'TypeVersion', - enDescriptor: 'TypeVersion', - cnDescriptor: '类型版本', - link: '', - type: 'select', - list: TypeVersion -}, { - key: 'EngineName', - enDescriptor: 'EngineName', - cnDescriptor: '引擎信息:Redis-2.8,Redis-4.0,CKV', - link: '', - type: 'input' -}, { - key: 'AutoRenew', - enDescriptor: 'AutoRenew', - cnDescriptor: '续费模式', - multiple: true, - type: 'select', - list: AutoRenew -}, { - key: 'BillingMode', - enDescriptor: 'BillingMode', - cnDescriptor: '计费模式:postpaid-按量计费;prepaid-包年包月', - link: '', - type: 'select', - list: BillingMode -}, { - key: 'Type', - enDescriptor: 'Type', - cnDescriptor: '实例类型', - link: '', - type: 'select', - list: Type -}]; -var REDISMEM_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'InstanceId', - queries: __assign({}, RedisFields), - rnodeid: '', - pnodeid: '' -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - var params = {}; - - if (!lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(queries)) { - params.Limit = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Limit', 20) || 20; - params.Offset = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Offset', 0) || 0; - queries = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.omit(queries, ['Offset', 'Limit']); - - lodash__WEBPACK_IMPORTED_MODULE_0___default.a.forEach(queries, function (item, key) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isArray(item)) { - item = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.compact(item); - - if (item.length > 0) { - params[key] = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(item); - } - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isObject(item)) { - // select 单选 - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isNumber(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', undefined)) || !lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', undefined))) { - params[key] = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value'); - } - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isNumber(item) || !lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(item)) { - params[key] = item; - } - }); - } - - return params; -} - -var REDISMEMInstanceAliasList = ['InstanceId', 'InstanceName', 'WanIp']; -var RedisMemInvalidDemensions = { - instanceid: 'InstanceId', - rnodeid: 'rnodeid', - pnodeid: 'pnodeid' -}; -var templateQueryIdMap = { - instance: 'InstanceId', - rnodeid: 'rnodeid', - pnodeid: 'pnodeid' -}; -var NodeType = ['Redis', 'Proxy']; -/* harmony default export */ __webpack_exports__["default"] = (REDISMEM_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/scf/datasource.ts": -/*!*************************************************!*\ - !*** ./datasource/tc_monitor/scf/datasource.ts ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/constants */ "./datasource/common/constants.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/scf/query_def.ts"); -/* harmony import */ var _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/datasourceStorage */ "./datasource/common/datasourceStorage.ts"); -/* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../locale */ "./locale/index.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - - - - -var SCFDatasource = -/** @class */ -function (_super) { - __extends(SCFDatasource, _super); - - function SCFDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_2__["templateQueryIdMap"]; - _this.queryMonitorExtraConfg = _query_def__WEBPACK_IMPORTED_MODULE_2__["queryMonitorExtraConfg"]; - _this.keyInStorage = _query_def__WEBPACK_IMPORTED_MODULE_2__["keyInStorage"]; - _this.Namespace = 'QCE/SCF_V2'; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_2__["SCFInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_2__["SCFInvalidDemensions"]; - _this.InstanceReqConfig = { - service: 'scf', - action: 'ListFunctions', - responseField: 'Functions' - }; - return _this; - } - - SCFDatasource.prototype.getRegions = function () { - return Promise.resolve(_query_def__WEBPACK_IMPORTED_MODULE_2__["regionSupported"].map(function (_a) { - var value = _a.value; - return { - value: value, - text: Object(_locale__WEBPACK_IMPORTED_MODULE_4__["t"])(value) - }; - })); - }; - - SCFDatasource.prototype.getMetrics = function (region) { - if (region === void 0) { - region = 'ap-guangzhou'; - } - - return __awaiter(this, void 0, void 0, function () { - var rawSet; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - return [4 - /*yield*/ - , _super.prototype.getMetrics.call(this, region)]; - - case 1: - rawSet = _a.sent(); - return [2 - /*return*/ - , rawSet.filter(function (item) { - var _a, _b, _c, _d, _e, _f; - /* hack:这里多加了筛选条件,是因为后端数据不准确,坑啊! 只拿取包含functionName的指标 */ - - - return ((_c = (_b = (_a = item.Dimensions) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.Dimensions) === null || _c === void 0 ? void 0 : _c.includes('functionName')) && ((_f = (_e = (_d = item.Dimensions) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.Dimensions) === null || _f === void 0 ? void 0 : _f.includes('namespace')) && !item.MetricName.startsWith('Name'); - })]; - } - }); - }); - }; - - SCFDatasource.prototype.getVersions = function (region, params) { - var serviceInfo = Object(_common_constants__WEBPACK_IMPORTED_MODULE_0__["GetServiceAPIInfo"])(region, 'scf'); - return this.doRequest({ - url: this.url + serviceInfo.path, - data: params - }, serviceInfo.service, { - region: region, - action: 'ListVersionByFunction' - }).then(function (response) { - return response.Versions; - }); - }; - - SCFDatasource.prototype.fetchMetricData = function (action, region, instance) { - return __awaiter(this, void 0, void 0, function () { - var rs, result; - - var _this = this; - - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!(action === 'ListVersionByFunction')) return [3 - /*break*/ - , 3]; - return [4 - /*yield*/ - , this.getVersions(region, { - FunctionName: instance[this.templateQueryIdMap.instance] - })]; - - case 1: - rs = _a.sent(); - result = rs.map(function (o) { - o._InstanceAliasValue = o[_this.templateQueryIdMap.version]; - return { - text: o[_this.templateQueryIdMap.version], - value: o[_this.templateQueryIdMap.version] - }; - }); - return [4 - /*yield*/ - , _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_3__["default"].setExtraStorage(this.service, this.keyInStorage.version, rs)]; - - case 2: - _a.sent(); - - return [2 - /*return*/ - , result]; - - case 3: - return [2 - /*return*/ - , []]; - } - }); - }); - }; - - return SCFDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (SCFDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/scf/query.ts": -/*!********************************************!*\ - !*** ./datasource/tc_monitor/scf/query.ts ***! - \********************************************/ -/*! exports provided: SCFQueryCtrl, scfQuery */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SCFQueryCtrl", function() { return SCFQueryCtrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scfQuery", function() { return scfQuery; }); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! grafana/app/core/core_module */ "grafana/app/core/core_module"); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/scf/query_def.ts"); -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - -var SCFQueryCtrl = -/** @class */ -function () { - SCFQueryCtrl.$inject = ["$scope", "$rootScope"]; - - /** @ngInject */ - function SCFQueryCtrl($scope, $rootScope) { - var _this = this; - - $scope.init = function () { - $scope.SCFQueryDescriptor = _query_def__WEBPACK_IMPORTED_MODULE_1__["SCFQueryDescriptor"]; - }; - - $scope.getInstanceId = function () { - var instance = $scope.target.instance; - instance = $scope.datasource.getServiceFn('scf', 'getVariable')(instance); - - if (!instance) { - return ''; - } - - try { - instance = JSON.parse(instance).FunctionName; - } catch (error) {// console.log(); - } - - return instance; - }; - - $scope.getVersions = function (target) { - return __awaiter(_this, void 0, void 0, function () { - var FunctionName, region, fetcher; - return __generator(this, function (_a) { - FunctionName = $scope.getInstanceId(); - region = $scope.datasource.getServiceFn('scf', 'getVariable')(target.region); - if (!FunctionName || !region) return [2 - /*return*/ - , []]; - fetcher = $scope.datasource.getServiceFn('scf', 'getVersions'); - return [2 - /*return*/ - , fetcher(region, { - FunctionName: FunctionName - }).then(function (res) { - // console.log(res, 'res'); - var result = res.map(function (o) { - o._InstanceAliasValue = o[_query_def__WEBPACK_IMPORTED_MODULE_1__["templateQueryIdMap"].version]; - return { - text: o[_query_def__WEBPACK_IMPORTED_MODULE_1__["templateQueryIdMap"].version], - value: JSON.stringify(o) - }; - }); - return result; - })]; - }); - }); - }; // $scope.onChecked = (srcField, dstField) => { - // if ($scope.target.queries[srcField] === true) { - // $scope.target.queries[dstField] = false; - // } - // $scope.onChange(); - // }; - // $scope.getDropdown = (field) => { - // switch (field) { - // case 'zone': - // return $scope.getZones(); - // default: - // return []; - // } - // }; - // $scope.getZones = () => { - // if (!$scope.region) { - // return []; - // } - // return $scope.datasource.getZones('cvm', $scope.region); - // }; - - - $scope.init(); - } - - return SCFQueryCtrl; -}(); - - -var template = "\n
\n\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n \n
\n \n \n
\n
\n
\n\n
\n"; -function scfQuery() { - return { - template: template, - controller: SCFQueryCtrl, - restrict: 'E', - scope: { - target: '=', - showDetail: '=', - region: '=', - datasource: '=', - getDropdownOptions: '&', - onChange: '&', - onRefresh: '&' - } - }; -} -grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default.a.directive('scfQuery', scfQuery); - -/***/ }), - -/***/ "./datasource/tc_monitor/scf/query_def.ts": -/*!************************************************!*\ - !*** ./datasource/tc_monitor/scf/query_def.ts ***! - \************************************************/ -/*! exports provided: SCFQueryDescriptor, default, SCFInstanceAliasList, SCFInvalidDemensions, queryMonitorExtraConfg, regionSupported, templateQueryIdMap, keyInStorage, SCFGetInstanceQueryParams, SCFDefaultDimensionList */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SCFQueryDescriptor", function() { return SCFQueryDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SCFInstanceAliasList", function() { return SCFInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SCFInvalidDemensions", function() { return SCFInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryMonitorExtraConfg", function() { return queryMonitorExtraConfg; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "regionSupported", function() { return regionSupported; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keyInStorage", function() { return keyInStorage; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SCFGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SCFDefaultDimensionList", function() { return SCFDefaultDimensionList; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); - -var SCFQueryDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputnumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputnumber', - min: 1, - max: 100 -}, { - key: 'SearchKey', - enDescriptor: 'SearchKey', - cnDescriptor: '支持FunctionName模糊匹配', - link: '', - type: 'input' -}, { - key: 'Namespace', - enDescriptor: 'Namespace', - cnDescriptor: '云函数命名空间', - link: '', - type: 'input' -}, { - key: 'Description', - enDescriptor: 'Description', - cnDescriptor: '函数描述,支持模糊搜索', - link: '', - type: 'input' -}, { - key: 'OrderBy', - enDescriptor: 'OrderBy', - cnDescriptor: '排序字段', - link: '', - type: 'select', - list: [{ - text: 'AddTime', - value: 'AddTime' - }, { - text: 'ModTime', - value: 'ModTime' - }, { - text: 'FunctionName', - value: 'FunctionName' - }] -}, { - key: 'Order', - enDescriptor: 'Order Direction', - cnDescriptor: '排序方式', - link: '', - type: 'select', - list: [{ - text: 'ASC', - value: 'ASC' - }, { - text: 'DESC', - value: 'DESC' - }] -} // { -// key: 'Filters', -// enDescriptor: 'Filters', -// cnDescriptor: '按照标签键值对进行过滤', -// link: '', -// type: 'dropdownmulti', -// }, -]; -var SCF_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'FunctionName', - version: '', - queries: { - Offset: 0, - Limit: 20, - OrderBy: {}, - Order: {}, - SearchKey: '', - Namespace: '', - Description: '' // Filters: {}, - - } -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - var params = {}; - - if (!lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(queries)) { - params.Limit = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Limit', 20) || 20; - params.Offset = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Offset', 0) || 0; - queries = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.omit(queries, ['Offset', 'Limit']); - - lodash__WEBPACK_IMPORTED_MODULE_0___default.a.forEach(queries, function (item, key) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isArray(item)) { - item = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.compact(item); - - if (item.length > 0) { - params[key] = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(item); - } - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isObject(item)) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isNumber(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', undefined)) || !lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', undefined))) { - params[key] = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value'); - } - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isNumber(item) || !lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(item)) { - params[key] = item; - } - }); - } - - return params; -} - -var SCFInstanceAliasList = ['FunctionId', 'FunctionName']; // 向实例里面塞dimensions对应的值,dimension中的key对应到实例中的key - -var SCFInvalidDemensions = { - functionName: 'FunctionName', - namespace: 'Namespace', - version: 'Version' -}; -var templateQueryIdMap = { - instance: 'FunctionName', - version: 'Version' -}; -var regionSupported = [{ - value: 'ap-beijing' -}, { - value: 'ap-chengdu' -}, { - value: 'ap-chongqing' -}, { - value: 'ap-guangzhou' -}, { - value: 'ap-hongkong' -}, { - value: 'ap-mumbai' -}, { - value: 'ap-shanghai' -}, { - value: 'ap-shanghai-fsi' -}, { - value: 'ap-shenzhen-fsi' -}, { - value: 'ap-singapore' -}, { - value: 'ap-tokyo' -}, { - value: 'eu-frankfurt' -}, { - value: 'na-siliconvalley' -}, { - value: 'na-toronto' -}]; // 需要缓存到storage的内容的key列表 - -var keyInStorage = { - version: 'version' -}; -/* -如果有InstanceId额外的维度,原则上都需要传入此map结构配置 -key的含义: - 经过InvalidDemensions处理后的string。topicId =》TopicId。 - 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId -value的含义: - 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、 - 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。 - 默认取通过InvalidDemsion处理后的key - 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。 - 即:templateQueryIdMap中内容。 - 联合上面2的内容筛选出原始sourceMap -*/ - -var queryMonitorExtraConfg = { - Version: { - dim_KeyInStorage: keyInStorage.version, - dim_KeyInTarget: 'version', - dim_KeyInMap: templateQueryIdMap.version - } -}; -/* harmony default export */ __webpack_exports__["default"] = (SCF_STATE); - // monitor监控数据默认支持的维度 - -var SCFDefaultDimensionList = ['functionName', 'namespace', 'version']; - -/***/ }), - -/***/ "./datasource/tc_monitor/sqlserver/datasource.ts": -/*!*******************************************************!*\ - !*** ./datasource/tc_monitor/sqlserver/datasource.ts ***! - \*******************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/sqlserver/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/constants */ "./datasource/common/constants.ts"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../locale */ "./locale/index.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - - - - -var DCDatasource = -/** @class */ -function (_super) { - __extends(DCDatasource, _super); - - function DCDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = _query_def__WEBPACK_IMPORTED_MODULE_0__["namespace"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["SQLSERVERInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["SQLSERVERInvalidDemensions"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_0__["templateQueryIdMap"]; // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致 - - _this.InstanceReqConfig = { - service: 'sqlserver', - action: 'DescribeDBInstances', - responseField: 'DBInstances' - }; - return _this; - } - - DCDatasource.prototype.getMetrics = function (region) { - if (region === void 0) { - region = 'ap-guangzhou'; - } - - return __awaiter(this, void 0, void 0, function () { - var rawSet; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - return [4 - /*yield*/ - , _super.prototype.getMetrics.call(this, region)]; - - case 1: - rawSet = _a.sent(); - return [2 - /*return*/ - , lodash__WEBPACK_IMPORTED_MODULE_3___default.a.compact(rawSet.map(function (item) { - return Object(_query_def__WEBPACK_IMPORTED_MODULE_0__["modifyDimensons"])(item); - }))]; - } - }); - }); - }; - - DCDatasource.prototype.getRegions = function () { - return Promise.resolve(_query_def__WEBPACK_IMPORTED_MODULE_0__["regionSupported"].map(function (_a) { - var value = _a.value; - return { - value: value, - text: Object(_locale__WEBPACK_IMPORTED_MODULE_4__["t"])(value) - }; - })); - }; - - DCDatasource.prototype.getFilterDropdown = function (_a) { - var field = _a.field, - region = _a.region; - - if (field === 'Zone') { - var serviceInfo = Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["GetServiceAPIInfo"])(region, 'cvm'); - return this.doRequest({ - url: this.url + serviceInfo.path - }, serviceInfo.service, { - region: region, - action: 'DescribeZones' - }).then(function (response) { - return lodash__WEBPACK_IMPORTED_MODULE_3___default.a.filter(lodash__WEBPACK_IMPORTED_MODULE_3___default.a.map(response.ZoneSet || [], function (item) { - return { - text: item.ZoneName, - value: item.Zone, - ZoneState: item.ZoneState, - Zone: item.Zone - }; - }), function (item) { - return item.ZoneState === 'AVAILABLE'; - }); - }); - } - - return []; - }; - - return DCDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (DCDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/sqlserver/query.ts": -/*!**************************************************!*\ - !*** ./datasource/tc_monitor/sqlserver/query.ts ***! - \**************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _base_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_base/query */ "./datasource/tc_monitor/_base/query.ts"); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/sqlserver/query_def.ts"); - - -Object(_base_query__WEBPACK_IMPORTED_MODULE_0__["default"])(_query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorName"], _query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorConfig"]); - -/***/ }), - -/***/ "./datasource/tc_monitor/sqlserver/query_def.ts": -/*!******************************************************!*\ - !*** ./datasource/tc_monitor/sqlserver/query_def.ts ***! - \******************************************************/ -/*! exports provided: default, SQLSERVERNETFilterFieldsDescriptor, templateQueryIdMap, SQLSERVERInstanceAliasList, SQLSERVERInvalidDemensions, namespace, queryEditorName, queryEditorConfig, regionSupported, modifyDimensons, SQLSERVERGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SQLSERVERNETFilterFieldsDescriptor", function() { return SQLSERVERNETFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SQLSERVERInstanceAliasList", function() { return SQLSERVERInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SQLSERVERInvalidDemensions", function() { return SQLSERVERInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorName", function() { return queryEditorName; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorConfig", function() { return queryEditorConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "regionSupported", function() { return regionSupported; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "modifyDimensons", function() { return modifyDimensons; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SQLSERVERGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); - - -var namespace = 'QCE/SQLSERVER'; // 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称 - -var queryEditorName = 'sqlserverQuery'; -var SQLSERVERInvalidDemensions = { - resourceId: 'InstanceId' -}; -var SQLSERVERInstanceAliasList = ['InstanceId', 'Name']; -var templateQueryIdMap = { - instance: 'InstanceId' -}; // select类型需要注意是{},multi后缀是[] - -var SQLSERVERNETFilterFields = { - Limit: 20, - Offset: 0, - ProjectId: null, - Status: {}, - InstanceIdSet: [], - PayMode: {}, - VpcId: '', - SubnetId: '', - VipSet: [], - InstanceNameSet: [], - VersionSet: [], - Zone: '' -}; -var SQLSERVERNETFilterFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputNumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputNumber', - min: 1, - max: 100 -}, { - key: 'ProjectId', - enDescriptor: 'ProjectId', - cnDescriptor: '项目ID', - link: '', - type: 'inputNumber' -}, { - key: 'Status', - enDescriptor: 'Status', - cnDescriptor: '实例状态', - link: '', - type: 'select', - list: [{ - text: '申请中', - value: 1 - }, { - text: '运行中', - value: 2 - }, { - text: '受限运行中 (主备切换中)', - value: 3 - }, { - text: '已隔离', - value: 4 - }, { - text: '回收中', - value: 5 - }, { - text: '已回收', - value: 6 - }, { - text: '任务执行中', - value: 7 - }, { - text: '已下线', - value: 8 - }, { - text: '实例扩容中', - value: 9 - }, { - text: '实例迁移中', - value: 10 - }, { - text: '只读', - value: 11 - }, { - text: '重启中', - value: 12 - }] -}, { - key: 'InstanceIdSet', - enDescriptor: 'InstanceIdSet', - cnDescriptor: '实例ID', - link: '', - type: 'inputMulti' -}, { - key: 'PayMode', - enDescriptor: 'PayMode', - cnDescriptor: '子网实例ID', - link: '', - type: 'select', - list: [{ - text: '包年包月', - value: 1 - }, { - text: '按量计费', - value: 0 - }] -}, { - key: 'VpcId', - enDescriptor: 'VpcId', - cnDescriptor: '实例所属VPC的唯一字符串ID', - link: '', - type: 'input' -}, { - key: 'SubnetId', - enDescriptor: 'SubnetId', - cnDescriptor: '实例所属子网的唯一字符串ID', - link: '', - type: 'input' -}, { - key: 'VipSet', - enDescriptor: 'VipSet', - cnDescriptor: '实例内网地址列表', - link: '', - type: 'inputMulti' -}, { - key: 'InstanceNameSet', - enDescriptor: 'InstanceNameSet', - cnDescriptor: '实例名称列表, 模糊查询', - link: '', - type: 'inputMulti' -}, { - key: 'VersionSet', - enDescriptor: 'VersionSet', - cnDescriptor: '实例版本代号列表', - link: '', - type: 'inputMulti' -}, { - key: 'Zone', - enDescriptor: 'Zone', - cnDescriptor: '实例可用区', - link: '', - type: 'dropdown' -}]; // 各产品实例列表detail配置 - -var queryEditorConfig = { - instanceDocUrl: 'https://cloud.tencent.com/document/api/238/19969', - namespace: namespace, - fieldDescriptor: SQLSERVERNETFilterFieldsDescriptor -}; // regions for dropdown - -var regionSupported = [{ - value: 'ap-beijing' -}, { - value: 'ap-chengdu' -}, { - value: 'ap-chongqing' -}, { - value: 'ap-guangzhou' -}, { - value: 'ap-hongkong' -}, { - value: 'ap-nanjing' -}, { - value: 'ap-seoul' -}, { - value: 'ap-shanghai' -}, { - value: 'ap-shanghai-fsi' -}, { - value: 'ap-shenzhen-fsi' -}, { - value: 'ap-singapore' -}, { - value: 'ap-tokyo' -}, { - value: 'eu-moscow' -}, { - value: 'na-siliconvalley' -}]; -var SQLSERVER_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'InstanceId', - queries: SQLSERVERNETFilterFields -}; - -function modifyDimensons(metricItem) { - var metricTmp = lodash__WEBPACK_IMPORTED_MODULE_1___default.a.cloneDeep(metricItem); - - metricTmp.Dimensions.forEach(function (item) { - item.Dimensions = ['resourceId']; - }); - return metricTmp; -} - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - return Object(_common_utils__WEBPACK_IMPORTED_MODULE_0__["instanceQueryParamsBaseParse"])(queries, false); -} - -/* harmony default export */ __webpack_exports__["default"] = (SQLSERVER_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/tcaplus/datasource.ts": -/*!*****************************************************!*\ - !*** ./datasource/tc_monitor/tcaplus/datasource.ts ***! - \*****************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/tcaplus/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../locale */ "./locale/index.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - - - - - - -var DCDatasource = -/** @class */ -function (_super) { - __extends(DCDatasource, _super); - - function DCDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = _query_def__WEBPACK_IMPORTED_MODULE_0__["namespace"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["TCAPLUSInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["TCAPLUSInvalidDemensions"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_0__["templateQueryIdMap"]; // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致 - - _this.InstanceReqConfig = { - service: 'tcaplusdb', - action: 'DescribeTables', - responseField: 'TableInfos' - }; - return _this; - } // 重写getRegion - - - DCDatasource.prototype.getRegions = function () { - return this.doRequest({ - url: this.url + '/tcaplusdb' - }, 'tcaplusdb', { - action: 'DescribeRegions', - region: 'ap-guangzhou' - }).then(function (response) { - return lodash__WEBPACK_IMPORTED_MODULE_2___default.a.map(response.RegionInfos || [], function (item) { - return { - text: Object(_locale__WEBPACK_IMPORTED_MODULE_3__["t"])(item.RegionName), - value: item.RegionName - }; - }); - }); - }; - - return DCDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (DCDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/tcaplus/query.ts": -/*!************************************************!*\ - !*** ./datasource/tc_monitor/tcaplus/query.ts ***! - \************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _base_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_base/query */ "./datasource/tc_monitor/_base/query.ts"); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/tcaplus/query_def.ts"); - - -Object(_base_query__WEBPACK_IMPORTED_MODULE_0__["default"])(_query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorName"], _query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorConfig"]); - -/***/ }), - -/***/ "./datasource/tc_monitor/tcaplus/query_def.ts": -/*!****************************************************!*\ - !*** ./datasource/tc_monitor/tcaplus/query_def.ts ***! - \****************************************************/ -/*! exports provided: default, TCAPLUSFilterFieldsDescriptor, templateQueryIdMap, TCAPLUSInstanceAliasList, TCAPLUSInvalidDemensions, namespace, queryEditorName, queryEditorConfig, regonsMap, TCAPLUSGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TCAPLUSFilterFieldsDescriptor", function() { return TCAPLUSFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TCAPLUSInstanceAliasList", function() { return TCAPLUSInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TCAPLUSInvalidDemensions", function() { return TCAPLUSInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorName", function() { return queryEditorName; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorConfig", function() { return queryEditorConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "regonsMap", function() { return regonsMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TCAPLUSGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); - -var namespace = 'QCE/TCAPLUS'; // 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称 - -var queryEditorName = 'tcaplusQuery'; -var TCAPLUSInvalidDemensions = {// TableInstanceId: 'TableInstanceId', - // ClusterId: 'ClusterId', -}; // 需和文件名对应 - -var TCAPLUSInstanceAliasList = ['TableInstanceId', 'TableName']; -var templateQueryIdMap = { - instance: 'TableInstanceId' -}; // select类型需要注意是{},multi后缀是[],dropdown是类型 - -var TCAPLUSFilterFields = { - Limit: 20, - Offset: 0, - ClusterId: '', - TableGroupIds: [], - TableName: '', - TableInstanceId: '', - TableIdlType: {}, - TableType: {}, - ListElementNum: null, - ReservedVolume: null, - ReservedReadQps: null, - ReservedWriteQps: null, - Memo: '', - FileName: '', - FileExtType: '', - FileSize: null, - FileContent: '' -}; -var TCAPLUSFilterFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputNumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputNumber', - min: 1, - max: 100 -}, { - key: 'ClusterId', - enDescriptor: 'ClusterId', - cnDescriptor: '表格所属集群ID', - link: '', - type: 'input' -}, { - key: 'TableGroupIds', - enDescriptor: 'TableGroupIds', - cnDescriptor: '表格组ID列表', - link: '', - type: 'inputMulti' -}, { - key: 'TableName', - enDescriptor: 'TableName', - cnDescriptor: '表格名称', - link: '', - type: 'input' -}, { - key: 'TableInstanceId', - enDescriptor: 'TableInstanceId', - cnDescriptor: '表实例ID', - link: '', - type: 'input' -}, { - key: 'TableIdlType', - enDescriptor: 'TableIdlType', - cnDescriptor: '表格描述语言类型', - link: '', - type: 'select', - list: [{ - text: 'PROTO', - value: 'PROTO' - }, { - text: 'TDR', - value: 'TDR' - }] -}, { - key: 'TableType', - enDescriptor: 'TableType', - cnDescriptor: '表格数据结构类型', - link: '', - type: 'select', - list: [{ - text: 'GENERIC', - value: 'GENERIC' - }, { - text: 'LIST', - value: 'LIST' - }] -}, { - key: 'ListElementNum', - enDescriptor: 'ListElementNum', - cnDescriptor: 'LIST表元素个数', - link: '', - type: 'inputNumber' -}, { - key: 'ReservedVolume', - enDescriptor: 'ReservedVolume', - cnDescriptor: '表格预留容量(GB)', - link: '', - type: 'inputNumber' -}, { - key: 'ReservedReadQps', - enDescriptor: 'ReservedReadQps', - cnDescriptor: '表格预留读CU', - link: '', - type: 'inputNumber' -}, { - key: 'ReservedWriteQps', - enDescriptor: 'ReservedWriteQps', - cnDescriptor: '表格预留写CU', - link: '', - type: 'inputNumber' -}, { - key: 'Memo', - enDescriptor: 'Memo', - cnDescriptor: '表格备注信息', - link: '', - type: 'input' -}, { - key: 'FileName', - enDescriptor: 'FileName', - cnDescriptor: 'Key回档文件名,回档专用', - link: '', - type: 'input' -}, { - key: 'FileExtType', - enDescriptor: 'FileExtType', - cnDescriptor: 'Key回档文件扩展名,回档专用', - link: '', - type: 'input' -}, { - key: 'FileSize', - enDescriptor: 'FileSize', - cnDescriptor: 'Key回档文件大小,回档专用', - link: '', - type: 'inputNumber' -}, { - key: 'FileContent', - enDescriptor: 'FileContent', - cnDescriptor: 'Key回档文件内容,回档专用', - link: '', - type: 'input' -}]; // 各产品实例列表detail配置 - -var queryEditorConfig = { - instanceDocUrl: 'https://cloud.tencent.com/document/api/596/39664', - namespace: namespace, - fieldDescriptor: TCAPLUSFilterFieldsDescriptor -}; -var TCAPLUS_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'TableInstanceId', - queries: TCAPLUSFilterFields -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - var params = {}; - params.Limit = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Limit', 20) || 20; - params.Offset = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Offset', 0) || 0; - params.ClusterId = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'ClusterId', '') || ''; - params.TableGroupIds = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'TableGroupIds', []) || []; - queries = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.omit(queries, ['Offset', 'Limit', 'TableGroupIds', 'ClusterId']); - var SelectedTables = []; - - lodash__WEBPACK_IMPORTED_MODULE_0___default.a.forEach(queries, function (item, key) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isArray(item)) { - item = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.compact(item); - - if (item.length > 0) { - SelectedTables[key] = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(item); - } - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isObject(item)) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isNumber(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', undefined)) || !lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', undefined))) { - SelectedTables[key] = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value'); - } - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isNumber(item) || !lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(item)) { - SelectedTables[key] = item; - } - }); - - params.SelectedTables = SelectedTables; - return params; -} // 和其他产品的展示保持一致 - - -var regonsMap = { - 'ap-beijing': '华北地区(北京)', - 'ap-guangzhou': '华南地区(广州)', - 'ap-hongkong': '港澳台地区(中国香港)', - 'ap-seoul': '亚太东北(首尔)', - 'ap-shanghai': '华东地区(上海)', - 'ap-singapore': '亚太东南(新加坡)', - 'ap-tokyo': '亚太东北(东京)', - 'eu-frankfurt': '欧洲地区(法兰克福)', - 'na-ashburn': '美国东部(弗吉尼亚)', - 'na-siliconvalley': '美国西部(硅谷)' -}; -/* harmony default export */ __webpack_exports__["default"] = (TCAPLUS_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/tdmq/datasource.ts": -/*!**************************************************!*\ - !*** ./datasource/tc_monitor/tdmq/datasource.ts ***! - \**************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/tdmq/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/constants */ "./datasource/common/constants.ts"); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); -/* harmony import */ var _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/datasourceStorage */ "./datasource/common/datasourceStorage.ts"); -/* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../locale */ "./locale/index.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - - - - - - -var TDMQDatasource = -/** @class */ -function (_super) { - __extends(TDMQDatasource, _super); - - function TDMQDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = _query_def__WEBPACK_IMPORTED_MODULE_0__["namespace"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["TDMQInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["TDMQInvalidDemensions"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_0__["templateQueryIdMap"]; - _this.queryMonitorExtraConfg = _query_def__WEBPACK_IMPORTED_MODULE_0__["queryMonitorExtraConfg"]; - _this.keyInStorage = _query_def__WEBPACK_IMPORTED_MODULE_0__["keyInStorage"]; // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致 - - _this.InstanceReqConfig = { - service: 'tdmq', - action: 'DescribeClusters', - responseField: 'ClusterSet' - }; - _this.extraActionMap = { - DescribeTopics: { - service: 'tdmq', - action: 'DescribeTopics', - responseField: 'TopicSets', - pickKey: 'TopicName' - }, - DescribeEnvironments: { - service: 'tdmq', - action: 'DescribeEnvironments', - responseField: 'EnvironmentSet', - pickKey: 'EnvironmentId' - } - }; - return _this; - } // getFilterDropdown({ field }) { - // return super.getRegions(); - // } - - - TDMQDatasource.prototype.getRegions = function () { - return Promise.resolve(_query_def__WEBPACK_IMPORTED_MODULE_0__["regionSupported"].map(function (_a) { - var value = _a.value; - return { - value: value, - text: Object(_locale__WEBPACK_IMPORTED_MODULE_6__["t"])(value) - }; - })); - }; - - TDMQDatasource.prototype.getMetrics = function (region) { - if (region === void 0) { - region = 'ap-guangzhou'; - } - - return __awaiter(this, void 0, void 0, function () { - var rawSet; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - return [4 - /*yield*/ - , _super.prototype.getMetrics.call(this, region)]; - - case 1: - rawSet = _a.sent(); - return [2 - /*return*/ - , lodash__WEBPACK_IMPORTED_MODULE_2___default.a.compact(rawSet.map(function (item) { - return Object(_query_def__WEBPACK_IMPORTED_MODULE_0__["modifyDimensons"])(item); - }))]; - } - }); - }); - }; - - TDMQDatasource.prototype.getConsumerList = function (params) { - return __awaiter(this, void 0, void 0, function () { - var region, act, payload, _a, service, action, responseField, serviceInfo, rs; - - var _this = this; - - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - region = params.region, act = params.action, payload = params.payload; - _a = this.extraActionMap[act], service = _a.service, action = _a.action, responseField = _a.responseField; - serviceInfo = Object(_common_constants__WEBPACK_IMPORTED_MODULE_3__["GetServiceAPIInfo"])(region, service); - return [4 - /*yield*/ - , Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["fetchAllFactory"])(function (data) { - return _this.doRequest({ - url: _this.url + serviceInfo.path, - data: data - }, serviceInfo.service, { - region: region, - action: action - }); - }, payload, responseField)]; - - case 1: - rs = _b.sent(); // console.log({ rs }); - - return [2 - /*return*/ - , rs[0]]; - } - }); - }); - }; - - TDMQDatasource.prototype.fetchMetricData = function (action, region, instance, query) { - return __awaiter(this, void 0, void 0, function () { - var payload, rs, pickKey_1, result; - - var _this = this; - - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - payload = { - Limit: 100, - ClusterId: instance[this.templateQueryIdMap.instance] - }; - if (!(Object.keys(this.extraActionMap).indexOf(action) !== -1)) return [3 - /*break*/ - , 3]; - - if (action === 'DescribeTopics') { - payload.EnvironmentId = this.getVariable(query['environmentid']); - } - - return [4 - /*yield*/ - , this.getConsumerList({ - region: region, - action: action, - payload: payload - })]; - - case 1: - rs = _a.sent(); - pickKey_1 = this.extraActionMap[action].pickKey; - result = rs.map(function (o) { - o._InstanceAliasValue = o[_this.templateQueryIdMap[pickKey_1]]; - return { - text: o[_this.templateQueryIdMap[pickKey_1]], - value: o[_this.templateQueryIdMap[pickKey_1]] - }; - }); - return [4 - /*yield*/ - , _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_5__["default"].setExtraStorage(this.service, this.keyInStorage[pickKey_1], rs)]; - - case 2: - _a.sent(); - - return [2 - /*return*/ - , result]; - - case 3: - return [2 - /*return*/ - , []]; - } - }); - }); - }; - - return TDMQDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (TDMQDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/tdmq/query.ts": -/*!*********************************************!*\ - !*** ./datasource/tc_monitor/tdmq/query.ts ***! - \*********************************************/ -/*! exports provided: QueryCtrl, sQuery */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueryCtrl", function() { return QueryCtrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sQuery", function() { return sQuery; }); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! grafana/app/core/core_module */ "grafana/app/core/core_module"); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/tdmq/query_def.ts"); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/constants */ "./datasource/common/constants.ts"); -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - -var ExtraFields = [{ - label: 'environmentId', - field: 'environmentId', - action: 'DescribeEnvironments' -}, { - label: 'topicName', - field: 'topicName', - action: 'DescribeTopics' -}]; -var dropdownTextConfig = { - DescribeTopics: 'topicName', - DescribeEnvironments: 'environmentId' -}; - -var QueryCtrl = -/** @class */ -function () { - QueryCtrl.$inject = ["$scope", "$rootScope"]; - - /** @ngInject */ - function QueryCtrl($scope, $rootScope) { - var _this = this; - - $scope.init = function () { - $scope.TDMQFilterFieldsDescriptor = _query_def__WEBPACK_IMPORTED_MODULE_1__["TDMQFilterFieldsDescriptor"]; - $scope.ExtraFields = ExtraFields; - $scope.namespace = _query_def__WEBPACK_IMPORTED_MODULE_1__["namespace"]; - }; - - $scope.getInstanceId = function () { - var instance = $scope.target.instance; - var service = Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["GetServiceFromNamespace"])($scope.namespace); - instance = $scope.datasource.getServiceFn(service, 'getVariable')(instance); - - if (!instance) { - return ''; - } - - try { - instance = JSON.parse(instance)[_query_def__WEBPACK_IMPORTED_MODULE_1__["templateQueryIdMap"].instance]; - } catch (error) {// console.log(); - } - - return instance; - }; - - $scope.getExtraFields = function () { - return ExtraFields.filter(function (item) { - var _a, _b; - - return item.field in ((_a = $scope.dims) !== null && _a !== void 0 ? _a : {}) || item.label in ((_b = $scope.dims) !== null && _b !== void 0 ? _b : {}); - }); - }; - - $scope.getExtraDropdown = function (target, action) { - return __awaiter(_this, void 0, void 0, function () { - var service, region, payload, evId, rs, result; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - service = Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["GetServiceFromNamespace"])($scope.namespace); - region = $scope.datasource.getServiceFn(service, 'getVariable')(target.region); - payload = { - Limit: 100, - ClusterId: $scope.getInstanceId() - }; - - if (action === 'DescribeTopics') { - evId = $scope.target.environmentId; - - try { - evId = JSON.parse(evId); - evId = evId[_query_def__WEBPACK_IMPORTED_MODULE_1__["templateQueryIdMap"].environmentId]; - } catch (e) {} - - payload.EnvironmentId = evId; - } - - return [4 - /*yield*/ - , $scope.datasource.getServiceFn(service, 'getConsumerList')({ - region: region, - action: action, - payload: payload - })]; - - case 1: - rs = _a.sent(); - result = rs.map(function (o) { - o._InstanceAliasValue = o[_query_def__WEBPACK_IMPORTED_MODULE_1__["templateQueryIdMap"][dropdownTextConfig[action]]]; - return { - text: o[_query_def__WEBPACK_IMPORTED_MODULE_1__["templateQueryIdMap"][dropdownTextConfig[action]]], - label: o[_query_def__WEBPACK_IMPORTED_MODULE_1__["templateQueryIdMap"][dropdownTextConfig[action]]], - value: JSON.stringify(o) - }; - }); - return [2 - /*return*/ - , result]; - } - }); - }); - }; - - $scope.init(); - } - - return QueryCtrl; -}(); - - -var template = "\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n"; -function sQuery() { - return { - template: template, - controller: QueryCtrl, - restrict: 'E', - scope: { - target: '=', - showDetail: '=', - region: '=', - datasource: '=', - getDropdownOptions: '&', - onChange: '&', - onRefresh: '&', - dims: '=' - } - }; -} -grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default.a.directive(_query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorName"], sQuery); - -/***/ }), - -/***/ "./datasource/tc_monitor/tdmq/query_def.ts": -/*!*************************************************!*\ - !*** ./datasource/tc_monitor/tdmq/query_def.ts ***! - \*************************************************/ -/*! exports provided: default, TDMQFilterFieldsDescriptor, templateQueryIdMap, TDMQInstanceAliasList, TDMQInvalidDemensions, namespace, queryEditorName, queryMonitorExtraConfg, keyInStorage, modifyDimensons, regionSupported, TDMQGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TDMQFilterFieldsDescriptor", function() { return TDMQFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TDMQInstanceAliasList", function() { return TDMQInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TDMQInvalidDemensions", function() { return TDMQInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorName", function() { return queryEditorName; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryMonitorExtraConfg", function() { return queryMonitorExtraConfg; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keyInStorage", function() { return keyInStorage; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "modifyDimensons", function() { return modifyDimensons; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "regionSupported", function() { return regionSupported; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TDMQGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); - - -var namespace = 'QCE/TDMQ'; // 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称 - -var queryEditorName = 'tdmqQuery'; -var TDMQInvalidDemensions = { - tenantId: 'ClusterId', - tenant: 'ClusterId', - topicName: 'TopicName', - environmentId: 'EnvironmentId' -}; // 需和文件名对应 - -var TDMQInstanceAliasList = ['ClusterId', 'ClusterName']; -var templateQueryIdMap = { - instance: 'ClusterId', - topicName: 'TopicName', - environmentId: 'EnvironmentId' -}; // select类型需要注意是{},multi后缀是[],dropdown是'' - -var TDMQFilterFields = { - Limit: 20, - Offset: 0 -}; -var TDMQFilterFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputNumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputNumber', - min: 1, - max: 100 -}]; -var CDNPROVINCE_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'ClusterId', - // 此处key应该是经过TDMQInvalidDemensions处理后的 - topicName: '', - environmentId: '', - queries: TDMQFilterFields -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - return Object(_common_utils__WEBPACK_IMPORTED_MODULE_0__["instanceQueryParamsBaseParse"])(queries, true); -} - -var regionSupported = [{ - value: 'ap-beijing' -}, { - value: 'ap-chengdu' -}, { - value: 'ap-chongqing' -}, { - value: 'ap-guangzhou' -}, { - value: 'ap-shenzhen-fsi' -}, { - value: 'ap-shanghai' -}, { - value: 'ap-shanghai-fsi' -}, { - value: 'ap-nanjing' -}, { - value: 'ap-hongkong' -}, { - value: 'ap-tokyo' -}, { - value: 'ap-seoul' -}, { - value: 'ap-singapore' -}, { - value: 'ap-bangkok' -}, { - value: 'ap-jakarta' -}, { - value: 'ap-mumbai' -}, { - value: 'eu-frankfurt' -}, { - value: 'eu-moscow' -}, { - value: 'na-ashburn' -}, { - value: 'na-siliconvalley' -}, { - value: 'na-toronto' -}]; - -function modifyDimensons(metricItem) { - var metricTmp = lodash__WEBPACK_IMPORTED_MODULE_1___default.a.cloneDeep(metricItem); - - metricTmp.Dimensions.forEach(function (item) { - if (item.Dimensions.indexOf('topicName') !== -1 && item.Dimensions.indexOf('environmentId') === -1) { - item.Dimensions.push('environmentId'); - } - }); - return metricTmp; -} // 需要缓存到storage的内容的key列表 - - -var keyInStorage = { - topicName: 'topicName', - environmentId: 'environmentId' -}; -/* -如果有InstanceId额外的维度,原则上都需要传入此map结构配置 -key的含义: - 经过InvalidDemensions处理后的string。topicId =》TopicId。 - 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId -value的含义: - 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、 - 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。 - 默认取通过InvalidDemsion处理后的key - 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。 - 即:templateQueryIdMap中内容。 - 联合上面2的内容筛选出原始sourceMap -*/ - -var queryMonitorExtraConfg = { - TopicName: { - dim_KeyInStorage: keyInStorage.topicName, - dim_KeyInTarget: 'topicName', - dim_KeyInMap: templateQueryIdMap.topicName - }, - EnvironmentId: { - dim_KeyInStorage: keyInStorage.environmentId, - dim_KeyInTarget: 'environmentId', - dim_KeyInMap: templateQueryIdMap.environmentId - } -}; -/* harmony default export */ __webpack_exports__["default"] = (CDNPROVINCE_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/tdmq_rabbitmq/datasource.ts": -/*!***********************************************************!*\ - !*** ./datasource/tc_monitor/tdmq_rabbitmq/datasource.ts ***! - \***********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/tdmq_rabbitmq/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/constants */ "./datasource/common/constants.ts"); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); -/* harmony import */ var _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/datasourceStorage */ "./datasource/common/datasourceStorage.ts"); -/* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../locale */ "./locale/index.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - - - - - -var TDMQDatasource = -/** @class */ -function (_super) { - __extends(TDMQDatasource, _super); - - function TDMQDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = _query_def__WEBPACK_IMPORTED_MODULE_0__["namespace"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["TDMQRABBITMQInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["TDMQInvalidDemensions"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_0__["templateQueryIdMap"]; - _this.queryMonitorExtraConfg = _query_def__WEBPACK_IMPORTED_MODULE_0__["queryMonitorExtraConfg"]; - _this.keyInStorage = _query_def__WEBPACK_IMPORTED_MODULE_0__["keyInStorage"]; // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致 - - _this.InstanceReqConfig = { - service: 'tdmq', - action: 'DescribeRabbitMQVipInstances', - responseField: 'Instances' - }; - _this.extraActionMap = { - DescribeRabbitMQNodeList: { - service: 'tdmq', - action: 'DescribeRabbitMQNodeList', - responseField: 'NodeList', - pickKey: 'node' - } - }; - return _this; - } - - TDMQDatasource.prototype.getRegions = function () { - return Promise.resolve(_query_def__WEBPACK_IMPORTED_MODULE_0__["regionSupported"].map(function (_a) { - var value = _a.value; - return { - value: value, - text: Object(_locale__WEBPACK_IMPORTED_MODULE_5__["t"])(value) - }; - })); - }; - - TDMQDatasource.prototype.getConsumerList = function (params) { - return __awaiter(this, void 0, void 0, function () { - var region, act, payload, _a, service, action, responseField, serviceInfo, rs; - - var _this = this; - - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - region = params.region, act = params.action, payload = params.payload; - _a = this.extraActionMap[act], service = _a.service, action = _a.action, responseField = _a.responseField; - serviceInfo = Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["GetServiceAPIInfo"])(region, service); - return [4 - /*yield*/ - , Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["fetchAllFactory"])(function (data) { - return _this.doRequest({ - url: _this.url + serviceInfo.path, - data: data - }, serviceInfo.service, { - region: region, - action: action - }); - }, payload, responseField)]; - - case 1: - rs = _b.sent(); - return [2 - /*return*/ - , rs[0]]; - } - }); - }); - }; - - TDMQDatasource.prototype.fetchMetricData = function (action, region, instance, query) { - return __awaiter(this, void 0, void 0, function () { - var payload, rs, pickKey_1, result; - - var _this = this; - - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - payload = { - Limit: 100, - InstanceId: instance[this.templateQueryIdMap.instance] - }; - if (!(Object.keys(this.extraActionMap).indexOf(action) !== -1)) return [3 - /*break*/ - , 3]; - return [4 - /*yield*/ - , this.getConsumerList({ - region: region, - action: action, - payload: payload - })]; - - case 1: - rs = _a.sent(); - pickKey_1 = this.extraActionMap[action].pickKey; - result = rs.map(function (o) { - o._InstanceAliasValue = o[_this.templateQueryIdMap[pickKey_1]]; - return { - text: o[_this.templateQueryIdMap[pickKey_1]], - value: o[_this.templateQueryIdMap[pickKey_1]] - }; - }); - return [4 - /*yield*/ - , _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_4__["default"].setExtraStorage(this.service, this.keyInStorage[pickKey_1], rs)]; - - case 2: - _a.sent(); - - return [2 - /*return*/ - , result]; - - case 3: - return [2 - /*return*/ - , []]; - } - }); - }); - }; - - return TDMQDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (TDMQDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/tdmq_rabbitmq/query.ts": -/*!******************************************************!*\ - !*** ./datasource/tc_monitor/tdmq_rabbitmq/query.ts ***! - \******************************************************/ -/*! exports provided: QueryCtrl, sQuery */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueryCtrl", function() { return QueryCtrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sQuery", function() { return sQuery; }); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! grafana/app/core/core_module */ "grafana/app/core/core_module"); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/tdmq_rabbitmq/query_def.ts"); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/constants */ "./datasource/common/constants.ts"); -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - -var ExtraFields = [{ - label: 'Node', - field: 'node', - action: 'DescribeRabbitMQNodeList' -}]; -var dropdownTextConfig = { - DescribeRabbitMQNodeList: 'node' -}; - -var QueryCtrl = -/** @class */ -function () { - QueryCtrl.$inject = ["$scope", "$rootScope"]; - - /** @ngInject */ - function QueryCtrl($scope, $rootScope) { - var _this = this; - - $scope.init = function () { - $scope.TDMQFilterFieldsDescriptor = _query_def__WEBPACK_IMPORTED_MODULE_1__["TDMQFilterFieldsDescriptor"]; - $scope.ExtraFields = ExtraFields; - $scope.namespace = _query_def__WEBPACK_IMPORTED_MODULE_1__["namespace"]; - }; - - $scope.clearExtrasAlias = function () { - $scope.target.node = ''; - }; - - $scope.getInstanceId = function () { - var instance = $scope.target.instance; - var service = Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["GetServiceFromNamespace"])($scope.namespace); - instance = $scope.datasource.getServiceFn(service, 'getVariable')(instance); - - if (!instance) { - return ''; - } - - try { - instance = JSON.parse(instance)[_query_def__WEBPACK_IMPORTED_MODULE_1__["templateQueryIdMap"].instance]; - } catch (error) {// console.log(); - } - - return instance; - }; - - $scope.getExtraFields = function () { - return ExtraFields.filter(function (item) { - var _a, _b; - - return item.field in ((_a = $scope.dims) !== null && _a !== void 0 ? _a : {}) || item.label in ((_b = $scope.dims) !== null && _b !== void 0 ? _b : {}); - }); - }; - - $scope.getExtraDropdown = function (target, action) { - return __awaiter(_this, void 0, void 0, function () { - var service, region, payload, rs, result; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - service = Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["GetServiceFromNamespace"])($scope.namespace); - region = $scope.datasource.getServiceFn(service, 'getVariable')(target.region); - payload = { - Limit: 100, - InstanceId: $scope.getInstanceId() - }; - return [4 - /*yield*/ - , $scope.datasource.getServiceFn(service, 'getConsumerList')({ - region: region, - action: action, - payload: payload - })]; - - case 1: - rs = _a.sent(); - result = rs.map(function (o) { - o._InstanceAliasValue = o[_query_def__WEBPACK_IMPORTED_MODULE_1__["templateQueryIdMap"][dropdownTextConfig[action]]]; - return { - text: o[_query_def__WEBPACK_IMPORTED_MODULE_1__["templateQueryIdMap"][dropdownTextConfig[action]]], - label: o[_query_def__WEBPACK_IMPORTED_MODULE_1__["templateQueryIdMap"][dropdownTextConfig[action]]], - value: JSON.stringify(o) - }; - }); - return [2 - /*return*/ - , result]; - } - }); - }); - }; - - $scope.init(); - } - - return QueryCtrl; -}(); - - -var template = "\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n"; -function sQuery() { - return { - template: template, - controller: QueryCtrl, - restrict: 'E', - scope: { - target: '=', - showDetail: '=', - region: '=', - datasource: '=', - getDropdownOptions: '&', - onChange: '&', - onRefresh: '&', - dims: '=' - }, - link: function link(scope, element, attrs) { - scope.$watch('target.instance', function () { - var _a; - - (_a = scope.clearExtrasAlias) === null || _a === void 0 ? void 0 : _a.call(scope); - }); - scope.$watch('target.metricName', function () { - var _a; - - (_a = scope.clearExtrasAlias) === null || _a === void 0 ? void 0 : _a.call(scope); - }); - } - }; -} -grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default.a.directive('tdmqRabbitmqQuery', sQuery); - -/***/ }), - -/***/ "./datasource/tc_monitor/tdmq_rabbitmq/query_def.ts": -/*!**********************************************************!*\ - !*** ./datasource/tc_monitor/tdmq_rabbitmq/query_def.ts ***! - \**********************************************************/ -/*! exports provided: default, TDMQFilterFieldsDescriptor, templateQueryIdMap, TDMQRABBITMQInstanceAliasList, TDMQInvalidDemensions, namespace, queryEditorName, queryMonitorExtraConfg, keyInStorage, regionSupported, TDMQGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TDMQFilterFieldsDescriptor", function() { return TDMQFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TDMQRABBITMQInstanceAliasList", function() { return TDMQRABBITMQInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TDMQInvalidDemensions", function() { return TDMQInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorName", function() { return queryEditorName; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryMonitorExtraConfg", function() { return queryMonitorExtraConfg; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keyInStorage", function() { return keyInStorage; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "regionSupported", function() { return regionSupported; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TDMQGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); - -var namespace = 'QCE/RABBITMQ'; // 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称 - -var queryEditorName = 'tdmqQuery'; -var TDMQInvalidDemensions = { - instanceid: 'InstanceId', - node: 'NodeName' -}; // 需和文件名对应 - -var TDMQRABBITMQInstanceAliasList = ['InstanceId', 'InstanceName']; -var templateQueryIdMap = { - instance: 'InstanceId', - node: 'NodeName' -}; // select类型需要注意是{},multi后缀是[],dropdown是'' - -var TDMQFilterFields = { - Limit: 20, - Offset: 0 -}; -var TDMQFilterFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputNumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputNumber', - min: 1, - max: 100 -}]; -var TDMQ_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'InstanceId', - // 此处key应该是经过TDMQInvalidDemensions处理后的 - node: '', - queries: TDMQFilterFields -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - return Object(_common_utils__WEBPACK_IMPORTED_MODULE_0__["instanceQueryParamsBaseParse"])(queries, true); -} - -var regionSupported = [{ - value: 'ap-beijing' -}, { - value: 'ap-chengdu' -}, { - value: 'ap-chongqing' -}, { - value: 'ap-guangzhou' -}, { - value: 'ap-shenzhen-fsi' -}, { - value: 'ap-shanghai' -}, { - value: 'ap-shanghai-fsi' -}, { - value: 'ap-nanjing' -}, { - value: 'ap-hongkong' -}, { - value: 'ap-tokyo' -}, { - value: 'ap-seoul' -}, { - value: 'ap-singapore' -}, { - value: 'ap-bangkok' -}, { - value: 'ap-jakarta' -}, { - value: 'ap-mumbai' -}, { - value: 'eu-frankfurt' -}, { - value: 'eu-moscow' -}, { - value: 'na-ashburn' -}, { - value: 'na-siliconvalley' -}, { - value: 'na-toronto' -}]; // 需要缓存到storage的内容的key列表 - -var keyInStorage = { - node: 'NodeName' -}; -/* -如果有InstanceId额外的维度,原则上都需要传入此map结构配置 -key的含义: - 经过InvalidDemensions处理后的string。topicId =》TopicId。 - 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId -value的含义: - 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、 - 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。 - 默认取通过InvalidDemsion处理后的key - 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。 - 即:templateQueryIdMap中内容。 - 联合上面2的内容筛选出原始sourceMap -*/ - -var queryMonitorExtraConfg = { - NodeName: { - dim_KeyInStorage: keyInStorage.node, - dim_KeyInTarget: 'node', - dim_KeyInMap: templateQueryIdMap.node - } -}; -/* harmony default export */ __webpack_exports__["default"] = (TDMQ_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/tdmq_rocketmq/datasource.ts": -/*!***********************************************************!*\ - !*** ./datasource/tc_monitor/tdmq_rocketmq/datasource.ts ***! - \***********************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/tdmq_rocketmq/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/constants */ "./datasource/common/constants.ts"); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); -/* harmony import */ var _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/datasourceStorage */ "./datasource/common/datasourceStorage.ts"); -/* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../locale */ "./locale/index.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __assign = undefined && undefined.__assign || function () { - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - } - - return t; - }; - - return __assign.apply(this, arguments); -}; - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - - - - - - -var TDMQDatasource = -/** @class */ -function (_super) { - __extends(TDMQDatasource, _super); - - function TDMQDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = _query_def__WEBPACK_IMPORTED_MODULE_0__["namespace"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["TDMQROCKETMQInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["TDMQInvalidDemensions"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_0__["templateQueryIdMap"]; - _this.queryMonitorExtraConfg = _query_def__WEBPACK_IMPORTED_MODULE_0__["queryMonitorExtraConfg"]; - _this.keyInStorage = _query_def__WEBPACK_IMPORTED_MODULE_0__["keyInStorage"]; // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致 - - _this.InstanceReqConfig = { - service: 'tdmq', - action: 'DescribeRocketMQClusters', - responseField: 'ClusterList', - interceptor: { - response: function response(result) { - return lodash__WEBPACK_IMPORTED_MODULE_2___default.a.map(result, function (item) { - return __assign(__assign({}, item), { - ClusterId: lodash__WEBPACK_IMPORTED_MODULE_2___default.a.get(item, 'Info.ClusterId', ''), - ClusterName: lodash__WEBPACK_IMPORTED_MODULE_2___default.a.get(item, 'Info.ClusterName', '') - }); - }); - } - } - }; - _this.extraActionMap = { - DescribeRocketMQNamespaces: { - service: 'tdmq', - action: 'DescribeRocketMQNamespaces', - responseField: 'Namespaces', - pickKey: 'namespace' - }, - DescribeRocketMQGroups: { - service: 'tdmq', - action: 'DescribeRocketMQGroups', - responseField: 'Groups', - pickKey: 'group' - } - }; - return _this; - } - - TDMQDatasource.prototype.getMetrics = function (region) { - if (region === void 0) { - region = 'ap-guangzhou'; - } - - return __awaiter(this, void 0, void 0, function () { - var rawSet; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - return [4 - /*yield*/ - , _super.prototype.getMetrics.call(this, region)]; - - case 1: - rawSet = _a.sent(); - return [2 - /*return*/ - , rawSet.filter(function (item) { - var _a, _b, _c; - - return !((_c = (_b = (_a = item.Dimensions) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.Dimensions) === null || _c === void 0 ? void 0 : _c.includes('rmqcluster')); - })]; - } - }); - }); - }; - - TDMQDatasource.prototype.getRegions = function () { - return Promise.resolve(_query_def__WEBPACK_IMPORTED_MODULE_0__["regionSupported"].map(function (_a) { - var value = _a.value; - return { - value: value, - text: Object(_locale__WEBPACK_IMPORTED_MODULE_6__["t"])(value) - }; - })); - }; - - TDMQDatasource.prototype.getConsumerList = function (params) { - return __awaiter(this, void 0, void 0, function () { - var region, act, payload, _a, service, action, responseField, serviceInfo, rs; - - var _this = this; - - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - region = params.region, act = params.action, payload = params.payload; - _a = this.extraActionMap[act], service = _a.service, action = _a.action, responseField = _a.responseField; - serviceInfo = Object(_common_constants__WEBPACK_IMPORTED_MODULE_3__["GetServiceAPIInfo"])(region, service); - return [4 - /*yield*/ - , Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["fetchAllFactory"])(function (data) { - return _this.doRequest({ - url: _this.url + serviceInfo.path, - data: data - }, serviceInfo.service, { - region: region, - action: action - }); - }, payload, responseField)]; - - case 1: - rs = _b.sent(); - return [2 - /*return*/ - , rs[0]]; - } - }); - }); - }; - - TDMQDatasource.prototype.fetchMetricData = function (action, region, instance, query) { - return __awaiter(this, void 0, void 0, function () { - var payload, rs, pickKey_1, result; - - var _this = this; - - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - payload = { - Limit: 100, - ClusterId: instance[this.templateQueryIdMap.instance] - }; - if (!(Object.keys(this.extraActionMap).indexOf(action) !== -1)) return [3 - /*break*/ - , 3]; - - if (action === 'DescribeRocketMQGroups') { - payload.NamespaceId = this.getVariable(query['clusternamespace']); - } - - return [4 - /*yield*/ - , this.getConsumerList({ - region: region, - action: action, - payload: payload - })]; - - case 1: - rs = _a.sent(); - pickKey_1 = this.extraActionMap[action].pickKey; - result = rs.map(function (o) { - o._InstanceAliasValue = o[_this.templateQueryIdMap[pickKey_1]]; - return { - text: o[_this.templateQueryIdMap[pickKey_1]], - value: o[_this.templateQueryIdMap[pickKey_1]] - }; - }); - return [4 - /*yield*/ - , _common_datasourceStorage__WEBPACK_IMPORTED_MODULE_5__["default"].setExtraStorage(this.service, this.keyInStorage[pickKey_1], rs)]; - - case 2: - _a.sent(); - - return [2 - /*return*/ - , result]; - - case 3: - return [2 - /*return*/ - , []]; - } - }); - }); - }; - - return TDMQDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (TDMQDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/tdmq_rocketmq/query.ts": -/*!******************************************************!*\ - !*** ./datasource/tc_monitor/tdmq_rocketmq/query.ts ***! - \******************************************************/ -/*! exports provided: TdmqRocketmqQueryCtrl, tdmqRocketmqQuery */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TdmqRocketmqQueryCtrl", function() { return TdmqRocketmqQueryCtrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tdmqRocketmqQuery", function() { return tdmqRocketmqQuery; }); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! grafana/app/core/core_module */ "grafana/app/core/core_module"); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/tdmq_rocketmq/query_def.ts"); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/constants */ "./datasource/common/constants.ts"); -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - -var ExtraFields = [{ - label: 'Namespace', - field: 'namespace', - action: 'DescribeRocketMQNamespaces' -}, { - label: 'Group', - field: 'group', - action: 'DescribeRocketMQGroups' -}]; -var dropdownTextConfig = { - DescribeRocketMQNamespaces: 'namespace', - DescribeRocketMQGroups: 'group' -}; - -var TdmqRocketmqQueryCtrl = -/** @class */ -function () { - TdmqRocketmqQueryCtrl.$inject = ["$scope", "$rootScope"]; - - /** @ngInject */ - function TdmqRocketmqQueryCtrl($scope, $rootScope) { - var _this = this; - - $scope.init = function () { - $scope.TDMQFilterFieldsDescriptor = _query_def__WEBPACK_IMPORTED_MODULE_1__["TDMQFilterFieldsDescriptor"]; - $scope.ExtraFields = ExtraFields; - $scope.namespace = _query_def__WEBPACK_IMPORTED_MODULE_1__["namespace"]; - }; - - $scope.clearExtrasAlias = function () { - $scope.target.namespace = ''; - $scope.target.group = ''; - }; - - $scope.onChecked = function (srcField, dstField) { - if ($scope.target.queries[srcField] === true) { - $scope.target.queries[dstField] = false; - } - - $scope.onChange(); - }; - - $scope.getInstanceId = function () { - var instance = $scope.target.instance; - var service = Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["GetServiceFromNamespace"])($scope.namespace); - instance = $scope.datasource.getServiceFn(service, 'getVariable')(instance); - - if (!instance) { - return ''; - } - - try { - instance = JSON.parse(instance)[_query_def__WEBPACK_IMPORTED_MODULE_1__["templateQueryIdMap"].instance]; - } catch (error) {// console.log(); - } - - return instance; - }; - - $scope.getExtraFields = function () { - return ExtraFields.filter(function (item) { - var _a, _b; - - return item.field in ((_a = $scope.dims) !== null && _a !== void 0 ? _a : {}) || item.label in ((_b = $scope.dims) !== null && _b !== void 0 ? _b : {}); - }); - }; - - $scope.getExtraDropdown = function (target, action) { - return __awaiter(_this, void 0, void 0, function () { - var service, region, payload, namespace_1, rs, result; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - service = Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["GetServiceFromNamespace"])($scope.namespace); - region = $scope.datasource.getServiceFn(service, 'getVariable')(target.region); - payload = { - Limit: 100, - ClusterId: $scope.getInstanceId() - }; - - if (action === 'DescribeRocketMQGroups') { - namespace_1 = $scope.target.namespace; - - try { - namespace_1 = JSON.parse(namespace_1)[_query_def__WEBPACK_IMPORTED_MODULE_1__["templateQueryIdMap"].namespace]; - } catch (e) {} - - payload.NamespaceId = $scope.datasource.getServiceFn(service, 'getVariable')(namespace_1); - } - - return [4 - /*yield*/ - , $scope.datasource.getServiceFn(service, 'getConsumerList')({ - region: region, - action: action, - payload: payload - })]; - - case 1: - rs = _a.sent(); - result = rs.map(function (o) { - o._InstanceAliasValue = o[_query_def__WEBPACK_IMPORTED_MODULE_1__["templateQueryIdMap"][dropdownTextConfig[action]]]; - return { - text: o[_query_def__WEBPACK_IMPORTED_MODULE_1__["templateQueryIdMap"][dropdownTextConfig[action]]], - value: JSON.stringify(o) - }; - }); - return [2 - /*return*/ - , result]; - } - }); - }); - }; - - $scope.init(); - } - - return TdmqRocketmqQueryCtrl; -}(); - - -var template = "\n
\n
\n \n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n"; -function tdmqRocketmqQuery() { - return { - template: template, - controller: TdmqRocketmqQueryCtrl, - restrict: 'E', - scope: { - target: '=', - showDetail: '=', - region: '=', - datasource: '=', - getDropdownOptions: '&', - onChange: '&', - onRefresh: '&', - dims: '=' - }, - link: function link(scope, element, attrs) { - scope.$watch('target.instance', function () { - var _a; - - (_a = scope.clearExtrasAlias) === null || _a === void 0 ? void 0 : _a.call(scope); - }); - scope.$watch('target.metricName', function () { - var _a; - - (_a = scope.clearExtrasAlias) === null || _a === void 0 ? void 0 : _a.call(scope); - }); - } - }; -} -grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default.a.directive('tdmqRocketmqQuery', tdmqRocketmqQuery); - -/***/ }), - -/***/ "./datasource/tc_monitor/tdmq_rocketmq/query_def.ts": -/*!**********************************************************!*\ - !*** ./datasource/tc_monitor/tdmq_rocketmq/query_def.ts ***! - \**********************************************************/ -/*! exports provided: default, TDMQFilterFieldsDescriptor, templateQueryIdMap, TDMQROCKETMQInstanceAliasList, TDMQInvalidDemensions, namespace, queryMonitorExtraConfg, keyInStorage, regionSupported, TDMQROCKETMQGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TDMQFilterFieldsDescriptor", function() { return TDMQFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TDMQROCKETMQInstanceAliasList", function() { return TDMQROCKETMQInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TDMQInvalidDemensions", function() { return TDMQInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryMonitorExtraConfg", function() { return queryMonitorExtraConfg; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keyInStorage", function() { return keyInStorage; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "regionSupported", function() { return regionSupported; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TDMQROCKETMQGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); - -var namespace = 'QCE/ROCKETMQ'; -var TDMQInvalidDemensions = { - tenant: 'ClusterId', - namespace: 'NamespaceId', - group: 'Name' -}; // 需和文件名对应 - -var TDMQROCKETMQInstanceAliasList = ['ClusterId', 'ClusterName']; -var templateQueryIdMap = { - instance: 'ClusterId', - namespace: 'NamespaceId', - group: 'Name' -}; // select类型需要注意是{},multi后缀是[],dropdown是'' - -var TDMQFilterFields = { - Limit: 20, - Offset: 0, - instanceIdsChecked: false, - filtersChecked: true, - ClusterIdList: [''], - Filters: { - includeVip: { - text: '是', - value: 'true' - } - } -}; -var TDMQFilterFieldsDescriptor = [{ - key: 'includeVip', - enDescriptor: 'includeVip', - cnDescriptor: '包含专享集群', - link: '', - type: 'select', - list: [{ - text: '是', - value: 'true' - }, { - text: '否', - value: 'false' - }] -}]; -var TDMQ_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'ClusterId', - // 此处key应该是经过TDMQInvalidDemensions处理后的 - namespace: '', - group: '', - queries: TDMQFilterFields -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - var params = {}; - - if (!lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(queries)) { - params.Limit = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Limit', 20) || 20; - params.Offset = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Offset', 0) || 0; - - if (queries.instanceIdsChecked) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isArray(queries.ClusterIdList)) { - var ClusterIdList = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.compact(queries.ClusterIdList); - - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(ClusterIdList).length > 0) { - params.ClusterIdList = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(ClusterIdList).slice(0, 100); - } - } - } else if (queries.filtersChecked) { - var Filters_1 = []; - - lodash__WEBPACK_IMPORTED_MODULE_0___default.a.forEach(queries.Filters, function (item, key) { - if (Filters_1.length > 9) { - return; - } - - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isArray(item)) { - item = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.compact(item); - - if (item.length > 0) { - Filters_1.push({ - Name: key, - Values: lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(item).slice(0, 5) - }); - } - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isObject(item)) { - if (!lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', []))) { - Filters_1.push({ - Name: key, - Values: [lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', [])].slice(0, 5) - }); - } - } - }); - - if (Filters_1.length > 0) { - params.Filters = Filters_1; - } - } - } - - return params; -} - -var regionSupported = [{ - value: 'ap-beijing' -}, { - value: 'ap-chengdu' -}, { - value: 'ap-chongqing' -}, { - value: 'ap-guangzhou' -}, { - value: 'ap-shenzhen-fsi' -}, { - value: 'ap-shanghai' -}, { - value: 'ap-shanghai-fsi' -}, { - value: 'ap-nanjing' -}, { - value: 'ap-hongkong' -}, { - value: 'ap-tokyo' -}, { - value: 'ap-seoul' -}, { - value: 'ap-singapore' -}, { - value: 'ap-bangkok' -}, { - value: 'ap-jakarta' -}, { - value: 'ap-mumbai' -}, { - value: 'eu-frankfurt' -}, { - value: 'eu-moscow' -}, { - value: 'na-ashburn' -}, { - value: 'na-siliconvalley' -}, { - value: 'na-toronto' -}]; // 需要缓存到storage的内容的key列表 - -var keyInStorage = { - namespace: 'NamespaceId', - group: 'Name' -}; -/* -如果有InstanceId额外的维度,原则上都需要传入此map结构配置 -key的含义: - 经过InvalidDemensions处理后的string。topicId =》TopicId。 - 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId -value的含义: - 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、 - 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。 - 默认取通过InvalidDemsion处理后的key - 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。 - 即:templateQueryIdMap中内容。 - 联合上面2的内容筛选出原始sourceMap -*/ - -var queryMonitorExtraConfg = { - NamespaceId: { - dim_KeyInStorage: keyInStorage.namespace, - dim_KeyInTarget: 'namespace', - dim_KeyInMap: templateQueryIdMap.namespace - }, - Name: { - dim_KeyInStorage: keyInStorage.group, - dim_KeyInTarget: 'group', - dim_KeyInMap: templateQueryIdMap.group - } -}; -/* harmony default export */ __webpack_exports__["default"] = (TDMQ_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/tke/datasource.ts": -/*!*************************************************!*\ - !*** ./datasource/tc_monitor/tke/datasource.ts ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/constants */ "./datasource/common/constants.ts"); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __spreadArray = undefined && undefined.__spreadArray || function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -}; - - - - - - -var variableToArray = function variableToArray(variable) { - if (Object(lodash__WEBPACK_IMPORTED_MODULE_0__["isEmpty"])(variable)) { - return []; - } - - if (Object(lodash__WEBPACK_IMPORTED_MODULE_0__["isArray"])(variable)) { - return variable; - } - - if (Object(lodash__WEBPACK_IMPORTED_MODULE_0__["isString"])(variable)) { - return Object(lodash__WEBPACK_IMPORTED_MODULE_0__["split"])(variable, ',').map(function (item) { - return Object(lodash__WEBPACK_IMPORTED_MODULE_0__["trim"])(item); - }); - } - - return []; -}; - -var TKEDatasource = -/** @class */ -function (_super) { - __extends(TKEDatasource, _super); - - function TKEDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.InstanceAliasList = ['ClusterId', 'ClusterName']; - _this.templateQueryIdMap = { - instance: 'ClusterId' - }; - _this.InvalidDimensions = { - tke_cluster_instance_id: 'ClusterId' - }; - _this.InstanceReqConfig = { - service: 'tke', - action: 'DescribeClusters', - responseField: 'Clusters' - }; - return _this; - } - - TKEDatasource.prototype.getMonitorData = function (params, region, instances, target, options) { - var _this = this; - - var serviceInfo = Object(_common_constants__WEBPACK_IMPORTED_MODULE_1__["GetServiceAPIInfo"])(region, 'monitor'); - var timeshift = Object(_common_utils__WEBPACK_IMPORTED_MODULE_2__["getTimeShiftInMs"])(target.timeshift); - var conditions = Object(lodash__WEBPACK_IMPORTED_MODULE_0__["reduce"])(target.conditions, function (prev, item) { - if (Object(lodash__WEBPACK_IMPORTED_MODULE_0__["isEmpty"])(item.Key) || Object(lodash__WEBPACK_IMPORTED_MODULE_0__["isEmpty"])(item.Operator) || Object(lodash__WEBPACK_IMPORTED_MODULE_0__["isEmpty"])(item.Value)) { - return prev; - } - - return __spreadArray(__spreadArray([], Object(lodash__WEBPACK_IMPORTED_MODULE_0__["filter"])(prev, function (e) { - return e.Key !== item.Key; - }), true), [{ - Key: Object(_common_constants__WEBPACK_IMPORTED_MODULE_1__["ReplaceVariable"])(_this.templateSrv, options.scopedVars, item.Key, false), - Operator: Object(_common_constants__WEBPACK_IMPORTED_MODULE_1__["ReplaceVariable"])(_this.templateSrv, options.scopedVars, item.Operator, false), - Value: variableToArray(Object(_common_constants__WEBPACK_IMPORTED_MODULE_1__["ReplaceVariable"])(_this.templateSrv, options.scopedVars, item.Value, true)) - }], false); - }, [{ - Key: 'tke_cluster_instance_id', - Operator: '=', - Value: instances.map(function (item) { - return item['ClusterId']; - }) - }]); - return this.doRequest({ - url: this.url + serviceInfo.path, - data: { - Period: params.Period, - MetricNames: [params.MetricName], - Module: 'monitor', - Namespace: 'QCE/TKE', - EndTime: params.EndTime, - StartTime: params.StartTime, - Conditions: conditions, - GroupBys: variableToArray(Object(_common_constants__WEBPACK_IMPORTED_MODULE_1__["ReplaceVariable"])(this.templateSrv, options.scopedVars, target.groupBys, true)) - } - }, serviceInfo.service, { - action: 'DescribeStatisticData', - region: region - }).then(function (response) { - return Object(lodash__WEBPACK_IMPORTED_MODULE_0__["flatten"])(Object(lodash__WEBPACK_IMPORTED_MODULE_0__["map"])(response.Data, function (data) { - return Object(lodash__WEBPACK_IMPORTED_MODULE_0__["map"])(data.Points, function (point) { - var dimensionSort = Object(lodash__WEBPACK_IMPORTED_MODULE_0__["sortBy"])(point.Dimensions, ['Name']); - - var dimensionString = __spreadArray(__spreadArray([], dimensionSort.splice(Object(lodash__WEBPACK_IMPORTED_MODULE_0__["findIndex"])(dimensionSort, { - Name: 'tke_cluster_instance_id' - }), 1), true), dimensionSort, true).map(function (dimension) { - return dimension.Value; - }).join(' - '); - - var timeshiftString = timeshift > 0 ? "_".concat(target.timeshift) : ''; - return { - target: "".concat(data.MetricName, " - ").concat(dimensionString).concat(timeshiftString), - datapoints: Object(lodash__WEBPACK_IMPORTED_MODULE_0__["map"])(point.Values, function (value) { - return [value.Value, value.Timestamp * 1000 + timeshift]; - }) - }; - }); - })); - }); - }; - - return TKEDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_3__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (TKEDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/tke/query.ts": -/*!********************************************!*\ - !*** ./datasource/tc_monitor/tke/query.ts ***! - \********************************************/ -/*! exports provided: QueryCtrl, sQuery */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueryCtrl", function() { return QueryCtrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sQuery", function() { return sQuery; }); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! grafana/app/core/core_module */ "grafana/app/core/core_module"); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/tke/query_def.ts"); - - - - -var QueryCtrl = -/** @class */ -function () { - QueryCtrl.$inject = ["$scope", "$rootScope"]; - - /** @ngInject */ - function QueryCtrl($scope, $rootScope) { - $scope.init = function () { - $scope.TKEFilterFieldsDescriptor = _query_def__WEBPACK_IMPORTED_MODULE_2__["TKEFilterFieldsDescriptor"]; - }; - - $scope.onChecked = function (srcField, dstField) { - if ($scope.target.queries[srcField] === true) { - $scope.target.queries[dstField] = false; - } - - $scope.onChange(); - }; - - $scope.addCondition = function () { - $scope.target.conditions.push({ - Key: '', - Operator: '=', - Value: '' - }); - }; - - $scope.deleteCondition = function (index) { - var targetCondition = $scope.target.conditions[index]; - - if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__["isEmpty"])(targetCondition.Key) || Object(lodash__WEBPACK_IMPORTED_MODULE_1__["isEmpty"])(targetCondition.Operator) || Object(lodash__WEBPACK_IMPORTED_MODULE_1__["isEmpty"])(targetCondition.Value)) { - $scope.target.conditions.splice(index, 1); - } else { - $scope.target.conditions.splice(index, 1); - $scope.onRefresh(); - } - }; - - $scope.getOperator = function () { - return Promise.resolve([{ - text: '=', - value: '=' - }, { - text: 'in', - value: 'in' - }]); - }; - - $scope.init(); - } - - return QueryCtrl; -}(); - - -var template = "\n
\n
\n \n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n
\n
\n \n
\n
\n \n
\n \n \n
\n \n \n \n
\n
\n \n
\n
\n
\n
\n
\n
\n \n \n
\n
\n
\n"; -function sQuery() { - return { - template: template, - controller: QueryCtrl, - restrict: 'E', - scope: { - target: '=', - showDetail: '=', - region: '=', - datasource: '=', - getDropdownOptions: '&', - onChange: '&', - onRefresh: '&', - dims: '=' - } - }; -} -grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default.a.directive('tkeQuery', sQuery); - -/***/ }), - -/***/ "./datasource/tc_monitor/tke/query_def.ts": -/*!************************************************!*\ - !*** ./datasource/tc_monitor/tke/query_def.ts ***! - \************************************************/ -/*! exports provided: default, TKEFilterFieldsDescriptor, TKEInstanceAliasList, TKEGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TKEFilterFieldsDescriptor", function() { return TKEFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TKEInstanceAliasList", function() { return TKEInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TKEGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); - -var TKE_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'ClusterId', - conditions: [], - groupBys: '', - queries: { - Limit: 20, - Offset: 0, - instanceIdsChecked: false, - filtersChecked: true, - ClusterIds: [''], - Filters: { - ClusterName: [], - ClusterType: [], - ClusterStatus: [], - 'tag-key': [] - } - } -}; -var TKEFilterFieldsDescriptor = [{ - key: 'ClusterName', - enDescriptor: 'Cluster Name', - cnDescriptor: '集群名', - link: '', - type: 'input' -}, { - key: 'ClusterType', - enDescriptor: 'Cluster Type', - cnDescriptor: '集群类型', - link: '', - type: 'inputmulti' -}, { - key: 'ClusterStatus', - enDescriptor: 'Cluster Status', - cnDescriptor: '集群状态', - link: '', - type: 'inputmulti' -}, { - key: 'Tags', - enDescriptor: 'Tags', - cnDescriptor: '标签键值对', - link: '', - type: 'inputmulti' -}, { - key: 'vpc-id', - enDescriptor: 'VPC', - cnDescriptor: 'VPC', - link: '', - type: 'input' -}, { - key: 'tag-key', - enDescriptor: 'Tag Key', - cnDescriptor: '标签键', - link: '', - type: 'inputmulti' -}, { - key: 'tag-value', - enDescriptor: 'Tag Value', - cnDescriptor: '标签值', - link: '', - type: 'inputmulti' -}]; -var TKEInstanceAliasList = ['ClusterId', 'ClusterName']; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - var params = {}; - - if (!lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(queries)) { - params.Limit = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Limit', 20) || 20; - params.Offset = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(queries, 'Offset', 0) || 0; - - if (queries.instanceIdsChecked) { - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isArray(queries.InstanceIds)) { - var InstanceIds = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.compact(queries.InstanceIds); - - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(InstanceIds).length > 0) { - params.InstanceIds = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(InstanceIds).slice(0, 100); - } - } - } else if (queries.filtersChecked) { - var Filters_1 = []; - - lodash__WEBPACK_IMPORTED_MODULE_0___default.a.forEach(queries.Filters, function (item, key) { - if (Filters_1.length > 9) { - return; - } - - if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isArray(item)) { - item = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.compact(item); - - if (item.length > 0) { - Filters_1.push({ - Name: key, - Values: lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniq(item).slice(0, 5) - }); - } - } else if (lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isObject(item)) { - if (!lodash__WEBPACK_IMPORTED_MODULE_0___default.a.isEmpty(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', []))) { - Filters_1.push({ - Name: key, - Values: lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(item, 'value', []).slice(0, 5) - }); - } - } - }); - - if (Filters_1.length > 0) { - params.Filters = Filters_1; - } - } - } - - return params; -} - -/* harmony default export */ __webpack_exports__["default"] = (TKE_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/tsf/datasource.ts": -/*!*************************************************!*\ - !*** ./datasource/tc_monitor/tsf/datasource.ts ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/tsf/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - - - - -var TSFDatasource = -/** @class */ -function (_super) { - __extends(TSFDatasource, _super); - - function TSFDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = 'QCE/TSF'; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["TSFInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["TSFInvalidDemensions"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_0__["templateQueryIdMap"]; - _this.InstanceReqConfig = { - service: 'tsf', - action: 'DescribeApplications', - responseField: 'Content' - }; - return _this; - } - - return TSFDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (TSFDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/tsf/query.ts": -/*!********************************************!*\ - !*** ./datasource/tc_monitor/tsf/query.ts ***! - \********************************************/ -/*! exports provided: TSFQueryCtrl, tsfQuery */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TSFQueryCtrl", function() { return TSFQueryCtrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsfQuery", function() { return tsfQuery; }); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! grafana/app/core/core_module */ "grafana/app/core/core_module"); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/tsf/query_def.ts"); - - - -var TSFQueryCtrl = -/** @class */ -function () { - TSFQueryCtrl.$inject = ["$scope", "$rootScope"]; - - /** @ngInject */ - function TSFQueryCtrl($scope, $rootScope) { - $scope.init = function () { - $scope.TSFFieldsDescriptor = _query_def__WEBPACK_IMPORTED_MODULE_1__["TSFFieldsDescriptor"]; - }; - - $scope.init(); - } - - return TSFQueryCtrl; -}(); - - -var template = "\n
\n \n
\n
\n \n \n \n \n \n
\n
\n\n
\n"; -function tsfQuery() { - return { - template: template, - controller: TSFQueryCtrl, - restrict: 'E', - scope: { - target: '=', - showDetail: '=', - region: '=', - datasource: '=', - onChange: '&' - } - }; -} -grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default.a.directive('tsfQuery', tsfQuery); - -/***/ }), - -/***/ "./datasource/tc_monitor/tsf/query_def.ts": -/*!************************************************!*\ - !*** ./datasource/tc_monitor/tsf/query_def.ts ***! - \************************************************/ -/*! exports provided: default, TSFInvalidDemensions, templateQueryIdMap, TSFInstanceAliasList, TSFFieldsDescriptor, TSFGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TSFInvalidDemensions", function() { return TSFInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TSFInstanceAliasList", function() { return TSFInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TSFFieldsDescriptor", function() { return TSFFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TSFGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); - -var ApplicationType = [{ - text: '所有', - value: '' -}, { - text: '容器应用', - value: 'C' -}, { - text: '普通应用/虚拟机应用', - value: 'V' -}]; -var MicroserviceType = [{ - text: '所有', - value: '' -}, { - text: '普通应用', - value: 'N' -}, { - text: 'Mesh应用', - value: 'M' -}, { - text: '微服务网关应用', - value: 'G' -}, { - text: '原生应用', - value: 'NATIVE' -}]; -var ApplicationResourceType = [{ - text: '默认资源类型', - value: 'DEF' -}, { - text: '微服务网关资源', - value: 'GW' -}]; -var TSFFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputnumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputnumber', - min: 1, - max: 100 -}, { - key: 'SearchWord', - enDescriptor: 'SearchWord', - cnDescriptor: '搜索关键字', - link: '', - type: 'input' -}, { - key: 'ApplicationIdList', - enDescriptor: 'ApplicationIdList', - cnDescriptor: '应用ID 组成的数组', - link: '', - type: 'inputmulti' -}, { - key: 'ApplicationType', - enDescriptor: 'ApplicationType', - cnDescriptor: '应用类型', - link: '', - type: 'select', - list: ApplicationType -}, { - key: 'MicroserviceType', - enDescriptor: 'MicroserviceType', - cnDescriptor: '应用的微服务类型', - link: '', - type: 'select', - list: MicroserviceType -}, { - key: 'ApplicationResourceTypeList', - enDescriptor: 'ApplicationResourceTypeList', - cnDescriptor: '应用资源类型数组', - link: '', - type: 'select', - multiple: true, - list: ApplicationResourceType -}]; -var TSF_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'ApplicationId', - queries: { - Limit: 20, - Offset: 0, - SearchWord: '', - OrderBy: '', - OrderType: null, - ApplicationType: '', - MicroserviceType: '', - ApplicationResourceTypeList: [], - ApplicationIdList: [] - } -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - return Object(_common_utils__WEBPACK_IMPORTED_MODULE_0__["instanceQueryParamsBaseParse"])(queries, false); -} - -var TSFInstanceAliasList = ['ApplicationId', 'ApplicationName']; -var TSFInvalidDemensions = { - applicationid: 'ApplicationId' -}; -var templateQueryIdMap = { - instance: 'ApplicationId' -}; -/* harmony default export */ __webpack_exports__["default"] = (TSF_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/v_clb/datasource.ts": -/*!***************************************************!*\ - !*** ./datasource/tc_monitor/v_clb/datasource.ts ***! - \***************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/v_clb/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/constants */ "./datasource/common/constants.ts"); -/* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../locale */ "./locale/index.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - - - - -var DCDatasource = -/** @class */ -function (_super) { - __extends(DCDatasource, _super); - - function DCDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = _query_def__WEBPACK_IMPORTED_MODULE_0__["namespace"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["VCLBInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["VCLBInvalidDemensions"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_0__["templateQueryIdMap"]; // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致 - - _this.InstanceReqConfig = { - service: 'clb', - action: 'DescribeLoadBalancers', - responseField: 'LoadBalancerSet' - }; - return _this; - } - - DCDatasource.prototype.getRegions = function () { - return Promise.resolve(_query_def__WEBPACK_IMPORTED_MODULE_0__["regionSupported"].map(function (_a) { - var value = _a.value; - return { - value: value, - text: Object(_locale__WEBPACK_IMPORTED_MODULE_4__["t"])(value) - }; - })); - }; - - DCDatasource.prototype.getAllMetrics = function (region) { - return __awaiter(this, void 0, void 0, function () { - var serviceInfo, public_metrics, private_metrics, res; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - serviceInfo = Object(_common_constants__WEBPACK_IMPORTED_MODULE_3__["GetServiceAPIInfo"])(region, 'monitor'); - return [4 - /*yield*/ - , this.doRequest({ - url: this.url + serviceInfo.path, - data: { - Namespace: _query_def__WEBPACK_IMPORTED_MODULE_0__["clbNamespaceMap"]["public"] - } - }, serviceInfo.service, { - region: region, - action: 'DescribeBaseMetrics' - })]; - - case 1: - public_metrics = _a.sent().MetricSet; - return [4 - /*yield*/ - , this.doRequest({ - url: this.url + serviceInfo.path, - data: { - Namespace: _query_def__WEBPACK_IMPORTED_MODULE_0__["clbNamespaceMap"]["private"] - } - }, serviceInfo.service, { - region: region, - action: 'DescribeBaseMetrics' - })]; - - case 2: - private_metrics = _a.sent().MetricSet; - res = Object.values(lodash__WEBPACK_IMPORTED_MODULE_2___default.a.keyBy(lodash__WEBPACK_IMPORTED_MODULE_2___default.a.concat(private_metrics, public_metrics), 'MetricName')); - return [2 - /*return*/ - , res.map(function (t) { - return Object(_query_def__WEBPACK_IMPORTED_MODULE_0__["modifyDimensons"])(t); - })]; - } - }); - }); - }; - - DCDatasource.prototype.getMetrics = function (region) { - if (region === void 0) { - region = 'ap-guangzhou'; - } - - return __awaiter(this, void 0, void 0, function () { - var rawSet; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - return [4 - /*yield*/ - , this.getAllMetrics(region)]; - - case 1: - rawSet = _a.sent(); - return [2 - /*return*/ - , lodash__WEBPACK_IMPORTED_MODULE_2___default.a.compact(rawSet)]; - } - }); - }); - }; - - return DCDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (DCDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/v_clb/query.ts": -/*!**********************************************!*\ - !*** ./datasource/tc_monitor/v_clb/query.ts ***! - \**********************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _base_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_base/query */ "./datasource/tc_monitor/_base/query.ts"); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/v_clb/query_def.ts"); - - -Object(_base_query__WEBPACK_IMPORTED_MODULE_0__["default"])(_query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorName"], _query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorConfig"]); - -/***/ }), - -/***/ "./datasource/tc_monitor/v_clb/query_def.ts": -/*!**************************************************!*\ - !*** ./datasource/tc_monitor/v_clb/query_def.ts ***! - \**************************************************/ -/*! exports provided: default, VCLBFilterFieldsDescriptor, templateQueryIdMap, VCLBInstanceAliasList, VCLBInvalidDemensions, namespace, queryEditorName, queryEditorConfig, clbNamespaceMap, modifyDimensons, regionSupported, BMLBGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VCLBFilterFieldsDescriptor", function() { return VCLBFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VCLBInstanceAliasList", function() { return VCLBInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VCLBInvalidDemensions", function() { return VCLBInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorName", function() { return queryEditorName; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorConfig", function() { return queryEditorConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clbNamespaceMap", function() { return clbNamespaceMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "modifyDimensons", function() { return modifyDimensons; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "regionSupported", function() { return regionSupported; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BMLBGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__); - - -var namespace = 'QCE/V_CLB'; // 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称 - -var queryEditorName = 'vClbQuery'; -var VCLBInvalidDemensions = { - InstanceId: 'LoadBalancerId' // vip: 'LoadBalancerVips', - // loadBalancerPort: 'Port', - // protocol: 'Protocol', - -}; // 要和文件名方式一致,ceip_summary=>CEIPSUMMARY - -var VCLBInstanceAliasList = ['LoadBalancerId', 'LoadBalancerVips', 'LoadBalancerName']; -var templateQueryIdMap = { - instance: 'LoadBalancerId' -}; -var ForwardTypes = [{ - text: '通用的负载均衡', - value: 1 -}, { - text: '传统的负载均衡', - value: 0 -}]; -var OrderBy = [{ - text: 'LoadBalancerName', - value: 'LoadBalancerName' -}, { - text: 'CreateTime', - value: 'CreateTime' -}, { - text: 'Domain', - value: 'Domain' -}, { - text: 'LoadBalancerType', - value: 'LoadBalancerType' -}]; -var OrderType = [{ - text: '升序', - value: 0 -}, { - text: '降序', - value: 1 -}]; -var WithRs = [{ - text: '没有绑定后端服务', - value: 0 -}, { - text: '绑定后端服务', - value: 1 -}, { - text: '查询全部', - value: -1 -}]; -var VCLBFilterFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputNumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1', - link: '', - type: 'inputNumber', - min: 1 -}, { - key: 'LoadBalancerIds', - enDescriptor: 'LoadBalancer ID', - cnDescriptor: '实例ID', - link: '', - type: 'inputMulti' -}, { - key: 'LoadBalancerName', - enDescriptor: 'LoadBalancer Name', - cnDescriptor: '实例名称', - link: '', - type: 'input' -}, { - key: 'Forward', - enDescriptor: 'Forward', - cnDescriptor: '负载均衡实例类型', - link: '', - type: 'select', - list: ForwardTypes -}, { - key: 'Domain', - enDescriptor: 'Domain', - cnDescriptor: '域名,腾讯云为负载均衡实例分配的域名,本参数仅对传统型公网负载均衡才有意义', - link: '', - type: 'input' -}, { - key: 'LoadBalancerVips', - enDescriptor: 'LoadBalancer Vips', - cnDescriptor: '负载均衡实例的 VIP 地址', - link: '', - type: 'inputMulti' -}, { - key: 'BackendPrivateIps', - enDescriptor: 'BackendPrivate Ips', - cnDescriptor: '负载均衡绑定的后端服务的内网 IP', - link: '', - type: 'inputMulti' -}, { - key: 'BackendPublicIps', - enDescriptor: 'BackendPublic Ips', - cnDescriptor: '负载均衡绑定的后端服务的外网 IP', - link: '', - type: 'inputMulti' -}, { - key: 'ProjectId', - enDescriptor: 'Project ID', - cnDescriptor: '负载均衡实例所属的项目 ID', - link: '', - type: 'inputNumber' -}, { - key: 'VpcId', - enDescriptor: 'Vpc ID', - cnDescriptor: '负载均衡实例所属私有网络', - link: '', - type: 'input' -}, { - key: 'SecurityGroup', - enDescriptor: 'Security Group', - cnDescriptor: '安全组ID', - link: '', - type: 'input' -}, { - key: 'MasterZone', - enDescriptor: 'Master Zone', - cnDescriptor: '主可用区ID', - link: '', - type: 'input' -}, { - key: 'WithRs', - enDescriptor: 'WithRs', - cnDescriptor: '负载均衡是否绑定后端服务', - link: '', - type: 'select', - list: WithRs -}, { - key: 'OrderBy', - enDescriptor: 'OrderBy', - cnDescriptor: '排序字段', - link: '', - type: 'select', - list: OrderBy -}, { - key: 'OrderType', - enDescriptor: 'OrderByType', - cnDescriptor: '排序方式', - link: '', - type: 'select', - list: OrderType -}]; // 各产品实例列表detail配置 - -var queryEditorConfig = { - instanceDocUrl: 'https://cloud.tencent.com/document/api/214/30685', - namespace: namespace, - fieldDescriptor: VCLBFilterFieldsDescriptor -}; -var LBFields = { - LoadBalancerIds: [], - Forward: undefined, - LoadBalancerName: '', - Domain: '', - LoadBalancerVips: [], - BackendPublicIps: [], - BackendPrivateIps: [], - Limit: 20, - Offset: 0, - ProjectId: undefined, - WithRs: {}, - VpcId: '', - SecurityGroup: '', - MasterZone: '', - OrderBy: {}, - OrderType: {} -}; -var VCLB_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'LoadBalancerId', - Port: '', - Protocol: '', - listener: '', - // listenerAlias: 'ListenerId', - queries: LBFields -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - return Object(_common_utils__WEBPACK_IMPORTED_MODULE_0__["instanceQueryParamsBaseParse"])(queries, false); -} // regions for dropdown - - -var regionSupported = [{ - value: 'ap-bangkok' -}, { - value: 'ap-beijing' -}, { - value: 'ap-chengdu' -}, { - value: 'ap-chongqing' -}, { - value: 'ap-guangzhou' -}, { - value: 'ap-hongkong' -}, { - value: 'ap-jakarta' -}, { - value: 'ap-mumbai' -}, { - value: 'ap-seoul' -}, { - value: 'ap-nanjing' -}, { - value: 'ap-shanghai' -}, { - value: 'ap-shanghai-fsi' -}, { - value: 'ap-shenzhen-fsi' -}, { - value: 'ap-singapore' -}, { - value: 'ap-tokyo' -}, { - value: 'eu-frankfurt' -}, { - value: 'eu-moscow' -}, { - value: 'na-ashburn' -}, { - value: 'na-siliconvalley' -}, { - value: 'na-toronto' -}]; -var clbNamespaceMap = { - "public": 'QCE/LB_PUBLIC', - "private": 'QCE/LB_PRIVATE' -}; - -function modifyDimensons(metricItem) { - var metricTmp = lodash__WEBPACK_IMPORTED_MODULE_1___default.a.cloneDeep(metricItem); - - metricTmp.Dimensions.forEach(function (item) { - item.Dimensions = ['InstanceId']; - }); - return metricTmp; -} - -/* harmony default export */ __webpack_exports__["default"] = (VCLB_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/vbc/datasource.ts": -/*!*************************************************!*\ - !*** ./datasource/tc_monitor/vbc/datasource.ts ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/vbc/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - - - - -var DCDatasource = -/** @class */ -function (_super) { - __extends(DCDatasource, _super); - - function DCDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = _query_def__WEBPACK_IMPORTED_MODULE_0__["namespace"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["VBCInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["VBCInvalidDemensions"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_0__["templateQueryIdMap"]; // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致 - - _this.InstanceReqConfig = { - service: 'vpc', - action: 'DescribeCcns', - responseField: 'CcnSet' - }; - return _this; - } - - DCDatasource.prototype.getFilterDropdown = function (_a) { - var field = _a.field; - return _super.prototype.getRegions.call(this); - }; - - return DCDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (DCDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/vbc/query.ts": -/*!********************************************!*\ - !*** ./datasource/tc_monitor/vbc/query.ts ***! - \********************************************/ -/*! exports provided: VBCQueryCtrl, scfQuery */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VBCQueryCtrl", function() { return VBCQueryCtrl; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scfQuery", function() { return scfQuery; }); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! grafana/app/core/core_module */ "grafana/app/core/core_module"); -/* harmony import */ var grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/vbc/query_def.ts"); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/constants */ "./datasource/common/constants.ts"); - - - -var ExtraFields = [// { - // label: 'SRegion', - // field: 'SRegion', - // }, - // { - // label: 'DRegion', - // field: 'DRegion', - // }, -]; - -var VBCQueryCtrl = -/** @class */ -function () { - VBCQueryCtrl.$inject = ["$scope", "$rootScope"]; - - /** @ngInject */ - function VBCQueryCtrl($scope, $rootScope) { - $scope.init = function () { - $scope.VBCFilterFieldsDescriptor = _query_def__WEBPACK_IMPORTED_MODULE_1__["VBCFilterFieldsDescriptor"]; - $scope.namespace = _query_def__WEBPACK_IMPORTED_MODULE_1__["namespace"]; - }; - - $scope.getExtraFields = function () { - return ExtraFields.filter(function (item) { - var _a; - - return item.field in ((_a = $scope.dims) !== null && _a !== void 0 ? _a : {}); - }); - }; - - $scope.getExtraDropdown = function (field) { - var service = Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["GetServiceFromNamespace"])($scope.namespace); // return $scope.datasource.getServiceFn(service, 'getFilterDropdown')({ field }) - - return $scope.datasource.getFilterDropdown(service, { - field: field - }); - }; - - $scope.init(); - } - - return VBCQueryCtrl; -}(); - - -var template = "\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n"; -function scfQuery() { - return { - template: template, - controller: VBCQueryCtrl, - restrict: 'E', - scope: { - target: '=', - showDetail: '=', - region: '=', - datasource: '=', - getDropdownOptions: '&', - onChange: '&', - onRefresh: '&', - dims: '=' - } - }; -} -grafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default.a.directive('vbcQuery', scfQuery); - -/***/ }), - -/***/ "./datasource/tc_monitor/vbc/query_def.ts": -/*!************************************************!*\ - !*** ./datasource/tc_monitor/vbc/query_def.ts ***! - \************************************************/ -/*! exports provided: default, VBCFilterFieldsDescriptor, templateQueryIdMap, VBCInstanceAliasList, VBCInvalidDemensions, namespace, queryEditorName, queryEditorConfig, VBCGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VBCFilterFieldsDescriptor", function() { return VBCFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VBCInstanceAliasList", function() { return VBCInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VBCInvalidDemensions", function() { return VBCInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorName", function() { return queryEditorName; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorConfig", function() { return queryEditorConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VBCGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); - -var namespace = 'QCE/VBC'; // 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称 - -var queryEditorName = 'vbcQuery'; -var VBCInvalidDemensions = {// CcnId: 'CcnId', -}; // 需和文件名对应 - -var VBCInstanceAliasList = ['CcnId', 'CcnName']; -var templateQueryIdMap = { - instance: 'CcnId' -}; // select类型需要注意是{},multi后缀是[],dropdown是'' - -var VBCFilterFields = { - Limit: 20, - Offset: 0, - 'ccn-id': [], - 'ccn-name': [], - 'ccn-description': [], - state: {} -}; -var VBCFilterFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputNumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputNumber', - min: 1, - max: 100 -}, { - key: 'ccn-id', - enDescriptor: 'ccn-id', - cnDescriptor: 'CCN实例ID', - link: '', - type: 'inputMulti' -}, { - key: 'ccn-name', - enDescriptor: 'ccn-name', - cnDescriptor: 'CCN名称', - link: '', - type: 'inputMulti' -}, { - key: 'ccn-description', - enDescriptor: 'ccn-description', - cnDescriptor: 'CCN描述', - link: '', - type: 'inputMulti' -}, { - key: 'state', - enDescriptor: 'state', - cnDescriptor: '实例状态', - link: '', - type: 'select', - multiple: true, - list: [{ - text: '隔离中', - value: 'ISOLATED' - }, { - text: '运行中', - value: 'AVAILABLE' - }] -}]; // 各产品实例列表detail配置 - -var queryEditorConfig = { - instanceDocUrl: 'https://cloud.tencent.com/document/api/215/19199', - namespace: namespace, - fieldDescriptor: VBCFilterFieldsDescriptor -}; -var VBC_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'CcnId', - DRegion: '', - SRegion: '', - queries: VBCFilterFields -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - return Object(_common_utils__WEBPACK_IMPORTED_MODULE_0__["instanceQueryParamsBaseParse"])(queries, false); -} // const regionSupported = [ -// { text: '华北地区(北京)', value: 'ap-beijing' }, -// { text: '西南地区(成都)', value: 'ap-chengdu' }, -// { text: '西南地区(重庆)', value: 'ap-chongqing' }, -// { text: '华南地区(广州)', value: 'ap-guangzhou' }, -// { text: '港澳台地区(中国香港)', value: 'ap-hongkong' }, -// { text: '亚太南部(孟买)', value: 'ap-mumbai' }, -// { text: '华东地区(南京)', value: 'ap-nanjing' }, -// { text: '华东地区(上海)', value: 'ap-shanghai' }, -// { text: '华东地区(上海金融)', value: 'ap-shanghai-fsi' }, -// { text: '华南地区(深圳金融)', value: 'ap-shenzhen-fsi' }, -// { text: '亚太东南(新加坡)', value: 'ap-singapore' }, -// { text: '亚太东北(东京)', value: 'ap-tokyo' }, -// { text: '欧洲地区(法兰克福)', value: 'eu-frankfurt' }, -// { text: '美国东部(弗吉尼亚)', value: 'na-ashburn' }, -// { text: '美国西部(硅谷)', value: 'na-siliconvalley' }, -// { text: '北美地区(多伦多)', value: 'na-toronto' }, -// ]; - - -/* harmony default export */ __webpack_exports__["default"] = (VBC_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/vpc_net_detect/datasource.ts": -/*!************************************************************!*\ - !*** ./datasource/tc_monitor/vpc_net_detect/datasource.ts ***! - \************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/vpc_net_detect/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - - - - -var DCDatasource = -/** @class */ -function (_super) { - __extends(DCDatasource, _super); - - function DCDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = _query_def__WEBPACK_IMPORTED_MODULE_0__["namespace"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["VPCNETDETECTInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["VPCNETInvalidDemensions"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_0__["templateQueryIdMap"]; // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致 - - _this.InstanceReqConfig = { - service: 'vpc', - action: 'DescribeNetDetects', - responseField: 'NetDetectSet', - interceptor: {// response: (data: unknown[]) =>[ - // { - // "NetDetectId": "netd-12345678", - // }, - // ], - } - }; - _this.MetricReqConfig = { - resultFilter: _query_def__WEBPACK_IMPORTED_MODULE_0__["modifyDimensons"] - }; - return _this; - } - - return DCDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (DCDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/vpc_net_detect/query.ts": -/*!*******************************************************!*\ - !*** ./datasource/tc_monitor/vpc_net_detect/query.ts ***! - \*******************************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _base_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_base/query */ "./datasource/tc_monitor/_base/query.ts"); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/vpc_net_detect/query_def.ts"); - - -Object(_base_query__WEBPACK_IMPORTED_MODULE_0__["default"])(_query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorName"], _query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorConfig"]); - -/***/ }), - -/***/ "./datasource/tc_monitor/vpc_net_detect/query_def.ts": -/*!***********************************************************!*\ - !*** ./datasource/tc_monitor/vpc_net_detect/query_def.ts ***! - \***********************************************************/ -/*! exports provided: default, VPCNETFilterFieldsDescriptor, templateQueryIdMap, VPCNETDETECTInstanceAliasList, VPCNETInvalidDemensions, namespace, queryEditorName, queryEditorConfig, modifyDimensons, VPCNETDETECTGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VPCNETFilterFieldsDescriptor", function() { return VPCNETFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VPCNETDETECTInstanceAliasList", function() { return VPCNETDETECTInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VPCNETInvalidDemensions", function() { return VPCNETInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorName", function() { return queryEditorName; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorConfig", function() { return queryEditorConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "modifyDimensons", function() { return modifyDimensons; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VPCNETDETECTGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); - - -var namespace = 'QCE/VPC_NET_DETECT'; // 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称 - -var queryEditorName = 'vpcNetDetectQuery'; -var VPCNETInvalidDemensions = { - netdetectid: 'NetDetectId', - netDetectId: 'NetDetectId' -}; -var VPCNETDETECTInstanceAliasList = ['NetDetectId', 'NetDetectName']; -var templateQueryIdMap = { - instance: 'NetDetectId' -}; // select类型需要注意是{},multi后缀是[] - -var VPCNETFilterFields = { - Limit: 20, - Offset: 0, - 'vpc-id': [], - 'net-detect-id': [], - 'subnet-id': [], - 'net-detect-name': [] -}; -var VPCNETFilterFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputNumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputNumber', - min: 1, - max: 100 -}, { - key: 'vpc-id', - enDescriptor: 'vpc-id', - cnDescriptor: 'VPC实例ID', - link: '', - type: 'inputMulti' -}, { - key: 'net-detect-id', - enDescriptor: 'net-detect-id', - cnDescriptor: '网络探测实例ID', - link: '', - type: 'inputMulti' -}, { - key: 'subnet-id', - enDescriptor: 'subnet-id', - cnDescriptor: '子网实例ID', - link: '', - type: 'inputMulti' -}, { - key: 'net-detect-name', - enDescriptor: 'net-detect-name', - cnDescriptor: '网络探测名称', - link: '', - type: 'inputMulti' -}]; // 各产品实例列表detail配置 - -var queryEditorConfig = { - instanceDocUrl: 'https://cloud.tencent.com/document/api/215/38696', - namespace: namespace, - fieldDescriptor: VPCNETFilterFieldsDescriptor -}; -var VPCNET_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'NetDetectId', - queries: VPCNETFilterFields -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - return Object(_common_utils__WEBPACK_IMPORTED_MODULE_1__["instanceQueryParamsBaseParse"])(queries, true); -} - -function modifyDimensons(metricItem) { - var metricTmp = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.cloneDeep(metricItem); - - metricTmp.Dimensions.forEach(function (item) { - item.Dimensions = ['netDetectId']; - }); - return metricTmp; -} - -/* harmony default export */ __webpack_exports__["default"] = (VPCNET_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/vpngw/datasource.ts": -/*!***************************************************!*\ - !*** ./datasource/tc_monitor/vpngw/datasource.ts ***! - \***************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/vpngw/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -/* harmony import */ var _common_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/constants */ "./datasource/common/constants.ts"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ "lodash"); -/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - - - - - - -var DCDatasource = -/** @class */ -function (_super) { - __extends(DCDatasource, _super); - - function DCDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = _query_def__WEBPACK_IMPORTED_MODULE_0__["namespace"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["VPNGWInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["VPNGWInvalidDemensions"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_0__["templateQueryIdMap"]; // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致 - - _this.InstanceReqConfig = { - service: 'vpc', - action: 'DescribeVpnGateways', - responseField: 'VpnGatewaySet' - }; - return _this; - } - - DCDatasource.prototype.getFilterDropdown = function (_a) { - var field = _a.field, - region = _a.region; - - if (field === 'zone') { - var serviceInfo = Object(_common_constants__WEBPACK_IMPORTED_MODULE_2__["GetServiceAPIInfo"])(region, 'cvm'); - return this.doRequest({ - url: this.url + serviceInfo.path - }, serviceInfo.service, { - region: region, - action: 'DescribeZones' - }).then(function (response) { - return lodash__WEBPACK_IMPORTED_MODULE_3___default.a.filter(lodash__WEBPACK_IMPORTED_MODULE_3___default.a.map(response.ZoneSet || [], function (item) { - return { - text: item.ZoneName, - value: item.Zone, - ZoneState: item.ZoneState, - Zone: item.Zone - }; - }), function (item) { - return item.ZoneState === 'AVAILABLE'; - }); - }); - } - - return []; - }; - - return DCDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (DCDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/vpngw/query.ts": -/*!**********************************************!*\ - !*** ./datasource/tc_monitor/vpngw/query.ts ***! - \**********************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _base_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_base/query */ "./datasource/tc_monitor/_base/query.ts"); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/vpngw/query_def.ts"); - - -Object(_base_query__WEBPACK_IMPORTED_MODULE_0__["default"])(_query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorName"], _query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorConfig"]); - -/***/ }), - -/***/ "./datasource/tc_monitor/vpngw/query_def.ts": -/*!**************************************************!*\ - !*** ./datasource/tc_monitor/vpngw/query_def.ts ***! - \**************************************************/ -/*! exports provided: default, VPNGWFilterFieldsDescriptor, templateQueryIdMap, VPNGWInstanceAliasList, VPNGWInvalidDemensions, namespace, queryEditorName, queryEditorConfig, VPNGWGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VPNGWFilterFieldsDescriptor", function() { return VPNGWFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VPNGWInstanceAliasList", function() { return VPNGWInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VPNGWInvalidDemensions", function() { return VPNGWInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorName", function() { return queryEditorName; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorConfig", function() { return queryEditorConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VPNGWGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); - -var namespace = 'QCE/VPNGW'; -var queryEditorName = 'vpngwQuery'; -var VPNGWInvalidDemensions = { - vpnGwId: 'VpnGatewayId' -}; -var VPNGWInstanceAliasList = ['VpnGatewayId', 'VpnGatewayName']; -var templateQueryIdMap = { - instance: 'VpnGatewayId' -}; // select类型需要注意是{},multi后缀是[] - -var VPNGWFilterFields = { - Limit: 20, - Offset: 0, - 'vpc-id': [], - 'vpn-gateway-id': [], - 'vpn-gateway-name': [], - type: {}, - 'public-ip-address': [], - 'renew-flag': {}, - zone: [] -}; -var VPNGWFilterFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputNumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputNumber', - min: 1, - max: 100 -}, { - key: 'vpc-id', - enDescriptor: 'vpc-id', - cnDescriptor: 'VPC实例ID', - link: '', - type: 'inputMulti' -}, { - key: 'vpn-gateway-id', - enDescriptor: 'vpn-gateway-id', - cnDescriptor: 'VPN实例ID', - link: '', - type: 'inputMulti' -}, { - key: 'vpn-gateway-name', - enDescriptor: 'vpn-gateway-name', - cnDescriptor: 'VPN实例名称', - link: '', - type: 'inputMulti' -}, { - key: 'type', - enDescriptor: 'type', - cnDescriptor: 'VPN网关类型', - link: '', - type: 'select', - multiple: true, - list: [{ - text: 'IPSEC', - value: 'IPSEC' - }, { - text: 'SSL', - value: 'SSL' - }] -}, { - key: 'public-ip-address', - enDescriptor: 'public-ip-address', - cnDescriptor: '公网IP', - link: '', - type: 'inputMulti' -}, { - key: 'renew-flag', - enDescriptor: 'renew-flag', - cnDescriptor: '网关续费类型', - link: '', - type: 'select', - multiple: true, - list: [{ - text: '手动续费', - value: 'NOTIFY_AND_MANUAL_RENEW' - }, { - text: '自动续费', - value: 'NOTIFY_AND_AUTO_RENEW' - }] -}, { - key: 'zone', - enDescriptor: 'zone', - cnDescriptor: 'VPN所在可用区', - link: '', - type: 'dropdownMulti' -}]; -var queryEditorConfig = { - instanceDocUrl: 'https://cloud.tencent.com/document/api/215/17514', - namespace: namespace, - fieldDescriptor: VPNGWFilterFieldsDescriptor -}; -var VPNGW_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'VpnGatewayId', - queries: VPNGWFilterFields -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - return Object(_common_utils__WEBPACK_IMPORTED_MODULE_0__["instanceQueryParamsBaseParse"])(queries, true); -} - -/* harmony default export */ __webpack_exports__["default"] = (VPNGW_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/vpnx/datasource.ts": -/*!**************************************************!*\ - !*** ./datasource/tc_monitor/vpnx/datasource.ts ***! - \**************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/vpnx/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - - - - -var DCDatasource = -/** @class */ -function (_super) { - __extends(DCDatasource, _super); - - function DCDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = _query_def__WEBPACK_IMPORTED_MODULE_0__["namespace"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["VPNXInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["VPNXInvalidDemensions"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_0__["templateQueryIdMap"]; // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致 - - _this.InstanceReqConfig = { - service: 'vpc', - action: 'DescribeVpnConnections', - responseField: 'VpnConnectionSet' - }; - return _this; - } - - return DCDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (DCDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/vpnx/query.ts": -/*!*********************************************!*\ - !*** ./datasource/tc_monitor/vpnx/query.ts ***! - \*********************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _base_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_base/query */ "./datasource/tc_monitor/_base/query.ts"); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/vpnx/query_def.ts"); - - -Object(_base_query__WEBPACK_IMPORTED_MODULE_0__["default"])(_query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorName"], _query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorConfig"]); - -/***/ }), - -/***/ "./datasource/tc_monitor/vpnx/query_def.ts": -/*!*************************************************!*\ - !*** ./datasource/tc_monitor/vpnx/query_def.ts ***! - \*************************************************/ -/*! exports provided: default, VPNXFilterFieldsDescriptor, templateQueryIdMap, VPNXInstanceAliasList, VPNXInvalidDemensions, namespace, queryEditorName, queryEditorConfig, VPNXGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VPNXFilterFieldsDescriptor", function() { return VPNXFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VPNXInstanceAliasList", function() { return VPNXInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VPNXInvalidDemensions", function() { return VPNXInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorName", function() { return queryEditorName; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorConfig", function() { return queryEditorConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VPNXGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); - -var namespace = 'QCE/VPNX'; -var queryEditorName = 'vpnxQuery'; -var VPNXInvalidDemensions = { - vpnConnId: 'VpnConnectionId' -}; -var VPNXInstanceAliasList = ['VpnConnectionId', 'VpnConnectionName']; -var templateQueryIdMap = { - instance: 'VpnConnectionId' -}; // select类型需要注意是{},multi后缀是[] - -var VPNXFilterFields = { - Limit: 20, - Offset: 0, - 'vpc-id': [], - 'vpn-gateway-id': [], - 'customer-gateway-id': [], - 'vpn-connection-name': [], - 'vpn-connection-id': [] -}; -var VPNXFilterFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputNumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputNumber', - min: 1, - max: 100 -}, { - key: 'vpc-id', - enDescriptor: 'vpc-id', - cnDescriptor: 'VPC实例ID', - link: '', - type: 'inputMulti' -}, { - key: 'vpn-gateway-id', - enDescriptor: 'vpn-gateway-id', - cnDescriptor: 'VPN实例ID', - link: '', - type: 'inputMulti' -}, { - key: 'customer-gateway-id ', - enDescriptor: 'customer-gateway-id ', - cnDescriptor: '对端网关实例ID', - link: '', - type: 'inputMulti' -}, { - key: 'vpn-connection-name', - enDescriptor: 'vpn-connection-name', - cnDescriptor: '通道名称', - link: '', - type: 'inputMulti' -}, { - key: 'vpn-connection-id', - enDescriptor: 'vpn-connection-id', - cnDescriptor: '通道实例ID', - link: '', - type: 'inputMulti' -}]; // 各产品实例列表detail配置 - -var queryEditorConfig = { - instanceDocUrl: 'https://cloud.tencent.com/document/api/215/17515', - namespace: namespace, - fieldDescriptor: VPNXFilterFieldsDescriptor -}; -var VPNX_STATE = { - region: '', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'VpnConnectionId', - queries: VPNXFilterFields -}; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - return Object(_common_utils__WEBPACK_IMPORTED_MODULE_0__["instanceQueryParamsBaseParse"])(queries, true); -} - -/* harmony default export */ __webpack_exports__["default"] = (VPNX_STATE); - - -/***/ }), - -/***/ "./datasource/tc_monitor/waf/datasource.ts": -/*!*************************************************!*\ - !*** ./datasource/tc_monitor/waf/datasource.ts ***! - \*************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/waf/query_def.ts"); -/* harmony import */ var _base_datasource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../_base/datasource */ "./datasource/tc_monitor/_base/datasource.ts"); -/* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../locale */ "./locale/index.ts"); -var __extends = undefined && undefined.__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - -var __assign = undefined && undefined.__assign || function () { - __assign = Object.assign || function (t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - - for (var p in s) { - if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - } - - return t; - }; - - return __assign.apply(this, arguments); -}; - -var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; - -var __generator = undefined && undefined.__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; - - case 4: - _.label++; - return { - value: op[1], - done: false - }; - - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - - case 7: - op = _.ops.pop(); - - _.trys.pop(); - - continue; - - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - - if (t && _.label < t[2]) { - _.label = t[2]; - - _.ops.push(op); - - break; - } - - if (t[2]) _.ops.pop(); - - _.trys.pop(); - - continue; - } - - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } - - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; - - - - - -var CDNDatasource = -/** @class */ -function (_super) { - __extends(CDNDatasource, _super); - - function CDNDatasource(instanceSettings, backendSrv, templateSrv) { - var _this = _super.call(this, instanceSettings, backendSrv, templateSrv) || this; - - _this.Namespace = _query_def__WEBPACK_IMPORTED_MODULE_0__["namespace"]; - _this.InstanceAliasList = _query_def__WEBPACK_IMPORTED_MODULE_0__["WAFInstanceAliasList"]; - _this.InvalidDimensions = _query_def__WEBPACK_IMPORTED_MODULE_0__["WAFInvalidDemensions"]; - _this.templateQueryIdMap = _query_def__WEBPACK_IMPORTED_MODULE_0__["templateQueryIdMap"]; - _this.InstanceReqConfig = { - // service: 'waf', - action: 'DescribeDomains', - responseField: 'Domains' - }; - return _this; - } - - CDNDatasource.prototype.getRegions = function () { - return Promise.resolve(_query_def__WEBPACK_IMPORTED_MODULE_0__["regionSupported"].map(function (_a) { - var value = _a.value; - return { - value: value, - text: Object(_locale__WEBPACK_IMPORTED_MODULE_2__["t"])(value) - }; - })); - }; - - CDNDatasource.prototype.metricFindQuery = function (query, regex) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , _super.prototype.metricFindQuery.call(this, __assign(__assign({}, query), { - region: 'ap-guangzhou' - }), regex)]; - }); - }); - }; - - return CDNDatasource; -}(_base_datasource__WEBPACK_IMPORTED_MODULE_1__["BaseDatasource"]); - -/* harmony default export */ __webpack_exports__["default"] = (CDNDatasource); - -/***/ }), - -/***/ "./datasource/tc_monitor/waf/query.ts": -/*!********************************************!*\ - !*** ./datasource/tc_monitor/waf/query.ts ***! - \********************************************/ -/*! no exports provided */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _base_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_base/query */ "./datasource/tc_monitor/_base/query.ts"); -/* harmony import */ var _query_def__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./query_def */ "./datasource/tc_monitor/waf/query_def.ts"); - - -Object(_base_query__WEBPACK_IMPORTED_MODULE_0__["default"])(_query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorName"], _query_def__WEBPACK_IMPORTED_MODULE_1__["queryEditorConfig"]); - -/***/ }), - -/***/ "./datasource/tc_monitor/waf/query_def.ts": -/*!************************************************!*\ - !*** ./datasource/tc_monitor/waf/query_def.ts ***! - \************************************************/ -/*! exports provided: default, WAFFilterFieldsDescriptor, templateQueryIdMap, WAFInstanceAliasList, WAFInvalidDemensions, namespace, regionSupported, queryEditorName, queryEditorConfig, WAFGetInstanceQueryParams */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WAFFilterFieldsDescriptor", function() { return WAFFilterFieldsDescriptor; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "templateQueryIdMap", function() { return templateQueryIdMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WAFInstanceAliasList", function() { return WAFInstanceAliasList; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WAFInvalidDemensions", function() { return WAFInvalidDemensions; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "regionSupported", function() { return regionSupported; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorName", function() { return queryEditorName; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queryEditorConfig", function() { return queryEditorConfig; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WAFGetInstanceQueryParams", function() { return GetInstanceQueryParams; }); -/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../common/utils */ "./datasource/common/utils.ts"); - -var namespace = 'QCE/WAF'; -var queryEditorName = 'wafQuery'; -var WAFFilterFields = { - Limit: 20, - Offset: 0, - origin: [], - domain: [], - resourceId: [], - status: {}, - serviceType: {}, - projectId: [], - domainType: {}, - fullUrlCache: {}, - https: {}, - originPullProtocol: {}, - tagKey: [] -}; -var WAFFilterFieldsDescriptor = [{ - key: 'Offset', - enDescriptor: 'Offset', - cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项', - link: '', - type: 'inputNumber', - min: 0 -}, { - key: 'Limit', - enDescriptor: 'Limit', - cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100', - link: '', - type: 'inputNumber', - min: 1, - max: 100 -}, { - key: 'origin', - enDescriptor: 'origin', - cnDescriptor: '主源站', - link: '', - type: 'inputMulti' -}, { - key: 'domain', - enDescriptor: 'domain', - cnDescriptor: '域名', - link: '', - type: 'inputMulti' -}, { - key: 'resourceId', - enDescriptor: 'resourceId', - cnDescriptor: '域名id', - link: '', - type: 'inputMulti' -}, { - key: 'status', - enDescriptor: 'status', - cnDescriptor: '域名状态', - link: '', - type: 'select', - list: [{ - text: 'online', - value: 'online' - }, { - text: 'offline', - value: 'offline' - }, { - text: 'processing', - value: 'processing' - }] -}, { - key: 'serviceType', - enDescriptor: 'serviceType', - cnDescriptor: '业务类型', - link: '', - type: 'select', - list: [{ - text: 'web', - value: 'web' - }, { - text: 'download', - value: 'download' - }, { - text: 'media', - value: 'media' - }] -}, { - key: 'projectId', - enDescriptor: 'projectId', - cnDescriptor: '项目ID', - link: '', - type: 'inputNumberMulti' -}, { - key: 'domainType', - enDescriptor: 'domainType', - cnDescriptor: '主源站类型', - link: '', - type: 'select', - list: [{ - text: '自有源', - value: 'cname' - }, { - text: 'cos接入', - value: 'cos' - }] -}, { - key: 'fullUrlCache', - enDescriptor: 'fullUrlCache', - cnDescriptor: '全路径缓存', - link: '', - type: 'select', - list: [{ - text: '打开', - value: 'on' - }, { - text: '关闭', - value: 'off' - }] -}, { - key: 'https', - enDescriptor: 'https', - cnDescriptor: '是否配置https', - link: '', - type: 'select', - list: [{ - text: 'on', - value: 'on' - }, { - text: 'off', - value: 'off' - }, { - text: 'processing', - value: 'processing' - }] -}, { - key: 'originPullProtocol', - enDescriptor: 'originPullProtocol', - cnDescriptor: '回源协议类型', - link: '', - type: 'select', - list: [{ - text: 'http', - value: 'http' - }, { - text: 'follow', - value: 'follow' - }, { - text: 'https', - value: 'https' - }] -}, { - key: 'tagKey', - enDescriptor: 'tagKey', - cnDescriptor: '标签键', - link: '', - type: 'inputMulti' -}]; // 各产品实例列表detail配置 - -var queryEditorConfig = { - instanceDocUrl: 'https://cloud.tencent.com/document/api/228/41118', - namespace: namespace, - fieldDescriptor: WAFFilterFieldsDescriptor -}; -var WAF_STATE = { - region: 'ap-guangzhou', - metricName: '', - metricUnit: '', - period: undefined, - dimensionObject: null, - instance: '', - instanceAlias: 'Domain', - queries: WAFFilterFields -}; -var regionSupported = [{ - value: 'ap-beijing' -}, { - value: 'ap-chengdu' -}, { - value: 'ap-chongqing' -}, { - value: 'ap-guangzhou' -}, { - value: 'ap-hongkong' -}, { - value: 'ap-nanjing' -}, { - value: 'ap-shanghai' -}, { - value: 'ap-shanghai-fsi' -}, { - value: 'ap-seoul' -}, { - value: 'ap-singapore' -}]; - -function GetInstanceQueryParams(queries) { - if (queries === void 0) { - queries = {}; - } - - return Object(_common_utils__WEBPACK_IMPORTED_MODULE_0__["instanceQueryParamsBaseParse"])(queries, true); -} - -var WAFInstanceAliasList = ['Domain', 'ProjectId']; -var WAFInvalidDemensions = { - projectId: 'ProjectId', - domain: 'Domain' -}; -var templateQueryIdMap = { - instance: 'Domain' -}; -/* harmony default export */ __webpack_exports__["default"] = (WAF_STATE); - - -/***/ }), - -/***/ "./locale/en_US.ts": -/*!*************************!*\ - !*** ./locale/en_US.ts ***! - \*************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -var en_US = { - language: 'Language', - enable_intranet_API_mode: 'Enable Intranet API Mode', - cloud_database: 'Cloud Database', - cloud_load_balancer: 'Cloud Load Balancer', - virtual_private_cloud: 'Virtual Private Cloud', - content_delivery_network: 'Content Delivery Network', - message_queue: 'Message Queue', - direct_connect: 'Direct Connect', - cloud_physical_machine: 'Cloud Physical Machine', - elastic_mapReduce: 'Elastic MapReduce', - edge_computing_machine: 'Edge Computing Machine', - // namespace - RUM: 'Real User Monitoring(RUM)', - CLS: 'Cloud Log Service(CLS)', - CVM: 'Cloud Virtual Machine(CVM)', - CDB: 'TencentDB for MySQL(CDB)', - CMONGO: 'TencentDB for MongoDB(CMONGO)', - POSTGRES: 'TencentDB for PostgreSQL(POSTGRES)', - REDIS: 'TencentDB for Redis(REDIS)', - REDIS_MEM: 'TencentDB for Redis(Memory Edition, 5-Second)(REDIS_MEM)', - SQLSERVER: 'TencentDB for SQL Server(SQLSERVER)', - CYNOSDB_MYSQL: 'TencentDB for CYNOSDB_MYSQL(CYNOSDB_MYSQL)', - TCAPLUS: 'TencentDB for TcaplusDB(TCAPLUS)', - TDMYSQL: 'TDSQL for MySQL(TDMYSQL)', - PCX: 'Peering Connection(PCX)', - BWP: 'Bandwidth Packet(BWP)', - NAT_GATEWAY: 'NAT Gateway(NAT_GATEWAY)', - VPNGW: 'VPN Gateway(VPNGW)', - VPNX: 'VPN Tunnel(VPNX)', - DCG: 'Direct Connect Gateway(DCG)', - CEIP_SUMMARY: 'Anycast EIP(CEIP_SUMMARY)', - VPC_NET_DETECT: 'Network Detection(VPC_NET_DETECT)', - VBC: 'Cloud Connect Network(VBC)', - LB: 'Elastic IP(LB)', - LB_PUBLIC: 'Public Network CLB(LB_PUBLIC)', - LB_PRIVATE: 'Private Network CLB Layer-4 Protocol(LB_PRIVATE)', - LOADBALANCE: 'Private Network CLB Layer-7 Protocol(LOADBALANCE)', - CDN: 'Chinese Mainland Domain(CDN)', - CDN_LOG_DATA: 'Province(CDN_LOG_DATA)', - OV_CDN: 'Overseas Domain(OV_CDN)', - SCF_V2: 'Serverless Cloud Function(SCF)', - CFS: 'Cloud File Storage(CFS)', - COS: 'Cloud Object Storage(COS)', - CKAFKA: 'Message Queue CKafka(CKAFKA)', - CMQ: 'Message Queue for Queue Service(CMQ)', - CMQTOPIC: 'Message Queue for Topic Subscription(CMQTOPIC)', - TDMQ: 'Tencent Distributed Message Queue for Pulsar(TDMQ)', - TDMQ_ROCKETMQ: 'Tencent Distributed Message Queue for RocketMQ(ROCKETMQ)', - TDMQ_RABBITMQ: 'Tencent Distributed Message Queue for RabbitMQ(RABBITMQ)', - DCX: 'Direct Connect for Dedicated Tunnel(DCX)', - DC: 'Direct Connect for Connection(DC)', - CPM: 'Cloud Physical Machine(CPM)', - BM_PCX: 'Cloud Physical Machine for Peering Connection(BM_PCX)', - BM_LB: 'Cloud Physical Machine for Public Network CLB(BM_LB)', - BM_INTRA_LB: 'Cloud Physical Machine for Private Network CLB(BM_INTRA_LB)', - CES: 'Elasticsearch Service(CES)', - BLOCK_STORAGE: 'Cloud Block Storage(BLOCK_STORAGE)', - APIGATEWAY: 'API Gateway(APIGATEWAY)', - QAAP: 'Global Application Acceleration Platform(GAAP)', - ECM: 'Edge Computing Machine for Computation and Networking(ECM)', - ECM_BLOCK_STORAGE: 'Edge Computing Machine for Block Storage(ECM_BLOCK_STORAGE)', - ECM_LB: 'Edge Computing Machine for Layer-4 CLB(ECM_LB)', - GSE: 'Game Server Elastic-scaling(GSE)', - TKE: 'Tencent Kubernetes Engine(TKE)', - ECDN: 'Enterprise Content Delivery Network(ECDN)', - WAF: 'Web Application Firewall(WAF)', - // others - multi_scene: 'Multi-Scene', - lite: 'Lite', - cloud_monitor: 'Cloud Monitor', - cloud_log_service: 'Cloud Log Service', - real_user_monitoring: 'Real User Monitoring', - apm_monitoring: 'Application Monitoring', - region: 'Region', - log_topic: 'Log Topic', - syntax_rule: 'Syntax Rule', - max_result_num: 'Maximum result number', - search_statement: 'Search Statement', - time_unit: 'Time unit', - seconds: 'seconds', - search_description: 'Search for instances according to specific query conditions, and pull the first 20 instances by default', - // region - 'ap-guangzhou': 'South China(Guangzhou)', - 'ap-shenzhen-fsi': 'South China(Shenzhen Finance)', - 'ap-guangzhou-open': 'South China(Guangzhou OPEN)', - 'ap-shenzhen': 'South China(Shenzhen)', - 'ap-qingyuan': 'South China(Qingyuan)', - 'ap-shanghai': 'East China(Shanghai)', - 'ap-shanghai-fsi': 'East China(Shanghai Finance)', - 'ap-jinan-ec': 'East China(Jinan)', - 'ap-hangzhou-ec': 'East China(Hangzhou)', - 'ap-nanjing': 'East China(Nanjing)', - 'ap-fuzhou-ec': 'East China(Fuzhou)', - 'ap-hefei-ec': 'East China(Hefei)', - 'ap-beijing': 'North China region(Beijing)', - 'ap-tianjin': 'North China region(Tianjin)', - 'ap-beijing-fsi': 'North China region(Beijing Finance)', - 'ap-shijiazhuang-ec': 'North China region(Shijiazhuang)', - 'ap-wuhan-ec': 'Central China(Wuhan)', - 'ap-changsha-ec': 'Central China(Changsha)', - 'ap-zhengzhou-ec': 'Central China(Zhengzhou)', - 'ap-chengdu': 'Southwest China(Chengdu)', - 'ap-chongqing': 'Southwest China(Chongqing)', - 'ap-xian-ec': "Northwest region(Xi'an)", - 'ap-shenyang-ec': 'Northeast China(Shenyang)', - 'ap-taipei': 'Hong Kong, Macau and Taiwan (China)(Taipei, China)', - 'ap-hongkong': 'Hong Kong, Macau and Taiwan (China)(Hong Kong, China)', - 'ap-seoul': 'Northeast Asia(Seoul)', - 'ap-tokyo': 'Northeast Asia(Tokyo)', - 'ap-singapore': 'Southeast Asia(Singapore)', - 'ap-bangkok': 'Southeast Asia(Bangkok)', - 'ap-jakarta': 'Southeast Asia(Jakarta)', - 'na-siliconvalley': 'US West(Silicon Valley)', - 'eu-frankfurt': 'Europe(Frankfurt)', - 'eu-moscow': 'Europe(Northeastern Europe)', - 'ap-mumbai': 'South Asia(Mumbai)', - 'na-ashburn': 'US East(Virginia)', - 'sa-saopaulo': 'South America(São Paulo)', - 'na-toronto': 'North America(Toronto)' -}; -/* harmony default export */ __webpack_exports__["default"] = (en_US); - -/***/ }), - -/***/ "./locale/index.ts": -/*!*************************!*\ - !*** ./locale/index.ts ***! - \*************************/ -/*! exports provided: Language, t, setLanguage, getLanguage */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Language", function() { return Language; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return t; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setLanguage", function() { return setLanguage; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLanguage", function() { return getLanguage; }); -/* harmony import */ var _zh_CN__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./zh_CN */ "./locale/zh_CN.ts"); -/* harmony import */ var _en_US__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./en_US */ "./locale/en_US.ts"); - - -var locale_language = 'zh-CN'; -var Language; - -(function (Language) { - Language["Chinese"] = "zh-CN"; - Language["English"] = "en-US"; -})(Language || (Language = {})); - -var t = function t(key) { - if (locale_language === Language.Chinese) { - return _zh_CN__WEBPACK_IMPORTED_MODULE_0__["default"][key]; - } - - return _en_US__WEBPACK_IMPORTED_MODULE_1__["default"][key]; -}; -var setLanguage = function setLanguage(language) { - locale_language = language; -}; -var getLanguage = function getLanguage() { - return locale_language; -}; - -/***/ }), - -/***/ "./locale/zh_CN.ts": -/*!*************************!*\ - !*** ./locale/zh_CN.ts ***! - \*************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -var zh_CN = { - language: '语言', - enable_intranet_API_mode: '开启内网API模式', - cloud_database: '云数据库', - cloud_load_balancer: '负载均衡', - virtual_private_cloud: '私有网络', - content_delivery_network: '内容分发网络', - message_queue: '消息队列', - direct_connect: '专线接入', - cloud_physical_machine: '黑石物理服务器', - elastic_mapReduce: '弹性 MapReduce', - edge_computing_machine: '边缘计算机器', - // namespace - RUM: '前端性能监控(RUM)', - APM: '应用性能监控(APM)', - CLS: '日志服务(CLS)', - CVM: '云服务器(CVM)', - CDB: '云数据库 MySQL(CDB)', - CMONGO: '云数据库 MongoDB(CMONGO)', - POSTGRES: '云数据库 PostgreSQL(POSTGRES)', - REDIS: '云数据库 Redis(REDIS)', - REDIS_MEM: '云数据库 Redis内存版(5s)(REDIS_MEM)', - SQLSERVER: '云数据库 SQL Server(SQLSERVER)', - CYNOSDB_MYSQL: '云数据库 CYNOSDB_MYSQL(CYNOSDB_MYSQL)', - TCAPLUS: '云数据库 TcaplusDB(TCAPLUS)', - TDMYSQL: '分布式数据库 TDSQL MySQL(TDMYSQL)', - PCX: '私有网络-对等连接(PCX)', - BWP: '私有网络-带宽包(BWP)', - NAT_GATEWAY: '私有网络-NAT 网关(NAT_GATEWAY)', - VPNGW: '私有网络-VPN 网关(VPNGW)', - VPNX: '私有网络-VPN 通道(VPNX)', - DCG: '私有网络-专线网关(DCG)', - CEIP_SUMMARY: '私有网络-Anycast 弹性公网IP(CEIP_SUMMARY)', - VPC_NET_DETECT: '私有网络-网络探测(VPC_NET_DETECT)', - VBC: '私有网络-云联网(VBC)', - LB: '私有网络-弹性公网IP(LB)', - LB_PUBLIC: '公网负载均衡监控指标(LB_PUBLIC)', - LB_PRIVATE: '内网负载均衡四层协议监控指标(LB_PRIVATE)', - LOADBALANCE: '内网负载均衡七层协议监控指标(LOADBALANCE)', - CDN: '国内域名(CDN)', - CDN_LOG_DATA: '省份域名(CDN_LOG_DATA)', - OV_CDN: '国外域名(OV_CDN)', - SCF_V2: '云函数(SCF)', - CFS: '文件存储(CFS)', - COS: '对象存储(COS)', - CKAFKA: '消息队列 CKafka(CKAFKA)', - CMQ: '消息队列-队列服务监控(CMQ)', - CMQTOPIC: '消息队列-主题订阅监控(CMQTOPIC)', - TDMQ: '消息队列 Pulsar 版(TDMQ)', - TDMQ_ROCKETMQ: '消息队列 RocketMQ 版(ROCKETMQ)', - TDMQ_RABBITMQ: '消息队列 RabbitMQ 版(RABBITMQ)', - DCX: '专线接入-专用通道(DCX)', - DC: '专线接入-物理专线(DC)', - CPM: '黑石物理服务器(CPM)', - BM_PCX: '黑石对等连接(BM_PCX)', - BM_LB: '黑石外网负载均衡(BM_LB)', - BM_INTRA_LB: '黑石内网负载均衡(BM_INTRA_LB)', - CES: 'Elasticsearch指标(CES)', - BLOCK_STORAGE: '云硬盘(BLOCK_STORAGE)', - APIGATEWAY: 'API 网关(APIGATEWAY)', - QAAP: '全球应用加速(GAAP)', - ECM: '边缘计算和网络监控(ECM)', - ECM_BLOCK_STORAGE: '边缘计算存储监控(ECM_BLOCK_STORAGE)', - ECM_LB: '边缘计算负载均衡(ECM_LB)', - GSE: '游戏服务器伸缩(GSE)', - TKE: '容器服务(TKE)', - ECDN: '全站加速网络(ECDN)', - WAF: 'Web 应用防火墙(WAF)', - // others - multi_scene: '多场景版', - lite: '精简版', - cloud_monitor: '云监控', - cloud_log_service: '日志服务', - real_user_monitoring: '前端性能监控', - apm_monitoring: '应用性能监控', - region: '地域', - log_topic: '日志主题', - syntax_rule: '语法规则', - max_result_num: '最大结果条数', - search_statement: '检索语句', - time_unit: 'Time unit', - seconds: 'seconds', - search_description: '按照具体的查询条件搜索实例,默认拉取前 20 条实例', - // region - 'ap-guangzhou': '华南地区(广州)', - 'ap-shenzhen-fsi': '华南地区(深圳金融)', - 'ap-guangzhou-open': '华南地区(广州OPEN)', - 'ap-shenzhen': '华南地区(深圳)', - 'ap-qingyuan': '华南地区(清远)', - 'ap-shanghai': '华东地区(上海)', - 'ap-shanghai-fsi': '华东地区(上海金融)', - 'ap-jinan-ec': '华东地区(济南)', - 'ap-hangzhou-ec': '华东地区(杭州)', - 'ap-nanjing': '华东地区(南京)', - 'ap-fuzhou-ec': '华东地区(福州)', - 'ap-hefei-ec': '华东地区(合肥)', - 'ap-beijing': '华北地区(北京)', - 'ap-tianjin': '华北地区(天津)', - 'ap-beijing-fsi': '华北地区(北京金融)', - 'ap-shijiazhuang-ec': '华北地区(石家庄)', - 'ap-wuhan-ec': '华中地区(武汉)', - 'ap-changsha-ec': '华中地区(长沙)', - 'ap-zhengzhou-ec': '华中地区(郑州)', - 'ap-chengdu': '西南地区(成都)', - 'ap-chongqing': '西南地区(重庆)', - 'ap-xian-ec': '西北地区(西安)', - 'ap-shenyang-ec': '东北地区(沈阳)', - 'ap-taipei': '港澳台地区(中国台北)', - 'ap-hongkong': '港澳台地区(中国香港)', - 'ap-seoul': '亚太东北(首尔)', - 'ap-tokyo': '亚太东北(东京)', - 'ap-singapore': '亚太东南(新加坡)', - 'ap-bangkok': '亚太东南(曼谷)', - 'ap-jakarta': '亚太东南(雅加达)', - 'na-siliconvalley': '美国西部(硅谷)', - 'eu-frankfurt': '欧洲地区(法兰克福)', - 'eu-moscow': '欧洲地区(莫斯科)', - 'ap-mumbai': '亚太南部(孟买)', - 'na-ashburn': '美国东部(弗吉尼亚)', - 'sa-saopaulo': '南美地区(圣保罗)', - 'na-toronto': '北美地区(多伦多)' -}; -/* harmony default export */ __webpack_exports__["default"] = (zh_CN); - -/***/ }), - -/***/ "@grafana/data": -/*!********************************!*\ - !*** external "@grafana/data" ***! - \********************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -module.exports = __WEBPACK_EXTERNAL_MODULE__grafana_data__; - -/***/ }), - -/***/ "@grafana/runtime": -/*!***********************************!*\ - !*** external "@grafana/runtime" ***! - \***********************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -module.exports = __WEBPACK_EXTERNAL_MODULE__grafana_runtime__; - -/***/ }), - -/***/ "grafana/app/core/core_module": -/*!***************************************!*\ - !*** external "app/core/core_module" ***! - \***************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -module.exports = __WEBPACK_EXTERNAL_MODULE_grafana_app_core_core_module__; - -/***/ }), - -/***/ "lodash": -/*!*************************!*\ - !*** external "lodash" ***! - \*************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -module.exports = __WEBPACK_EXTERNAL_MODULE_lodash__; - -/***/ }), - -/***/ "moment": -/*!*************************!*\ - !*** external "moment" ***! - \*************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -module.exports = __WEBPACK_EXTERNAL_MODULE_moment__; - -/***/ }) - -/******/ })});; +define("TencentCloudMonitorGrafanaApp",["lodash","app/core/core_module","@grafana/data","@grafana/runtime","moment"],(function(e,t,n,r,i){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=212)}([function(t,n){t.exports=e},function(e,t,n){"use strict";var r={language:"语言",enable_intranet_API_mode:"开启内网API模式",cloud_database:"云数据库",cloud_load_balancer:"负载均衡",virtual_private_cloud:"私有网络",content_delivery_network:"内容分发网络",message_queue:"消息队列",direct_connect:"专线接入",cloud_physical_machine:"黑石物理服务器",elastic_mapReduce:"弹性 MapReduce",edge_computing_machine:"边缘计算机器",RUM:"前端性能监控(RUM)",APM:"应用性能监控(APM)",CLS:"日志服务(CLS)",CVM:"云服务器(CVM)",CDB:"云数据库 MySQL(CDB)",CMONGO:"云数据库 MongoDB(CMONGO)",POSTGRES:"云数据库 PostgreSQL(POSTGRES)",REDIS:"云数据库 Redis(REDIS)",REDIS_MEM:"云数据库 Redis内存版(5s)(REDIS_MEM)",SQLSERVER:"云数据库 SQL Server(SQLSERVER)",CYNOSDB_MYSQL:"云数据库 CYNOSDB_MYSQL(CYNOSDB_MYSQL)",TCAPLUS:"云数据库 TcaplusDB(TCAPLUS)",TDMYSQL:"分布式数据库 TDSQL MySQL(TDMYSQL)",PCX:"私有网络-对等连接(PCX)",BWP:"私有网络-带宽包(BWP)",NAT_GATEWAY:"私有网络-NAT 网关(NAT_GATEWAY)",VPNGW:"私有网络-VPN 网关(VPNGW)",VPNX:"私有网络-VPN 通道(VPNX)",DCG:"私有网络-专线网关(DCG)",CEIP_SUMMARY:"私有网络-Anycast 弹性公网IP(CEIP_SUMMARY)",VPC_NET_DETECT:"私有网络-网络探测(VPC_NET_DETECT)",VBC:"私有网络-云联网(VBC)",LB:"私有网络-弹性公网IP(LB)",LB_PUBLIC:"公网负载均衡监控指标(LB_PUBLIC)",LB_PRIVATE:"内网负载均衡四层协议监控指标(LB_PRIVATE)",LOADBALANCE:"内网负载均衡七层协议监控指标(LOADBALANCE)",CDN:"国内域名(CDN)",CDN_LOG_DATA:"省份域名(CDN_LOG_DATA)",OV_CDN:"国外域名(OV_CDN)",SCF_V2:"云函数(SCF)",CFS:"文件存储(CFS)",COS:"对象存储(COS)",CKAFKA:"消息队列 CKafka(CKAFKA)",CMQ:"消息队列-队列服务监控(CMQ)",CMQTOPIC:"消息队列-主题订阅监控(CMQTOPIC)",TDMQ:"消息队列 Pulsar 版(TDMQ)",TDMQ_ROCKETMQ:"消息队列 RocketMQ 版(ROCKETMQ)",TDMQ_RABBITMQ:"消息队列 RabbitMQ 版(RABBITMQ)",DCX:"专线接入-专用通道(DCX)",DC:"专线接入-物理专线(DC)",CPM:"黑石物理服务器(CPM)",BM_PCX:"黑石对等连接(BM_PCX)",BM_LB:"黑石外网负载均衡(BM_LB)",BM_INTRA_LB:"黑石内网负载均衡(BM_INTRA_LB)",CES:"Elasticsearch指标(CES)",BLOCK_STORAGE:"云硬盘(BLOCK_STORAGE)",APIGATEWAY:"API 网关(APIGATEWAY)",QAAP:"全球应用加速(GAAP)",ECM:"边缘计算和网络监控(ECM)",ECM_BLOCK_STORAGE:"边缘计算存储监控(ECM_BLOCK_STORAGE)",ECM_LB:"边缘计算负载均衡(ECM_LB)",GSE:"游戏服务器伸缩(GSE)",TKE:"容器服务(TKE)",ECDN:"全站加速网络(ECDN)",WAF:"Web 应用防火墙(WAF)",multi_scene:"多场景版",lite:"精简版",cloud_monitor:"云监控",cloud_log_service:"日志服务",real_user_monitoring:"前端性能监控",apm_monitoring:"应用性能监控",region:"地域",log_topic:"日志主题",syntax_rule:"语法规则",max_result_num:"最大结果条数",search_statement:"检索语句",time_unit:"Time unit",seconds:"seconds",search_description:"按照具体的查询条件搜索实例,默认拉取前 20 条实例","ap-guangzhou":"华南地区(广州)","ap-shenzhen-fsi":"华南地区(深圳金融)","ap-guangzhou-open":"华南地区(广州OPEN)","ap-shenzhen":"华南地区(深圳)","ap-qingyuan":"华南地区(清远)","ap-shanghai":"华东地区(上海)","ap-shanghai-fsi":"华东地区(上海金融)","ap-jinan-ec":"华东地区(济南)","ap-hangzhou-ec":"华东地区(杭州)","ap-nanjing":"华东地区(南京)","ap-fuzhou-ec":"华东地区(福州)","ap-hefei-ec":"华东地区(合肥)","ap-beijing":"华北地区(北京)","ap-tianjin":"华北地区(天津)","ap-beijing-fsi":"华北地区(北京金融)","ap-shijiazhuang-ec":"华北地区(石家庄)","ap-wuhan-ec":"华中地区(武汉)","ap-changsha-ec":"华中地区(长沙)","ap-zhengzhou-ec":"华中地区(郑州)","ap-chengdu":"西南地区(成都)","ap-chongqing":"西南地区(重庆)","ap-xian-ec":"西北地区(西安)","ap-shenyang-ec":"东北地区(沈阳)","ap-taipei":"港澳台地区(中国台北)","ap-hongkong":"港澳台地区(中国香港)","ap-seoul":"亚太东北(首尔)","ap-tokyo":"亚太东北(东京)","ap-singapore":"亚太东南(新加坡)","ap-bangkok":"亚太东南(曼谷)","ap-jakarta":"亚太东南(雅加达)","na-siliconvalley":"美国西部(硅谷)","eu-frankfurt":"欧洲地区(法兰克福)","eu-moscow":"欧洲地区(莫斯科)","ap-mumbai":"亚太南部(孟买)","na-ashburn":"美国东部(弗吉尼亚)","sa-saopaulo":"南美地区(圣保罗)","na-toronto":"北美地区(多伦多)"},i={language:"Language",enable_intranet_API_mode:"Enable Intranet API Mode",cloud_database:"Cloud Database",cloud_load_balancer:"Cloud Load Balancer",virtual_private_cloud:"Virtual Private Cloud",content_delivery_network:"Content Delivery Network",message_queue:"Message Queue",direct_connect:"Direct Connect",cloud_physical_machine:"Cloud Physical Machine",elastic_mapReduce:"Elastic MapReduce",edge_computing_machine:"Edge Computing Machine",RUM:"Real User Monitoring(RUM)",CLS:"Cloud Log Service(CLS)",CVM:"Cloud Virtual Machine(CVM)",CDB:"TencentDB for MySQL(CDB)",CMONGO:"TencentDB for MongoDB(CMONGO)",POSTGRES:"TencentDB for PostgreSQL(POSTGRES)",REDIS:"TencentDB for Redis(REDIS)",REDIS_MEM:"TencentDB for Redis(Memory Edition, 5-Second)(REDIS_MEM)",SQLSERVER:"TencentDB for SQL Server(SQLSERVER)",CYNOSDB_MYSQL:"TencentDB for CYNOSDB_MYSQL(CYNOSDB_MYSQL)",TCAPLUS:"TencentDB for TcaplusDB(TCAPLUS)",TDMYSQL:"TDSQL for MySQL(TDMYSQL)",PCX:"Peering Connection(PCX)",BWP:"Bandwidth Packet(BWP)",NAT_GATEWAY:"NAT Gateway(NAT_GATEWAY)",VPNGW:"VPN Gateway(VPNGW)",VPNX:"VPN Tunnel(VPNX)",DCG:"Direct Connect Gateway(DCG)",CEIP_SUMMARY:"Anycast EIP(CEIP_SUMMARY)",VPC_NET_DETECT:"Network Detection(VPC_NET_DETECT)",VBC:"Cloud Connect Network(VBC)",LB:"Elastic IP(LB)",LB_PUBLIC:"Public Network CLB(LB_PUBLIC)",LB_PRIVATE:"Private Network CLB Layer-4 Protocol(LB_PRIVATE)",LOADBALANCE:"Private Network CLB Layer-7 Protocol(LOADBALANCE)",CDN:"Chinese Mainland Domain(CDN)",CDN_LOG_DATA:"Province(CDN_LOG_DATA)",OV_CDN:"Overseas Domain(OV_CDN)",SCF_V2:"Serverless Cloud Function(SCF)",CFS:"Cloud File Storage(CFS)",COS:"Cloud Object Storage(COS)",CKAFKA:"Message Queue CKafka(CKAFKA)",CMQ:"Message Queue for Queue Service(CMQ)",CMQTOPIC:"Message Queue for Topic Subscription(CMQTOPIC)",TDMQ:"Tencent Distributed Message Queue for Pulsar(TDMQ)",TDMQ_ROCKETMQ:"Tencent Distributed Message Queue for RocketMQ(ROCKETMQ)",TDMQ_RABBITMQ:"Tencent Distributed Message Queue for RabbitMQ(RABBITMQ)",DCX:"Direct Connect for Dedicated Tunnel(DCX)",DC:"Direct Connect for Connection(DC)",CPM:"Cloud Physical Machine(CPM)",BM_PCX:"Cloud Physical Machine for Peering Connection(BM_PCX)",BM_LB:"Cloud Physical Machine for Public Network CLB(BM_LB)",BM_INTRA_LB:"Cloud Physical Machine for Private Network CLB(BM_INTRA_LB)",CES:"Elasticsearch Service(CES)",BLOCK_STORAGE:"Cloud Block Storage(BLOCK_STORAGE)",APIGATEWAY:"API Gateway(APIGATEWAY)",QAAP:"Global Application Acceleration Platform(GAAP)",ECM:"Edge Computing Machine for Computation and Networking(ECM)",ECM_BLOCK_STORAGE:"Edge Computing Machine for Block Storage(ECM_BLOCK_STORAGE)",ECM_LB:"Edge Computing Machine for Layer-4 CLB(ECM_LB)",GSE:"Game Server Elastic-scaling(GSE)",TKE:"Tencent Kubernetes Engine(TKE)",ECDN:"Enterprise Content Delivery Network(ECDN)",WAF:"Web Application Firewall(WAF)",multi_scene:"Multi-Scene",lite:"Lite",cloud_monitor:"Cloud Monitor",cloud_log_service:"Cloud Log Service",real_user_monitoring:"Real User Monitoring",apm_monitoring:"Application Monitoring",region:"Region",log_topic:"Log Topic",syntax_rule:"Syntax Rule",max_result_num:"Maximum result number",search_statement:"Search Statement",time_unit:"Time unit",seconds:"seconds",search_description:"Search for instances according to specific query conditions, and pull the first 20 instances by default","ap-guangzhou":"South China(Guangzhou)","ap-shenzhen-fsi":"South China(Shenzhen Finance)","ap-guangzhou-open":"South China(Guangzhou OPEN)","ap-shenzhen":"South China(Shenzhen)","ap-qingyuan":"South China(Qingyuan)","ap-shanghai":"East China(Shanghai)","ap-shanghai-fsi":"East China(Shanghai Finance)","ap-jinan-ec":"East China(Jinan)","ap-hangzhou-ec":"East China(Hangzhou)","ap-nanjing":"East China(Nanjing)","ap-fuzhou-ec":"East China(Fuzhou)","ap-hefei-ec":"East China(Hefei)","ap-beijing":"North China region(Beijing)","ap-tianjin":"North China region(Tianjin)","ap-beijing-fsi":"North China region(Beijing Finance)","ap-shijiazhuang-ec":"North China region(Shijiazhuang)","ap-wuhan-ec":"Central China(Wuhan)","ap-changsha-ec":"Central China(Changsha)","ap-zhengzhou-ec":"Central China(Zhengzhou)","ap-chengdu":"Southwest China(Chengdu)","ap-chongqing":"Southwest China(Chongqing)","ap-xian-ec":"Northwest region(Xi'an)","ap-shenyang-ec":"Northeast China(Shenyang)","ap-taipei":"Hong Kong, Macau and Taiwan (China)(Taipei, China)","ap-hongkong":"Hong Kong, Macau and Taiwan (China)(Hong Kong, China)","ap-seoul":"Northeast Asia(Seoul)","ap-tokyo":"Northeast Asia(Tokyo)","ap-singapore":"Southeast Asia(Singapore)","ap-bangkok":"Southeast Asia(Bangkok)","ap-jakarta":"Southeast Asia(Jakarta)","na-siliconvalley":"US West(Silicon Valley)","eu-frankfurt":"Europe(Frankfurt)","eu-moscow":"Europe(Northeastern Europe)","ap-mumbai":"South Asia(Mumbai)","na-ashburn":"US East(Virginia)","sa-saopaulo":"South America(São Paulo)","na-toronto":"North America(Toronto)"};n.d(t,"a",(function(){return o})),n.d(t,"d",(function(){return c})),n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return u}));var o,a="zh-CN";!function(e){e.Chinese="zh-CN",e.English="en-US"}(o||(o={}));var c=function(e){return a===o.Chinese?r[e]:i[e]},s=function(e){a=e},u=function(){return a}},function(e,t,n){"use strict";var r=n(0),i=n.n(r),o=n(197),a=n.n(o),c=n(20),s=n(69),u=n.n(s),l=function(){return(l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&-1===t._InstanceAliasValue.indexOf(r[o].timeshift)&&(t._InstanceAliasValue+="_".concat(r[o].timeshift)),t[e]=d.getDimensionsVal(t,p,y),d.checkKeys.length>0&&d.checkKeys.forEach((function(n){t[n]=t[e]})),n[e]={Name:e,Value:t[e]},[2]}}))},d=this,m=0,y=e,v.label=1;case 1:return m0){var r=i.a.cloneDeep(t);return r[n].timeshift="",m(m([],e,!0),[r,t],!1)}return m(m([],e,!0),[t],!1)}),[]).map((function(r){return d(t,void 0,void 0,(function(){var t,o,l,p,d,m,y,h,g,v,b,I,D=this;return f(this,(function(f){switch(f.label){case 0:return t=Object(c.j)(this.templateSrv,e.scopedVars,r[n].instance,!0),[4,s.a.getInstance(this.service)];case 1:o=f.sent(),l=Object(u.c)(r[n].timeshift),t=[].concat(t).map((function(e){var t,n;try{return JSON.parse(e)}catch(r){return o?null!==(n=i.a.cloneDeep(o.find((function(t){return t[D.templateQueryIdMap.instance]===e}))))&&void 0!==n?n:{}:null===(t=D.getDefaultInsObj)||void 0===t?void 0:t.call(D,e)}})),p=Object(c.j)(this.templateSrv,e.scopedVars,r[n].region,!1),d=[],m=0,y=t,f.label=2;case 2:return m=g)return(null==f?void 0:f.response)?f.response(r):r;var v=Object(c.k)(g,(null==o?void 0:o.Limit)||100),b=[];return i.a.forEach(v,(function(r){b.push(n.getInstances(e,p(p({},r),t)))})),Promise.all(b).then((function(e){return i.a.forEach(e,(function(e){r=i.a.concat(r,e)})),(null==f?void 0:f.response)?f.response(r):r})).catch((function(e){return(null==f?void 0:f.response)?f.response(r):r}))}))},e.prototype.isValidConfigField=function(e){return e&&e.length>0},e.prototype.testDatasource=function(){var e=this;return this.isValidConfigField(this.secretId)?Promise.all([this.getRegions(),this.getMetrics(),this.getInstances("ap-guangzhou",{Offset:0,Limit:1})]).then((function(t){var n=i.a.get(t,"[0].Error",{}),r=i.a.get(t,"[1].Error",{}),o=i.a.get(t,"[2].Error",{}),a=i.a.get(n,"Code",""),c=i.a.get(r,"Code",""),s=i.a.get(o,"Code","");if(a||c||s){var u=[];a&&u.push(i.a.get(n,"Code")),c&&u.push(i.a.get(r,"Code")),s&&u.push(i.a.get(o,"Code"));var l=i.a.join(i.a.compact(i.a.uniq(u)),"; ");return{service:e.service,status:"error",message:l}}return{namespace:e.namespace,service:e.service,status:"success",message:"Successfully queried the ".concat(e.service," service."),title:"Success"}})).catch((function(t){var n="".concat(e.service," service:");return n+=t.statusText?t.statusText+"; ":"",i.a.get(t,"data.error.code","")?n+=t.data.error.code+". "+t.data.error.message:i.a.get(t,"data.error","")?n+=t.data.error:i.a.get(t,"data","")?n+=t.data:n+="Cannot connect to ".concat(e.service," service."),{service:e.service,status:"error",message:n}})):{service:this.service,status:"error",message:"The SecretId/SecretKey field is required."}},e.prototype.doRequest=function(e,t,n){return void 0===n&&(n={}),d(this,void 0,void 0,(function(){return f(this,(function(r){switch(r.label){case 0:return[4,Object(c.c)(e,t,n,this.secretId,this.instanceSettings.id,this.backendSrv)];case 1:return e=r.sent(),[2,this.backendSrv.datasourceRequest(e).then((function(e){return i.a.get(e,"data.Response",{})})).catch((function(e){throw e}))]}}))}))},e}()},,function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"d",(function(){return p})),n.d(t,"b",(function(){return d})),n.d(t,"f",(function(){return f})),n.d(t,"e",(function(){return m})),n.d(t,"c",(function(){return y}));var r=n(0),i=n.n(r),o=n(20),a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&(t?r.push({Name:o,Values:i.a.uniq(e).slice(0,5)}):n[o]=i.a.uniq(e)):i.a.isObject(e)?!i.a.isNumber(i.a.get(e,"value",void 0))&&i.a.isEmpty(i.a.get(e,"value",void 0))||(t?r.push({Name:o,Values:i.a.get(e,"value",[]).slice(0,5)}):n[o]=i.a.get(e,"value")):null!=e&&""!==e&&(t?r.push({Name:o,Values:e}):n[o]=e)})),t&&r.length>0)return n.Filters=r,n}return n}function d(e){return i.a.get(i.a.find(o.SERVICES,(function(t){return t.service===e})),"namespace")}function f(e){return e.reduce((function(e,t){var n=t.namespace,r=t.label,i=t.groupName,o=void 0===i?r:i,a=e.find((function(e){return e.label===o}));return a?(a.items.push({label:r,value:n}),e):(e.push({label:o,value:o,items:[{label:r,value:n}]}),e)}),[]).map((function(e){return 1===e.items.length?{label:e.items[0].label,value:e.items[0].value}:e}))}var m=function(e,t,n){try{var r=JSON.parse(e),i=JSON.parse(t);return r[n]===i[n]}catch(n){return e===t}},y=function(e){var t=/^(\d+)([d|h|m|s])$/.exec(e);if(!t)return 0;var n=parseInt(t[1],10);switch(t[2]){case"d":return 86400*n*1e3;case"h":return 3600*n*1e3;case"m":return 60*n*1e3;case"s":return 1e3*n}return 0}},function(e,n){e.exports=t},function(e,t,n){"use strict";n.r(t);var r=n(6),i=n.n(r),o=n(2);t.default=function(e,t){var n,r,a=(n=t,function(){function e(e,t){Object.assign(e,n),e.getDropdown=function(t){var n=Object(o.f)(e.namespace);return e.datasource.getFilterDropdown(n,{field:t,region:e.region})}}return e.$inject=["$scope","$rootScope"],e}());i.a.directive(e,(r=a,function(){return{template:'\n
\n
\n \n
\n
\n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n
\n',controller:r,restrict:"E",scope:{target:"=",showDetail:"=",region:"=",datasource:"=",getDropdownOptions:"&",onChange:"&"}}}))}},function(e,t){e.exports=n},function(e,t,n){"use strict";var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&(t[n]=i.a.uniq(e)):i.a.isObject(e)?!i.a.isNumber(i.a.get(e,"value",void 0))&&i.a.isEmpty(i.a.get(e,"value",void 0))||(t[n]=i.a.get(e,"value")):!i.a.isNumber(e)&&i.a.isEmpty(e)||(t[n]=e)}))),t}var s=["InstanceId","InstanceName"],u=["TopicId","TopicName"],l={instance:"InstanceId",topicId:"TopicId",groupName:"GroupName",partition:"PartitionId"},p=new Proxy({topicId:"TopicId",topicName:"TopicName",consumerGroup:"GroupName",partition:"PartitionId"},{get:function(e,t){return"instanceid"===String(t).toLocaleLowerCase()?"InstanceId":e[t]}}),d={TopicList:"TopicList",GroupList:"GroupList",PartitionList:"PartitionList"},f={TopicId:{dim_KeyInStorage:d.TopicList,dim_KeyInTarget:"topicId",dim_KeyInMap:l.topicId},TopicName:{dim_KeyInStorage:d.TopicList,dim_KeyInTarget:"topicId",dim_KeyInMap:l.topicId},GroupName:{dim_KeyInStorage:d.GroupList,dim_KeyInTarget:"consumerGroup",dim_KeyInMap:l.groupName},PartitionId:{dim_KeyInStorage:d.PartitionList,dim_KeyInTarget:"partition",dim_KeyInMap:l.partition}};t.default=a},function(e,t,n){"use strict";n.r(t),n.d(t,"LOADBALANCEFieldsDescriptor",(function(){return a})),n.d(t,"InstanceAliasList",(function(){return l})),n.d(t,"LOADBALANCEListenerAliasList",(function(){return p})),n.d(t,"LOADBALANCEServerAliasList",(function(){return d})),n.d(t,"LOADBALANCEVALIDDIMENSIONS",(function(){return f})),n.d(t,"templateQueryIdMap",(function(){return y})),n.d(t,"CANDIATEDIMENSIONS",(function(){return m})),n.d(t,"queryMonitorExtraConfg",(function(){return g})),n.d(t,"keyInStorage",(function(){return h})),n.d(t,"queryEditorConfig",(function(){return c})),n.d(t,"namespace",(function(){return i})),n.d(t,"queryEditorName",(function(){return o})),n.d(t,"GetInstanceQueryParams",(function(){return u}));var r=n(5),i="QCE/LOADBALANCE",o="loadBalanceQuery",a=[{key:"Offset",enDescriptor:"Offset",cnDescriptor:"偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项",link:"",type:"inputNumber",min:0},{key:"Limit",enDescriptor:"Limit",cnDescriptor:"单次请求返回的数量,默认为20,最小值为1",link:"",type:"inputNumber",min:1},{key:"LoadBalancerIds",enDescriptor:"LoadBalancer ID",cnDescriptor:"实例ID",link:"",type:"inputMulti"},{key:"LoadBalancerName",enDescriptor:"LoadBalancer Name",cnDescriptor:"实例名称",link:"",type:"input"},{key:"Forward",enDescriptor:"Forward",cnDescriptor:"负载均衡实例类型",link:"",type:"select",list:[{text:"通用的负载均衡",value:1},{text:"传统的负载均衡",value:0}]},{key:"Domain",enDescriptor:"Domain",cnDescriptor:"域名,腾讯云为负载均衡实例分配的域名,本参数仅对传统型公网负载均衡才有意义",link:"",type:"input"},{key:"LoadBalancerVips",enDescriptor:"LoadBalancer Vips",cnDescriptor:"负载均衡实例的 VIP 地址",link:"",type:"inputMulti"},{key:"BackendPrivateIps",enDescriptor:"BackendPrivate Ips",cnDescriptor:"负载均衡绑定的后端服务的内网 IP",link:"",type:"inputMulti"},{key:"BackendPublicIps",enDescriptor:"BackendPublic Ips",cnDescriptor:"负载均衡绑定的后端服务的外网 IP",link:"",type:"inputMulti"},{key:"ProjectId",enDescriptor:"Project ID",cnDescriptor:"负载均衡实例所属的项目 ID",link:"",type:"inputNumber"},{key:"VpcId",enDescriptor:"Vpc ID",cnDescriptor:"负载均衡实例所属私有网络",link:"",type:"input"},{key:"SecurityGroup",enDescriptor:"Security Group",cnDescriptor:"安全组ID",link:"",type:"input"},{key:"MasterZone",enDescriptor:"Master Zone",cnDescriptor:"主可用区ID",link:"",type:"input"},{key:"WithRs",enDescriptor:"WithRs",cnDescriptor:"负载均衡是否绑定后端服务",link:"",type:"select",list:[{text:"没有绑定后端服务",value:0},{text:"绑定后端服务",value:1},{text:"查询全部",value:-1}]},{key:"OrderBy",enDescriptor:"OrderBy",cnDescriptor:"排序字段",link:"",type:"select",list:[{text:"LoadBalancerName",value:"LoadBalancerName"},{text:"CreateTime",value:"CreateTime"},{text:"Domain",value:"Domain"},{text:"LoadBalancerType",value:"LoadBalancerType"}]},{key:"OrderType",enDescriptor:"OrderByType",cnDescriptor:"排序方式",link:"",type:"select",list:[{text:"升序",value:0},{text:"降序",value:1}]}],c={instanceDocUrl:"https://cloud.tencent.com/document/api/214/30685",namespace:i,fieldDescriptor:a},s={region:"",metricName:"",metricUnit:"",period:void 0,dimensionObject:null,instance:"",instanceAlias:"LoadBalancerId",Port:"",Protocol:"",listener:"",servers:"",serverPort:"",queries:{LoadBalancerIds:[],Forward:void 0,LoadBalancerName:"",Domain:"",LoadBalancerVips:[],BackendPublicIps:[],BackendPrivateIps:[],Limit:20,Offset:0,ProjectId:void 0,WithRs:{},VpcId:"",SecurityGroup:"",MasterZone:"",OrderBy:{},OrderType:{}}};function u(e){return void 0===e&&(e={}),Object(r.d)(e,!1)}var l=["LoadBalancerId","LoadBalancerName","LoadBalancerVips"],p=["ListenerId","ListenerName","Port"],d=["PrivateIpAddresses","InstanceId"],f={vip:"LoadBalancerVips",loadBalancerPort:"Port",protocol:"Protocol",lanIp:"PrivateIpAddresses",port:"ServerPort"},m={LoadBalancerVips:"AddressIPv6"},y={instance:"LoadBalancerId",listener:"ListenerId",servers:"PrivateIpAddresses",port:"Port"},h={listener:"ListenerList",servers:"ServersList"},g={Port:{dim_KeyInStorage:h.listener,dim_KeyInTarget:"listener",dim_KeyInMap:y.listener},Protocol:{dim_KeyInStorage:h.listener,dim_KeyInTarget:"listener",dim_KeyInMap:y.listener},PrivateIpAddresses:{dim_KeyInStorage:h.servers,dim_KeyInTarget:"servers",dim_KeyInMap:y.servers},ServerPort:{dim_KeyInStorage:h.servers,dim_KeyInTarget:"serverPort",dim_KeyInIns:"Port",dim_KeyInMap:y.port}};t.default=s},function(e,t,n){"use strict";n.r(t),n.d(t,"TDMQFilterFieldsDescriptor",(function(){return p})),n.d(t,"templateQueryIdMap",(function(){return l})),n.d(t,"TDMQInstanceAliasList",(function(){return u})),n.d(t,"TDMQInvalidDemensions",(function(){return s})),n.d(t,"namespace",(function(){return a})),n.d(t,"queryEditorName",(function(){return c})),n.d(t,"queryMonitorExtraConfg",(function(){return g})),n.d(t,"keyInStorage",(function(){return h})),n.d(t,"modifyDimensons",(function(){return y})),n.d(t,"regionSupported",(function(){return m})),n.d(t,"TDMQGetInstanceQueryParams",(function(){return f}));var r=n(5),i=n(0),o=n.n(i),a="QCE/TDMQ",c="tdmqQuery",s={tenantId:"ClusterId",tenant:"ClusterId",topicName:"TopicName",environmentId:"EnvironmentId"},u=["ClusterId","ClusterName"],l={instance:"ClusterId",topicName:"TopicName",environmentId:"EnvironmentId"},p=[{key:"Offset",enDescriptor:"Offset",cnDescriptor:"偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项",link:"",type:"inputNumber",min:0},{key:"Limit",enDescriptor:"Limit",cnDescriptor:"单次请求返回的数量,默认为20,最小值为1,最大值为100",link:"",type:"inputNumber",min:1,max:100}],d={region:"",metricName:"",metricUnit:"",period:void 0,dimensionObject:null,instance:"",instanceAlias:"ClusterId",topicName:"",environmentId:"",queries:{Limit:20,Offset:0}};function f(e){return void 0===e&&(e={}),Object(r.d)(e,!0)}var m=[{value:"ap-beijing"},{value:"ap-chengdu"},{value:"ap-chongqing"},{value:"ap-guangzhou"},{value:"ap-shenzhen-fsi"},{value:"ap-shanghai"},{value:"ap-shanghai-fsi"},{value:"ap-nanjing"},{value:"ap-hongkong"},{value:"ap-tokyo"},{value:"ap-seoul"},{value:"ap-singapore"},{value:"ap-bangkok"},{value:"ap-jakarta"},{value:"ap-mumbai"},{value:"eu-frankfurt"},{value:"eu-moscow"},{value:"na-ashburn"},{value:"na-siliconvalley"},{value:"na-toronto"}];function y(e){var t=o.a.cloneDeep(e);return t.Dimensions.forEach((function(e){-1!==e.Dimensions.indexOf("topicName")&&-1===e.Dimensions.indexOf("environmentId")&&e.Dimensions.push("environmentId")})),t}var h={topicName:"topicName",environmentId:"environmentId"},g={TopicName:{dim_KeyInStorage:h.topicName,dim_KeyInTarget:"topicName",dim_KeyInMap:l.topicName},EnvironmentId:{dim_KeyInStorage:h.environmentId,dim_KeyInTarget:"environmentId",dim_KeyInMap:l.environmentId}};t.default=d},,function(e,t,n){"use strict";n.r(t),n.d(t,"GSEFilterFieldsDescriptor",(function(){return m})),n.d(t,"templateQueryIdMap",(function(){return p})),n.d(t,"GSEInstanceAliasList",(function(){return l})),n.d(t,"GSEInvalidDemensions",(function(){return u})),n.d(t,"namespace",(function(){return a})),n.d(t,"queryEditorName",(function(){return s})),n.d(t,"queryEditorConfig",(function(){return y})),n.d(t,"regionSupported",(function(){return v})),n.d(t,"modifyDimensons",(function(){return b})),n.d(t,"queryMonitorExtraConfg",(function(){return f})),n.d(t,"fleetId",(function(){return c})),n.d(t,"keyInStorage",(function(){return d})),n.d(t,"GSEGetInstanceQueryParams",(function(){return g}));var r=n(5),i=n(0),o=n.n(i),a="QCE/GSE",c="FleetId",s="gseQuery",u={instanceid:"InstanceId",fleetid:"FleetId",queuename:"Name"},l=["InstanceId","PrivateIpAddress","IpAddress"],p={instance:"InstanceId",Name:"Name",FleetId:c},d={fleet:"fleet",queue:"queueName"},f={FleetId:{dim_KeyInStorage:d.fleet,dim_KeyInTarget:"FleetId",dim_KeyInMap:p.FleetId},Name:{dim_KeyInStorage:d.queue,dim_KeyInTarget:"Name",dim_KeyInMap:p.Name}},m=[{key:"Offset",enDescriptor:"Offset",cnDescriptor:"偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项",link:"",type:"inputNumber",min:0},{key:"Limit",enDescriptor:"Limit",cnDescriptor:"单次请求返回的数量,默认为20,最小值为1,最大值为100",link:"",type:"inputNumber",min:1,max:100},{key:"InstanceId",enDescriptor:"resourceName",cnDescriptor:"资源名称",link:"",type:"input"},{key:"FleetId",enDescriptor:"tagKey",cnDescriptor:"标签键",link:"",type:"input"}],y={instanceDocUrl:"https://cloud.tencent.com/document/api/1165/42604",namespace:a,fieldDescriptor:m},h={region:"",metricName:"",metricUnit:"",period:void 0,dimensionObject:null,instance:"",instanceAlias:"InstanceId",FleetId:"",Name:"",queries:{Limit:20,Offset:0,InstanceId:"",FleetId:""}};function g(e){return void 0===e&&(e={}),Object(r.d)(e,!0)}var v=[{value:"ap-bangkok"},{value:"ap-beijing"},{value:"ap-chengdu"},{value:"ap-guangzhou"},{value:"ap-hongkong"},{value:"ap-mumbai"},{value:"ap-seoul"},{value:"ap-nanjing"},{value:"ap-shanghai"},{value:"ap-singapore"},{value:"ap-tokyo"},{value:"eu-frankfurt"},{value:"na-ashburn"},{value:"na-siliconvalley"}];function b(e){var t=o.a.cloneDeep(e);return t.Dimensions.forEach((function(e){e.Dimensions=e.Dimensions.map((function(e){return u[e]||e}))})),t}t.default=h},function(e,t,n){"use strict";n.r(t),n.d(t,"DCDBFilterFieldsDescriptor",(function(){return l})),n.d(t,"templateQueryIdMap",(function(){return u})),n.d(t,"DCDBInstanceAliasList",(function(){return s})),n.d(t,"DCDBInvalidDemensions",(function(){return c})),n.d(t,"namespace",(function(){return o})),n.d(t,"queryEditorName",(function(){return a})),n.d(t,"queryEditorConfig",(function(){return p})),n.d(t,"regionSupported",(function(){return v})),n.d(t,"keyInStorage",(function(){return h})),n.d(t,"modifyDimensons",(function(){return m})),n.d(t,"queryMonitorExtraConfg",(function(){return g})),n.d(t,"DCDBGetInstanceQueryParams",(function(){return y}));var r=n(0),i=n(5),o="QCE/TDMYSQL",a="dcdbQuery",c={nodeid:"NodeId",instanceid:"InstanceId",shardid:"ShardInstanceId",ShardId:"ShardInstanceId"},s=["InstanceId","InstanceName"],u={instance:"InstanceId",NodeId:"NodeId",ShardInstanceId:"ShardInstanceId"},l=[{key:"Offset",enDescriptor:"Offset",cnDescriptor:"偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项",link:"",type:"inputNumber",min:0},{key:"Limit",enDescriptor:"Limit",cnDescriptor:"单次请求返回的数量,默认为20,最小值为1,最大值为100",link:"",type:"inputNumber",min:1,max:100},{key:"InstanceIds",enDescriptor:"InstanceIds",cnDescriptor:"实例 ID 查询",link:"",type:"inputMulti"},{key:"SearchName",enDescriptor:"SearchName",cnDescriptor:"搜索的字段名,当前支持的值有:instancename、vip、all",link:"",type:"input"},{key:"SearchKey",enDescriptor:"SearchKey",cnDescriptor:"搜索的关键字",link:"",type:"input"},{key:"ProjectIds",enDescriptor:"ProjectIds",cnDescriptor:"按项目 ID 查询",link:"",type:"inputNumberMulti"},{key:"VpcId",enDescriptor:"VpcId",cnDescriptor:"私有网络 ID",link:"",type:"input"},{key:"SubnetId",enDescriptor:"SubnetId",cnDescriptor:"私有网络的子网 ID",link:"",type:"input"},{key:"OrderBy",enDescriptor:"OrderBy",cnDescriptor:"排序字段",link:"",type:"select",list:[{text:"projectId",value:"projectId"},{text:"createtime",value:"createtime"},{text:"instancename",value:"instancename"}]},{key:"OrderByType",enDescriptor:"OrderByType",cnDescriptor:"私有网络 ID",link:"",type:"select",list:[{text:"desc",value:"desc"},{text:"asc",value:"asc"}]},{key:"ExclusterType",enDescriptor:"ExclusterType",cnDescriptor:"集群类型",link:"",type:"select",list:[{text:"非独享集群",value:1},{text:"独享集群",value:2},{text:"全部",value:0},{text:"asc",value:"asc"}]},{key:"ExclusterIds",enDescriptor:"ExclusterIds",cnDescriptor:"独享集群ID",link:"",type:"inputMulti"},{key:"FilterInstanceType",enDescriptor:"FilterInstanceType",cnDescriptor:"实例类型过滤",link:"",type:"select",multiple:!0,list:[{text:"独享实例",value:1},{text:"主实例",value:2},{text:"灾备实例",value:3}]}],p={instanceDocUrl:"https://cloud.tencent.com/document/api/557/16140",namespace:o,fieldDescriptor:l},d={region:"",metricName:"",metricUnit:"",period:void 0,dimensionObject:null,instance:"",instanceAlias:"InstanceId",ShardId:"",NodeId:"",queries:{Limit:20,Offset:0,InstanceIds:[],SearchName:"",SearchKey:"",ProjectIds:[],VpcId:"",SubnetId:"",OrderBy:{},OrderByType:{},ExclusterType:{},ExclusterIds:[],FilterInstanceType:{}}},f={shardid:"ShardId",instanceid:"InstanceId",nodeid:"NodeId"};function m(e){var t=Object(r.cloneDeep)(e);return t.Dimensions.forEach((function(e){e.Dimensions=e.Dimensions.map((function(e){return f[e]||e}))})),t}function y(e){void 0===e&&(e={});var t=Object(i.d)(e,!1);return t.IsFilterVpc=!1,t.IsFilterExcluster=!1,(t.VpcId||t.SubnetId)&&(t.IsFilterVpc=!0),t.ExclusterType&&(t.IsFilterExcluster=!0),Object(r.isArray)(t.FilterInstanceType)&&(t.FilterInstanceType=t.FilterInstanceType.join(",")),t}var h={NodeId:"NodeId",ShardInstanceId:"ShardId"},g={NodeId:{dim_KeyInStorage:h.NodeId,dim_KeyInTarget:"NodeId",dim_KeyInMap:u.NodeId},ShardInstanceId:{dim_KeyInStorage:h.ShardInstanceId,dim_KeyInTarget:"ShardId",dim_KeyInMap:u.ShardInstanceId}},v=[{text:"华北地区(北京)",value:"ap-beijing"},{text:"西南地区(成都)",value:"ap-chengdu"},{text:"西南地区(重庆)",value:"ap-chongqing"},{text:"华南地区(广州)",value:"ap-guangzhou"},{text:"港澳台地区(中国香港)",value:"ap-hongkong"},{text:"亚太南部(孟买)",value:"ap-mumbai"},{text:"华东地区(南京)",value:"ap-nanjing"},{text:"华东地区(上海)",value:"ap-shanghai"},{text:"华东地区(上海金融)",value:"ap-shanghai-fsi"},{text:"华南地区(深圳金融)",value:"ap-shenzhen-fsi"},{text:"亚太东南(新加坡)",value:"ap-singapore"},{text:"亚太东北(东京)",value:"ap-tokyo"},{text:"欧洲地区(法兰克福)",value:"eu-frankfurt"},{text:"美国东部(弗吉尼亚)",value:"na-ashburn"},{text:"美国西部(硅谷)",value:"na-siliconvalley"},{text:"北美地区(多伦多)",value:"na-toronto"}];t.default=d},function(e,t,n){"use strict";n.r(t),n.d(t,"RedisMemFieldsDescriptor",(function(){return c})),n.d(t,"RedisMemInvalidDemensions",(function(){return p})),n.d(t,"REDISMEMInstanceAliasList",(function(){return l})),n.d(t,"templateQueryIdMap",(function(){return d})),n.d(t,"namespace",(function(){return a})),n.d(t,"NodeType",(function(){return f})),n.d(t,"REDISMEMGetInstanceQueryParams",(function(){return u}));var r=n(0),i=n.n(r),o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&(t[n]=i.a.uniq(e)):i.a.isObject(e)?!i.a.isNumber(i.a.get(e,"value",void 0))&&i.a.isEmpty(i.a.get(e,"value",void 0))||(t[n]=i.a.get(e,"value")):!i.a.isNumber(e)&&i.a.isEmpty(e)||(t[n]=e)}))),t}var l=["InstanceId","InstanceName","WanIp"],p={instanceid:"InstanceId",rnodeid:"rnodeid",pnodeid:"pnodeid"},d={instance:"InstanceId",rnodeid:"rnodeid",pnodeid:"pnodeid"},f=["Redis","Proxy"];t.default=s},function(e,t,n){"use strict";n.r(t),n.d(t,"TDMQFilterFieldsDescriptor",(function(){return u})),n.d(t,"templateQueryIdMap",(function(){return s})),n.d(t,"TDMQRABBITMQInstanceAliasList",(function(){return c})),n.d(t,"TDMQInvalidDemensions",(function(){return a})),n.d(t,"namespace",(function(){return i})),n.d(t,"queryEditorName",(function(){return o})),n.d(t,"queryMonitorExtraConfg",(function(){return m})),n.d(t,"keyInStorage",(function(){return f})),n.d(t,"regionSupported",(function(){return d})),n.d(t,"TDMQGetInstanceQueryParams",(function(){return p}));var r=n(5),i="QCE/RABBITMQ",o="tdmqQuery",a={instanceid:"InstanceId",node:"NodeName"},c=["InstanceId","InstanceName"],s={instance:"InstanceId",node:"NodeName"},u=[{key:"Offset",enDescriptor:"Offset",cnDescriptor:"偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项",link:"",type:"inputNumber",min:0},{key:"Limit",enDescriptor:"Limit",cnDescriptor:"单次请求返回的数量,默认为20,最小值为1,最大值为100",link:"",type:"inputNumber",min:1,max:100}],l={region:"",metricName:"",metricUnit:"",period:void 0,dimensionObject:null,instance:"",instanceAlias:"InstanceId",node:"",queries:{Limit:20,Offset:0}};function p(e){return void 0===e&&(e={}),Object(r.d)(e,!0)}var d=[{value:"ap-beijing"},{value:"ap-chengdu"},{value:"ap-chongqing"},{value:"ap-guangzhou"},{value:"ap-shenzhen-fsi"},{value:"ap-shanghai"},{value:"ap-shanghai-fsi"},{value:"ap-nanjing"},{value:"ap-hongkong"},{value:"ap-tokyo"},{value:"ap-seoul"},{value:"ap-singapore"},{value:"ap-bangkok"},{value:"ap-jakarta"},{value:"ap-mumbai"},{value:"eu-frankfurt"},{value:"eu-moscow"},{value:"na-ashburn"},{value:"na-siliconvalley"},{value:"na-toronto"}],f={node:"NodeName"},m={NodeName:{dim_KeyInStorage:f.node,dim_KeyInTarget:"node",dim_KeyInMap:s.node}};t.default=l},function(e,t,n){"use strict";n.r(t),n.d(t,"TDMQFilterFieldsDescriptor",(function(){return u})),n.d(t,"templateQueryIdMap",(function(){return s})),n.d(t,"TDMQROCKETMQInstanceAliasList",(function(){return c})),n.d(t,"TDMQInvalidDemensions",(function(){return a})),n.d(t,"namespace",(function(){return o})),n.d(t,"queryMonitorExtraConfg",(function(){return m})),n.d(t,"keyInStorage",(function(){return f})),n.d(t,"regionSupported",(function(){return d})),n.d(t,"TDMQROCKETMQGetInstanceQueryParams",(function(){return p}));var r=n(0),i=n.n(r),o="QCE/ROCKETMQ",a={tenant:"ClusterId",namespace:"NamespaceId",group:"Name"},c=["ClusterId","ClusterName"],s={instance:"ClusterId",namespace:"NamespaceId",group:"Name"},u=[{key:"includeVip",enDescriptor:"includeVip",cnDescriptor:"包含专享集群",link:"",type:"select",list:[{text:"是",value:"true"},{text:"否",value:"false"}]}],l={region:"",metricName:"",metricUnit:"",period:void 0,dimensionObject:null,instance:"",instanceAlias:"ClusterId",namespace:"",group:"",queries:{Limit:20,Offset:0,instanceIdsChecked:!1,filtersChecked:!0,ClusterIdList:[""],Filters:{includeVip:{text:"是",value:"true"}}}};function p(e){void 0===e&&(e={});var t={};if(!i.a.isEmpty(e))if(t.Limit=i.a.get(e,"Limit",20)||20,t.Offset=i.a.get(e,"Offset",0)||0,e.instanceIdsChecked){if(i.a.isArray(e.ClusterIdList)){var n=i.a.compact(e.ClusterIdList);i.a.uniq(n).length>0&&(t.ClusterIdList=i.a.uniq(n).slice(0,100))}}else if(e.filtersChecked){var r=[];i.a.forEach(e.Filters,(function(e,t){r.length>9||(i.a.isArray(e)?(e=i.a.compact(e)).length>0&&r.push({Name:t,Values:i.a.uniq(e).slice(0,5)}):i.a.isObject(e)&&(i.a.isEmpty(i.a.get(e,"value",[]))||r.push({Name:t,Values:[i.a.get(e,"value",[])].slice(0,5)})))})),r.length>0&&(t.Filters=r)}return t}var d=[{value:"ap-beijing"},{value:"ap-chengdu"},{value:"ap-chongqing"},{value:"ap-guangzhou"},{value:"ap-shenzhen-fsi"},{value:"ap-shanghai"},{value:"ap-shanghai-fsi"},{value:"ap-nanjing"},{value:"ap-hongkong"},{value:"ap-tokyo"},{value:"ap-seoul"},{value:"ap-singapore"},{value:"ap-bangkok"},{value:"ap-jakarta"},{value:"ap-mumbai"},{value:"eu-frankfurt"},{value:"eu-moscow"},{value:"na-ashburn"},{value:"na-siliconvalley"},{value:"na-toronto"}],f={namespace:"NamespaceId",group:"Name"},m={NamespaceId:{dim_KeyInStorage:f.namespace,dim_KeyInTarget:"namespace",dim_KeyInMap:s.namespace},Name:{dim_KeyInStorage:f.group,dim_KeyInTarget:"group",dim_KeyInMap:s.group}};t.default=l},function(e,t,n){"use strict";n.r(t),n.d(t,"InitServiceState",(function(){return c})),n.d(t,"SERVICES",(function(){return o})),n.d(t,"Datasources",(function(){return a})),n.d(t,"InstanceAliasList",(function(){return s})),n.d(t,"GetInstanceQueryParams",(function(){return u}));var r=n(1),i=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i0&&(t[n]=i.a.uniq(e)):i.a.isObject(e)?!i.a.isNumber(i.a.get(e,"value",void 0))&&i.a.isEmpty(i.a.get(e,"value",void 0))||(t[n]=i.a.get(e,"value")):!i.a.isNumber(e)&&i.a.isEmpty(e)||(t[n]=e)}))),t}var c=new Proxy({},{get:function(e,t,n){if("string"==typeof t){if(t.startsWith("id4"))return"ClusterId";if(t.startsWith("host4"))return"Ip"}return Reflect.get(e,t,n)},has:function(e,t){return!0}}),s={instance:"ClusterId",node:"Ip"},u={node:"nodeIP"},l={Ip:{dim_KeyInStorage:u.node,dim_KeyInTarget:"nodeIP",dim_KeyInMap:s.node}},p=["ClusterId","ClusterName"];t.default={region:"",metricName:"",metricUnit:"",period:void 0,dimensionObject:null,instance:"",instanceAlias:"ClusterId",nodeIP:"",queries:{Offset:0,Limit:10,DisplayStrategy:"",OrderBy:{},Order:{},InstanceIds:[],ProjectId:-1,OrderField:"",Asc:""}}},function(e,t,n){"use strict";n.r(t),n.d(t,"VCLBFilterFieldsDescriptor",(function(){return p})),n.d(t,"templateQueryIdMap",(function(){return l})),n.d(t,"VCLBInstanceAliasList",(function(){return u})),n.d(t,"VCLBInvalidDemensions",(function(){return s})),n.d(t,"namespace",(function(){return a})),n.d(t,"queryEditorName",(function(){return c})),n.d(t,"queryEditorConfig",(function(){return d})),n.d(t,"clbNamespaceMap",(function(){return h})),n.d(t,"modifyDimensons",(function(){return g})),n.d(t,"regionSupported",(function(){return y})),n.d(t,"BMLBGetInstanceQueryParams",(function(){return m}));var r=n(5),i=n(0),o=n.n(i),a="QCE/V_CLB",c="vClbQuery",s={InstanceId:"LoadBalancerId"},u=["LoadBalancerId","LoadBalancerVips","LoadBalancerName"],l={instance:"LoadBalancerId"},p=[{key:"Offset",enDescriptor:"Offset",cnDescriptor:"偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项",link:"",type:"inputNumber",min:0},{key:"Limit",enDescriptor:"Limit",cnDescriptor:"单次请求返回的数量,默认为20,最小值为1",link:"",type:"inputNumber",min:1},{key:"LoadBalancerIds",enDescriptor:"LoadBalancer ID",cnDescriptor:"实例ID",link:"",type:"inputMulti"},{key:"LoadBalancerName",enDescriptor:"LoadBalancer Name",cnDescriptor:"实例名称",link:"",type:"input"},{key:"Forward",enDescriptor:"Forward",cnDescriptor:"负载均衡实例类型",link:"",type:"select",list:[{text:"通用的负载均衡",value:1},{text:"传统的负载均衡",value:0}]},{key:"Domain",enDescriptor:"Domain",cnDescriptor:"域名,腾讯云为负载均衡实例分配的域名,本参数仅对传统型公网负载均衡才有意义",link:"",type:"input"},{key:"LoadBalancerVips",enDescriptor:"LoadBalancer Vips",cnDescriptor:"负载均衡实例的 VIP 地址",link:"",type:"inputMulti"},{key:"BackendPrivateIps",enDescriptor:"BackendPrivate Ips",cnDescriptor:"负载均衡绑定的后端服务的内网 IP",link:"",type:"inputMulti"},{key:"BackendPublicIps",enDescriptor:"BackendPublic Ips",cnDescriptor:"负载均衡绑定的后端服务的外网 IP",link:"",type:"inputMulti"},{key:"ProjectId",enDescriptor:"Project ID",cnDescriptor:"负载均衡实例所属的项目 ID",link:"",type:"inputNumber"},{key:"VpcId",enDescriptor:"Vpc ID",cnDescriptor:"负载均衡实例所属私有网络",link:"",type:"input"},{key:"SecurityGroup",enDescriptor:"Security Group",cnDescriptor:"安全组ID",link:"",type:"input"},{key:"MasterZone",enDescriptor:"Master Zone",cnDescriptor:"主可用区ID",link:"",type:"input"},{key:"WithRs",enDescriptor:"WithRs",cnDescriptor:"负载均衡是否绑定后端服务",link:"",type:"select",list:[{text:"没有绑定后端服务",value:0},{text:"绑定后端服务",value:1},{text:"查询全部",value:-1}]},{key:"OrderBy",enDescriptor:"OrderBy",cnDescriptor:"排序字段",link:"",type:"select",list:[{text:"LoadBalancerName",value:"LoadBalancerName"},{text:"CreateTime",value:"CreateTime"},{text:"Domain",value:"Domain"},{text:"LoadBalancerType",value:"LoadBalancerType"}]},{key:"OrderType",enDescriptor:"OrderByType",cnDescriptor:"排序方式",link:"",type:"select",list:[{text:"升序",value:0},{text:"降序",value:1}]}],d={instanceDocUrl:"https://cloud.tencent.com/document/api/214/30685",namespace:a,fieldDescriptor:p},f={region:"",metricName:"",metricUnit:"",period:void 0,dimensionObject:null,instance:"",instanceAlias:"LoadBalancerId",Port:"",Protocol:"",listener:"",queries:{LoadBalancerIds:[],Forward:void 0,LoadBalancerName:"",Domain:"",LoadBalancerVips:[],BackendPublicIps:[],BackendPrivateIps:[],Limit:20,Offset:0,ProjectId:void 0,WithRs:{},VpcId:"",SecurityGroup:"",MasterZone:"",OrderBy:{},OrderType:{}}};function m(e){return void 0===e&&(e={}),Object(r.d)(e,!1)}var y=[{value:"ap-bangkok"},{value:"ap-beijing"},{value:"ap-chengdu"},{value:"ap-chongqing"},{value:"ap-guangzhou"},{value:"ap-hongkong"},{value:"ap-jakarta"},{value:"ap-mumbai"},{value:"ap-seoul"},{value:"ap-nanjing"},{value:"ap-shanghai"},{value:"ap-shanghai-fsi"},{value:"ap-shenzhen-fsi"},{value:"ap-singapore"},{value:"ap-tokyo"},{value:"eu-frankfurt"},{value:"eu-moscow"},{value:"na-ashburn"},{value:"na-siliconvalley"},{value:"na-toronto"}],h={public:"QCE/LB_PUBLIC",private:"QCE/LB_PRIVATE"};function g(e){var t=o.a.cloneDeep(e);return t.Dimensions.forEach((function(e){e.Dimensions=["InstanceId"]})),t}t.default=f},,function(e,t,n){"use strict";n.r(t),n.d(t,"cynosdbMysqlFilterFieldsDescriptor",(function(){return s})),n.d(t,"templateQueryIdMap",(function(){return m})),n.d(t,"CYNOSDBMYSQLInstanceAliasList",(function(){return f})),n.d(t,"CYNOSDBInvalidDemensions",(function(){return y})),n.d(t,"namespace",(function(){return a})),n.d(t,"queryEditorName",(function(){return c})),n.d(t,"queryEditorConfig",(function(){return l})),n.d(t,"regionSupported",(function(){return u})),n.d(t,"modifyDimensons",(function(){return g})),n.d(t,"checkKeys",(function(){return h})),n.d(t,"CYNOSDBMYSQLGetInstanceQueryParams",(function(){return d}));var r=n(0),i=n.n(r),o=n(5),a="QCE/CYNOSDB_MYSQL",c="cynosdbMysqlQuery",s=[{key:"Offset",enDescriptor:"Offset",cnDescriptor:"偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项",link:"",type:"inputNumber",min:0},{key:"Limit",enDescriptor:"Limit",cnDescriptor:"单次请求返回的数量,默认为20,最小值为1,最大值为100",link:"",type:"inputNumber",min:1,max:1e3},{key:"InstanceIds",enDescriptor:"InstanceIds",cnDescriptor:"实例id列表",link:"",type:"inputMulti"},{key:"OrderBy",enDescriptor:"OrderBy",cnDescriptor:"排序字段",link:"",type:"select",list:[{text:"创建时间",value:"CREATETIME"},{text:"过期时间",value:"PERIODENDTIME"}]},{key:"OrderByType",enDescriptor:"OrderByType",cnDescriptor:"排序类型",link:"",type:"select",list:[{text:"升序",value:"ASC"},{text:"降序",value:"DESC"}]},{key:"DbType",enDescriptor:"DbType",cnDescriptor:"引擎类型",link:"",type:"select",list:[{text:"MYSQL",value:"MYSQL"},{text:"POSTGRESQL",value:"POSTGRESQL"}]}],u=[{value:"ap-beijing"},{value:"ap-guangzhou"},{value:"ap-nanjing"},{value:"ap-shanghai"}],l={instanceDocUrl:"https://cloud.tencent.com/document/api/1003/48334",namespace:a,fieldDescriptor:s},p={region:"",metricName:"",metricUnit:"",period:void 0,dimensionObject:null,instance:"",instanceAlias:"InstanceId",queries:{Limit:20,Offset:0,OrderBy:{},OrderByType:{},InstanceIds:[],DbType:{}}};function d(e){return void 0===e&&(e={}),Object(o.d)(e,!1)}var f=["InstanceId","InstanceName"],m={instance:"InstanceId"},y={instanceid:"InstanceId",instanceId:"InstanceId"},h=["instanceId"];function g(e){var t=i.a.cloneDeep(e);return t.Dimensions.forEach((function(e){e.Dimensions=["InstanceId"]})),t}t.default=p},function(e,t,n){"use strict";n.r(t),n.d(t,"SCFQueryDescriptor",(function(){return o})),n.d(t,"SCFInstanceAliasList",(function(){return s})),n.d(t,"SCFInvalidDemensions",(function(){return u})),n.d(t,"queryMonitorExtraConfg",(function(){return f})),n.d(t,"regionSupported",(function(){return p})),n.d(t,"templateQueryIdMap",(function(){return l})),n.d(t,"keyInStorage",(function(){return d})),n.d(t,"SCFGetInstanceQueryParams",(function(){return c})),n.d(t,"SCFDefaultDimensionList",(function(){return m}));var r=n(0),i=n.n(r),o=[{key:"Offset",enDescriptor:"Offset",cnDescriptor:"偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项",link:"",type:"inputnumber",min:0},{key:"Limit",enDescriptor:"Limit",cnDescriptor:"单次请求返回的数量,默认为20,最小值为1,最大值为100",link:"",type:"inputnumber",min:1,max:100},{key:"SearchKey",enDescriptor:"SearchKey",cnDescriptor:"支持FunctionName模糊匹配",link:"",type:"input"},{key:"Namespace",enDescriptor:"Namespace",cnDescriptor:"云函数命名空间",link:"",type:"input"},{key:"Description",enDescriptor:"Description",cnDescriptor:"函数描述,支持模糊搜索",link:"",type:"input"},{key:"OrderBy",enDescriptor:"OrderBy",cnDescriptor:"排序字段",link:"",type:"select",list:[{text:"AddTime",value:"AddTime"},{text:"ModTime",value:"ModTime"},{text:"FunctionName",value:"FunctionName"}]},{key:"Order",enDescriptor:"Order Direction",cnDescriptor:"排序方式",link:"",type:"select",list:[{text:"ASC",value:"ASC"},{text:"DESC",value:"DESC"}]}],a={region:"",metricName:"",metricUnit:"",period:void 0,dimensionObject:null,instance:"",instanceAlias:"FunctionName",version:"",queries:{Offset:0,Limit:20,OrderBy:{},Order:{},SearchKey:"",Namespace:"",Description:""}};function c(e){void 0===e&&(e={});var t={};return i.a.isEmpty(e)||(t.Limit=i.a.get(e,"Limit",20)||20,t.Offset=i.a.get(e,"Offset",0)||0,e=i.a.omit(e,["Offset","Limit"]),i.a.forEach(e,(function(e,n){i.a.isArray(e)?(e=i.a.compact(e)).length>0&&(t[n]=i.a.uniq(e)):i.a.isObject(e)?!i.a.isNumber(i.a.get(e,"value",void 0))&&i.a.isEmpty(i.a.get(e,"value",void 0))||(t[n]=i.a.get(e,"value")):!i.a.isNumber(e)&&i.a.isEmpty(e)||(t[n]=e)}))),t}var s=["FunctionId","FunctionName"],u={functionName:"FunctionName",namespace:"Namespace",version:"Version"},l={instance:"FunctionName",version:"Version"},p=[{value:"ap-beijing"},{value:"ap-chengdu"},{value:"ap-chongqing"},{value:"ap-guangzhou"},{value:"ap-hongkong"},{value:"ap-mumbai"},{value:"ap-shanghai"},{value:"ap-shanghai-fsi"},{value:"ap-shenzhen-fsi"},{value:"ap-singapore"},{value:"ap-tokyo"},{value:"eu-frankfurt"},{value:"na-siliconvalley"},{value:"na-toronto"}],d={version:"version"},f={Version:{dim_KeyInStorage:d.version,dim_KeyInTarget:"version",dim_KeyInMap:l.version}};t.default=a;var m=["functionName","namespace","version"]},function(e,t,n){"use strict";n.r(t),n.d(t,"CLSFilterFieldsDescriptor",(function(){return p})),n.d(t,"templateQueryIdMap",(function(){return l})),n.d(t,"CLSInstanceAliasList",(function(){return u})),n.d(t,"CLSInvalidDemensions",(function(){return s})),n.d(t,"namespace",(function(){return a})),n.d(t,"queryEditorName",(function(){return c})),n.d(t,"queryEditorConfig",(function(){return d})),n.d(t,"regionSupported",(function(){return y})),n.d(t,"modifyDimensons",(function(){return h})),n.d(t,"CLSGetInstanceQueryParams",(function(){return m}));var r=n(5),i=n(0),o=n.n(i),a="QCE/CLS",c="clsQuery",s={},u=["TopicId","TopicName"],l={instance:"TopicId"},p=[{key:"Offset",enDescriptor:"Offset",cnDescriptor:"偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项",link:"",type:"inputNumber",min:0},{key:"Limit",enDescriptor:"Limit",cnDescriptor:"单次请求返回的数量,默认为20,最小值为1,最大值为100",link:"",type:"inputNumber",min:1,max:100},{key:"topicName",enDescriptor:"topicName",cnDescriptor:"日志主题名称",link:"",type:"inputMulti"},{key:"topicId",enDescriptor:"topicId",cnDescriptor:"日志主题ID",link:"",type:"inputMulti"},{key:"logsetName",enDescriptor:"logsetName",cnDescriptor:"日志集名称",link:"",type:"inputMulti"},{key:"logsetId",enDescriptor:"logsetId",cnDescriptor:"日志集ID",link:"",type:"inputMulti"},{key:"tagKey",enDescriptor:"tagKey",cnDescriptor:"标签键",link:"",type:"inputMulti"},{key:"tag:tagKey",enDescriptor:"tag - tagKey",cnDescriptor:"标签键值对",link:"",type:"inputMulti"},{key:"storageType",enDescriptor:"storageType",cnDescriptor:"日志主题的存储类型",link:"",type:"select",list:[{text:"实时存储",value:"hot"},{text:"离线存储",value:"cold"}]}],d={instanceDocUrl:"https://cloud.tencent.com/document/api/614/56454",namespace:a,fieldDescriptor:p},f={region:"",metricName:"",metricUnit:"",period:void 0,dimensionObject:null,instance:"",instanceAlias:"TopicId",uin:"",queries:{Limit:20,Offset:0,topicName:[],topicId:[],logsetName:[],logsetId:[],tagKey:[],"tag:tagKey":[],storageType:{}}};function m(e){return void 0===e&&(e={}),Object(r.d)(e,!0)}var y=[{value:"ap-bangkok"},{value:"ap-beijing"},{value:"ap-chengdu"},{value:"ap-chongqing"},{value:"ap-guangzhou"},{value:"ap-hongkong"},{value:"ap-jakarta"},{value:"ap-mumbai"},{value:"ap-seoul"},{value:"ap-nanjing"},{value:"ap-shanghai"},{value:"ap-shanghai-fsi"},{value:"ap-shenzhen-fsi"},{value:"ap-singapore"},{value:"ap-tokyo"},{value:"eu-frankfurt"},{value:"eu-moscow"},{value:"na-ashburn"},{value:"na-siliconvalley"},{value:"na-toronto"}];function h(e){var t=o.a.cloneDeep(e);return t.Dimensions.forEach((function(e){e.Dimensions=["uin","TopicId"]})),t}t.default=f},function(e,t,n){"use strict";n.r(t),n.d(t,"SQLSERVERNETFilterFieldsDescriptor",(function(){return p})),n.d(t,"templateQueryIdMap",(function(){return l})),n.d(t,"SQLSERVERInstanceAliasList",(function(){return u})),n.d(t,"SQLSERVERInvalidDemensions",(function(){return s})),n.d(t,"namespace",(function(){return a})),n.d(t,"queryEditorName",(function(){return c})),n.d(t,"queryEditorConfig",(function(){return d})),n.d(t,"regionSupported",(function(){return f})),n.d(t,"modifyDimensons",(function(){return y})),n.d(t,"SQLSERVERGetInstanceQueryParams",(function(){return h}));var r=n(5),i=n(0),o=n.n(i),a="QCE/SQLSERVER",c="sqlserverQuery",s={resourceId:"InstanceId"},u=["InstanceId","Name"],l={instance:"InstanceId"},p=[{key:"Offset",enDescriptor:"Offset",cnDescriptor:"偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项",link:"",type:"inputNumber",min:0},{key:"Limit",enDescriptor:"Limit",cnDescriptor:"单次请求返回的数量,默认为20,最小值为1,最大值为100",link:"",type:"inputNumber",min:1,max:100},{key:"ProjectId",enDescriptor:"ProjectId",cnDescriptor:"项目ID",link:"",type:"inputNumber"},{key:"Status",enDescriptor:"Status",cnDescriptor:"实例状态",link:"",type:"select",list:[{text:"申请中",value:1},{text:"运行中",value:2},{text:"受限运行中 (主备切换中)",value:3},{text:"已隔离",value:4},{text:"回收中",value:5},{text:"已回收",value:6},{text:"任务执行中",value:7},{text:"已下线",value:8},{text:"实例扩容中",value:9},{text:"实例迁移中",value:10},{text:"只读",value:11},{text:"重启中",value:12}]},{key:"InstanceIdSet",enDescriptor:"InstanceIdSet",cnDescriptor:"实例ID",link:"",type:"inputMulti"},{key:"PayMode",enDescriptor:"PayMode",cnDescriptor:"子网实例ID",link:"",type:"select",list:[{text:"包年包月",value:1},{text:"按量计费",value:0}]},{key:"VpcId",enDescriptor:"VpcId",cnDescriptor:"实例所属VPC的唯一字符串ID",link:"",type:"input"},{key:"SubnetId",enDescriptor:"SubnetId",cnDescriptor:"实例所属子网的唯一字符串ID",link:"",type:"input"},{key:"VipSet",enDescriptor:"VipSet",cnDescriptor:"实例内网地址列表",link:"",type:"inputMulti"},{key:"InstanceNameSet",enDescriptor:"InstanceNameSet",cnDescriptor:"实例名称列表, 模糊查询",link:"",type:"inputMulti"},{key:"VersionSet",enDescriptor:"VersionSet",cnDescriptor:"实例版本代号列表",link:"",type:"inputMulti"},{key:"Zone",enDescriptor:"Zone",cnDescriptor:"实例可用区",link:"",type:"dropdown"}],d={instanceDocUrl:"https://cloud.tencent.com/document/api/238/19969",namespace:a,fieldDescriptor:p},f=[{value:"ap-beijing"},{value:"ap-chengdu"},{value:"ap-chongqing"},{value:"ap-guangzhou"},{value:"ap-hongkong"},{value:"ap-nanjing"},{value:"ap-seoul"},{value:"ap-shanghai"},{value:"ap-shanghai-fsi"},{value:"ap-shenzhen-fsi"},{value:"ap-singapore"},{value:"ap-tokyo"},{value:"eu-moscow"},{value:"na-siliconvalley"}],m={region:"",metricName:"",metricUnit:"",period:void 0,dimensionObject:null,instance:"",instanceAlias:"InstanceId",queries:{Limit:20,Offset:0,ProjectId:null,Status:{},InstanceIdSet:[],PayMode:{},VpcId:"",SubnetId:"",VipSet:[],InstanceNameSet:[],VersionSet:[],Zone:""}};function y(e){var t=o.a.cloneDeep(e);return t.Dimensions.forEach((function(e){e.Dimensions=["resourceId"]})),t}function h(e){return void 0===e&&(e={}),Object(r.d)(e,!1)}t.default=m},function(e,t,n){"use strict";n.r(t),n.d(t,"BMINTRALBFilterFieldsDescriptor",(function(){return p})),n.d(t,"templateQueryIdMap",(function(){return l})),n.d(t,"BMINTRALBInstanceAliasList",(function(){return u})),n.d(t,"BMINTRALBInvalidDemensions",(function(){return s})),n.d(t,"namespace",(function(){return a})),n.d(t,"queryEditorName",(function(){return c})),n.d(t,"queryEditorConfig",(function(){return d})),n.d(t,"isValidMetric",(function(){return y})),n.d(t,"BMINTRALBGetInstanceQueryParams",(function(){return h}));var r=n(5),i=n(0),o=n.n(i),a="QCE/BM_INTRA_LB",c="bmIntraLbQuery",s={vip:"LoadBalancerVips",vpcId:"VpcId"},u=["LoadBalancerId","LoadBalancerVips","LoadBalancerName"],l={instance:"LoadBalancerId"},p=[{key:"Offset",enDescriptor:"Offset",cnDescriptor:"偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项",link:"",type:"inputNumber",min:0},{key:"Limit",enDescriptor:"Limit",cnDescriptor:"单次请求返回的数量,默认为20,最小值为1,最大值为100",link:"",type:"inputNumber",min:1,max:100},{key:"LoadBalancerIds",enDescriptor:"LoadBalancerIds",cnDescriptor:"负载均衡器ID数组",link:"",type:"inputMulti"},{key:"LoadBalancerName",enDescriptor:"LoadBalancerName",cnDescriptor:"负载均衡器名称",link:"",type:"inputMulti"},{key:"LoadBalancerVips",enDescriptor:"LoadBalancerVips",cnDescriptor:"负载均衡获得的公网IP地址",link:"",type:"inputMulti"}],d={instanceDocUrl:"https://cloud.tencent.com/document/api/1027/33280",namespace:a,fieldDescriptor:p},f={region:"",metricName:"",metricUnit:"",period:void 0,dimensionObject:null,instance:"",instanceAlias:"LoadBalancerId",queries:{Limit:20,Offset:0,LoadBalancerIds:[],LoadBalancerName:[],LoadBalancerVips:[]}},m=["Inpkg","Outpkg","Intraffic","Outtraffic","Connum","Req"];function y(e){var t=o.a.map(m,o.a.toUpper);return-1!==o.a.indexOf(t,o.a.toUpper(e.MetricName))}function h(e){return void 0===e&&(e={}),Object(r.d)(e,!1)}t.default=f},function(e,t,n){"use strict";n.r(t),n.d(t,"CPMFilterFieldsDescriptor",(function(){return p})),n.d(t,"templateQueryIdMap",(function(){return l})),n.d(t,"BMLBInstanceAliasList",(function(){return u})),n.d(t,"CPMInvalidDemensions",(function(){return s})),n.d(t,"namespace",(function(){return a})),n.d(t,"queryEditorName",(function(){return c})),n.d(t,"queryEditorConfig",(function(){return d})),n.d(t,"isValidMetric",(function(){return h})),n.d(t,"BMLBGetInstanceQueryParams",(function(){return m}));var r=n(5),i=n(0),o=n.n(i),a="QCE/BM_LB",c="bmLbQuery",s={vip:"LoadBalancerVips"},u=["LoadBalancerId","LoadBalancerVips","LoadBalancerName"],l={instance:"LoadBalancerId"},p=[{key:"Offset",enDescriptor:"Offset",cnDescriptor:"偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项",link:"",type:"inputNumber",min:0},{key:"Limit",enDescriptor:"Limit",cnDescriptor:"单次请求返回的数量,默认为20,最小值为1,最大值为100",link:"",type:"inputNumber",min:1,max:100},{key:"LoadBalancerIds",enDescriptor:"LoadBalancerIds",cnDescriptor:"负载均衡器ID数组",link:"",type:"inputMulti"},{key:"LoadBalancerName",enDescriptor:"LoadBalancerName",cnDescriptor:"负载均衡器名称",link:"",type:"inputMulti"},{key:"LoadBalancerVips",enDescriptor:"LoadBalancerVips",cnDescriptor:"负载均衡获得的公网IP地址",link:"",type:"inputMulti"}],d={instanceDocUrl:"https://cloud.tencent.com/document/api/1027/33280",namespace:a,fieldDescriptor:p},f={region:"",metricName:"",metricUnit:"",period:void 0,dimensionObject:null,instance:"",instanceAlias:"LoadBalancerId",queries:{Limit:20,Offset:0,LoadBalancerIds:[],LoadBalancerName:[],LoadBalancerVips:[]}};function m(e){return void 0===e&&(e={}),Object(r.d)(e,!1)}var y=["Inpkg","Outpkg","Intraffic","Outtraffic","Connum","Req"];function h(e){var t=o.a.map(y,o.a.toUpper);return-1!==o.a.indexOf(t,o.a.toUpper(e.MetricName))}t.default=f},function(e,t,n){"use strict";n.r(t),n.d(t,"BMPCXFilterFieldsDescriptor",(function(){return p})),n.d(t,"templateQueryIdMap",(function(){return l})),n.d(t,"BMPCXInstanceAliasList",(function(){return u})),n.d(t,"BMPCXInvalidDemensions",(function(){return s})),n.d(t,"namespace",(function(){return a})),n.d(t,"queryEditorName",(function(){return c})),n.d(t,"queryEditorConfig",(function(){return d})),n.d(t,"modifyDimensons",(function(){return y})),n.d(t,"BMPCXGetInstanceQueryParams",(function(){return m}));var r=n(5),i=n(0),o=n.n(i),a="QCE/BM_PCX",c="bmPcxQuery",s={peeringConnectionId:"VpcPeerConnectionId"},u=["VpcPeerConnectionId","VpcPeerConnectionName"],l={instance:"VpcPeerConnectionId"},p=[{key:"Offset",enDescriptor:"Offset",cnDescriptor:"偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项",link:"",type:"inputNumber",min:0},{key:"Limit",enDescriptor:"Limit",cnDescriptor:"单次请求返回的数量,默认为20,最小值为1,最大值为100",link:"",type:"inputNumber",min:1,max:100},{key:"VpcPeerConnectionIds",enDescriptor:"VpcPeerConnectionIds",cnDescriptor:"对等连接实例ID",link:"",type:"inputMulti"}],d={instanceDocUrl:"https://cloud.tencent.com/document/product/1024/36903",namespace:a,fieldDescriptor:p},f={region:"",metricName:"",metricUnit:"",period:void 0,dimensionObject:null,instance:"",instanceAlias:"VpcPeerConnectionId",queries:{Limit:20,Offset:0,VpcPeerConnectionIds:[]}};function m(e){return void 0===e&&(e={}),Object(r.d)(e,!1)}function y(e){var t=o.a.cloneDeep(e);return t.Dimensions.forEach((function(e){e.Dimensions=["peeringConnectionId"]})),t}t.default=f},function(e,t,n){"use strict";n.r(t),n.d(t,"CBSFilterFieldsDescriptor",(function(){return l})),n.d(t,"templateQueryIdMap",(function(){return u})),n.d(t,"CBSInstanceAliasList",(function(){return s})),n.d(t,"CBSInvalidDemensions",(function(){return c})),n.d(t,"namespace",(function(){return o})),n.d(t,"queryEditorName",(function(){return a})),n.d(t,"queryEditorConfig",(function(){return p})),n.d(t,"isValidMetric",(function(){return m})),n.d(t,"CBSGetInstanceQueryParams",(function(){return f}));var r=n(0),i=n(5),o="QCE/BLOCK_STORAGE",a="cbsQuery",c={diskId:"DiskId",InstanceId:"InstanceId",diskname:"DiskName",unInstanceId:"InstanceId"},s=["DiskId","DiskName"],u={instance:"DiskId"},l=[{key:"Offset",enDescriptor:"Offset",cnDescriptor:"偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项",link:"",type:"inputNumber",min:0},{key:"Limit",enDescriptor:"Limit",cnDescriptor:"单次请求返回的数量,默认为20,最小值为1,最大值为100",link:"",type:"inputNumber",min:1,max:100},{key:"DiskIds",enDescriptor:"DiskIds",cnDescriptor:"云硬盘ID",link:"",type:"inputMulti"},{key:"Order",enDescriptor:"Order",cnDescriptor:"排列顺序",link:"",type:"select",list:[{text:"升序排列",value:"ASC"},{text:"降序排列",value:"DESC"}]},{key:"OrderField",enDescriptor:"OrderField",cnDescriptor:"排序的依据字段",link:"",type:"select",list:[{text:"云盘的创建时间排序",value:"CREATE_TIME"},{text:"云盘的到期时间排序",value:"DEADLINE"}]},{key:"ReturnBindAutoSnapshotPolicy",enDescriptor:"ReturnBindAutoSnapshotPolicy",cnDescriptor:"否需要返回云盘绑定的定期快照策略ID",link:"",type:"switch"}],p={instanceDocUrl:"https://cloud.tencent.com/document/api/362/16315",namespace:o,fieldDescriptor:l},d={region:"",metricName:"",metricUnit:"",period:void 0,dimensionObject:null,instance:"",instanceAlias:"DiskId",queries:{Limit:20,Offset:0,DiskIds:[],OrderField:[],Order:[],ReturnBindAutoSnapshotPolicy:!1}};function f(e){return void 0===e&&(e={}),Object(i.d)(e,!1)}function m(e){void 0===e&&(e={});var t=r.get(e,"Dimensions[0].Dimensions");return 1===t.length&&-1!==r.indexOf(t,"diskId")}t.default=d},function(e,t,n){"use strict";n.r(t),n.d(t,"CDNPROVINCEFilterFieldsDescriptor",(function(){return u})),n.d(t,"templateQueryIdMap",(function(){return s})),n.d(t,"CDNPROVINCEInstanceAliasList",(function(){return c})),n.d(t,"CDNPROVINCEInvalidDemensions",(function(){return a})),n.d(t,"namespace",(function(){return i})),n.d(t,"queryEditorName",(function(){return o})),n.d(t,"CDNPROVINCEGetInstanceQueryParams",(function(){return p}));var r=n(5),i="QCE/CDN_LOG_DATA",o="cdnProvinceQuery",a={domain:"Domain",projectid:"ProjectId",province:"district",appid:"AppId"},c=["Domain","ProjectId"],s={instance:"Domain"},u=[{key:"Offset",enDescriptor:"Offset",cnDescriptor:"偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项",link:"",type:"inputNumber",min:0},{key:"Limit",enDescriptor:"Limit",cnDescriptor:"单次请求返回的数量,默认为20,最小值为1,最大值为100",link:"",type:"inputNumber",min:1,max:100},{key:"origin",enDescriptor:"origin",cnDescriptor:"主源站",link:"",type:"inputMulti"},{key:"domain",enDescriptor:"domain",cnDescriptor:"域名",link:"",type:"inputMulti"},{key:"resourceId",enDescriptor:"resourceId",cnDescriptor:"域名id",link:"",type:"inputMulti"},{key:"status",enDescriptor:"status",cnDescriptor:"域名状态",link:"",type:"select",list:[{text:"online",value:"online"},{text:"offline",value:"offline"},{text:"processing",value:"processing"}]},{key:"serviceType",enDescriptor:"serviceType",cnDescriptor:"业务类型",link:"",type:"select",list:[{text:"web",value:"web"},{text:"download",value:"download"},{text:"media",value:"media"}]},{key:"projectId",enDescriptor:"projectId",cnDescriptor:"项目ID",link:"",type:"inputNumberMulti"},{key:"domainType",enDescriptor:"domainType",cnDescriptor:"主源站类型",link:"",type:"select",list:[{text:"自有源",value:"cname"},{text:"cos接入",value:"cos"}]},{key:"fullUrlCache",enDescriptor:"fullUrlCache",cnDescriptor:"全路径缓存",link:"",type:"select",list:[{text:"打开",value:"on"},{text:"关闭",value:"off"}]},{key:"https",enDescriptor:"https",cnDescriptor:"是否配置https",link:"",type:"select",list:[{text:"on",value:"on"},{text:"off",value:"off"},{text:"processing",value:"processing"}]},{key:"originPullProtocol",enDescriptor:"originPullProtocol",cnDescriptor:"回源协议类型",link:"",type:"select",list:[{text:"http",value:"http"},{text:"follow",value:"follow"},{text:"https",value:"https"}]},{key:"tagKey",enDescriptor:"tagKey",cnDescriptor:"标签键",link:"",type:"inputMulti"}],l={region:"ap-guangzhou",metricName:"",metricUnit:"",period:void 0,dimensionObject:null,instance:"",instanceAlias:"Domain",isp:"",district:"",queries:{Limit:20,Offset:0,origin:[],domain:[],resourceId:[],status:{},serviceType:{},projectId:[],domainType:{},fullUrlCache:{},https:{},originPullProtocol:{},tagKey:[]}};function p(e){return void 0===e&&(e={}),Object(r.d)(e,!0)}t.default=l},function(e,t,n){"use strict";n.r(t),n.d(t,"CEIPFilterFieldsDescriptor",(function(){return p})),n.d(t,"templateQueryIdMap",(function(){return l})),n.d(t,"CEIPSUMMARYInstanceAliasList",(function(){return u})),n.d(t,"CEIPInvalidDemensions",(function(){return s})),n.d(t,"namespace",(function(){return a})),n.d(t,"queryEditorName",(function(){return c})),n.d(t,"modifyDimensons",(function(){return y})),n.d(t,"queryEditorConfig",(function(){return d})),n.d(t,"CEIPSUMMARYGetInstanceQueryParams",(function(){return m}));var r=n(0),i=n.n(r),o=n(5),a="QCE/CEIP_SUMMARY",c="ceipSummaryQuery",s={vip:"AddressIp",eip:"AddressIp"},u=["AddressId","AddressName","AddressIp"],l={instance:"AddressId"},p=[{key:"Offset",enDescriptor:"Offset",cnDescriptor:"偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项",link:"",type:"inputNumber",min:0},{key:"Limit",enDescriptor:"Limit",cnDescriptor:"单次请求返回的数量,默认为20,最小值为1,最大值为100",link:"",type:"inputNumber",min:1,max:100},{key:"address-id",enDescriptor:"address-id",cnDescriptor:" EIP 的唯一 ID",link:"",type:"inputMulti"},{key:"address-name",enDescriptor:"address-name",cnDescriptor:"EIP 名称",link:"",type:"inputMulti"},{key:"address-ip",enDescriptor:"address-ip",cnDescriptor:"EIP 的 IP 地址",link:"",type:"inputMulti"},{key:"address-status",enDescriptor:"address-status",cnDescriptor:"EIP 的状态",link:"",type:"select",multiple:!0,list:[{text:"CREATING",value:"CREATING"},{text:"BINDING",value:"BINDING"},{text:"BIND",value:"BIND"},{text:"UNBINDING",value:"UNBINDING"},{text:"UNBIND",value:"UNBIND"},{text:"OFFLINING",value:"OFFLINING"},{text:"BIND_ENI",value:"BIND_ENI"}]},{key:"instance-id",enDescriptor:"instance-id",cnDescriptor:"EIP 绑定的实例 ID",link:"",type:"inputMulti"},{key:"private-ip-address",enDescriptor:"private-ip-address",cnDescriptor:"EIP 绑定的内网 IP ",link:"",type:"inputMulti"},{key:"network-interface-id",enDescriptor:"network-interface-id",cnDescriptor:" EIP 绑定的弹性网卡 ID",link:"",type:"inputMulti"},{key:"is-arrears",enDescriptor:"is-arrears",cnDescriptor:"EIP 是否欠费",link:"",type:"select",multiple:!0,list:[{text:"欠费状态",value:"TRUE"},{text:"费用状态正常",value:"FALSE"}]},{key:"address-isp",enDescriptor:"address-isp",cnDescriptor:"运营商类型",link:"",type:"select",multiple:!0,list:[{text:"BGP",value:"BGP"},{text:"CMCC",value:"CMCC"},{text:"CUCC",value:"CUCC"},{text:"CTCC",value:"CTCC"}]}],d={instanceDocUrl:"https://cloud.tencent.com/document/api/215/16702",namespace:a,fieldDescriptor:p},f={region:"",metricName:"",metricUnit:"",period:void 0,dimensionObject:null,instance:"",instanceAlias:"AddressId",queries:{Limit:20,Offset:0,"address-id":[],"address-name":[],"address-ip":[],"address-status":{},"is-arrears":{},"address-isp":{},"instance-id":[],"private-ip-address":[],"network-interface-id":[]}};function m(e){return void 0===e&&(e={}),Object(o.d)(e,!0)}function y(e){var t=i.a.cloneDeep(e);return t.Dimensions.forEach((function(e){e.Dimensions=["eip"]})),t}t.default=f},function(e,t,n){"use strict";n.r(t),n.d(t,"InstanceQueryDescriptor",(function(){return o})),n.d(t,"InvalidDemensions",(function(){return c})),n.d(t,"templateQueryIdMap",(function(){return s})),n.d(t,"InstanceAliasList",(function(){return p})),n.d(t,"GetInstanceQueryParams",(function(){return a})),n.d(t,"queryMonitorExtraConfg",(function(){return l})),n.d(t,"keyInStorage",(function(){return u}));var r=n(0),i=n.n(r),o=[{key:"Offset",enDescriptor:"Offset",cnDescriptor:"偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项",link:"",type:"inputNumber",min:0},{key:"Limit",enDescriptor:"Limit",cnDescriptor:"单次请求返回的数量,默认为10,最小值为1,最大值为100",link:"",type:"inputNumber",min:1,max:50},{key:"TopicName",enDescriptor:"TopicName",cnDescriptor:"精确匹配TopicName",link:"",type:"input"},{key:"TagKey",enDescriptor:"TagKey",cnDescriptor:"标签搜索",link:"",type:"input"}];function a(e){void 0===e&&(e={});var t={};return i.a.isEmpty(e)||(t.Limit=i.a.get(e,"Limit",20)||20,t.Offset=i.a.get(e,"Offset",0)||0,e=i.a.omit(e,["Offset","Limit"]),i.a.forEach(e,(function(e,n){i.a.isArray(e)?(e=i.a.compact(e)).length>0&&(t[n]=i.a.uniq(e)):i.a.isObject(e)?!i.a.isNumber(i.a.get(e,"value",void 0))&&i.a.isEmpty(i.a.get(e,"value",void 0))||(t[n]=i.a.get(e,"value")):!i.a.isNumber(e)&&i.a.isEmpty(e)||(t[n]=e)}))),t}var c={topicId:"TopicId"},s={instance:"TopicName",subscription:"SubscriptionId"},u={subscriptionId:"subscriptionId"},l={subscriptionId:{dim_KeyInStorage:u.subscriptionId,dim_KeyInTarget:"subscriptionId",dim_KeyInMap:s.subscription}},p=["TopicName","TopicId"];t.default={region:"",metricName:"",metricUnit:"",period:void 0,dimensionObject:null,instance:"",instanceAlias:"TopicName",subscriptionId:"",queries:{Offset:0,Limit:20,TopicName:"",TagKey:""}}},function(e,t,n){"use strict";n.r(t),n.d(t,"CPMFilterFieldsDescriptor",(function(){return p})),n.d(t,"templateQueryIdMap",(function(){return l})),n.d(t,"CPMInstanceAliasList",(function(){return u})),n.d(t,"CPMInvalidDemensions",(function(){return s})),n.d(t,"namespace",(function(){return a})),n.d(t,"queryEditorName",(function(){return c})),n.d(t,"queryEditorConfig",(function(){return d})),n.d(t,"modifyDimensons",(function(){return y})),n.d(t,"CPMGetInstanceQueryParams",(function(){return m}));var r=n(5),i=n(0),o=n.n(i),a="QCE/CPM",c="cpmQuery",s={instanceId:"InstanceId"},u=["InstanceId","Name"],l={instance:"InstanceId"},p=[{key:"Offset",enDescriptor:"Offset",cnDescriptor:"偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项",link:"",type:"inputNumber",min:0},{key:"Limit",enDescriptor:"Limit",cnDescriptor:"单次请求返回的数量,默认为20,最小值为1,最大值为100",link:"",type:"inputNumber",min:1,max:100},{key:"DeviceClassCode",enDescriptor:"DeviceClassCode",cnDescriptor:"机型ID",link:"",type:"dropdown"},{key:"InstanceIds",enDescriptor:"InstanceIds",cnDescriptor:"设备ID数组",link:"",type:"inputMulti"},{key:"WanIps",enDescriptor:"WanIps",cnDescriptor:"外网IP数组",link:"",type:"inputMulti"},{key:"LanIps",enDescriptor:"LanIps",cnDescriptor:"内网IP数组",link:"",type:"inputMulti"},{key:"Alias",enDescriptor:"Alias",cnDescriptor:"设备名称",link:"",type:"input"},{key:"VagueIp",enDescriptor:"VagueIp",cnDescriptor:"模糊IP查询",link:"",type:"input"},{key:"AutoRenewFlag",enDescriptor:"AutoRenewFlag",cnDescriptor:"自动续费标志",link:"",type:"select",list:[{text:"不自动续费",value:0},{text:"自动续费",value:1}]},{key:"VpcId",enDescriptor:"VpcId",cnDescriptor:"私有网络唯一ID",link:"",type:"input"},{key:"SubnetId",enDescriptor:"SubnetId",cnDescriptor:"子网唯一ID",link:"",type:"input"},{key:"DeviceType",enDescriptor:"DeviceType",cnDescriptor:"子网实例ID",link:"",type:"select",list:[{text:"计算型",value:"compute"},{text:"标准型",value:"standard"},{text:"存储型",value:"storage"}]},{key:"IsLuckyDevice",enDescriptor:"IsLuckyDevice",cnDescriptor:"竞价实例机器过滤",link:"",type:"select",list:[{text:"非竞价实例机器",value:0},{text:"竞价实例的机器",value:1}]}],d={instanceDocUrl:"https://cloud.tencent.com/document/api/386/32904",namespace:a,fieldDescriptor:p},f={region:"",metricName:"",metricUnit:"",period:void 0,dimensionObject:null,instance:"",instanceAlias:"InstanceId",queries:{Limit:20,Offset:0,DeviceClassCode:"",InstanceIds:[],WanIps:[],LanIps:[],Alias:"",VagueIp:"",AutoRenewFlag:{},VpcId:"",SubnetId:"",DeviceType:{},IsLuckyDevice:{}}};function m(e){return void 0===e&&(e={}),Object(r.d)(e,!1)}function y(e){var t=o.a.cloneDeep(e);return t.Dimensions.forEach((function(e){e.Dimensions=["instanceId"]})),t}t.default=f},function(e,t,n){"use strict";n.r(t),n.d(t,"ECDNFilterFieldsDescriptor",(function(){return p})),n.d(t,"templateQueryIdMap",(function(){return s})),n.d(t,"ECDNInstanceAliasList",(function(){return c})),n.d(t,"ECDNInvalidDemensions",(function(){return u})),n.d(t,"namespace",(function(){return o})),n.d(t,"queryEditorName",(function(){return a})),n.d(t,"queryEditorConfig",(function(){return d})),n.d(t,"modifyDimensons",(function(){return m})),n.d(t,"ECDNGetInstanceQueryParams",(function(){return f}));var r=n(0),i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o.push({Name:t,Value:Object(r.uniq)(e).slice(0,5)}):Object(r.isObject)(e)&&(Object(r.isEmpty)(Object(r.get)(e,"value",[]))||o.push({Name:t,Value:[Object(r.get)(e,"value",[])].slice(0,5)}))})),o.length>0)return t.Filters=o.map((function(e){return"domain"===e.Name?i(i({},e),{Fuzzy:!0}):e})),t}return t}function m(e){var t=Object(r.cloneDeep)(e);return t.Dimensions.forEach((function(e){e.Dimensions=["domain","projectid"]})),t}t.default=l},function(e,t,n){"use strict";n.r(t),n.d(t,"ECMFilterFieldsDescriptor",(function(){return l})),n.d(t,"templateQueryIdMap",(function(){return u})),n.d(t,"ECMInstanceAliasList",(function(){return s})),n.d(t,"ECMInvalidDemensions",(function(){return c})),n.d(t,"namespace",(function(){return o})),n.d(t,"queryEditorName",(function(){return a})),n.d(t,"queryEditorConfig",(function(){return p})),n.d(t,"modifyDimensons",(function(){return m})),n.d(t,"ECMGetInstanceQueryParams",(function(){return f}));var r=n(0),i=n(5),o="QCE/ECM",a="ecmQuery",c={uuid:"UUID"},s=["InstanceId","InstanceName"],u={instance:"InstanceId"},l=[{key:"Offset",enDescriptor:"Offset",cnDescriptor:"偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项",link:"",type:"inputNumber",min:0},{key:"Limit",enDescriptor:"Limit",cnDescriptor:"单次请求返回的数量,默认为20,最小值为1,最大值为100",link:"",type:"inputNumber",min:1,max:100},{key:"zone",enDescriptor:"zone",cnDescriptor:"可用区英文标识",link:"",type:"dropdownMulti"},{key:"zone-name",enDescriptor:"zone-name",cnDescriptor:"排列顺序",link:"",type:"inputMulti"},{key:"module-id",enDescriptor:"module-id",cnDescriptor:"模块ID",link:"",type:"inputMulti"},{key:"module-name",enDescriptor:"module-name",cnDescriptor:"模块名称",link:"",type:"inputMulti"},{key:"instance-id",enDescriptor:"instance-id",cnDescriptor:"实例ID",link:"",type:"inputMulti"},{key:"instance-name",enDescriptor:"instance-name",cnDescriptor:"实例名称",link:"",type:"inputMulti"},{key:"ip-address",enDescriptor:"ip-address",cnDescriptor:"内网/公网IP",link:"",type:"inputMulti"},{key:"instance-uuid",enDescriptor:"instance-uuid",cnDescriptor:"实例uuid",link:"",type:"inputMulti"},{key:"instance-state",enDescriptor:"instance-state",cnDescriptor:"实例状态",link:"",type:"select",multiple:!0,list:[{text:"创建中",value:"PENDING"},{text:"创建失败",value:"LAUNCH_FAILED"},{text:"运行中",value:"RUNNING"},{text:"关机",value:"STOPPED"},{text:"开机中",value:"STARTING"},{text:"关机中",value:"STOPPING"},{text:"重启中",value:"REBOOTING"},{text:"停止待销毁",value:"SHUTDOWN"},{text:"销毁中",value:"TERMINATING"}]},{key:"internet-service-provider",enDescriptor:"internet-service-provider",cnDescriptor:"公网IP所属的运营商",link:"",type:"inputMulti"},{key:"instance-family",enDescriptor:"instance-family",cnDescriptor:"机型family",link:"",type:"inputMulti"},{key:"image-id",enDescriptor:"image-id",cnDescriptor:"镜像ID",link:"",type:"inputMulti"},{key:"vpc-id",enDescriptor:"vpc-id",cnDescriptor:"实例的vpc id",link:"",type:"inputMulti"},{key:"subnet-id",enDescriptor:"subnet-id",cnDescriptor:"实例的subnet id",link:"",type:"inputMulti"}],p={instanceDocUrl:"https://cloud.tencent.com/document/api/1108/42565",namespace:o,fieldDescriptor:l},d={region:"ap-guangzhou",metricName:"",metricUnit:"",period:void 0,dimensionObject:null,instance:"",instanceAlias:"InstanceId",queries:{Limit:20,Offset:0,zone:[],"zone-name":[],"module-id":[],"module-name":[],"instance-id":[],"instance-name":[],"ip-address":[],"instance-uuid":[],"instance-state":{},"internet-service-provider":[],"instance-family":[],"image-id":[],"vpc-id":[],"subnet-id":[]}};function f(e){return void 0===e&&(e={}),Object(i.d)(e,!0)}function m(e){var t=r.cloneDeep(e);return t.Dimensions.forEach((function(e){e.Dimensions=["UUID"]})),t}t.default=d},function(e,t,n){"use strict";n.r(t),n.d(t,"PostgresFieldsDescriptor",(function(){return u})),n.d(t,"POSTGRESInstanceAliasList",(function(){return p})),n.d(t,"templateQueryIdMap",(function(){return h})),n.d(t,"modifyDimensons",(function(){return m})),n.d(t,"namespace",(function(){return c})),n.d(t,"queryEditorName",(function(){return s})),n.d(t,"queryEditorConfig",(function(){return l})),n.d(t,"PostgreInvalidDemensions",(function(){return y})),n.d(t,"POSTGRESGetInstanceQueryParams",(function(){return f}));var r=n(0),i=n.n(r),o=n(5),a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&(t[n]=i.a.uniq(e)):i.a.isObject(e)?!i.a.isNumber(i.a.get(e,"value",void 0))&&i.a.isEmpty(i.a.get(e,"value",void 0))||(t[n]=i.a.get(e,"value")):!i.a.isNumber(e)&&i.a.isEmpty(e)||(t[n]=e)}))),t}function l(e){void 0===e&&(e={});var t=i.a.get(e,"Dimensions[0].Dimensions");return 2===t.length&&(-1!==i.a.indexOf(t,"instanceid")&&-1!==i.a.indexOf(t,"insttype")||-1!==i.a.indexOf(t,"InstanceId")&&-1!==i.a.indexOf(t,"InstanceType"))}function p(e){var t=i.a.cloneDeep(e);return t.Dimensions.forEach((function(e){e.Dimensions=e.Dimensions.map((function(e){return d[e]||e}))})),t}var d={instanceid:"InstanceId",insttype:"InstanceType",region:"Region"},f={instance:"InstanceId"};t.default=c},function(e,t,n){"use strict";n.r(t),n.d(t,"CESFilterFieldsDescriptor",(function(){return u})),n.d(t,"templateQueryIdMap",(function(){return s})),n.d(t,"CESInstanceAliasList",(function(){return c})),n.d(t,"CESInvalidDemensions",(function(){return a})),n.d(t,"namespace",(function(){return i})),n.d(t,"queryEditorName",(function(){return o})),n.d(t,"queryEditorConfig",(function(){return l})),n.d(t,"CESGetInstanceQueryParams",(function(){return d}));var r=n(5),i="QCE/CES",o="cesQuery",a={uInstanceId:"InstanceId"},c=["InstanceId","InstanceName"],s={instance:"InstanceId"},u=[{key:"Offset",enDescriptor:"Offset",cnDescriptor:"偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项",link:"",type:"inputNumber",min:0},{key:"Limit",enDescriptor:"Limit",cnDescriptor:"单次请求返回的数量,默认为20,最小值为1,最大值为100",link:"",type:"inputNumber",min:1,max:100},{key:"InstanceIds",enDescriptor:"InstanceIds",cnDescriptor:"集群实例ID列表",link:"",type:"inputMulti"},{key:"InstanceNames",enDescriptor:"InstanceNames",cnDescriptor:"集群实例名称列表",link:"",type:"inputMulti"},{key:"OrderByKey",enDescriptor:"OrderByKey",cnDescriptor:"排序字段",link:"",type:"select",list:[{text:"实例ID",value:1},{text:"实例名称",value:2},{text:"可用区",value:3},{text:"创建时间",value:4}]},{key:"OrderByType",enDescriptor:"OrderByType",cnDescriptor:"排序方式",link:"",type:"select",list:[{text:"升序",value:0},{text:"降序",value:1}]},{key:"IpList",enDescriptor:"IpList",cnDescriptor:"私有网络vip列表",link:"",type:"inputMulti"}],l={instanceDocUrl:"https://cloud.tencent.com/document/api/845/30631",namespace:i,fieldDescriptor:u},p={region:"",metricName:"",metricUnit:"",period:void 0,dimensionObject:null,instance:"",instanceAlias:"InstanceId",queries:{Limit:20,Offset:0,InstanceIds:[],InstanceNames:[],OrderByKey:{},OrderByType:{},IpList:[]}};function d(e){return void 0===e&&(e={}),Object(r.d)(e,!1)}t.default=p},function(e,t,n){"use strict";n.r(t),n.d(t,"DCFilterFieldsDescriptor",(function(){return s})),n.d(t,"templateQueryIdMap",(function(){return f})),n.d(t,"DCInstanceAliasList",(function(){return d})),n.d(t,"DCInvalidDemensions",(function(){return m})),n.d(t,"namespace",(function(){return a})),n.d(t,"queryEditorName",(function(){return c})),n.d(t,"queryEditorConfig",(function(){return u})),n.d(t,"modifyDimensons",(function(){return y})),n.d(t,"DCGetInstanceQueryParams",(function(){return p}));var r=n(0),i=n.n(r),o=n(5),a="QCE/DC",c="dcQuery",s=[{key:"Offset",enDescriptor:"Offset",cnDescriptor:"偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项",link:"",type:"inputNumber",min:0},{key:"Limit",enDescriptor:"Limit",cnDescriptor:"单次请求返回的数量,默认为20,最小值为1,最大值为100",link:"",type:"inputNumber",min:1,max:100},{key:"DirectConnectIds",enDescriptor:"DirectConnectIds",cnDescriptor:"物理专线 ID",link:"",type:"inputMulti"}],u={instanceDocUrl:"https://cloud.tencent.com/document/api/216/34826",namespace:a,fieldDescriptor:s},l={region:"",metricName:"",metricUnit:"",period:void 0,dimensionObject:null,instance:"",instanceAlias:"DirectConnectId",queries:{Limit:20,Offset:0,DirectConnectIds:[]}};function p(e){return void 0===e&&(e={}),Object(o.d)(e,!1)}var d=["DirectConnectId","DirectConnectName"],f={instance:"DirectConnectId"},m={directConnectId:"DirectConnectId",directconnectid:"DirectConnectId"};function y(e){var t=i.a.cloneDeep(e);return t.Dimensions.forEach((function(e){e.Dimensions=["directConnectId"]})),t}t.default=l},function(e,t,n){"use strict";n.r(t),n.d(t,"DCGFilterFieldsDescriptor",(function(){return u})),n.d(t,"templateQueryIdMap",(function(){return s})),n.d(t,"DCGInstanceAliasList",(function(){return c})),n.d(t,"DCGInvalidDemensions",(function(){return a})),n.d(t,"namespace",(function(){return i})),n.d(t,"queryEditorName",(function(){return o})),n.d(t,"queryEditorConfig",(function(){return l})),n.d(t,"DCGGetInstanceQueryParams",(function(){return d}));var r=n(5),i="QCE/DCG",o="dcgQuery",a={directConnectGatewayId:"DirectConnectGatewayId"},c=["DirectConnectGatewayId","DirectConnectGatewayName"],s={instance:"DirectConnectGatewayId"},u=[{key:"Offset",enDescriptor:"Offset",cnDescriptor:"偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项",link:"",type:"inputNumber",min:0},{key:"Limit",enDescriptor:"Limit",cnDescriptor:"单次请求返回的数量,默认为20,最小值为1,最大值为100",link:"",type:"inputNumber",min:1,max:100},{key:"direct-connect-gateway-id",enDescriptor:"direct-connect-gateway-id",cnDescriptor:"专线网关唯一ID",link:"",type:"inputMulti"},{key:"direct-connect-gateway-name",enDescriptor:"direct-connect-gateway-name",cnDescriptor:"专线网关名称",link:"",type:"inputMulti"},{key:"direct-connect-gateway-ip",enDescriptor:"direct-connect-gateway-ip",cnDescriptor:"专线网关IP",link:"",type:"inputMulti"},{key:"gateway-type",enDescriptor:"gateway-type",cnDescriptor:"网关类型",link:"",type:"select",multiple:!0,list:[{text:"普通型",value:"NORMAL"},{text:"NAT型",value:"NAT"}]},{key:"network-type",enDescriptor:"network-type",cnDescriptor:"网络类型",link:"",type:"select",multiple:!0,list:[{text:"私有网络类型",value:"VPC"},{text:"云联网类型",value:"CCN"}]},{key:"ccn-id",enDescriptor:"ccn-id",cnDescriptor:"专线网关所在云联网ID",link:"",type:"inputMulti"},{key:"vpc-id",enDescriptor:"vpc-id",cnDescriptor:"专线网关所在私有网络ID",link:"",type:"inputMulti"}],l={instanceDocUrl:"https://cloud.tencent.com/document/api/215/30644",namespace:i,fieldDescriptor:u},p={region:"",metricName:"",metricUnit:"",period:void 0,dimensionObject:null,instance:"",instanceAlias:"DirectConnectGatewayId",queries:{Limit:20,Offset:0,"direct-connect-gateway-id":[],"direct-connect-gateway-name":[],"direct-connect-gateway-ip":[],"gateway-type":{},"network-type":{},"ccn-id":[],"vpc-id":[]}};function d(e){return void 0===e&&(e={}),Object(r.d)(e,!0)}t.default=p},function(e,t,n){"use strict";n.r(t),n.d(t,"DCXFilterFieldsDescriptor",(function(){return u})),n.d(t,"templateQueryIdMap",(function(){return m})),n.d(t,"DCXInstanceAliasList",(function(){return f})),n.d(t,"DCXInvalidDemensions",(function(){return y})),n.d(t,"namespace",(function(){return c})),n.d(t,"queryEditorName",(function(){return s})),n.d(t,"queryEditorConfig",(function(){return l})),n.d(t,"modifyDimensons",(function(){return h})),n.d(t,"DCXGetInstanceQueryParams",(function(){return d}));var r=n(0),i=n.n(r),o=n(5),a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&(t[n]=i.a.uniq(e)):i.a.isObject(e)?!i.a.isNumber(i.a.get(e,"value",void 0))&&i.a.isEmpty(i.a.get(e,"value",void 0))||(t[n]=i.a.get(e,"value")):!i.a.isNumber(e)&&i.a.isEmpty(e)||(t[n]=e)}))),t}var u=["InstanceId","InstanceName"],l={target:"InstanceId"},p={instance:"InstanceId",replica:"ReplicaSetId"},d={Replica:{dim_KeyInStorage:"ReplicaSets",dim_KeyInTarget:"replica",dim_KeyInMap:"ReplicaSetId",dim_KeyInIns:"ReplicaSetId"},Node:{dim_KeyInStorage:"ReplicaNodeSets",dim_KeyInTarget:"node",dim_KeyInMap:"NodeId",dim_KeyInIns:"NodeId"}};t.default=c},function(e,t,n){"use strict";n.r(t),n.d(t,"QAAPFilterFieldsDescriptor",(function(){return p})),n.d(t,"templateQueryIdMap",(function(){return l})),n.d(t,"QAAPInstanceAliasList",(function(){return u})),n.d(t,"QAAPInvalidDemensions",(function(){return s})),n.d(t,"namespace",(function(){return a})),n.d(t,"queryEditorName",(function(){return c})),n.d(t,"queryEditorConfig",(function(){return d})),n.d(t,"modifyDimensons",(function(){return y})),n.d(t,"QAAPGetInstanceQueryParams",(function(){return m}));var r=n(0),i=n.n(r),o=n(5),a="QCE/QAAP",c="qaapQuery",s={channelId:"InstanceId"},u=["InstanceId"],l={instance:"InstanceId"},p=[{key:"Offset",enDescriptor:"Offset",cnDescriptor:"偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项",link:"",type:"inputNumber",min:0},{key:"Limit",enDescriptor:"Limit",cnDescriptor:"单次请求返回的数量,默认为20,最小值为1,最大值为100",link:"",type:"inputNumber",min:1,max:100},{key:"ProjectId",enDescriptor:"ProjectId",cnDescriptor:"项目ID",link:"",type:"inputMulti"},{key:"AccessRegion",enDescriptor:"AccessRegion",cnDescriptor:"接入地域",link:"",type:"inputMulti"},{key:"RealServerRegion",enDescriptor:"RealServerRegion",cnDescriptor:"源站地域",link:"",type:"inputMulti"},{key:"GroupId",enDescriptor:"GroupId",cnDescriptor:"通道组ID",link:"",type:"inputMulti"}],d={instanceDocUrl:"https://cloud.tencent.com/document/api/608/36963",namespace:a,fieldDescriptor:p},f={region:"",metricName:"",metricUnit:"",period:void 0,dimensionObject:null,instance:"",instanceAlias:"InstanceId",queries:{Limit:20,Offset:0,ProjectId:[],AccessRegion:[],RealServerRegion:[],GroupId:[]}};function m(e){return void 0===e&&(e={}),Object(o.d)(e,!0)}function y(e){return i.a.cloneDeep(e)}t.default=f},function(e,t,n){"use strict";n.r(t),n.d(t,"TCAPLUSFilterFieldsDescriptor",(function(){return l})),n.d(t,"templateQueryIdMap",(function(){return u})),n.d(t,"TCAPLUSInstanceAliasList",(function(){return s})),n.d(t,"TCAPLUSInvalidDemensions",(function(){return c})),n.d(t,"namespace",(function(){return o})),n.d(t,"queryEditorName",(function(){return a})),n.d(t,"queryEditorConfig",(function(){return p})),n.d(t,"regonsMap",(function(){return m})),n.d(t,"TCAPLUSGetInstanceQueryParams",(function(){return f}));var r=n(0),i=n.n(r),o="QCE/TCAPLUS",a="tcaplusQuery",c={},s=["TableInstanceId","TableName"],u={instance:"TableInstanceId"},l=[{key:"Offset",enDescriptor:"Offset",cnDescriptor:"偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项",link:"",type:"inputNumber",min:0},{key:"Limit",enDescriptor:"Limit",cnDescriptor:"单次请求返回的数量,默认为20,最小值为1,最大值为100",link:"",type:"inputNumber",min:1,max:100},{key:"ClusterId",enDescriptor:"ClusterId",cnDescriptor:"表格所属集群ID",link:"",type:"input"},{key:"TableGroupIds",enDescriptor:"TableGroupIds",cnDescriptor:"表格组ID列表",link:"",type:"inputMulti"},{key:"TableName",enDescriptor:"TableName",cnDescriptor:"表格名称",link:"",type:"input"},{key:"TableInstanceId",enDescriptor:"TableInstanceId",cnDescriptor:"表实例ID",link:"",type:"input"},{key:"TableIdlType",enDescriptor:"TableIdlType",cnDescriptor:"表格描述语言类型",link:"",type:"select",list:[{text:"PROTO",value:"PROTO"},{text:"TDR",value:"TDR"}]},{key:"TableType",enDescriptor:"TableType",cnDescriptor:"表格数据结构类型",link:"",type:"select",list:[{text:"GENERIC",value:"GENERIC"},{text:"LIST",value:"LIST"}]},{key:"ListElementNum",enDescriptor:"ListElementNum",cnDescriptor:"LIST表元素个数",link:"",type:"inputNumber"},{key:"ReservedVolume",enDescriptor:"ReservedVolume",cnDescriptor:"表格预留容量(GB)",link:"",type:"inputNumber"},{key:"ReservedReadQps",enDescriptor:"ReservedReadQps",cnDescriptor:"表格预留读CU",link:"",type:"inputNumber"},{key:"ReservedWriteQps",enDescriptor:"ReservedWriteQps",cnDescriptor:"表格预留写CU",link:"",type:"inputNumber"},{key:"Memo",enDescriptor:"Memo",cnDescriptor:"表格备注信息",link:"",type:"input"},{key:"FileName",enDescriptor:"FileName",cnDescriptor:"Key回档文件名,回档专用",link:"",type:"input"},{key:"FileExtType",enDescriptor:"FileExtType",cnDescriptor:"Key回档文件扩展名,回档专用",link:"",type:"input"},{key:"FileSize",enDescriptor:"FileSize",cnDescriptor:"Key回档文件大小,回档专用",link:"",type:"inputNumber"},{key:"FileContent",enDescriptor:"FileContent",cnDescriptor:"Key回档文件内容,回档专用",link:"",type:"input"}],p={instanceDocUrl:"https://cloud.tencent.com/document/api/596/39664",namespace:o,fieldDescriptor:l},d={region:"",metricName:"",metricUnit:"",period:void 0,dimensionObject:null,instance:"",instanceAlias:"TableInstanceId",queries:{Limit:20,Offset:0,ClusterId:"",TableGroupIds:[],TableName:"",TableInstanceId:"",TableIdlType:{},TableType:{},ListElementNum:null,ReservedVolume:null,ReservedReadQps:null,ReservedWriteQps:null,Memo:"",FileName:"",FileExtType:"",FileSize:null,FileContent:""}};function f(e){void 0===e&&(e={});var t={};t.Limit=i.a.get(e,"Limit",20)||20,t.Offset=i.a.get(e,"Offset",0)||0,t.ClusterId=i.a.get(e,"ClusterId","")||"",t.TableGroupIds=i.a.get(e,"TableGroupIds",[])||[],e=i.a.omit(e,["Offset","Limit","TableGroupIds","ClusterId"]);var n=[];return i.a.forEach(e,(function(e,t){i.a.isArray(e)?(e=i.a.compact(e)).length>0&&(n[t]=i.a.uniq(e)):i.a.isObject(e)?!i.a.isNumber(i.a.get(e,"value",void 0))&&i.a.isEmpty(i.a.get(e,"value",void 0))||(n[t]=i.a.get(e,"value")):!i.a.isNumber(e)&&i.a.isEmpty(e)||(n[t]=e)})),t.SelectedTables=n,t}var m={"ap-beijing":"华北地区(北京)","ap-guangzhou":"华南地区(广州)","ap-hongkong":"港澳台地区(中国香港)","ap-seoul":"亚太东北(首尔)","ap-shanghai":"华东地区(上海)","ap-singapore":"亚太东南(新加坡)","ap-tokyo":"亚太东北(东京)","eu-frankfurt":"欧洲地区(法兰克福)","na-ashburn":"美国东部(弗吉尼亚)","na-siliconvalley":"美国西部(硅谷)"};t.default=d},function(e,t,n){"use strict";n.r(t),n.d(t,"VBCFilterFieldsDescriptor",(function(){return u})),n.d(t,"templateQueryIdMap",(function(){return s})),n.d(t,"VBCInstanceAliasList",(function(){return c})),n.d(t,"VBCInvalidDemensions",(function(){return a})),n.d(t,"namespace",(function(){return i})),n.d(t,"queryEditorName",(function(){return o})),n.d(t,"queryEditorConfig",(function(){return l})),n.d(t,"VBCGetInstanceQueryParams",(function(){return d}));var r=n(5),i="QCE/VBC",o="vbcQuery",a={},c=["CcnId","CcnName"],s={instance:"CcnId"},u=[{key:"Offset",enDescriptor:"Offset",cnDescriptor:"偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项",link:"",type:"inputNumber",min:0},{key:"Limit",enDescriptor:"Limit",cnDescriptor:"单次请求返回的数量,默认为20,最小值为1,最大值为100",link:"",type:"inputNumber",min:1,max:100},{key:"ccn-id",enDescriptor:"ccn-id",cnDescriptor:"CCN实例ID",link:"",type:"inputMulti"},{key:"ccn-name",enDescriptor:"ccn-name",cnDescriptor:"CCN名称",link:"",type:"inputMulti"},{key:"ccn-description",enDescriptor:"ccn-description",cnDescriptor:"CCN描述",link:"",type:"inputMulti"},{key:"state",enDescriptor:"state",cnDescriptor:"实例状态",link:"",type:"select",multiple:!0,list:[{text:"隔离中",value:"ISOLATED"},{text:"运行中",value:"AVAILABLE"}]}],l={instanceDocUrl:"https://cloud.tencent.com/document/api/215/19199",namespace:i,fieldDescriptor:u},p={region:"",metricName:"",metricUnit:"",period:void 0,dimensionObject:null,instance:"",instanceAlias:"CcnId",DRegion:"",SRegion:"",queries:{Limit:20,Offset:0,"ccn-id":[],"ccn-name":[],"ccn-description":[],state:{}}};function d(e){return void 0===e&&(e={}),Object(r.d)(e,!1)}t.default=p},function(e,t,n){"use strict";n.r(t),n.d(t,"VPNGWFilterFieldsDescriptor",(function(){return u})),n.d(t,"templateQueryIdMap",(function(){return s})),n.d(t,"VPNGWInstanceAliasList",(function(){return c})),n.d(t,"VPNGWInvalidDemensions",(function(){return a})),n.d(t,"namespace",(function(){return i})),n.d(t,"queryEditorName",(function(){return o})),n.d(t,"queryEditorConfig",(function(){return l})),n.d(t,"VPNGWGetInstanceQueryParams",(function(){return d}));var r=n(5),i="QCE/VPNGW",o="vpngwQuery",a={vpnGwId:"VpnGatewayId"},c=["VpnGatewayId","VpnGatewayName"],s={instance:"VpnGatewayId"},u=[{key:"Offset",enDescriptor:"Offset",cnDescriptor:"偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项",link:"",type:"inputNumber",min:0},{key:"Limit",enDescriptor:"Limit",cnDescriptor:"单次请求返回的数量,默认为20,最小值为1,最大值为100",link:"",type:"inputNumber",min:1,max:100},{key:"vpc-id",enDescriptor:"vpc-id",cnDescriptor:"VPC实例ID",link:"",type:"inputMulti"},{key:"vpn-gateway-id",enDescriptor:"vpn-gateway-id",cnDescriptor:"VPN实例ID",link:"",type:"inputMulti"},{key:"vpn-gateway-name",enDescriptor:"vpn-gateway-name",cnDescriptor:"VPN实例名称",link:"",type:"inputMulti"},{key:"type",enDescriptor:"type",cnDescriptor:"VPN网关类型",link:"",type:"select",multiple:!0,list:[{text:"IPSEC",value:"IPSEC"},{text:"SSL",value:"SSL"}]},{key:"public-ip-address",enDescriptor:"public-ip-address",cnDescriptor:"公网IP",link:"",type:"inputMulti"},{key:"renew-flag",enDescriptor:"renew-flag",cnDescriptor:"网关续费类型",link:"",type:"select",multiple:!0,list:[{text:"手动续费",value:"NOTIFY_AND_MANUAL_RENEW"},{text:"自动续费",value:"NOTIFY_AND_AUTO_RENEW"}]},{key:"zone",enDescriptor:"zone",cnDescriptor:"VPN所在可用区",link:"",type:"dropdownMulti"}],l={instanceDocUrl:"https://cloud.tencent.com/document/api/215/17514",namespace:i,fieldDescriptor:u},p={region:"",metricName:"",metricUnit:"",period:void 0,dimensionObject:null,instance:"",instanceAlias:"VpnGatewayId",queries:{Limit:20,Offset:0,"vpc-id":[],"vpn-gateway-id":[],"vpn-gateway-name":[],type:{},"public-ip-address":[],"renew-flag":{},zone:[]}};function d(e){return void 0===e&&(e={}),Object(r.d)(e,!0)}t.default=p},function(e,t,n){"use strict";n.r(t),n.d(t,"VPNXFilterFieldsDescriptor",(function(){return u})),n.d(t,"templateQueryIdMap",(function(){return s})),n.d(t,"VPNXInstanceAliasList",(function(){return c})),n.d(t,"VPNXInvalidDemensions",(function(){return a})),n.d(t,"namespace",(function(){return i})),n.d(t,"queryEditorName",(function(){return o})),n.d(t,"queryEditorConfig",(function(){return l})),n.d(t,"VPNXGetInstanceQueryParams",(function(){return d}));var r=n(5),i="QCE/VPNX",o="vpnxQuery",a={vpnConnId:"VpnConnectionId"},c=["VpnConnectionId","VpnConnectionName"],s={instance:"VpnConnectionId"},u=[{key:"Offset",enDescriptor:"Offset",cnDescriptor:"偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项",link:"",type:"inputNumber",min:0},{key:"Limit",enDescriptor:"Limit",cnDescriptor:"单次请求返回的数量,默认为20,最小值为1,最大值为100",link:"",type:"inputNumber",min:1,max:100},{key:"vpc-id",enDescriptor:"vpc-id",cnDescriptor:"VPC实例ID",link:"",type:"inputMulti"},{key:"vpn-gateway-id",enDescriptor:"vpn-gateway-id",cnDescriptor:"VPN实例ID",link:"",type:"inputMulti"},{key:"customer-gateway-id ",enDescriptor:"customer-gateway-id ",cnDescriptor:"对端网关实例ID",link:"",type:"inputMulti"},{key:"vpn-connection-name",enDescriptor:"vpn-connection-name",cnDescriptor:"通道名称",link:"",type:"inputMulti"},{key:"vpn-connection-id",enDescriptor:"vpn-connection-id",cnDescriptor:"通道实例ID",link:"",type:"inputMulti"}],l={instanceDocUrl:"https://cloud.tencent.com/document/api/215/17515",namespace:i,fieldDescriptor:u},p={region:"",metricName:"",metricUnit:"",period:void 0,dimensionObject:null,instance:"",instanceAlias:"VpnConnectionId",queries:{Limit:20,Offset:0,"vpc-id":[],"vpn-gateway-id":[],"customer-gateway-id":[],"vpn-connection-name":[],"vpn-connection-id":[]}};function d(e){return void 0===e&&(e={}),Object(r.d)(e,!0)}t.default=p},function(e,t,n){"use strict";n.r(t),n.d(t,"LighthouseFilterFieldsDescriptor",(function(){return a})),n.d(t,"LIGHTHOUSEInstanceAliasList",(function(){return u})),n.d(t,"LighthouseInvalidDemensions",(function(){return l})),n.d(t,"templateQueryIdMap",(function(){return p})),n.d(t,"modifyDimensons",(function(){return d})),n.d(t,"LIGHTHOUSEGetInstanceQueryParams",(function(){return s}));var r=n(0),i=n.n(r),o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&(t.InstanceIds=i.a.uniq(n).slice(0,100))}}else if(e.filtersChecked){var r=[];i.a.forEach(e.Filters,(function(e,t){r.length>9||(i.a.isArray(e)?(e=i.a.compact(e)).length>0&&r.push({Name:t,Values:i.a.uniq(e).slice(0,5)}):i.a.isObject(e)&&(i.a.isEmpty(i.a.get(e,"value",[]))||r.push({Name:t,Values:i.a.get(e,"value",[]).slice(0,5)})))})),r.length>0&&(t.Filters=r)}return t}var u=["InstanceId","InstanceName","PrivateIpAddresses","PublicIpAddresses"],l={instanceid:"InstanceId"},p={instance:"InstanceId"};function d(e){var t=i.a.cloneDeep(e);return t.Dimensions.forEach((function(e){e.Dimensions=["InstanceId"]})),t}t.default=c},function(e,t,n){"use strict";n.r(t),n.d(t,"CFSQueryDescriptor",(function(){return o})),n.d(t,"CFSInstanceAliasList",(function(){return s})),n.d(t,"CFSInvalidDemensions",(function(){return u})),n.d(t,"templateQueryIdMap",(function(){return p})),n.d(t,"regionSupported",(function(){return l})),n.d(t,"CFSGetInstanceQueryParams",(function(){return c}));var r=n(0),i=n.n(r),o=[{key:"Offset",enDescriptor:"Offset",cnDescriptor:"偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项",link:"",type:"inputnumber",min:0},{key:"Limit",enDescriptor:"Limit",cnDescriptor:"单次请求返回的数量,默认为20,最小值为1,最大值为100",link:"",type:"inputnumber",min:1,max:100},{key:"FileSystemId",enDescriptor:"File System Id",cnDescriptor:"文件系统 ID",link:"",type:"input"},{key:"VpcId",enDescriptor:"VpcId",cnDescriptor:"私有网络(VPC) ID",link:"",type:"input"},{key:"SubnetId",enDescriptor:"SubnetId",cnDescriptor:"子网 ID",link:"",type:"input"}],a={region:"",metricName:"",metricUnit:"",period:void 0,dimensionObject:null,instance:"",instanceAlias:"FileSystemId",version:"",queries:{Offset:0,Limit:20,FileSystemId:"",VpcId:"",SubnetId:""}};function c(e){void 0===e&&(e={});var t={};return i.a.isEmpty(e)||(t.Limit=i.a.get(e,"Limit",20)||20,t.Offset=i.a.get(e,"Offset",0)||0,e=i.a.omit(e,["Offset","Limit"]),i.a.forEach(e,(function(e,n){i.a.isArray(e)?(e=i.a.compact(e)).length>0&&(t[n]=i.a.uniq(e)):i.a.isObject(e)?!i.a.isNumber(i.a.get(e,"value",void 0))&&i.a.isEmpty(i.a.get(e,"value",void 0))||(t[n]=i.a.get(e,"value")):!i.a.isNumber(e)&&i.a.isEmpty(e)||(t[n]=e)}))),t}var s=["FileSystemId","FsName"],u={},l=[{value:"ap-beijing"},{value:"ap-chengdu"},{value:"ap-chongqing"},{value:"ap-guangzhou"},{value:"ap-hongkong"},{value:"ap-mumbai"},{value:"ap-nanjing"},{value:"ap-seoul"},{value:"ap-shanghai"},{value:"ap-shanghai-fsi"},{value:"ap-shenzhen-fsi"},{value:"ap-singapore"},{value:"ap-tokyo"},{value:"eu-frankfurt"},{value:"na-siliconvalley"},{value:"na-toronto"}],p={instance:"InstanceId"};t.default=a},function(e,t,n){"use strict";n.r(t),n.d(t,"InstanceQueryDescriptor",(function(){return o})),n.d(t,"InvalidDemensions",(function(){return c})),n.d(t,"templateQueryIdMap",(function(){return s})),n.d(t,"InstanceAliasList",(function(){return u})),n.d(t,"GetInstanceQueryParams",(function(){return a}));var r=n(0),i=n.n(r),o=[{key:"Offset",enDescriptor:"Offset",cnDescriptor:"偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项",link:"",type:"inputNumber",min:0},{key:"Limit",enDescriptor:"Limit",cnDescriptor:"单次请求返回的数量,默认为10,最小值为1,最大值为100",link:"",type:"inputNumber",min:1,max:50},{key:"QueueName",enDescriptor:"QueueName",cnDescriptor:"精确匹配QueueName",link:"",type:"input"},{key:"TagKey",enDescriptor:"TagKey",cnDescriptor:"标签搜索",link:"",type:"input"}];function a(e){void 0===e&&(e={});var t={};return i.a.isEmpty(e)||(t.Limit=i.a.get(e,"Limit",20)||20,t.Offset=i.a.get(e,"Offset",0)||0,e=i.a.omit(e,["Offset","Limit"]),i.a.forEach(e,(function(e,n){i.a.isArray(e)?(e=i.a.compact(e)).length>0&&(t[n]=i.a.uniq(e)):i.a.isObject(e)?!i.a.isNumber(i.a.get(e,"value",void 0))&&i.a.isEmpty(i.a.get(e,"value",void 0))||(t[n]=i.a.get(e,"value")):!i.a.isNumber(e)&&i.a.isEmpty(e)||(t[n]=e)}))),t}var c={queueId:"QueueId",queueName:"QueueName"},s={instance:"QueueName"},u=["QueueName","QueueId"];t.default={region:"",metricName:"",metricUnit:"",period:void 0,dimensionObject:null,instance:"",instanceAlias:"QueueName",queries:{Offset:0,Limit:20,QueueName:"",TagKey:""}}},function(e,t,n){"use strict";n.r(t),n.d(t,"CVMFilterFieldsDescriptor",(function(){return a})),n.d(t,"CVMInstanceAliasList",(function(){return u})),n.d(t,"isValidMetric",(function(){return d})),n.d(t,"modifyDimensons",(function(){return f})),n.d(t,"templateQueryIdMap",(function(){return p})),n.d(t,"CVMGetInstanceQueryParams",(function(){return s}));var r=n(0),i=n.n(r),o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&(t.InstanceIds=i.a.uniq(n).slice(0,100))}}else if(e.filtersChecked){var r=[];i.a.forEach(e.Filters,(function(e,t){r.length>9||(i.a.isArray(e)?(e=i.a.compact(e)).length>0&&r.push({Name:t,Values:i.a.uniq(e).slice(0,5)}):i.a.isObject(e)&&(i.a.isEmpty(i.a.get(e,"value",[]))||r.push({Name:t,Values:i.a.get(e,"value",[]).slice(0,5)})))})),r.length>0&&(t.Filters=r)}return t}var u=["InstanceId","InstanceName","PrivateIpAddresses","PublicIpAddresses"],l=["CPUUsage","CpuLoadavg","Cpuloadavg5m","Cpuloadavg15m","BaseCpuUsage","GpuMemTotal","GpuMemUsage","GpuMemUsed","GpuPowDraw","GpuPowLimit","GpuPowUsage","GpuTemp","GpuUtil","LanOuttraffic","LanIntraffic","LanOutpkg","LanInpkg","WanOuttraffic","WanIntraffic","WanOutpkg","WanInpkg","AccOuttraffic","TcpCurrEstab","TimeOffset","MemUsed","MemUsage","CvmDiskUsage","BaseCpuUsage","VmDiskReadIops"],p={instance:"InstanceId"};function d(e){var t=i.a.map(l,i.a.toUpper);return-1!==i.a.indexOf(t,i.a.toUpper(e.MetricName))}function f(e){var t=i.a.cloneDeep(e);return t.Dimensions.forEach((function(e){e.Dimensions=["InstanceId"]})),t}t.default=c},function(e,t,n){"use strict";n.r(t),n.d(t,"PCXInstanceAliasList",(function(){return u})),n.d(t,"PCXFieldsDescriptor",(function(){return s})),n.d(t,"templateQueryIdMap",(function(){return l})),n.d(t,"namespace",(function(){return a})),n.d(t,"PCXGetInstanceQueryParams",(function(){return p}));var r=n(0),i=n.n(r),o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&(t[n]=i.a.uniq(e)):i.a.isObject(e)?!i.a.isNumber(i.a.get(e,"value",void 0))&&i.a.isEmpty(i.a.get(e,"value",void 0))||(t[n]=i.a.get(e,"value")):!i.a.isNumber(e)&&i.a.isEmpty(e)||(t[n]=e)}))),t}t.default=c},function(e,t,n){"use strict";n.r(t),n.d(t,"RedisFieldsDescriptor",(function(){return a})),n.d(t,"RedisInvalidDemensions",(function(){return p})),n.d(t,"templateQueryIdMap",(function(){return d})),n.d(t,"REDISInstanceAliasList",(function(){return l})),n.d(t,"isValidMetric",(function(){return u})),n.d(t,"REDISGetInstanceQueryParams",(function(){return s}));var r=n(0),i=n.n(r),o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&(t[n]=i.a.uniq(e)):i.a.isObject(e)?!i.a.isNumber(i.a.get(e,"value",void 0))&&i.a.isEmpty(i.a.get(e,"value",void 0))||(t[n]=i.a.get(e,"value")):!i.a.isNumber(e)&&i.a.isEmpty(e)||(t[n]=e)}))),t}function u(e){void 0===e&&(e={});var t=i.a.get(e,"Dimensions[0].Dimensions");return 1===t.length&&-1!==i.a.indexOf(t,"instanceid")}var l=["InstanceId","InstanceName","WanIp"],p={redis_uuid:"InstanceId",instanceid:"InstanceId"},d={instance:"InstanceId"};t.default=c},function(e,t,n){"use strict";n.r(t),n.d(t,"TSFInvalidDemensions",(function(){return s})),n.d(t,"templateQueryIdMap",(function(){return u})),n.d(t,"TSFInstanceAliasList",(function(){return c})),n.d(t,"TSFFieldsDescriptor",(function(){return i})),n.d(t,"TSFGetInstanceQueryParams",(function(){return a}));var r=n(5),i=[{key:"Offset",enDescriptor:"Offset",cnDescriptor:"偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项",link:"",type:"inputnumber",min:0},{key:"Limit",enDescriptor:"Limit",cnDescriptor:"单次请求返回的数量,默认为20,最小值为1,最大值为100",link:"",type:"inputnumber",min:1,max:100},{key:"SearchWord",enDescriptor:"SearchWord",cnDescriptor:"搜索关键字",link:"",type:"input"},{key:"ApplicationIdList",enDescriptor:"ApplicationIdList",cnDescriptor:"应用ID 组成的数组",link:"",type:"inputmulti"},{key:"ApplicationType",enDescriptor:"ApplicationType",cnDescriptor:"应用类型",link:"",type:"select",list:[{text:"所有",value:""},{text:"容器应用",value:"C"},{text:"普通应用/虚拟机应用",value:"V"}]},{key:"MicroserviceType",enDescriptor:"MicroserviceType",cnDescriptor:"应用的微服务类型",link:"",type:"select",list:[{text:"所有",value:""},{text:"普通应用",value:"N"},{text:"Mesh应用",value:"M"},{text:"微服务网关应用",value:"G"},{text:"原生应用",value:"NATIVE"}]},{key:"ApplicationResourceTypeList",enDescriptor:"ApplicationResourceTypeList",cnDescriptor:"应用资源类型数组",link:"",type:"select",multiple:!0,list:[{text:"默认资源类型",value:"DEF"},{text:"微服务网关资源",value:"GW"}]}],o={region:"",metricName:"",metricUnit:"",period:void 0,dimensionObject:null,instance:"",instanceAlias:"ApplicationId",queries:{Limit:20,Offset:0,SearchWord:"",OrderBy:"",OrderType:null,ApplicationType:"",MicroserviceType:"",ApplicationResourceTypeList:[],ApplicationIdList:[]}};function a(e){return void 0===e&&(e={}),Object(r.d)(e,!1)}var c=["ApplicationId","ApplicationName"],s={applicationid:"ApplicationId"},u={instance:"ApplicationId"};t.default=o},function(e,t,n){"use strict";n.r(t),n.d(t,"BWPFilterFieldsDescriptor",(function(){return a})),n.d(t,"templateQueryIdMap",(function(){return l})),n.d(t,"BWPInstanceAliasList",(function(){return u})),n.d(t,"BWPInvalidDemensions",(function(){return p})),n.d(t,"BWPGetInstanceQueryParams",(function(){return s}));var r=n(0),i=n.n(r),o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&(t.BandwidthPackageIds=i.a.uniq(n).slice(0,100))}}else if(e.filtersChecked){var r=[];i.a.forEach(e.Filters,(function(e,t){r.length>9||(i.a.isArray(e)?(e=i.a.compact(e)).length>0&&r.push({Name:t,Values:i.a.uniq(e).slice(0,5)}):i.a.isObject(e)&&(i.a.isEmpty(i.a.get(e,"value",[]))||r.push({Name:t,Values:i.a.get(e,"value",[]).slice(0,5)})))})),r.length>0&&(t.Filters=r)}return t}var u=["BandwidthPackageId","BandwidthPackageName"],l={instance:"BandwidthPackageId"},p={bandwidthPackageId:"BandwidthPackageId"};t.default=c},function(e,t,n){"use strict";n.r(t),n.d(t,"CDNFilterFieldsDescriptor",(function(){return a})),n.d(t,"templateQueryIdMap",(function(){return p})),n.d(t,"CDNInstanceAliasList",(function(){return u})),n.d(t,"CDNInvalidDemensions",(function(){return l})),n.d(t,"CDNGetInstanceQueryParams",(function(){return s}));var r=n(0),i=n.n(r),o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&n.push({Name:t,Value:i.a.uniq(e).slice(0,5)}):i.a.isObject(e)&&(i.a.isEmpty(i.a.get(e,"value",[]))||n.push({Name:t,Value:i.a.get(e,"value",[]).slice(0,5)}))})),n.length>0&&(t.Filters=n)}return t}var u=["Domain","ProjectId"],l={projectId:"ProjectId",domain:"Domain"},p={instance:"Domain"};t.default=c},function(e,t,n){"use strict";n.r(t),n.d(t,"LBFilterDescriptor",(function(){return a})),n.d(t,"LBInstanceAliasList",(function(){return u})),n.d(t,"LBInvalidDemensions",(function(){return l})),n.d(t,"templateQueryIdMap",(function(){return p})),n.d(t,"LBGetInstanceQueryParams",(function(){return s}));var r,i=n(0),o=n.n(i),a=[{key:"address-id",enDescriptor:"Address ID",cnDescriptor:"EIP 的唯一 ID ",link:"",type:"inputmulti"},{key:"address-name",enDescriptor:"Address Name",cnDescriptor:"EIP 名称 ",link:"",type:"inputmulti"},{key:"address-ip",enDescriptor:"Address IP",cnDescriptor:"EIP 的 IP 地址 ",link:"",type:"inputmulti"},{key:"address-status",enDescriptor:"Address Status",cnDescriptor:"EIP 的状态",link:"",type:"select",list:[{value:"CREATING",text:"CREATING"},{value:"BINDING",text:"BINDING"},{value:"BIND",text:"BIND"},{value:"UNBINDING",text:"UNBINDING"},{value:"UNBIND",text:"UNBIND"},{value:"OFFLINING",text:"OFFLINING"},{value:"BIND_ENI",text:"BIND_ENI"}]},{key:"instance-id",enDescriptor:"Instance ID",cnDescriptor:"实例ID ",link:"",type:"inputmulti"},{key:"private-ip-address",enDescriptor:"Private IP Address",cnDescriptor:"EIP 绑定的内网 IP",link:"",type:"inputmulti"},{key:"network-interface-id",enDescriptor:"Network Interface ID",cnDescriptor:"EIP 绑定的弹性网卡 ID",link:"",type:"inputmulti"},{key:"is-arrears",enDescriptor:"Arrears",cnDescriptor:"EIP 是否欠费 ",link:"",type:"select",list:[{text:"正常",value:"FALSE"},{text:"欠费",value:"TRUE"}]}],c={region:"",metricName:"",metricUnit:"",period:void 0,dimensionObject:null,instance:"",instanceAlias:"AddressId",version:"",queries:(r={Offset:0,Limit:20},r.AddressIds=[""],r.Filters={"address-id":[],"address-name":[],"address-ip":[],"address-status ":[],"instance-id ":[],"private-ip-address":[],"network-interface-id ":[],"is-arrears ":[]},r)};function s(e){void 0===e&&(e={});var t={};if(!o.a.isEmpty(e))if(t.Limit=o.a.get(e,"Limit",20)||20,t.Offset=o.a.get(e,"Offset",0)||0,e.instanceIdsChecked){if(o.a.isArray(e.AddressIds)){var n=o.a.compact(e.AddressIds);o.a.uniq(n).length>0&&(t.AddressIds=o.a.uniq(n).slice(0,100))}}else if(e.filtersChecked){var r=[];o.a.forEach(e.Filters,(function(e,t){r.length>9||(o.a.isArray(e)?(e=o.a.compact(e)).length>0&&r.push({Name:t,Values:o.a.uniq(e).slice(0,5)}):o.a.isObject(e)&&(o.a.isEmpty(o.a.get(e,"value",[]))||r.push({Name:t,Values:o.a.get(e,"value",[]).slice(0,5)})))})),r.length>0&&(t.Filters=r)}return t}var u=["AddressId","AddressName","AddressIp"],l={eip:"AddressIp"},p={instance:"AddressId"};t.default=c},function(e,t,n){"use strict";n.r(t),n.d(t,"NATGatewayFilterFieldsDescriptor",(function(){return c})),n.d(t,"NATGATEWAYInstanceAliasList",(function(){return a})),n.d(t,"templateQueryIdMap",(function(){return l})),n.d(t,"NATInvalidDemensions",(function(){return p})),n.d(t,"NATGATEWAYGetInstanceQueryParams",(function(){return u}));var r=n(0),i=n.n(r),o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&(t.InstanceIds=i.a.uniq(n).slice(0,100))}}else if(e.filtersChecked){var r=[];i.a.forEach(e.Filters,(function(e,t){r.length>9||(i.a.isArray(e)?(e=i.a.compact(e)).length>0&&r.push({Name:t,Values:i.a.uniq(e).slice(0,5)}):i.a.isObject(e)&&(i.a.isEmpty(i.a.get(e,"value",[]))||r.push({Name:t,Values:i.a.get(e,"value",[]).slice(0,5)})))})),r.length>0&&(t.Filters=r)}return t}var l={instance:"NatGatewayId"},p={natId:"NatGatewayId"};t.default=s},function(e,t,n){"use strict";n.r(t),n.d(t,"OVCDNFilterFieldsDescriptor",(function(){return a})),n.d(t,"OVCDNInstanceAliasList",(function(){return u})),n.d(t,"templateQueryIdMap",(function(){return p})),n.d(t,"OVCDNInvalidDemensions",(function(){return l})),n.d(t,"OVCDNGetInstanceQueryParams",(function(){return s}));var r=n(0),i=n.n(r),o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&n.push({Name:t,Value:i.a.uniq(e).slice(0,5)}):i.a.isObject(e)&&(i.a.isEmpty(i.a.get(e,"value",[]))||n.push({Name:t,Value:i.a.get(e,"value",[]).slice(0,5)}))})),n.length>0&&(t.Filters=n)}return t}var u=["Domain","ResourceId"],l={projectId:"ProjectId",domain:"Domain"},p={instance:"Domain"};t.default=c},,function(e,t){e.exports=i},,,,,function(e,t,n){"use strict";n.r(t),n.d(t,"TKEFilterFieldsDescriptor",(function(){return a})),n.d(t,"TKEInstanceAliasList",(function(){return c})),n.d(t,"TKEGetInstanceQueryParams",(function(){return s}));var r=n(0),i=n.n(r),o={region:"",metricName:"",metricUnit:"",period:void 0,dimensionObject:null,instance:"",instanceAlias:"ClusterId",conditions:[],groupBys:"",queries:{Limit:20,Offset:0,instanceIdsChecked:!1,filtersChecked:!0,ClusterIds:[""],Filters:{ClusterName:[],ClusterType:[],ClusterStatus:[],"tag-key":[]}}},a=[{key:"ClusterName",enDescriptor:"Cluster Name",cnDescriptor:"集群名",link:"",type:"input"},{key:"ClusterType",enDescriptor:"Cluster Type",cnDescriptor:"集群类型",link:"",type:"inputmulti"},{key:"ClusterStatus",enDescriptor:"Cluster Status",cnDescriptor:"集群状态",link:"",type:"inputmulti"},{key:"Tags",enDescriptor:"Tags",cnDescriptor:"标签键值对",link:"",type:"inputmulti"},{key:"vpc-id",enDescriptor:"VPC",cnDescriptor:"VPC",link:"",type:"input"},{key:"tag-key",enDescriptor:"Tag Key",cnDescriptor:"标签键",link:"",type:"inputmulti"},{key:"tag-value",enDescriptor:"Tag Value",cnDescriptor:"标签值",link:"",type:"inputmulti"}],c=["ClusterId","ClusterName"];function s(e){void 0===e&&(e={});var t={};if(!i.a.isEmpty(e))if(t.Limit=i.a.get(e,"Limit",20)||20,t.Offset=i.a.get(e,"Offset",0)||0,e.instanceIdsChecked){if(i.a.isArray(e.InstanceIds)){var n=i.a.compact(e.InstanceIds);i.a.uniq(n).length>0&&(t.InstanceIds=i.a.uniq(n).slice(0,100))}}else if(e.filtersChecked){var r=[];i.a.forEach(e.Filters,(function(e,t){r.length>9||(i.a.isArray(e)?(e=i.a.compact(e)).length>0&&r.push({Name:t,Values:i.a.uniq(e).slice(0,5)}):i.a.isObject(e)&&(i.a.isEmpty(i.a.get(e,"value",[]))||r.push({Name:t,Values:i.a.get(e,"value",[]).slice(0,5)})))})),r.length>0&&(t.Filters=r)}return t}t.default=o},function(e,t,n){"use strict";n.r(t);var r,i=n(23),o=n(3),a=n(2),c=n(5),s=n(9),u=n(1),l=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),p=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function c(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},d=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0?w.map((function(e){return{TopicId:e.TopicId,TopicName:e.TopicName}})):I,PartitionList:C.length>0?C:D}]}}))}))},t.prototype.formatTopicVarDisplay=function(e,t,n){var r=this;return t?t.replace(/\$\{(\w+)\}/g,(function(t,n){return n&&r.TopicAliasList.includes(n)?r.getAliasValue(e,n):""})):this.getAliasValue(e,n)},t.prototype.fetchMetricData=function(e,t,n,r){return d(this,void 0,void 0,(function(){var i,o,a,c,s,p,d,m,y,h=this;return f(this,(function(f){switch(f.label){case 0:return i=r.topicalias,o=r.groupname,a=r.topicid,[4,this.getConsumerGroups(t,{InstanceId:n.InstanceId,groupname:o,topicid:a})];case 1:return c=f.sent(),s=r.display,p=c.TopicList,d=c.GroupList,m=c.PartitionList,i=this.TopicAliasList.includes(i)?i:this.templateQueryIdMap.topicId,y={GroupList:d.map((function(e){return e._InstanceAliasValue=e.GroupName,{text:e.GroupName,value:e[u.templateQueryIdMap.groupName]}})),TopicList:p.map((function(e){var t=h.formatTopicVarDisplay(e,s,i);return e._InstanceAliasValue=t||e[u.templateQueryIdMap.topicId],{text:t||e[u.templateQueryIdMap.topicId],value:e[u.templateQueryIdMap.topicId],TopicName:e.TopicName}})),PartitionList:m.map((function(e){return e._InstanceAliasValue=e[u.templateQueryIdMap.partition],{text:e[u.templateQueryIdMap.partition],value:e[u.templateQueryIdMap.partition]}}))},[4,l.a.setExtraStorage(this.service,this.keyInStorage.TopicList,p)];case 2:return f.sent(),[4,l.a.setExtraStorage(this.service,this.keyInStorage.GroupList,d)];case 3:return f.sent(),[4,l.a.setExtraStorage(this.service,this.keyInStorage.PartitionList,m)];case 4:switch(f.sent(),e){case"DescribeTopicList":return[2,y.TopicList];case"DescribeGroup":return[2,y.GroupList];case"DescribePartion":return[2,y.PartitionList];default:return[2,[]]}return[2]}}))}))},t}(s.BaseDatasource);t.default=m},function(e,t,n){"use strict";n.r(t);var r,i=n(12),o=n(3),a=n(0),c=n.n(a),s=n(2),u=n(5),l=n(9),p=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),d=function(){return(d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=i)return r;var o=Object(s.k)(i,50),a=[];return c.a.forEach(o,(function(t){a.push(n.getInstances(e,t))})),Promise.all(a).then((function(e){return c.a.forEach(e,(function(e){r=c.a.concat(r,e)})),r})).catch((function(e){return r}))}))},t.prototype.getVpcId=function(e,t){void 0===t&&(t={}),(t=l({Offset:0,Limit:20},t)).Offset=String(t.Offset),t.Limit=String(t.Limit);var n=Object(s.e)(e,"vpc");return this.doRequest({url:this.url+n.path,data:t},n.service,{region:e,action:"DescribeVpcs"}).then((function(e){return c.a.map(e.VpcSet||[],(function(e){return{text:e.VpcId,value:e.VpcId}}))}))},t.prototype.getVpcIds=function(e){var t=this,n=[],r={Offset:0,Limit:100};r.Offset=String(r.Offset),r.Limit=String(r.Limit);var i=Object(s.e)(e,"vpc");return this.doRequest({url:this.url+i.path,data:r},i.service,{region:e,action:"DescribeVpcs"}).then((function(r){n=c.a.map(r.VpcSet||[],(function(e){return{text:e.VpcId,value:e.VpcId}}));var i=r.TotalCount||0;if(n.length>=i)return n;var o=Object(s.k)(i,100),a=[];return c.a.forEach(o,(function(n){a.push(t.getVpcId(e,n))})),Promise.all(a).then((function(e){return c.a.forEach(e,(function(e){n=c.a.concat(n,e)})),n})).catch((function(e){return n}))}))},t.prototype.doRequestV2=function(e,t,n){return void 0===n&&(n={}),p(this,void 0,void 0,(function(){return d(this,(function(r){switch(r.label){case 0:return[4,Object(s.d)(e,t,n,this.secretId,this.instanceSettings.id,this.backendSrv)];case 1:return e=r.sent(),[2,this.backendSrv.datasourceRequest(e).then((function(e){return c.a.get(e,"data",{})})).catch((function(e){throw e}))]}}))}))},t}(o.BaseDatasource);t.default=f},function(e,t,n){"use strict";n.r(t);var r,i=n(41),o=n(3),a=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=function(e){function t(t,n,r){var o=e.call(this,t,n,r)||this;return o.Namespace=i.namespace,o.InstanceAliasList=i.POSTGRESInstanceAliasList,o.InvalidDimensions=i.PostgreInvalidDemensions,o.templateQueryIdMap=i.templateQueryIdMap,o.InstanceReqConfig={service:"postgres",action:"DescribeDBInstances",responseField:"DBInstanceSet"},o.MetricReqConfig={resultFilter:i.modifyDimensons},o}return a(t,e),t}(o.BaseDatasource);t.default=c},function(e,t,n){"use strict";n.r(t);var r,i=n(0),o=n(51),a=n(3),c=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function c(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},u=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0?"_".concat(r.timeshift):"";return{target:"".concat(e.MetricName," - ").concat(o).concat(a),datapoints:Object(i.map)(t.Values,(function(e){return[e.Value,1e3*e.Timestamp+d]}))}}))})))}))},t}(c.BaseDatasource);t.default=p},function(e,t,n){"use strict";n.r(t);var r,i=n(62),o=n(3),a=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=function(e){function t(t,n,r){var o=e.call(this,t,n,r)||this;return o.Namespace="QCE/TSF",o.InstanceAliasList=i.TSFInstanceAliasList,o.InvalidDimensions=i.TSFInvalidDemensions,o.templateQueryIdMap=i.templateQueryIdMap,o.InstanceReqConfig={service:"tsf",action:"DescribeApplications",responseField:"Content"},o}return a(t,e),t}(o.BaseDatasource);t.default=c},function(e,t,n){"use strict";n.r(t);var r,i=n(25),o=n(3),a=n(0),c=n.n(a),s=n(2),u=n(1),l=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),p=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function c(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},d=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\x3c!-- 起始区域 目的区域等 --\x3e\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n\n',controller:u,restrict:"E",scope:{target:"=",showDetail:"=",region:"=",datasource:"=",getDropdownOptions:"&",onChange:"&",onRefresh:"&",dims:"="}}}i.a.directive(o.queryEditorName,l)},function(e,t,n){"use strict";n.r(t);var r=n(7),i=n(31);Object(r.default)(i.queryEditorName,i.queryEditorConfig)},function(e,t,n){"use strict";n.r(t);var r=n(7),i=n(32);Object(r.default)(i.queryEditorName,i.queryEditorConfig)},function(e,t,n){"use strict";n.r(t);var r=n(7),i=n(33);Object(r.default)(i.queryEditorName,i.queryEditorConfig)},function(e,t,n){"use strict";n.r(t),n.d(t,"BWPQueryCtrl",(function(){return a})),n.d(t,"bwpQuery",(function(){return c}));var r=n(6),i=n.n(r),o=n(63),a=function(){function e(e,t){e.init=function(){e.BWPFilterFieldsDescriptor=o.BWPFilterFieldsDescriptor},e.onChecked=function(t,n){!0===e.target.queries[t]&&(e.target.queries[n]=!1),e.onChange()},e.getDropdown=function(t){switch(t){case"zone":return e.getZones();default:return[]}},e.getZones=function(){return e.region?e.datasource.getZones("cvm",e.region):[]},e.init()}return e.$inject=["$scope","$rootScope"],e}();function c(){return{template:'\n
\n\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n \n \n \n
\n
\n\n
\n',controller:a,restrict:"E",scope:{target:"=",showDetail:"=",region:"=",datasource:"=",getDropdownOptions:"&",onChange:"&"}}}i.a.directive("bwpQuery",c)},function(e,t,n){"use strict";n.r(t);var r=n(7),i=n(34);Object(r.default)(i.queryEditorName,i.queryEditorConfig)},function(e,t,n){"use strict";n.r(t),n.d(t,"CDBQueryCtrl",(function(){return a})),n.d(t,"cdbQuery",(function(){return c}));var r=n(6),i=n.n(r),o=n(44),a=function(){function e(e,t){e.init=function(){e.CDBFieldsDescriptor=o.CDBFieldsDescriptor},e.onChecked=function(t,n){!0===e.target.queries[t]&&(e.target.queries[n]=!1),e.onChange()},e.getDropdown=function(t){switch(t){case"ZoneIds":return e.getZones();default:return[]}},e.getZones=function(){return e.region?e.datasource.getZones("cdb",e.region):[]},e.init()}return e.$inject=["$scope","$rootScope"],e}();function c(){return{template:'\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n',controller:a,restrict:"E",scope:{target:"=",showDetail:"=",region:"=",datasource:"=",getDropdownOptions:"&",onChange:"&"}}}i.a.directive("cdbQuery",c)},function(e,t,n){"use strict";n.r(t),n.d(t,"CDNQueryCtrl",(function(){return a})),n.d(t,"cdnQuery",(function(){return c}));var r=n(6),i=n.n(r),o=n(64),a=function(){function e(e,t){e.init=function(){e.CDNFilterFieldsDescriptor=o.CDNFilterFieldsDescriptor},e.init()}return e.$inject=["$scope","$rootScope"],e}();function c(){return{template:'\n
\n\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n\n\n\n\n
\n\n
\n',controller:a,restrict:"E",scope:{target:"=",showDetail:"=",region:"=",datasource:"=",getDropdownOptions:"&",onChange:"&"}}}i.a.directive("cdnQuery",c)},function(e,t,n){"use strict";n.r(t),n.d(t,"QueryCtrl",(function(){return l})),n.d(t,"sQuery",(function(){return p}));var r=n(6),i=n.n(r),o=n(35),a=n(2),c=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function c(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},s=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\x3c!-- 起始区域 目的区域等 --\x3e\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n\n',controller:l,restrict:"E",scope:{target:"=",showDetail:"=",region:"=",datasource:"=",getDropdownOptions:"&",onChange:"&",onRefresh:"&",dims:"="}}}i.a.directive(o.queryEditorName,p)},function(e,t,n){"use strict";n.r(t);var r=n(7),i=n(36);Object(r.default)(i.queryEditorName,i.queryEditorConfig)},function(e,t,n){"use strict";n.r(t);var r=n(7),i=n(45);Object(r.default)(i.queryEditorName,i.queryEditorConfig)},function(e,t,n){"use strict";n.r(t),n.d(t,"SCFQueryCtrl",(function(){return s})),n.d(t,"scfQuery",(function(){return u}));var r=n(6),i=n.n(r),o=n(57),a=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function c(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},c=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n \n',controller:s,restrict:"E",scope:{target:"=",showDetail:"=",region:"=",datasource:"=",getDropdownOptions:"&",onChange:"&"}}}i.a.directive("cfsQuery",u)},function(e,t,n){"use strict";n.r(t),n.d(t,"CKAFKAQueryCtrl",(function(){return l})),n.d(t,"scfQuery",(function(){return p}));var r=n(6),i=n.n(r),o=n(11),a=n(5),c=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function c(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},s=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\x3c!-- 主题,消费分组,分区 --\x3e\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n\n \n',controller:l,restrict:"E",scope:{target:"=",showDetail:"=",region:"=",datasource:"=",getDropdownOptions:"&",onChange:"&",onRefresh:"&",dims:"=",instance:"="},link:function(e,t,n){e.$watch("target.instance",(function(t,n){var r;null===(r=e.onInstanceChange)||void 0===r||r.call(e,t,n)}))}}}i.a.directive("ckafkaQuery",p)},function(e,t,n){"use strict";n.r(t),n.d(t,"QueryCtrl",(function(){return p})),n.d(t,"sQuery",(function(){return f}));var r=n(6),i=n.n(r),o=n(0),a=n(12),c=n(2),s=n(5),u=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function c(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},l=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n\x3c!--Listener维度部分--\x3e\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n \n
\n \n \n
\n
\n
\n');function f(){return{template:d,controller:p,restrict:"E",scope:{target:"=",namespace:"=",showDetail:"=",region:"=",datasource:"=",getDropdownOptions:"&",onChange:"&",onRefresh:"&",dims:"="},link:function(e,t,n){e.$watch("target.instance",(function(t,n){var r;null===(r=e.onInstanceChange)||void 0===r||r.call(e,t,n)}))}}}i.a.directive("clbQuery",f)},function(e,t,n){"use strict";n.r(t),n.d(t,"QueryCtrl",(function(){return a})),n.d(t,"sQuery",(function(){return c}));var r=n(6),i=n.n(r),o=n(29),a=function(){function e(e,t){e.init=function(){e.GSEFilterFieldsDescriptor=o.CLSFilterFieldsDescriptor},e.init()}return e.$inject=["$scope","$rootScope"],e}();function c(){return{template:'\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\x3c!-- 起始区域 目的区域等 --\x3e\n
\n
\n
\n \n \n
\n
\n
\n
\n',controller:a,restrict:"E",scope:{target:"=",showDetail:"=",region:"=",datasource:"=",getDropdownOptions:"&",onChange:"&",onRefresh:"&",dims:"="}}}i.a.directive(o.queryEditorName,c)},function(e,t,n){"use strict";n.r(t);var r=n(7),i=n(58);Object(r.default)("cmqQuery",{fieldDescriptor:i.InstanceQueryDescriptor,instanceDocUrl:"https://cloud.tencent.com/document/api/406/42624",namespace:"QCE/CMQ"})},function(e,t,n){"use strict";n.r(t),n.d(t,"CmqTopicQueryCtrl",(function(){return u})),n.d(t,"scfQuery",(function(){return l}));var r=n(6),i=n.n(r),o=n(37),a=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function c(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},c=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\x3c!-- 主题的ui --\x3e\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n\n \n',controller:u,restrict:"E",scope:{target:"=",showDetail:"=",region:"=",datasource:"=",getDropdownOptions:"&",onChange:"&",onRefresh:"&",dims:"="}}}i.a.directive("cmqTopicQuery",l)},function(e,t,n){"use strict";n.r(t),n.d(t,"InstanceAliasList",(function(){return a})),n.d(t,"GetInstanceQueryParams",(function(){return o}));var r=n(0),i=n.n(r);function o(e){void 0===e&&(e={});var t={};return i.a.isEmpty(e)||(t.Limit=i.a.get(e,"Limit",20)||20,t.Offset=i.a.get(e,"Offset",0)||0,e=i.a.omit(e,["Offset","Limit"]),i.a.forEach(e,(function(e,n){i.a.isArray(e)?(e=i.a.compact(e)).length>0&&(t[n]=i.a.uniq(e)):i.a.isObject(e)?!i.a.isNumber(i.a.get(e,"value",void 0))&&i.a.isEmpty(i.a.get(e,"value",void 0))||(t[n]=i.a.get(e,"value")):!i.a.isNumber(e)&&i.a.isEmpty(e)||(t[n]=e)}))),t}var a=["BucketName"];t.default={region:"",metricName:"",metricUnit:"",period:void 0,dimensionObject:null,instance:"",instanceAlias:"BucketName",queries:{}}},function(e,t,n){"use strict";n.r(t);var r=n(7),i=n(38);Object(r.default)(i.queryEditorName,i.queryEditorConfig)},function(e,t,n){"use strict";n.r(t),n.d(t,"CVMQueryCtrl",(function(){return a})),n.d(t,"cvmQuery",(function(){return c}));var r=n(6),i=n.n(r),o=n(59),a=function(){function e(e,t){e.init=function(){e.CVMFilterFieldsDescriptor=o.CVMFilterFieldsDescriptor},e.onChecked=function(t,n){!0===e.target.queries[t]&&(e.target.queries[n]=!1),e.onChange()},e.getDropdown=function(t){switch(t){case"zone":return e.getZones();default:return[]}},e.getZones=function(){return e.region?e.datasource.getZones("cvm",e.region):[]},e.init()}return e.$inject=["$scope","$rootScope"],e}();function c(){return{template:'\n
\n\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n \n \n \n
\n
\n\n
\n',controller:a,restrict:"E",scope:{target:"=",showDetail:"=",region:"=",datasource:"=",getDropdownOptions:"&",onChange:"&"}}}i.a.directive("cvmQuery",c)},function(e,t,n){"use strict";n.r(t);var r=n(7),i=n(27);Object(r.default)(i.queryEditorName,i.queryEditorConfig)},function(e,t,n){"use strict";n.r(t);var r=n(7),i=n(46);Object(r.default)(i.queryEditorName,i.queryEditorConfig)},function(e,t,n){"use strict";n.r(t),n.d(t,"QueryCtrl",(function(){return p})),n.d(t,"sQuery",(function(){return d}));var r=n(6),i=n.n(r),o=n(16),a=n(2),c=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function c(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},s=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\x3c!-- 起始区域 目的区域等 --\x3e\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n\n',controller:p,restrict:"E",scope:{target:"=",showDetail:"=",region:"=",datasource:"=",getDropdownOptions:"&",onChange:"&",onRefresh:"&",dims:"="}}}i.a.directive(o.queryEditorName,d)},function(e,t,n){"use strict";n.r(t);var r=n(7),i=n(47);Object(r.default)(i.queryEditorName,i.queryEditorConfig)},function(e,t,n){"use strict";n.r(t);var r=n(7),i=n(48);Object(r.default)(i.queryEditorName,i.queryEditorConfig)},function(e,t,n){"use strict";n.r(t);var r=n(7),i=n(39);Object(r.default)(i.queryEditorName,i.queryEditorConfig)},function(e,t,n){"use strict";n.r(t);var r=n(7),i=n(40);Object(r.default)(i.queryEditorName,i.queryEditorConfig)},function(e,t,n){"use strict";n.r(t),n.d(t,"QueryCtrl",(function(){return s})),n.d(t,"sQuery",(function(){return u}));var r=n(6),i=n.n(r),o=n(21),a=n(2),c=[{label:"diskId",field:"diskId"}],s=function(){function e(e,t){e.init=function(){e.ECMBLOCKSTORAGEFilterFieldsDescriptor=o.ECMBLOCKSTORAGEFilterFieldsDescriptor,e.ExtraFields=c,e.namespace=o.namespace},e.getExtraFields=function(){return c.filter((function(t){var n,r;return t.field in(null!==(n=e.dims)&&void 0!==n?n:{})||t.label in(null!==(r=e.dims)&&void 0!==r?r:{})}))},e.getExtraDropdown=function(t,n){var r=t.instance,i=Object(a.f)(e.namespace);r=e.datasource.getServiceFn(i,"getVariable")(r);try{return(r=JSON.parse(r)).DataDisks.map((function(e){return e._InstanceAliasValue=e[o.templateQueryIdMap.diskId],{text:e[o.templateQueryIdMap.diskId],value:JSON.stringify(e)}}))}catch(t){var c={InstanceId:r};return e.datasource.getServiceFn(i,"getDiskList")({payload:c}).map((function(e){return{text:e[o.templateQueryIdMap.diskId],value:JSON.stringify(e)}}))}},e.init()}return e.$inject=["$scope","$rootScope"],e}();function u(){return{template:'\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\x3c!-- 起始区域 目的区域等 --\x3e\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n',controller:s,restrict:"E",scope:{target:"=",showDetail:"=",region:"=",datasource:"=",getDropdownOptions:"&",onChange:"&",onRefresh:"&",dims:"="}}}i.a.directive(o.queryEditorName,u)},function(e,t,n){"use strict";n.r(t);var r=n(7),i=n(49);Object(r.default)(i.queryEditorName,i.queryEditorConfig)},function(e,t,n){"use strict";n.r(t),n.d(t,"QueryCtrl",(function(){return p})),n.d(t,"sQuery",(function(){return d}));var r=n(6),i=n.n(r),o=n(15),a=n(2),c=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function c(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},s=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\x3c!-- 起始区域 目的区域等 --\x3e\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n\n',controller:p,restrict:"E",scope:{target:"=",showDetail:"=",region:"=",datasource:"=",getDropdownOptions:"&",onChange:"&",onRefresh:"&",dims:"="}}}i.a.directive(o.queryEditorName,d)},function(e,t,n){"use strict";n.r(t),n.d(t,"LBQueryCtrl",(function(){return a})),n.d(t,"lbQuery",(function(){return c}));var r=n(6),i=n.n(r),o=n(65),a=function(){function e(e,t){e.init=function(){e.LBFilterDescriptor=o.LBFilterDescriptor},e.onChecked=function(t,n){!0===e.target.queries[t]&&(e.target.queries[n]=!1),e.onChange()},e.getDropdown=function(t){switch(t){case"zone":return e.getZones();default:return[]}},e.getZones=function(){return e.region?e.datasource.getZones("cvm",e.region):[]},e.init()}return e.$inject=["$scope","$rootScope"],e}();function c(){return{template:'\n
\n\n\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n\n\x3c!--Filters部分--\x3e\n
\n
\n \n \n \n \n \n
\n
\n\n
\n',controller:a,restrict:"E",scope:{target:"=",showDetail:"=",region:"=",datasource:"=",getDropdownOptions:"&",onChange:"&"}}}i.a.directive("lbQuery",c)},function(e,t,n){"use strict";n.r(t),n.d(t,"LighthouseQueryCtrl",(function(){return a})),n.d(t,"lighthouseQuery",(function(){return c}));var r=n(6),i=n.n(r),o=n(56),a=function(){function e(e,t){e.init=function(){e.LighthouseFilterFieldsDescriptor=o.LighthouseFilterFieldsDescriptor},e.onChecked=function(t,n){!0===e.target.queries[t]&&(e.target.queries[n]=!1),e.onChange()},e.getDropdown=function(t){switch(t){case"zone":return e.getZones();default:return[]}},e.getZones=function(){return e.region?e.datasource.getZones("lighthouse",e.region):[]},e.init()}return e.$inject=["$scope","$rootScope"],e}();function c(){return{template:'\n
\n \n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n \n \n \n
\n
\n
\n',controller:a,restrict:"E",scope:{target:"=",showDetail:"=",region:"=",datasource:"=",getDropdownOptions:"&",onChange:"&"}}}i.a.directive("lighthouseQuery",c)},function(e,t,n){"use strict";n.r(t),n.d(t,"MongoDBQueryCtrl",(function(){return p})),n.d(t,"mongodbQuery",(function(){return d}));var r=n(6),i=n.n(r),o=n(0),a=n(50),c=n(2),s=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function c(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},u=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]\n \n
\n
\n \n \n \n \n \n \n \n
\n
\n\n\n
\n
\n \n
\n \n \n
\n
\n
\n\n
\n
\n \n
\n \n \n
\n
\n
\n',controller:p,restrict:"E",scope:{target:"=",showDetail:"=",region:"=",datasource:"=",onRefresh:"&",onChange:"&"},link:function(e,t,n){e.$watch("target.instance",(function(t,n){var r;null===(r=e.onInstanceChange)||void 0===r||r.call(e,t,n)}))}}}i.a.directive("mongodbQuery",d)},function(e,t,n){"use strict";n.r(t),n.d(t,"MrQueryCtrl",(function(){return u})),n.d(t,"mrQuery",(function(){return l}));var r=n(24),i=n(6),o=n.n(i),a=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function c(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},c=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\x3c!-- 主题的ui --\x3e\n
\n
\n
\n \n
\n\n \n \n
\n
\n
\n
\n\n \n',controller:u,restrict:"E",scope:{target:"=",showDetail:"=",region:"=",datasource:"=",getDropdownOptions:"&",onChange:"&",onRefresh:"&",dims:"="}}}o.a.directive("mrQuery",l)},function(e,t,n){"use strict";n.r(t),n.d(t,"NatGatewayQueryCtrl",(function(){return a})),n.d(t,"natGatewayQuery",(function(){return c}));var r=n(6),i=n.n(r),o=n(66),a=function(){function e(e,t){e.init=function(){e.NATGatewayFilterFieldsDescriptor=o.NATGatewayFilterFieldsDescriptor},e.onChecked=function(t,n){!0===e.target.queries[t]&&(e.target.queries[n]=!1),e.onChange()},e.getDropdown=function(e){return[]},e.init()}return e.$inject=["$scope","$rootScope"],e}();function c(){return{template:'\n
\n\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n \n \n \n
\n
\n\n
\n',controller:a,restrict:"E",scope:{target:"=",showDetail:"=",region:"=",datasource:"=",getDropdownOptions:"&",onChange:"&"}}}i.a.directive("natGatewayQuery",c)},function(e,t,n){"use strict";n.r(t),n.d(t,"OVCDNQueryCtrl",(function(){return a})),n.d(t,"ovCdnQuery",(function(){return c}));var r=n(6),i=n.n(r),o=n(67),a=function(){function e(e,t){e.init=function(){e.OVCDNFilterFieldsDescriptor=o.OVCDNFilterFieldsDescriptor},e.init()}return e.$inject=["$scope","$rootScope"],e}();function c(){return{template:'\n
\n\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n\n\n\n\n
\n\n
\n',controller:a,restrict:"E",scope:{target:"=",showDetail:"=",region:"=",datasource:"=",getDropdownOptions:"&",onChange:"&"}}}i.a.directive("ovCdnQuery",c)},function(e,t,n){"use strict";n.r(t),n.d(t,"PCXQueryCtrl",(function(){return a})),n.d(t,"pcxQuery",(function(){return c}));var r=n(6),i=n.n(r),o=n(60),a=function(){function e(e,t){e.init=function(){e.PCXFieldsDescriptor=o.PCXFieldsDescriptor},e.onChecked=function(t,n){!0===e.target.queries[t]&&(e.target.queries[n]=!1),e.onChange()},e.getDropdown=function(t){switch(t){case"vpcId":return e.getVpcIds();default:return[]}},e.getVpcIds=function(){return e.region?e.datasource.getVpcIds("pcx",e.region):[]},e.init()}return e.$inject=["$scope","$rootScope"],e}();function c(){return{template:'\n
\n \n
\n
\n \n \n \n \n \n \n \n
\n
\n\n
\n',controller:a,restrict:"E",scope:{target:"=",showDetail:"=",region:"=",datasource:"=",onChange:"&"}}}i.a.directive("pcxQuery",c)},function(e,t,n){"use strict";n.r(t);var r=n(7),i=n(41);Object(r.default)(i.queryEditorName,i.queryEditorConfig)},function(e,t,n){"use strict";n.r(t);var r=n(7),i=n(51);Object(r.default)(i.queryEditorName,i.queryEditorConfig)},function(e,t,n){"use strict";n.r(t),n.d(t,"RedisQueryCtrl",(function(){return a})),n.d(t,"redisQuery",(function(){return c}));var r=n(6),i=n.n(r),o=n(61),a=function(){function e(e,t){e.init=function(){e.RedisFieldsDescriptor=o.RedisFieldsDescriptor},e.onChecked=function(t,n){!0===e.target.queries[t]&&(e.target.queries[n]=!1),e.onChange()},e.getDropdown=function(e){return[]},e.init()}return e.$inject=["$scope","$rootScope"],e}();function c(){return{template:'\n
\n \n
\n
\n \n \n \n \n \n \n \n
\n
\n\n
\n',controller:a,restrict:"E",scope:{target:"=",showDetail:"=",region:"=",datasource:"=",onChange:"&"}}}i.a.directive("redisQuery",c)},function(e,t,n){"use strict";n.r(t),n.d(t,"RedisMemQueryCtrl",(function(){return l})),n.d(t,"redisMemQuery",(function(){return p}));var r=n(6),i=n.n(r),o=n(0),a=n(17),c=n(2),s=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function c(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},u=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]\n \n
\n
\n \n \n \n \n \n \n \n
\n
\n\n\n\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n \n
\n \n \n
\n
\n
\n',controller:l,restrict:"E",scope:{target:"=",showDetail:"=",region:"=",datasource:"=",onChange:"&",onRefresh:"&",dims:"="},link:function(e,t,n){e.$watch("target.instance",(function(){var t;null===(t=e.clearExtrasAlias)||void 0===t||t.call(e)})),e.$watch("target.metricName",(function(){var t;null===(t=e.clearExtrasAlias)||void 0===t||t.call(e)}))}}}i.a.directive("redisMemQuery",p)},function(e,t,n){"use strict";n.r(t),n.d(t,"SCFQueryCtrl",(function(){return s})),n.d(t,"scfQuery",(function(){return u}));var r=n(6),i=n.n(r),o=n(28),a=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function c(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},c=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]\n\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\x3c!-- version部分 --\x3e\n
\n
\n \n
\n \n \n
\n
\n
\n\n \n',controller:s,restrict:"E",scope:{target:"=",showDetail:"=",region:"=",datasource:"=",getDropdownOptions:"&",onChange:"&",onRefresh:"&"}}}i.a.directive("scfQuery",u)},function(e,t,n){"use strict";n.r(t);var r=n(7),i=n(30);Object(r.default)(i.queryEditorName,i.queryEditorConfig)},function(e,t,n){"use strict";n.r(t);var r=n(7),i=n(52);Object(r.default)(i.queryEditorName,i.queryEditorConfig)},function(e,t,n){"use strict";n.r(t),n.d(t,"QueryCtrl",(function(){return p})),n.d(t,"sQuery",(function(){return d}));var r=n(6),i=n.n(r),o=n(13),a=n(2),c=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function c(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},s=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\x3c!-- 起始区域 目的区域等 --\x3e\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n\n',controller:p,restrict:"E",scope:{target:"=",showDetail:"=",region:"=",datasource:"=",getDropdownOptions:"&",onChange:"&",onRefresh:"&",dims:"="}}}i.a.directive(o.queryEditorName,d)},function(e,t,n){"use strict";n.r(t),n.d(t,"QueryCtrl",(function(){return p})),n.d(t,"sQuery",(function(){return d}));var r=n(6),i=n.n(r),o=n(18),a=n(2),c=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function c(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},s=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\x3c!-- 起始区域 目的区域等 --\x3e\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n\n',controller:p,restrict:"E",scope:{target:"=",showDetail:"=",region:"=",datasource:"=",getDropdownOptions:"&",onChange:"&",onRefresh:"&",dims:"="},link:function(e,t,n){e.$watch("target.instance",(function(){var t;null===(t=e.clearExtrasAlias)||void 0===t||t.call(e)})),e.$watch("target.metricName",(function(){var t;null===(t=e.clearExtrasAlias)||void 0===t||t.call(e)}))}}}i.a.directive("tdmqRabbitmqQuery",d)},function(e,t,n){"use strict";n.r(t),n.d(t,"TdmqRocketmqQueryCtrl",(function(){return p})),n.d(t,"tdmqRocketmqQuery",(function(){return d}));var r=n(6),i=n.n(r),o=n(19),a=n(2),c=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{s(r.next(e))}catch(e){o(e)}}function c(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},s=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]\n
\n \n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n \n \n \n
\n
\n
\n\n\x3c!-- 起始区域 目的区域等 --\x3e\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n\n',controller:p,restrict:"E",scope:{target:"=",showDetail:"=",region:"=",datasource:"=",getDropdownOptions:"&",onChange:"&",onRefresh:"&",dims:"="},link:function(e,t,n){e.$watch("target.instance",(function(){var t;null===(t=e.clearExtrasAlias)||void 0===t||t.call(e)})),e.$watch("target.metricName",(function(){var t;null===(t=e.clearExtrasAlias)||void 0===t||t.call(e)}))}}}i.a.directive("tdmqRocketmqQuery",d)},function(e,t,n){"use strict";n.r(t),n.d(t,"QueryCtrl",(function(){return c})),n.d(t,"sQuery",(function(){return s}));var r=n(6),i=n.n(r),o=n(0),a=n(74),c=function(){function e(e,t){e.init=function(){e.TKEFilterFieldsDescriptor=a.TKEFilterFieldsDescriptor},e.onChecked=function(t,n){!0===e.target.queries[t]&&(e.target.queries[n]=!1),e.onChange()},e.addCondition=function(){e.target.conditions.push({Key:"",Operator:"=",Value:""})},e.deleteCondition=function(t){var n=e.target.conditions[t];Object(o.isEmpty)(n.Key)||Object(o.isEmpty)(n.Operator)||Object(o.isEmpty)(n.Value)?e.target.conditions.splice(t,1):(e.target.conditions.splice(t,1),e.onRefresh())},e.getOperator=function(){return Promise.resolve([{text:"=",value:"="},{text:"in",value:"in"}])},e.init()}return e.$inject=["$scope","$rootScope"],e}();function s(){return{template:'\n
\n
\n \n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n
\n
\n \n
\n
\n \n
\n \n \n
\n \n \n \n
\n
\n \n
\n
\n
\n
\n
\n
\n \n \n
\n
\n
\n',controller:c,restrict:"E",scope:{target:"=",showDetail:"=",region:"=",datasource:"=",getDropdownOptions:"&",onChange:"&",onRefresh:"&",dims:"="}}}i.a.directive("tkeQuery",s)},function(e,t,n){"use strict";n.r(t),n.d(t,"TSFQueryCtrl",(function(){return a})),n.d(t,"tsfQuery",(function(){return c}));var r=n(6),i=n.n(r),o=n(62),a=function(){function e(e,t){e.init=function(){e.TSFFieldsDescriptor=o.TSFFieldsDescriptor},e.init()}return e.$inject=["$scope","$rootScope"],e}();function c(){return{template:'\n
\n \n
\n
\n \n \n \n \n \n
\n
\n\n
\n',controller:a,restrict:"E",scope:{target:"=",showDetail:"=",region:"=",datasource:"=",onChange:"&"}}}i.a.directive("tsfQuery",c)},function(e,t,n){"use strict";n.r(t);var r=n(7),i=n(25);Object(r.default)(i.queryEditorName,i.queryEditorConfig)},function(e,t,n){"use strict";n.r(t),n.d(t,"VBCQueryCtrl",(function(){return s})),n.d(t,"scfQuery",(function(){return u}));var r=n(6),i=n.n(r),o=n(53),a=n(2),c=[],s=function(){function e(e,t){e.init=function(){e.VBCFilterFieldsDescriptor=o.VBCFilterFieldsDescriptor,e.namespace=o.namespace},e.getExtraFields=function(){return c.filter((function(t){var n;return t.field in(null!==(n=e.dims)&&void 0!==n?n:{})}))},e.getExtraDropdown=function(t){var n=Object(a.f)(e.namespace);return e.datasource.getFilterDropdown(n,{field:t})},e.init()}return e.$inject=["$scope","$rootScope"],e}();function u(){return{template:'\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\x3c!-- 起始区域 目的区域等 --\x3e\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n',controller:s,restrict:"E",scope:{target:"=",showDetail:"=",region:"=",datasource:"=",getDropdownOptions:"&",onChange:"&",onRefresh:"&",dims:"="}}}i.a.directive("vbcQuery",u)},function(e,t,n){"use strict";n.r(t);var r=n(7),i=n(42);Object(r.default)(i.queryEditorName,i.queryEditorConfig)},function(e,t,n){"use strict";n.r(t);var r=n(7),i=n(54);Object(r.default)(i.queryEditorName,i.queryEditorConfig)},function(e,t,n){"use strict";n.r(t);var r=n(7),i=n(55);Object(r.default)(i.queryEditorName,i.queryEditorConfig)},function(e,t,n){"use strict";n.r(t);var r=n(7),i=n(43);Object(r.default)(i.queryEditorName,i.queryEditorConfig)},function(e,t,n){var r={".":20,"./":20,"./MonitorDatasource":188,"./MonitorDatasource.ts":188,"./_base/datasource":3,"./_base/datasource.ts":3,"./_base/query":7,"./_base/query.ts":7,"./_base/query_filter":195,"./_base/query_filter.ts":195,"./_base/types":196,"./_base/types.ts":196,"./apigateway/datasource":75,"./apigateway/datasource.ts":75,"./apigateway/query":131,"./apigateway/query.ts":131,"./apigateway/query_def":23,"./apigateway/query_def.ts":23,"./bmIntraLb/datasource":76,"./bmIntraLb/datasource.ts":76,"./bmIntraLb/query":132,"./bmIntraLb/query.ts":132,"./bmIntraLb/query_def":31,"./bmIntraLb/query_def.ts":31,"./bm_lb/datasource":77,"./bm_lb/datasource.ts":77,"./bm_lb/query":133,"./bm_lb/query.ts":133,"./bm_lb/query_def":32,"./bm_lb/query_def.ts":32,"./bm_pcx/datasource":78,"./bm_pcx/datasource.ts":78,"./bm_pcx/query":134,"./bm_pcx/query.ts":134,"./bm_pcx/query_def":33,"./bm_pcx/query_def.ts":33,"./bwp/datasource":79,"./bwp/datasource.ts":79,"./bwp/query":135,"./bwp/query.ts":135,"./bwp/query_def":63,"./bwp/query_def.ts":63,"./cbs/datasource":80,"./cbs/datasource.ts":80,"./cbs/query":136,"./cbs/query.ts":136,"./cbs/query_def":34,"./cbs/query_def.ts":34,"./cdb/datasource":81,"./cdb/datasource.ts":81,"./cdb/query":137,"./cdb/query.ts":137,"./cdb/query_def":44,"./cdb/query_def.ts":44,"./cdn/datasource":82,"./cdn/datasource.ts":82,"./cdn/query":138,"./cdn/query.ts":138,"./cdn/query_def":64,"./cdn/query_def.ts":64,"./cdn_province/datasource":83,"./cdn_province/datasource.ts":83,"./cdn_province/query":139,"./cdn_province/query.ts":139,"./cdn_province/query_def":35,"./cdn_province/query_def.ts":35,"./ceip_summary/datasource":84,"./ceip_summary/datasource.ts":84,"./ceip_summary/query":140,"./ceip_summary/query.ts":140,"./ceip_summary/query_def":36,"./ceip_summary/query_def.ts":36,"./ces/datasource":85,"./ces/datasource.ts":85,"./ces/query":141,"./ces/query.ts":141,"./ces/query_def":45,"./ces/query_def.ts":45,"./cfs/datasource":86,"./cfs/datasource.ts":86,"./cfs/query":142,"./cfs/query.ts":142,"./cfs/query_def":57,"./cfs/query_def.ts":57,"./ckafka/datasource":87,"./ckafka/datasource.ts":87,"./ckafka/query":143,"./ckafka/query.ts":143,"./ckafka/query_def":11,"./ckafka/query_def.ts":11,"./clb/datasource":88,"./clb/datasource.ts":88,"./clb/query":144,"./clb/query.ts":144,"./clb/query_def":12,"./clb/query_def.ts":12,"./cls/datasource":89,"./cls/datasource.ts":89,"./cls/query":145,"./cls/query.ts":145,"./cls/query_def":29,"./cls/query_def.ts":29,"./cmq/datasource":90,"./cmq/datasource.ts":90,"./cmq/query":146,"./cmq/query.ts":146,"./cmq/query_def":58,"./cmq/query_def.ts":58,"./cmq_topic/datasource":91,"./cmq_topic/datasource.ts":91,"./cmq_topic/query":147,"./cmq_topic/query.ts":147,"./cmq_topic/query_def":37,"./cmq_topic/query_def.ts":37,"./cos/datasource":92,"./cos/datasource.ts":92,"./cos/query_def":148,"./cos/query_def.ts":148,"./cpm/datasource":93,"./cpm/datasource.ts":93,"./cpm/query":149,"./cpm/query.ts":149,"./cpm/query_def":38,"./cpm/query_def.ts":38,"./cvm/datasource":94,"./cvm/datasource.ts":94,"./cvm/query":150,"./cvm/query.ts":150,"./cvm/query_def":59,"./cvm/query_def.ts":59,"./cynosdb_mysql/datasource":95,"./cynosdb_mysql/datasource.ts":95,"./cynosdb_mysql/query":151,"./cynosdb_mysql/query.ts":151,"./cynosdb_mysql/query_def":27,"./cynosdb_mysql/query_def.ts":27,"./dc/datasource":96,"./dc/datasource.ts":96,"./dc/query":152,"./dc/query.ts":152,"./dc/query_def":46,"./dc/query_def.ts":46,"./dcdb/datasource":97,"./dcdb/datasource.ts":97,"./dcdb/query":153,"./dcdb/query.ts":153,"./dcdb/query_def":16,"./dcdb/query_def.ts":16,"./dcg/datasource":98,"./dcg/datasource.ts":98,"./dcg/query":154,"./dcg/query.ts":154,"./dcg/query_def":47,"./dcg/query_def.ts":47,"./dcx/datasource":99,"./dcx/datasource.ts":99,"./dcx/query":155,"./dcx/query.ts":155,"./dcx/query_def":48,"./dcx/query_def.ts":48,"./ecdn/datasource":100,"./ecdn/datasource.ts":100,"./ecdn/query":156,"./ecdn/query.ts":156,"./ecdn/query_def":39,"./ecdn/query_def.ts":39,"./ecm/datasource":101,"./ecm/datasource.ts":101,"./ecm/query":157,"./ecm/query.ts":157,"./ecm/query_def":40,"./ecm/query_def.ts":40,"./ecm_block_storage/datasource":102,"./ecm_block_storage/datasource.ts":102,"./ecm_block_storage/query":158,"./ecm_block_storage/query.ts":158,"./ecm_block_storage/query_def":21,"./ecm_block_storage/query_def.ts":21,"./ecm_lb/datasource":103,"./ecm_lb/datasource.ts":103,"./ecm_lb/query":159,"./ecm_lb/query.ts":159,"./ecm_lb/query_def":49,"./ecm_lb/query_def.ts":49,"./gse/datasource":104,"./gse/datasource.ts":104,"./gse/query":160,"./gse/query.ts":160,"./gse/query_def":15,"./gse/query_def.ts":15,"./index":20,"./index.ts":20,"./lb/datasource":105,"./lb/datasource.ts":105,"./lb/query":161,"./lb/query.ts":161,"./lb/query_def":65,"./lb/query_def.ts":65,"./lighthouse/datasource":106,"./lighthouse/datasource.ts":106,"./lighthouse/query":162,"./lighthouse/query.ts":162,"./lighthouse/query_def":56,"./lighthouse/query_def.ts":56,"./mongodb/datasource":107,"./mongodb/datasource.ts":107,"./mongodb/query":163,"./mongodb/query.ts":163,"./mongodb/query_def":50,"./mongodb/query_def.ts":50,"./mr/datasource":108,"./mr/datasource.ts":108,"./mr/query":164,"./mr/query.ts":164,"./mr/query_def":24,"./mr/query_def.ts":24,"./nat_gateway/datasource":109,"./nat_gateway/datasource.ts":109,"./nat_gateway/query":165,"./nat_gateway/query.ts":165,"./nat_gateway/query_def":66,"./nat_gateway/query_def.ts":66,"./ov_cdn/datasource":110,"./ov_cdn/datasource.ts":110,"./ov_cdn/query":166,"./ov_cdn/query.ts":166,"./ov_cdn/query_def":67,"./ov_cdn/query_def.ts":67,"./pcx/datasource":111,"./pcx/datasource.ts":111,"./pcx/query":167,"./pcx/query.ts":167,"./pcx/query_def":60,"./pcx/query_def.ts":60,"./postgresql/datasource":112,"./postgresql/datasource.ts":112,"./postgresql/query":168,"./postgresql/query.ts":168,"./postgresql/query_def":41,"./postgresql/query_def.ts":41,"./qaap/datasource":113,"./qaap/datasource.ts":113,"./qaap/query":169,"./qaap/query.ts":169,"./qaap/query_def":51,"./qaap/query_def.ts":51,"./redis/datasource":114,"./redis/datasource.ts":114,"./redis/query":170,"./redis/query.ts":170,"./redis/query_def":61,"./redis/query_def.ts":61,"./redis_mem/datasource":115,"./redis_mem/datasource.ts":115,"./redis_mem/query":171,"./redis_mem/query.ts":171,"./redis_mem/query_def":17,"./redis_mem/query_def.ts":17,"./scf/datasource":116,"./scf/datasource.ts":116,"./scf/query":172,"./scf/query.ts":172,"./scf/query_def":28,"./scf/query_def.ts":28,"./sqlserver/datasource":117,"./sqlserver/datasource.ts":117,"./sqlserver/query":173,"./sqlserver/query.ts":173,"./sqlserver/query_def":30,"./sqlserver/query_def.ts":30,"./tcaplus/datasource":118,"./tcaplus/datasource.ts":118,"./tcaplus/query":174,"./tcaplus/query.ts":174,"./tcaplus/query_def":52,"./tcaplus/query_def.ts":52,"./tdmq/datasource":119,"./tdmq/datasource.ts":119,"./tdmq/query":175,"./tdmq/query.ts":175,"./tdmq/query_def":13,"./tdmq/query_def.ts":13,"./tdmq_rabbitmq/datasource":120,"./tdmq_rabbitmq/datasource.ts":120,"./tdmq_rabbitmq/query":176,"./tdmq_rabbitmq/query.ts":176,"./tdmq_rabbitmq/query_def":18,"./tdmq_rabbitmq/query_def.ts":18,"./tdmq_rocketmq/datasource":121,"./tdmq_rocketmq/datasource.ts":121,"./tdmq_rocketmq/query":177,"./tdmq_rocketmq/query.ts":177,"./tdmq_rocketmq/query_def":19,"./tdmq_rocketmq/query_def.ts":19,"./tke/datasource":122,"./tke/datasource.ts":122,"./tke/query":178,"./tke/query.ts":178,"./tke/query_def":74,"./tke/query_def.ts":74,"./tsf/datasource":123,"./tsf/datasource.ts":123,"./tsf/query":179,"./tsf/query.ts":179,"./tsf/query_def":62,"./tsf/query_def.ts":62,"./v_clb/datasource":124,"./v_clb/datasource.ts":124,"./v_clb/query":180,"./v_clb/query.ts":180,"./v_clb/query_def":25,"./v_clb/query_def.ts":25,"./vbc/datasource":125,"./vbc/datasource.ts":125,"./vbc/query":181,"./vbc/query.ts":181,"./vbc/query_def":53,"./vbc/query_def.ts":53,"./vpc_net_detect/datasource":126,"./vpc_net_detect/datasource.ts":126,"./vpc_net_detect/query":182,"./vpc_net_detect/query.ts":182,"./vpc_net_detect/query_def":42,"./vpc_net_detect/query_def.ts":42,"./vpngw/datasource":127,"./vpngw/datasource.ts":127,"./vpngw/query":183,"./vpngw/query.ts":183,"./vpngw/query_def":54,"./vpngw/query_def.ts":54,"./vpnx/datasource":128,"./vpnx/datasource.ts":128,"./vpnx/query":184,"./vpnx/query.ts":184,"./vpnx/query_def":55,"./vpnx/query_def.ts":55,"./waf/datasource":129,"./waf/datasource.ts":129,"./waf/query":185,"./waf/query.ts":185,"./waf/query_def":43,"./waf/query_def.ts":43};function i(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=186},,function(e,t,n){"use strict";n.r(t),n.d(t,"TCMonitorDatasource",(function(){return u}));var r=n(0),i=n.n(r),o=n(20),a=n(2),c=n(5),s=n(8),u=function(){function e(e,t,n){var r=this;this.instanceSettings=e,this.backendSrv=t,this.templateSrv=n,i.a.forEach(o.Datasources,(function(e,t){r[t]=new e(r.instanceSettings,r.backendSrv,r.templateSrv)}))}return e.$inject=["instanceSettings","backendSrv","templateSrv"],e.prototype.getNamespaces=function(){var e=this,t=[];return i.a.forEach(o.SERVICES,(function(n){!0===e.instanceSettings.jsonData[n.service]&&t.push(n)})),t},e.prototype.getCascaderNamespaces=function(){var e=this,t=o.SERVICES.filter((function(t){return e.instanceSettings.jsonData[t.service]}));return Object(c.f)(t)},e.prototype.getSelectedServices=function(){var e=this.getNamespaces();return i.a.map(e,(function(e){var t=e.namespace;return Object(a.f)(t)}))},e.prototype.query=function(e){var t=this,n=[],r=this.getSelectedServices();return i.a.forEach(r,(function(r){var o=i.a.cloneDeep(e),a=i.a.filter(o.targets,(function(e){return e.service===r}));if(o.targets=a,o.targets.length>0){var c=t["".concat(i.a.toUpper(r),"Datasource")].query(o);c&&n.push(c)}})),0===n.length?Promise.resolve({data:[],state:s.LoadingState.Done}):Promise.all(n).then((function(e){return{data:i.a.flatten(e),state:s.LoadingState.Done}}))},e.prototype.metricFindQuery=function(e,t){var n=Object(a.h)(e),r=Object(a.f)(n.namespace||"");if(i.a.isEmpty(n)||!n.namespace||!n.action||!r)return Promise.resolve([]);if(this["".concat(i.a.toUpper(r),"Datasource")].metricFindQuery){var o=this["".concat(i.a.toUpper(r),"Datasource")].metricFindQuery(n,i.a.get(t,"variable.regex",void 0));if(o)return o}return Promise.resolve([])},e.prototype.getRegions=function(e){return this["".concat(i.a.toUpper(e),"Datasource")].getRegions?this["".concat(i.a.toUpper(e),"Datasource")].getRegions():[]},e.prototype.getMetrics=function(e,t){return this["".concat(i.a.toUpper(e),"Datasource")].getMetrics(t)},e.prototype.getZones=function(e,t){return this["".concat(i.a.toUpper(e),"Datasource")].getZones?this["".concat(i.a.toUpper(e),"Datasource")].getZones(t):[]},e.prototype.getFilterDropdown=function(e,t){return this["".concat(i.a.toUpper(e),"Datasource")].getFilterDropdown?this["".concat(i.a.toUpper(e),"Datasource")].getFilterDropdown(t):[]},e.prototype.getInstances=function(e,t,n){return this["".concat(i.a.toUpper(e),"Datasource")].getInstances(t,n)},e.prototype.getListeners=function(e,t,n){return this["".concat(i.a.toUpper(e),"Datasource")].getListeners?this["".concat(i.a.toUpper(e),"Datasource")].getListeners(t,n):[]},e.prototype.getVpcIds=function(e,t){if(this["".concat(i.a.toUpper(e),"Datasource")].getVpcIds)return this["".concat(i.a.toUpper(e),"Datasource")].getVpcIds(t)},e.prototype.testDatasource=function(){var e=this,t=[],n=this.getSelectedServices();return i.a.forEach(n,(function(n){t.push(e["".concat(i.a.toUpper(n),"Datasource")].testDatasource())})),0===t.length?Promise.resolve(null):Promise.all(t).then((function(e){var t="success",n="DataSource Connection OK",r=i.a.reduce(e,(function(e,t){return"error"===t.status&&(""===e&&(e+="Oops! Found an error in: "),e+="".concat(t.service,": ").concat(t.message,"; \n")),e}),"");return r&&(t="error",n=r),{status:t,message:n,title:i.a.upperFirst(t)}}))},e.prototype.getServiceFn=function(e,t){var n=this;return function(){for(var r,o=[],a=0;a=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122?n+=t.charAt(r):o<128?n+=i[o]:o<2048?n+=i[192|o>>6]+i[128|63&o]:o<55296||o>=57344?n+=i[224|o>>12]+i[128|o>>6&63]+i[128|63&o]:(r+=1,o=65536+((1023&o)<<10|1023&t.charCodeAt(r)),n+=i[240|o>>18]+i[128|o>>12&63]+i[128|o>>6&63]+i[128|63&o])}return n},isBuffer:function(e){return null!=e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},merge:function e(t,n,i){if(!n)return t;if("object"!=typeof n){if(Array.isArray(t))t.push(n);else{if("object"!=typeof t)return[t,n];(i.plainObjects||i.allowPrototypes||!r.call(Object.prototype,n))&&(t[n]=!0)}return t}if("object"!=typeof t)return[t].concat(n);var a=t;return Array.isArray(t)&&!Array.isArray(n)&&(a=o(t,i)),Array.isArray(t)&&Array.isArray(n)?(n.forEach((function(n,o){r.call(t,o)?t[o]&&"object"==typeof t[o]?t[o]=e(t[o],n,i):t.push(n):t[o]=n})),t):Object.keys(n).reduce((function(t,o){var a=n[o];return r.call(t,o)?t[o]=e(t[o],a,i):t[o]=a,t}),a)}}},function(e,t,n){"use strict";var r=String.prototype.replace,i=/%20/g;e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return r.call(e,i,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},function(e,t,n){"use strict";n.r(t),n.d(t,"queryDDO",(function(){return a}));var r=n(6),i=n.n(r),o=function(){function e(t,n){Object.assign(t,e._config),t.onChecked=function(e,n){!0===t.target.queries[e]&&(t.target.queries[n]=!1),t.onChange()},t.init()}return e.$inject=["$scope","$rootScope"],e}();function a(){return{template:'\n
\n\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n \n \n \n
\n
\n
\n',controller:o,restrict:"E",scope:{target:"=",showDetail:"=",region:"=",datasource:"=",getDropdownOptions:"&",onChange:"&"}}}t.default=function(e,t){o._config=t,i.a.directive(e,a)}},function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";var r=n(207),i=n(208),o=n(194);e.exports={formats:o,parse:i,stringify:r}},function(e){e.exports=JSON.parse('{"type":"datasource","name":"Tencent Cloud Monitoring","id":"tencentcloud-monitor-datasource","backend":true,"alerting":true,"logs":true,"metrics":true,"annotations":false,"executable":"tencentcloud-monitor-app-backend","queryOptions":{"maxDataPoints":true},"routes":[{"path":"cls-internal","url":"https://cls.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"region-internal","url":"https://region.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"api-internal","url":"https://api.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"cmq-internal","url":"https://cmq.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/cmq/shanghai-internal","url":"https://cmq.ap-shanghai-fsi.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/cmq/shenzhen-internal","url":"https://cmq.ap-shenzhen-fsi.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"emr-internal","url":"https://emr.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/emr/shanghai-internal","url":"https://emr.ap-shanghai-fsi.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/emr/shenzhen-internal","url":"https://emr.ap-shenzhen-fsi.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"scf-internal","url":"https://scf.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/scf/shanghai-internal","url":"https://scf.ap-shanghai-fsi.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/scf/shenzhen-internal","url":"https://scf.ap-shenzhen-fsi.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"cfs-internal","url":"https://cfs.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/cfs/shanghai-internal","url":"https://cfs.ap-shanghai-fsi.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/cfs/shenzhen-internal","url":"https://cfs.ap-shenzhen-fsi.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"ckafka-internal","url":"https://ckafka.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/ckafka/shanghai-internal","url":"https://ckafka.ap-shanghai-fsi.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/ckafka/shenzhen-internal","url":"https://ckafka.ap-shenzhen-fsi.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"clb-internal","url":"https://clb.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/clb/shanghai-internal","url":"https://clb.ap-shanghai-fsi.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/clb/shenzhen-internal","url":"https://clb.ap-shenzhen-fsi.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"mongodb-internal","url":"https://mongodb.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/mongodb/shanghai-internal","url":"https://mongodb.ap-shanghai-fsi.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/mongodb/shenzhen-internal","url":"https://mongodb.ap-shenzhen-fsi.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"vpc-internal","url":"https://vpc.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/vpc/shanghai-internal","url":"https://vpc.ap-shanghai-fsi.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/vpc/shenzhen-internal","url":"https://vpc.ap-shenzhen-fsi.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"pcx-internal","url":"https://vpc.api.qcloud.com.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/x-www-form-urlencoded"}]},{"path":"cvm-internal","url":"https://cvm.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/cvm/shanghai-internal","url":"https://cvm.ap-shanghai-fsi.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/cvm/shenzhen-internal","url":"https://cvm.ap-shenzhen-fsi.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"monitor-internal","url":"https://monitor.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/monitor/shanghai-internal","url":"https://monitor.ap-shanghai-fsi.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/monitor/shenzhen-internal","url":"https://monitor.ap-shenzhen-fsi.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"cdb-internal","url":"https://cdb.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/cdb/shanghai-internal","url":"https://cdb.ap-shanghai-fsi.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/cdb/shenzhen-internal","url":"https://cdb.ap-shenzhen-fsi.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"postgres-internal","url":"https://postgres.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/postgres/shanghai-internal","url":"https://postgres.ap-shanghai-fsi.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/postgres/shenzhen-internal","url":"https://postgres.ap-shenzhen-fsi.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"cdn-internal","url":"https://cdn.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"redis-internal","url":"https://redis.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"dcdb-internal","url":"https://dcdb.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"dc-internal","url":"https://dc.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"cynosdb-internal","url":"https://cynosdb.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"sqlserver-internal","url":"https://sqlserver.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"bmeip-internal","url":"https://bmeip.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"bmvpc-internal","url":"https://bmvpc.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"bmlb-internal","url":"https://bmlb.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"bm-internal","url":"https://bm.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"es-internal","url":"https://es.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"cbs-internal","url":"https://cbs.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"tcaplusdb-internal","url":"https://tcaplusdb.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"apigateway-internal","url":"https://apigateway.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"tdmq-internal","url":"https://tdmq.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"gaap-internal","url":"https://gaap.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"ecm-internal","url":"https://ecm.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"gse-internal","url":"https://gse.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"lighthouse-internal","url":"https://lighthouse.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"tsf-internal","url":"https://tsf.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"rum-internal","url":"https://rum.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"tke-internal","url":"https://tke.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"ecdn-internal","url":"https://ecdn.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"waf-internal","url":"https://waf.internal.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"apigateway","url":"https://apigateway.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"api","url":"https://api.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"cmq","url":"https://cmq.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/cmq/shanghai","url":"https://cmq.ap-shanghai-fsi.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/cmq/shenzhen","url":"https://cmq.ap-shenzhen-fsi.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"emr","url":"https://emr.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/emr/shanghai","url":"https://emr.ap-shanghai-fsi.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/emr/shenzhen","url":"https://emr.ap-shenzhen-fsi.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"scf","url":"https://scf.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/scf/shanghai","url":"https://scf.ap-shanghai-fsi.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/scf/shenzhen","url":"https://scf.ap-shenzhen-fsi.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"cfs","url":"https://cfs.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/cfs/shanghai","url":"https://cfs.ap-shanghai-fsi.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/cfs/shenzhen","url":"https://cfs.ap-shenzhen-fsi.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"ckafka","url":"https://ckafka.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/ckafka/shanghai","url":"https://ckafka.ap-shanghai-fsi.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/ckafka/shenzhen","url":"https://ckafka.ap-shenzhen-fsi.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"clb","url":"https://clb.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/clb/shanghai","url":"https://clb.ap-shanghai-fsi.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/clb/shenzhen","url":"https://clb.ap-shenzhen-fsi.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"mongodb","url":"https://mongodb.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/mongodb/shanghai","url":"https://mongodb.ap-shanghai-fsi.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/mongodb/shenzhen","url":"https://mongodb.ap-shenzhen-fsi.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"vpc","url":"https://vpc.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/vpc/shanghai","url":"https://vpc.ap-shanghai-fsi.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/vpc/shenzhen","url":"https://vpc.ap-shenzhen-fsi.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"pcx","url":"https://vpc.api.qcloud.com","headers":[{"name":"Content-Type","content":"application/x-www-form-urlencoded"}]},{"path":"cvm","url":"https://cvm.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/cvm/shanghai","url":"https://cvm.ap-shanghai-fsi.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/cvm/shenzhen","url":"https://cvm.ap-shenzhen-fsi.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"monitor","url":"https://monitor.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/monitor/shanghai","url":"https://monitor.ap-shanghai-fsi.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/monitor/shenzhen","url":"https://monitor.ap-shenzhen-fsi.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"cdb","url":"https://cdb.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/cdb/shanghai","url":"https://cdb.ap-shanghai-fsi.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/cdb/shenzhen","url":"https://cdb.ap-shenzhen-fsi.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"postgres","url":"https://postgres.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/postgres/shanghai","url":"https://postgres.ap-shanghai-fsi.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/postgres/shenzhen","url":"https://postgres.ap-shenzhen-fsi.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"cdn","url":"https://cdn.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"redis","url":"https://redis.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"dcdb","url":"https://dcdb.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"dc","url":"https://dc.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"cynosdb","url":"https://cynosdb.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"sqlserver","url":"https://sqlserver.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"bmeip","url":"https://bmeip.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"bmvpc","url":"https://bmvpc.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"bmlb","url":"https://bmlb.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"bm","url":"https://bm.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"es","url":"https://es.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"cbs","url":"https://cbs.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"tcaplusdb","url":"https://tcaplusdb.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"tdmq","url":"https://tdmq.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"gaap","url":"https://gaap.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"ecm","url":"https://ecm.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"gse","url":"https://gse.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"cls","url":"https://cls.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/cls/shanghai","url":"https://cls.ap-shanghai-fsi.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"fsi/cls/shenzhen","url":"https://cls.ap-shenzhen-fsi.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"region","url":"https://region.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"lighthouse","url":"https://lighthouse.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"tsf","url":"https://tsf.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"rum","url":"https://rum.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"apm","url":"https://apm.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"tke","url":"https://tke.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"ecdn","url":"https://ecdn.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]},{"path":"waf","url":"https://waf.tencentcloudapi.com","headers":[{"name":"Content-Type","content":"application/json"}]}],"info":{"author":{"name":"Tencent Cloud"},"logos":{"small":"img/tencent-cloud.svg","large":"img/tencent-cloud.svg"},"description":"Data source for Tencent Cloud monitoring service"}}')},,,,,,,,,function(e,t,n){"use strict";var r=n(193),i=n(194),o={brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},a=Date.prototype.toISOString,c={delimiter:"&",encode:!0,encoder:r.encode,encodeValuesOnly:!1,serializeDate:function(e){return a.call(e)},skipNulls:!1,strictNullHandling:!1},s=function e(t,n,i,o,a,s,u,l,p,d,f,m){var y=t;if("function"==typeof u)y=u(n,y);else if(y instanceof Date)y=d(y);else if(null===y){if(o)return s&&!m?s(n,c.encoder):n;y=""}if("string"==typeof y||"number"==typeof y||"boolean"==typeof y||r.isBuffer(y))return s?[f(m?n:s(n,c.encoder))+"="+f(s(y,c.encoder))]:[f(n)+"="+f(String(y))];var h,g=[];if(void 0===y)return g;if(Array.isArray(u))h=u;else{var v=Object.keys(y);h=l?v.sort(l):v}for(var b=0;b0?_+x:""}},function(e,t,n){"use strict";var r=n(193),i=Object.prototype.hasOwnProperty,o={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:r.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},a=function(e,t,n){if(e){var r=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,a=/(\[[^[\]]*])/.exec(r),c=a?r.slice(0,a.index):r,s=[];if(c){if(!n.plainObjects&&i.call(Object.prototype,c)&&!n.allowPrototypes)return;s.push(c)}for(var u=0;null!==(a=o.exec(r))&&u=0;--i){var o,a=e[i];if("[]"===a)o=(o=[]).concat(r);else{o=n.plainObjects?Object.create(null):{};var c="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,s=parseInt(c,10);!isNaN(s)&&a!==c&&String(s)===c&&s>=0&&n.parseArrays&&s<=n.arrayLimit?(o=[])[s]=r:o[c]=r}r=o}return r}(s,t,n)}};e.exports=function(e,t){var n=t?r.assign({},t):{};if(null!==n.decoder&&void 0!==n.decoder&&"function"!=typeof n.decoder)throw new TypeError("Decoder has to be a function.");if(n.ignoreQueryPrefix=!0===n.ignoreQueryPrefix,n.delimiter="string"==typeof n.delimiter||r.isRegExp(n.delimiter)?n.delimiter:o.delimiter,n.depth="number"==typeof n.depth?n.depth:o.depth,n.arrayLimit="number"==typeof n.arrayLimit?n.arrayLimit:o.arrayLimit,n.parseArrays=!1!==n.parseArrays,n.decoder="function"==typeof n.decoder?n.decoder:o.decoder,n.allowDots="boolean"==typeof n.allowDots?n.allowDots:o.allowDots,n.plainObjects="boolean"==typeof n.plainObjects?n.plainObjects:o.plainObjects,n.allowPrototypes="boolean"==typeof n.allowPrototypes?n.allowPrototypes:o.allowPrototypes,n.parameterLimit="number"==typeof n.parameterLimit?n.parameterLimit:o.parameterLimit,n.strictNullHandling="boolean"==typeof n.strictNullHandling?n.strictNullHandling:o.strictNullHandling,""===e||null==e)return n.plainObjects?Object.create(null):{};for(var c="string"==typeof e?function(e,t){for(var n={},r=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,a=t.parameterLimit===1/0?void 0:t.parameterLimit,c=r.split(t.delimiter,a),s=0;s0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&(this.configured=!0))}return e.$inject=["$scope","$injector","$q"],e.prototype.moveToFolder=function(e,t){return o(this,void 0,void 0,(function(){var n;return a(this,(function(r){switch(r.label){case 0:return[4,c.get("/api/dashboards/uid/".concat(e))];case 1:return n=r.sent().dashboard,[4,c.post("/api/dashboards/db/",{dashboard:n,folderId:t,message:"",overwrite:!0})];case 2:return r.sent(),[2]}}))}))},e.prototype.reviseDashboard=function(){var e;return o(this,void 0,void 0,(function(){var t,n,r,i,o,s=this;return a(this,(function(a){switch(a.label){case 0:return[4,l()];case 1:return t=a.sent(),n=t[0],r=t[1],[4,c.get("/api/plugins/".concat(null===(e=this.appModel)||void 0===e?void 0:e.id,"/dashboards"))];case 2:return i=a.sent(),o=i.map((function(e){var t=e.importedUrl,i=e.path,o=t.split("/")[2];return o?s.moveToFolder(o,i.endsWith("_en_dashboard.json")?r:n):Promise.resolve()})),[2,Promise.all(o)]}}))}))},e.prototype.postUpdate=function(){var e;return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return(null===(e=this.appModel)||void 0===e?void 0:e.enabled)?[4,this.reviseDashboard()]:[2];case 1:return t.sent(),[2,this.$q.resolve(!0)]}}))}))},e.templateUrl="components/config.html",e}()}])})); //# sourceMappingURL=config.js.map \ No newline at end of file diff --git a/dist/components/config.js.map b/dist/components/config.js.map index f49cc12..f99249f 100644 --- a/dist/components/config.js.map +++ b/dist/components/config.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://TencentCloudMonitorGrafanaApp/webpack/bootstrap","webpack://TencentCloudMonitorGrafanaApp/../node_modules/qs/lib/formats.js","webpack://TencentCloudMonitorGrafanaApp/../node_modules/qs/lib/index.js","webpack://TencentCloudMonitorGrafanaApp/../node_modules/qs/lib/parse.js","webpack://TencentCloudMonitorGrafanaApp/../node_modules/qs/lib/stringify.js","webpack://TencentCloudMonitorGrafanaApp/../node_modules/qs/lib/utils.js","webpack://TencentCloudMonitorGrafanaApp/./components/config.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/common/constants.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/common/datasourceStorage.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/common/indexedDB.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/common/sign.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/common/signV2.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/common/utils.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor sync ^.*$","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor sync ^\\.\\/[a-zA-Z]\\w+\\/(datasource)|(query(_def)","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/MonitorDatasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/_base/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/_base/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/_base/query_filter.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/apigateway/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/apigateway/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/apigateway/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/bmIntraLb/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/bmIntraLb/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/bmIntraLb/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/bm_lb/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/bm_lb/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/bm_lb/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/bm_pcx/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/bm_pcx/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/bm_pcx/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/bwp/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/bwp/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/bwp/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cbs/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cbs/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cbs/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cdb/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cdb/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cdb/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cdn/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cdn/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cdn/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cdn_province/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cdn_province/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cdn_province/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ceip_summary/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ceip_summary/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ceip_summary/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ces/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ces/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ces/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cfs/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cfs/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cfs/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ckafka/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ckafka/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ckafka/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/clb/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/clb/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/clb/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cls/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cls/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cls/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cmq/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cmq/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cmq/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cmq_topic/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cmq_topic/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cmq_topic/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cos/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cos/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cpm/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cpm/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cpm/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cvm/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cvm/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cvm/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cynosdb_mysql/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cynosdb_mysql/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cynosdb_mysql/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/dc/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/dc/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/dc/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/dcdb/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/dcdb/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/dcdb/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/dcg/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/dcg/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/dcg/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/dcx/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/dcx/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/dcx/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ecdn/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ecdn/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ecdn/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ecm/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ecm/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ecm/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ecm_block_storage/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ecm_block_storage/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ecm_block_storage/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ecm_lb/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ecm_lb/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ecm_lb/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/gse/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/gse/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/gse/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/index.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/lb/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/lb/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/lb/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/lighthouse/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/lighthouse/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/lighthouse/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/mongodb/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/mongodb/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/mongodb/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/mr/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/mr/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/mr/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/nat_gateway/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/nat_gateway/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/nat_gateway/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ov_cdn/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ov_cdn/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ov_cdn/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/pcx/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/pcx/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/pcx/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/postgresql/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/postgresql/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/postgresql/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/qaap/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/qaap/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/qaap/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/redis/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/redis/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/redis/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/redis_mem/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/redis_mem/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/redis_mem/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/scf/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/scf/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/scf/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/sqlserver/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/sqlserver/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/sqlserver/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/tcaplus/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/tcaplus/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/tcaplus/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/tdmq/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/tdmq/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/tdmq/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/tdmq_rabbitmq/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/tdmq_rabbitmq/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/tdmq_rabbitmq/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/tdmq_rocketmq/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/tdmq_rocketmq/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/tdmq_rocketmq/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/tke/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/tke/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/tke/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/tsf/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/tsf/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/tsf/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/v_clb/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/v_clb/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/v_clb/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/vbc/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/vbc/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/vbc/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/vpc_net_detect/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/vpc_net_detect/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/vpc_net_detect/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/vpngw/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/vpngw/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/vpngw/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/vpnx/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/vpnx/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/vpnx/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/waf/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/waf/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/waf/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./locale/en_US.ts","webpack://TencentCloudMonitorGrafanaApp/./locale/index.ts","webpack://TencentCloudMonitorGrafanaApp/./locale/zh_CN.ts","webpack://TencentCloudMonitorGrafanaApp/external \"@grafana/data\"","webpack://TencentCloudMonitorGrafanaApp/external \"@grafana/runtime\"","webpack://TencentCloudMonitorGrafanaApp/external \"app/core/core_module\"","webpack://TencentCloudMonitorGrafanaApp/external \"lodash\"","webpack://TencentCloudMonitorGrafanaApp/external \"moment\""],"names":[],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFa;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;;;;;;ACjBa;;AAEb,gBAAgB,mBAAO,CAAC,wDAAa;AACrC,YAAY,mBAAO,CAAC,gDAAS;AAC7B,cAAc,mBAAO,CAAC,oDAAW;;AAEjC;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACVa;;AAEb,YAAY,mBAAO,CAAC,gDAAS;;AAE7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,kBAAkB;AACrC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,wCAAwC;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,mBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;AC7Ka;;AAEb,YAAY,mBAAO,CAAC,gDAAS;AAC7B,cAAc,mBAAO,CAAC,oDAAW;;AAEjC;AACA,yCAAyC;AACzC;AACA,KAAK;AACL,4CAA4C;AAC5C;AACA,KAAK;AACL,qCAAqC;AACrC;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA,mBAAmB,oBAAoB;AACvC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,wCAAwC;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mBAAmB,oBAAoB;AACvC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;;ACjNa;;AAEb;;AAEA;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;;AAEA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,2BAA2B,gBAAgB;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,mBAAmB,mBAAmB;AACtC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB,OAAO,WAAW,aAAa;AACjD;;AAEA,mBAAmB,kBAAkB;AACrC;AACA;;AAEA;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACnNA;AACA;AAEA,IAAM,UAAU,GAAG,sE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AAG,KAAT,GAAiB,IAAxB;;AACF,SAAK,GAAL;AACE,aAAO,MAAM,GAAG,IAAT,GAAgB,IAAvB;;AACF,SAAK,GAAL;AACE,aAAO,MAAM,GAAG,EAAT,GAAc,IAArB;;AACF,SAAK,GAAL;AACE,aAAO,MAAM,GAAG,IAAhB;AARJ;;AAUA,SAAO,CAAP;AACD,CAlBM,C;;;;;;;;;;;;;;;;;;;;;;ACtIP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kE;;;;;;;;;;;AC3WA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qH;;;;;;;;;;;;ACjPA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;;AAeA;AAAA;AAAA;AAAA;;AAKE;AACA,+BAAY,gBAAZ,EAA8B,UAA9B,EAA0C,WAA1C,EAAqD;AAArD;;AACE,SAAK,gBAAL,GAAwB,gBAAxB;AACA,SAAK,UAAL,GAAkB,UAAlB;AACA,SAAK,WAAL,GAAmB,WAAnB;;AACA,iDAAC,CAAC,OAAF,CAAU,kDAAV,EAAuB,UAAC,MAAD,EAAc,GAAd,EAAiB;AACtC,WAAI,CAAC,GAAD,CAAJ,GAAY,IAAI,MAAJ,CAAW,KAAI,CAAC,gBAAhB,EAAkC,KAAI,CAAC,UAAvC,EAAmD,KAAI,CAAC,WAAxD,CAAZ;AACD,KAF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kBAAgB,UApFJ;AAqFZ,qBAAmB,YArFP;AAsFZ,uBAAqB,cAtFT;AAuFZ,iBAAe,UAvFH;AAwFZ,iBAAe,UAxFH;AAyFZ,iBAAe,UAzFH;AA0FZ,qBAAmB,YA1FP;AA2FZ,iBAAe,UA3FH;AA4FZ,oBAAkB,UA5FN;AA6FZ,gBAAc,UA7FF;AA8FZ,kBAAgB,UA9FJ;AA+FZ,iBAAe,UA/FH;AAgGZ,gBAAc,UAhGF;AAiGZ,gBAAc,UAjGF;AAkGZ,oBAAkB,YAlGN;AAmGZ,wBAAsB,WAnGV;AAoGZ,iBAAe,UApGH;AAqGZ,oBAAkB,UArGN;AAsGZ,qBAAmB,UAtGP;AAuGZ,gBAAc,UAvGF;AAwGZ,kBAAgB,UAxGJ;AAyGZ,gBAAc,UAzGF;AA0GZ,oBAAkB,UA1GN;AA2GZ,eAAa,aA3GD;AA4GZ,iBAAe,aA5GH;AA6GZ,cAAY,UA7GA;AA8GZ,cAAY,UA9GA;AA+GZ,kBAAgB,WA/GJ;AAgHZ,gBAAc,UAhHF;AAiHZ,gBAAc,WAjHF;AAkHZ,sBAAoB,UAlHR;AAmHZ,kBAAgB,YAnHJ;AAoHZ,eAAa,WApHD;AAqHZ,eAAa,UArHD;AAsHZ,gBAAc,YAtHF;AAuHZ,iBAAe,WAvHH;AAwHZ,gBAAc;AAxHF,CAAd;AA0He,oEAAf,E;;;;;;;;;;;AC1HA,2D;;;;;;;;;;;ACAA,8D;;;;;;;;;;;ACAA,0E;;;;;;;;;;;ACAA,oD;;;;;;;;;;;ACAA,oD","file":"components/config.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./components/config.ts\");\n","'use strict';\n\nvar replace = String.prototype.replace;\nvar percentTwenties = /%20/g;\n\nmodule.exports = {\n 'default': 'RFC3986',\n formatters: {\n RFC1738: function (value) {\n return replace.call(value, percentTwenties, '+');\n },\n RFC3986: function (value) {\n return value;\n }\n },\n RFC1738: 'RFC1738',\n RFC3986: 'RFC3986'\n};\n","'use strict';\n\nvar stringify = require('./stringify');\nvar parse = require('./parse');\nvar formats = require('./formats');\n\nmodule.exports = {\n formats: formats,\n parse: parse,\n stringify: stringify\n};\n","'use strict';\n\nvar utils = require('./utils');\n\nvar has = Object.prototype.hasOwnProperty;\n\nvar defaults = {\n allowDots: false,\n allowPrototypes: false,\n arrayLimit: 20,\n decoder: utils.decode,\n delimiter: '&',\n depth: 5,\n parameterLimit: 1000,\n plainObjects: false,\n strictNullHandling: false\n};\n\nvar parseValues = function parseQueryStringValues(str, options) {\n var obj = {};\n var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\\?/, '') : str;\n var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;\n var parts = cleanStr.split(options.delimiter, limit);\n\n for (var i = 0; i < parts.length; ++i) {\n var part = parts[i];\n\n var bracketEqualsPos = part.indexOf(']=');\n var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;\n\n var key, val;\n if (pos === -1) {\n key = options.decoder(part, defaults.decoder);\n val = options.strictNullHandling ? null : '';\n } else {\n key = options.decoder(part.slice(0, pos), defaults.decoder);\n val = options.decoder(part.slice(pos + 1), defaults.decoder);\n }\n if (has.call(obj, key)) {\n obj[key] = [].concat(obj[key]).concat(val);\n } else {\n obj[key] = val;\n }\n }\n\n return obj;\n};\n\nvar parseObject = function (chain, val, options) {\n var leaf = val;\n\n for (var i = chain.length - 1; i >= 0; --i) {\n var obj;\n var root = chain[i];\n\n if (root === '[]') {\n obj = [];\n obj = obj.concat(leaf);\n } else {\n obj = options.plainObjects ? Object.create(null) : {};\n var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;\n var index = parseInt(cleanRoot, 10);\n if (\n !isNaN(index)\n && root !== cleanRoot\n && String(index) === cleanRoot\n && index >= 0\n && (options.parseArrays && index <= options.arrayLimit)\n ) {\n obj = [];\n obj[index] = leaf;\n } else {\n obj[cleanRoot] = leaf;\n }\n }\n\n leaf = obj;\n }\n\n return leaf;\n};\n\nvar parseKeys = function parseQueryStringKeys(givenKey, val, options) {\n if (!givenKey) {\n return;\n }\n\n // Transform dot notation to bracket notation\n var key = options.allowDots ? givenKey.replace(/\\.([^.[]+)/g, '[$1]') : givenKey;\n\n // The regex chunks\n\n var brackets = /(\\[[^[\\]]*])/;\n var child = /(\\[[^[\\]]*])/g;\n\n // Get the parent\n\n var segment = brackets.exec(key);\n var parent = segment ? key.slice(0, segment.index) : key;\n\n // Stash the parent if it exists\n\n var keys = [];\n if (parent) {\n // If we aren't using plain objects, optionally prefix keys\n // that would overwrite object prototype properties\n if (!options.plainObjects && has.call(Object.prototype, parent)) {\n if (!options.allowPrototypes) {\n return;\n }\n }\n\n keys.push(parent);\n }\n\n // Loop through children appending to the array until we hit depth\n\n var i = 0;\n while ((segment = child.exec(key)) !== null && i < options.depth) {\n i += 1;\n if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {\n if (!options.allowPrototypes) {\n return;\n }\n }\n keys.push(segment[1]);\n }\n\n // If there's a remainder, just add whatever is left\n\n if (segment) {\n keys.push('[' + key.slice(segment.index) + ']');\n }\n\n return parseObject(keys, val, options);\n};\n\nmodule.exports = function (str, opts) {\n var options = opts ? utils.assign({}, opts) : {};\n\n if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') {\n throw new TypeError('Decoder has to be a function.');\n }\n\n options.ignoreQueryPrefix = options.ignoreQueryPrefix === true;\n options.delimiter = typeof options.delimiter === 'string' || utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter;\n options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth;\n options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit;\n options.parseArrays = options.parseArrays !== false;\n options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder;\n options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots;\n options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects;\n options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes;\n options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit;\n options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;\n\n if (str === '' || str === null || typeof str === 'undefined') {\n return options.plainObjects ? Object.create(null) : {};\n }\n\n var tempObj = typeof str === 'string' ? parseValues(str, options) : str;\n var obj = options.plainObjects ? Object.create(null) : {};\n\n // Iterate over the keys and setup the new object\n\n var keys = Object.keys(tempObj);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n var newObj = parseKeys(key, tempObj[key], options);\n obj = utils.merge(obj, newObj, options);\n }\n\n return utils.compact(obj);\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar formats = require('./formats');\n\nvar arrayPrefixGenerators = {\n brackets: function brackets(prefix) { // eslint-disable-line func-name-matching\n return prefix + '[]';\n },\n indices: function indices(prefix, key) { // eslint-disable-line func-name-matching\n return prefix + '[' + key + ']';\n },\n repeat: function repeat(prefix) { // eslint-disable-line func-name-matching\n return prefix;\n }\n};\n\nvar toISO = Date.prototype.toISOString;\n\nvar defaults = {\n delimiter: '&',\n encode: true,\n encoder: utils.encode,\n encodeValuesOnly: false,\n serializeDate: function serializeDate(date) { // eslint-disable-line func-name-matching\n return toISO.call(date);\n },\n skipNulls: false,\n strictNullHandling: false\n};\n\nvar stringify = function stringify( // eslint-disable-line func-name-matching\n object,\n prefix,\n generateArrayPrefix,\n strictNullHandling,\n skipNulls,\n encoder,\n filter,\n sort,\n allowDots,\n serializeDate,\n formatter,\n encodeValuesOnly\n) {\n var obj = object;\n if (typeof filter === 'function') {\n obj = filter(prefix, obj);\n } else if (obj instanceof Date) {\n obj = serializeDate(obj);\n } else if (obj === null) {\n if (strictNullHandling) {\n return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder) : prefix;\n }\n\n obj = '';\n }\n\n if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || utils.isBuffer(obj)) {\n if (encoder) {\n var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder);\n return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder))];\n }\n return [formatter(prefix) + '=' + formatter(String(obj))];\n }\n\n var values = [];\n\n if (typeof obj === 'undefined') {\n return values;\n }\n\n var objKeys;\n if (Array.isArray(filter)) {\n objKeys = filter;\n } else {\n var keys = Object.keys(obj);\n objKeys = sort ? keys.sort(sort) : keys;\n }\n\n for (var i = 0; i < objKeys.length; ++i) {\n var key = objKeys[i];\n\n if (skipNulls && obj[key] === null) {\n continue;\n }\n\n if (Array.isArray(obj)) {\n values = values.concat(stringify(\n obj[key],\n generateArrayPrefix(prefix, key),\n generateArrayPrefix,\n strictNullHandling,\n skipNulls,\n encoder,\n filter,\n sort,\n allowDots,\n serializeDate,\n formatter,\n encodeValuesOnly\n ));\n } else {\n values = values.concat(stringify(\n obj[key],\n prefix + (allowDots ? '.' + key : '[' + key + ']'),\n generateArrayPrefix,\n strictNullHandling,\n skipNulls,\n encoder,\n filter,\n sort,\n allowDots,\n serializeDate,\n formatter,\n encodeValuesOnly\n ));\n }\n }\n\n return values;\n};\n\nmodule.exports = function (object, opts) {\n var obj = object;\n var options = opts ? utils.assign({}, opts) : {};\n\n if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') {\n throw new TypeError('Encoder has to be a function.');\n }\n\n var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter;\n var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;\n var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls;\n var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode;\n var encoder = typeof options.encoder === 'function' ? options.encoder : defaults.encoder;\n var sort = typeof options.sort === 'function' ? options.sort : null;\n var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots;\n var serializeDate = typeof options.serializeDate === 'function' ? options.serializeDate : defaults.serializeDate;\n var encodeValuesOnly = typeof options.encodeValuesOnly === 'boolean' ? options.encodeValuesOnly : defaults.encodeValuesOnly;\n if (typeof options.format === 'undefined') {\n options.format = formats['default'];\n } else if (!Object.prototype.hasOwnProperty.call(formats.formatters, options.format)) {\n throw new TypeError('Unknown format option provided.');\n }\n var formatter = formats.formatters[options.format];\n var objKeys;\n var filter;\n\n if (typeof options.filter === 'function') {\n filter = options.filter;\n obj = filter('', obj);\n } else if (Array.isArray(options.filter)) {\n filter = options.filter;\n objKeys = filter;\n }\n\n var keys = [];\n\n if (typeof obj !== 'object' || obj === null) {\n return '';\n }\n\n var arrayFormat;\n if (options.arrayFormat in arrayPrefixGenerators) {\n arrayFormat = options.arrayFormat;\n } else if ('indices' in options) {\n arrayFormat = options.indices ? 'indices' : 'repeat';\n } else {\n arrayFormat = 'indices';\n }\n\n var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];\n\n if (!objKeys) {\n objKeys = Object.keys(obj);\n }\n\n if (sort) {\n objKeys.sort(sort);\n }\n\n for (var i = 0; i < objKeys.length; ++i) {\n var key = objKeys[i];\n\n if (skipNulls && obj[key] === null) {\n continue;\n }\n\n keys = keys.concat(stringify(\n obj[key],\n key,\n generateArrayPrefix,\n strictNullHandling,\n skipNulls,\n encode ? encoder : null,\n filter,\n sort,\n allowDots,\n serializeDate,\n formatter,\n encodeValuesOnly\n ));\n }\n\n var joined = keys.join(delimiter);\n var prefix = options.addQueryPrefix === true ? '?' : '';\n\n return joined.length > 0 ? prefix + joined : '';\n};\n","'use strict';\n\nvar has = Object.prototype.hasOwnProperty;\n\nvar hexTable = (function () {\n var array = [];\n for (var i = 0; i < 256; ++i) {\n array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());\n }\n\n return array;\n}());\n\nvar compactQueue = function compactQueue(queue) {\n var obj;\n\n while (queue.length) {\n var item = queue.pop();\n obj = item.obj[item.prop];\n\n if (Array.isArray(obj)) {\n var compacted = [];\n\n for (var j = 0; j < obj.length; ++j) {\n if (typeof obj[j] !== 'undefined') {\n compacted.push(obj[j]);\n }\n }\n\n item.obj[item.prop] = compacted;\n }\n }\n\n return obj;\n};\n\nvar arrayToObject = function arrayToObject(source, options) {\n var obj = options && options.plainObjects ? Object.create(null) : {};\n for (var i = 0; i < source.length; ++i) {\n if (typeof source[i] !== 'undefined') {\n obj[i] = source[i];\n }\n }\n\n return obj;\n};\n\nvar merge = function merge(target, source, options) {\n if (!source) {\n return target;\n }\n\n if (typeof source !== 'object') {\n if (Array.isArray(target)) {\n target.push(source);\n } else if (typeof target === 'object') {\n if (options.plainObjects || options.allowPrototypes || !has.call(Object.prototype, source)) {\n target[source] = true;\n }\n } else {\n return [target, source];\n }\n\n return target;\n }\n\n if (typeof target !== 'object') {\n return [target].concat(source);\n }\n\n var mergeTarget = target;\n if (Array.isArray(target) && !Array.isArray(source)) {\n mergeTarget = arrayToObject(target, options);\n }\n\n if (Array.isArray(target) && Array.isArray(source)) {\n source.forEach(function (item, i) {\n if (has.call(target, i)) {\n if (target[i] && typeof target[i] === 'object') {\n target[i] = merge(target[i], item, options);\n } else {\n target.push(item);\n }\n } else {\n target[i] = item;\n }\n });\n return target;\n }\n\n return Object.keys(source).reduce(function (acc, key) {\n var value = source[key];\n\n if (has.call(acc, key)) {\n acc[key] = merge(acc[key], value, options);\n } else {\n acc[key] = value;\n }\n return acc;\n }, mergeTarget);\n};\n\nvar assign = function assignSingleSource(target, source) {\n return Object.keys(source).reduce(function (acc, key) {\n acc[key] = source[key];\n return acc;\n }, target);\n};\n\nvar decode = function (str) {\n try {\n return decodeURIComponent(str.replace(/\\+/g, ' '));\n } catch (e) {\n return str;\n }\n};\n\nvar encode = function encode(str) {\n // This code was originally written by Brian White (mscdex) for the io.js core querystring library.\n // It has been adapted here for stricter adherence to RFC 3986\n if (str.length === 0) {\n return str;\n }\n\n var string = typeof str === 'string' ? str : String(str);\n\n var out = '';\n for (var i = 0; i < string.length; ++i) {\n var c = string.charCodeAt(i);\n\n if (\n c === 0x2D // -\n || c === 0x2E // .\n || c === 0x5F // _\n || c === 0x7E // ~\n || (c >= 0x30 && c <= 0x39) // 0-9\n || (c >= 0x41 && c <= 0x5A) // a-z\n || (c >= 0x61 && c <= 0x7A) // A-Z\n ) {\n out += string.charAt(i);\n continue;\n }\n\n if (c < 0x80) {\n out = out + hexTable[c];\n continue;\n }\n\n if (c < 0x800) {\n out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);\n continue;\n }\n\n if (c < 0xD800 || c >= 0xE000) {\n out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);\n continue;\n }\n\n i += 1;\n c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));\n out += hexTable[0xF0 | (c >> 18)]\n + hexTable[0x80 | ((c >> 12) & 0x3F)]\n + hexTable[0x80 | ((c >> 6) & 0x3F)]\n + hexTable[0x80 | (c & 0x3F)];\n }\n\n return out;\n};\n\nvar compact = function compact(value) {\n var queue = [{ obj: { o: value }, prop: 'o' }];\n var refs = [];\n\n for (var i = 0; i < queue.length; ++i) {\n var item = queue[i];\n var obj = item.obj[item.prop];\n\n var keys = Object.keys(obj);\n for (var j = 0; j < keys.length; ++j) {\n var key = keys[j];\n var val = obj[key];\n if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {\n queue.push({ obj: obj, prop: key });\n refs.push(val);\n }\n }\n }\n\n return compactQueue(queue);\n};\n\nvar isRegExp = function isRegExp(obj) {\n return Object.prototype.toString.call(obj) === '[object RegExp]';\n};\n\nvar isBuffer = function isBuffer(obj) {\n if (obj === null || typeof obj === 'undefined') {\n return false;\n }\n\n return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));\n};\n\nmodule.exports = {\n arrayToObject: arrayToObject,\n assign: assign,\n compact: compact,\n decode: decode,\n encode: encode,\n isBuffer: isBuffer,\n isRegExp: isRegExp,\n merge: merge\n};\n","import { PluginMeta } from '@grafana/data';\nimport { config, getBackendSrv } from '@grafana/runtime';\nimport { TcDataSourceId } from '../datasource/common/constants';\n\nconst backendSrv = getBackendSrv();\n\nconst tcFolder = {\n uid: 'tencent-cloud-monitor',\n title: '腾讯云监控',\n folderId: null,\n};\n\nconst tcFolder_EN = {\n uid: 'tencent-cloud-monitor-english',\n title: 'Tencent Cloud Monitor',\n folderId: null,\n};\n\n/**\n * 生成腾讯云专用目录\n * @returns\n */\nasync function getFolderId() {\n if (tcFolder.folderId && tcFolder_EN.folderId) {\n return [tcFolder.folderId, tcFolder_EN.folderId];\n }\n const folders: any[] = await backendSrv.get('/api/folders');\n let folderId = folders.find((item) => item.uid === tcFolder.uid)?.id;\n let folderEnId = folders.find((item) => item.uid === tcFolder_EN.uid)?.id;\n if (!folderId) {\n const folder = await backendSrv.post('/api/folders', tcFolder);\n folderId = folder?.id || 0;\n }\n if (!folderEnId) {\n const folderEn = await backendSrv.post('/api/folders', tcFolder_EN);\n folderEnId = folderEn?.id || 0;\n }\n tcFolder.folderId = folderId;\n tcFolder_EN.folderId = folderEnId;\n return [folderId, folderEnId];\n}\n\n/**\n * 请求拦截器,拦截导入按钮的接口请求\n */\nfunction backendInterceptor() {\n const oldPost = backendSrv.post.bind(getBackendSrv());\n const pluginId = window.location.pathname.split('/').filter((item) => item)[1];\n backendSrv.post = async (url, data) => {\n // 拦截判断:拦截指定接口\n if (url === '/api/dashboards/import' && data.pluginId === pluginId) {\n const [folderId, folderEnId] = await getFolderId();\n data.folderId = data.path.endsWith('_en_dashboard.json') ? folderEnId : folderId;\n }\n return oldPost(url, data);\n };\n}\n\nbackendInterceptor();\n\nexport class MonitorAppConfigCtrl {\n static templateUrl = 'components/config.html';\n appEditCtrl: any;\n appModel?: PluginMeta;\n $q: any;\n configured: boolean;\n\n /** @ngInject */\n constructor($scope: any, $injector: any, $q: any) {\n this.appEditCtrl.setPostUpdateHook(this.postUpdate.bind(this));\n this.$q = $q;\n // Make sure it has a JSON Data spot\n if (!this.appModel) {\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n this.appModel = {} as PluginMeta;\n }\n\n // Required until we get the types sorted on appModel :(\n const appModel = this.appModel as any;\n if (!appModel.jsonData) {\n appModel.jsonData = {};\n }\n this.configured = false;\n if (this.appModel?.enabled) {\n const datasources = Object.values(config.datasources).filter((ds) => {\n return ds.type === TcDataSourceId;\n });\n if (datasources.length > 0) {\n this.configured = true;\n }\n }\n }\n\n async moveToFolder(dashbaordUid: string, folderId: number) {\n // 获取dashboard\n const { dashboard } = await backendSrv.get(`/api/dashboards/uid/${dashbaordUid}`);\n // 移动目录\n await backendSrv.post('/api/dashboards/db/', {\n dashboard,\n folderId,\n message: '',\n overwrite: true,\n });\n }\n\n async reviseDashboard() {\n // 1. 生成腾讯云目录\n const [folderId, folderEnId] = await getFolderId();\n // 2. 获取所有腾讯云插件下的dashboard\n const rs = await backendSrv.get(`/api/plugins/${this.appModel?.id}/dashboards`);\n\n // 3. 调用api更新dashboard\n const pmlist = rs.map((item) => {\n const { importedUrl, path } = item;\n const uid = importedUrl.split('/')[2];\n if (uid) {\n return this.moveToFolder(uid, path.endsWith('_en_dashboard.json') ? folderEnId : folderId);\n } else {\n return Promise.resolve();\n }\n });\n\n return Promise.all(pmlist);\n }\n\n async postUpdate() {\n if (!this.appModel?.enabled) {\n return;\n }\n // enable或者update时,对预设dashboard进行修改\n await this.reviseDashboard();\n return this.$q.resolve(true);\n }\n}\n","import _ from 'lodash';\nimport qs from 'qs';\nimport { SERVICES } from '../tc_monitor';\nimport Sign from './sign';\nimport SignV2 from './signV2';\nimport { toDataQueryResponse } from '@grafana/runtime';\nimport { getLanguage } from '../../locale';\n\nimport packageInfo from '../plugin.json';\nexport const TcDataSourceId = packageInfo.id;\n\n// the services of tencentcloud monitor api\nconst FINACE_REGIONS = ['ap-shanghai-fsi', 'ap-shenzhen-fsi'];\nconst SERVICES_API_INFO = {\n api: {\n service: 'api',\n version: '2020-11-06',\n path: '/api',\n host: 'api.tencentcloudapi.com',\n },\n // monitor api info\n monitor: {\n service: 'monitor',\n version: '2018-07-24',\n path: '/monitor',\n host: 'monitor.tencentcloudapi.com',\n },\n // cls api info\n cls: {\n service: 'cls',\n version: '2020-10-16',\n path: '/cls',\n host: 'cls.tencentcloudapi.com',\n },\n // cvm api info\n cvm: {\n service: 'cvm',\n version: '2017-03-12',\n path: '/cvm',\n host: 'cvm.tencentcloudapi.com',\n },\n // cdb api info\n cdb: {\n service: 'cdb',\n version: '2017-03-20',\n path: '/cdb',\n host: 'cdb.tencentcloudapi.com',\n },\n // pcx api info\n pcx: {\n service: 'pcx',\n version: '',\n path: '/pcx',\n host: 'vpc.api.qcloud.com',\n },\n // vpc api info\n vpc: {\n service: 'vpc',\n version: '2017-03-12',\n path: '/vpc',\n host: 'vpc.tencentcloudapi.com',\n },\n // mongodb api info\n mongodb: {\n service: 'mongodb',\n version: '2019-07-25',\n path: '/mongodb',\n host: 'mongodb.tencentcloudapi.com',\n },\n // 负载均衡 clb\n clb: {\n service: 'clb',\n version: '2018-03-17',\n path: '/clb',\n host: 'clb.tencentcloudapi.com',\n },\n // postgresql api info\n postgres: {\n service: 'postgres',\n version: '2017-03-12',\n path: '/postgres',\n host: 'postgres.tencentcloudapi.com',\n },\n // cdn info\n cdn: {\n service: 'cdn',\n version: '2018-06-06',\n path: '/cdn',\n host: 'cdn.tencentcloudapi.com',\n },\n // redis info\n redis: {\n service: 'redis',\n version: '2018-04-12',\n path: '/redis',\n host: 'redis.tencentcloudapi.com',\n },\n scf: {\n service: 'scf',\n version: '2018-04-16',\n path: '/scf',\n host: 'scf.tencentcloudapi.com',\n },\n cfs: {\n service: 'cfs',\n version: '2019-07-19',\n path: '/cfs',\n host: 'cfs.tencentcloudapi.com',\n },\n ckafka: {\n service: 'ckafka',\n version: '2019-08-19',\n path: '/ckafka',\n host: 'ckafka.tencentcloudapi.com',\n },\n // 专线接入实例列表\n dc: {\n service: 'dc',\n version: '2018-04-10',\n path: '/dc',\n host: 'dc.tencentcloudapi.com',\n },\n // cynosdb实例列表\n cynosdb: {\n service: 'cynosdb',\n version: '2019-01-07',\n path: '/cynosdb',\n host: 'cynosdb.tencentcloudapi.com',\n },\n // sqlserver实例列表\n sqlserver: {\n service: 'sqlserver',\n version: '2018-03-28',\n path: '/sqlserver',\n host: 'sqlserver.tencentcloudapi.com',\n },\n // bm实例列表\n bm: {\n service: 'bm',\n version: '2018-04-23',\n path: '/bm',\n host: 'bm.tencentcloudapi.com',\n },\n bmeip: {\n service: 'bmeip',\n version: '2018-06-25',\n path: '/bmeip',\n host: 'bmeip.tencentcloudapi.com',\n },\n bmvpc: {\n service: 'bmvpc',\n version: '2018-06-25',\n path: '/bmvpc',\n host: 'bmvpc.tencentcloudapi.com',\n },\n bmlb: {\n service: 'bmlb',\n version: '2018-06-25',\n path: '/bmlb',\n host: 'bmlb.tencentcloudapi.com',\n },\n // ES集群实例\n es: {\n service: 'es',\n version: '2018-04-16',\n path: '/es',\n host: 'es.tencentcloudapi.com',\n },\n // MapReduce\n emr: {\n service: 'emr',\n version: '2019-01-03',\n path: '/emr',\n host: 'emr.tencentcloudapi.com',\n },\n // CMQ消息队列\n cmq: {\n service: 'cmq',\n version: '2019-03-04',\n path: '/cmq',\n host: 'cmq.tencentcloudapi.com',\n },\n cbs: {\n service: 'cbs',\n version: '2017-03-12',\n path: '/cbs',\n host: 'cbs.tencentcloudapi.com',\n },\n // tcaplus实例\n tcaplusdb: {\n service: 'tcaplusdb',\n version: '2019-08-23',\n path: '/tcaplusdb',\n host: 'tcaplusdb.tencentcloudapi.com',\n },\n // tcaplus实例\n dcdb: {\n service: 'dcdb',\n version: '2018-04-11',\n path: '/dcdb',\n host: 'dcdb.tencentcloudapi.com',\n },\n // apigateway实例\n apigateway: {\n service: 'apigateway',\n version: '2018-08-08',\n path: '/apigateway',\n host: 'apigateway.tencentcloudapi.com',\n },\n tdmq: {\n service: 'tdmq',\n version: '2020-02-17',\n path: '/tdmq',\n host: 'tdmq.tencentcloudapi.com',\n },\n tdmq_rabbitmq: {\n service: 'tdmq',\n version: '2020-02-17',\n path: '/tdmq',\n host: 'tdmq.tencentcloudapi.com',\n },\n tdmq_rocketmq: {\n service: 'tdmq',\n version: '2020-02-17',\n path: '/tdmq',\n host: 'tdmq.tencentcloudapi.com',\n },\n gaap: {\n service: 'gaap',\n version: '2018-05-29',\n path: '/gaap',\n host: 'gaap.tencentcloudapi.com',\n },\n ecm: {\n service: 'ecm',\n version: '2019-07-19',\n path: '/ecm',\n host: 'ecm.tencentcloudapi.com',\n },\n gse: {\n service: 'gse',\n version: '2019-11-12',\n path: '/gse',\n host: 'gse.tencentcloudapi.com',\n },\n lighthouse: {\n service: 'lighthouse',\n version: '2020-03-24',\n path: '/lighthouse',\n host: 'lighthouse.tencentcloudapi.com',\n },\n tsf: {\n service: 'tsf',\n version: '2018-03-26',\n path: '/tsf',\n host: 'tsf.tencentcloudapi.com',\n },\n rum: {\n service: 'rum',\n version: '2021-06-22',\n path: '/rum',\n host: 'rum.tencentcloudapi.com',\n },\n tke: {\n service: 'tke',\n version: '2018-05-25',\n path: '/tke',\n host: 'tke.tencentcloudapi.com',\n },\n ecdn: {\n service: 'ecdn',\n version: '2019-10-12',\n path: '/ecdn',\n host: 'ecdn.tencentcloudapi.com',\n },\n waf: {\n service: 'waf',\n version: '2018-01-25',\n path: '/waf',\n host: 'waf.tencentcloudapi.com',\n },\n region: {\n service: 'region',\n version: '2022-06-27',\n path: '/region',\n host: 'region.tencentcloudapi.com',\n },\n apm: {\n service: 'apm',\n version: '2021-06-22',\n path: '/apm',\n host: 'apm.tencentcloudapi.com',\n },\n // 不单独定义lb,因为lb同样用的是vpc的配置,同上\n // lb: {\n // service: 'lb',\n // version: '2017-03-12',\n // path: '/lb',\n // host: 'vpc.tencentcloudapi.com'\n // }\n // 负载均衡四层协议 lbPrivate\n // lbPrivate: {\n // service: 'lbPrivate',\n // version: '2018-03-17',\n // path: '/clb',\n // host: 'clb.tencentcloudapi.com',\n // },\n};\n\nconst FINACE_HOST = {\n scf: {\n 'ap-shanghai-fsi': {\n path: '/fsi/scf/shanghai',\n host: 'scf.ap-shanghai-fsi.tencentcloudapi.com',\n },\n 'ap-shenzhen-fsi': {\n path: '/fsi/scf/shenzhen',\n host: 'scf.ap-shenzhen-fsi.tencentcloudapi.com',\n },\n },\n cfs: {\n 'ap-shanghai-fsi': {\n path: '/fsi/cfs/shanghai',\n host: 'cfs.ap-shanghai-fsi.tencentcloudapi.com',\n },\n 'ap-shenzhen-fsi': {\n path: '/fsi/cfs/shenzhen',\n host: 'cfs.ap-shenzhen-fsi.tencentcloudapi.com',\n },\n },\n ckafka: {\n 'ap-shanghai-fsi': {\n path: '/fsi/ckafka/shanghai',\n host: 'ckafka.ap-shanghai-fsi.tencentcloudapi.com',\n },\n 'ap-shenzhen-fsi': {\n path: '/fsi/ckafka/shenzhen',\n host: 'ckafka.ap-shenzhen-fsi.tencentcloudapi.com',\n },\n },\n clb: {\n 'ap-shanghai-fsi': {\n path: '/fsi/clb/shanghai',\n host: 'clb.ap-shanghai-fsi.tencentcloudapi.com',\n },\n 'ap-shenzhen-fsi': {\n path: '/fsi/clb/shenzhen',\n host: 'clb.ap-shenzhen-fsi.tencentcloudapi.com',\n },\n },\n mongodb: {\n 'ap-shanghai-fsi': {\n path: '/fsi/mongodb/shanghai',\n host: 'mongodb.ap-shanghai-fsi.tencentcloudapi.com',\n },\n 'ap-shenzhen-fsi': {\n path: '/fsi/mongodb/shenzhen',\n host: 'mongodb.ap-shenzhen-fsi.tencentcloudapi.com',\n },\n },\n vpc: {\n 'ap-shanghai-fsi': {\n path: '/fsi/vpc/shanghai',\n host: 'vpc.ap-shanghai-fsi.tencentcloudapi.com',\n },\n 'ap-shenzhen-fsi': {\n path: '/fsi/vpc/shenzhen',\n host: 'vpc.ap-shenzhen-fsi.tencentcloudapi.com',\n },\n },\n cvm: {\n 'ap-shanghai-fsi': {\n path: '/fsi/cvm/shanghai',\n host: 'cvm.ap-shanghai-fsi.tencentcloudapi.com',\n },\n 'ap-shenzhen-fsi': {\n path: '/fsi/cvm/shenzhen',\n host: 'cvm.ap-shenzhen-fsi.tencentcloudapi.com',\n },\n },\n cdb: {\n 'ap-shanghai-fsi': {\n path: '/fsi/cdb/shanghai',\n host: 'cdb.ap-shanghai-fsi.tencentcloudapi.com',\n },\n 'ap-shenzhen-fsi': {\n path: '/fsi/cdb/shenzhen',\n host: 'cdb.ap-shenzhen-fsi.tencentcloudapi.com',\n },\n },\n monitor: {\n 'ap-shanghai-fsi': {\n path: '/fsi/monitor/shanghai',\n host: 'monitor.ap-shanghai-fsi.tencentcloudapi.com',\n },\n 'ap-shenzhen-fsi': {\n path: '/fsi/monitor/shenzhen',\n host: 'monitor.ap-shenzhen-fsi.tencentcloudapi.com',\n },\n },\n postgres: {\n 'ap-shanghai-fsi': {\n path: '/fsi/postgres/shanghai',\n host: 'postgres.ap-shanghai-fsi.tencentcloudapi.com',\n },\n 'ap-shenzhen-fsi': {\n path: '/fsi/postgres/shenzhen',\n host: 'postgres.ap-shenzhen-fsi.tencentcloudapi.com',\n },\n },\n emr: {\n 'ap-shanghai-fsi': {\n path: '/fsi/emr/shanghai',\n host: 'emr.ap-shanghai-fsi.tencentcloudapi.com',\n },\n 'ap-shenzhen-fsi': {\n path: '/fsi/emr/shenzhen',\n host: 'emr.ap-shenzhen-fsi.tencentcloudapi.com',\n },\n },\n cmq: {\n 'ap-shanghai-fsi': {\n path: '/fsi/cmq/shanghai',\n host: 'cmq.ap-shanghai-fsi.tencentcloudapi.com',\n },\n 'ap-shenzhen-fsi': {\n path: '/fsi/cmq/shenzhen',\n host: 'cmq.ap-shenzhen-fsi.tencentcloudapi.com',\n },\n },\n cls: {\n 'ap-shanghai-fsi': {\n path: '/fsi/cls/shanghai',\n host: 'cls.ap-shanghai-fsi.tencentcloudapi.com',\n },\n 'ap-shenzhen-fsi': {\n path: '/fsi/cls/shenzhen',\n host: 'cls.ap-shenzhen-fsi.tencentcloudapi.com',\n },\n },\n};\n\n// 获取对应业务的 API 接口信息\nexport function GetServiceAPIInfo(region, service) {\n return { ...(SERVICES_API_INFO[service] || {}), ...getHostAndPath(region, service) };\n}\n\n// get host and path for finance regions\nfunction getHostAndPath(region, service) {\n if (_.indexOf(FINACE_REGIONS, region) === -1) {\n return {};\n }\n return (\n _.find(\n _.find(FINACE_HOST, (__, key) => key === service),\n (__, key) => key === region\n ) || {}\n );\n}\n\n// 变量替换指定实例按照那个字段展示\nexport const VARIABLE_ALIAS = 'instancealias';\n\nexport function GetServiceFromNamespace(namespace) {\n return _.get(\n _.find(SERVICES, (service) => service.namespace === namespace),\n 'service'\n );\n}\n// 处理存量target中保存的qce/cvm\nexport function GetLabelFromNamespace(namespace) {\n return _.get(\n _.find(SERVICES, (service) => service.namespace === namespace || service.label === namespace),\n 'label'\n );\n}\n// parse template variable query params\nexport function ParseMetricQuery(query = '') {\n if (!query) {\n return {};\n }\n const result = {};\n const queries = _.split(query, '&');\n _.forEach(queries, (item) => {\n const str = _.split(item, '=');\n if (_.trim(_.get(str, '0', ''))) {\n let val = _.trim(_.get(str, '1', ''));\n try {\n val = JSON.parse(val);\n } catch (e) {\n // console.log({ val });\n }\n result[_.toLower(_.trim(_.get(str, '0', '')))] = val;\n }\n });\n return result;\n}\n\n// parse template variable regex params\nexport function ParseMetricRegex(regex = '') {\n if (!regex) {\n return [];\n }\n regex = regex.replace(/:/g, ':');\n regex = regex.replace(/,/g, ',');\n const regexParams = ParseMetricQuery(regex);\n const result: any[] = [];\n _.forEach(regexParams, (value, key) => {\n if (key === 'tag:tag-key') {\n const valuesArr = _.split(value, ',');\n _.forEach(valuesArr, (item) => {\n const temp = _.split(item, ':');\n if (temp.length === 2) {\n result.push({ Name: `tag:${temp[0]}`, Values: temp.slice(1) });\n }\n });\n } else {\n result.push({ Name: key, Values: _.split(value, ',') });\n }\n });\n return result;\n}\n\n// get the actual value of template variable\nfunction parseVariableFormat(varname: string) {\n varname = String(varname || '');\n // $varname\n let varFlag = false;\n const regResult1 = varname.match(/^\\${?(\\w+)}?/);\n if (regResult1) {\n varFlag = true;\n varname = `\\$\\{${regResult1[1]}\\:json\\}`;\n }\n // [[varname]]\n const regResult2 = varname.match(/^\\[\\[(\\w+)(\\:\\w+)?\\]\\]/);\n if (regResult2) {\n varFlag = true;\n varname = `\\$\\{${regResult2[1]}\\:json\\}`;\n }\n return { varname, varFlag };\n}\n\nexport function ReplaceVariable(templateSrv, scopedVars, field, multiple = false) {\n const { varname, varFlag } = parseVariableFormat(field);\n let replaceVar = templateSrv.replace(varname, scopedVars);\n if (varFlag) {\n try {\n replaceVar = JSON.parse(replaceVar);\n } catch (error) {}\n }\n if (!multiple && _.isArray(replaceVar)) {\n replaceVar = _.get(replaceVar, '0', '');\n }\n return replaceVar;\n}\n\n// get dimensions for instance query param\nexport function GetDimensions(obj) {\n if (_.isEmpty(obj)) {\n return [];\n }\n const dimensions: any[] = [];\n _.forEach(obj, (item) => {\n if (item.Value !== null && item.Value !== undefined && item.Value !== '') {\n dimensions.push({ Name: item.Name, Value: typeof item.Value === 'string' ? item.Value : `${item.Value}` });\n }\n });\n return dimensions;\n}\n\n// parse query data result for panel\nexport function ParseQueryResult(response, instances: any[] = [], timeshift = 0) {\n const instanceList = _.cloneDeep(instances);\n\n const dataPoints = _.get(response, 'DataPoints', []);\n return _.map(dataPoints, (dataPoint) => {\n let instanceAliasValue = _.get(dataPoint, 'Dimensions[0].Value');\n for (let i = 0; i < instanceList.length; i++) {\n if (isInstanceMatch(instanceList[i], _.get(dataPoint, 'Dimensions', []))) {\n instanceAliasValue = instanceList[i]._InstanceAliasValue;\n instanceList.splice(i, 1);\n break;\n }\n }\n return {\n target: `${response.MetricName} - ${instanceAliasValue}`,\n datapoints: parseDataPoint(dataPoint, timeshift),\n };\n });\n}\n\n// parse tencent cloud monitor response data to grafana panel data\nfunction parseDataPoint(dataPoint, timeshift = 0) {\n const timestamps = _.get(dataPoint, 'Timestamps', []);\n const values = _.get(dataPoint, 'Values', []);\n const result = timestamps.map((timestamp, index) => {\n return [values[index], timestamp * 1000 + timeshift];\n });\n\n return result;\n}\n\n// check whether instance is match or not\nfunction isInstanceMatch(instance, dimensions) {\n let match = true;\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < dimensions.length; i++) {\n if (_.get(instance, dimensions[i].Name, '').toString() !== dimensions[i].Value.toString()) {\n match = false;\n break;\n }\n }\n return match;\n}\n\n/**\n * 检查某个变量是否模板变量,即是否匹配 ${varnam} 或 [[varname]]\n *\n * @param field 变量字段名\n */\nexport function isVariable(value) {\n if (value && (value.match(/^\\${?(\\w+)}?/) || value.match(/^\\[\\[(\\w+)(\\:\\w+)?\\]\\]/))) {\n return true;\n }\n return false;\n}\n\n/**\n * 腾讯云 API 3.0 接口协议\n * @param options 接口请求对象 { url: string, data?: object }\n * @param service 产品名字 'cvm'\n * @param signObj 接口请求相关信息 { region?: string, action: string }\n * @param secretId\n * @param secretKey\n */\nexport async function GetRequestParams(options, service, signObj: any = {}, secretId, datasourceId, backendSrv) {\n const signParams = {\n secretId,\n payload: options.data || '',\n ...signObj,\n ...(_.pick(GetServiceAPIInfo(signObj.region || '', service), ['service', 'host', 'version']) || {}),\n backendSrv,\n datasourceId,\n region: 'ap-guangzhou',\n };\n const sign = new Sign(signParams);\n const { intranet, ...headerSigned } = await sign.getHeader();\n // 传入x-tc-language实现国际化\n // zh-CN en-US ko-KR ja-JP\n options.headers = Object.assign(options.headers || {}, { ...headerSigned }, { 'x-tc-language': getLanguage() });\n options.method = 'POST';\n if (intranet) {\n options.url += '-internal';\n }\n return options;\n}\n\n/**\n * 腾讯云 API 2.0 接口协议\n * @param options 接口请求对象 { url: string, data?: object }\n * @param service 产品名字 'cvm'\n * @param signObj 接口请求相关信息 { region?: string, action: string }\n * @param secretId\n * @param secretKey\n */\nexport async function GetRequestParamsV2(\n options: any = {},\n service,\n signObj: any = {},\n secretId,\n datasourceId,\n backendSrv\n) {\n const data = options.data || {};\n const signParams = {\n secretId,\n data,\n ...signObj,\n ...(_.pick(GetServiceAPIInfo(signObj.region || '', service), ['host', 'version']) || {}),\n backendSrv,\n datasourceId,\n };\n options.method = 'POST';\n const sign = new SignV2(signParams);\n options.headers = Object.assign(options.headers || {}, { 'Content-Type': 'application/x-www-form-urlencoded' });\n const { queryString, path, host, intranet } = await sign.generateQueryString();\n options.data = qs.stringify({\n ...options.data,\n ...queryString,\n ...(host && { host: host }),\n });\n if (intranet) {\n // TODO: qcloud.com intranet host\n console.log('got intranet for sign v2');\n }\n options.url += path;\n return options;\n}\n\nexport function SliceLength(total = 0, len = 1) {\n const result: any[] = [];\n const num = Math.ceil(total / len);\n for (let i = 1; i < num; i++) {\n result.push({ Offset: len * i });\n }\n return result;\n}\n\nexport const FilterKeys = ['Namespace', 'Offset', 'Limit', 'SearchKey', 'Description', 'OrderBy', 'Order'];\n\nexport function parseDataFromBackendPlugin(res) {\n const { data } = toDataQueryResponse(res);\n return {\n authorization: _.get(data, '[0].meta.custom', ''),\n };\n}\n\n/** 当前环境是否为非生产环境 */\nexport const IS_DEVELOPMENT_ENVIRONMENT = !(process.env.NODE_ENV === 'production');\n\n/**\n * @link https://github.com/grafana/grafana/blob/3c6e0e8ef85048af952367751e478c08342e17b4/packages/grafana-data/src/types/app.ts#L12\n */\nexport enum CoreApp {\n CloudAlerting = 'cloud-alerting',\n UnifiedAlerting = 'unified-alerting',\n Dashboard = 'dashboard',\n Explore = 'explore',\n Unknown = 'unknown',\n PanelEditor = 'panel-editor',\n PanelViewer = 'panel-viewer',\n}\n","import indexedDB from './indexedDB';\nclass InstanceStorage {\n // prefix = 'Datasource';\n // storageKey = 'grafanaInstanceCache';\n insKey = 'Instances';\n cacheWay = '';\n constructor() {}\n setInstance(service: string, value: Record) {\n return this.setStorage(service, this.insKey, value, true);\n }\n async getInstance(service: string) {\n return this.getStorage(service, this.insKey);\n }\n setExtraStorage(service: string, Ekey: string, EValue: Record) {\n return this.setStorage(service, Ekey, EValue, false);\n }\n async getExtraStorage(service: string, Ekey: string) {\n return this.getStorage(service, Ekey);\n }\n private setStorage(serviceKey: string, key: string, value: Record, isCover = false) {\n // console.log('set', serviceKey, key, value);\n return indexedDB.addData(\n {\n service: serviceKey,\n [key]: value,\n },\n isCover\n );\n }\n // 获取到模版变量信息\n private async getStorage(service: string, key?: string) {\n const storage = await indexedDB.getData(service);\n // console.log('get', key, storage);\n return key ? storage?.[key] : storage;\n }\n}\nexport default new InstanceStorage();\n","interface DBEvent {\n target: { result: any; error: any };\n}\n// 数据库结构\ninterface DBTypes {\n store: StoreType;\n name?: string;\n version?: number;\n}\n// store表结构\ninterface StoreType {\n name: string; // 表名\n key: string; // 主键名\n cursorIndex?: { name: string; unique: boolean }[]; // 索引列表\n}\n\n// 数据结构\n// {service: 'cvm', instance: [{ins: 23}]}\ninterface DataType {\n service: string;\n [x: string]: any; // 有产品需缓存其他列表\n}\n\n// interface UpdateProps {\n// storeName: string;\n// cursorKey: string;\n// cursorValue?: any;\n// data: any;\n// }\n\nconst store: StoreType = {\n name: 'grafanaInstanceList',\n key: 'service',\n};\nconst promisify = (request: any, type?: string) => {\n return new Promise((resolve, reject) => {\n request.onsuccess = (event: DBEvent) => {\n const returnMap: any = {\n event: event.target.result,\n request: request.result,\n msg: '操作成功',\n };\n resolve(returnMap[type || 'msg']);\n };\n request.onerror = (event: DBEvent) => reject(event.target.error || '操作失败');\n });\n};\n// 固定表名和数据库名\nclass IndexedDB {\n name = 'grafanaDatabase';\n version = 1;\n\n constructor(props: DBTypes) {\n const { name = 'database', version = 1, store } = props;\n this.name = name;\n this.version = version;\n\n this.initDB(store);\n }\n\n /**\n * 初始化数据库\n * @param store 库表的结构\n */\n initDB(store: StoreType) {\n const indexeddb = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB || window.msIndexedDB;\n const request = indexeddb.open(this.name, this.version);\n\n request.onupgradeneeded = (event: IDBVersionChangeEvent) => {\n const db = (event.target as IDBOpenDBRequest).result;\n if (db.objectStoreNames.contains(store.name)) {\n // 存在表store\n }\n\n // 遍历store,设置数据表结构\n db.createObjectStore(store.name, {\n keyPath: store.key,\n });\n };\n request.onerror = () => Promise.reject(new Error('初始化数据库失败'));\n request.onsuccess = () => Promise.resolve('初始化数据库成功');\n }\n\n openDB() {\n const indexeddb = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB || window.msIndexedDB;\n const request = indexeddb.open(this.name, this.version);\n\n return promisify(request, 'event');\n }\n\n /**\n * 新增数据\n * @param storeName 表名\n * @param data 添加的数据\n */\n async insertData(storeName: string, data: any) {\n try {\n // console.time('insertData');\n const db = await this.openDB();\n const transaction = db.transaction(storeName, 'readwrite');\n const objectStore = transaction.objectStore(storeName);\n\n objectStore.add(data);\n // console.timeEnd('insertData');\n\n return new Promise((resolve, reject) => {\n transaction.oncomplete = function () {\n // console.timeEnd('insertData');\n resolve('所有数据插入成功');\n };\n\n transaction.onerror = function (event) {\n reject(event);\n };\n });\n } catch (error) {\n return Promise.reject(error);\n }\n }\n\n /**\n * 更新数据\n * @param props 查询数据的参数以及要修改的值的参数\n */\n async addData(data: DataType, isCover?: boolean) {\n try {\n // console.log('addData');\n const storeName = store.name; // 表名\n const oldData = await this.getData(data.service);\n const objectStore = await this.getObjectStore(storeName, 'readwrite');\n\n if (!oldData) {\n // 不存在则新建\n this.insertData(storeName, data);\n }\n // 存在则更新\n let newData: any = { ...oldData, ...data };\n if (isCover) newData = data; // 需要覆盖之前内容\n // 把更新过的对象放回数据库\n const requestUpdate = objectStore.put(newData);\n // console.timeEnd('updateData');\n return promisify(requestUpdate);\n } catch (error) {\n return Promise.reject(error);\n }\n }\n\n /**\n * 获取数据库的值,返回查询到的第一项\n * @param storeName 表名/存储对象的键\n * @param cursorKey key\n * @param cursorValue 要查询索引的值\n */\n async getData(seviceName: string) {\n try {\n // console.time('getData');\n const storeName = store.name;\n const objectStore = await this.getObjectStore(storeName);\n const request = objectStore.get(seviceName);\n // console.timeEnd('getData');\n return promisify(request, 'request');\n } catch (error) {\n return Promise.reject(error);\n }\n }\n async getAllData(storeName: string) {\n try {\n // console.time('getAllData');\n const objectStore = await this.getObjectStore(storeName);\n const request = objectStore.getAll();\n const result = await promisify(request, 'request');\n // console.timeEnd('getAllData');\n return result ? result : [];\n } catch (error) {\n return Promise.reject(error);\n }\n }\n /**\n * 获取对象仓库\n * @param storeName 表名\n * @param type readonly 或者 readwrite等\n */\n private async getObjectStore(storeName: string, type?: any): Promise {\n try {\n const db = await this.openDB();\n return db.transaction(storeName, type).objectStore(storeName);\n } catch (error) {\n return Promise.reject(error);\n }\n }\n}\n// console.log('testDDB')\n// const indexDB = new IndexedDB({store});\n// indexDB.addData({service: 'cvm', instance: [{ins: 23}]}).then(e=>{\n// indexDB.getData('cvm').then(dd=>{console.log({dd})})\n// })\nexport default new IndexedDB({ store });\n","import moment from 'moment';\n\nconst HttpRequestMethod = 'POST';\nconst CanonicalUri = '/';\nconst CanonicalQueryString = '';\nconst ContentType = 'application/json';\n\nexport default class Sign {\n /**\n * Tencent Cloud API Signature v3 reference: https://cloud.tencent.com/document/api/213/30654\n * secretId: SecretId for identifying identity that is applied for on Cloud API Key.\n * A SecretId corresponds to a unique SecretKey, which is used to generate the request Signature.\n * secretKey: SecretKey is used to encrypt the signature string and verify the signature string on the server\n * service: the name of service, which must be consistent with the request domain, such as cvm\n * action: The name of the API for the desired operation\n * host: the domain of service,which must be consistent with the request domain, such as cvm.tencentcloudapi.com\n * version: PI version, such as 2017-03-12\n * payload: The request parameters\n */\n\n secretId: string;\n\n service: string;\n action: string;\n host: string;\n version: string;\n payload: Record | string;\n region: string;\n timestamp: number;\n date: string;\n backendSrv: any;\n datasourceId: Number;\n constructor(options) {\n const { secretId, service, action, host, version, payload = '', region, backendSrv, datasourceId } = options;\n this.secretId = secretId;\n // this.secretKey = secretKey;\n this.service = service;\n this.action = action;\n this.host = host;\n this.version = version;\n this.payload = typeof payload === 'string' ? payload : JSON.stringify(payload);\n this.region = region;\n const nowDate = moment().utc();\n this.timestamp = nowDate.unix();\n this.date = nowDate.format('YYYY-MM-DD');\n this.backendSrv = backendSrv;\n this.datasourceId = datasourceId;\n }\n\n async getHeader() {\n return this.getResourceHeader();\n }\n\n async getResourceHeader() {\n let res: { authorization?: string; token?: string; intranet?: boolean } = {};\n try {\n const resp = await this.backendSrv.datasourceRequest({\n url: `/api/datasources/${this.datasourceId}/resources/sign_v3`,\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n data: {\n Host: this.host,\n Service: this.service,\n Version: this.version,\n Action: this.action,\n Region: this.region,\n Timestamp: this.timestamp,\n Method: HttpRequestMethod,\n Uri: CanonicalUri,\n Query: CanonicalQueryString,\n Body: this.payload,\n Headers: {\n 'content-type': ContentType,\n host: this.host,\n },\n },\n });\n res = resp.data;\n } catch (err) {}\n const { authorization, token, intranet } = res;\n const grafanaVersion = (window as any).grafanaBootData?.settings?.buildInfo?.version || '0.0.0';\n const headers = {\n Authorization: authorization,\n 'Content-Type': ContentType,\n 'X-TC-Action': this.action,\n 'X-TC-Timestamp': this.timestamp.toString(),\n 'X-TC-Version': this.version,\n 'X-TC-RequestClient': `GF_${grafanaVersion}_PL_CM_${process.env.TENCENT_CLOUD_MONITOR_GRAFANA_PLUGIN_VERSION}`,\n ...(this.region && {\n 'X-TC-Region': this.region,\n }),\n ...(token && {\n 'X-TC-Token': token,\n }),\n intranet: intranet,\n };\n return headers;\n }\n}\n","/**\n *\n * @param defaults 为对象\n * secretId\n * secretKey\n * action\n * region\n * host\n */\n\nexport default class SignV2 {\n defaults: any = {\n path: '/v2/index.php',\n method: 'POST',\n };\n backendSrv: any;\n datasourceId: Number;\n constructor(defaults: any = {}) {\n this.defaults = Object.assign(this.defaults, defaults);\n this.defaults.secretKey = '';\n this.backendSrv = defaults.backendSrv;\n this.datasourceId = defaults.datasourceId;\n }\n\n generateQueryString = async () => {\n return this.getResourceQueryString();\n };\n\n async getResourceQueryString() {\n let res: { path?: string; querystring?: any; host?: string; intranet?: boolean } = {};\n try {\n const { data } = this.defaults;\n const payload = typeof data === 'string' ? data : JSON.stringify(data);\n const resp = await this.backendSrv.datasourceRequest({\n url: `/api/datasources/${this.datasourceId}/resources/sign_v2`,\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n data: {\n Host: this.defaults.host,\n Action: this.defaults.action,\n Version: this.defaults.version,\n Region: this.defaults.region,\n Method: this.defaults.method,\n Uri: this.defaults.path,\n Query: '',\n Body: payload,\n },\n });\n res = resp.data;\n } catch (err) {}\n const { path, querystring, host, intranet } = res;\n return { queryString: querystring, path: path, host: host, intranet: intranet };\n }\n}\n","import _ from 'lodash';\nimport { SERVICES } from '../tc_monitor';\n\n/* 从分页数据获取全量数据 */\nconst PageSize = 50;\nfunction getFieldsValue(value, fields) {\n return fields.map((item) => _.get(value, item, _.get(value, `Result.${item}`, [])));\n}\n\nexport async function fetchAllFactory(fetcher: (args: any) => Promise, _params: any, field: string | string[]) {\n const params = { ..._.omit(_params, ['isOffsetPage']) };\n params.Limit = params.Limit || PageSize; // 默认给个Limit大小为50\n params.Offset = params.Offset ?? 0; // 默认给个Offset为0\n\n // 第一次请求,获取总数\n const rs = (await fetcher(params)) ?? {};\n const fields = Array.isArray(field) ? field : [field];\n\n // rs.TotalCount = rs.TotalCount ?? rs.Result.TotalCount ?? [];\n // const { TotalCount } = rs;\n const TotalCount = rs.TotalCount ?? rs.Result?.TotalCount ?? rs.TotalCnt ?? rs.Result?.TotalCnt ?? 0;\n const firstLists = getFieldsValue(rs, fields);\n\n if (TotalCount === 0 || firstLists[0].length === TotalCount) {\n // 只有一页,结束\n return firstLists;\n }\n\n // 批量请求\n const delta = TotalCount - firstLists[0].length;\n const batchCount = Math.ceil(delta / PageSize);\n const pmList = new Array(batchCount).fill(0).map((_, index) => {\n params.Offset = _params.isOffsetPage ? 1 + index : (1 + index) * params.Limit;\n return fetcher(params);\n });\n\n // 合并\n const resultList = await Promise.all(pmList); // [ {a: [], b[] }, { a: [], b:[] }]\n\n return resultList.reduce((acc, cur) => {\n const lists = getFieldsValue(cur, fields);\n // [[], [], []] + [[], [], []]\n acc.forEach((list, index) => list.push(...lists[index]));\n return acc;\n }, firstLists);\n}\n\n/**\n * 实例列表接口入参处理\n *\n * @param queries 表单键入内容\n * @param isFilter 是否需要设置为Filters格式\n */\nexport function instanceQueryParamsBaseParse(queries: any, isFilter: boolean) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n queries = _.omit(queries, ['Offset', 'Limit']);\n const Filters: any[] = [];\n _.forEach(queries, (item: any, key) => {\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n if (isFilter) {\n Filters.push({ Name: key, Values: _.uniq(item).slice(0, 5) });\n } else {\n params[key] = _.uniq(item);\n }\n }\n } else if (_.isObject(item)) {\n if (_.isNumber(_.get(item, 'value', undefined)) || !_.isEmpty(_.get(item, 'value', undefined))) {\n if (isFilter) {\n Filters.push({ Name: key, Values: _.get(item, 'value', []).slice(0, 5) });\n } else {\n params[key] = _.get(item, 'value');\n }\n }\n } else if (item !== null && item !== undefined && item !== '') {\n if (isFilter) {\n Filters.push({ Name: key, Values: item });\n } else {\n params[key] = item;\n }\n }\n });\n if (isFilter && Filters.length > 0) {\n params.Filters = Filters;\n return params;\n }\n }\n return params;\n}\n\nexport function getNamesapceFromService(serviceName: string) {\n return _.get(\n _.find(SERVICES, (service) => service.service === serviceName),\n 'namespace'\n );\n}\n\nexport function serviceGroupBy(\n services: { service: string; label: string; namespace: string; href: string; groupName?: string }[]\n) {\n const result = services.reduce((acc, cur) => {\n const { namespace, label, groupName = label } = cur;\n\n const existedGroup = acc.find((item) => item.label === groupName);\n if (!existedGroup) {\n acc.push({ label: groupName, value: groupName, items: [{ label, value: namespace }] });\n return acc;\n }\n\n existedGroup.items.push({ label, value: namespace });\n return acc;\n }, [] as any[]);\n\n // 将只有一个子元素的项目进行特殊处理\n const rs = result.map((item) =>\n item.items.length === 1 ? { label: item.items[0].label, value: item.items[0].value } : item\n );\n return rs;\n}\n\nexport const isTargetEqual = (newTargetString: string, oldTargetString: string, key: string) => {\n try {\n const newTarget = JSON.parse(newTargetString);\n const oldTarget = JSON.parse(oldTargetString);\n return newTarget[key] === oldTarget[key];\n } catch (e) {\n return newTargetString === oldTargetString;\n }\n};\n\nexport const getTimeShiftInMs = (timeShift: any) => {\n const parts = /^(\\d+)([d|h|m|s])$/.exec(timeShift);\n if (!parts) {\n return 0;\n }\n const amount = parseInt(parts[1], 10);\n const unit = parts[2];\n switch (unit) {\n case 'd':\n return amount * 86400 * 1000;\n case 'h':\n return amount * 3600 * 1000;\n case 'm':\n return amount * 60 * 1000;\n case 's':\n return amount * 1000;\n }\n return 0;\n};\n","var map = {\n\t\".\": \"./datasource/tc_monitor/index.ts\",\n\t\"./\": \"./datasource/tc_monitor/index.ts\",\n\t\"./MonitorDatasource\": \"./datasource/tc_monitor/MonitorDatasource.ts\",\n\t\"./MonitorDatasource.ts\": \"./datasource/tc_monitor/MonitorDatasource.ts\",\n\t\"./_base/datasource\": \"./datasource/tc_monitor/_base/datasource.ts\",\n\t\"./_base/datasource.ts\": \"./datasource/tc_monitor/_base/datasource.ts\",\n\t\"./_base/query\": \"./datasource/tc_monitor/_base/query.ts\",\n\t\"./_base/query.ts\": \"./datasource/tc_monitor/_base/query.ts\",\n\t\"./_base/query_filter\": \"./datasource/tc_monitor/_base/query_filter.ts\",\n\t\"./_base/query_filter.ts\": \"./datasource/tc_monitor/_base/query_filter.ts\",\n\t\"./_base/types\": \"./datasource/tc_monitor/_base/types.ts\",\n\t\"./_base/types.ts\": \"./datasource/tc_monitor/_base/types.ts\",\n\t\"./apigateway/datasource\": \"./datasource/tc_monitor/apigateway/datasource.ts\",\n\t\"./apigateway/datasource.ts\": \"./datasource/tc_monitor/apigateway/datasource.ts\",\n\t\"./apigateway/query\": \"./datasource/tc_monitor/apigateway/query.ts\",\n\t\"./apigateway/query.ts\": \"./datasource/tc_monitor/apigateway/query.ts\",\n\t\"./apigateway/query_def\": \"./datasource/tc_monitor/apigateway/query_def.ts\",\n\t\"./apigateway/query_def.ts\": \"./datasource/tc_monitor/apigateway/query_def.ts\",\n\t\"./bmIntraLb/datasource\": \"./datasource/tc_monitor/bmIntraLb/datasource.ts\",\n\t\"./bmIntraLb/datasource.ts\": \"./datasource/tc_monitor/bmIntraLb/datasource.ts\",\n\t\"./bmIntraLb/query\": \"./datasource/tc_monitor/bmIntraLb/query.ts\",\n\t\"./bmIntraLb/query.ts\": \"./datasource/tc_monitor/bmIntraLb/query.ts\",\n\t\"./bmIntraLb/query_def\": \"./datasource/tc_monitor/bmIntraLb/query_def.ts\",\n\t\"./bmIntraLb/query_def.ts\": \"./datasource/tc_monitor/bmIntraLb/query_def.ts\",\n\t\"./bm_lb/datasource\": \"./datasource/tc_monitor/bm_lb/datasource.ts\",\n\t\"./bm_lb/datasource.ts\": \"./datasource/tc_monitor/bm_lb/datasource.ts\",\n\t\"./bm_lb/query\": \"./datasource/tc_monitor/bm_lb/query.ts\",\n\t\"./bm_lb/query.ts\": \"./datasource/tc_monitor/bm_lb/query.ts\",\n\t\"./bm_lb/query_def\": \"./datasource/tc_monitor/bm_lb/query_def.ts\",\n\t\"./bm_lb/query_def.ts\": \"./datasource/tc_monitor/bm_lb/query_def.ts\",\n\t\"./bm_pcx/datasource\": \"./datasource/tc_monitor/bm_pcx/datasource.ts\",\n\t\"./bm_pcx/datasource.ts\": \"./datasource/tc_monitor/bm_pcx/datasource.ts\",\n\t\"./bm_pcx/query\": \"./datasource/tc_monitor/bm_pcx/query.ts\",\n\t\"./bm_pcx/query.ts\": \"./datasource/tc_monitor/bm_pcx/query.ts\",\n\t\"./bm_pcx/query_def\": \"./datasource/tc_monitor/bm_pcx/query_def.ts\",\n\t\"./bm_pcx/query_def.ts\": \"./datasource/tc_monitor/bm_pcx/query_def.ts\",\n\t\"./bwp/datasource\": \"./datasource/tc_monitor/bwp/datasource.ts\",\n\t\"./bwp/datasource.ts\": \"./datasource/tc_monitor/bwp/datasource.ts\",\n\t\"./bwp/query\": \"./datasource/tc_monitor/bwp/query.ts\",\n\t\"./bwp/query.ts\": \"./datasource/tc_monitor/bwp/query.ts\",\n\t\"./bwp/query_def\": \"./datasource/tc_monitor/bwp/query_def.ts\",\n\t\"./bwp/query_def.ts\": \"./datasource/tc_monitor/bwp/query_def.ts\",\n\t\"./cbs/datasource\": \"./datasource/tc_monitor/cbs/datasource.ts\",\n\t\"./cbs/datasource.ts\": \"./datasource/tc_monitor/cbs/datasource.ts\",\n\t\"./cbs/query\": \"./datasource/tc_monitor/cbs/query.ts\",\n\t\"./cbs/query.ts\": \"./datasource/tc_monitor/cbs/query.ts\",\n\t\"./cbs/query_def\": \"./datasource/tc_monitor/cbs/query_def.ts\",\n\t\"./cbs/query_def.ts\": \"./datasource/tc_monitor/cbs/query_def.ts\",\n\t\"./cdb/datasource\": \"./datasource/tc_monitor/cdb/datasource.ts\",\n\t\"./cdb/datasource.ts\": \"./datasource/tc_monitor/cdb/datasource.ts\",\n\t\"./cdb/query\": \"./datasource/tc_monitor/cdb/query.ts\",\n\t\"./cdb/query.ts\": \"./datasource/tc_monitor/cdb/query.ts\",\n\t\"./cdb/query_def\": \"./datasource/tc_monitor/cdb/query_def.ts\",\n\t\"./cdb/query_def.ts\": \"./datasource/tc_monitor/cdb/query_def.ts\",\n\t\"./cdn/datasource\": \"./datasource/tc_monitor/cdn/datasource.ts\",\n\t\"./cdn/datasource.ts\": \"./datasource/tc_monitor/cdn/datasource.ts\",\n\t\"./cdn/query\": \"./datasource/tc_monitor/cdn/query.ts\",\n\t\"./cdn/query.ts\": \"./datasource/tc_monitor/cdn/query.ts\",\n\t\"./cdn/query_def\": \"./datasource/tc_monitor/cdn/query_def.ts\",\n\t\"./cdn/query_def.ts\": \"./datasource/tc_monitor/cdn/query_def.ts\",\n\t\"./cdn_province/datasource\": \"./datasource/tc_monitor/cdn_province/datasource.ts\",\n\t\"./cdn_province/datasource.ts\": \"./datasource/tc_monitor/cdn_province/datasource.ts\",\n\t\"./cdn_province/query\": \"./datasource/tc_monitor/cdn_province/query.ts\",\n\t\"./cdn_province/query.ts\": \"./datasource/tc_monitor/cdn_province/query.ts\",\n\t\"./cdn_province/query_def\": \"./datasource/tc_monitor/cdn_province/query_def.ts\",\n\t\"./cdn_province/query_def.ts\": \"./datasource/tc_monitor/cdn_province/query_def.ts\",\n\t\"./ceip_summary/datasource\": \"./datasource/tc_monitor/ceip_summary/datasource.ts\",\n\t\"./ceip_summary/datasource.ts\": \"./datasource/tc_monitor/ceip_summary/datasource.ts\",\n\t\"./ceip_summary/query\": \"./datasource/tc_monitor/ceip_summary/query.ts\",\n\t\"./ceip_summary/query.ts\": \"./datasource/tc_monitor/ceip_summary/query.ts\",\n\t\"./ceip_summary/query_def\": \"./datasource/tc_monitor/ceip_summary/query_def.ts\",\n\t\"./ceip_summary/query_def.ts\": \"./datasource/tc_monitor/ceip_summary/query_def.ts\",\n\t\"./ces/datasource\": \"./datasource/tc_monitor/ces/datasource.ts\",\n\t\"./ces/datasource.ts\": \"./datasource/tc_monitor/ces/datasource.ts\",\n\t\"./ces/query\": \"./datasource/tc_monitor/ces/query.ts\",\n\t\"./ces/query.ts\": \"./datasource/tc_monitor/ces/query.ts\",\n\t\"./ces/query_def\": \"./datasource/tc_monitor/ces/query_def.ts\",\n\t\"./ces/query_def.ts\": \"./datasource/tc_monitor/ces/query_def.ts\",\n\t\"./cfs/datasource\": \"./datasource/tc_monitor/cfs/datasource.ts\",\n\t\"./cfs/datasource.ts\": \"./datasource/tc_monitor/cfs/datasource.ts\",\n\t\"./cfs/query\": \"./datasource/tc_monitor/cfs/query.ts\",\n\t\"./cfs/query.ts\": \"./datasource/tc_monitor/cfs/query.ts\",\n\t\"./cfs/query_def\": \"./datasource/tc_monitor/cfs/query_def.ts\",\n\t\"./cfs/query_def.ts\": \"./datasource/tc_monitor/cfs/query_def.ts\",\n\t\"./ckafka/datasource\": \"./datasource/tc_monitor/ckafka/datasource.ts\",\n\t\"./ckafka/datasource.ts\": \"./datasource/tc_monitor/ckafka/datasource.ts\",\n\t\"./ckafka/query\": \"./datasource/tc_monitor/ckafka/query.ts\",\n\t\"./ckafka/query.ts\": \"./datasource/tc_monitor/ckafka/query.ts\",\n\t\"./ckafka/query_def\": \"./datasource/tc_monitor/ckafka/query_def.ts\",\n\t\"./ckafka/query_def.ts\": \"./datasource/tc_monitor/ckafka/query_def.ts\",\n\t\"./clb/datasource\": \"./datasource/tc_monitor/clb/datasource.ts\",\n\t\"./clb/datasource.ts\": \"./datasource/tc_monitor/clb/datasource.ts\",\n\t\"./clb/query\": \"./datasource/tc_monitor/clb/query.ts\",\n\t\"./clb/query.ts\": \"./datasource/tc_monitor/clb/query.ts\",\n\t\"./clb/query_def\": \"./datasource/tc_monitor/clb/query_def.ts\",\n\t\"./clb/query_def.ts\": \"./datasource/tc_monitor/clb/query_def.ts\",\n\t\"./cls/datasource\": \"./datasource/tc_monitor/cls/datasource.ts\",\n\t\"./cls/datasource.ts\": \"./datasource/tc_monitor/cls/datasource.ts\",\n\t\"./cls/query\": \"./datasource/tc_monitor/cls/query.ts\",\n\t\"./cls/query.ts\": \"./datasource/tc_monitor/cls/query.ts\",\n\t\"./cls/query_def\": \"./datasource/tc_monitor/cls/query_def.ts\",\n\t\"./cls/query_def.ts\": \"./datasource/tc_monitor/cls/query_def.ts\",\n\t\"./cmq/datasource\": \"./datasource/tc_monitor/cmq/datasource.ts\",\n\t\"./cmq/datasource.ts\": \"./datasource/tc_monitor/cmq/datasource.ts\",\n\t\"./cmq/query\": \"./datasource/tc_monitor/cmq/query.ts\",\n\t\"./cmq/query.ts\": \"./datasource/tc_monitor/cmq/query.ts\",\n\t\"./cmq/query_def\": \"./datasource/tc_monitor/cmq/query_def.ts\",\n\t\"./cmq/query_def.ts\": \"./datasource/tc_monitor/cmq/query_def.ts\",\n\t\"./cmq_topic/datasource\": \"./datasource/tc_monitor/cmq_topic/datasource.ts\",\n\t\"./cmq_topic/datasource.ts\": \"./datasource/tc_monitor/cmq_topic/datasource.ts\",\n\t\"./cmq_topic/query\": \"./datasource/tc_monitor/cmq_topic/query.ts\",\n\t\"./cmq_topic/query.ts\": \"./datasource/tc_monitor/cmq_topic/query.ts\",\n\t\"./cmq_topic/query_def\": \"./datasource/tc_monitor/cmq_topic/query_def.ts\",\n\t\"./cmq_topic/query_def.ts\": \"./datasource/tc_monitor/cmq_topic/query_def.ts\",\n\t\"./cos/datasource\": \"./datasource/tc_monitor/cos/datasource.ts\",\n\t\"./cos/datasource.ts\": \"./datasource/tc_monitor/cos/datasource.ts\",\n\t\"./cos/query_def\": \"./datasource/tc_monitor/cos/query_def.ts\",\n\t\"./cos/query_def.ts\": \"./datasource/tc_monitor/cos/query_def.ts\",\n\t\"./cpm/datasource\": \"./datasource/tc_monitor/cpm/datasource.ts\",\n\t\"./cpm/datasource.ts\": \"./datasource/tc_monitor/cpm/datasource.ts\",\n\t\"./cpm/query\": \"./datasource/tc_monitor/cpm/query.ts\",\n\t\"./cpm/query.ts\": \"./datasource/tc_monitor/cpm/query.ts\",\n\t\"./cpm/query_def\": \"./datasource/tc_monitor/cpm/query_def.ts\",\n\t\"./cpm/query_def.ts\": \"./datasource/tc_monitor/cpm/query_def.ts\",\n\t\"./cvm/datasource\": \"./datasource/tc_monitor/cvm/datasource.ts\",\n\t\"./cvm/datasource.ts\": \"./datasource/tc_monitor/cvm/datasource.ts\",\n\t\"./cvm/query\": \"./datasource/tc_monitor/cvm/query.ts\",\n\t\"./cvm/query.ts\": \"./datasource/tc_monitor/cvm/query.ts\",\n\t\"./cvm/query_def\": \"./datasource/tc_monitor/cvm/query_def.ts\",\n\t\"./cvm/query_def.ts\": \"./datasource/tc_monitor/cvm/query_def.ts\",\n\t\"./cynosdb_mysql/datasource\": \"./datasource/tc_monitor/cynosdb_mysql/datasource.ts\",\n\t\"./cynosdb_mysql/datasource.ts\": \"./datasource/tc_monitor/cynosdb_mysql/datasource.ts\",\n\t\"./cynosdb_mysql/query\": \"./datasource/tc_monitor/cynosdb_mysql/query.ts\",\n\t\"./cynosdb_mysql/query.ts\": \"./datasource/tc_monitor/cynosdb_mysql/query.ts\",\n\t\"./cynosdb_mysql/query_def\": \"./datasource/tc_monitor/cynosdb_mysql/query_def.ts\",\n\t\"./cynosdb_mysql/query_def.ts\": \"./datasource/tc_monitor/cynosdb_mysql/query_def.ts\",\n\t\"./dc/datasource\": \"./datasource/tc_monitor/dc/datasource.ts\",\n\t\"./dc/datasource.ts\": \"./datasource/tc_monitor/dc/datasource.ts\",\n\t\"./dc/query\": \"./datasource/tc_monitor/dc/query.ts\",\n\t\"./dc/query.ts\": \"./datasource/tc_monitor/dc/query.ts\",\n\t\"./dc/query_def\": \"./datasource/tc_monitor/dc/query_def.ts\",\n\t\"./dc/query_def.ts\": \"./datasource/tc_monitor/dc/query_def.ts\",\n\t\"./dcdb/datasource\": \"./datasource/tc_monitor/dcdb/datasource.ts\",\n\t\"./dcdb/datasource.ts\": \"./datasource/tc_monitor/dcdb/datasource.ts\",\n\t\"./dcdb/query\": \"./datasource/tc_monitor/dcdb/query.ts\",\n\t\"./dcdb/query.ts\": \"./datasource/tc_monitor/dcdb/query.ts\",\n\t\"./dcdb/query_def\": \"./datasource/tc_monitor/dcdb/query_def.ts\",\n\t\"./dcdb/query_def.ts\": \"./datasource/tc_monitor/dcdb/query_def.ts\",\n\t\"./dcg/datasource\": \"./datasource/tc_monitor/dcg/datasource.ts\",\n\t\"./dcg/datasource.ts\": \"./datasource/tc_monitor/dcg/datasource.ts\",\n\t\"./dcg/query\": \"./datasource/tc_monitor/dcg/query.ts\",\n\t\"./dcg/query.ts\": \"./datasource/tc_monitor/dcg/query.ts\",\n\t\"./dcg/query_def\": \"./datasource/tc_monitor/dcg/query_def.ts\",\n\t\"./dcg/query_def.ts\": \"./datasource/tc_monitor/dcg/query_def.ts\",\n\t\"./dcx/datasource\": \"./datasource/tc_monitor/dcx/datasource.ts\",\n\t\"./dcx/datasource.ts\": \"./datasource/tc_monitor/dcx/datasource.ts\",\n\t\"./dcx/query\": \"./datasource/tc_monitor/dcx/query.ts\",\n\t\"./dcx/query.ts\": \"./datasource/tc_monitor/dcx/query.ts\",\n\t\"./dcx/query_def\": \"./datasource/tc_monitor/dcx/query_def.ts\",\n\t\"./dcx/query_def.ts\": \"./datasource/tc_monitor/dcx/query_def.ts\",\n\t\"./ecdn/datasource\": \"./datasource/tc_monitor/ecdn/datasource.ts\",\n\t\"./ecdn/datasource.ts\": \"./datasource/tc_monitor/ecdn/datasource.ts\",\n\t\"./ecdn/query\": \"./datasource/tc_monitor/ecdn/query.ts\",\n\t\"./ecdn/query.ts\": \"./datasource/tc_monitor/ecdn/query.ts\",\n\t\"./ecdn/query_def\": \"./datasource/tc_monitor/ecdn/query_def.ts\",\n\t\"./ecdn/query_def.ts\": \"./datasource/tc_monitor/ecdn/query_def.ts\",\n\t\"./ecm/datasource\": \"./datasource/tc_monitor/ecm/datasource.ts\",\n\t\"./ecm/datasource.ts\": \"./datasource/tc_monitor/ecm/datasource.ts\",\n\t\"./ecm/query\": \"./datasource/tc_monitor/ecm/query.ts\",\n\t\"./ecm/query.ts\": \"./datasource/tc_monitor/ecm/query.ts\",\n\t\"./ecm/query_def\": \"./datasource/tc_monitor/ecm/query_def.ts\",\n\t\"./ecm/query_def.ts\": \"./datasource/tc_monitor/ecm/query_def.ts\",\n\t\"./ecm_block_storage/datasource\": \"./datasource/tc_monitor/ecm_block_storage/datasource.ts\",\n\t\"./ecm_block_storage/datasource.ts\": \"./datasource/tc_monitor/ecm_block_storage/datasource.ts\",\n\t\"./ecm_block_storage/query\": \"./datasource/tc_monitor/ecm_block_storage/query.ts\",\n\t\"./ecm_block_storage/query.ts\": \"./datasource/tc_monitor/ecm_block_storage/query.ts\",\n\t\"./ecm_block_storage/query_def\": \"./datasource/tc_monitor/ecm_block_storage/query_def.ts\",\n\t\"./ecm_block_storage/query_def.ts\": \"./datasource/tc_monitor/ecm_block_storage/query_def.ts\",\n\t\"./ecm_lb/datasource\": \"./datasource/tc_monitor/ecm_lb/datasource.ts\",\n\t\"./ecm_lb/datasource.ts\": \"./datasource/tc_monitor/ecm_lb/datasource.ts\",\n\t\"./ecm_lb/query\": \"./datasource/tc_monitor/ecm_lb/query.ts\",\n\t\"./ecm_lb/query.ts\": \"./datasource/tc_monitor/ecm_lb/query.ts\",\n\t\"./ecm_lb/query_def\": \"./datasource/tc_monitor/ecm_lb/query_def.ts\",\n\t\"./ecm_lb/query_def.ts\": \"./datasource/tc_monitor/ecm_lb/query_def.ts\",\n\t\"./gse/datasource\": \"./datasource/tc_monitor/gse/datasource.ts\",\n\t\"./gse/datasource.ts\": \"./datasource/tc_monitor/gse/datasource.ts\",\n\t\"./gse/query\": \"./datasource/tc_monitor/gse/query.ts\",\n\t\"./gse/query.ts\": \"./datasource/tc_monitor/gse/query.ts\",\n\t\"./gse/query_def\": \"./datasource/tc_monitor/gse/query_def.ts\",\n\t\"./gse/query_def.ts\": \"./datasource/tc_monitor/gse/query_def.ts\",\n\t\"./index\": \"./datasource/tc_monitor/index.ts\",\n\t\"./index.ts\": \"./datasource/tc_monitor/index.ts\",\n\t\"./lb/datasource\": \"./datasource/tc_monitor/lb/datasource.ts\",\n\t\"./lb/datasource.ts\": \"./datasource/tc_monitor/lb/datasource.ts\",\n\t\"./lb/query\": \"./datasource/tc_monitor/lb/query.ts\",\n\t\"./lb/query.ts\": \"./datasource/tc_monitor/lb/query.ts\",\n\t\"./lb/query_def\": \"./datasource/tc_monitor/lb/query_def.ts\",\n\t\"./lb/query_def.ts\": \"./datasource/tc_monitor/lb/query_def.ts\",\n\t\"./lighthouse/datasource\": \"./datasource/tc_monitor/lighthouse/datasource.ts\",\n\t\"./lighthouse/datasource.ts\": \"./datasource/tc_monitor/lighthouse/datasource.ts\",\n\t\"./lighthouse/query\": \"./datasource/tc_monitor/lighthouse/query.ts\",\n\t\"./lighthouse/query.ts\": \"./datasource/tc_monitor/lighthouse/query.ts\",\n\t\"./lighthouse/query_def\": \"./datasource/tc_monitor/lighthouse/query_def.ts\",\n\t\"./lighthouse/query_def.ts\": \"./datasource/tc_monitor/lighthouse/query_def.ts\",\n\t\"./mongodb/datasource\": \"./datasource/tc_monitor/mongodb/datasource.ts\",\n\t\"./mongodb/datasource.ts\": \"./datasource/tc_monitor/mongodb/datasource.ts\",\n\t\"./mongodb/query\": \"./datasource/tc_monitor/mongodb/query.ts\",\n\t\"./mongodb/query.ts\": \"./datasource/tc_monitor/mongodb/query.ts\",\n\t\"./mongodb/query_def\": \"./datasource/tc_monitor/mongodb/query_def.ts\",\n\t\"./mongodb/query_def.ts\": \"./datasource/tc_monitor/mongodb/query_def.ts\",\n\t\"./mr/datasource\": \"./datasource/tc_monitor/mr/datasource.ts\",\n\t\"./mr/datasource.ts\": \"./datasource/tc_monitor/mr/datasource.ts\",\n\t\"./mr/query\": \"./datasource/tc_monitor/mr/query.ts\",\n\t\"./mr/query.ts\": \"./datasource/tc_monitor/mr/query.ts\",\n\t\"./mr/query_def\": \"./datasource/tc_monitor/mr/query_def.ts\",\n\t\"./mr/query_def.ts\": \"./datasource/tc_monitor/mr/query_def.ts\",\n\t\"./nat_gateway/datasource\": \"./datasource/tc_monitor/nat_gateway/datasource.ts\",\n\t\"./nat_gateway/datasource.ts\": \"./datasource/tc_monitor/nat_gateway/datasource.ts\",\n\t\"./nat_gateway/query\": \"./datasource/tc_monitor/nat_gateway/query.ts\",\n\t\"./nat_gateway/query.ts\": \"./datasource/tc_monitor/nat_gateway/query.ts\",\n\t\"./nat_gateway/query_def\": \"./datasource/tc_monitor/nat_gateway/query_def.ts\",\n\t\"./nat_gateway/query_def.ts\": \"./datasource/tc_monitor/nat_gateway/query_def.ts\",\n\t\"./ov_cdn/datasource\": \"./datasource/tc_monitor/ov_cdn/datasource.ts\",\n\t\"./ov_cdn/datasource.ts\": \"./datasource/tc_monitor/ov_cdn/datasource.ts\",\n\t\"./ov_cdn/query\": \"./datasource/tc_monitor/ov_cdn/query.ts\",\n\t\"./ov_cdn/query.ts\": \"./datasource/tc_monitor/ov_cdn/query.ts\",\n\t\"./ov_cdn/query_def\": \"./datasource/tc_monitor/ov_cdn/query_def.ts\",\n\t\"./ov_cdn/query_def.ts\": \"./datasource/tc_monitor/ov_cdn/query_def.ts\",\n\t\"./pcx/datasource\": \"./datasource/tc_monitor/pcx/datasource.ts\",\n\t\"./pcx/datasource.ts\": \"./datasource/tc_monitor/pcx/datasource.ts\",\n\t\"./pcx/query\": \"./datasource/tc_monitor/pcx/query.ts\",\n\t\"./pcx/query.ts\": \"./datasource/tc_monitor/pcx/query.ts\",\n\t\"./pcx/query_def\": \"./datasource/tc_monitor/pcx/query_def.ts\",\n\t\"./pcx/query_def.ts\": \"./datasource/tc_monitor/pcx/query_def.ts\",\n\t\"./postgresql/datasource\": \"./datasource/tc_monitor/postgresql/datasource.ts\",\n\t\"./postgresql/datasource.ts\": \"./datasource/tc_monitor/postgresql/datasource.ts\",\n\t\"./postgresql/query\": \"./datasource/tc_monitor/postgresql/query.ts\",\n\t\"./postgresql/query.ts\": \"./datasource/tc_monitor/postgresql/query.ts\",\n\t\"./postgresql/query_def\": \"./datasource/tc_monitor/postgresql/query_def.ts\",\n\t\"./postgresql/query_def.ts\": \"./datasource/tc_monitor/postgresql/query_def.ts\",\n\t\"./qaap/datasource\": \"./datasource/tc_monitor/qaap/datasource.ts\",\n\t\"./qaap/datasource.ts\": \"./datasource/tc_monitor/qaap/datasource.ts\",\n\t\"./qaap/query\": \"./datasource/tc_monitor/qaap/query.ts\",\n\t\"./qaap/query.ts\": \"./datasource/tc_monitor/qaap/query.ts\",\n\t\"./qaap/query_def\": \"./datasource/tc_monitor/qaap/query_def.ts\",\n\t\"./qaap/query_def.ts\": \"./datasource/tc_monitor/qaap/query_def.ts\",\n\t\"./redis/datasource\": \"./datasource/tc_monitor/redis/datasource.ts\",\n\t\"./redis/datasource.ts\": \"./datasource/tc_monitor/redis/datasource.ts\",\n\t\"./redis/query\": \"./datasource/tc_monitor/redis/query.ts\",\n\t\"./redis/query.ts\": \"./datasource/tc_monitor/redis/query.ts\",\n\t\"./redis/query_def\": \"./datasource/tc_monitor/redis/query_def.ts\",\n\t\"./redis/query_def.ts\": \"./datasource/tc_monitor/redis/query_def.ts\",\n\t\"./redis_mem/datasource\": \"./datasource/tc_monitor/redis_mem/datasource.ts\",\n\t\"./redis_mem/datasource.ts\": \"./datasource/tc_monitor/redis_mem/datasource.ts\",\n\t\"./redis_mem/query\": \"./datasource/tc_monitor/redis_mem/query.ts\",\n\t\"./redis_mem/query.ts\": \"./datasource/tc_monitor/redis_mem/query.ts\",\n\t\"./redis_mem/query_def\": \"./datasource/tc_monitor/redis_mem/query_def.ts\",\n\t\"./redis_mem/query_def.ts\": \"./datasource/tc_monitor/redis_mem/query_def.ts\",\n\t\"./scf/datasource\": \"./datasource/tc_monitor/scf/datasource.ts\",\n\t\"./scf/datasource.ts\": \"./datasource/tc_monitor/scf/datasource.ts\",\n\t\"./scf/query\": \"./datasource/tc_monitor/scf/query.ts\",\n\t\"./scf/query.ts\": \"./datasource/tc_monitor/scf/query.ts\",\n\t\"./scf/query_def\": \"./datasource/tc_monitor/scf/query_def.ts\",\n\t\"./scf/query_def.ts\": \"./datasource/tc_monitor/scf/query_def.ts\",\n\t\"./sqlserver/datasource\": \"./datasource/tc_monitor/sqlserver/datasource.ts\",\n\t\"./sqlserver/datasource.ts\": \"./datasource/tc_monitor/sqlserver/datasource.ts\",\n\t\"./sqlserver/query\": \"./datasource/tc_monitor/sqlserver/query.ts\",\n\t\"./sqlserver/query.ts\": \"./datasource/tc_monitor/sqlserver/query.ts\",\n\t\"./sqlserver/query_def\": \"./datasource/tc_monitor/sqlserver/query_def.ts\",\n\t\"./sqlserver/query_def.ts\": \"./datasource/tc_monitor/sqlserver/query_def.ts\",\n\t\"./tcaplus/datasource\": \"./datasource/tc_monitor/tcaplus/datasource.ts\",\n\t\"./tcaplus/datasource.ts\": \"./datasource/tc_monitor/tcaplus/datasource.ts\",\n\t\"./tcaplus/query\": \"./datasource/tc_monitor/tcaplus/query.ts\",\n\t\"./tcaplus/query.ts\": \"./datasource/tc_monitor/tcaplus/query.ts\",\n\t\"./tcaplus/query_def\": \"./datasource/tc_monitor/tcaplus/query_def.ts\",\n\t\"./tcaplus/query_def.ts\": \"./datasource/tc_monitor/tcaplus/query_def.ts\",\n\t\"./tdmq/datasource\": \"./datasource/tc_monitor/tdmq/datasource.ts\",\n\t\"./tdmq/datasource.ts\": \"./datasource/tc_monitor/tdmq/datasource.ts\",\n\t\"./tdmq/query\": \"./datasource/tc_monitor/tdmq/query.ts\",\n\t\"./tdmq/query.ts\": \"./datasource/tc_monitor/tdmq/query.ts\",\n\t\"./tdmq/query_def\": \"./datasource/tc_monitor/tdmq/query_def.ts\",\n\t\"./tdmq/query_def.ts\": \"./datasource/tc_monitor/tdmq/query_def.ts\",\n\t\"./tdmq_rabbitmq/datasource\": \"./datasource/tc_monitor/tdmq_rabbitmq/datasource.ts\",\n\t\"./tdmq_rabbitmq/datasource.ts\": \"./datasource/tc_monitor/tdmq_rabbitmq/datasource.ts\",\n\t\"./tdmq_rabbitmq/query\": \"./datasource/tc_monitor/tdmq_rabbitmq/query.ts\",\n\t\"./tdmq_rabbitmq/query.ts\": \"./datasource/tc_monitor/tdmq_rabbitmq/query.ts\",\n\t\"./tdmq_rabbitmq/query_def\": \"./datasource/tc_monitor/tdmq_rabbitmq/query_def.ts\",\n\t\"./tdmq_rabbitmq/query_def.ts\": \"./datasource/tc_monitor/tdmq_rabbitmq/query_def.ts\",\n\t\"./tdmq_rocketmq/datasource\": \"./datasource/tc_monitor/tdmq_rocketmq/datasource.ts\",\n\t\"./tdmq_rocketmq/datasource.ts\": \"./datasource/tc_monitor/tdmq_rocketmq/datasource.ts\",\n\t\"./tdmq_rocketmq/query\": \"./datasource/tc_monitor/tdmq_rocketmq/query.ts\",\n\t\"./tdmq_rocketmq/query.ts\": \"./datasource/tc_monitor/tdmq_rocketmq/query.ts\",\n\t\"./tdmq_rocketmq/query_def\": \"./datasource/tc_monitor/tdmq_rocketmq/query_def.ts\",\n\t\"./tdmq_rocketmq/query_def.ts\": \"./datasource/tc_monitor/tdmq_rocketmq/query_def.ts\",\n\t\"./tke/datasource\": \"./datasource/tc_monitor/tke/datasource.ts\",\n\t\"./tke/datasource.ts\": \"./datasource/tc_monitor/tke/datasource.ts\",\n\t\"./tke/query\": \"./datasource/tc_monitor/tke/query.ts\",\n\t\"./tke/query.ts\": \"./datasource/tc_monitor/tke/query.ts\",\n\t\"./tke/query_def\": \"./datasource/tc_monitor/tke/query_def.ts\",\n\t\"./tke/query_def.ts\": \"./datasource/tc_monitor/tke/query_def.ts\",\n\t\"./tsf/datasource\": \"./datasource/tc_monitor/tsf/datasource.ts\",\n\t\"./tsf/datasource.ts\": \"./datasource/tc_monitor/tsf/datasource.ts\",\n\t\"./tsf/query\": \"./datasource/tc_monitor/tsf/query.ts\",\n\t\"./tsf/query.ts\": \"./datasource/tc_monitor/tsf/query.ts\",\n\t\"./tsf/query_def\": \"./datasource/tc_monitor/tsf/query_def.ts\",\n\t\"./tsf/query_def.ts\": \"./datasource/tc_monitor/tsf/query_def.ts\",\n\t\"./v_clb/datasource\": \"./datasource/tc_monitor/v_clb/datasource.ts\",\n\t\"./v_clb/datasource.ts\": \"./datasource/tc_monitor/v_clb/datasource.ts\",\n\t\"./v_clb/query\": \"./datasource/tc_monitor/v_clb/query.ts\",\n\t\"./v_clb/query.ts\": \"./datasource/tc_monitor/v_clb/query.ts\",\n\t\"./v_clb/query_def\": \"./datasource/tc_monitor/v_clb/query_def.ts\",\n\t\"./v_clb/query_def.ts\": \"./datasource/tc_monitor/v_clb/query_def.ts\",\n\t\"./vbc/datasource\": \"./datasource/tc_monitor/vbc/datasource.ts\",\n\t\"./vbc/datasource.ts\": \"./datasource/tc_monitor/vbc/datasource.ts\",\n\t\"./vbc/query\": \"./datasource/tc_monitor/vbc/query.ts\",\n\t\"./vbc/query.ts\": \"./datasource/tc_monitor/vbc/query.ts\",\n\t\"./vbc/query_def\": \"./datasource/tc_monitor/vbc/query_def.ts\",\n\t\"./vbc/query_def.ts\": \"./datasource/tc_monitor/vbc/query_def.ts\",\n\t\"./vpc_net_detect/datasource\": \"./datasource/tc_monitor/vpc_net_detect/datasource.ts\",\n\t\"./vpc_net_detect/datasource.ts\": \"./datasource/tc_monitor/vpc_net_detect/datasource.ts\",\n\t\"./vpc_net_detect/query\": \"./datasource/tc_monitor/vpc_net_detect/query.ts\",\n\t\"./vpc_net_detect/query.ts\": \"./datasource/tc_monitor/vpc_net_detect/query.ts\",\n\t\"./vpc_net_detect/query_def\": \"./datasource/tc_monitor/vpc_net_detect/query_def.ts\",\n\t\"./vpc_net_detect/query_def.ts\": \"./datasource/tc_monitor/vpc_net_detect/query_def.ts\",\n\t\"./vpngw/datasource\": \"./datasource/tc_monitor/vpngw/datasource.ts\",\n\t\"./vpngw/datasource.ts\": \"./datasource/tc_monitor/vpngw/datasource.ts\",\n\t\"./vpngw/query\": \"./datasource/tc_monitor/vpngw/query.ts\",\n\t\"./vpngw/query.ts\": \"./datasource/tc_monitor/vpngw/query.ts\",\n\t\"./vpngw/query_def\": \"./datasource/tc_monitor/vpngw/query_def.ts\",\n\t\"./vpngw/query_def.ts\": \"./datasource/tc_monitor/vpngw/query_def.ts\",\n\t\"./vpnx/datasource\": \"./datasource/tc_monitor/vpnx/datasource.ts\",\n\t\"./vpnx/datasource.ts\": \"./datasource/tc_monitor/vpnx/datasource.ts\",\n\t\"./vpnx/query\": \"./datasource/tc_monitor/vpnx/query.ts\",\n\t\"./vpnx/query.ts\": \"./datasource/tc_monitor/vpnx/query.ts\",\n\t\"./vpnx/query_def\": \"./datasource/tc_monitor/vpnx/query_def.ts\",\n\t\"./vpnx/query_def.ts\": \"./datasource/tc_monitor/vpnx/query_def.ts\",\n\t\"./waf/datasource\": \"./datasource/tc_monitor/waf/datasource.ts\",\n\t\"./waf/datasource.ts\": \"./datasource/tc_monitor/waf/datasource.ts\",\n\t\"./waf/query\": \"./datasource/tc_monitor/waf/query.ts\",\n\t\"./waf/query.ts\": \"./datasource/tc_monitor/waf/query.ts\",\n\t\"./waf/query_def\": \"./datasource/tc_monitor/waf/query_def.ts\",\n\t\"./waf/query_def.ts\": \"./datasource/tc_monitor/waf/query_def.ts\"\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = \"./datasource/tc_monitor sync recursive ^.*$\";","var map = {\n\t\"./_base/query.ts\": \"./datasource/tc_monitor/_base/query.ts\",\n\t\"./apigateway/datasource\": \"./datasource/tc_monitor/apigateway/datasource.ts\",\n\t\"./apigateway/datasource.ts\": \"./datasource/tc_monitor/apigateway/datasource.ts\",\n\t\"./apigateway/query.ts\": \"./datasource/tc_monitor/apigateway/query.ts\",\n\t\"./apigateway/query_def.ts\": \"./datasource/tc_monitor/apigateway/query_def.ts\",\n\t\"./bmIntraLb/datasource\": \"./datasource/tc_monitor/bmIntraLb/datasource.ts\",\n\t\"./bmIntraLb/datasource.ts\": \"./datasource/tc_monitor/bmIntraLb/datasource.ts\",\n\t\"./bmIntraLb/query.ts\": \"./datasource/tc_monitor/bmIntraLb/query.ts\",\n\t\"./bmIntraLb/query_def.ts\": \"./datasource/tc_monitor/bmIntraLb/query_def.ts\",\n\t\"./bm_lb/datasource\": \"./datasource/tc_monitor/bm_lb/datasource.ts\",\n\t\"./bm_lb/datasource.ts\": \"./datasource/tc_monitor/bm_lb/datasource.ts\",\n\t\"./bm_lb/query.ts\": \"./datasource/tc_monitor/bm_lb/query.ts\",\n\t\"./bm_lb/query_def.ts\": \"./datasource/tc_monitor/bm_lb/query_def.ts\",\n\t\"./bm_pcx/datasource\": \"./datasource/tc_monitor/bm_pcx/datasource.ts\",\n\t\"./bm_pcx/datasource.ts\": \"./datasource/tc_monitor/bm_pcx/datasource.ts\",\n\t\"./bm_pcx/query.ts\": \"./datasource/tc_monitor/bm_pcx/query.ts\",\n\t\"./bm_pcx/query_def.ts\": \"./datasource/tc_monitor/bm_pcx/query_def.ts\",\n\t\"./bwp/datasource\": \"./datasource/tc_monitor/bwp/datasource.ts\",\n\t\"./bwp/datasource.ts\": \"./datasource/tc_monitor/bwp/datasource.ts\",\n\t\"./bwp/query.ts\": \"./datasource/tc_monitor/bwp/query.ts\",\n\t\"./bwp/query_def.ts\": \"./datasource/tc_monitor/bwp/query_def.ts\",\n\t\"./cbs/datasource\": \"./datasource/tc_monitor/cbs/datasource.ts\",\n\t\"./cbs/datasource.ts\": \"./datasource/tc_monitor/cbs/datasource.ts\",\n\t\"./cbs/query.ts\": \"./datasource/tc_monitor/cbs/query.ts\",\n\t\"./cbs/query_def.ts\": \"./datasource/tc_monitor/cbs/query_def.ts\",\n\t\"./cdb/datasource\": \"./datasource/tc_monitor/cdb/datasource.ts\",\n\t\"./cdb/datasource.ts\": \"./datasource/tc_monitor/cdb/datasource.ts\",\n\t\"./cdb/query.ts\": \"./datasource/tc_monitor/cdb/query.ts\",\n\t\"./cdb/query_def.ts\": \"./datasource/tc_monitor/cdb/query_def.ts\",\n\t\"./cdn/datasource\": \"./datasource/tc_monitor/cdn/datasource.ts\",\n\t\"./cdn/datasource.ts\": \"./datasource/tc_monitor/cdn/datasource.ts\",\n\t\"./cdn/query.ts\": \"./datasource/tc_monitor/cdn/query.ts\",\n\t\"./cdn/query_def.ts\": \"./datasource/tc_monitor/cdn/query_def.ts\",\n\t\"./cdn_province/datasource\": \"./datasource/tc_monitor/cdn_province/datasource.ts\",\n\t\"./cdn_province/datasource.ts\": \"./datasource/tc_monitor/cdn_province/datasource.ts\",\n\t\"./cdn_province/query.ts\": \"./datasource/tc_monitor/cdn_province/query.ts\",\n\t\"./cdn_province/query_def.ts\": \"./datasource/tc_monitor/cdn_province/query_def.ts\",\n\t\"./ceip_summary/datasource\": \"./datasource/tc_monitor/ceip_summary/datasource.ts\",\n\t\"./ceip_summary/datasource.ts\": \"./datasource/tc_monitor/ceip_summary/datasource.ts\",\n\t\"./ceip_summary/query.ts\": \"./datasource/tc_monitor/ceip_summary/query.ts\",\n\t\"./ceip_summary/query_def.ts\": \"./datasource/tc_monitor/ceip_summary/query_def.ts\",\n\t\"./ces/datasource\": \"./datasource/tc_monitor/ces/datasource.ts\",\n\t\"./ces/datasource.ts\": \"./datasource/tc_monitor/ces/datasource.ts\",\n\t\"./ces/query.ts\": \"./datasource/tc_monitor/ces/query.ts\",\n\t\"./ces/query_def.ts\": \"./datasource/tc_monitor/ces/query_def.ts\",\n\t\"./cfs/datasource\": \"./datasource/tc_monitor/cfs/datasource.ts\",\n\t\"./cfs/datasource.ts\": \"./datasource/tc_monitor/cfs/datasource.ts\",\n\t\"./cfs/query.ts\": \"./datasource/tc_monitor/cfs/query.ts\",\n\t\"./cfs/query_def.ts\": \"./datasource/tc_monitor/cfs/query_def.ts\",\n\t\"./ckafka/datasource\": \"./datasource/tc_monitor/ckafka/datasource.ts\",\n\t\"./ckafka/datasource.ts\": \"./datasource/tc_monitor/ckafka/datasource.ts\",\n\t\"./ckafka/query.ts\": \"./datasource/tc_monitor/ckafka/query.ts\",\n\t\"./ckafka/query_def.ts\": \"./datasource/tc_monitor/ckafka/query_def.ts\",\n\t\"./clb/datasource\": \"./datasource/tc_monitor/clb/datasource.ts\",\n\t\"./clb/datasource.ts\": \"./datasource/tc_monitor/clb/datasource.ts\",\n\t\"./clb/query.ts\": \"./datasource/tc_monitor/clb/query.ts\",\n\t\"./clb/query_def.ts\": \"./datasource/tc_monitor/clb/query_def.ts\",\n\t\"./cls/datasource\": \"./datasource/tc_monitor/cls/datasource.ts\",\n\t\"./cls/datasource.ts\": \"./datasource/tc_monitor/cls/datasource.ts\",\n\t\"./cls/query.ts\": \"./datasource/tc_monitor/cls/query.ts\",\n\t\"./cls/query_def.ts\": \"./datasource/tc_monitor/cls/query_def.ts\",\n\t\"./cmq/datasource\": \"./datasource/tc_monitor/cmq/datasource.ts\",\n\t\"./cmq/datasource.ts\": \"./datasource/tc_monitor/cmq/datasource.ts\",\n\t\"./cmq/query.ts\": \"./datasource/tc_monitor/cmq/query.ts\",\n\t\"./cmq/query_def.ts\": \"./datasource/tc_monitor/cmq/query_def.ts\",\n\t\"./cmq_topic/datasource\": \"./datasource/tc_monitor/cmq_topic/datasource.ts\",\n\t\"./cmq_topic/datasource.ts\": \"./datasource/tc_monitor/cmq_topic/datasource.ts\",\n\t\"./cmq_topic/query.ts\": \"./datasource/tc_monitor/cmq_topic/query.ts\",\n\t\"./cmq_topic/query_def.ts\": \"./datasource/tc_monitor/cmq_topic/query_def.ts\",\n\t\"./cos/datasource\": \"./datasource/tc_monitor/cos/datasource.ts\",\n\t\"./cos/datasource.ts\": \"./datasource/tc_monitor/cos/datasource.ts\",\n\t\"./cos/query_def.ts\": \"./datasource/tc_monitor/cos/query_def.ts\",\n\t\"./cpm/datasource\": \"./datasource/tc_monitor/cpm/datasource.ts\",\n\t\"./cpm/datasource.ts\": \"./datasource/tc_monitor/cpm/datasource.ts\",\n\t\"./cpm/query.ts\": \"./datasource/tc_monitor/cpm/query.ts\",\n\t\"./cpm/query_def.ts\": \"./datasource/tc_monitor/cpm/query_def.ts\",\n\t\"./cvm/datasource\": \"./datasource/tc_monitor/cvm/datasource.ts\",\n\t\"./cvm/datasource.ts\": \"./datasource/tc_monitor/cvm/datasource.ts\",\n\t\"./cvm/query.ts\": \"./datasource/tc_monitor/cvm/query.ts\",\n\t\"./cvm/query_def.ts\": \"./datasource/tc_monitor/cvm/query_def.ts\",\n\t\"./cynosdb_mysql/datasource\": \"./datasource/tc_monitor/cynosdb_mysql/datasource.ts\",\n\t\"./cynosdb_mysql/datasource.ts\": \"./datasource/tc_monitor/cynosdb_mysql/datasource.ts\",\n\t\"./cynosdb_mysql/query.ts\": \"./datasource/tc_monitor/cynosdb_mysql/query.ts\",\n\t\"./cynosdb_mysql/query_def.ts\": \"./datasource/tc_monitor/cynosdb_mysql/query_def.ts\",\n\t\"./dc/datasource\": \"./datasource/tc_monitor/dc/datasource.ts\",\n\t\"./dc/datasource.ts\": \"./datasource/tc_monitor/dc/datasource.ts\",\n\t\"./dc/query.ts\": \"./datasource/tc_monitor/dc/query.ts\",\n\t\"./dc/query_def.ts\": \"./datasource/tc_monitor/dc/query_def.ts\",\n\t\"./dcdb/datasource\": \"./datasource/tc_monitor/dcdb/datasource.ts\",\n\t\"./dcdb/datasource.ts\": \"./datasource/tc_monitor/dcdb/datasource.ts\",\n\t\"./dcdb/query.ts\": \"./datasource/tc_monitor/dcdb/query.ts\",\n\t\"./dcdb/query_def.ts\": \"./datasource/tc_monitor/dcdb/query_def.ts\",\n\t\"./dcg/datasource\": \"./datasource/tc_monitor/dcg/datasource.ts\",\n\t\"./dcg/datasource.ts\": \"./datasource/tc_monitor/dcg/datasource.ts\",\n\t\"./dcg/query.ts\": \"./datasource/tc_monitor/dcg/query.ts\",\n\t\"./dcg/query_def.ts\": \"./datasource/tc_monitor/dcg/query_def.ts\",\n\t\"./dcx/datasource\": \"./datasource/tc_monitor/dcx/datasource.ts\",\n\t\"./dcx/datasource.ts\": \"./datasource/tc_monitor/dcx/datasource.ts\",\n\t\"./dcx/query.ts\": \"./datasource/tc_monitor/dcx/query.ts\",\n\t\"./dcx/query_def.ts\": \"./datasource/tc_monitor/dcx/query_def.ts\",\n\t\"./ecdn/datasource\": \"./datasource/tc_monitor/ecdn/datasource.ts\",\n\t\"./ecdn/datasource.ts\": \"./datasource/tc_monitor/ecdn/datasource.ts\",\n\t\"./ecdn/query.ts\": \"./datasource/tc_monitor/ecdn/query.ts\",\n\t\"./ecdn/query_def.ts\": \"./datasource/tc_monitor/ecdn/query_def.ts\",\n\t\"./ecm/datasource\": \"./datasource/tc_monitor/ecm/datasource.ts\",\n\t\"./ecm/datasource.ts\": \"./datasource/tc_monitor/ecm/datasource.ts\",\n\t\"./ecm/query.ts\": \"./datasource/tc_monitor/ecm/query.ts\",\n\t\"./ecm/query_def.ts\": \"./datasource/tc_monitor/ecm/query_def.ts\",\n\t\"./ecm_block_storage/datasource\": \"./datasource/tc_monitor/ecm_block_storage/datasource.ts\",\n\t\"./ecm_block_storage/datasource.ts\": \"./datasource/tc_monitor/ecm_block_storage/datasource.ts\",\n\t\"./ecm_block_storage/query.ts\": \"./datasource/tc_monitor/ecm_block_storage/query.ts\",\n\t\"./ecm_block_storage/query_def.ts\": \"./datasource/tc_monitor/ecm_block_storage/query_def.ts\",\n\t\"./ecm_lb/datasource\": \"./datasource/tc_monitor/ecm_lb/datasource.ts\",\n\t\"./ecm_lb/datasource.ts\": \"./datasource/tc_monitor/ecm_lb/datasource.ts\",\n\t\"./ecm_lb/query.ts\": \"./datasource/tc_monitor/ecm_lb/query.ts\",\n\t\"./ecm_lb/query_def.ts\": \"./datasource/tc_monitor/ecm_lb/query_def.ts\",\n\t\"./gse/datasource\": \"./datasource/tc_monitor/gse/datasource.ts\",\n\t\"./gse/datasource.ts\": \"./datasource/tc_monitor/gse/datasource.ts\",\n\t\"./gse/query.ts\": \"./datasource/tc_monitor/gse/query.ts\",\n\t\"./gse/query_def.ts\": \"./datasource/tc_monitor/gse/query_def.ts\",\n\t\"./lb/datasource\": \"./datasource/tc_monitor/lb/datasource.ts\",\n\t\"./lb/datasource.ts\": \"./datasource/tc_monitor/lb/datasource.ts\",\n\t\"./lb/query.ts\": \"./datasource/tc_monitor/lb/query.ts\",\n\t\"./lb/query_def.ts\": \"./datasource/tc_monitor/lb/query_def.ts\",\n\t\"./lighthouse/datasource\": \"./datasource/tc_monitor/lighthouse/datasource.ts\",\n\t\"./lighthouse/datasource.ts\": \"./datasource/tc_monitor/lighthouse/datasource.ts\",\n\t\"./lighthouse/query.ts\": \"./datasource/tc_monitor/lighthouse/query.ts\",\n\t\"./lighthouse/query_def.ts\": \"./datasource/tc_monitor/lighthouse/query_def.ts\",\n\t\"./mongodb/datasource\": \"./datasource/tc_monitor/mongodb/datasource.ts\",\n\t\"./mongodb/datasource.ts\": \"./datasource/tc_monitor/mongodb/datasource.ts\",\n\t\"./mongodb/query.ts\": \"./datasource/tc_monitor/mongodb/query.ts\",\n\t\"./mongodb/query_def.ts\": \"./datasource/tc_monitor/mongodb/query_def.ts\",\n\t\"./mr/datasource\": \"./datasource/tc_monitor/mr/datasource.ts\",\n\t\"./mr/datasource.ts\": \"./datasource/tc_monitor/mr/datasource.ts\",\n\t\"./mr/query.ts\": \"./datasource/tc_monitor/mr/query.ts\",\n\t\"./mr/query_def.ts\": \"./datasource/tc_monitor/mr/query_def.ts\",\n\t\"./nat_gateway/datasource\": \"./datasource/tc_monitor/nat_gateway/datasource.ts\",\n\t\"./nat_gateway/datasource.ts\": \"./datasource/tc_monitor/nat_gateway/datasource.ts\",\n\t\"./nat_gateway/query.ts\": \"./datasource/tc_monitor/nat_gateway/query.ts\",\n\t\"./nat_gateway/query_def.ts\": \"./datasource/tc_monitor/nat_gateway/query_def.ts\",\n\t\"./ov_cdn/datasource\": \"./datasource/tc_monitor/ov_cdn/datasource.ts\",\n\t\"./ov_cdn/datasource.ts\": \"./datasource/tc_monitor/ov_cdn/datasource.ts\",\n\t\"./ov_cdn/query.ts\": \"./datasource/tc_monitor/ov_cdn/query.ts\",\n\t\"./ov_cdn/query_def.ts\": \"./datasource/tc_monitor/ov_cdn/query_def.ts\",\n\t\"./pcx/datasource\": \"./datasource/tc_monitor/pcx/datasource.ts\",\n\t\"./pcx/datasource.ts\": \"./datasource/tc_monitor/pcx/datasource.ts\",\n\t\"./pcx/query.ts\": \"./datasource/tc_monitor/pcx/query.ts\",\n\t\"./pcx/query_def.ts\": \"./datasource/tc_monitor/pcx/query_def.ts\",\n\t\"./postgresql/datasource\": \"./datasource/tc_monitor/postgresql/datasource.ts\",\n\t\"./postgresql/datasource.ts\": \"./datasource/tc_monitor/postgresql/datasource.ts\",\n\t\"./postgresql/query.ts\": \"./datasource/tc_monitor/postgresql/query.ts\",\n\t\"./postgresql/query_def.ts\": \"./datasource/tc_monitor/postgresql/query_def.ts\",\n\t\"./qaap/datasource\": \"./datasource/tc_monitor/qaap/datasource.ts\",\n\t\"./qaap/datasource.ts\": \"./datasource/tc_monitor/qaap/datasource.ts\",\n\t\"./qaap/query.ts\": \"./datasource/tc_monitor/qaap/query.ts\",\n\t\"./qaap/query_def.ts\": \"./datasource/tc_monitor/qaap/query_def.ts\",\n\t\"./redis/datasource\": \"./datasource/tc_monitor/redis/datasource.ts\",\n\t\"./redis/datasource.ts\": \"./datasource/tc_monitor/redis/datasource.ts\",\n\t\"./redis/query.ts\": \"./datasource/tc_monitor/redis/query.ts\",\n\t\"./redis/query_def.ts\": \"./datasource/tc_monitor/redis/query_def.ts\",\n\t\"./redis_mem/datasource\": \"./datasource/tc_monitor/redis_mem/datasource.ts\",\n\t\"./redis_mem/datasource.ts\": \"./datasource/tc_monitor/redis_mem/datasource.ts\",\n\t\"./redis_mem/query.ts\": \"./datasource/tc_monitor/redis_mem/query.ts\",\n\t\"./redis_mem/query_def.ts\": \"./datasource/tc_monitor/redis_mem/query_def.ts\",\n\t\"./scf/datasource\": \"./datasource/tc_monitor/scf/datasource.ts\",\n\t\"./scf/datasource.ts\": \"./datasource/tc_monitor/scf/datasource.ts\",\n\t\"./scf/query.ts\": \"./datasource/tc_monitor/scf/query.ts\",\n\t\"./scf/query_def.ts\": \"./datasource/tc_monitor/scf/query_def.ts\",\n\t\"./sqlserver/datasource\": \"./datasource/tc_monitor/sqlserver/datasource.ts\",\n\t\"./sqlserver/datasource.ts\": \"./datasource/tc_monitor/sqlserver/datasource.ts\",\n\t\"./sqlserver/query.ts\": \"./datasource/tc_monitor/sqlserver/query.ts\",\n\t\"./sqlserver/query_def.ts\": \"./datasource/tc_monitor/sqlserver/query_def.ts\",\n\t\"./tcaplus/datasource\": \"./datasource/tc_monitor/tcaplus/datasource.ts\",\n\t\"./tcaplus/datasource.ts\": \"./datasource/tc_monitor/tcaplus/datasource.ts\",\n\t\"./tcaplus/query.ts\": \"./datasource/tc_monitor/tcaplus/query.ts\",\n\t\"./tcaplus/query_def.ts\": \"./datasource/tc_monitor/tcaplus/query_def.ts\",\n\t\"./tdmq/datasource\": \"./datasource/tc_monitor/tdmq/datasource.ts\",\n\t\"./tdmq/datasource.ts\": \"./datasource/tc_monitor/tdmq/datasource.ts\",\n\t\"./tdmq/query.ts\": \"./datasource/tc_monitor/tdmq/query.ts\",\n\t\"./tdmq/query_def.ts\": \"./datasource/tc_monitor/tdmq/query_def.ts\",\n\t\"./tdmq_rabbitmq/datasource\": \"./datasource/tc_monitor/tdmq_rabbitmq/datasource.ts\",\n\t\"./tdmq_rabbitmq/datasource.ts\": \"./datasource/tc_monitor/tdmq_rabbitmq/datasource.ts\",\n\t\"./tdmq_rabbitmq/query.ts\": \"./datasource/tc_monitor/tdmq_rabbitmq/query.ts\",\n\t\"./tdmq_rabbitmq/query_def.ts\": \"./datasource/tc_monitor/tdmq_rabbitmq/query_def.ts\",\n\t\"./tdmq_rocketmq/datasource\": \"./datasource/tc_monitor/tdmq_rocketmq/datasource.ts\",\n\t\"./tdmq_rocketmq/datasource.ts\": \"./datasource/tc_monitor/tdmq_rocketmq/datasource.ts\",\n\t\"./tdmq_rocketmq/query.ts\": \"./datasource/tc_monitor/tdmq_rocketmq/query.ts\",\n\t\"./tdmq_rocketmq/query_def.ts\": \"./datasource/tc_monitor/tdmq_rocketmq/query_def.ts\",\n\t\"./tke/datasource\": \"./datasource/tc_monitor/tke/datasource.ts\",\n\t\"./tke/datasource.ts\": \"./datasource/tc_monitor/tke/datasource.ts\",\n\t\"./tke/query.ts\": \"./datasource/tc_monitor/tke/query.ts\",\n\t\"./tke/query_def.ts\": \"./datasource/tc_monitor/tke/query_def.ts\",\n\t\"./tsf/datasource\": \"./datasource/tc_monitor/tsf/datasource.ts\",\n\t\"./tsf/datasource.ts\": \"./datasource/tc_monitor/tsf/datasource.ts\",\n\t\"./tsf/query.ts\": \"./datasource/tc_monitor/tsf/query.ts\",\n\t\"./tsf/query_def.ts\": \"./datasource/tc_monitor/tsf/query_def.ts\",\n\t\"./v_clb/datasource\": \"./datasource/tc_monitor/v_clb/datasource.ts\",\n\t\"./v_clb/datasource.ts\": \"./datasource/tc_monitor/v_clb/datasource.ts\",\n\t\"./v_clb/query.ts\": \"./datasource/tc_monitor/v_clb/query.ts\",\n\t\"./v_clb/query_def.ts\": \"./datasource/tc_monitor/v_clb/query_def.ts\",\n\t\"./vbc/datasource\": \"./datasource/tc_monitor/vbc/datasource.ts\",\n\t\"./vbc/datasource.ts\": \"./datasource/tc_monitor/vbc/datasource.ts\",\n\t\"./vbc/query.ts\": \"./datasource/tc_monitor/vbc/query.ts\",\n\t\"./vbc/query_def.ts\": \"./datasource/tc_monitor/vbc/query_def.ts\",\n\t\"./vpc_net_detect/datasource\": \"./datasource/tc_monitor/vpc_net_detect/datasource.ts\",\n\t\"./vpc_net_detect/datasource.ts\": \"./datasource/tc_monitor/vpc_net_detect/datasource.ts\",\n\t\"./vpc_net_detect/query.ts\": \"./datasource/tc_monitor/vpc_net_detect/query.ts\",\n\t\"./vpc_net_detect/query_def.ts\": \"./datasource/tc_monitor/vpc_net_detect/query_def.ts\",\n\t\"./vpngw/datasource\": \"./datasource/tc_monitor/vpngw/datasource.ts\",\n\t\"./vpngw/datasource.ts\": \"./datasource/tc_monitor/vpngw/datasource.ts\",\n\t\"./vpngw/query.ts\": \"./datasource/tc_monitor/vpngw/query.ts\",\n\t\"./vpngw/query_def.ts\": \"./datasource/tc_monitor/vpngw/query_def.ts\",\n\t\"./vpnx/datasource\": \"./datasource/tc_monitor/vpnx/datasource.ts\",\n\t\"./vpnx/datasource.ts\": \"./datasource/tc_monitor/vpnx/datasource.ts\",\n\t\"./vpnx/query.ts\": \"./datasource/tc_monitor/vpnx/query.ts\",\n\t\"./vpnx/query_def.ts\": \"./datasource/tc_monitor/vpnx/query_def.ts\",\n\t\"./waf/datasource\": \"./datasource/tc_monitor/waf/datasource.ts\",\n\t\"./waf/datasource.ts\": \"./datasource/tc_monitor/waf/datasource.ts\",\n\t\"./waf/query.ts\": \"./datasource/tc_monitor/waf/query.ts\",\n\t\"./waf/query_def.ts\": \"./datasource/tc_monitor/waf/query_def.ts\"\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = \"./datasource/tc_monitor sync recursive ^\\\\.\\\\/[a-zA-Z]\\\\w+\\\\/(datasource)|(query(_def)?)\\\\.ts$\";","import _ from 'lodash';\nimport { Datasources, SERVICES } from './index';\nimport { GetServiceFromNamespace, ParseMetricQuery } from '../common/constants';\nimport { serviceGroupBy } from '../common/utils';\nimport { LoadingState } from '@grafana/data';\n\nexport default interface DatasourceInterface {\n instanceSettings: any;\n backendSrv: any;\n templateSrv: any;\n query: (options: any) => any;\n testDatasource: () => any;\n metricFindQuery: (query: any) => any;\n getRegions?: (service: string) => any;\n getMetrics: (service: string, region: string) => any;\n getInstances: (service: string, region: string, params: any) => any;\n getZones?: (service: string, region: string) => any;\n}\n\nexport class TCMonitorDatasource implements DatasourceInterface {\n instanceSettings: any;\n backendSrv: any;\n templateSrv: any;\n\n /** @ngInject */\n constructor(instanceSettings, backendSrv, templateSrv) {\n this.instanceSettings = instanceSettings;\n this.backendSrv = backendSrv;\n this.templateSrv = templateSrv;\n _.forEach(Datasources, (_class: any, key) => {\n this[key] = new _class(this.instanceSettings, this.backendSrv, this.templateSrv);\n });\n }\n\n // 根据 Datasource Config 配置时勾选的监控服务项,获取相应的命名空间\n getNamespaces() {\n const namespaces: any[] = [];\n _.forEach(SERVICES, (service) => {\n if (this.instanceSettings.jsonData[service.service] === true) {\n // namespaces.push(service.namespace);\n namespaces.push(service);\n }\n });\n return namespaces;\n }\n\n getCascaderNamespaces() {\n const validServices = SERVICES.filter((service) => this.instanceSettings.jsonData[service.service]);\n return serviceGroupBy(validServices);\n }\n\n getSelectedServices() {\n const namespaces = this.getNamespaces();\n return _.map(namespaces, ({ namespace }) => {\n return GetServiceFromNamespace(namespace);\n });\n }\n\n /**\n * 根据 Panel 的配置项,获取相应的监控数据\n *\n * @param options Panel 的配置参数,示例如下\n * {\n * cacheTimeout: undefined,\n * dashboardId: 41,\n * interval: \"30s\",\n * intervalMs: 30000,\n * maxDataPoints: 554,\n * panelId: 2,\n * range: {\n * from: Moment,\n * to: Moment,\n * raw: {from: \"now-6h\", to: \"now\"}\n * },\n * rangeRaw: {from: \"now-6h\", to: \"now\"},\n * scopedVars: {__interval: {…}, __interval_ms: {…}}\n * targets: [\n * {\n * namespace: \"QCE/CVM\",\n * refId: \"A\",\n * service: \"cvm\",\n * showInstanceDetails: false,\n * cvm: {\n * dimensionObject: {InstanceId: {…}}\n * instance: \"\",\n * instanceAlias: \"InstanceId\",\n * metricName: \"AccOuttraffic\",\n * metricUnit: \"MB\",\n * period: 10,\n * queries: {Filters: {…}, InstanceIds: Array(1), Limit: 20, Offset: 0, filtersChecked: false, …},\n * region: \"ap-beijing\"\n * },\n * cdb: {},\n * },\n * ],\n * timezone: \"browser\"\n * }\n * @return 返回数据对象,示例如下\n * {\n * data: [\n * {\n * \"target\": \"AccOuttraffic - ins-123\",\n * \"datapoints\": [\n * [861, 1450754160000],\n * [767, 1450754220000]\n * ]\n * }\n * ]\n * }\n */\n query(options: any) {\n const promises: any[] = [];\n const services = this.getSelectedServices();\n _.forEach(services, (service) => {\n const optionsTemp = _.cloneDeep(options);\n const targets = _.filter(optionsTemp.targets, (item) => item.service === service);\n optionsTemp.targets = targets;\n if (optionsTemp.targets.length > 0) {\n const promiseTemp = this[`${_.toUpper(service)}Datasource`].query(optionsTemp);\n if (promiseTemp) {\n promises.push(promiseTemp);\n }\n }\n });\n if (promises.length === 0) {\n return Promise.resolve({ data: [], state: LoadingState.Done });\n }\n return Promise.all(promises).then((results) => {\n return { data: _.flatten(results), state: LoadingState.Done };\n });\n }\n\n /**\n * 获取模板变量的选择项列表\n *\n * @param query 模板变量配置填写的 Query 参数字符串\n */\n metricFindQuery(query: string, options?: any) {\n const queries = ParseMetricQuery(query);\n const service = GetServiceFromNamespace(queries['namespace'] || '');\n\n if (_.isEmpty(queries) || !queries['namespace'] || !queries['action'] || !service) {\n return Promise.resolve([]);\n }\n if (this[`${_.toUpper(service)}Datasource`].metricFindQuery) {\n const result = this[`${_.toUpper(service)}Datasource`].metricFindQuery(\n queries,\n _.get(options, 'variable.regex', undefined)\n );\n if (result) {\n return result;\n }\n }\n return Promise.resolve([]);\n }\n\n /**\n * 获取地域列表\n * @param service\n */\n getRegions(service) {\n if (this[`${_.toUpper(service)}Datasource`].getRegions) {\n return this[`${_.toUpper(service)}Datasource`].getRegions();\n }\n return [];\n }\n\n /**\n * 获取监控指标列表\n * @param service\n * @param region\n */\n getMetrics(service, region) {\n return this[`${_.toUpper(service)}Datasource`].getMetrics(region);\n }\n\n /**\n * 获取可用区列表\n * @param service\n * @param region\n */\n getZones(service, region) {\n if (this[`${_.toUpper(service)}Datasource`].getZones) {\n return this[`${_.toUpper(service)}Datasource`].getZones(region);\n }\n return [];\n }\n\n /**\n * 获取filter中dropdown列表\n * @param service\n * @param param\n */\n getFilterDropdown(service, param) {\n if (this[`${_.toUpper(service)}Datasource`].getFilterDropdown) {\n return this[`${_.toUpper(service)}Datasource`].getFilterDropdown(param);\n }\n return [];\n }\n\n /**\n * 获取实例列表\n * @param service\n * @param region\n * @param params\n */\n getInstances(service, region, params) {\n return this[`${_.toUpper(service)}Datasource`].getInstances(region, params);\n }\n\n /**\n * 获取监听器列表\n * @param service\n * @param region\n * @param params\n */\n getListeners(service, region, instance) {\n if (!this[`${_.toUpper(service)}Datasource`].getListeners) {\n return [];\n }\n return this[`${_.toUpper(service)}Datasource`].getListeners(region, instance);\n }\n\n /**\n * 获取 私有网络列表\n * @param service\n */\n getVpcIds(service, region) {\n if (this[`${_.toUpper(service)}Datasource`].getVpcIds) {\n return this[`${_.toUpper(service)}Datasource`].getVpcIds(region);\n }\n }\n\n // 在 Datasource Config 配置时,验证 SerectId、SerectKey 的有效性,并测试勾选的监控服务项的对应 API 连通性\n testDatasource() {\n const promises: any[] = [];\n const services = this.getSelectedServices();\n _.forEach(services, (service) => {\n promises.push(this[`${_.toUpper(service)}Datasource`].testDatasource());\n });\n if (promises.length === 0) {\n return Promise.resolve(null);\n }\n\n return Promise.all(promises).then((results) => {\n let status = 'success';\n let message = 'DataSource Connection OK';\n\n const errorMsg = _.reduce(\n results,\n (acc, cur) => {\n if (cur.status === 'error') {\n if (acc === '') acc += 'Oops! Found an error in: ';\n acc += `${cur.service}: ${cur.message}; \\n`;\n }\n return acc;\n },\n ''\n );\n\n if (errorMsg) {\n status = 'error';\n message = errorMsg;\n }\n\n return {\n status,\n message,\n title: _.upperFirst(status),\n };\n });\n }\n\n getServiceFn(service, fnName) {\n return (...argu) => {\n if (!this[`${_.toUpper(service)}Datasource`][fnName]) {\n return [];\n }\n return this[`${_.toUpper(service)}Datasource`][fnName](...argu);\n };\n }\n}\n","import _ from 'lodash';\nimport moment from 'moment';\nimport DatasourceInterface from '../MonitorDatasource';\nimport {\n GetRequestParams,\n GetServiceAPIInfo,\n ReplaceVariable,\n GetDimensions,\n ParseQueryResult,\n SliceLength,\n} from '../../common/constants';\nimport instanceStorage from '../../common/datasourceStorage';\nimport { MetricQuery } from './types';\nimport { getNamesapceFromService, getTimeShiftInMs } from '../../common/utils';\nimport { Language, setLanguage } from '../../../locale';\n\nexport interface TemplateQueryIdType {\n instance: string;\n listener?: string;\n}\n\ninterface queryConfigType {\n dim_KeyInStorage: string;\n dim_KeyInTarget?: string;\n dim_KeyInIns?: string;\n dim_KeyInMap: string;\n}\n\nexport abstract class BaseDatasource implements DatasourceInterface {\n Namespace?: string;\n service: string;\n instanceListCache: any[] = [];\n extraMetricDims: string[] = [];\n url: string;\n instanceSettings: any;\n backendSrv: any;\n templateSrv: any;\n secretId: string;\n checkKeys: string[] = [];\n MetricReqConfig: {\n resultFilter?: Function;\n } = {};\n extrasAlias?: string[] = [];\n /*\n 一个配置:(用于处理除了InstanceId之外的)(Record中的key是指标修正之后的维度,即通过InvalidDemsion处理后)\n 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、\n 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。为空则取即通过InvalidDemsion处理后的key\n 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。即:templateQueryIdMap中内容。联合上面2的内容筛选出原始sourceMap\n 4 通过这个dim和sourceMap获取维度值。即sourceMap[dim]\n */\n queryMonitorExtraConfg: Record = {};\n CandiateDimensions?: Record = {};\n\n InstanceReqConfig?: {\n service?: string;\n action: string;\n responseField: string;\n interceptor?: {\n request?: (params: unknown) => unknown;\n response?: (data: unknown) => unknown;\n };\n };\n InvalidDimensions?: Record;\n\n abstract InstanceAliasList: string[];\n abstract templateQueryIdMap: TemplateQueryIdType; // 必须为标识\n\n /** @ngInject */\n constructor(instanceSettings, backendSrv, templateSrv) {\n this.instanceSettings = instanceSettings;\n this.backendSrv = backendSrv;\n this.templateSrv = templateSrv;\n this.url = instanceSettings.url;\n this.secretId = (instanceSettings.jsonData || {}).secretId || '';\n setLanguage(instanceSettings.jsonData.language || Language.Chinese);\n }\n\n get namespace() {\n // 需要注意的是this.service来自于原型上,在实例中导入时注入\n return this.Namespace || getNamesapceFromService(this.service);\n }\n\n // 获取额外要显示到图例里的内容\n getOtherAlias(instance: any, target: any): string {\n let result = '';\n const alias = instance._InstanceAliasValue;\n this.extrasAlias?.forEach((extra) => {\n const extraAlia = this.getVariable(target[extra]);\n if (extraAlia && alias.indexOf(extraAlia) === -1) {\n result += ` - ${extraAlia}`;\n }\n });\n return result;\n }\n\n /* 格式化模板变量上的显示 */\n getAliasValue(instance: Record, alias: string) {\n const result = instance[alias];\n return Array.isArray(result) ? result.join() : result;\n }\n\n formatVarDisplay(instance: Record, displayTpl: string | undefined, instanceAlias: string) {\n // 获取display=aaa${InstanceName}bbb${InstanceId}ccc\n if (displayTpl) {\n return displayTpl.replace(/\\$\\{(\\w+)\\}/g, (a, b) => {\n if (!b || !this.InstanceAliasList.includes(b)) {\n return '';\n }\n return this.getAliasValue(instance, b);\n });\n }\n return this.getAliasValue(instance, instanceAlias);\n }\n /**\n * @param query 模板变量配置填写的 Query 参数对象,由顶层将字符串转换为了对象\n */\n async metricFindQuery(query: MetricQuery, regex?: string) {\n const { action, namespace, display, payload = {} } = query;\n let { region, instancealias = this.templateQueryIdMap.instance } = query;\n if (!action || !namespace) {\n return [];\n }\n // 支持payload里传入模板变量\n if (_.isObject(payload)) {\n _.forEach(payload, (value, key) => {\n payload[key] = _.isString(value) ? this.getVariable(value) : value;\n });\n }\n\n // 查询地域列表\n const regionQuery = action.match(/^DescribeRegions$/i);\n if (regionQuery) {\n return this.getRegions();\n }\n\n region = this.getVariable(region); // 将模板region转换为真实值\n\n // 查询实例列表\n if (region && action.match(/^DescribeInstances/i)) {\n const result = await this.getVariableInstances(region, payload);\n instancealias = this.InstanceAliasList.includes(instancealias) ? instancealias : this.templateQueryIdMap.instance;\n\n const res = result.flatMap((item) => {\n const insAlias = this.formatVarDisplay(item, display, instancealias);\n\n item._InstanceAliasValue = insAlias; // FIXME:\n\n if (!item[instancealias]) return [];\n return [\n {\n text: insAlias,\n value: item[this.templateQueryIdMap.instance],\n },\n ];\n });\n\n // 缓存全量实例列表\n await instanceStorage.setInstance(this.service, result);\n return res;\n }\n\n // 在instance实例的基础上查询其他数据\n let instance = this.getVariable(query['instance']);\n if (_.isArray(instance)) instance = instance[0]; // 有额外维度,仅支持实例单选情况\n if (region && action && instance) {\n try {\n // instance = JSON.parse(instance);\n const instanceCache = await instanceStorage.getInstance(this.service);\n\n instance = _.cloneDeep(instanceCache.find((item) => item[this.templateQueryIdMap.instance] === instance)) ?? {};\n // eslint-disable-next-line no-empty\n } catch (error) {}\n return this.fetchMetricData(action, region, instance, query);\n }\n\n return Promise.resolve([]);\n }\n // 获取指标数据\n async fetchMetricData(action: string, region: string, instance: any, query?: any) {\n return [];\n }\n\n /**\n * 根据 Panel 的配置项,获取相应的监控数据\n *\n * @param options Panel 的配置参数\n * @return 返回数据数组,示例如下\n * [\n * {\n * \"target\": \"AccOuttraffic - ins-123\",\n * \"datapoints\": [\n * [861, 1450754160000],\n * [767, 1450754220000]\n * ]\n * }\n * ]\n */\n async dimensionsFormat(dimKeys, ins, dimensionObject, target, service, options) {\n for (let key of dimKeys) {\n let keyTmp = key;\n const invalidDim = this.InvalidDimensions || this.getInvalidDimensions(this, target[service]);\n if (invalidDim[key]) {\n // 从【维度中】的字段到【实例中】字段的映射。 { functionName: FunctionName }\n keyTmp = invalidDim[key];\n ins[key] = ins[keyTmp];\n }\n\n let extraDimValue = this.getVariable(target[service][keyTmp]);\n if (this.queryMonitorExtraConfg[keyTmp]) {\n const {\n dim_KeyInStorage,\n dim_KeyInTarget = keyTmp,\n dim_KeyInMap,\n dim_KeyInIns,\n } = this.queryMonitorExtraConfg[keyTmp];\n let extraIns = ReplaceVariable(this.templateSrv, options.scopedVars, target[service][dim_KeyInTarget], true);\n let extraSourceMap: any = {};\n try {\n extraSourceMap = JSON.parse(extraIns); // 兼容json字符串的 形式\n } catch (error) {\n if (_.isArray(extraIns)) extraIns = extraIns[0]; // 如果多个,取第一个。除了实例ID 暂不支持其他纬度多选\n const extraStorage = await instanceStorage.getExtraStorage(this.service, dim_KeyInStorage);\n\n extraSourceMap =\n extraStorage?.find((item) => {\n if (_.isArray(item[dim_KeyInMap])) {\n return item[dim_KeyInMap][0] === extraIns;\n }\n return item[dim_KeyInMap] === extraIns;\n }) ?? {};\n }\n const isStringOrNumber = _.isString(extraSourceMap) || _.isNumber(extraSourceMap);\n // 增加ins实例之外的alias,填入到ins._InstanceAliasValue\n const insAlias = ins._InstanceAliasValue;\n const otherAlias = isStringOrNumber ? extraSourceMap : extraSourceMap._InstanceAliasValue;\n if (otherAlias && insAlias.indexOf(otherAlias) === -1) {\n ins._InstanceAliasValue += ` - ${otherAlias}`;\n }\n\n extraDimValue = isStringOrNumber ? extraSourceMap : extraSourceMap?.[dim_KeyInIns || keyTmp];\n } else {\n ins._InstanceAliasValue += this.getOtherAlias(ins, target[service]);\n }\n\n if (\n getTimeShiftInMs(target[service].timeshift) > 0 &&\n ins._InstanceAliasValue.indexOf(target[service].timeshift) === -1\n ) {\n ins._InstanceAliasValue += `_${target[service].timeshift}`;\n }\n // 设置instance,针对额外的维度,需要注意模板变量的值\n // ins[key] = ins[keyTmp] ?? extraDimValue;\n ins[key] = this.getDimensionsVal(ins, keyTmp, extraDimValue);\n // cynosdb产品接口返回维度和入参不一致\n if (this.checkKeys.length > 0) {\n this.checkKeys.forEach((Ekey) => {\n ins[Ekey] = ins[key];\n });\n }\n dimensionObject[key] = { Name: key, Value: ins[key] };\n }\n return dimensionObject;\n }\n getDimensionsVal(ins: Record, key: string, extraDimValue: string) {\n let dimVal = ins[key];\n if (_.isEmpty(dimVal) && this.CandiateDimensions[key]) {\n dimVal = ins[this.CandiateDimensions[key]];\n }\n return dimVal ?? extraDimValue;\n }\n query(options: any) {\n const service = this.service!; // 强制声明非空\n\n const queries = _.filter(options.targets, (item) => {\n // 过滤无效的查询 target\n return (\n item.hide !== true &&\n !!item.namespace &&\n !!item[service].metricName &&\n !_.isEmpty(ReplaceVariable(this.templateSrv, options.scopedVars, item[service].region, false)) &&\n !_.isEmpty(ReplaceVariable(this.templateSrv, options.scopedVars, item[service].instance, true))\n );\n })\n .reduce((prev, target) => {\n if (getTimeShiftInMs(target[service].timeshift) > 0) {\n const cloneTarget = _.cloneDeep(target);\n cloneTarget[service].timeshift = '';\n return [...prev, cloneTarget, target];\n }\n return [...prev, target];\n }, [])\n .map(async (target) => {\n // 实例 instances 可能为模板变量,需先获取实际值\n // 针对JSON字符串和id的形式,分开做处理\n let instances = ReplaceVariable(this.templateSrv, options.scopedVars, target[service].instance, true);\n const instanceCache = await instanceStorage.getInstance(this.service);\n const timeshift = getTimeShiftInMs(target[service].timeshift);\n\n instances = [].concat(instances).map((inst) => {\n try {\n return JSON.parse(inst); // 兼容json字符串的 形式\n } catch (error) {\n // 如果没拿到缓存,取默认实例组\n if (!instanceCache) return this.getDefaultInsObj?.(inst);\n return _.cloneDeep(instanceCache.find((item) => item[this.templateQueryIdMap.instance] === inst)) ?? {};\n }\n });\n const region = ReplaceVariable(this.templateSrv, options.scopedVars, target[service].region, false);\n const insInReq: any = [];\n for (let ins of instances) {\n const dimensionObject = target[service].dimensionObject;\n // 处理dimensions的值\n const dimKeys = Object.keys(dimensionObject);\n const dimResult = await this.dimensionsFormat(dimKeys, ins, dimensionObject, target, service, options);\n\n insInReq.push([{ Dimensions: GetDimensions(dimResult) }]);\n }\n const data = {\n StartTime: moment(options.range.from).subtract(timeshift).format(),\n EndTime: moment(options.range.to).subtract(timeshift).format(),\n Period: target[service].period || 300,\n Instances: _.flatMap(insInReq),\n Namespace: target.namespace,\n MetricName: target[service].metricName,\n };\n return this.getMonitorData(data, region, instances, target[service], options);\n });\n\n if (queries.length === 0) {\n return [];\n }\n\n return Promise.all(queries)\n .then((responses) => {\n return _.flatten(responses);\n })\n .catch((error) => {\n return [];\n });\n }\n getDefaultInsObj(ins: string) {\n return {} as any;\n }\n getInstanceReqConfig(selfIns: any) {\n return {} as any;\n }\n getInvalidDimensions(selfIns: any, target?: any) {\n return {} as any;\n }\n // 获取某个变量的实际值,this.templateSrv.replace() 函数返回实际值的字符串\n getVariable(metric?: string) {\n const rs = this.templateSrv.replace((metric || '').trim());\n const valStr = rs.match(/\\{([\\w-,]+)\\}/);\n // 判断是否为多选\n if (valStr) {\n return valStr[1].split(',');\n }\n return rs;\n }\n\n /**\n * 获取 监控数据\n * @param params 获取监控数据的请求参数\n * @param region 地域信息\n * @param instances 实例列表,用于对返回结果的匹配解析\n */\n getMonitorData(params, region, instances, target, options) {\n const serviceInfo = GetServiceAPIInfo(region, 'monitor');\n const timeshift = getTimeShiftInMs(target.timeshift);\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data: params,\n },\n serviceInfo.service,\n { action: 'GetMonitorData', region }\n ).then((response) => {\n return ParseQueryResult(response, instances, timeshift);\n });\n }\n\n getRegions(): any {\n return this.doRequest(\n {\n url: this.url + '/cvm',\n },\n 'cvm',\n { action: 'DescribeRegions' }\n ).then((response) => {\n return _.filter(\n _.map(response.RegionSet || [], (item) => {\n return {\n text: item.RegionName,\n value: item.Region,\n RegionState: item.RegionState,\n };\n }),\n (item) => item.RegionState === 'AVAILABLE'\n );\n });\n }\n\n getMetrics(region = 'ap-guangzhou'): Promise {\n const serviceInfo = GetServiceAPIInfo(region, 'monitor');\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data: {\n Namespace: this.namespace,\n },\n },\n serviceInfo.service,\n { region, action: 'DescribeBaseMetrics' }\n ).then((response) => {\n const res = _.filter(\n _.filter(response.MetricSet || [], (item) => !(item.Namespace !== this.namespace || !item.MetricName))\n );\n const resFilterFn = this.MetricReqConfig.resultFilter;\n if (resFilterFn) {\n return res.map((item) => resFilterFn(item));\n }\n return res;\n });\n }\n\n getInstances(region, params = {}) {\n const {\n service = this.service,\n action,\n responseField: field,\n interceptor,\n } = this.InstanceReqConfig || this.getInstanceReqConfig(this);\n params = { Offset: 0, Limit: 100, ...params };\n const serviceInfo = GetServiceAPIInfo(region, service);\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data: interceptor?.request ? interceptor.request(params) : params,\n },\n serviceInfo.service,\n { region, action }\n ).then((response) => {\n // 处理异常,则不按正常的情况处理,直接抛出错误\n if (response?.Error) {\n console.error(response.Error);\n return response;\n }\n\n let result;\n // 先,field处理\n if (field) {\n result = _.get(response, field) ?? _.get(response, `Result.${field}`) ?? [];\n }\n\n // 后,拦截器处理\n if (interceptor?.response) {\n result = interceptor.response(result);\n }\n return result;\n });\n }\n\n getVariableInstances(region, query = {}): Promise {\n let result: any[] = [];\n const params = { ...{ Offset: 0, Limit: 100 }, ...query };\n\n const {\n service = this.service,\n action,\n responseField: field,\n interceptor,\n } = this.InstanceReqConfig || this.getInstanceReqConfig(this);\n\n const serviceInfo = GetServiceAPIInfo(region, service);\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data: interceptor?.request ? interceptor.request(params) : params,\n },\n serviceInfo.service,\n { region, action }\n ).then((response) => {\n result = _.get(response, field) ?? _.get(response, `Result.${field}`) ?? [];\n const total =\n response.TotalCount ?? response.TotalCnt ?? response.TotalNumber ?? _.get(response, `Result.TotalCount`) ?? 0;\n if (result.length >= total) {\n return interceptor?.response ? interceptor.response(result) : result;\n } else {\n const param = SliceLength(total, params?.Limit || 100);\n const promises: any[] = [];\n _.forEach(param, (item) => {\n promises.push(this.getInstances(region, { ...item, ...query }));\n });\n return Promise.all(promises)\n .then((responses) => {\n _.forEach(responses, (item) => {\n result = _.concat(result, item);\n });\n return interceptor?.response ? interceptor.response(result) : result;\n })\n .catch((error) => {\n return interceptor?.response ? interceptor.response(result) : result;\n });\n }\n });\n }\n\n // 检查某变量字段是否有值\n isValidConfigField(field: string) {\n return field && field.length > 0;\n }\n\n testDatasource() {\n // const { service = this.service, action } = this.InstanceReqConfig;\n // const serviceInfo = GetServiceAPIInfo('ap-guangzhou', service);\n\n if (!this.isValidConfigField(this.secretId)) {\n return {\n service: this.service,\n status: 'error',\n message: 'The SecretId/SecretKey field is required.',\n };\n }\n\n return Promise.all([\n this.getRegions(),\n this.getMetrics(),\n // this.doRequest(\n // {\n // url: this.url + serviceInfo.path,\n // data: {\n // Offset: 0,\n // Limit: 1,\n // },\n // },\n // service,\n // { region: 'ap-guangzhou', action },\n // ),\n this.getInstances('ap-guangzhou', {\n Offset: 0,\n Limit: 1,\n }),\n ])\n .then((responses) => {\n const cvmErr = _.get(responses, '[0].Error', {});\n const monitorErr = _.get(responses, '[1].Error', {});\n const serviceErr = _.get(responses, '[2].Error', {});\n // const cvmAuthFail = _.get(cvmErr, 'Code', '').indexOf('AuthFailure') !== -1;\n // const monitorAuthFail = _.get(monitorErr, 'Code', '').indexOf('AuthFailure') !== -1;\n // const serviceAuthFail = _.get(serviceErr, 'Code', '').indexOf('AuthFailure') !== -1;\n const cvmAuthFail = _.get(cvmErr, 'Code', '');\n const monitorAuthFail = _.get(monitorErr, 'Code', '');\n const serviceAuthFail = _.get(serviceErr, 'Code', '');\n if (cvmAuthFail || monitorAuthFail || serviceAuthFail) {\n const messages: any[] = [];\n if (cvmAuthFail) {\n messages.push(_.get(cvmErr, 'Code'));\n }\n if (monitorAuthFail) {\n messages.push(_.get(monitorErr, 'Code'));\n }\n if (serviceAuthFail) {\n messages.push(_.get(serviceErr, 'Code'));\n }\n const message = _.join(_.compact(_.uniq(messages)), '; ');\n return {\n service: this.service,\n status: 'error',\n message,\n };\n } else {\n return {\n namespace: this.namespace,\n service: this.service,\n status: 'success',\n message: `Successfully queried the ${this.service} service.`,\n title: 'Success',\n };\n }\n })\n .catch((error) => {\n let message = `${this.service} service:`;\n message += error.statusText ? error.statusText + '; ' : '';\n if (_.get(error, 'data.error.code', '')) {\n message += error.data.error.code + '. ' + error.data.error.message;\n } else if (_.get(error, 'data.error', '')) {\n message += error.data.error;\n } else if (_.get(error, 'data', '')) {\n message += error.data;\n } else {\n message += `Cannot connect to ${this.service} service.`;\n }\n return {\n service: this.service,\n status: 'error',\n message: message,\n };\n });\n }\n\n async doRequest(options, service, signObj: any = {}) {\n options = await GetRequestParams(\n options,\n service,\n signObj,\n this.secretId,\n this.instanceSettings.id,\n this.backendSrv\n );\n return this.backendSrv\n .datasourceRequest(options)\n .then((response) => {\n return _.get(response, 'data.Response', {});\n })\n .catch((error) => {\n throw error;\n });\n }\n}\n","import coreModule from 'grafana/app/core/core_module';\nimport { DetailQueryConfig } from './types';\nimport { GetServiceFromNamespace } from '../../common/constants';\n\nfunction classFactory(detailConfig) {\n return class QueryCtrl {\n static _config: DetailQueryConfig;\n\n /** @ngInject */\n constructor($scope, $rootScope) {\n Object.assign($scope, detailConfig);\n\n $scope.getDropdown = (field) => {\n const service = GetServiceFromNamespace($scope.namespace);\n return $scope.datasource.getFilterDropdown(service, { field, region: $scope.region });\n };\n }\n };\n}\n\nconst template = `\n
\n
\n \n
\n
\n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n
\n`;\nfunction queryDDOFactory(QueryCtrl) {\n return function queryDDO() {\n return {\n template: template,\n controller: QueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n },\n };\n };\n}\n\nexport default (name: string, config: DetailQueryConfig) => {\n // QueryCtrl._config = config;\n const newQueryIns = classFactory(config);\n coreModule.directive(name, queryDDOFactory(newQueryIns));\n};\n","import coreModule from 'grafana/app/core/core_module';\nimport { DetailQueryConfig } from './types';\n\nclass SPQueryCtrl {\n static _config: DetailQueryConfig;\n\n /** @ngInject */\n constructor($scope, $rootScope) {\n Object.assign($scope, SPQueryCtrl._config);\n\n $scope.onChecked = (srcField, dstField) => {\n if ($scope.target.queries[srcField] === true) {\n $scope.target.queries[dstField] = false;\n }\n $scope.onChange();\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n \n \n \n
\n
\n
\n`;\n\nexport function queryDDO() {\n return {\n template: template,\n controller: SPQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n },\n };\n}\n\nexport default (name: string, config: DetailQueryConfig) => {\n SPQueryCtrl._config = config;\n coreModule.directive(name, queryDDO);\n};\n","import {\n APIGATEWAYInstanceAliasList,\n APIGATEWAYInvalidDemensions,\n namespace,\n templateQueryIdMap,\n regionSupported,\n keyInStorage,\n queryMonitorExtraConfg,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\nimport { GetServiceAPIInfo } from '../../common/constants';\nimport { fetchAllFactory } from '../../common/utils';\nimport instanceStorage from '../../common/datasourceStorage';\nimport { t } from '../../../locale';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = APIGATEWAYInstanceAliasList;\n InvalidDimensions = APIGATEWAYInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'apigateway',\n action: 'DescribeServicesStatus',\n responseField: 'ServiceSet',\n };\n\n keyInStorage = keyInStorage;\n queryMonitorExtraConfg = queryMonitorExtraConfg;\n\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n // getFilterDropdown({ field }) {\n // return super.getRegions();\n // }\n getRegions() {\n return Promise.resolve(regionSupported.map(({ value }) => ({ value, text: t(value) })));\n }\n async getEnvironmentNameList(params: any) {\n const { region, instanceId } = params;\n const serviceInfo = GetServiceAPIInfo(region, this.service);\n\n // 从分页数据,获取全量数据\n const res = await fetchAllFactory(\n (data) => {\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data,\n },\n serviceInfo.service,\n { region, action: 'DescribeServiceEnvironmentList' }\n );\n },\n {\n ServiceId: instanceId,\n },\n 'EnvironmentList'\n );\n const [rs] = res;\n return rs;\n }\n async fetchMetricData(action: string, region: string, instance: any) {\n // console.log({ action, region, instance });\n if (action === 'DescribeServiceEnvironmentList') {\n const rs = await this.getEnvironmentNameList({ region, instanceId: instance[this.templateQueryIdMap.instance] });\n const result = rs.map((o) => {\n o._InstanceAliasValue = o[this.templateQueryIdMap.environmentName];\n return {\n text: o[this.templateQueryIdMap.environmentName],\n value: o[this.templateQueryIdMap.environmentName],\n };\n });\n await instanceStorage.setExtraStorage(this.service, this.keyInStorage.environmentList, rs);\n return result;\n }\n return [];\n }\n}\n","import coreModule from 'grafana/app/core/core_module';\nimport { APIGATEWAYFilterFieldsDescriptor, templateQueryIdMap, queryEditorName, namespace } from './query_def';\nimport { GetServiceFromNamespace } from '../../common/constants';\n\nexport class QueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.APIGATEWAYFilterFieldsDescriptor = APIGATEWAYFilterFieldsDescriptor;\n $scope.namespace = namespace;\n };\n $scope.getInstanceId = () => {\n let { instance } = $scope.target;\n const service = GetServiceFromNamespace($scope.namespace);\n // console.log({namespace, service});\n instance = $scope.datasource.getServiceFn(service, 'getVariable')(instance);\n if (!instance) {\n return '';\n }\n try {\n instance = JSON.parse(instance)[templateQueryIdMap.instance];\n } catch (error) {\n // console.log();\n }\n return instance;\n };\n $scope.getExtraDropdown = async (target) => {\n const service = GetServiceFromNamespace($scope.namespace);\n const instanceId = $scope.getInstanceId();\n const region = $scope.datasource.getServiceFn(service, 'getVariable')(target.region);\n const rs = await $scope.datasource.getServiceFn(service, 'getEnvironmentNameList')({ region, instanceId });\n\n const result = rs.map((o) => {\n return {\n text: o.EnvironmentName,\n value: JSON.stringify(o),\n };\n });\n return result;\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n`;\n\nexport function sQuery() {\n return {\n template: template,\n controller: QueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n onRefresh: '&',\n dims: '=',\n },\n };\n}\ncoreModule.directive(queryEditorName, sQuery);\n","// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service)\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/APIGATEWAY';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'apigatewayQuery';\n\nconst APIGATEWAYInvalidDemensions = {\n serviceId: 'ServiceId',\n environmentName: 'EnvironmentName',\n apiid: 'Apiid',\n apiId: 'Apiid',\n};\n\n// 需和文件名对应\nconst APIGATEWAYInstanceAliasList = ['ServiceId', 'ServiceName'];\n\nconst templateQueryIdMap = {\n instance: 'ServiceId',\n environmentName: 'EnvironmentName',\n};\n\n// 需要缓存到storage的内容的key列表\nconst keyInStorage = {\n environmentList: 'EnvironmentList',\n};\n/*\n如果有InstanceId额外的维度,原则上都需要传入此map结构配置\nkey的含义:\n 经过InvalidDemensions处理后的string。topicId =》TopicId。\n 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId\nvalue的含义:\n 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、\n 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。\n 默认取通过InvalidDemsion处理后的key\n 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。\n 即:templateQueryIdMap中内容。\n 联合上面2的内容筛选出原始sourceMap\n*/\nconst queryMonitorExtraConfg = {\n EnvironmentName: {\n dim_KeyInStorage: keyInStorage.environmentList,\n dim_KeyInTarget: 'EnvironmentName',\n dim_KeyInMap: templateQueryIdMap.environmentName,\n },\n};\n// select类型需要注意是{},multi后缀是[],dropdown是''\nconst APIGATEWAYFilterFields = {\n Limit: 20,\n Offset: 0,\n ServiceId: [],\n ServiceName: [],\n NotUsagePlanId: [],\n Environment: [],\n IpVersion: [],\n};\n\nconst APIGATEWAYFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'ServiceId',\n enDescriptor: 'ServiceId',\n cnDescriptor: '服务id',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'ServiceName',\n enDescriptor: 'ServiceName',\n cnDescriptor: '服务名称',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'NotUsagePlanId',\n enDescriptor: 'NotUsagePlanId',\n cnDescriptor: 'NotUsagePlanId',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'Environment',\n enDescriptor: 'Environment',\n cnDescriptor: '环境名称',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'IpVersion',\n enDescriptor: 'IpVersion',\n cnDescriptor: 'IP版本',\n link: '',\n type: 'inputMulti',\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/628/45198',\n namespace,\n fieldDescriptor: APIGATEWAYFilterFieldsDescriptor,\n};\n\nconst APIGATEWAY_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'ServiceId',\n EnvironmentName: '',\n queries: APIGATEWAYFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, true);\n}\n// regions for dropdown\nconst regionSupported = [\n { value: 'ap-beijing' },\n { value: 'ap-chengdu' },\n { value: 'ap-chongqing' },\n { value: 'ap-guangzhou' },\n { value: 'ap-hongkong' },\n { value: 'ap-mumbai' },\n { value: 'ap-nanjing' },\n { value: 'ap-shanghai' },\n { value: 'ap-shanghai-fsi' },\n { value: 'ap-shenzhen-fsi' },\n { value: 'ap-singapore' },\n { value: 'ap-tokyo' },\n { value: 'eu-frankfurt' },\n { value: 'na-ashburn' },\n { value: 'na-siliconvalley' },\n { value: 'na-toronto' },\n];\nexport default APIGATEWAY_STATE;\nexport {\n APIGATEWAYFilterFieldsDescriptor,\n templateQueryIdMap,\n APIGATEWAYInstanceAliasList,\n APIGATEWAYInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n regionSupported,\n queryMonitorExtraConfg,\n keyInStorage,\n // 对应产品的service的全大写拼接GetInstanceQueryParams\n GetInstanceQueryParams as APIGATEWAYGetInstanceQueryParams,\n};\n","import {\n BMINTRALBInstanceAliasList,\n BMINTRALBInvalidDemensions,\n namespace,\n templateQueryIdMap,\n isValidMetric,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\nimport { t } from '../../../locale';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = BMINTRALBInstanceAliasList;\n InvalidDimensions = BMINTRALBInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'bmlb',\n action: 'DescribeLoadBalancers',\n responseField: 'LoadBalancerSet',\n interceptor: {\n request: (params) => ({\n ...params,\n LoadBalancerType: 'internal',\n }), // 设置一些请求参数的 默认值\n },\n };\n RegionMap = {};\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n // 重写getRegion\n getRegions() {\n return this.doRequest(\n {\n url: this.url + '/bm',\n },\n 'bm',\n { action: 'DescribeRegions', region: 'ap-guangzhou' }\n ).then((response) => {\n // 缓存,后面获取可用区zone\n this.RegionMap = _.keyBy(response.RegionInfoSet, 'Region');\n return _.map(response.RegionInfoSet || [], (item) => {\n return {\n text: t(item.Region),\n value: item.Region,\n };\n });\n });\n }\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return _.compact(\n rawSet.map((item) => {\n if (isValidMetric(item)) {\n return item;\n }\n return null;\n })\n );\n }\n}\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service)\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\nimport _ from 'lodash';\n\nconst namespace = 'QCE/BM_INTRA_LB';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'bmIntraLbQuery';\n\nconst BMINTRALBInvalidDemensions = {\n vip: 'LoadBalancerVips',\n vpcId: 'VpcId',\n};\n\n// 要和文件名方式一致,ceip_summary=>CEIPSUMMARY\nconst BMINTRALBInstanceAliasList = ['LoadBalancerId', 'LoadBalancerVips', 'LoadBalancerName'];\n\nconst templateQueryIdMap = {\n instance: 'LoadBalancerId',\n};\n\n// select类型需要注意是{},multi后缀是[],dropdown是类型\nconst BMINTRALBFilterFields = {\n Limit: 20,\n Offset: 0,\n LoadBalancerIds: [],\n LoadBalancerName: [],\n LoadBalancerVips: [],\n};\n\nconst BMINTRALBFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'LoadBalancerIds',\n enDescriptor: 'LoadBalancerIds',\n cnDescriptor: '负载均衡器ID数组',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'LoadBalancerName',\n enDescriptor: 'LoadBalancerName',\n cnDescriptor: '负载均衡器名称',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'LoadBalancerVips',\n enDescriptor: 'LoadBalancerVips',\n cnDescriptor: '负载均衡获得的公网IP地址',\n link: '',\n type: 'inputMulti',\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/1027/33280',\n namespace,\n fieldDescriptor: BMINTRALBFilterFieldsDescriptor,\n};\n\nconst BMINTRALB_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'LoadBalancerId',\n queries: BMINTRALBFilterFields,\n};\nconst BMLBValidMetricsT = ['Inpkg', 'Outpkg', 'Intraffic', 'Outtraffic', 'Connum', 'Req'];\nfunction isValidMetric(metric) {\n const validMetrics = _.map(BMLBValidMetricsT, _.toUpper);\n return _.indexOf(validMetrics, _.toUpper(metric.MetricName)) !== -1;\n}\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, false);\n}\nexport default BMINTRALB_STATE;\nexport {\n BMINTRALBFilterFieldsDescriptor,\n templateQueryIdMap,\n BMINTRALBInstanceAliasList,\n BMINTRALBInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n isValidMetric,\n // 对应产品的service的全大写拼接GetInstanceQueryParams\n GetInstanceQueryParams as BMINTRALBGetInstanceQueryParams,\n};\n","import { BMLBInstanceAliasList, CPMInvalidDemensions, namespace, templateQueryIdMap, isValidMetric } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\nimport { t } from '../../../locale';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = BMLBInstanceAliasList;\n InvalidDimensions = CPMInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'bmlb',\n action: 'DescribeLoadBalancers',\n responseField: 'LoadBalancerSet',\n interceptor: {\n request: (params) => ({\n ...params,\n LoadBalancerType: 'open',\n }), // 设置一些请求参数的 默认值\n },\n };\n RegionMap = {};\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return _.compact(\n rawSet.map((item) => {\n if (isValidMetric(item)) {\n return item;\n }\n return null;\n })\n );\n }\n // 重写getRegion\n getRegions() {\n return this.doRequest(\n {\n url: this.url + '/bm',\n },\n 'bm',\n { action: 'DescribeRegions', region: 'ap-guangzhou' }\n ).then((response) => {\n // 缓存,后面获取可用区zone\n this.RegionMap = _.keyBy(response.RegionInfoSet, 'Region');\n return _.map(response.RegionInfoSet || [], (item) => {\n return {\n text: t(item.Region),\n value: item.Region,\n };\n });\n });\n }\n}\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service)\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\nimport _ from 'lodash';\n\nconst namespace = 'QCE/BM_LB';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'bmLbQuery';\n\nconst CPMInvalidDemensions = {\n vip: 'LoadBalancerVips',\n};\n\n// 要和文件名方式一致,ceip_summary=>CEIPSUMMARY\nconst BMLBInstanceAliasList = ['LoadBalancerId', 'LoadBalancerVips', 'LoadBalancerName'];\n\nconst templateQueryIdMap = {\n instance: 'LoadBalancerId',\n};\n\n// select类型需要注意是{},multi后缀是[],dropdown是类型\nconst CPMFilterFields = {\n Limit: 20,\n Offset: 0,\n LoadBalancerIds: [],\n LoadBalancerName: [],\n LoadBalancerVips: [],\n};\n\nconst CPMFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'LoadBalancerIds',\n enDescriptor: 'LoadBalancerIds',\n cnDescriptor: '负载均衡器ID数组',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'LoadBalancerName',\n enDescriptor: 'LoadBalancerName',\n cnDescriptor: '负载均衡器名称',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'LoadBalancerVips',\n enDescriptor: 'LoadBalancerVips',\n cnDescriptor: '负载均衡获得的公网IP地址',\n link: '',\n type: 'inputMulti',\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/1027/33280',\n namespace,\n fieldDescriptor: CPMFilterFieldsDescriptor,\n};\n\nconst CPM_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'LoadBalancerId',\n queries: CPMFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, false);\n}\nconst BMLBValidMetricsT = ['Inpkg', 'Outpkg', 'Intraffic', 'Outtraffic', 'Connum', 'Req'];\nfunction isValidMetric(metric) {\n const validMetrics = _.map(BMLBValidMetricsT, _.toUpper);\n return _.indexOf(validMetrics, _.toUpper(metric.MetricName)) !== -1;\n}\nexport default CPM_STATE;\nexport {\n CPMFilterFieldsDescriptor,\n templateQueryIdMap,\n BMLBInstanceAliasList,\n CPMInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n isValidMetric,\n // 对应产品的service的全大写拼接GetInstanceQueryParams\n GetInstanceQueryParams as BMLBGetInstanceQueryParams,\n};\n","import {\n BMPCXInstanceAliasList,\n BMPCXInvalidDemensions,\n namespace,\n templateQueryIdMap,\n modifyDimensons,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\nimport { t } from '../../../locale';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = BMPCXInstanceAliasList;\n InvalidDimensions = BMPCXInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'bmvpc',\n action: 'DescribeVpcPeerConnections',\n responseField: 'VpcPeerConnectionSet',\n };\n MetricReqConfig = {\n resultFilter: modifyDimensons,\n };\n RegionMap = {};\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n // 重写getRegion\n getRegions() {\n return this.doRequest(\n {\n url: this.url + '/bm',\n },\n 'bm',\n { action: 'DescribeRegions', region: 'ap-guangzhou' }\n ).then((response) => {\n // 缓存,后面获取可用区zone\n this.RegionMap = _.keyBy(response.RegionInfoSet, 'Region');\n return _.map(response.RegionInfoSet || [], (item) => {\n return {\n text: t(item.Region),\n value: item.Region,\n };\n });\n });\n }\n}\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service)\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\nimport _ from 'lodash';\n\nconst namespace = 'QCE/BM_PCX';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'bmPcxQuery';\n\nconst BMPCXInvalidDemensions = {\n peeringConnectionId: 'VpcPeerConnectionId',\n};\n\n// 要和文件名方式一致,ceip_summary=>CEIPSUMMARY\nconst BMPCXInstanceAliasList = ['VpcPeerConnectionId', 'VpcPeerConnectionName'];\n\nconst templateQueryIdMap = {\n instance: 'VpcPeerConnectionId',\n};\n\n// select类型需要注意是{},multi后缀是[],dropdown是类型\nconst BMPCXFilterFields = {\n Limit: 20,\n Offset: 0,\n VpcPeerConnectionIds: [],\n};\n\nconst BMPCXFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'VpcPeerConnectionIds',\n enDescriptor: 'VpcPeerConnectionIds',\n cnDescriptor: '对等连接实例ID',\n link: '',\n type: 'inputMulti',\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/product/1024/36903',\n namespace,\n fieldDescriptor: BMPCXFilterFieldsDescriptor,\n};\n\nconst BMPCX_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'VpcPeerConnectionId',\n queries: BMPCXFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, false);\n}\nfunction modifyDimensons(metricItem: any) {\n const metricTmp = _.cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n item.Dimensions = ['peeringConnectionId'];\n });\n return metricTmp;\n}\nexport default BMPCX_STATE;\nexport {\n BMPCXFilterFieldsDescriptor,\n templateQueryIdMap,\n BMPCXInstanceAliasList,\n BMPCXInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n modifyDimensons,\n // 对应产品的service的全大写拼接GetInstanceQueryParams\n GetInstanceQueryParams as BMPCXGetInstanceQueryParams,\n};\n","import { BWPInstanceAliasList, BWPInvalidDemensions } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\n\nexport default class BWPDatasource extends BaseDatasource {\n Namespace = 'QCE/BWP';\n InstanceAliasList = BWPInstanceAliasList;\n InvalidDimensions = BWPInvalidDemensions;\n templateQueryIdMap = {\n instance: 'BandwidthPackageId',\n };\n InstanceReqConfig = {\n service: 'vpc',\n action: 'DescribeBandwidthPackages',\n responseField: 'BandwidthPackageSet',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n}\n","import coreModule from 'grafana/app/core/core_module';\nimport { BWPFilterFieldsDescriptor } from './query_def';\n\nexport class BWPQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.BWPFilterFieldsDescriptor = BWPFilterFieldsDescriptor;\n };\n\n $scope.onChecked = (srcField, dstField) => {\n if ($scope.target.queries[srcField] === true) {\n $scope.target.queries[dstField] = false;\n }\n $scope.onChange();\n };\n\n $scope.getDropdown = (field) => {\n switch (field) {\n case 'zone':\n return $scope.getZones();\n default:\n return [];\n }\n };\n\n $scope.getZones = () => {\n if (!$scope.region) {\n return [];\n }\n return $scope.datasource.getZones('cvm', $scope.region);\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n \n \n \n
\n
\n\n
\n`;\n\nexport function bwpQuery() {\n return {\n template: template,\n controller: BWPQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n },\n };\n}\n\ncoreModule.directive('bwpQuery', bwpQuery);\n","import _ from 'lodash';\nconst networkTypes = [\n { text: 'BGP', value: 'BGP' },\n { text: 'SINGLEISP', value: 'SINGLEISP' },\n { text: 'ANYCAST', value: 'ANYCAST' },\n];\n\nconst chargeTypes = [\n { text: 'top5计费', value: 'TOP5_POSTPAID_BY_MONTH' },\n { text: '月95计费', value: 'PERCENT95_POSTPAID_BY_MONTH' },\n];\nconst BWPFilterFields = {\n 'bandwidth-package_id': [],\n 'bandwidth-package-name': [],\n 'network-type': [],\n 'charge-type': [],\n};\n\nconst BWPFilterFieldsDescriptor = [\n {\n key: 'bandwidth-package_id',\n enDescriptor: 'BandwidthPackage Id',\n cnDescriptor: '带宽包ID',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'bandwidth-package-name',\n enDescriptor: 'BandwidthPackage Name',\n cnDescriptor: '带宽包名称',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'network-type',\n enDescriptor: 'network type',\n cnDescriptor: '带宽包类型',\n link: '',\n type: 'select',\n list: networkTypes,\n },\n {\n key: 'charge-type',\n enDescriptor: 'charge type',\n cnDescriptor: '带宽包计费类型',\n link: '',\n type: 'select',\n list: chargeTypes,\n },\n];\n\nconst BWP_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'BandwidthPackageId',\n queries: {\n Limit: 20,\n Offset: 0,\n instanceIdsChecked: false,\n filtersChecked: false,\n BandwidthPackageIds: [''],\n Filters: { ...BWPFilterFields },\n },\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n if (queries.instanceIdsChecked) {\n if (_.isArray(queries.BandwidthPackageIds)) {\n const BandwidthPackageIds = _.compact(queries.BandwidthPackageIds);\n if (_.uniq(BandwidthPackageIds).length > 0) {\n params.BandwidthPackageIds = _.uniq(BandwidthPackageIds).slice(0, 100);\n }\n }\n } else if (queries.filtersChecked) {\n const Filters: any[] = [];\n _.forEach(queries.Filters, (item: any, key) => {\n if (Filters.length > 9) {\n return;\n }\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n Filters.push({ Name: key, Values: _.uniq(item).slice(0, 5) });\n }\n } else if (_.isObject(item)) {\n if (!_.isEmpty(_.get(item, 'value', []))) {\n Filters.push({ Name: key, Values: _.get(item, 'value', []).slice(0, 5) });\n }\n }\n });\n if (Filters.length > 0) {\n params.Filters = Filters;\n }\n }\n }\n return params;\n}\n\nconst BWPInstanceAliasList = ['BandwidthPackageId', 'BandwidthPackageName'];\n\nconst templateQueryIdMap = {\n instance: 'BandwidthPackageId',\n};\n\nconst BWPInvalidDemensions = {\n bandwidthPackageId: 'BandwidthPackageId',\n};\nexport default BWP_STATE;\nexport {\n BWPFilterFieldsDescriptor,\n templateQueryIdMap,\n BWPInstanceAliasList,\n BWPInvalidDemensions,\n GetInstanceQueryParams as BWPGetInstanceQueryParams,\n};\n","import { CBSInstanceAliasList, CBSInvalidDemensions, namespace, templateQueryIdMap, isValidMetric } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = CBSInstanceAliasList;\n InvalidDimensions = CBSInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'cbs',\n action: 'DescribeDisks',\n responseField: 'DiskSet',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return _.filter(rawSet, isValidMetric);\n }\n}\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import * as _ from 'lodash';\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/BLOCK_STORAGE';\nconst queryEditorName = 'cbsQuery';\n\nconst CBSInvalidDemensions = {\n diskId: 'DiskId',\n InstanceId: 'InstanceId',\n diskname: 'DiskName',\n unInstanceId: 'InstanceId',\n};\n\nconst CBSInstanceAliasList = ['DiskId', 'DiskName'];\n\nconst templateQueryIdMap = {\n instance: 'DiskId',\n};\n\n// select类型需要注意是{},multi后缀是[]\nconst CBSFilterFields = {\n Limit: 20,\n Offset: 0,\n DiskIds: [],\n OrderField: [],\n Order: [],\n ReturnBindAutoSnapshotPolicy: false,\n};\n\nconst CBSFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'DiskIds',\n enDescriptor: 'DiskIds',\n cnDescriptor: '云硬盘ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'Order',\n enDescriptor: 'Order',\n cnDescriptor: '排列顺序',\n link: '',\n type: 'select',\n list: [\n { text: '升序排列', value: 'ASC' },\n { text: '降序排列', value: 'DESC' },\n ],\n },\n {\n key: 'OrderField',\n enDescriptor: 'OrderField',\n cnDescriptor: '排序的依据字段',\n link: '',\n type: 'select',\n list: [\n { text: '云盘的创建时间排序', value: 'CREATE_TIME' },\n { text: '云盘的到期时间排序', value: 'DEADLINE' },\n ],\n },\n {\n key: 'ReturnBindAutoSnapshotPolicy',\n enDescriptor: 'ReturnBindAutoSnapshotPolicy',\n cnDescriptor: '否需要返回云盘绑定的定期快照策略ID',\n link: '',\n type: 'switch',\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/362/16315',\n namespace,\n fieldDescriptor: CBSFilterFieldsDescriptor,\n};\n\nconst CBS_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'DiskId',\n queries: CBSFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, false);\n}\nfunction isValidMetric(metricObj: any = {}) {\n const dimension = _.get(metricObj, 'Dimensions[0].Dimensions');\n // console.log('dimension', dimension, dimension.length === 1 && _.indexOf(dimension, 'diskId') !== -1);\n return dimension.length === 1 && _.indexOf(dimension, 'diskId') !== -1;\n}\nexport default CBS_STATE;\nexport {\n CBSFilterFieldsDescriptor,\n templateQueryIdMap,\n CBSInstanceAliasList,\n CBSInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n isValidMetric,\n GetInstanceQueryParams as CBSGetInstanceQueryParams,\n};\n","import _ from 'lodash';\nimport {\n CDBInstanceAliasList,\n CDBInvalidDemensions,\n isValidMetric,\n modifyDimensons,\n templateQueryIdMap,\n} from './query_def';\nimport { GetServiceAPIInfo } from '../../common/constants';\nimport { BaseDatasource } from '../_base/datasource';\n\nexport default class CDBDatasource extends BaseDatasource {\n Namespace = 'QCE/CDB';\n InstanceAliasList = CDBInstanceAliasList;\n InvalidDimensions = CDBInvalidDemensions;\n templateQueryIdMap = {\n instance: 'InstanceId',\n };\n InstanceReqConfig = {\n service: 'cdb',\n action: 'DescribeDBInstances',\n responseField: 'Items',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return _.compact(\n rawSet.map((item) => {\n if (isValidMetric(item)) {\n return modifyDimensons(item);\n }\n return null;\n })\n );\n }\n /**\n * 获取 可用区\n * @param region 地域信息\n */\n getZones(region) {\n const serviceInfo = GetServiceAPIInfo(region, 'cvm');\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n },\n serviceInfo.service,\n { region, action: 'DescribeZones' }\n ).then((response) => {\n return _.filter(\n _.map(response.ZoneSet || [], (item) => {\n return { text: item.ZoneName, value: item.ZoneId, ZoneState: item.ZoneState, Zone: item.Zone };\n }),\n (item) => item.ZoneState === 'AVAILABLE'\n );\n });\n }\n // 仅对维度组合是InstanceId和InstanceType的指标,其他指标不支持\n getDefaultInsObj(ins: string) {\n return {\n [templateQueryIdMap.instance]: ins,\n InstanceType: 1,\n };\n }\n}\n","import coreModule from 'grafana/app/core/core_module';\nimport { CDBFieldsDescriptor } from './query_def';\n\nexport class CDBQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.CDBFieldsDescriptor = CDBFieldsDescriptor;\n };\n\n $scope.onChecked = (srcField, dstField) => {\n if ($scope.target.queries[srcField] === true) {\n $scope.target.queries[dstField] = false;\n }\n $scope.onChange();\n };\n\n $scope.getDropdown = (field) => {\n switch (field) {\n case 'ZoneIds':\n return $scope.getZones();\n default:\n return [];\n }\n };\n\n $scope.getZones = () => {\n if (!$scope.region) {\n return [];\n }\n return $scope.datasource.getZones('cdb', $scope.region);\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n`;\n\nexport function cdbQuery() {\n return {\n template: template,\n controller: CDBQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n },\n };\n}\n\ncoreModule.directive('cdbQuery', cdbQuery);\n","import _ from 'lodash';\n\nconst InstanceTypes = [\n { text: '主实例', value: 1 },\n { text: '备灾实例', value: 2 },\n { text: '只读实例', value: 3 },\n];\n\nconst Status = [\n { text: '创建中', value: 0 },\n { text: '运行中', value: 1 },\n { text: '隔离中', value: 4 },\n { text: '已隔离', value: 5 },\n];\n\nconst PayTypes = [\n { text: '包年包月', value: 0 },\n { text: '小时计费', value: 1 },\n];\n\nconst TaskStatus = [\n { text: '没有任务', value: 0 },\n { text: '升级中', value: 1 },\n { text: '数据导入中', value: 2 },\n { text: '开放Slave中', value: 3 },\n { text: '外网访问开通中', value: 4 },\n { text: '批量操作执行中', value: 5 },\n { text: '回档中', value: 6 },\n { text: '外网访问关闭中', value: 7 },\n { text: '密码修改中', value: 8 },\n { text: '实例名修改中', value: 9 },\n { text: '重启中', value: 10 },\n { text: '自建迁移中', value: 12 },\n { text: '删除库表中', value: 13 },\n { text: '灾备实例创建同步中', value: 14 },\n { text: '升级待切换', value: 15 },\n { text: '升级切换中', value: 16 },\n { text: '升级切换完成', value: 17 },\n];\n\nconst EngineVersions = [\n { text: '5.1', value: '5.1' },\n { text: '5.5', value: '5.5' },\n { text: '5.6', value: '5.6' },\n { text: '5.7', value: '5.7' },\n];\n\nconst OrderBy = [\n { text: 'InstanceId', value: 'InstanceId' },\n { text: 'InstanceName', value: 'InstanceName' },\n { text: 'CreateTime', value: 'CreateTime' },\n { text: 'DeadlineTime', value: 'DeadlineTime' },\n];\n\nconst OrderDirection = [\n { text: 'ASC', value: 'ASC' },\n { text: 'DESC', value: 'DESC' },\n];\n\nconst InitFlag = [\n { text: '未初始化', value: 0 },\n { text: '初始化', value: 1 },\n];\n\nconst CdbErrors = [\n { text: '未锁定', value: 0 },\n { text: '锁定', value: 1 },\n];\n\nconst CDBFields = {\n ProjectId: '',\n InstanceTypes: {},\n Vips: [],\n Status: {},\n Offset: 0,\n Limit: 20,\n SecurityGroupId: '',\n PayTypes: {},\n InstanceNames: [],\n TaskStatus: {},\n EngineVersions: {},\n VpcIds: [],\n ZoneIds: [],\n SubnetIds: [],\n CdbErrors: {},\n OrderBy: {},\n OrderDirection: {},\n InstanceIds: [],\n InitFlag: {},\n};\n\nconst CDBFieldsDescriptor = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputnumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputnumber',\n min: 1,\n max: 100,\n },\n {\n key: 'InstanceNames',\n enDescriptor: 'Instance Name',\n cnDescriptor: '实例名称',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'InstanceIds',\n enDescriptor: 'Instance ID',\n cnDescriptor: '实例ID',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'ZoneIds',\n enDescriptor: 'Zone ID',\n cnDescriptor: '可用区的ID',\n link: '',\n type: 'dropdownmulti',\n },\n {\n key: 'InstanceTypes',\n enDescriptor: 'Instance Type',\n cnDescriptor: '实例类型',\n link: '',\n multiple: true,\n type: 'select',\n list: InstanceTypes,\n },\n {\n key: 'EngineVersions',\n enDescriptor: 'Engine Version',\n cnDescriptor: '实例数据库引擎版本',\n link: '',\n multiple: true,\n type: 'select',\n list: EngineVersions,\n },\n {\n key: 'TaskStatus',\n enDescriptor: 'Task Status',\n cnDescriptor: '实例任务',\n link: '',\n multiple: true,\n type: 'select',\n list: TaskStatus,\n },\n {\n key: 'InitFlag',\n enDescriptor: 'Init Flag',\n cnDescriptor: '实例初始化状态',\n link: '',\n multiple: true,\n type: 'select',\n list: InitFlag,\n },\n {\n key: 'PayTypes',\n enDescriptor: 'Pay Type',\n cnDescriptor: '付费类型',\n link: '',\n multiple: true,\n type: 'select',\n list: PayTypes,\n },\n {\n key: 'CdbErrors',\n enDescriptor: 'CDB Errors',\n cnDescriptor: '实例锁定标记',\n link: '',\n multiple: true,\n type: 'select',\n list: CdbErrors,\n },\n {\n key: 'Status',\n enDescriptor: 'Status',\n cnDescriptor: '实例状态',\n link: '',\n multiple: true,\n type: 'select',\n list: Status,\n },\n {\n key: 'OrderBy',\n enDescriptor: 'OrderBy',\n cnDescriptor: '排序字段',\n link: '',\n type: 'select',\n list: OrderBy,\n },\n {\n key: 'OrderDirection',\n enDescriptor: 'Order Direction',\n cnDescriptor: '排序方式',\n link: '',\n type: 'select',\n list: OrderDirection,\n },\n {\n key: 'Vips',\n enDescriptor: 'Vip',\n cnDescriptor: '实例内网IP地址',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'VpcIds',\n enDescriptor: 'Vpc ID',\n cnDescriptor: '私有网络ID',\n link: 'https://cloud.tencent.com/document/api/215/15778',\n type: 'inputmulti',\n },\n {\n key: 'SubnetIds',\n enDescriptor: 'Subnet ID',\n cnDescriptor: '子网ID',\n link: 'https://cloud.tencent.com/document/api/215/15784',\n type: 'inputmulti',\n },\n {\n key: 'ProjectId',\n enDescriptor: 'Project ID',\n cnDescriptor: '项目ID',\n link: 'https://cloud.tencent.com/document/product/378/4400',\n type: 'input',\n },\n {\n key: 'SecurityGroupId',\n enDescriptor: 'Security Group ID',\n cnDescriptor: '安全组ID',\n link: 'https://cloud.tencent.com/document/api/236/15854',\n type: 'input',\n },\n];\n\nconst CDB_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'InstanceId',\n queries: { ...CDBFields },\n};\n\nconst CDBInstanceAliasList = ['InstanceId', 'InstanceName', 'Vip'];\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n queries = _.omit(queries, ['Offset', 'Limit']);\n _.forEach(queries, (item: any, key) => {\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n params[key] = _.uniq(item);\n }\n } else if (_.isObject(item)) {\n if (_.isNumber(_.get(item, 'value', undefined)) || !_.isEmpty(_.get(item, 'value', undefined))) {\n params[key] = _.get(item, 'value');\n }\n } else if (_.isNumber(item) || !_.isEmpty(item)) {\n params[key] = item;\n }\n });\n }\n return params;\n}\nfunction isValidMetric(metricObj: any = {}) {\n const dimension = _.get(metricObj, 'Dimensions[0].Dimensions');\n return (\n dimension.length === 2 &&\n ((_.indexOf(dimension, 'instanceid') !== -1 && _.indexOf(dimension, 'insttype') !== -1) ||\n (_.indexOf(dimension, 'InstanceId') !== -1 && _.indexOf(dimension, 'InstanceType') !== -1))\n );\n}\nfunction modifyDimensons(metricItem: any) {\n const metricTmp = _.cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n item.Dimensions = item.Dimensions.map((i) => CDBInvalidDemensions[i] || i);\n });\n return metricTmp;\n}\nconst CDBInvalidDemensions = {\n instanceid: 'InstanceId',\n insttype: 'InstanceType',\n region: 'Region',\n};\nconst templateQueryIdMap = {\n instance: 'InstanceId',\n};\nexport default CDB_STATE;\n\nexport {\n CDBFieldsDescriptor,\n CDBInstanceAliasList,\n templateQueryIdMap,\n CDBInvalidDemensions,\n isValidMetric,\n modifyDimensons,\n GetInstanceQueryParams as CDBGetInstanceQueryParams,\n};\n","import _ from 'lodash';\nimport { CDNInstanceAliasList, CDNInvalidDemensions } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\n\nexport default class CDNDatasource extends BaseDatasource {\n Namespace = 'QCE/CDN';\n InstanceAliasList = CDNInstanceAliasList;\n InvalidDimensions = CDNInvalidDemensions;\n templateQueryIdMap = {\n instance: 'Domain',\n };\n InstanceReqConfig = {\n service: 'cdn',\n action: 'DescribeDomains',\n responseField: 'Domains',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n async metricFindQuery(query: any, regex?: string) {\n return super.metricFindQuery({ ...query, ...{ region: 'ap-guangzhou' } }, regex);\n }\n}\n","import coreModule from 'grafana/app/core/core_module';\nimport { CDNFilterFieldsDescriptor } from './query_def';\n\nexport class CDNQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.CDNFilterFieldsDescriptor = CDNFilterFieldsDescriptor;\n };\n\n // $scope.onChecked = (srcField, dstField) => {\n // if ($scope.target.queries[srcField] === true) {\n // $scope.target.queries[dstField] = false;\n // }\n // $scope.onChange();\n // };\n\n // $scope.getDropdown = (field) => {\n // switch (field) {\n // case 'zone':\n // return $scope.getZones();\n // default:\n // return [];\n // }\n // };\n\n // $scope.getZones = () => {\n // if (!$scope.region) {\n // return [];\n // }\n // return $scope.datasource.getZones('cvm', $scope.region);\n // };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n\n\n\n\n
\n\n
\n`;\n\nexport function cdnQuery() {\n return {\n template: template,\n controller: CDNQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n },\n };\n}\n\ncoreModule.directive('cdnQuery', cdnQuery);\n","import _ from 'lodash';\nconst CDNFilterFields = {\n origin: [],\n domain: [],\n resourceId: [],\n status: {},\n serviceType: {},\n projectId: [],\n domainType: {},\n fullUrlCache: {},\n https: {},\n originPullProtocol: {},\n tagKey: [],\n};\n\nconst CDNFilterFieldsDescriptor = [\n {\n key: 'origin',\n enDescriptor: 'origin',\n cnDescriptor: '主源站',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'domain',\n enDescriptor: 'domain',\n cnDescriptor: '域名',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'resourceId',\n enDescriptor: 'resourceId',\n cnDescriptor: '域名id',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'status',\n enDescriptor: 'status',\n cnDescriptor: '域名状态',\n link: '',\n type: 'select',\n list: [\n { text: 'online', value: 'online' },\n { text: 'offline', value: 'offline' },\n { text: 'processing', value: 'processing' },\n ],\n },\n {\n key: 'serviceType',\n enDescriptor: 'serviceType',\n cnDescriptor: '业务类型',\n link: '',\n type: 'select',\n list: [\n { text: 'web', value: 'web' },\n { text: 'download', value: 'download' },\n { text: 'media', value: 'media' },\n ],\n },\n {\n key: 'projectId',\n enDescriptor: 'projectId',\n cnDescriptor: '项目ID',\n link: '',\n type: 'inputNumbermulti',\n },\n {\n key: 'domainType',\n enDescriptor: 'domainType',\n cnDescriptor: '主源站类型',\n link: '',\n type: 'select',\n list: [\n { text: '自有源', value: 'cname' },\n { text: 'cos接入', value: 'cos' },\n ],\n },\n {\n key: 'fullUrlCache',\n enDescriptor: 'fullUrlCache',\n cnDescriptor: '全路径缓存',\n link: '',\n type: 'select',\n list: [\n { text: '打开', value: 'on' },\n { text: '关闭', value: 'off' },\n ],\n },\n {\n key: 'https',\n enDescriptor: 'https',\n cnDescriptor: '是否配置https',\n link: '',\n type: 'select',\n list: [\n { text: 'on', value: 'on' },\n { text: 'off', value: 'off' },\n { text: 'processing', value: 'processing' },\n ],\n },\n {\n key: 'originPullProtocol',\n enDescriptor: 'originPullProtocol',\n cnDescriptor: '回源协议类型',\n link: '',\n type: 'select',\n list: [\n { text: 'http', value: 'http' },\n { text: 'follow', value: 'follow' },\n { text: 'https', value: 'https' },\n ],\n },\n {\n key: 'tagKey',\n enDescriptor: 'tagKey',\n cnDescriptor: '标签键',\n link: '',\n type: 'inputmulti',\n },\n];\n\nconst CDN_STATE = {\n region: 'ap-guangzhou',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'Domain',\n queries: {\n Limit: 20,\n Offset: 0,\n Filters: { ...CDNFilterFields },\n },\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n const Filters: any[] = [];\n _.forEach(queries.Filters, (item: any, key) => {\n // console.log('item', item, queries);\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n Filters.push({ Name: key, Value: _.uniq(item).slice(0, 5) });\n }\n } else if (_.isObject(item)) {\n if (!_.isEmpty(_.get(item, 'value', []))) {\n Filters.push({ Name: key, Value: _.get(item, 'value', []).slice(0, 5) });\n }\n }\n });\n if (Filters.length > 0) {\n params.Filters = Filters;\n }\n }\n return params;\n}\n\nconst CDNInstanceAliasList = ['Domain', 'ProjectId'];\n\nconst CDNInvalidDemensions = {\n projectId: 'ProjectId',\n domain: 'Domain',\n};\nconst templateQueryIdMap = {\n instance: 'Domain',\n};\nexport default CDN_STATE;\nexport {\n CDNFilterFieldsDescriptor,\n templateQueryIdMap,\n CDNInstanceAliasList,\n CDNInvalidDemensions,\n GetInstanceQueryParams as CDNGetInstanceQueryParams,\n};\n","import { CDNPROVINCEInstanceAliasList, CDNPROVINCEInvalidDemensions, namespace, templateQueryIdMap } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\nimport { GetServiceAPIInfo } from '../../common/constants';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = CDNPROVINCEInstanceAliasList;\n InvalidDimensions = CDNPROVINCEInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'cdn',\n action: 'DescribeDomains',\n responseField: 'Domains',\n };\n extrasAlias = ['isp', 'district'];\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n // getFilterDropdown({ field }) {\n // return super.getRegions();\n // }\n async metricFindQuery(query: any, regex?: string) {\n return super.metricFindQuery({ ...query, ...{ region: 'ap-guangzhou' } }, regex);\n }\n async getConsumerList(params: any) {\n const { region, field } = params;\n const serviceInfo = GetServiceAPIInfo(region, 'cdn');\n\n // 从分页数据,获取全量数据\n const rs = await this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data: {\n Name: field,\n },\n },\n serviceInfo.service,\n { action: 'DescribeMapInfo' }\n );\n return (rs.MapInfoList || []).map((o) => {\n return {\n text: o.Name,\n value: o.Name,\n };\n });\n }\n async fetchMetricData(action: string, region: string, instance: any, query: any) {\n if (action === 'DescribeMapInfo') {\n const { name: field } = query;\n const rs = await this.getConsumerList({ region, field });\n return rs;\n }\n return [];\n }\n}\n","import coreModule from 'grafana/app/core/core_module';\nimport { CDNPROVINCEFilterFieldsDescriptor, queryEditorName, namespace } from './query_def';\nimport { GetServiceFromNamespace } from '../../common/constants';\n\nconst ExtraFields = [\n {\n label: 'Isp',\n field: 'isp',\n },\n {\n label: 'Province',\n field: 'district',\n },\n];\nexport class QueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.CDNPROVINCEFilterFieldsDescriptor = CDNPROVINCEFilterFieldsDescriptor;\n $scope.ExtraFields = ExtraFields;\n $scope.namespace = namespace;\n };\n\n $scope.getExtraDropdown = async (target, field) => {\n const service = GetServiceFromNamespace($scope.namespace);\n const region = $scope.datasource.getServiceFn(service, 'getVariable')(target.region);\n const rs = await $scope.datasource.getServiceFn(service, 'getConsumerList')({ region, field });\n return rs;\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n`;\n\nexport function sQuery() {\n return {\n template: template,\n controller: QueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n onRefresh: '&',\n dims: '=',\n },\n };\n}\ncoreModule.directive(queryEditorName, sQuery);\n","// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service)\nimport { FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/CDN_LOG_DATA';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'cdnProvinceQuery';\n\nconst CDNPROVINCEInvalidDemensions = {\n domain: 'Domain',\n // isp: 'Isp',\n projectid: 'ProjectId',\n province: 'district',\n appid: 'AppId',\n};\n\n// 需和文件名对应\nconst CDNPROVINCEInstanceAliasList = ['Domain', 'ProjectId'];\n\nconst templateQueryIdMap = {\n instance: 'Domain',\n};\n\n// select类型需要注意是{},multi后缀是[],dropdown是''\nconst CDNPROVINCEFilterFields = {\n Limit: 20,\n Offset: 0,\n origin: [],\n domain: [],\n resourceId: [],\n status: {},\n serviceType: {},\n projectId: [],\n domainType: {},\n fullUrlCache: {},\n https: {},\n originPullProtocol: {},\n tagKey: [],\n};\n\nconst CDNPROVINCEFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'origin',\n enDescriptor: 'origin',\n cnDescriptor: '主源站',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'domain',\n enDescriptor: 'domain',\n cnDescriptor: '域名',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'resourceId',\n enDescriptor: 'resourceId',\n cnDescriptor: '域名id',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'status',\n enDescriptor: 'status',\n cnDescriptor: '域名状态',\n link: '',\n type: 'select',\n list: [\n { text: 'online', value: 'online' },\n { text: 'offline', value: 'offline' },\n { text: 'processing', value: 'processing' },\n ],\n },\n {\n key: 'serviceType',\n enDescriptor: 'serviceType',\n cnDescriptor: '业务类型',\n link: '',\n type: 'select',\n list: [\n { text: 'web', value: 'web' },\n { text: 'download', value: 'download' },\n { text: 'media', value: 'media' },\n ],\n },\n {\n key: 'projectId',\n enDescriptor: 'projectId',\n cnDescriptor: '项目ID',\n link: '',\n type: 'inputNumberMulti',\n },\n {\n key: 'domainType',\n enDescriptor: 'domainType',\n cnDescriptor: '主源站类型',\n link: '',\n type: 'select',\n list: [\n { text: '自有源', value: 'cname' },\n { text: 'cos接入', value: 'cos' },\n ],\n },\n {\n key: 'fullUrlCache',\n enDescriptor: 'fullUrlCache',\n cnDescriptor: '全路径缓存',\n link: '',\n type: 'select',\n list: [\n { text: '打开', value: 'on' },\n { text: '关闭', value: 'off' },\n ],\n },\n {\n key: 'https',\n enDescriptor: 'https',\n cnDescriptor: '是否配置https',\n link: '',\n type: 'select',\n list: [\n { text: 'on', value: 'on' },\n { text: 'off', value: 'off' },\n { text: 'processing', value: 'processing' },\n ],\n },\n {\n key: 'originPullProtocol',\n enDescriptor: 'originPullProtocol',\n cnDescriptor: '回源协议类型',\n link: '',\n type: 'select',\n list: [\n { text: 'http', value: 'http' },\n { text: 'follow', value: 'follow' },\n { text: 'https', value: 'https' },\n ],\n },\n {\n key: 'tagKey',\n enDescriptor: 'tagKey',\n cnDescriptor: '标签键',\n link: '',\n type: 'inputMulti',\n },\n];\n\nconst CDNPROVINCE_STATE = {\n region: 'ap-guangzhou',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'Domain',\n // Isp Province分别在两个接口,单独保存在state\n isp: '',\n district: '',\n queries: CDNPROVINCEFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, true);\n}\n// const regionSupported = [\n// { text: '华北地区(北京)', value: 'ap-beijing' },\n// { text: '西南地区(成都)', value: 'ap-chengdu' },\n// { text: '西南地区(重庆)', value: 'ap-chongqing' },\n// { text: '华南地区(广州)', value: 'ap-guangzhou' },\n// { text: '港澳台地区(中国香港)', value: 'ap-hongkong' },\n// { text: '亚太南部(孟买)', value: 'ap-mumbai' },\n// { text: '华东地区(南京)', value: 'ap-nanjing' },\n// { text: '华东地区(上海)', value: 'ap-shanghai' },\n// { text: '华东地区(上海金融)', value: 'ap-shanghai-fsi' },\n// { text: '华南地区(深圳金融)', value: 'ap-shenzhen-fsi' },\n// { text: '亚太东南(新加坡)', value: 'ap-singapore' },\n// { text: '亚太东北(东京)', value: 'ap-tokyo' },\n// { text: '欧洲地区(法兰克福)', value: 'eu-frankfurt' },\n// { text: '美国东部(弗吉尼亚)', value: 'na-ashburn' },\n// { text: '美国西部(硅谷)', value: 'na-siliconvalley' },\n// { text: '北美地区(多伦多)', value: 'na-toronto' },\n// ];\nexport default CDNPROVINCE_STATE;\nexport {\n CDNPROVINCEFilterFieldsDescriptor,\n templateQueryIdMap,\n CDNPROVINCEInstanceAliasList,\n CDNPROVINCEInvalidDemensions,\n namespace,\n queryEditorName,\n // regionSupported,\n // 对应产品的service的全大写拼接GetInstanceQueryParams\n GetInstanceQueryParams as CDNPROVINCEGetInstanceQueryParams,\n};\n","import {\n CEIPSUMMARYInstanceAliasList,\n CEIPInvalidDemensions,\n namespace,\n templateQueryIdMap,\n modifyDimensons,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = CEIPSUMMARYInstanceAliasList;\n InvalidDimensions = CEIPInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'vpc',\n action: 'DescribeAddresses',\n responseField: 'AddressSet',\n interceptor: {\n request: (params) => {\n const { Filters } = params;\n if (!Filters) {\n params.Filters = [];\n }\n params.Filters.push({\n Name: 'address-type',\n Values: ['AnycastEIP'],\n });\n return params;\n }, // 设置一些请求参数的 默认值\n // response: (data: unknown[]) =>[\n // {\n // AddressId: 'AddressId',\n // AddressIp: '111.22.3.4'\n // },\n // ],\n },\n };\n MetricReqConfig = {\n resultFilter: modifyDimensons,\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n\n // async getInstances(region, params = {}) {\n // const rawSet = await super.getInstances(region, params);\n // return rawSet.filter((item) => item.AddressType === 'AnycastEIP');\n // }\n\n // async getVariableInstances(region, query = {}) {\n // const rawSet = await super.getVariableInstances(region, query);\n // return rawSet.filter((item) => item.AddressType === 'AnycastEIP');\n // }\n}\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import _ from 'lodash';\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/CEIP_SUMMARY';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'ceipSummaryQuery';\n\nconst CEIPInvalidDemensions = {\n vip: 'AddressIp',\n eip: 'AddressIp',\n};\n\n// 要和文件名方式一致,ceip_summary=>CEIPSUMMARY\nconst CEIPSUMMARYInstanceAliasList = ['AddressId', 'AddressName', 'AddressIp'];\n\nconst templateQueryIdMap = {\n instance: 'AddressId',\n};\n\n// select类型需要注意是{},multi后缀是[]\nconst CEIPFilterFields = {\n Limit: 20,\n Offset: 0,\n 'address-id': [],\n 'address-name': [],\n 'address-ip': [],\n 'address-status': {},\n 'is-arrears': {},\n 'address-isp': {},\n 'instance-id': [],\n 'private-ip-address': [],\n 'network-interface-id': [],\n};\n\nconst CEIPFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'address-id',\n enDescriptor: 'address-id',\n cnDescriptor: ' EIP 的唯一 ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'address-name',\n enDescriptor: 'address-name',\n cnDescriptor: 'EIP 名称',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'address-ip',\n enDescriptor: 'address-ip',\n cnDescriptor: 'EIP 的 IP 地址',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'address-status',\n enDescriptor: 'address-status',\n cnDescriptor: 'EIP 的状态',\n link: '',\n type: 'select',\n multiple: true,\n list: [\n { text: 'CREATING', value: 'CREATING' },\n { text: 'BINDING', value: 'BINDING' },\n { text: 'BIND', value: 'BIND' },\n { text: 'UNBINDING', value: 'UNBINDING' },\n { text: 'UNBIND', value: 'UNBIND' },\n { text: 'OFFLINING', value: 'OFFLINING' },\n { text: 'BIND_ENI', value: 'BIND_ENI' },\n ],\n },\n {\n key: 'instance-id',\n enDescriptor: 'instance-id',\n cnDescriptor: 'EIP 绑定的实例 ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'private-ip-address',\n enDescriptor: 'private-ip-address',\n cnDescriptor: 'EIP 绑定的内网 IP ',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'network-interface-id',\n enDescriptor: 'network-interface-id',\n cnDescriptor: ' EIP 绑定的弹性网卡 ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'is-arrears',\n enDescriptor: 'is-arrears',\n cnDescriptor: 'EIP 是否欠费',\n link: '',\n type: 'select',\n multiple: true,\n list: [\n { text: '欠费状态', value: 'TRUE' },\n { text: '费用状态正常', value: 'FALSE' },\n ],\n },\n {\n key: 'address-isp',\n enDescriptor: 'address-isp',\n cnDescriptor: '运营商类型',\n link: '',\n type: 'select',\n multiple: true,\n list: [\n { text: 'BGP', value: 'BGP' },\n { text: 'CMCC', value: 'CMCC' },\n { text: 'CUCC', value: 'CUCC' },\n { text: 'CTCC', value: 'CTCC' },\n ],\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/215/16702',\n namespace,\n fieldDescriptor: CEIPFilterFieldsDescriptor,\n};\n\nconst CEIP_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'AddressId',\n queries: CEIPFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, true);\n}\nfunction modifyDimensons(metricItem: any) {\n const metricTmp = _.cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n item.Dimensions = ['eip'];\n });\n return metricTmp;\n}\nexport default CEIP_STATE;\nexport {\n CEIPFilterFieldsDescriptor,\n templateQueryIdMap,\n CEIPSUMMARYInstanceAliasList,\n CEIPInvalidDemensions,\n namespace,\n queryEditorName,\n modifyDimensons,\n queryEditorConfig,\n GetInstanceQueryParams as CEIPSUMMARYGetInstanceQueryParams,\n};\n","import { CESInstanceAliasList, CESInvalidDemensions, namespace, templateQueryIdMap } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = CESInstanceAliasList;\n InvalidDimensions = CESInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'es',\n action: 'DescribeInstances',\n responseField: 'InstanceList',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n}\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service)\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/CES';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'cesQuery';\n\nconst CESInvalidDemensions = {\n uInstanceId: 'InstanceId',\n};\n\nconst CESInstanceAliasList = ['InstanceId', 'InstanceName'];\n\nconst templateQueryIdMap = {\n instance: 'InstanceId',\n};\n\n// select类型需要注意是{},multi后缀是[],dropdown是类型\nconst CESFilterFields = {\n Limit: 20,\n Offset: 0,\n InstanceIds: [],\n InstanceNames: [],\n OrderByKey: {},\n OrderByType: {},\n IpList: [],\n};\n\nconst CESFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'InstanceIds',\n enDescriptor: 'InstanceIds',\n cnDescriptor: '集群实例ID列表',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'InstanceNames',\n enDescriptor: 'InstanceNames',\n cnDescriptor: '集群实例名称列表',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'OrderByKey',\n enDescriptor: 'OrderByKey',\n cnDescriptor: '排序字段',\n link: '',\n type: 'select',\n list: [\n { text: '实例ID', value: 1 },\n { text: '实例名称', value: 2 },\n { text: '可用区', value: 3 },\n { text: '创建时间', value: 4 },\n ],\n },\n {\n key: 'OrderByType',\n enDescriptor: 'OrderByType',\n cnDescriptor: '排序方式',\n link: '',\n type: 'select',\n list: [\n { text: '升序', value: 0 },\n { text: '降序', value: 1 },\n ],\n },\n {\n key: 'IpList',\n enDescriptor: 'IpList',\n cnDescriptor: '私有网络vip列表',\n link: '',\n type: 'inputMulti',\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/845/30631',\n namespace,\n fieldDescriptor: CESFilterFieldsDescriptor,\n};\n\nconst CES_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'InstanceId',\n queries: CESFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, false);\n}\nexport default CES_STATE;\nexport {\n CESFilterFieldsDescriptor,\n templateQueryIdMap,\n CESInstanceAliasList,\n CESInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n // 对应产品的service的全大写拼接GetInstanceQueryParams\n GetInstanceQueryParams as CESGetInstanceQueryParams,\n};\n","import _ from 'lodash';\nimport { BaseDatasource } from '../_base/datasource';\nimport { CFSInstanceAliasList, CFSInvalidDemensions, regionSupported } from './query_def';\nimport { t } from '../../../locale';\nexport default class CFSDatasource extends BaseDatasource {\n InstanceKey: string;\n Namespace: string;\n InstanceAliasList: string[];\n InvalidDimensions: Record;\n templateQueryIdMap = {\n instance: 'FileSystemId',\n };\n extrasAlias = ['version'];\n InstanceReqConfig: { service?: string | undefined; action: string; responseField: string };\n\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n\n this.Namespace = 'QCE/CFS';\n this.InstanceAliasList = CFSInstanceAliasList;\n this.InvalidDimensions = CFSInvalidDemensions;\n this.InstanceReqConfig = {\n service: 'cfs',\n action: 'DescribeCfsFileSystems',\n responseField: 'FileSystems',\n };\n }\n getRegions() {\n return Promise.resolve(regionSupported.map(({ value }) => ({ value, text: t(value) })));\n }\n}\n","import coreModule from 'grafana/app/core/core_module';\nimport { CFSQueryDescriptor } from './query_def';\n\nexport class SCFQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.CFSQueryDescriptor = CFSQueryDescriptor;\n };\n\n $scope.getVersions = async (target) => {\n // console.log(2222);\n\n // return [{ text: 1, value: 1 }];\n // console.log(target, 'target');\n const { instance, region } = target;\n const fetcher = $scope.datasource.getServiceFn('scf', 'getVersions');\n if (!instance || !region) return [];\n\n return fetcher(region, { FunctionName: JSON.parse(instance).FunctionName }).then((res) => {\n // console.log(res, 'res');\n\n return res;\n });\n };\n // $scope.onChecked = (srcField, dstField) => {\n // if ($scope.target.queries[srcField] === true) {\n // $scope.target.queries[dstField] = false;\n // }\n // $scope.onChange();\n // };\n\n // $scope.getDropdown = (field) => {\n // switch (field) {\n // case 'zone':\n // return $scope.getZones();\n // default:\n // return [];\n // }\n // };\n\n // $scope.getZones = () => {\n // if (!$scope.region) {\n // return [];\n // }\n // return $scope.datasource.getZones('cvm', $scope.region);\n // };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n
\n`;\n\nexport function scfQuery() {\n return {\n template: template,\n controller: SCFQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n },\n };\n}\ncoreModule.directive('cfsQuery', scfQuery);\n","import _ from 'lodash';\n\nexport const CFSQueryDescriptor = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputnumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputnumber',\n min: 1,\n max: 100,\n },\n {\n key: 'FileSystemId',\n enDescriptor: 'File System Id',\n cnDescriptor: '文件系统 ID',\n link: '',\n type: 'input',\n },\n {\n key: 'VpcId',\n enDescriptor: 'VpcId',\n cnDescriptor: '私有网络(VPC) ID',\n link: '',\n type: 'input',\n },\n {\n key: 'SubnetId',\n enDescriptor: 'SubnetId',\n cnDescriptor: '子网 ID',\n link: '',\n type: 'input',\n },\n];\n\nconst CFS_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'FileSystemId',\n version: '',\n queries: {\n Offset: 0,\n Limit: 20,\n FileSystemId: '',\n VpcId: '',\n SubnetId: '',\n },\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n queries = _.omit(queries, ['Offset', 'Limit']);\n _.forEach(queries, (item: any, key) => {\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n params[key] = _.uniq(item);\n }\n } else if (_.isObject(item)) {\n if (_.isNumber(_.get(item, 'value', undefined)) || !_.isEmpty(_.get(item, 'value', undefined))) {\n params[key] = _.get(item, 'value');\n }\n } else if (_.isNumber(item) || !_.isEmpty(item)) {\n params[key] = item;\n }\n });\n }\n return params;\n}\n\nconst CFSInstanceAliasList = ['FileSystemId', 'FsName'];\n\n// 向实例里面塞dimensions对应的值,dimension中的key对应到实例中的key\nconst CFSInvalidDemensions = {\n // functionName: 'FunctionName',\n // namespace: 'Namespace'\n};\n\nconst regionSupported = [\n { value: 'ap-beijing' },\n { value: 'ap-chengdu' },\n { value: 'ap-chongqing' },\n { value: 'ap-guangzhou' },\n { value: 'ap-hongkong' },\n { value: 'ap-mumbai' },\n { value: 'ap-nanjing' },\n { value: 'ap-seoul' },\n { value: 'ap-shanghai' },\n { value: 'ap-shanghai-fsi' },\n { value: 'ap-shenzhen-fsi' },\n { value: 'ap-singapore' },\n { value: 'ap-tokyo' },\n { value: 'eu-frankfurt' },\n { value: 'na-siliconvalley' },\n { value: 'na-toronto' },\n];\nconst templateQueryIdMap = {\n instance: 'InstanceId',\n};\nexport default CFS_STATE;\nexport {\n CFSInstanceAliasList,\n CFSInvalidDemensions,\n templateQueryIdMap,\n regionSupported,\n GetInstanceQueryParams as CFSGetInstanceQueryParams,\n};\n\n// monitor监控数据默认支持的维度\n// export const SCFDefaultDimensionList = ['functionName', 'namespace', 'version'];\n","import _, { flattenDeep } from 'lodash';\nimport { GetServiceAPIInfo } from '../../common/constants';\nimport { fetchAllFactory } from '../../common/utils';\nimport { BaseDatasource } from '../_base/datasource';\nimport {\n CKAFKAInstanceAliasList,\n CKAFKATopicAliasList,\n CKAFKAInvalidDemensions,\n templateQueryIdMap,\n keyInStorage,\n queryMonitorExtraConfg,\n} from './query_def';\n\nimport instanceStorage from '../../common/datasourceStorage';\n\nexport default class CKFKADatasource extends BaseDatasource {\n Namespace = 'QCE/CKAFKA';\n InstanceAliasList = CKAFKAInstanceAliasList;\n TopicAliasList = CKAFKATopicAliasList;\n InvalidDimensions = CKAFKAInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n InstanceReqConfig = {\n service: 'ckafka',\n action: 'DescribeInstances',\n responseField: 'InstanceList',\n };\n extraMetricDims = ['topicId'];\n // extrasAlias = ['topicId', 'consumerGroup', 'partition'];\n keyInStorage = keyInStorage;\n queryMonitorExtraConfg = queryMonitorExtraConfg;\n consumerGroupCache = {};\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n\n async getConsumerGroups(region, params) {\n const serviceInfo = GetServiceAPIInfo(region, 'ckafka');\n let { InstanceId, groupname = '', topicid = '' } = params;\n groupname = this.getVariable(groupname); // 将模板转换为真实值\n topicid = this.getVariable(topicid); // 将模板转换为真实值\n try {\n groupname = JSON.parse(groupname)[templateQueryIdMap.groupName];\n topicid = JSON.parse(topicid)[templateQueryIdMap.topicId];\n } catch (e) {}\n let consumerGoup = this.consumerGroupCache[InstanceId];\n if (!consumerGoup) {\n // 从分页数据,获取全量数据\n consumerGoup = await fetchAllFactory(\n (data) => {\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data,\n },\n serviceInfo.service,\n { region, action: 'DescribeConsumerGroup' }\n );\n },\n _.pick(params, 'InstanceId'),\n ['GroupListForMonitor', 'TopicListForMonitor', 'PartitionListForMonitor', 'GroupList']\n );\n // topick数据从DescribeTopic\n const topicList = await fetchAllFactory(\n (data) => {\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data,\n },\n serviceInfo.service,\n { region, action: 'DescribeTopic' }\n );\n },\n _.pick(params, 'InstanceId'),\n ['TopicList']\n );\n consumerGoup[1] = flattenDeep(topicList);\n console.log({ consumerGoup, topicList });\n this.consumerGroupCache[InstanceId] = consumerGoup;\n }\n\n let [GroupList, TopicList, PartitionList, GroupDetailList] = consumerGoup;\n // 无重复数组\n TopicList = _.uniqBy(TopicList, (item) => (item as any).TopicId);\n GroupList = _.uniqBy(GroupList, (item) => (item as any).GroupName);\n PartitionList = _.uniqBy(PartitionList, (item) => (item as any).PartitionId);\n GroupDetailList = _.uniqBy(GroupDetailList, (item) => (item as any).ConsumerGroupName);\n // 如果传入消费者信息,consumergroupname,获取该用户的订阅信息列表\n const SubscribedInfos = GroupDetailList.find((d) => d.ConsumerGroupName === groupname)?.SubscribedInfo || [];\n // 这里为了兼容PartitonList格式,最后转化为数组对象的方式\n const partitions =\n SubscribedInfos.find((sub) => sub.TopicId === topicid)?.Partition?.map((p) => ({\n [templateQueryIdMap.partition]: p,\n })) || [];\n return {\n GroupList,\n TopicList:\n SubscribedInfos.length > 0\n ? SubscribedInfos.map(({ TopicId, TopicName }) => ({ TopicId, TopicName }))\n : TopicList,\n PartitionList: partitions.length > 0 ? partitions : PartitionList,\n };\n }\n formatTopicVarDisplay(topic: Record, displayTpl: string | undefined, topicAlias: string) {\n if (displayTpl) {\n return displayTpl.replace(/\\$\\{(\\w+)\\}/g, (a, b) => {\n if (!b || !this.TopicAliasList.includes(b)) {\n return '';\n }\n return this.getAliasValue(topic, b);\n });\n }\n return this.getAliasValue(topic, topicAlias);\n }\n // 查询指标下的数据\n async fetchMetricData(action: string, region: string, instance: any, query: any) {\n let { topicalias, groupname, topicid } = query;\n const result = await this.getConsumerGroups(region, {\n InstanceId: instance.InstanceId,\n groupname,\n topicid,\n });\n let { display } = query;\n const { TopicList, GroupList, PartitionList } = result;\n topicalias = this.TopicAliasList.includes(topicalias) ? topicalias : this.templateQueryIdMap.topicId;\n\n const rs = {\n GroupList: GroupList.map((group) => {\n group._InstanceAliasValue = group.GroupName;\n return {\n text: group.GroupName,\n value: group[templateQueryIdMap.groupName],\n };\n }),\n TopicList: TopicList.map((topic) => {\n const topicAlias = this.formatTopicVarDisplay(topic, display, topicalias);\n topic._InstanceAliasValue = topicAlias || topic[templateQueryIdMap.topicId];\n return {\n text: topicAlias || topic[templateQueryIdMap.topicId],\n value: topic[templateQueryIdMap.topicId], // 为了获取多维度的值,这里完全可以使用JSON.stringify()将整个对象放进去\n TopicName: topic.TopicName,\n };\n }),\n PartitionList: PartitionList.map((par) => {\n par._InstanceAliasValue = par[templateQueryIdMap.partition];\n return {\n text: par[templateQueryIdMap.partition],\n value: par[templateQueryIdMap.partition],\n };\n }),\n };\n await instanceStorage.setExtraStorage(this.service, this.keyInStorage.TopicList, TopicList);\n await instanceStorage.setExtraStorage(this.service, this.keyInStorage.GroupList, GroupList);\n await instanceStorage.setExtraStorage(this.service, this.keyInStorage.PartitionList, PartitionList);\n // console.log({ res1, res2, res3 });\n // console.log({rs});\n // 根据action返回指定的维度数据列表\n switch (action) {\n case 'DescribeTopicList':\n return rs.TopicList;\n case 'DescribeGroup':\n return rs.GroupList;\n case 'DescribePartion':\n return rs.PartitionList;\n default:\n return [];\n }\n }\n\n // async getOtherAlias(datapoints) {\n // let dimension;\n // for(let j = 0; j < datapoints.Dimensions.length; j++){\n // if(datapoints.Dimensions[j] !== 'InstanceName'){\n // dimension.push(datapoints.Dimensions[j])\n // }\n // }\n // console.log(dimension);\n\n // return dimension\n // }\n}\n","import coreModule from 'grafana/app/core/core_module';\nimport { CKAFKAQueryDescriptor, templateQueryIdMap } from './query_def';\nimport { isTargetEqual } from '../../common/utils';\n\nconst ExtraFields = [\n {\n label: 'ConsumerGroup',\n field: 'consumerGroup',\n },\n {\n label: 'TopicId',\n field: 'topicId',\n },\n {\n label: 'Partition',\n field: 'partition',\n },\n];\n\nexport class CKAFKAQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.CKAFKAQueryDescriptor = CKAFKAQueryDescriptor;\n };\n\n $scope.getDropdown = (field) => {\n switch (field) {\n default:\n return [];\n }\n };\n $scope.onInstanceChange = (n, o) => {\n if (isTargetEqual(n, o, 'LoadBalancerId')) return;\n $scope.target.consumerGroup = '';\n $scope.target.topicId = '';\n $scope.target.topicName = '';\n $scope.target.partition = '';\n };\n $scope.getExtraFields = () => {\n return ExtraFields.filter((item) => item.field in ($scope.dims ?? {}));\n };\n\n $scope.getInstanceId = () => {\n let { instance } = $scope.target;\n instance = $scope.datasource.getServiceFn('ckafka', 'getVariable')(instance);\n if (Array.isArray(instance)) instance = instance[0];\n if (!instance) {\n return '';\n }\n try {\n instance = JSON.parse(instance).InstanceId;\n } catch (error) {\n // console.log();\n }\n return instance;\n };\n\n $scope.getExtraDropdown = async (target, field) => {\n const InstanceId = $scope.getInstanceId();\n const fetcher = $scope.datasource.getServiceFn('ckafka', 'getConsumerGroups');\n const region = $scope.datasource.getServiceFn('ckafka', 'getVariable')(target.region);\n const res = await fetcher(region, { InstanceId, groupname: target.consumerGroup, topicid: target.topicId });\n\n const { TopicList, GroupList, PartitionList } = res;\n const data = {\n GroupList: GroupList.map((group) => {\n group._InstanceAliasValue = group.GroupName;\n return {\n text: group.GroupName,\n value: JSON.stringify(group),\n };\n }),\n TopicList: TopicList.map((topic) => {\n topic._InstanceAliasValue = topic[templateQueryIdMap.topicId];\n return {\n text: topic[templateQueryIdMap.topicId],\n value: JSON.stringify(topic), // 为了获取多维度的值,这里完全可以使用JSON.stringify()将整个对象放进去\n };\n }),\n PartitionList: PartitionList.map((par) => {\n par._InstanceAliasValue = par[templateQueryIdMap.partition];\n return {\n text: String(par[templateQueryIdMap.partition]),\n value: JSON.stringify(par),\n };\n }),\n };\n\n switch (field) {\n case 'consumerGroup':\n return data.GroupList;\n case 'topicId':\n return data.TopicList;\n case 'partition':\n return data.PartitionList;\n }\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n\n
\n`;\n\nexport function scfQuery() {\n return {\n template: template,\n controller: CKAFKAQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n onRefresh: '&',\n dims: '=',\n instance: '=',\n },\n link: (scope, element, attrs) => {\n scope.$watch('target.instance', (newValue, oldValue) => {\n scope.onInstanceChange?.(newValue, oldValue);\n });\n },\n };\n}\ncoreModule.directive('ckafkaQuery', scfQuery);\n","import _ from 'lodash';\n\nexport const CKAFKAQueryDescriptor = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputnumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为10,最小值为1,最大值为100',\n link: '',\n type: 'inputnumber',\n min: 1,\n max: 100,\n },\n {\n key: 'InstanceId',\n enDescriptor: 'InstanceId',\n cnDescriptor: '按照实例ID过滤',\n link: '',\n type: 'input',\n },\n {\n key: 'SearchWord',\n enDescriptor: 'SearchWord',\n cnDescriptor: '按照实例名称过滤,支持模糊查询',\n link: '',\n type: 'input',\n },\n {\n key: 'TagKey',\n enDescriptor: 'TagKey',\n cnDescriptor: '匹配标签key值',\n link: '',\n type: 'input',\n },\n {\n key: 'Status',\n enDescriptor: 'Status',\n cnDescriptor: '实例的状态,不填默认返回全部',\n link: '',\n type: 'select',\n multiple: true,\n list: [\n { text: '创建中', value: 0 },\n { text: '运行中', value: 1 },\n { text: '删除中', value: 2 },\n ],\n },\n];\n\nconst CKAFKA_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'InstanceId',\n topicId: '',\n topicName: '',\n consumerGroup: '',\n partition: '',\n queries: {\n Offset: 0,\n Limit: 10,\n Status: [],\n InstanceId: '',\n SearchWord: '',\n TagKey: '',\n },\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n queries = _.omit(queries, ['Offset', 'Limit']);\n _.forEach(queries, (item: any, key) => {\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n params[key] = _.uniq(item);\n }\n } else if (_.isObject(item)) {\n if (_.isNumber(_.get(item, 'value', undefined)) || !_.isEmpty(_.get(item, 'value', undefined))) {\n params[key] = _.get(item, 'value');\n }\n } else if (_.isNumber(item) || !_.isEmpty(item)) {\n params[key] = item;\n }\n });\n }\n return params;\n}\n\nconst CKAFKAInstanceAliasList = ['InstanceId', 'InstanceName'];\nconst CKAFKATopicAliasList = ['TopicId', 'TopicName'];\n// 保存在模板变量value中的key\nconst templateQueryIdMap = {\n instance: 'InstanceId',\n topicId: 'TopicId',\n groupName: 'GroupName',\n partition: 'PartitionId',\n};\n// 向实例里面塞dimensions对应的值,dimension中的key对应到实例中的key\nconst CKAFKAInvalidDemensions = new Proxy(\n {\n topicId: 'TopicId',\n topicName: 'TopicName',\n consumerGroup: 'GroupName',\n partition: 'PartitionId',\n },\n {\n get: (obj, prop) => {\n if (String(prop).toLocaleLowerCase() === 'instanceid') return 'InstanceId';\n return obj[prop];\n },\n }\n);\n// 需要缓存到storage的内容的key列表\nconst keyInStorage = {\n TopicList: 'TopicList',\n GroupList: 'GroupList',\n PartitionList: 'PartitionList',\n};\n\n/*\n如果有InstanceId额外的维度,原则上都需要传入此map结构配置\nkey的含义:\n 经过InvalidDemensions处理后的string。topicId =》TopicId。\n 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId\nvalue的含义:\n 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、\n 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。\n 默认取通过InvalidDemsion处理后的key\n 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。\n 即:templateQueryIdMap中内容。\n 联合上面2的内容筛选出原始sourceMap\n*/\nconst queryMonitorExtraConfg = {\n TopicId: {\n dim_KeyInStorage: keyInStorage.TopicList,\n dim_KeyInTarget: 'topicId',\n dim_KeyInMap: templateQueryIdMap.topicId,\n },\n // topicName和topicId是同一个storage中的source,所以根据topicId帅选\n TopicName: {\n dim_KeyInStorage: keyInStorage.TopicList,\n dim_KeyInTarget: 'topicId',\n dim_KeyInMap: templateQueryIdMap.topicId,\n },\n GroupName: {\n dim_KeyInStorage: keyInStorage.GroupList,\n dim_KeyInTarget: 'consumerGroup',\n dim_KeyInMap: templateQueryIdMap.groupName,\n },\n PartitionId: {\n dim_KeyInStorage: keyInStorage.PartitionList,\n dim_KeyInTarget: 'partition',\n dim_KeyInMap: templateQueryIdMap.partition,\n },\n};\nexport default CKAFKA_STATE;\nexport {\n CKAFKAInstanceAliasList,\n CKAFKATopicAliasList,\n CKAFKAInvalidDemensions,\n templateQueryIdMap,\n keyInStorage,\n queryMonitorExtraConfg,\n GetInstanceQueryParams as CKAFKAGetInstanceQueryParams,\n};\n","import {\n InstanceAliasList,\n LOADBALANCEListenerAliasList,\n LOADBALANCEServerAliasList,\n LOADBALANCEVALIDDIMENSIONS,\n templateQueryIdMap,\n keyInStorage,\n CANDIATEDIMENSIONS,\n queryMonitorExtraConfg,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\nimport { GetServiceAPIInfo } from '../../common/constants';\nimport { fetchAllFactory } from '../../common/utils';\nimport instanceStorage from '../../common/datasourceStorage';\n\nexport default class DCDatasource extends BaseDatasource {\n // Namespace = namespace;\n InstanceAliasList = InstanceAliasList;\n ListenerAliasList = LOADBALANCEListenerAliasList;\n ServerAliasList = LOADBALANCEServerAliasList;\n CandiateDimensions = CANDIATEDIMENSIONS;\n // InvalidDimensions = LOADBALANCEVALIDDIMENSIONS;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n // InstanceReqConfig = {\n // service: 'clb',\n // action: 'DescribeLoadBalancers',\n // responseField: 'LoadBalancerSet',\n // };\n keyInStorage = keyInStorage;\n queryMonitorExtraConfg = queryMonitorExtraConfg;\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n // getFilterDropdown({ field }) {\n // return super.getRegions();\n // }\n getInvalidDimensions(selfIns: any, tagret: any) {\n if (selfIns.service === 'lbPrivate' || (selfIns.service === 'lbPublic' && tagret.servers))\n return { ...LOADBALANCEVALIDDIMENSIONS, vpcId: 'NumericalVpcId' };\n return LOADBALANCEVALIDDIMENSIONS;\n }\n getInstanceReqConfig(selfIns: any) {\n const res: any = {\n service: 'clb',\n action: 'DescribeLoadBalancers',\n responseField: 'LoadBalancerSet',\n };\n if (selfIns.service === 'lbPrivate' || selfIns.service === 'loadBalance') {\n res.interceptor = {\n request: (param) => ({ ...param, LoadBalancerType: 'INTERNAL' }),\n };\n }\n if (selfIns.service === 'lbPublic') {\n res.interceptor = {\n request: (param) => ({ ...param, LoadBalancerType: 'OPEN' }),\n };\n }\n return res;\n }\n async getListenerList(params: any) {\n const { region, instanceId } = params;\n const serviceInfo = GetServiceAPIInfo(region, 'clb');\n\n // 从分页数据,获取全量数据\n const res = await fetchAllFactory(\n (data) => {\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data,\n },\n serviceInfo.service,\n { region, action: 'DescribeListeners' }\n );\n },\n {\n LoadBalancerId: instanceId,\n },\n 'Listeners'\n );\n const [rs] = res;\n return rs;\n }\n formatVariableDisplay(data: Record, displayTpl: string | undefined, alias: string, aliasList: string[]) {\n if (displayTpl) {\n return displayTpl.replace(/\\$\\{(\\w+)\\}/g, (a, b) => {\n if (!b || !aliasList.includes(b)) {\n return '';\n }\n return this.getAliasValue(data, b);\n });\n }\n return this.getAliasValue(data, alias);\n }\n async getServerList(params: any) {\n const { region, instanceId, listenerId } = params;\n const serviceInfo = GetServiceAPIInfo(region, 'clb');\n\n const res = await this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data: { LoadBalancerId: instanceId, ListenerIds: [listenerId] },\n },\n serviceInfo.service,\n { region, action: 'DescribeTargets' }\n );\n const { Listeners } = res;\n const serversList = _.reduce(\n Listeners,\n (prev, item) => {\n const { Rules, Targets } = item;\n if (!_.isEmpty(Rules)) {\n return _.concat(prev, _.flatten(_.map(Rules, (elem) => (_.isEmpty(elem.Targets) ? [] : elem.Targets))));\n }\n if (!_.isEmpty(Targets)) {\n return _.concat(prev, Targets);\n }\n return prev;\n },\n []\n );\n return serversList;\n }\n async fetchMetricData(action: string, region: string, instance: any, query: any) {\n const { display } = query;\n if (action === 'DescribeListeners') {\n const rs = await this.getListenerList({ region, instanceId: instance[this.templateQueryIdMap.instance] });\n let { listeneralias } = query;\n listeneralias = this.ListenerAliasList.includes(listeneralias) ? listeneralias : this.templateQueryIdMap.listener;\n const result = rs.flatMap((o) => {\n const listenAlias = this.formatVariableDisplay(o, display, listeneralias, this.ListenerAliasList);\n const lisId = o[this.templateQueryIdMap.listener];\n o._InstanceAliasValue = listenAlias || lisId;\n // if (!o[listeneralias]) return [];\n return {\n text: listenAlias || lisId,\n value: lisId,\n };\n });\n await instanceStorage.setExtraStorage(this.service, this.keyInStorage.listener, rs);\n return result;\n }\n if (action === 'DescribeServer' || action === 'DescribeServerPort') {\n const { listenerid, serverprivateip, serveralias } = query;\n const serverPrivateIp = this.getVariable(serverprivateip);\n const serversList = await this.getServerList({\n region,\n instanceId: instance[this.templateQueryIdMap.instance],\n listenerId: this.getVariable(listenerid),\n });\n const serverAlias = this.ServerAliasList.includes(serveralias) ? serveralias : this.templateQueryIdMap.servers;\n const result = _.chain(serversList)\n .filter((item) => {\n if (action === 'DescribeServer') {\n return true;\n }\n return serverPrivateIp === _.get(item, 'PrivateIpAddresses.0');\n })\n .map((item) => {\n const alias = this.formatVariableDisplay(item, display, serverAlias, this.ServerAliasList);\n const id = item[this.templateQueryIdMap.servers][0];\n item._InstanceAliasValue = alias || id;\n return action === 'DescribeServer'\n ? {\n text: alias || id,\n value: id,\n }\n : {\n text: `${_.get(item, 'Port')}`,\n value: _.get(item, 'Port'),\n };\n })\n .value();\n await instanceStorage.setExtraStorage(this.service, this.keyInStorage.servers, serversList);\n return action === 'DescribeServer' ? result : _.uniqBy(result, 'text');\n }\n return [];\n }\n}\n","import coreModule from 'grafana/app/core/core_module';\nimport { get, chain } from 'lodash';\nimport { LOADBALANCEFieldsDescriptor, templateQueryIdMap, namespace } from './query_def';\nimport { GetServiceFromNamespace } from '../../common/constants';\nimport { isTargetEqual } from '../../common/utils';\n\nexport class QueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.LOADBALANCEFieldsDescriptor = LOADBALANCEFieldsDescriptor;\n $scope.serversList = [];\n };\n $scope.onFieldChange = (field) => {\n $scope.onRefresh();\n };\n $scope.onInstanceChange = (n, o) => {\n if (isTargetEqual(n, o, 'InstanceId')) return;\n $scope.target.listener = '';\n $scope.target.servers = '';\n $scope.target.serverPort = '';\n };\n $scope.getVariableId = (data, type) => {\n let variableData = data;\n const service = GetServiceFromNamespace(namespace);\n\n variableData = $scope.datasource.getServiceFn(service, 'getVariable')(variableData);\n if (!variableData) {\n return '';\n }\n try {\n variableData = JSON.parse(variableData)[templateQueryIdMap[type]];\n } catch (error) {\n // console.log();\n }\n return variableData;\n };\n $scope.getExtraDropdown = async (target) => {\n const { instance } = $scope.target;\n const service = GetServiceFromNamespace(namespace);\n const instanceId = $scope.getVariableId(instance, 'instance');\n const region = $scope.datasource.getServiceFn(service, 'getVariable')(target.region);\n const rs = await $scope.datasource.getServiceFn(service, 'getListenerList')({ region, instanceId });\n const result = rs.map((o) => {\n o._InstanceAliasValue = o[templateQueryIdMap.listener];\n return {\n text: o[templateQueryIdMap.listener],\n value: JSON.stringify(o),\n };\n });\n return result;\n };\n $scope.getServersDropdown = async (target) => {\n const { instance, listener } = $scope.target;\n const service = GetServiceFromNamespace(namespace);\n const instanceId = $scope.getVariableId(instance, 'instance');\n const listenerId = $scope.getVariableId(listener, 'listener');\n const region = $scope.datasource.getServiceFn(service, 'getVariable')(target.region);\n const serversList = await $scope.datasource.getServiceFn(\n service,\n 'getServerList'\n )({ region, instanceId, listenerId });\n $scope.serversList = serversList;\n const res = chain(serversList)\n .map((item) => {\n item._InstanceAliasValue = get(item, 'PrivateIpAddresses.0');\n return {\n text: get(item, 'PrivateIpAddresses.0'),\n value: JSON.stringify(item),\n };\n })\n .uniqBy('text')\n .value();\n return res;\n };\n $scope.getServerPortDropdown = async (target) => {\n const { servers } = $scope.target;\n let serverPortList: any[] = [];\n try {\n const serversSource = JSON.parse(servers);\n serverPortList = chain($scope.serversList)\n .filter((item) => get(serversSource, 'PrivateIpAddresses.0') === get(item, 'PrivateIpAddresses.0'))\n .map((item) => {\n item._InstanceAliasValue = get(item, 'Port');\n return {\n text: `${get(item, 'Port')}`,\n value: JSON.stringify(item),\n };\n })\n .value();\n } catch (error) {}\n return serverPortList;\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n
\n\n\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n \n
\n \n \n
\n
\n
\n`;\n\nexport function sQuery() {\n return {\n template: template,\n controller: QueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n namespace: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n onRefresh: '&',\n dims: '=',\n },\n link: (scope, element, attrs) => {\n scope.$watch('target.instance', (newValue, oldValue) => {\n scope.onInstanceChange?.(newValue, oldValue);\n });\n },\n };\n}\ncoreModule.directive('clbQuery', sQuery);\n","import _ from 'lodash';\n\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/LOADBALANCE';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'loadBalanceQuery';\n\nconst ForwardTypes = [\n { text: '通用的负载均衡', value: 1 },\n { text: '传统的负载均衡', value: 0 },\n];\n\nconst OrderBy = [\n { text: 'LoadBalancerName', value: 'LoadBalancerName' },\n { text: 'CreateTime', value: 'CreateTime' },\n { text: 'Domain', value: 'Domain' },\n { text: 'LoadBalancerType', value: 'LoadBalancerType' },\n];\n\nconst OrderType = [\n { text: '升序', value: 0 },\n { text: '降序', value: 1 },\n];\n\nconst WithRs = [\n { text: '没有绑定后端服务', value: 0 },\n { text: '绑定后端服务', value: 1 },\n { text: '查询全部', value: -1 },\n];\nconst LOADBALANCEFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1',\n link: '',\n type: 'inputNumber',\n min: 1,\n },\n {\n key: 'LoadBalancerIds',\n enDescriptor: 'LoadBalancer ID',\n cnDescriptor: '实例ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'LoadBalancerName',\n enDescriptor: 'LoadBalancer Name',\n cnDescriptor: '实例名称',\n link: '',\n type: 'input',\n },\n {\n key: 'Forward',\n enDescriptor: 'Forward',\n cnDescriptor: '负载均衡实例类型',\n link: '',\n type: 'select',\n list: ForwardTypes,\n },\n {\n key: 'Domain',\n enDescriptor: 'Domain',\n cnDescriptor: '域名,腾讯云为负载均衡实例分配的域名,本参数仅对传统型公网负载均衡才有意义',\n link: '',\n type: 'input',\n },\n {\n key: 'LoadBalancerVips',\n enDescriptor: 'LoadBalancer Vips',\n cnDescriptor: '负载均衡实例的 VIP 地址',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'BackendPrivateIps',\n enDescriptor: 'BackendPrivate Ips',\n cnDescriptor: '负载均衡绑定的后端服务的内网 IP',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'BackendPublicIps',\n enDescriptor: 'BackendPublic Ips',\n cnDescriptor: '负载均衡绑定的后端服务的外网 IP',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'ProjectId',\n enDescriptor: 'Project ID',\n cnDescriptor: '负载均衡实例所属的项目 ID',\n link: '',\n type: 'inputNumber',\n },\n {\n key: 'VpcId',\n enDescriptor: 'Vpc ID',\n cnDescriptor: '负载均衡实例所属私有网络',\n link: '',\n type: 'input',\n },\n {\n key: 'SecurityGroup',\n enDescriptor: 'Security Group',\n cnDescriptor: '安全组ID',\n link: '',\n type: 'input',\n },\n {\n key: 'MasterZone',\n enDescriptor: 'Master Zone',\n cnDescriptor: '主可用区ID',\n link: '',\n type: 'input',\n },\n {\n key: 'WithRs',\n enDescriptor: 'WithRs',\n cnDescriptor: '负载均衡是否绑定后端服务',\n link: '',\n type: 'select',\n list: WithRs,\n },\n {\n key: 'OrderBy',\n enDescriptor: 'OrderBy',\n cnDescriptor: '排序字段',\n link: '',\n type: 'select',\n list: OrderBy,\n },\n {\n key: 'OrderType',\n enDescriptor: 'OrderByType',\n cnDescriptor: '排序方式',\n link: '',\n type: 'select',\n list: OrderType,\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/214/30685',\n namespace,\n fieldDescriptor: LOADBALANCEFieldsDescriptor,\n};\nconst LBFields = {\n LoadBalancerIds: [],\n Forward: undefined,\n LoadBalancerName: '',\n Domain: '',\n LoadBalancerVips: [],\n BackendPublicIps: [],\n BackendPrivateIps: [],\n Limit: 20,\n Offset: 0,\n ProjectId: undefined,\n WithRs: {},\n VpcId: '',\n SecurityGroup: '',\n MasterZone: '',\n OrderBy: {},\n OrderType: {},\n};\n\nconst LOADBALANCE_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'LoadBalancerId',\n Port: '',\n Protocol: '',\n listener: '',\n servers: '',\n serverPort: '',\n // listenerAlias: 'ListenerId',\n queries: LBFields,\n};\n\n// function GetInstanceQueryParams(queries: any = {}) {\n// const params: any = {};\n// if (!_.isEmpty(queries)) {\n// params.Limit = _.get(queries, 'Limit', 20) || 20;\n// params.Offset = _.get(queries, 'Offset', 0) || 0;\n// queries = _.omit(queries, ['Offset', 'Limit']);\n// _.forEach(queries, (item: any, key) => {\n// if (_.isArray(item)) {\n// item = _.compact(item);\n// if (item.length > 0) {\n// params[key] = _.uniq(item);\n// }\n// } else if (_.isObject(item)) {\n// if (_.isNumber(_.get(item, 'value', undefined)) || !_.isEmpty(_.get(item, 'value', undefined))) {\n// params[key] = _.get(item, 'value');\n// }\n// } else if (_.isNumber(item) || !_.isEmpty(item)) {\n// params[key] = item;\n// }\n// });\n// }\n// return params;\n// }\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, false);\n}\nconst InstanceAliasList = ['LoadBalancerId', 'LoadBalancerName', 'LoadBalancerVips'];\nconst LOADBALANCEListenerAliasList = ['ListenerId', 'ListenerName', 'Port'];\nconst LOADBALANCEServerAliasList = ['PrivateIpAddresses', 'InstanceId'];\nconst LOADBALANCEVALIDDIMENSIONS = {\n vip: 'LoadBalancerVips',\n // vpcId: 'NumericalVpcId',\n loadBalancerPort: 'Port',\n protocol: 'Protocol',\n lanIp: 'PrivateIpAddresses',\n port: 'ServerPort',\n};\n// 对于ipv6类型,vip应该取AddressIPv6。\nconst CANDIATEDIMENSIONS = {\n LoadBalancerVips: 'AddressIPv6',\n};\n// dimensionObject[item] = { Name: item, Value: '' };\n// const LOADBALANCE_INSTANCE_DIMENSIONOBJECTS = {\n// vip: { Name: 'vip', Value: '' },\n// };\n// const LOADBALANCE_LISTENER_DIMENSIONOBJECTS = {\n// vip: { Name: 'vip', Value: '' },\n// loadBalancerPort: { Name: 'loadBalancerPort', Value: '' },\n// protocol: { Name: 'protocol', Value: '' },\n// };\nconst templateQueryIdMap = {\n instance: 'LoadBalancerId',\n listener: 'ListenerId',\n servers: 'PrivateIpAddresses',\n port: 'Port',\n};\n// 需要缓存到storage的内容的key列表\nconst keyInStorage = {\n listener: 'ListenerList',\n servers: 'ServersList',\n};\n/*\n如果有InstanceId额外的维度,原则上都需要传入此map结构配置\nkey的含义:\n 经过InvalidDemensions处理后的string。topicId =》TopicId。\n 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId\nvalue的含义:\n 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、\n 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。\n 默认取通过InvalidDemsion处理后的key\n 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。\n 即:templateQueryIdMap中内容。\n 联合上面2的内容筛选出原始sourceMap\n*/\nconst queryMonitorExtraConfg = {\n Port: {\n dim_KeyInStorage: keyInStorage.listener,\n dim_KeyInTarget: 'listener',\n dim_KeyInMap: templateQueryIdMap.listener,\n },\n Protocol: {\n dim_KeyInStorage: keyInStorage.listener,\n dim_KeyInTarget: 'listener',\n dim_KeyInMap: templateQueryIdMap.listener,\n },\n PrivateIpAddresses: {\n dim_KeyInStorage: keyInStorage.servers,\n dim_KeyInTarget: 'servers',\n dim_KeyInMap: templateQueryIdMap.servers,\n },\n ServerPort: {\n dim_KeyInStorage: keyInStorage.servers,\n dim_KeyInTarget: 'serverPort',\n dim_KeyInIns: 'Port',\n dim_KeyInMap: templateQueryIdMap.port,\n },\n};\nexport default LOADBALANCE_STATE;\nexport {\n LOADBALANCEFieldsDescriptor,\n InstanceAliasList,\n LOADBALANCEListenerAliasList,\n LOADBALANCEServerAliasList,\n LOADBALANCEVALIDDIMENSIONS,\n templateQueryIdMap,\n CANDIATEDIMENSIONS,\n // LOADBALANCE_LISTENER_DIMENSIONOBJECTS,\n // LOADBALANCE_INSTANCE_DIMENSIONOBJECTS,\n queryMonitorExtraConfg,\n keyInStorage,\n queryEditorConfig,\n namespace,\n queryEditorName,\n GetInstanceQueryParams,\n};\n","import {\n CLSInstanceAliasList,\n CLSInvalidDemensions,\n namespace,\n templateQueryIdMap,\n regionSupported,\n modifyDimensons,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\nimport { t } from '../../../locale';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = CLSInstanceAliasList;\n InvalidDimensions = CLSInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'cls',\n action: 'DescribeTopics',\n responseField: 'Topics',\n };\n\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n // getFilterDropdown({ field }) {\n // return super.getRegions();\n // }\n getRegions() {\n return Promise.resolve(regionSupported.map(({ value }) => ({ value, text: t(value) })));\n }\n // async getInstances(region, params = {}) {\n // const superRes = await super.getInstances(region, params);\n // console.log({ superRes });\n // }\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return _.compact(\n rawSet.map((item) => {\n return modifyDimensons(item);\n })\n );\n }\n}\n","import coreModule from 'grafana/app/core/core_module';\nimport { CLSFilterFieldsDescriptor, queryEditorName } from './query_def';\n\nexport class QueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.GSEFilterFieldsDescriptor = CLSFilterFieldsDescriptor;\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n
\n \n \n
\n
\n
\n
\n`;\n\nexport function sQuery() {\n return {\n template: template,\n controller: QueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n onRefresh: '&',\n dims: '=',\n },\n };\n}\ncoreModule.directive(queryEditorName, sQuery);\n","// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service)\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\nimport _ from 'lodash';\n\nconst namespace = 'QCE/CLS';\nconst queryEditorName = 'clsQuery';\n\nconst CLSInvalidDemensions = {\n // instanceid: 'TopicId',\n};\n\n// 需和文件名对应\nconst CLSInstanceAliasList = ['TopicId', 'TopicName'];\n\nconst templateQueryIdMap = {\n instance: 'TopicId',\n};\n\n// 需要缓存到storage的内容的key列表\n// const keyInStorage = {\n// fleet: 'fleet', // 实例队列\n// queue: 'queueName', // 会话队列\n// };\n/*\n如果有InstanceId额外的维度,原则上都需要传入此map结构配置\nkey的含义:\n 经过InvalidDemensions处理后的string。topicId =》TopicId。\n 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId\nvalue的含义:\n 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、\n 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。\n 默认取通过InvalidDemsion处理后的key\n 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。\n 即:templateQueryIdMap中内容。\n 联合上面2的内容筛选出原始sourceMap\n*/\n// const queryMonitorExtraConfg = {\n// FleetId: {\n// dim_KeyInStorage: keyInStorage.fleet,\n// dim_KeyInTarget: 'FleetId',\n// dim_KeyInMap: templateQueryIdMap.FleetId,\n// },\n// Name: {\n// dim_KeyInStorage: keyInStorage.queue,\n// dim_KeyInTarget: 'Name',\n// dim_KeyInMap: templateQueryIdMap.Name,\n// },\n// };\n// select类型需要注意是{},multi后缀是[],dropdown是''\nconst CLSFilterFields = {\n Limit: 20,\n Offset: 0,\n topicName: [],\n topicId: [],\n logsetName: [],\n logsetId: [],\n tagKey: [],\n 'tag:tagKey': [],\n storageType: {},\n};\n\nconst CLSFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'topicName',\n enDescriptor: 'topicName',\n cnDescriptor: '日志主题名称',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'topicId',\n enDescriptor: 'topicId',\n cnDescriptor: '日志主题ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'logsetName',\n enDescriptor: 'logsetName',\n cnDescriptor: '日志集名称',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'logsetId',\n enDescriptor: 'logsetId',\n cnDescriptor: '日志集ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'tagKey',\n enDescriptor: 'tagKey',\n cnDescriptor: '标签键',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'tag:tagKey',\n enDescriptor: 'tag - tagKey',\n cnDescriptor: '标签键值对',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'storageType',\n enDescriptor: 'storageType',\n cnDescriptor: '日志主题的存储类型',\n link: '',\n type: 'select',\n list: [\n { text: '实时存储', value: 'hot' },\n { text: '离线存储', value: 'cold' },\n ],\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/614/56454',\n namespace,\n fieldDescriptor: CLSFilterFieldsDescriptor,\n};\n\nconst CLS_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'TopicId',\n uin: '',\n queries: CLSFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, true);\n}\n// regions for dropdown\nconst regionSupported = [\n { value: 'ap-bangkok' },\n { value: 'ap-beijing' },\n { value: 'ap-chengdu' },\n { value: 'ap-chongqing' },\n { value: 'ap-guangzhou' },\n { value: 'ap-hongkong' },\n { value: 'ap-jakarta' },\n { value: 'ap-mumbai' },\n { value: 'ap-seoul' },\n { value: 'ap-nanjing' },\n { value: 'ap-shanghai' },\n { value: 'ap-shanghai-fsi' },\n { value: 'ap-shenzhen-fsi' },\n { value: 'ap-singapore' },\n { value: 'ap-tokyo' },\n { value: 'eu-frankfurt' },\n { value: 'eu-moscow' },\n { value: 'na-ashburn' },\n { value: 'na-siliconvalley' },\n { value: 'na-toronto' },\n];\nfunction modifyDimensons(metricItem: any) {\n const metricTmp = _.cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n // item.Dimensions = item.Dimensions.map((v) => CLSInvalidDemensions[v] || v);\n item.Dimensions = ['uin', 'TopicId'];\n });\n return metricTmp;\n}\nexport default CLS_STATE;\nexport {\n CLSFilterFieldsDescriptor,\n templateQueryIdMap,\n CLSInstanceAliasList,\n CLSInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n regionSupported,\n modifyDimensons,\n // queryMonitorExtraConfg,\n // fleetId,\n // keyInStorage,\n // 对应产品的service的全大写拼接GetInstanceQueryParams\n GetInstanceQueryParams as CLSGetInstanceQueryParams,\n};\n","import { BaseDatasource } from '../_base/datasource';\nimport { InvalidDemensions, InstanceAliasList, templateQueryIdMap } from './query_def';\n\nexport default class CmqDatasource extends BaseDatasource {\n InvalidDimensions: Record = InvalidDemensions;\n InstanceAliasList: string[] = InstanceAliasList;\n templateQueryIdMap = templateQueryIdMap;\n InstanceReqConfig = {\n service: 'cmq',\n action: 'DescribeQueueDetail',\n responseField: 'QueueSet',\n };\n\n async getMetrics(region = 'ap-guangzhou') {\n const rawMetric = await super.getMetrics(region);\n return rawMetric.map((metric) => {\n let dims = metric.Dimensions[0].Dimensions;\n dims = Array.from(new Set([...dims, 'queueId', 'queueName']));\n metric.Dimensions[0].Dimensions = dims;\n return metric;\n });\n }\n}\n","import createQuery from '../_base/query';\nimport { InstanceQueryDescriptor } from './query_def';\n\ncreateQuery('cmqQuery', {\n fieldDescriptor: InstanceQueryDescriptor,\n instanceDocUrl: 'https://cloud.tencent.com/document/api/406/42624',\n namespace: 'QCE/CMQ',\n});\n","import _ from 'lodash';\nimport { FildDescriptorType } from '../_base/types';\n\nexport const InstanceQueryDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为10,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 50,\n },\n {\n key: 'QueueName',\n enDescriptor: 'QueueName',\n cnDescriptor: '精确匹配QueueName',\n link: '',\n type: 'input',\n },\n {\n key: 'TagKey',\n enDescriptor: 'TagKey',\n cnDescriptor: '标签搜索',\n link: '',\n type: 'input',\n },\n];\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n queries = _.omit(queries, ['Offset', 'Limit']);\n _.forEach(queries, (item: any, key) => {\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n params[key] = _.uniq(item);\n }\n } else if (_.isObject(item)) {\n if (_.isNumber(_.get(item, 'value', undefined)) || !_.isEmpty(_.get(item, 'value', undefined))) {\n params[key] = _.get(item, 'value');\n }\n } else if (_.isNumber(item) || !_.isEmpty(item)) {\n params[key] = item;\n }\n });\n }\n return params;\n}\n\n// 向实例里面塞dimensions对应的值,dimension中的key对应到实例中的key\nexport const InvalidDemensions = {\n queueId: 'QueueId',\n queueName: 'QueueName',\n};\n\nexport const templateQueryIdMap = {\n instance: 'QueueName',\n};\n\n// 与名称挂钩的变量\nconst InstanceAliasList = ['QueueName', 'QueueId'];\nexport { InstanceAliasList, GetInstanceQueryParams };\n\n// 界面状态模型,default\nexport default {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'QueueName',\n queries: {\n Offset: 0,\n Limit: 20,\n QueueName: '',\n TagKey: '',\n },\n};\n","import { GetServiceAPIInfo } from '../../common/constants';\nimport { fetchAllFactory } from '../../common/utils';\nimport { BaseDatasource } from '../_base/datasource';\nimport {\n InvalidDemensions,\n InstanceAliasList,\n templateQueryIdMap,\n keyInStorage,\n queryMonitorExtraConfg,\n} from './query_def';\nimport instanceStorage from '../../common/datasourceStorage';\n\nexport default class CmqTopicDatasource extends BaseDatasource {\n Namespace = 'QCE/CMQTOPIC';\n InvalidDimensions: Record = InvalidDemensions;\n InstanceAliasList: string[] = InstanceAliasList;\n templateQueryIdMap = templateQueryIdMap;\n InstanceReqConfig = {\n service: 'cmq',\n action: 'DescribeTopicDetail',\n responseField: 'TopicSet',\n };\n keyInStorage = keyInStorage;\n queryMonitorExtraConfg = queryMonitorExtraConfg;\n extraMetricDims = ['subscriptionId']; // 多选\n\n async fetchAllSubscription(region: string, params: any) {\n const serviceInfo = GetServiceAPIInfo(region, 'cmq');\n // console.log(serviceInfo, 'serviceinfo');\n\n // 从分页数据,获取全量数据\n const rs = await fetchAllFactory(\n (data) => {\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data,\n },\n serviceInfo.service,\n { region, action: 'DescribeSubscriptionDetail' }\n );\n },\n params,\n 'SubscriptionSet'\n );\n\n return rs[0];\n }\n\n async fetchMetricData(action: string, region: string, instance: any) {\n let result;\n switch (action) {\n case 'DescribeSubscriptionDetail':\n result = await this.fetchAllSubscription(region, { TopicName: instance.TopicName });\n // eslint-disable-next-line no-case-declarations\n const rs = result.map((item) => {\n item._InstanceAliasValue = item.SubscriptionId;\n return { text: item.SubscriptionId, value: item[templateQueryIdMap.subscription] };\n });\n await instanceStorage.setExtraStorage(this.service, this.keyInStorage.subscriptionId, result);\n return rs;\n default:\n return [];\n }\n }\n\n async getMetrics(region = 'ap-guangzhou') {\n const rawMetric = await super.getMetrics(region);\n return rawMetric.map((metric) => {\n let dims = metric.Dimensions[0].Dimensions;\n dims.push('topicId');\n if (['NumOfNotify', 'NumOfSuccNotify'].includes(metric.MetricName)) {\n dims.push('subscriptionId');\n }\n\n dims = Array.from(new Set(dims));\n metric.Dimensions[0].Dimensions = dims;\n return metric;\n });\n }\n}\n","import coreModule from 'grafana/app/core/core_module';\nimport { InstanceQueryDescriptor } from './query_def';\n\nconst ExtraFields = [\n {\n label: 'Subscription(订阅)',\n field: 'subscriptionId',\n },\n];\n\nexport class CmqTopicQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.InstanceQueryDescriptor = InstanceQueryDescriptor;\n };\n\n $scope.getDropdown = (field) => {\n switch (field) {\n default:\n return [];\n }\n };\n\n // 各个实例下的订阅,由于不想每次都重复发请求,所以这里做了一层缓存,数据结构为{ [instanceId]: { } }\n $scope.cacheMap = {};\n\n $scope.getExtraFields = () => {\n return ExtraFields.filter((item) => item.field in ($scope.dims ?? {}));\n };\n\n $scope.getTopicName = () => {\n let { instance } = $scope.target;\n instance = $scope.datasource.getServiceFn('cmqTopic', 'getVariable')(instance);\n if (!instance) {\n return '';\n }\n try {\n instance = JSON.parse(instance).TopicName;\n } catch (error) {\n // console.log();\n }\n return instance;\n };\n\n $scope.onExtraFieldChange = (field) => {\n $scope.onRefresh();\n };\n\n $scope.getExtraDropdown = async (target, field) => {\n if (field === 'subscriptionId') {\n const TopicName = $scope.getTopicName();\n let data = $scope.cacheMap[TopicName];\n\n if (!data) {\n const region = $scope.datasource.getServiceFn('cmqTopic', 'getVariable')(target.region);\n const fetcher = $scope.datasource.getServiceFn('cmqTopic', 'fetchAllSubscription');\n const datas = await fetcher(region, { TopicName });\n data = datas.map((item) => {\n item._InstanceAliasValue = item.SubscriptionId;\n return { text: item.SubscriptionId, value: JSON.stringify(item) };\n });\n }\n\n // 缓存\n $scope.cacheMap[TopicName] = data;\n return data;\n }\n return [];\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n\n
\n`;\n\nexport function scfQuery() {\n return {\n template: template,\n controller: CmqTopicQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n onRefresh: '&',\n dims: '=',\n },\n };\n}\ncoreModule.directive('cmqTopicQuery', scfQuery);\n","import _ from 'lodash';\nimport { FildDescriptorType } from '../_base/types';\n\nexport const InstanceQueryDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为10,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 50,\n },\n {\n key: 'TopicName',\n enDescriptor: 'TopicName',\n cnDescriptor: '精确匹配TopicName',\n link: '',\n type: 'input',\n },\n {\n key: 'TagKey',\n enDescriptor: 'TagKey',\n cnDescriptor: '标签搜索',\n link: '',\n type: 'input',\n },\n];\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n queries = _.omit(queries, ['Offset', 'Limit']);\n _.forEach(queries, (item: any, key) => {\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n params[key] = _.uniq(item);\n }\n } else if (_.isObject(item)) {\n if (_.isNumber(_.get(item, 'value', undefined)) || !_.isEmpty(_.get(item, 'value', undefined))) {\n params[key] = _.get(item, 'value');\n }\n } else if (_.isNumber(item) || !_.isEmpty(item)) {\n params[key] = item;\n }\n });\n }\n return params;\n}\n\n// 向实例里面塞dimensions对应的值,dimension中的key对应到实例中的key\nexport const InvalidDemensions = {\n topicId: 'TopicId',\n};\n\n// 因为cmq那边,以TopciName为主键\nexport const templateQueryIdMap = {\n instance: 'TopicName',\n subscription: 'SubscriptionId',\n};\n\n// 需要缓存到storage的内容的key列表\nconst keyInStorage = {\n subscriptionId: 'subscriptionId',\n};\n/*\n如果有InstanceId额外的维度,原则上都需要传入此map结构配置\nkey的含义:\n 经过InvalidDemensions处理后的string。topicId =》TopicId。\n 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId\nvalue的含义:\n 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、\n 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。\n 默认取通过InvalidDemsion处理后的key\n 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。\n 即:templateQueryIdMap中内容。\n 联合上面2的内容筛选出原始sourceMap\n*/\nconst queryMonitorExtraConfg = {\n subscriptionId: {\n dim_KeyInStorage: keyInStorage.subscriptionId,\n dim_KeyInTarget: 'subscriptionId',\n dim_KeyInMap: templateQueryIdMap.subscription,\n },\n};\n// 与名称挂钩的变量\nconst InstanceAliasList = ['TopicName', 'TopicId'];\nexport { InstanceAliasList, GetInstanceQueryParams, queryMonitorExtraConfg, keyInStorage };\n\n// 界面状态模型,default\nexport default {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'TopicName',\n subscriptionId: '',\n queries: {\n Offset: 0,\n Limit: 20,\n TopicName: '',\n TagKey: '',\n },\n};\n","import { BaseDatasource } from '../_base/datasource';\n\ninterface BucketListResult {\n Owner: { ID: 'string'; DisplayName: 'string' };\n Buckets: { Name: string; Region: string }[];\n}\n\nexport default class CosDatasource extends BaseDatasource {\n InvalidDimensions: Record = {};\n InstanceAliasList: string[] = ['BucketName'];\n templateQueryIdMap = {\n instance: 'BucketName',\n };\n InstanceReqConfig = {} as any; // 不必要的配置\n cosURL: string;\n\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n this.cosURL = `/api/datasources/${this.instanceSettings.id}/resources/tc_cos_list`;\n }\n async getInstances(region: string) {\n return this.backendSrv\n .datasourceRequest({\n url: this.cosURL,\n method: 'GET',\n params: { region },\n headers: { 'Content-Type': 'application/json' },\n })\n .then((res) => {\n let { data }: { data: BucketListResult } = res;\n data = data || ({} as any);\n let { Buckets } = data;\n Buckets = Buckets || [];\n\n // name contains appid,see detail https://cloud.tencent.com/document/product/436/8291\n return Buckets.map((item) => ({\n ...item,\n BucketName: item.Name,\n bucket: item.Name,\n appid: item.Name.split('-').slice(-1)[0],\n }));\n });\n }\n\n async getVariableInstances(region) {\n return this.getInstances(region);\n }\n}\n","import _ from 'lodash';\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n queries = _.omit(queries, ['Offset', 'Limit']);\n _.forEach(queries, (item: any, key) => {\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n params[key] = _.uniq(item);\n }\n } else if (_.isObject(item)) {\n if (_.isNumber(_.get(item, 'value', undefined)) || !_.isEmpty(_.get(item, 'value', undefined))) {\n params[key] = _.get(item, 'value');\n }\n } else if (_.isNumber(item) || !_.isEmpty(item)) {\n params[key] = item;\n }\n });\n }\n return params;\n}\n\n// 与名称挂钩的变量\nconst InstanceAliasList = ['BucketName'];\nexport { InstanceAliasList, GetInstanceQueryParams };\n\n// 界面状态模型,default\nexport default {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'BucketName',\n queries: {},\n};\n","import {\n CPMInstanceAliasList,\n CPMInvalidDemensions,\n namespace,\n templateQueryIdMap,\n modifyDimensons,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport { GetServiceAPIInfo } from '../../common/constants';\nimport _ from 'lodash';\nimport { t } from '../../../locale';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = CPMInstanceAliasList;\n InvalidDimensions = CPMInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'bm',\n action: 'DescribeDevices',\n responseField: 'DeviceInfoSet',\n };\n RegionMap = {};\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n // 重写getRegion\n getRegions() {\n return this.doRequest(\n {\n url: this.url + '/bm',\n },\n 'bm',\n { action: 'DescribeRegions', region: 'ap-guangzhou' }\n ).then((response) => {\n // 缓存,后面获取可用区zone\n this.RegionMap = _.keyBy(response.RegionInfoSet, 'Region');\n return _.map(response.RegionInfoSet || [], (item) => {\n return {\n text: t(item.Region),\n value: item.Region,\n };\n });\n });\n }\n\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return rawSet.map((item) => modifyDimensons(item));\n }\n\n getFilterDropdown({ field, region }) {\n if (field === 'DeviceClassCode') {\n const serviceInfo = GetServiceAPIInfo(region, 'bm');\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n },\n 'bm',\n { region, action: 'DescribeDeviceClass' }\n ).then((response) => {\n return _.map(response.DeviceClassSet || [], (item) => {\n return { text: item.DeviceClassCode, value: item.DeviceClassCode };\n });\n });\n }\n return [];\n }\n}\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service)\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\nimport _ from 'lodash';\n\nconst namespace = 'QCE/CPM';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'cpmQuery';\n\nconst CPMInvalidDemensions = {\n instanceId: 'InstanceId',\n // uniqid: 'InstanceId',\n};\n\nconst CPMInstanceAliasList = ['InstanceId', 'Name'];\n\nconst templateQueryIdMap = {\n instance: 'InstanceId',\n};\n\n// select类型需要注意是{},multi后缀是[],dropdown是''\nconst CPMFilterFields = {\n Limit: 20,\n Offset: 0,\n DeviceClassCode: '',\n InstanceIds: [],\n WanIps: [],\n LanIps: [],\n Alias: '',\n VagueIp: '',\n AutoRenewFlag: {},\n VpcId: '',\n SubnetId: '',\n DeviceType: {},\n IsLuckyDevice: {},\n};\n\nconst CPMFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'DeviceClassCode',\n enDescriptor: 'DeviceClassCode',\n cnDescriptor: '机型ID',\n link: '',\n type: 'dropdown',\n },\n {\n key: 'InstanceIds',\n enDescriptor: 'InstanceIds',\n cnDescriptor: '设备ID数组',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'WanIps',\n enDescriptor: 'WanIps',\n cnDescriptor: '外网IP数组',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'LanIps',\n enDescriptor: 'LanIps',\n cnDescriptor: '内网IP数组',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'Alias',\n enDescriptor: 'Alias',\n cnDescriptor: '设备名称',\n link: '',\n type: 'input',\n },\n {\n key: 'VagueIp',\n enDescriptor: 'VagueIp',\n cnDescriptor: '模糊IP查询',\n link: '',\n type: 'input',\n },\n {\n key: 'AutoRenewFlag',\n enDescriptor: 'AutoRenewFlag',\n cnDescriptor: '自动续费标志',\n link: '',\n type: 'select',\n list: [\n { text: '不自动续费', value: 0 },\n { text: '自动续费', value: 1 },\n ],\n },\n {\n key: 'VpcId',\n enDescriptor: 'VpcId',\n cnDescriptor: '私有网络唯一ID',\n link: '',\n type: 'input',\n },\n {\n key: 'SubnetId',\n enDescriptor: 'SubnetId',\n cnDescriptor: '子网唯一ID',\n link: '',\n type: 'input',\n },\n {\n key: 'DeviceType',\n enDescriptor: 'DeviceType',\n cnDescriptor: '子网实例ID',\n link: '',\n type: 'select',\n list: [\n { text: '计算型', value: 'compute' },\n { text: '标准型', value: 'standard' },\n { text: '存储型', value: 'storage' },\n ],\n },\n {\n key: 'IsLuckyDevice',\n enDescriptor: 'IsLuckyDevice',\n cnDescriptor: '竞价实例机器过滤',\n link: '',\n type: 'select',\n list: [\n { text: '非竞价实例机器', value: 0 },\n { text: '竞价实例的机器', value: 1 },\n ],\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/386/32904',\n namespace,\n fieldDescriptor: CPMFilterFieldsDescriptor,\n};\n\nconst CPM_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'InstanceId',\n queries: CPMFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, false);\n}\n\nfunction modifyDimensons(metricItem: any) {\n const metricTmp = _.cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n item.Dimensions = ['instanceId'];\n });\n return metricTmp;\n}\nexport default CPM_STATE;\nexport {\n CPMFilterFieldsDescriptor,\n templateQueryIdMap,\n CPMInstanceAliasList,\n CPMInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n modifyDimensons,\n // 对应产品的service的全大写拼接GetInstanceQueryParams\n GetInstanceQueryParams as CPMGetInstanceQueryParams,\n};\n","import _ from 'lodash';\nimport { CVMInstanceAliasList, isValidMetric, modifyDimensons } from './query_def';\nimport { GetServiceAPIInfo } from '../../common/constants';\nimport { BaseDatasource } from '../_base/datasource';\n\nexport default class CVMDatasource extends BaseDatasource {\n Namespace = 'QCE/CVM';\n InstanceAliasList = CVMInstanceAliasList;\n InvalidDimensions = {};\n templateQueryIdMap = {\n instance: 'InstanceId',\n };\n InstanceReqConfig = {\n service: 'cvm',\n action: 'DescribeInstances',\n responseField: 'InstanceSet',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return _.compact(\n rawSet.map((item) => {\n if (isValidMetric(item)) {\n return modifyDimensons(item);\n }\n return null;\n })\n );\n }\n\n getRegions() {\n return this.doRequest(\n {\n url: this.url + '/api',\n data: { Product: 'cvm' },\n },\n 'api',\n { action: 'DescribeRegions' }\n ).then((response) => {\n return _.filter(\n _.map(response.RegionSet || [], (item) => {\n return {\n text: item.RegionName,\n value: item.Region,\n RegionState: item.RegionState,\n };\n }),\n (item) => item.RegionState === 'AVAILABLE'\n );\n });\n }\n\n getZones(region) {\n const serviceInfo = GetServiceAPIInfo(region, 'api');\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data: { Product: 'cvm' },\n },\n serviceInfo.service,\n { region, action: 'DescribeZones' }\n ).then((response) => {\n return _.filter(\n _.map(response.ZoneSet || [], (item) => {\n return { text: item.ZoneName, value: item.Zone, ZoneState: item.ZoneState, Zone: item.Zone };\n }),\n (item) => item.ZoneState === 'AVAILABLE'\n );\n });\n }\n}\n","import coreModule from 'grafana/app/core/core_module';\nimport { CVMFilterFieldsDescriptor } from './query_def';\n\nexport class CVMQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.CVMFilterFieldsDescriptor = CVMFilterFieldsDescriptor;\n };\n\n $scope.onChecked = (srcField, dstField) => {\n if ($scope.target.queries[srcField] === true) {\n $scope.target.queries[dstField] = false;\n }\n $scope.onChange();\n };\n\n $scope.getDropdown = (field) => {\n switch (field) {\n case 'zone':\n return $scope.getZones();\n default:\n return [];\n }\n };\n\n $scope.getZones = () => {\n if (!$scope.region) {\n return [];\n }\n return $scope.datasource.getZones('cvm', $scope.region);\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n \n \n \n
\n
\n\n
\n`;\n\nexport function cvmQuery() {\n return {\n template: template,\n controller: CVMQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n },\n };\n}\n\ncoreModule.directive('cvmQuery', cvmQuery);\n","import _ from 'lodash';\nconst instanceChargeTypes = [\n { text: '预付费', value: 'PREPAID' },\n { text: '后付费', value: 'POSTPAID_BY_HOUR' },\n { text: 'CDH付费', value: 'CDHPAID' },\n];\n\nconst CVMFilterFields = {\n zone: [],\n 'project-id': [],\n 'host-id': [],\n 'vpc-id': [],\n 'subnet-id': [],\n 'instance-id': [],\n 'security-group-id': [],\n 'instance-name': [],\n 'instance-charge-type': {},\n 'private-ip-address': [],\n 'public-ip-address': [],\n 'tag-key': [],\n};\n\nconst CVMFilterFieldsDescriptor = [\n {\n key: 'zone',\n enDescriptor: 'Zone',\n cnDescriptor: '可用区',\n link: '',\n type: 'dropdownmulti',\n },\n {\n key: 'project-id',\n enDescriptor: 'Project ID',\n cnDescriptor: '项目ID',\n link: 'https://cloud.tencent.com/document/api/378/4400',\n type: 'inputNumbermulti',\n },\n {\n key: 'host-id',\n enDescriptor: 'CDH ID',\n cnDescriptor: 'CDH ID',\n link: 'https://cloud.tencent.com/document/product/416/19730',\n type: 'inputmulti',\n },\n {\n key: 'vpc-id',\n enDescriptor: 'VPC ID',\n cnDescriptor: 'VPC ID',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'subnet-id',\n enDescriptor: 'Subnet ID',\n cnDescriptor: '子网ID',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'instance-id',\n enDescriptor: 'Instance ID',\n cnDescriptor: '实例ID',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'security-group-id',\n enDescriptor: 'Security Group ID',\n cnDescriptor: '安全组ID',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'instance-name',\n enDescriptor: 'Instance Name',\n cnDescriptor: '实例名称',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'tag-key',\n enDescriptor: '标签简',\n cnDescriptor: '标签简',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'instance-charge-type',\n enDescriptor: 'Instance Charge Type',\n cnDescriptor: '实例计费模式',\n link: '',\n type: 'select',\n list: instanceChargeTypes,\n },\n {\n key: 'private-ip-address',\n enDescriptor: 'Private IP Address',\n cnDescriptor: '实例主网卡的内网IP',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'public-ip-address',\n enDescriptor: 'Public IP Address',\n cnDescriptor: '实例主网卡的公网IP,包含实例创建时自动分配的IP和实例创建后手动绑定的弹性IP',\n link: '',\n type: 'inputmulti',\n },\n];\n\nconst CVM_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'InstanceId',\n queries: {\n Limit: 20,\n Offset: 0,\n instanceIdsChecked: false,\n filtersChecked: false,\n InstanceIds: [''],\n Filters: { ...CVMFilterFields },\n },\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n if (queries.instanceIdsChecked) {\n if (_.isArray(queries.InstanceIds)) {\n const InstanceIds = _.compact(queries.InstanceIds);\n if (_.uniq(InstanceIds).length > 0) {\n params.InstanceIds = _.uniq(InstanceIds).slice(0, 100);\n }\n }\n } else if (queries.filtersChecked) {\n const Filters: any[] = [];\n _.forEach(queries.Filters, (item: any, key) => {\n if (Filters.length > 9) {\n return;\n }\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n Filters.push({ Name: key, Values: _.uniq(item).slice(0, 5) });\n }\n } else if (_.isObject(item)) {\n if (!_.isEmpty(_.get(item, 'value', []))) {\n Filters.push({ Name: key, Values: _.get(item, 'value', []).slice(0, 5) });\n }\n }\n });\n if (Filters.length > 0) {\n params.Filters = Filters;\n }\n }\n }\n return params;\n}\n\nconst CVMInstanceAliasList = ['InstanceId', 'InstanceName', 'PrivateIpAddresses', 'PublicIpAddresses'];\n\nconst CVMValidMetricsT = [\n 'CPUUsage',\n 'CpuLoadavg',\n 'Cpuloadavg5m',\n 'Cpuloadavg15m',\n 'BaseCpuUsage',\n 'GpuMemTotal',\n 'GpuMemUsage',\n 'GpuMemUsed',\n 'GpuPowDraw',\n 'GpuPowLimit',\n 'GpuPowUsage',\n 'GpuTemp',\n 'GpuUtil',\n 'LanOuttraffic',\n 'LanIntraffic',\n 'LanOutpkg',\n 'LanInpkg',\n 'WanOuttraffic',\n 'WanIntraffic',\n 'WanOutpkg',\n 'WanInpkg',\n 'AccOuttraffic',\n 'TcpCurrEstab',\n 'TimeOffset',\n 'MemUsed',\n 'MemUsage',\n 'CvmDiskUsage',\n 'BaseCpuUsage',\n 'VmDiskReadIops',\n];\n// const CVMInvalidDemensions = {\n// 'vm_uuid': 'InstanceId',\n// 'vmUuid': 'InstanceId',\n// };\n\nconst templateQueryIdMap = {\n instance: 'InstanceId',\n};\nfunction isValidMetric(metric) {\n const CVMValidMetrics = _.map(CVMValidMetricsT, _.toUpper);\n return _.indexOf(CVMValidMetrics, _.toUpper(metric.MetricName)) !== -1;\n}\nfunction modifyDimensons(metricItem) {\n const metricTmp = _.cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n item.Dimensions = ['InstanceId'];\n });\n return metricTmp;\n}\nexport default CVM_STATE;\nexport {\n CVMFilterFieldsDescriptor,\n CVMInstanceAliasList,\n isValidMetric,\n modifyDimensons,\n templateQueryIdMap,\n // CVMInvalidDemensions,\n GetInstanceQueryParams as CVMGetInstanceQueryParams,\n};\n","import {\n CYNOSDBMYSQLInstanceAliasList,\n CYNOSDBInvalidDemensions,\n namespace,\n templateQueryIdMap,\n modifyDimensons,\n checkKeys,\n} from './query_def';\nimport _ from 'lodash';\nimport { BaseDatasource } from '../_base/datasource';\n// import { t } from '../../../locale';\n\nexport default class CYNOSDBMYSQLDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = CYNOSDBMYSQLInstanceAliasList;\n InvalidDimensions = CYNOSDBInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n checkKeys = checkKeys;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'cynosdb',\n action: 'DescribeInstances',\n responseField: 'InstanceSet',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return rawSet.map((item) => modifyDimensons(item));\n }\n // getRegions() {\n // return Promise.resolve(regionSupported.map(({ value }) => ({ value, text: t(value) })));\n // }\n getRegions() {\n return this.doRequest(\n {\n url: this.url + '/api',\n data: { Product: 'cynosdbmysql' },\n },\n 'api',\n { action: 'DescribeRegions' }\n ).then((response) => {\n return _.filter(\n _.map(response.RegionSet || [], (item) => {\n return {\n text: item.RegionName,\n value: item.Region,\n RegionState: item.RegionState,\n };\n }),\n (item) => item.RegionState === 'AVAILABLE'\n );\n });\n }\n // 仅对维度组合是InstanceId的指标,其他指标不支持\n getDefaultInsObj(ins: string) {\n return {\n [templateQueryIdMap.instance]: ins,\n };\n }\n}\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import _ from 'lodash';\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/CYNOSDB_MYSQL';\n\n// 按照驼峰方式命名,和SERVICES保持一致,abcDeF会成为angular组件名字\nconst queryEditorName = 'cynosdbMysqlQuery';\n\nconst cynosdbMysqlFilterFields = {\n Limit: 20,\n Offset: 0,\n OrderBy: {},\n OrderByType: {},\n InstanceIds: [],\n DbType: {},\n // Status: '',\n};\n\nconst cynosdbMysqlFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 1000,\n },\n {\n key: 'InstanceIds',\n enDescriptor: 'InstanceIds',\n cnDescriptor: '实例id列表',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'OrderBy',\n enDescriptor: 'OrderBy',\n cnDescriptor: '排序字段',\n link: '',\n type: 'select',\n list: [\n { text: '创建时间', value: 'CREATETIME' },\n { text: '过期时间', value: 'PERIODENDTIME' },\n ],\n },\n {\n key: 'OrderByType',\n enDescriptor: 'OrderByType',\n cnDescriptor: '排序类型',\n link: '',\n type: 'select',\n list: [\n { text: '升序', value: 'ASC' },\n { text: '降序', value: 'DESC' },\n ],\n },\n {\n key: 'DbType',\n enDescriptor: 'DbType',\n cnDescriptor: '引擎类型',\n link: '',\n type: 'select',\n list: [\n { text: 'MYSQL', value: 'MYSQL' },\n { text: 'POSTGRESQL', value: 'POSTGRESQL' },\n ],\n },\n // {\n // key: 'Status',\n // enDescriptor: 'Status',\n // cnDescriptor: '实例状态',\n // link: '',\n // type: 'input',\n // },\n];\n// regions for dropdown\nconst regionSupported = [\n { value: 'ap-beijing' },\n { value: 'ap-guangzhou' },\n { value: 'ap-nanjing' },\n { value: 'ap-shanghai' },\n];\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/1003/48334',\n namespace,\n fieldDescriptor: cynosdbMysqlFilterFieldsDescriptor,\n};\n\nconst CYNOSDB_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'InstanceId',\n queries: cynosdbMysqlFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, false);\n}\n// 和文件名字一样CYNOSDBMYSQL\nconst CYNOSDBMYSQLInstanceAliasList = ['InstanceId', 'InstanceName'];\n\nconst templateQueryIdMap = {\n instance: 'InstanceId',\n};\n\nconst CYNOSDBInvalidDemensions = {\n instanceid: 'InstanceId',\n instanceId: 'InstanceId',\n};\nconst checkKeys = ['instanceId'];\nfunction modifyDimensons(metricItem) {\n const metricTmp = _.cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n item.Dimensions = ['InstanceId'];\n });\n return metricTmp;\n}\n\nexport default CYNOSDB_STATE;\nexport {\n cynosdbMysqlFilterFieldsDescriptor,\n templateQueryIdMap,\n CYNOSDBMYSQLInstanceAliasList,\n CYNOSDBInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n regionSupported,\n modifyDimensons,\n checkKeys,\n // params前缀为service的全大写\n GetInstanceQueryParams as CYNOSDBMYSQLGetInstanceQueryParams,\n};\n","import { DCInstanceAliasList, DCInvalidDemensions, namespace, modifyDimensons } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = DCInstanceAliasList;\n InvalidDimensions = DCInvalidDemensions;\n templateQueryIdMap = {\n instance: 'DirectConnectId',\n };\n InstanceReqConfig = {\n service: 'dc',\n action: 'DescribeDirectConnects',\n responseField: 'DirectConnectSet',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return rawSet.map((item) => modifyDimensons(item));\n }\n}\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import _ from 'lodash';\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/DC';\nconst queryEditorName = 'dcQuery';\n\nconst DCFilterFields = {\n Limit: 20,\n Offset: 0,\n DirectConnectIds: [],\n};\n\nconst DCFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'DirectConnectIds',\n enDescriptor: 'DirectConnectIds',\n cnDescriptor: '物理专线 ID',\n link: '',\n type: 'inputMulti',\n },\n];\n\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/216/34826',\n namespace,\n fieldDescriptor: DCFilterFieldsDescriptor,\n};\n\nconst DC_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'DirectConnectId',\n queries: DCFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, false);\n}\n\nconst DCInstanceAliasList = ['DirectConnectId', 'DirectConnectName'];\n\nconst templateQueryIdMap = {\n instance: 'DirectConnectId',\n};\n\nconst DCInvalidDemensions = {\n directConnectId: 'DirectConnectId',\n directconnectid: 'DirectConnectId',\n};\nfunction modifyDimensons(metricItem) {\n const metricTmp = _.cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n item.Dimensions = ['directConnectId'];\n });\n return metricTmp;\n}\nexport default DC_STATE;\nexport {\n DCFilterFieldsDescriptor,\n templateQueryIdMap,\n DCInstanceAliasList,\n DCInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n modifyDimensons,\n GetInstanceQueryParams as DCGetInstanceQueryParams,\n};\n","import {\n DCDBInstanceAliasList,\n DCDBInvalidDemensions,\n namespace,\n templateQueryIdMap,\n modifyDimensons,\n keyInStorage,\n queryMonitorExtraConfg,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\nimport { GetServiceAPIInfo } from '../../common/constants';\nimport { fetchAllFactory } from '../../common/utils';\nimport instanceStorage from '../../common/datasourceStorage';\nimport { t } from '../../../locale';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = DCDBInstanceAliasList;\n InvalidDimensions = DCDBInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'dcdb',\n action: 'DescribeDCDBInstances',\n responseField: 'Instances',\n };\n keyInStorage = keyInStorage;\n queryMonitorExtraConfg = queryMonitorExtraConfg;\n extraActionMap = {\n DescribeDCDBShards: {\n service: 'dcdb',\n action: 'DescribeDCDBShards',\n responseField: 'Shards',\n pickKey: 'ShardInstanceId',\n },\n DescribeDCDBInstanceNodeInfo: {\n service: 'dcdb',\n action: 'DescribeDCDBInstanceNodeInfo',\n responseField: 'NodesInfo',\n pickKey: 'NodeId',\n },\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n // 重写getRegion, 入参的region用广州\n getRegions() {\n return this.doRequest(\n {\n url: this.url + '/dcdb',\n },\n 'dcdb',\n { action: 'DescribeDCDBSaleInfo', region: 'ap-guangzhou' }\n ).then((response) => {\n return _.map(response.RegionList || [], (item) => {\n return {\n text: t(item.Region),\n value: item.Region,\n RegionState: item.RegionState,\n };\n });\n });\n }\n\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return _.compact(\n rawSet.map((item) => {\n return modifyDimensons(item);\n })\n );\n }\n async getConsumerList(params: any) {\n const { region, action: act, payload } = params;\n const { service, action, responseField } = this.extraActionMap[act];\n\n const serviceInfo = GetServiceAPIInfo(region, service);\n\n // 从分页数据,获取全量数据\n const rs = await fetchAllFactory(\n (data) => {\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data,\n },\n serviceInfo.service,\n { region, action }\n );\n },\n payload,\n responseField\n );\n return rs[0];\n }\n async fetchMetricData(action: string, region: string, instance: any, query: any) {\n const payload: any = {\n InstanceId: instance[this.templateQueryIdMap.instance],\n Limit: 100,\n };\n if (Object.keys(this.extraActionMap).indexOf(action) !== -1) {\n const rs = await this.getConsumerList({ region, action, payload });\n const { pickKey } = this.extraActionMap[action];\n const result = rs.map((o) => {\n o._InstanceAliasValue = o[this.templateQueryIdMap[pickKey]];\n return {\n text: o[this.templateQueryIdMap[pickKey]],\n value: o[this.templateQueryIdMap[pickKey]],\n };\n });\n await instanceStorage.setExtraStorage(this.service, this.keyInStorage[pickKey], rs);\n return result;\n }\n return [];\n }\n}\n","import coreModule from 'grafana/app/core/core_module';\nimport { DCDBFilterFieldsDescriptor, queryEditorName, namespace, templateQueryIdMap } from './query_def';\nimport { GetServiceFromNamespace } from '../../common/constants';\n\nconst ExtraFields = [\n {\n label: 'nodeid',\n field: 'NodeId',\n action: 'DescribeDCDBInstanceNodeInfo',\n },\n {\n label: 'shardid',\n field: 'ShardId',\n action: 'DescribeDCDBShards',\n },\n];\nconst dropdownTextConfig = {\n DescribeDCDBInstanceNodeInfo: 'NodeId',\n DescribeDCDBShards: 'ShardInstanceId',\n};\nexport class QueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.DCDBFilterFieldsDescriptor = DCDBFilterFieldsDescriptor;\n $scope.ExtraFields = ExtraFields;\n $scope.namespace = namespace;\n };\n\n $scope.getInstanceId = () => {\n let { instance } = $scope.target;\n const service = GetServiceFromNamespace($scope.namespace);\n instance = $scope.datasource.getServiceFn(service, 'getVariable')(instance);\n if (!instance) {\n return '';\n }\n try {\n instance = JSON.parse(instance)[templateQueryIdMap.instance];\n } catch (error) {\n // console.log();\n }\n return instance;\n };\n $scope.getExtraFields = () => {\n return ExtraFields.filter((item) => item.field in ($scope.dims ?? {}) || item.label in ($scope.dims ?? {}));\n };\n $scope.getExtraDropdown = async (target, action) => {\n const service = GetServiceFromNamespace($scope.namespace);\n const region = $scope.datasource.getServiceFn(service, 'getVariable')(target.region);\n const instanceId = $scope.getInstanceId();\n const payload: any = {\n InstanceId: instanceId,\n Limit: 100,\n };\n const rs = await $scope.datasource.getServiceFn(service, 'getConsumerList')({ region, action, payload });\n\n const result = rs.map((o) => {\n o._InstanceAliasValue = o[templateQueryIdMap[dropdownTextConfig[action]]];\n return {\n text: o[templateQueryIdMap[dropdownTextConfig[action]]],\n value: JSON.stringify(o),\n };\n });\n return result;\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n`;\n\nexport function sQuery() {\n return {\n template: template,\n controller: QueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n onRefresh: '&',\n dims: '=',\n },\n };\n}\ncoreModule.directive(queryEditorName, sQuery);\n","// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service)\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { isArray, cloneDeep } from 'lodash';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/TDMYSQL';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'dcdbQuery';\n\nconst DCDBInvalidDemensions = {\n nodeid: 'NodeId',\n instanceid: 'InstanceId',\n shardid: 'ShardInstanceId',\n ShardId: 'ShardInstanceId',\n};\n\n// 需和文件名对应\nconst DCDBInstanceAliasList = ['InstanceId', 'InstanceName'];\n\nconst templateQueryIdMap = {\n instance: 'InstanceId',\n NodeId: 'NodeId',\n ShardInstanceId: 'ShardInstanceId',\n};\n\n// select类型需要注意是{},multi后缀是[],dropdown是''\nconst DCDBFilterFields = {\n Limit: 20,\n Offset: 0,\n InstanceIds: [],\n SearchName: '',\n SearchKey: '',\n ProjectIds: [],\n // IsFilterVpc\n VpcId: '',\n SubnetId: '',\n\n OrderBy: {},\n OrderByType: {},\n // IsFilterExcluster: {},\n ExclusterType: {},\n\n ExclusterIds: [],\n FilterInstanceType: {},\n};\n\nconst DCDBFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'InstanceIds',\n enDescriptor: 'InstanceIds',\n cnDescriptor: '实例 ID 查询',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'SearchName',\n enDescriptor: 'SearchName',\n cnDescriptor: '搜索的字段名,当前支持的值有:instancename、vip、all',\n link: '',\n type: 'input',\n },\n {\n key: 'SearchKey',\n enDescriptor: 'SearchKey',\n cnDescriptor: '搜索的关键字',\n link: '',\n type: 'input',\n },\n {\n key: 'ProjectIds',\n enDescriptor: 'ProjectIds',\n cnDescriptor: '按项目 ID 查询',\n link: '',\n type: 'inputNumberMulti',\n },\n {\n key: 'VpcId',\n enDescriptor: 'VpcId',\n cnDescriptor: '私有网络 ID',\n link: '',\n type: 'input',\n },\n {\n key: 'SubnetId',\n enDescriptor: 'SubnetId',\n cnDescriptor: '私有网络的子网 ID',\n link: '',\n type: 'input',\n },\n {\n key: 'OrderBy',\n enDescriptor: 'OrderBy',\n cnDescriptor: '排序字段',\n link: '',\n type: 'select',\n list: [\n { text: 'projectId', value: 'projectId' },\n { text: 'createtime', value: 'createtime' },\n { text: 'instancename', value: 'instancename' },\n ],\n },\n {\n key: 'OrderByType',\n enDescriptor: 'OrderByType',\n cnDescriptor: '私有网络 ID',\n link: '',\n type: 'select',\n list: [\n { text: 'desc', value: 'desc' },\n { text: 'asc', value: 'asc' },\n ],\n },\n {\n key: 'ExclusterType',\n enDescriptor: 'ExclusterType',\n cnDescriptor: '集群类型',\n link: '',\n type: 'select',\n list: [\n { text: '非独享集群', value: 1 },\n { text: '独享集群', value: 2 },\n { text: '全部', value: 0 },\n { text: 'asc', value: 'asc' },\n ],\n },\n {\n key: 'ExclusterIds',\n enDescriptor: 'ExclusterIds',\n cnDescriptor: '独享集群ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'FilterInstanceType',\n enDescriptor: 'FilterInstanceType',\n cnDescriptor: '实例类型过滤',\n link: '',\n type: 'select',\n multiple: true,\n list: [\n { text: '独享实例', value: 1 },\n { text: '主实例', value: 2 },\n { text: '灾备实例', value: 3 },\n ],\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/557/16140',\n namespace,\n fieldDescriptor: DCDBFilterFieldsDescriptor,\n};\n\nconst DCDB_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'InstanceId',\n ShardId: '',\n NodeId: '',\n queries: DCDBFilterFields,\n};\nconst modifyMetricConf = {\n shardid: 'ShardId',\n instanceid: 'InstanceId',\n nodeid: 'NodeId',\n};\nfunction modifyDimensons(metricItem: any) {\n const metricTmp = cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n item.Dimensions = item.Dimensions.map((v) => modifyMetricConf[v] || v);\n });\n return metricTmp;\n}\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params = instanceQueryParamsBaseParse(queries, false);\n // 特殊处理\n params.IsFilterVpc = false;\n params.IsFilterExcluster = false;\n if (params.VpcId || params.SubnetId) params.IsFilterVpc = true;\n if (params.ExclusterType) params.IsFilterExcluster = true;\n if (isArray(params.FilterInstanceType)) params.FilterInstanceType = params.FilterInstanceType.join(',');\n return params;\n}\n// 需要缓存到storage的内容的key列表\nconst keyInStorage = {\n NodeId: 'NodeId',\n ShardInstanceId: 'ShardId',\n};\n/*\n如果有InstanceId额外的维度,原则上都需要传入此map结构配置\nkey的含义:\n 经过InvalidDemensions处理后的string。topicId =》TopicId。\n 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId\nvalue的含义:\n 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、\n 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。\n 默认取通过InvalidDemsion处理后的key\n 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。\n 即:templateQueryIdMap中内容。\n 联合上面2的内容筛选出原始sourceMap\n*/\nconst queryMonitorExtraConfg = {\n NodeId: {\n dim_KeyInStorage: keyInStorage.NodeId,\n dim_KeyInTarget: 'NodeId',\n dim_KeyInMap: templateQueryIdMap.NodeId,\n },\n ShardInstanceId: {\n dim_KeyInStorage: keyInStorage.ShardInstanceId,\n dim_KeyInTarget: 'ShardId',\n dim_KeyInMap: templateQueryIdMap.ShardInstanceId,\n },\n};\n// 和其他产品的展示保持一致\nconst regionSupported = [\n { text: '华北地区(北京)', value: 'ap-beijing' },\n { text: '西南地区(成都)', value: 'ap-chengdu' },\n { text: '西南地区(重庆)', value: 'ap-chongqing' },\n { text: '华南地区(广州)', value: 'ap-guangzhou' },\n { text: '港澳台地区(中国香港)', value: 'ap-hongkong' },\n { text: '亚太南部(孟买)', value: 'ap-mumbai' },\n { text: '华东地区(南京)', value: 'ap-nanjing' },\n { text: '华东地区(上海)', value: 'ap-shanghai' },\n { text: '华东地区(上海金融)', value: 'ap-shanghai-fsi' },\n { text: '华南地区(深圳金融)', value: 'ap-shenzhen-fsi' },\n { text: '亚太东南(新加坡)', value: 'ap-singapore' },\n { text: '亚太东北(东京)', value: 'ap-tokyo' },\n { text: '欧洲地区(法兰克福)', value: 'eu-frankfurt' },\n { text: '美国东部(弗吉尼亚)', value: 'na-ashburn' },\n { text: '美国西部(硅谷)', value: 'na-siliconvalley' },\n { text: '北美地区(多伦多)', value: 'na-toronto' },\n];\nexport default DCDB_STATE;\nexport {\n DCDBFilterFieldsDescriptor,\n templateQueryIdMap,\n DCDBInstanceAliasList,\n DCDBInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n regionSupported,\n keyInStorage,\n modifyDimensons,\n queryMonitorExtraConfg,\n // 对应产品的service的全大写拼接GetInstanceQueryParams\n GetInstanceQueryParams as DCDBGetInstanceQueryParams,\n};\n","import { DCGInstanceAliasList, DCGInvalidDemensions, namespace, templateQueryIdMap } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = DCGInstanceAliasList;\n InvalidDimensions = DCGInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'vpc',\n action: 'DescribeDirectConnectGateways',\n responseField: 'DirectConnectGatewaySet',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n}\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import _ from 'lodash';\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/DCG';\nconst queryEditorName = 'dcgQuery';\n\nconst DCGInvalidDemensions = {\n directConnectGatewayId: 'DirectConnectGatewayId',\n};\n\nconst DCGInstanceAliasList = ['DirectConnectGatewayId', 'DirectConnectGatewayName'];\n\nconst templateQueryIdMap = {\n instance: 'DirectConnectGatewayId',\n};\n\n// select类型需要注意是{},multi后缀是[]\nconst DCGFilterFields = {\n Limit: 20,\n Offset: 0,\n 'direct-connect-gateway-id': [],\n 'direct-connect-gateway-name': [],\n 'direct-connect-gateway-ip': [],\n 'gateway-type': {},\n 'network-type': {},\n 'ccn-id': [],\n 'vpc-id': [],\n};\n\nconst DCGFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'direct-connect-gateway-id',\n enDescriptor: 'direct-connect-gateway-id',\n cnDescriptor: '专线网关唯一ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'direct-connect-gateway-name',\n enDescriptor: 'direct-connect-gateway-name',\n cnDescriptor: '专线网关名称',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'direct-connect-gateway-ip',\n enDescriptor: 'direct-connect-gateway-ip',\n cnDescriptor: '专线网关IP',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'gateway-type',\n enDescriptor: 'gateway-type',\n cnDescriptor: '网关类型',\n link: '',\n type: 'select',\n multiple: true,\n list: [\n { text: '普通型', value: 'NORMAL' },\n { text: 'NAT型', value: 'NAT' },\n ],\n },\n {\n key: 'network-type',\n enDescriptor: 'network-type',\n cnDescriptor: '网络类型',\n link: '',\n type: 'select',\n multiple: true,\n list: [\n { text: '私有网络类型', value: 'VPC' },\n { text: '云联网类型', value: 'CCN' },\n ],\n },\n {\n key: 'ccn-id',\n enDescriptor: 'ccn-id',\n cnDescriptor: '专线网关所在云联网ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'vpc-id',\n enDescriptor: 'vpc-id',\n cnDescriptor: '专线网关所在私有网络ID',\n link: '',\n type: 'inputMulti',\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/215/30644',\n namespace,\n fieldDescriptor: DCGFilterFieldsDescriptor,\n};\n\nconst DCG_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'DirectConnectGatewayId',\n queries: DCGFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, true);\n}\nexport default DCG_STATE;\nexport {\n DCGFilterFieldsDescriptor,\n templateQueryIdMap,\n DCGInstanceAliasList,\n DCGInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n GetInstanceQueryParams as DCGGetInstanceQueryParams,\n};\n","import { DCXInstanceAliasList, DCXInvalidDemensions, namespace, modifyDimensons } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\n\nexport default class DCXDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = DCXInstanceAliasList;\n InvalidDimensions = DCXInvalidDemensions;\n templateQueryIdMap = {\n instance: 'DirectConnectTunnelId',\n };\n InstanceReqConfig = {\n service: 'dc',\n action: 'DescribeDirectConnectTunnels',\n responseField: 'DirectConnectTunnelSet',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return rawSet.map((item) => modifyDimensons(item));\n }\n}\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import _ from 'lodash';\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/DCX';\nconst queryEditorName = 'dcxQuery';\n\nconst DCXFilterFields = {\n 'direct-connect-tunnel-name': [],\n 'direct-connect-tunnel-id': [],\n 'direct-connect-id': [],\n};\n\nconst DCXFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'direct-connect-tunnel-name',\n enDescriptor: 'direct-connect-tunnel-name',\n cnDescriptor: '专用通道名称',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'direct-connect-tunnel-id',\n enDescriptor: 'direct-connect-tunnel-id',\n cnDescriptor: '专用通道实例ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'direct-connect-id',\n enDescriptor: 'direct-connect-id',\n cnDescriptor: '物理专线实例ID',\n link: '',\n type: 'inputMulti',\n },\n];\n\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/216/19819',\n namespace,\n fieldDescriptor: DCXFilterFieldsDescriptor,\n};\n\nconst DCX_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'DirectConnectTunnelId',\n queries: {\n Limit: 20,\n Offset: 0,\n ...DCXFilterFields,\n },\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, true);\n}\n\nconst DCXInstanceAliasList = ['DirectConnectTunnelId', 'DirectConnectTunnelName'];\n\nconst templateQueryIdMap = {\n instance: 'DirectConnectTunnelId',\n};\n\nconst DCXInvalidDemensions = {\n directconnectconnid: 'DirectConnectTunnelId',\n directConnectConnId: 'DirectConnectTunnelId',\n};\nfunction modifyDimensons(metricItem) {\n const metricTmp = _.cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n item.Dimensions = ['directConnectConnId'];\n });\n return metricTmp;\n}\nexport default DCX_STATE;\nexport {\n DCXFilterFieldsDescriptor,\n templateQueryIdMap,\n DCXInstanceAliasList,\n DCXInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n modifyDimensons,\n GetInstanceQueryParams as DCXGetInstanceQueryParams,\n};\n","import { BaseDatasource } from '../_base/datasource';\nimport {\n ECDNInstanceAliasList,\n ECDNInvalidDemensions,\n modifyDimensons,\n namespace,\n templateQueryIdMap,\n} from './query_def';\n\nexport default class ECDNDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = ECDNInstanceAliasList;\n InvalidDimensions = ECDNInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n InstanceReqConfig = {\n service: 'ecdn',\n action: 'DescribeDomains',\n responseField: 'Domains',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return rawSet.map((item) => modifyDimensons(item));\n }\n}\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import { cloneDeep, compact, forEach, get, isArray, isEmpty, isObject, omit, uniq } from 'lodash';\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\n\nconst namespace = 'QCE/DSA';\nconst queryEditorName = 'ecdnQuery';\n\nconst ECDNInstanceAliasList = ['Domain'];\n\nconst templateQueryIdMap = {\n instance: 'Domain',\n};\n\nconst ECDNInvalidDemensions = {\n domain: 'Domain',\n projectid: 'ProjectId',\n};\n\nconst ECDN_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'Domain',\n queries: {\n Limit: 100,\n Offset: 0,\n origin: [],\n domain: [],\n resourceId: [],\n status: [],\n disable: [],\n projectId: [],\n fullUrlCache: [],\n https: [],\n originPullProtocol: [],\n area: [],\n tagKey: [],\n },\n};\n\nconst ECDNFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'origin',\n enDescriptor: 'Origin',\n cnDescriptor: '主源站',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'domain',\n enDescriptor: 'Domain',\n cnDescriptor: '域名',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'resourceId',\n enDescriptor: 'ResourceId',\n cnDescriptor: '域名id',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'status',\n enDescriptor: 'Status',\n cnDescriptor: '域名状态',\n link: '',\n type: 'select',\n list: [\n { text: 'online', value: 'online' },\n { text: 'offline', value: 'offline' },\n { text: 'processing', value: 'processing' },\n ],\n },\n {\n key: 'disable',\n enDescriptor: 'Disable',\n cnDescriptor: '域名封禁状态',\n link: '',\n type: 'select',\n list: [\n { text: 'normal', value: 'normal' },\n { text: 'unlicensed', value: 'unlicensed' },\n ],\n },\n {\n key: 'projectId',\n enDescriptor: 'ProjectId',\n cnDescriptor: '项目ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'fullUrlCache',\n enDescriptor: 'FullUrlCache',\n cnDescriptor: '全路径缓存',\n link: '',\n type: 'select',\n list: [\n { text: 'on', value: 'on' },\n { text: 'off', value: 'off' },\n ],\n },\n {\n key: 'https',\n enDescriptor: 'Https',\n cnDescriptor: '是否配置https',\n link: '',\n type: 'select',\n list: [\n { text: 'on', value: 'on' },\n { text: 'off', value: 'off' },\n { text: 'processing', value: 'processing' },\n ],\n },\n {\n key: 'originPullProtocol',\n enDescriptor: 'OriginPullProtocol',\n cnDescriptor: '回源协议类型',\n link: '',\n type: 'select',\n list: [\n { text: 'http', value: 'http' },\n { text: 'https', value: 'https' },\n { text: 'follow', value: 'follow' },\n ],\n },\n {\n key: 'area',\n enDescriptor: 'Area',\n cnDescriptor: '加速区域',\n link: '',\n type: 'select',\n list: [\n { text: 'mainland', value: 'mainland' },\n { text: 'overseas', value: 'overseas' },\n { text: 'global', value: 'global' },\n ],\n },\n {\n key: 'tagKey',\n enDescriptor: 'TagKey',\n cnDescriptor: '标签键',\n link: '',\n type: 'inputMulti',\n },\n];\n\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/570/42462',\n namespace,\n fieldDescriptor: ECDNFilterFieldsDescriptor,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!isEmpty(queries)) {\n params.Limit = get(queries, 'Limit', 20) || 20;\n params.Offset = get(queries, 'Offset', 0) || 0;\n const _queries = omit(queries, ['Offset', 'Limit']);\n const Filters: any[] = [];\n forEach(_queries, (item: any, key) => {\n if (isArray(item)) {\n item = compact(item);\n if (item.length > 0) {\n Filters.push({ Name: key, Value: uniq(item).slice(0, 5) });\n }\n } else if (isObject(item)) {\n if (!isEmpty(get(item, 'value', []))) {\n Filters.push({ Name: key, Value: [get(item, 'value', [])].slice(0, 5) });\n }\n }\n });\n if (Filters.length > 0) {\n params.Filters = Filters.map((item) => {\n if (item.Name === 'domain') {\n return { ...item, Fuzzy: true };\n }\n return item;\n });\n return params;\n }\n }\n return params;\n}\n\nfunction modifyDimensons(metricItem) {\n const metricTmp = cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n item.Dimensions = ['domain', 'projectid'];\n });\n return metricTmp;\n}\n\nexport default ECDN_STATE;\n\nexport {\n ECDNFilterFieldsDescriptor,\n templateQueryIdMap,\n ECDNInstanceAliasList,\n ECDNInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n modifyDimensons,\n GetInstanceQueryParams as ECDNGetInstanceQueryParams,\n};\n","import {\n ECMInstanceAliasList,\n ECMInvalidDemensions,\n namespace,\n templateQueryIdMap,\n modifyDimensons,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = ECMInstanceAliasList;\n InvalidDimensions = ECMInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'ecm',\n action: 'DescribeInstances',\n responseField: 'InstanceSet',\n };\n MetricReqConfig = {\n resultFilter: modifyDimensons,\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n async metricFindQuery(query: any, regex?: string) {\n return super.metricFindQuery({ ...query, ...{ region: 'ap-guangzhou' } }, regex);\n }\n}\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import * as _ from 'lodash';\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/ECM';\nconst queryEditorName = 'ecmQuery';\n\nconst ECMInvalidDemensions = {\n // diskId: 'InstanceId',\n uuid: 'UUID',\n // unInstanceId: 'InstanceId',\n};\n\nconst ECMInstanceAliasList = ['InstanceId', 'InstanceName'];\n\nconst templateQueryIdMap = {\n instance: 'InstanceId',\n};\n\n// select类型需要注意是{},multi后缀是[]\nconst ECMFilterFields = {\n Limit: 20,\n Offset: 0,\n zone: [],\n 'zone-name': [],\n 'module-id': [],\n 'module-name': [],\n 'instance-id': [],\n 'instance-name': [],\n 'ip-address': [],\n 'instance-uuid': [],\n 'instance-state': {},\n 'internet-service-provider': [],\n 'instance-family': [],\n 'image-id': [],\n 'vpc-id': [],\n 'subnet-id': [],\n};\n\nconst ECMFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'zone',\n enDescriptor: 'zone',\n cnDescriptor: '可用区英文标识',\n link: '',\n type: 'dropdownMulti',\n },\n {\n key: 'zone-name',\n enDescriptor: 'zone-name',\n cnDescriptor: '排列顺序',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'module-id',\n enDescriptor: 'module-id',\n cnDescriptor: '模块ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'module-name',\n enDescriptor: 'module-name',\n cnDescriptor: '模块名称',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'instance-id',\n enDescriptor: 'instance-id',\n cnDescriptor: '实例ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'instance-name',\n enDescriptor: 'instance-name',\n cnDescriptor: '实例名称',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'ip-address',\n enDescriptor: 'ip-address',\n cnDescriptor: '内网/公网IP',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'instance-uuid',\n enDescriptor: 'instance-uuid',\n cnDescriptor: '实例uuid',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'instance-state',\n enDescriptor: 'instance-state',\n cnDescriptor: '实例状态',\n link: '',\n type: 'select',\n multiple: true,\n list: [\n { text: '创建中', value: 'PENDING' },\n { text: '创建失败', value: 'LAUNCH_FAILED' },\n { text: '运行中', value: 'RUNNING' },\n { text: '关机', value: 'STOPPED' },\n { text: '开机中', value: 'STARTING' },\n { text: '关机中', value: 'STOPPING' },\n { text: '重启中', value: 'REBOOTING' },\n { text: '停止待销毁', value: 'SHUTDOWN' },\n { text: '销毁中', value: 'TERMINATING' },\n ],\n },\n {\n key: 'internet-service-provider',\n enDescriptor: 'internet-service-provider',\n cnDescriptor: '公网IP所属的运营商',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'instance-family',\n enDescriptor: 'instance-family',\n cnDescriptor: '机型family',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'image-id',\n enDescriptor: 'image-id',\n cnDescriptor: '镜像ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'vpc-id',\n enDescriptor: 'vpc-id',\n cnDescriptor: '实例的vpc id',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'subnet-id',\n enDescriptor: 'subnet-id',\n cnDescriptor: '实例的subnet id',\n link: '',\n type: 'inputMulti',\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/1108/42565',\n namespace,\n fieldDescriptor: ECMFilterFieldsDescriptor,\n};\n\nconst ECM_STATE = {\n region: 'ap-guangzhou',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'InstanceId',\n queries: ECMFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, true);\n}\n// function isValidMetric(metricObj: any = {}) {\n// const dimension = _.get(metricObj, 'Dimensions[0].Dimensions');\n// // console.log('dimension', dimension, dimension.length === 1 && _.indexOf(dimension, 'diskId') !== -1);\n// return dimension.length === 1 &&( _.indexOf(dimension, 'UUID') !== -1 || _.indexOf(dimension, 'uuid') !== -1);\n// }\n\nfunction modifyDimensons(metricItem: any) {\n const metricTmp = _.cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n item.Dimensions = ['UUID'];\n });\n return metricTmp;\n}\nexport default ECM_STATE;\nexport {\n ECMFilterFieldsDescriptor,\n templateQueryIdMap,\n ECMInstanceAliasList,\n ECMInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n modifyDimensons,\n GetInstanceQueryParams as ECMGetInstanceQueryParams,\n};\n","import {\n ECMBLOCKSTORAGEInstanceAliasList,\n ECMBLOCKSTORAGEInvalidDemensions,\n namespace,\n templateQueryIdMap,\n queryMonitorExtraConfg,\n keyInStorage,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\nimport instanceStorage from '../../common/datasourceStorage';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = ECMBLOCKSTORAGEInstanceAliasList;\n InvalidDimensions = ECMBLOCKSTORAGEInvalidDemensions;\n queryMonitorExtraConfg = queryMonitorExtraConfg;\n templateQueryIdMap = templateQueryIdMap;\n keyInStorage = keyInStorage;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'ecm',\n action: 'DescribeInstances',\n responseField: 'InstanceSet',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n async getDiskList(params: any) {\n const { payload } = params;\n const { InstanceId } = payload;\n const instanceCache = await instanceStorage.getInstance(this.service);\n const instanceObj: any =\n _.cloneDeep(instanceCache.find((item) => item[this.templateQueryIdMap.instance] === InstanceId)) ?? {};\n const { DataDisks: dataDisks } = instanceObj;\n return dataDisks;\n }\n async fetchMetricData(action: string, region: string, instance: any, query: any) {\n const payload: any = {\n InstanceId: instance,\n Limit: 100,\n };\n const rs = await this.getDiskList({ region, action, payload });\n const result = rs.map((o) => {\n o._InstanceAliasValue = o[this.templateQueryIdMap.diskId];\n return {\n text: o[this.templateQueryIdMap.diskId],\n value: o[this.templateQueryIdMap.diskId],\n };\n });\n await instanceStorage.setExtraStorage(this.service, this.keyInStorage.diskId, rs);\n return result;\n }\n}\n","import coreModule from 'grafana/app/core/core_module';\nimport { ECMBLOCKSTORAGEFilterFieldsDescriptor, queryEditorName, namespace, templateQueryIdMap } from './query_def';\nimport { GetServiceFromNamespace } from '../../common/constants';\n\nconst ExtraFields = [\n // {\n // label: 'nodeid',\n // field: 'NodeId',\n // action: 'DescribeInstanceNodeInfo',\n // },\n {\n label: 'diskId',\n field: 'diskId',\n },\n];\nexport class QueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.ECMBLOCKSTORAGEFilterFieldsDescriptor = ECMBLOCKSTORAGEFilterFieldsDescriptor;\n $scope.ExtraFields = ExtraFields;\n $scope.namespace = namespace;\n };\n\n // $scope.getInstanceId = () => {\n // let { instance } = $scope.target;\n // const service = GetServiceFromNamespace($scope.namespace);\n // instance = $scope.datasource.getServiceFn(service, 'getVariable')(instance);\n // if (!instance) {\n // return '';\n // }\n // try {\n // instance = JSON.parse(instance)[templateQueryIdMap.instance];\n // } catch (error) {\n // console.log();\n // }\n // return instance;\n // };\n $scope.getExtraFields = () => {\n return ExtraFields.filter((item) => item.field in ($scope.dims ?? {}) || item.label in ($scope.dims ?? {}));\n };\n $scope.getExtraDropdown = (target, action) => {\n let { instance } = target;\n const service = GetServiceFromNamespace($scope.namespace);\n instance = $scope.datasource.getServiceFn(service, 'getVariable')(instance);\n try {\n instance = JSON.parse(instance);\n const { DataDisks: dataDisks } = instance;\n return dataDisks.map((o) => {\n o._InstanceAliasValue = o[templateQueryIdMap.diskId];\n return {\n text: o[templateQueryIdMap.diskId],\n value: JSON.stringify(o),\n };\n });\n } catch (error) {\n // console.log('instance error', instance);\n const payload: any = {\n InstanceId: instance,\n };\n const rs = $scope.datasource.getServiceFn(service, 'getDiskList')({ payload });\n const result = rs.map((o) => {\n return {\n text: o[templateQueryIdMap.diskId],\n value: JSON.stringify(o),\n };\n });\n return result;\n }\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n`;\n\nexport function sQuery() {\n return {\n template: template,\n controller: QueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n onRefresh: '&',\n dims: '=',\n },\n };\n}\ncoreModule.directive(queryEditorName, sQuery);\n","// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service)\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/ECM_BLOCK_STORAGE';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'ecmBlockStorageQuery';\n\nconst ECMBLOCKSTORAGEInvalidDemensions = {\n uuid: 'UUID',\n diskId: 'DiskId',\n};\n\n// 需和文件名对应\nconst ECMBLOCKSTORAGEInstanceAliasList = ['InstanceId', 'InstanceName'];\n\nconst templateQueryIdMap = {\n instance: 'InstanceId',\n diskId: 'DiskId',\n};\n\n// select类型需要注意是{},multi后缀是[],dropdown是''\nconst ECMBLOCKSTORAGEFilterFields = {\n Limit: 20,\n Offset: 0,\n 'zone-name': [],\n 'module-id': [],\n 'module-name': [],\n 'instance-id': [],\n 'instance-name': [],\n 'ip-address': [],\n 'instance-uuid': [],\n 'instance-state': {},\n 'internet-service-provider': [],\n 'instance-family': [],\n 'image-id': [],\n 'vpc-id': [],\n 'subnet-id': [],\n};\n\nconst ECMBLOCKSTORAGEFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'zone-name',\n enDescriptor: 'zone-name',\n cnDescriptor: '排列顺序',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'module-id',\n enDescriptor: 'module-id',\n cnDescriptor: '模块ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'module-name',\n enDescriptor: 'module-name',\n cnDescriptor: '模块名称',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'instance-id',\n enDescriptor: 'instance-id',\n cnDescriptor: '实例ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'instance-name',\n enDescriptor: 'instance-name',\n cnDescriptor: '实例名称',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'ip-address',\n enDescriptor: 'ip-address',\n cnDescriptor: '内网/公网IP',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'instance-uuid',\n enDescriptor: 'instance-uuid',\n cnDescriptor: '实例uuid',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'instance-state',\n enDescriptor: 'instance-state',\n cnDescriptor: '实例状态',\n link: '',\n type: 'select',\n multiple: true,\n list: [\n { text: '创建中', value: 'PENDING' },\n { text: '创建失败', value: 'LAUNCH_FAILED' },\n { text: '运行中', value: 'RUNNING' },\n { text: '关机', value: 'STOPPED' },\n { text: '开机中', value: 'STARTING' },\n { text: '关机中', value: 'STOPPING' },\n { text: '重启中', value: 'REBOOTING' },\n { text: '停止待销毁', value: 'SHUTDOWN' },\n { text: '销毁中', value: 'TERMINATING' },\n ],\n },\n {\n key: 'internet-service-provider',\n enDescriptor: 'internet-service-provider',\n cnDescriptor: '公网IP所属的运营商',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'instance-family',\n enDescriptor: 'instance-family',\n cnDescriptor: '机型family',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'image-id',\n enDescriptor: 'image-id',\n cnDescriptor: '镜像ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'vpc-id',\n enDescriptor: 'vpc-id',\n cnDescriptor: '实例的vpc id',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'subnet-id',\n enDescriptor: 'subnet-id',\n cnDescriptor: '实例的subnet id',\n link: '',\n type: 'inputMulti',\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/1108/42565',\n namespace,\n fieldDescriptor: ECMBLOCKSTORAGEFilterFieldsDescriptor,\n};\n\nconst ECMBLOCKSTORAGE_STATE = {\n region: 'ap-guangzhou',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'InstanceId',\n diskId: '',\n queries: ECMBLOCKSTORAGEFilterFields,\n};\n\n// 需要缓存到storage的内容的key列表\nconst keyInStorage = {\n diskId: 'diskId',\n};\n/*\n如果有InstanceId额外的维度,原则上都需要传入此map结构配置\nkey的含义:\n 经过InvalidDemensions处理后的string。topicId =》TopicId。\n 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId\nvalue的含义:\n 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、\n 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。\n 默认取通过InvalidDemsion处理后的key\n 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。\n 即:templateQueryIdMap中内容。\n 联合上面2的内容筛选出原始sourceMap\n*/\nconst queryMonitorExtraConfg = {\n DiskId: {\n dim_KeyInStorage: keyInStorage.diskId,\n dim_KeyInTarget: 'diskId',\n dim_KeyInMap: templateQueryIdMap.diskId,\n },\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, true);\n}\nexport default ECMBLOCKSTORAGE_STATE;\nexport {\n ECMBLOCKSTORAGEFilterFieldsDescriptor,\n templateQueryIdMap,\n ECMBLOCKSTORAGEInstanceAliasList,\n ECMBLOCKSTORAGEInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n keyInStorage,\n queryMonitorExtraConfg,\n // 对应产品的service的全大写拼接GetInstanceQueryParams\n GetInstanceQueryParams as ECMBLOCKSTORAGEGetInstanceQueryParams,\n};\n","import { ECMLBInstanceAliasList, ECMLBInvalidDemensions, namespace, templateQueryIdMap } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = ECMLBInstanceAliasList;\n InvalidDimensions = ECMLBInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'ecm',\n action: 'DescribeLoadBalancers',\n responseField: 'LoadBalancerSet',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n async metricFindQuery(query: any, regex?: string) {\n return super.metricFindQuery({ ...query, ...{ region: 'ap-guangzhou' } }, regex);\n }\n}\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import * as _ from 'lodash';\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/ECM_LB';\nconst queryEditorName = 'ecmLbQuery';\n\nconst ECMLBInvalidDemensions = {\n vip: 'LoadBalancerVips',\n};\n\nconst ECMLBInstanceAliasList = ['LoadBalancerId', 'LoadBalancerName'];\n\nconst templateQueryIdMap = {\n instance: 'LoadBalancerId',\n};\n\n// select类型需要注意是{},multi后缀是[]\nconst ECMLBFilterFields = {\n Limit: 20,\n Offset: 0,\n LoadBalancerIds: [],\n LoadBalancerName: [],\n LoadBalancerVips: [],\n BackendPrivateIps: [],\n VpcId: '',\n};\n\nconst ECMLBFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'LoadBalancerIds',\n enDescriptor: 'LoadBalancerIds',\n cnDescriptor: '负载均衡器ID数组',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'LoadBalancerName',\n enDescriptor: 'LoadBalancerName',\n cnDescriptor: '负载均衡器名称',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'LoadBalancerVips',\n enDescriptor: 'LoadBalancerVips',\n cnDescriptor: '负载均衡获得的公网IP地址',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'BackendPrivateIps',\n enDescriptor: 'BackendPrivateIps',\n cnDescriptor: '绑定的后端服务的内网 IP',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'VpcId',\n enDescriptor: 'VpcId',\n cnDescriptor: '实例所属私有网络唯一ID',\n link: '',\n type: 'input',\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/1108/48459',\n namespace,\n fieldDescriptor: ECMLBFilterFieldsDescriptor,\n};\n\nconst ECM_STATE = {\n region: 'ap-guangzhou',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'LoadBalancerId',\n queries: ECMLBFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, false);\n}\n// function isValidMetric(metricObj: any = {}) {\n// const dimension = _.get(metricObj, 'Dimensions[0].Dimensions');\n// // console.log('dimension', dimension, dimension.length === 1 && _.indexOf(dimension, 'diskId') !== -1);\n// return dimension.length === 1 &&( _.indexOf(dimension, 'UUID') !== -1 || _.indexOf(dimension, 'uuid') !== -1);\n// }\n\nfunction modifyDimensons(metricItem: any) {\n const metricTmp = _.cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n // item.Dimensions = ['UUID'];\n });\n return metricTmp;\n}\nexport default ECM_STATE;\nexport {\n ECMLBFilterFieldsDescriptor,\n templateQueryIdMap,\n ECMLBInstanceAliasList,\n ECMLBInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n modifyDimensons,\n GetInstanceQueryParams as ECMLBGetInstanceQueryParams,\n};\n","import {\n GSEInstanceAliasList,\n GSEInvalidDemensions,\n namespace,\n templateQueryIdMap,\n regionSupported,\n keyInStorage,\n queryMonitorExtraConfg,\n modifyDimensons,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\nimport { GetServiceAPIInfo } from '../../common/constants';\nimport { fetchAllFactory } from '../../common/utils';\nimport instanceStorage from '../../common/datasourceStorage';\nimport { t } from '../../../locale';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = GSEInstanceAliasList;\n InvalidDimensions = GSEInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n queryMonitorExtraConfg = queryMonitorExtraConfg;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'gse',\n action: 'DescribeInstances',\n responseField: 'Instances',\n };\n\n keyInStorage = keyInStorage;\n\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n // getFilterDropdown({ field }) {\n // return super.getRegions();\n // }\n getRegions() {\n return Promise.resolve(regionSupported.map(({ value }) => ({ value, text: t(value) })));\n }\n\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return _.compact(\n rawSet.map((item) => {\n return modifyDimensons(item);\n })\n );\n }\n async getQueueNameList(params: any) {\n const { region } = params;\n const serviceInfo = GetServiceAPIInfo(region, this.service);\n\n // 从分页数据,获取全量数据\n const res = await fetchAllFactory(\n (data) => {\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data,\n },\n serviceInfo.service,\n { region, action: 'DescribeGameServerSessionQueues' }\n );\n },\n {},\n 'GameServerSessionQueues'\n );\n const [rs] = res;\n return rs;\n }\n async getFleetList(params: any) {\n const { region } = params;\n const serviceInfo = GetServiceAPIInfo(region, this.service);\n\n // 从分页数据,获取全量数据\n const res = await fetchAllFactory(\n (data) => {\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data,\n },\n serviceInfo.service,\n { region, action: 'ListFleets' }\n );\n },\n {},\n 'FleetIds'\n );\n const [rs] = res;\n return rs.map((r) => ({ [this.templateQueryIdMap.FleetId]: r }));\n }\n async fetchMetricData(action: string, region: string, instance: any) {\n // console.log({ action, region, instance });\n if (action === 'DescribeGameServerSessionQueues') {\n const rs = await this.getQueueNameList({ region, instanceId: instance[this.templateQueryIdMap.instance] });\n const result = rs.map((o) => {\n o._InstanceAliasValue = o[this.templateQueryIdMap.Name];\n return {\n text: o[this.templateQueryIdMap.Name],\n value: o[this.templateQueryIdMap.Name],\n };\n });\n await instanceStorage.setExtraStorage(this.service, this.keyInStorage.queue, rs);\n return result;\n }\n if (action === 'ListFleets') {\n const rs = await this.getFleetList({ region, instanceId: instance[this.templateQueryIdMap.instance] });\n const result = rs.map((o) => {\n o._InstanceAliasValue = o[this.templateQueryIdMap.FleetId];\n return {\n text: o[this.templateQueryIdMap.FleetId],\n value: o[this.templateQueryIdMap.FleetId],\n };\n });\n await instanceStorage.setExtraStorage(this.service, this.keyInStorage.fleet, rs);\n return result;\n }\n return [];\n }\n}\n","import coreModule from 'grafana/app/core/core_module';\nimport { GSEFilterFieldsDescriptor, templateQueryIdMap, queryEditorName, namespace } from './query_def';\nimport { GetServiceFromNamespace } from '../../common/constants';\n\nconst ExtraFields = [\n {\n label: 'fleetId',\n field: 'FleetId',\n },\n {\n label: 'queueName',\n field: 'Name',\n },\n];\nconst actionMaps = {\n FleetId: 'getFleetList',\n Name: 'getQueueNameList',\n};\nexport class QueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.GSEFilterFieldsDescriptor = GSEFilterFieldsDescriptor;\n $scope.namespace = namespace;\n };\n\n $scope.getExtraFields = () => {\n return ExtraFields.filter((item) => item.field in ($scope.dims ?? {}));\n };\n\n $scope.getInstanceId = () => {\n let { instance } = $scope.target;\n const service = GetServiceFromNamespace($scope.namespace);\n // console.log({namespace, service});\n instance = $scope.datasource.getServiceFn(service, 'getVariable')(instance);\n if (!instance) {\n return '';\n }\n try {\n instance = JSON.parse(instance)[templateQueryIdMap.instance];\n } catch (error) {\n // console.log();\n }\n return instance;\n };\n $scope.getExtraDropdown = async (target, field) => {\n const service = GetServiceFromNamespace($scope.namespace);\n const instanceId = $scope.getInstanceId();\n const region = $scope.datasource.getServiceFn(service, 'getVariable')(target.region);\n // const rs = await $scope.datasource.getServiceFn(service, 'getEnvironmentNameList')({ region, instanceId });\n let rs = await $scope.datasource.getServiceFn(service, actionMaps[field])({ region, instanceId });\n const result = rs.map((o) => {\n o._InstanceAliasValue = o[templateQueryIdMap[field]];\n return {\n text: o[templateQueryIdMap[field]],\n value: JSON.stringify(o),\n };\n });\n return result;\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n`;\n\nexport function sQuery() {\n return {\n template: template,\n controller: QueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n onRefresh: '&',\n dims: '=',\n },\n };\n}\ncoreModule.directive(queryEditorName, sQuery);\n","// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service)\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\nimport _ from 'lodash';\n\nconst namespace = 'QCE/GSE';\nconst fleetId = 'FleetId'; // 为和cvm其他产品保持一致,即将string[]改为Array<{fleetid: xxx}>,在此声明key\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'gseQuery';\n\nconst GSEInvalidDemensions = {\n instanceid: 'InstanceId',\n fleetid: 'FleetId',\n queuename: 'Name',\n};\n\n// 需和文件名对应\nconst GSEInstanceAliasList = ['InstanceId', 'PrivateIpAddress', 'IpAddress'];\n\nconst templateQueryIdMap = {\n instance: 'InstanceId',\n Name: 'Name',\n FleetId: fleetId,\n};\n\n// 需要缓存到storage的内容的key列表\nconst keyInStorage = {\n fleet: 'fleet', // 实例队列\n queue: 'queueName', // 会话队列\n};\n/*\n如果有InstanceId额外的维度,原则上都需要传入此map结构配置\nkey的含义:\n 经过InvalidDemensions处理后的string。topicId =》TopicId。\n 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId\nvalue的含义:\n 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、\n 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。\n 默认取通过InvalidDemsion处理后的key\n 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。\n 即:templateQueryIdMap中内容。\n 联合上面2的内容筛选出原始sourceMap\n*/\nconst queryMonitorExtraConfg = {\n FleetId: {\n dim_KeyInStorage: keyInStorage.fleet,\n dim_KeyInTarget: 'FleetId',\n dim_KeyInMap: templateQueryIdMap.FleetId,\n },\n Name: {\n dim_KeyInStorage: keyInStorage.queue,\n dim_KeyInTarget: 'Name',\n dim_KeyInMap: templateQueryIdMap.Name,\n },\n};\n// select类型需要注意是{},multi后缀是[],dropdown是''\nconst GSEFilterFields = {\n Limit: 20,\n Offset: 0,\n InstanceId: '',\n FleetId: '',\n};\n\nconst GSEFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'InstanceId',\n enDescriptor: 'resourceName',\n cnDescriptor: '资源名称',\n link: '',\n type: 'input',\n },\n {\n key: 'FleetId',\n enDescriptor: 'tagKey',\n cnDescriptor: '标签键',\n link: '',\n type: 'input',\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/1165/42604',\n namespace,\n fieldDescriptor: GSEFilterFieldsDescriptor,\n};\n\nconst GSE_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'InstanceId',\n FleetId: '', // 服务器实例\n Name: '', // 队列名称\n queries: GSEFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, true);\n}\n// regions for dropdown\nconst regionSupported = [\n { value: 'ap-bangkok' },\n { value: 'ap-beijing' },\n { value: 'ap-chengdu' },\n // { value: 'ap-chongqing' },\n { value: 'ap-guangzhou' },\n { value: 'ap-hongkong' },\n { value: 'ap-mumbai' },\n { value: 'ap-seoul' },\n { value: 'ap-nanjing' },\n { value: 'ap-shanghai' },\n // { value: 'ap-shanghai-fsi' },\n // { value: 'ap-shenzhen-fsi' },\n { value: 'ap-singapore' },\n { value: 'ap-tokyo' },\n { value: 'eu-frankfurt' },\n { value: 'na-ashburn' },\n { value: 'na-siliconvalley' },\n // { value: 'na-toronto' },\n];\nfunction modifyDimensons(metricItem: any) {\n const metricTmp = _.cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n item.Dimensions = item.Dimensions.map((v) => GSEInvalidDemensions[v] || v);\n });\n return metricTmp;\n}\nexport default GSE_STATE;\nexport {\n GSEFilterFieldsDescriptor,\n templateQueryIdMap,\n GSEInstanceAliasList,\n GSEInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n regionSupported,\n modifyDimensons,\n queryMonitorExtraConfg,\n fleetId,\n keyInStorage,\n // 对应产品的service的全大写拼接GetInstanceQueryParams\n GetInstanceQueryParams as GSEGetInstanceQueryParams,\n};\n","import { t } from '../../locale';\n// name (产品名称), service(对应的真实service)\ninterface ServiceType {\n service: string;\n label: string;\n namespace: string;\n href: string;\n groupName?: string;\n hideRegion?: boolean;\n}\nconst SERVICES: ServiceType[] = [\n {\n service: 'cvm',\n get label() {\n return t('CVM');\n },\n namespace: 'QCE/CVM',\n href: 'https://cloud.tencent.com/document/api/213/15688',\n },\n {\n service: 'cdb',\n get label() {\n return t('CDB');\n },\n namespace: 'QCE/CDB',\n href: 'https://cloud.tencent.com/document/api/236/15829',\n get groupName() {\n return t('cloud_database');\n },\n },\n {\n service: 'mongoDB',\n get label() {\n return t('CMONGO');\n },\n namespace: 'QCE/CMONGO',\n href: 'https://cloud.tencent.com/document/api/240/38568',\n get groupName() {\n return t('cloud_database');\n },\n },\n {\n service: 'postgres',\n get label() {\n return t('POSTGRES');\n },\n namespace: 'QCE/POSTGRES',\n href: 'https://cloud.tencent.com/document/product/248/45105',\n get groupName() {\n return t('cloud_database');\n },\n },\n {\n service: 'redis',\n get label() {\n return t('REDIS');\n },\n namespace: 'QCE/REDIS',\n href: 'https://cloud.tencent.com/document/product/248/45110',\n get groupName() {\n return t('cloud_database');\n },\n },\n {\n service: 'redisMem',\n get label() {\n return t('REDIS_MEM');\n },\n namespace: 'QCE/REDIS_MEM',\n href: 'https://cloud.tencent.com/document/product/248/49729',\n get groupName() {\n return t('cloud_database');\n },\n },\n {\n service: 'sqlserver',\n get label() {\n return t('SQLSERVER');\n },\n namespace: 'QCE/SQLSERVER',\n href: 'https://cloud.tencent.com/document/product/248/45146',\n get groupName() {\n return t('cloud_database');\n },\n },\n {\n service: 'cynosdbMysql',\n get label() {\n return t('CYNOSDB_MYSQL');\n },\n namespace: 'QCE/CYNOSDB_MYSQL',\n href: 'https://cloud.tencent.com/document/product/248/45106',\n get groupName() {\n return t('cloud_database');\n },\n },\n {\n service: 'tcaplus',\n get label() {\n return t('TCAPLUS');\n },\n namespace: 'QCE/TCAPLUS',\n href: 'https://cloud.tencent.com/document/product/248/45107',\n get groupName() {\n return t('cloud_database');\n },\n },\n {\n service: 'dcdb',\n get label() {\n return t('TDMYSQL');\n },\n namespace: 'QCE/TDMYSQL',\n href: 'https://cloud.tencent.com/document/product/248/45108',\n },\n {\n service: 'pcx',\n get label() {\n return t('PCX');\n },\n namespace: 'QCE/PCX',\n href: 'https://cloud.tencent.com/document/product/215/5181',\n get groupName() {\n return t('virtual_private_cloud');\n },\n },\n {\n service: 'bwp',\n get label() {\n return t('BWP');\n },\n namespace: 'QCE/BWP',\n href: 'https://cloud.tencent.com/document/api/215/19209',\n get groupName() {\n return t('virtual_private_cloud');\n },\n },\n {\n service: 'natGateway',\n get label() {\n return t('NAT_GATEWAY');\n },\n namespace: 'QCE/NAT_GATEWAY',\n href: 'https://cloud.tencent.com/document/api/215/36034',\n get groupName() {\n return t('virtual_private_cloud');\n },\n },\n {\n service: 'vpngw',\n get label() {\n return t('VPNGW');\n },\n namespace: 'QCE/VPNGW',\n href: 'https://cloud.tencent.com/document/product/248/45070',\n get groupName() {\n return t('virtual_private_cloud');\n },\n },\n {\n service: 'vpnx',\n get label() {\n return t('VPNX');\n },\n namespace: 'QCE/VPNX',\n href: 'https://cloud.tencent.com/document/product/248/45071',\n get groupName() {\n return t('virtual_private_cloud');\n },\n },\n {\n service: 'dcg',\n get label() {\n return t('DCG');\n },\n namespace: 'QCE/DCG',\n href: 'https://cloud.tencent.com/document/product/248/45072',\n get groupName() {\n return t('virtual_private_cloud');\n },\n },\n {\n service: 'ceipSummary',\n get label() {\n return t('CEIP_SUMMARY');\n },\n namespace: 'QCE/CEIP_SUMMARY',\n href: 'https://cloud.tencent.com/document/product/248/50381',\n get groupName() {\n return t('virtual_private_cloud');\n },\n },\n {\n service: 'vpcNetDetect',\n get label() {\n return t('VPC_NET_DETECT');\n },\n namespace: 'QCE/VPC_NET_DETECT',\n href: 'https://cloud.tencent.com/document/product/248/50384',\n get groupName() {\n return t('virtual_private_cloud');\n },\n },\n {\n service: 'vbc',\n get label() {\n return t('VBC');\n },\n namespace: 'QCE/VBC',\n href: 'https://cloud.tencent.com/document/product/248/45073',\n get groupName() {\n return t('virtual_private_cloud');\n },\n },\n {\n service: 'lb',\n get label() {\n return t('LB');\n },\n namespace: 'QCE/LB',\n href: 'https://cloud.tencent.com/document/product/248/45099',\n get groupName() {\n return t('virtual_private_cloud');\n },\n },\n {\n service: 'lbPublic',\n get label() {\n return t('LB_PUBLIC');\n },\n namespace: 'QCE/LB_PUBLIC',\n href: 'https://cloud.tencent.com/document/product/248/51898',\n get groupName() {\n return `${t('cloud_load_balancer')}(${t('multi_scene')})`;\n },\n },\n {\n service: 'lbPrivate',\n get label() {\n return t('LB_PRIVATE');\n },\n namespace: 'QCE/LB_PRIVATE',\n href: 'https://cloud.tencent.com/document/product/248/51899',\n get groupName() {\n return `${t('cloud_load_balancer')}(${t('multi_scene')})`;\n },\n },\n {\n service: 'loadBalance',\n get label() {\n return t('LOADBALANCE');\n },\n namespace: 'QCE/LOADBALANCE',\n href: 'https://cloud.tencent.com/document/product/248/51901',\n get groupName() {\n return `${t('cloud_load_balancer')}(${t('multi_scene')})`;\n },\n },\n {\n service: 'vClb',\n get label() {\n return `${t('cloud_load_balancer')}(${t('lite')})`;\n },\n namespace: 'QCE/V_CLB',\n href: 'https://cloud.tencent.com/document/product/248/51901',\n get groupName() {\n return `${t('cloud_load_balancer')}(${t('lite')})`;\n },\n },\n {\n service: 'cdn',\n get label() {\n return t('CDN');\n },\n namespace: 'QCE/CDN',\n hideRegion: true,\n href: 'https://cloud.tencent.com/document/product/248/50386',\n get groupName() {\n return t('content_delivery_network');\n },\n },\n {\n service: 'cdnProvince',\n get label() {\n return t('CDN_LOG_DATA');\n },\n namespace: 'QCE/CDN_LOG_DATA',\n hideRegion: true,\n href: 'https://cloud.tencent.com/document/product/248/50388',\n get groupName() {\n return t('content_delivery_network');\n },\n },\n {\n service: 'ovCdn',\n get label() {\n return t('OV_CDN');\n },\n namespace: 'QCE/OV_CDN',\n hideRegion: true,\n href: 'https://cloud.tencent.com/document/product/248/50387',\n get groupName() {\n return t('content_delivery_network');\n },\n },\n {\n service: 'scf',\n get label() {\n return t('SCF_V2');\n },\n namespace: 'QCE/SCF_V2',\n href: 'https://cloud.tencent.com/document/product/248/45130',\n },\n {\n service: 'cfs',\n get label() {\n return t('CFS');\n },\n namespace: 'QCE/CFS',\n href: 'https://cloud.tencent.com/document/product/248/45143',\n },\n {\n service: 'cos',\n get label() {\n return t('COS');\n },\n namespace: 'QCE/COS',\n href: 'https://cloud.tencent.com/document/product/248/45140',\n },\n {\n service: 'ckafka',\n get label() {\n return t('CKAFKA');\n },\n namespace: 'QCE/CKAFKA',\n href: 'https://cloud.tencent.com/document/product/248/45121',\n get groupName() {\n return t('message_queue');\n },\n },\n {\n service: 'cmq',\n get label() {\n return t('CMQ');\n },\n namespace: 'QCE/CMQ',\n href: 'https://cloud.tencent.com/document/product/248/45114',\n get groupName() {\n return t('message_queue');\n },\n },\n {\n service: 'cmqTopic',\n get label() {\n return t('CMQTOPIC');\n },\n namespace: 'QCE/CMQTOPIC',\n href: 'https://cloud.tencent.com/document/product/248/45113',\n get groupName() {\n return t('message_queue');\n },\n },\n {\n service: 'tdmq',\n get label() {\n return t('TDMQ');\n },\n namespace: 'QCE/TDMQ',\n href: 'https://cloud.tencent.com/document/product/248/51450',\n get groupName() {\n return t('message_queue');\n },\n },\n {\n service: 'tdmqRocketmq',\n get label() {\n return t('TDMQ_ROCKETMQ');\n },\n namespace: 'QCE/ROCKETMQ',\n href: 'https://cloud.tencent.com/document/product/248/51450',\n get groupName() {\n return t('message_queue');\n },\n },\n {\n service: 'tdmqRabbitmq',\n get label() {\n return t('TDMQ_RABBITMQ');\n },\n namespace: 'QCE/RABBITMQ',\n href: 'https://cloud.tencent.com/document/product/248/51450',\n get groupName() {\n return t('message_queue');\n },\n },\n {\n service: 'dcx',\n get label() {\n return t('DCX');\n },\n namespace: 'QCE/DCX',\n href: 'https://cloud.tencent.com/document/product/248/45101',\n get groupName() {\n return t('direct_connect');\n },\n },\n {\n service: 'dc',\n get label() {\n return t('DC');\n },\n namespace: 'QCE/DC',\n href: 'https://cloud.tencent.com/document/product/248/45102',\n get groupName() {\n return t('direct_connect');\n },\n },\n {\n service: 'cpm',\n get label() {\n return t('CPM');\n },\n namespace: 'QCE/CPM',\n href: 'https://cloud.tencent.com/document/product/248/45881',\n get groupName() {\n return t('cloud_physical_machine');\n },\n },\n {\n service: 'bmPcx',\n get label() {\n return t('BM_PCX');\n },\n namespace: 'QCE/BM_PCX',\n href: 'https://cloud.tencent.com/document/product/248/45884',\n get groupName() {\n return t('cloud_physical_machine');\n },\n },\n {\n service: 'bmLb',\n get label() {\n return t('BM_LB');\n },\n namespace: 'QCE/BM_LB',\n href: 'https://cloud.tencent.com/document/product/248/45886',\n get groupName() {\n return t('cloud_physical_machine');\n },\n },\n {\n service: 'bmIntraLb',\n get label() {\n return t('BM_INTRA_LB');\n },\n namespace: 'QCE/BM_INTRA_LB',\n href: 'https://cloud.tencent.com/document/product/248/45885',\n get groupName() {\n return t('cloud_physical_machine');\n },\n },\n {\n service: 'ces',\n get label() {\n return t('CES');\n },\n namespace: 'QCE/CES',\n href: 'https://cloud.tencent.com/document/product/248/45129',\n },\n {\n service: 'mrHDFS',\n get label() {\n return `${t('elastic_mapReduce')}(HDFS)`;\n },\n namespace: 'QCE/TXMR_HDFS',\n href: 'https://cloud.tencent.com/document/product/248/44797',\n get groupName() {\n return t('elastic_mapReduce');\n },\n },\n {\n service: 'mrHBASE',\n get label() {\n return `${t('elastic_mapReduce')}(HBASE)`;\n },\n namespace: 'QCE/TXMR_HBASE',\n href: 'https://cloud.tencent.com/document/product/248/45567',\n get groupName() {\n return t('elastic_mapReduce');\n },\n },\n {\n service: 'mrHIVE',\n get label() {\n return `${t('elastic_mapReduce')}(HIVE)`;\n },\n namespace: 'QCE/TXMR_HIVE',\n href: 'https://cloud.tencent.com/document/product/248/45569',\n get groupName() {\n return t('elastic_mapReduce');\n },\n },\n {\n service: 'mrNODE',\n get label() {\n return `${t('elastic_mapReduce')}(NODE)`;\n },\n namespace: 'QCE/TXMR_NODE',\n href: 'https://cloud.tencent.com/document/product/248/45570',\n get groupName() {\n return t('elastic_mapReduce');\n },\n },\n {\n service: 'mrPRESTO',\n get label() {\n return `${t('elastic_mapReduce')}(PRESTO)`;\n },\n namespace: 'QCE/TXMR_PRESTO',\n href: 'https://cloud.tencent.com/document/product/248/45571',\n get groupName() {\n return t('elastic_mapReduce');\n },\n },\n {\n service: 'mrSPARK',\n get label() {\n return `${t('elastic_mapReduce')}(SPARK)`;\n },\n namespace: 'QCE/TXMR_SPARK',\n href: 'https://cloud.tencent.com/document/product/248/45572',\n get groupName() {\n return t('elastic_mapReduce');\n },\n },\n {\n service: 'mrYARN',\n get label() {\n return `${t('elastic_mapReduce')}(YARN)`;\n },\n namespace: 'QCE/TXMR_YARN',\n href: 'https://cloud.tencent.com/document/product/248/45573',\n get groupName() {\n return t('elastic_mapReduce');\n },\n },\n {\n service: 'mrZOOKEEPER',\n get label() {\n return `${t('elastic_mapReduce')}(ZOOKEEPER)`;\n },\n namespace: 'QCE/TXMR_ZOOKEEPER',\n href: 'https://cloud.tencent.com/document/product/248/45574',\n get groupName() {\n return t('elastic_mapReduce');\n },\n },\n {\n service: 'cbs',\n get label() {\n return t('BLOCK_STORAGE');\n },\n namespace: 'QCE/BLOCK_STORAGE',\n href: 'https://cloud.tencent.com/document/product/362/2345',\n },\n {\n service: 'apigateway',\n get label() {\n return t('APIGATEWAY');\n },\n namespace: 'QCE/APIGATEWAY',\n href: 'https://cloud.tencent.com/document/product/248/45127',\n },\n {\n service: 'qaap',\n get label() {\n return t('QAAP');\n },\n namespace: 'QCE/QAAP',\n href: 'https://cloud.tencent.com/document/product/608',\n },\n {\n service: 'ecm',\n get label() {\n return t('ECM');\n },\n hideRegion: true,\n namespace: 'QCE/ECM',\n href: 'https://cloud.tencent.com/document/product/1108',\n get groupName() {\n return t('edge_computing_machine');\n },\n },\n {\n service: 'ecmBlockStorage',\n get label() {\n return t('ECM_BLOCK_STORAGE');\n },\n hideRegion: true,\n namespace: 'QCE/ECM_BLOCK_STORAGE',\n href: 'https://cloud.tencent.com/document/product/1108',\n get groupName() {\n return t('edge_computing_machine');\n },\n },\n {\n service: 'ecmLb',\n get label() {\n return t('ECM_LB');\n },\n hideRegion: true,\n namespace: 'QCE/ECM_LB',\n href: 'https://cloud.tencent.com/document/product/1108',\n get groupName() {\n return t('edge_computing_machine');\n },\n },\n {\n service: 'gse',\n get label() {\n return t('GSE');\n },\n namespace: 'QCE/GSE',\n href: 'https://cloud.tencent.com/document/product/1165',\n },\n {\n service: 'cls',\n get label() {\n return t('CLS');\n },\n namespace: 'QCE/CLS',\n href: 'https://cloud.tencent.com/document/product/614',\n },\n {\n service: 'tke',\n get label() {\n return t('TKE');\n },\n namespace: 'QCE/TKE2',\n href: 'https://cloud.tencent.com/document/product/457',\n },\n {\n service: 'ecdn',\n get label() {\n return t('ECDN');\n },\n namespace: 'QCE/DSA',\n href: 'https://cloud.tencent.com/document/product/570',\n },\n // {\n // service: 'lighthouse',\n // label: '轻量应用服务器(LIGHTHOUSE)',\n // namespace: 'QCE/LIGHTHOUSE',\n // href: 'https://cloud.tencent.com/document/product/1207',\n // },\n // {\n // service: 'tsf',\n // label: ' 微服务平台(TSF)',\n // namespace: 'QCE/TSF',\n // href: 'https://cloud.tencent.com/document/product/649',\n // },\n {\n service: 'waf',\n get label() {\n return t('WAF');\n },\n // hideRegion: true,\n namespace: 'QCE/WAF',\n href: 'https://cloud.tencent.com/document/product/627',\n },\n];\nconst Datasources = {};\nconst InitStates = {};\nconst InstanceAliasList = {};\nconst GetInstanceQueryParams = {};\n\n/**\n * 由于目录命名不规范,导致需要使用额外逻辑保证正确性。从目录到具体service的映射\n */\nconst hackModuleName = {\n // lb_loadBalance: 'loadBalance',\n postgresql: 'postgres',\n mongodb: 'mongoDB',\n clb: ['lbPrivate', 'lbPublic', 'loadBalance'],\n mr: ['mrHDFS', 'mrHBASE', 'mrHIVE', 'mrNODE', 'mrPRESTO', 'mrSPARK', 'mrYARN', 'mrZOOKEEPER'],\n};\n\nconst requireModule = (require as any).context('./', true, /^\\.\\/[a-zA-Z]\\w+\\/(datasource)|(query(_def)?)\\.ts$/);\n\nrequireModule.keys().forEach((filePath) => {\n let [, moduleName, fileName] = filePath.split('/');\n\n // hack: 这里是由于产品目录命名不规范,所以才会多这么一段代码\n moduleName = hackModuleName[moduleName] ?? moduleName;\n\n // 目录与模块的映射关系,不管是一对一还是一对多,均按数组进行统一处理\n [].concat(moduleName).forEach((module: string) => {\n // 这个service就是产品配置中的service,需要注意这里的service是根据目录名称算出来的,因此目录名称一定要和service对应\n const service = module.replace(/_([a-zA-Z])/g, (_, b) => b.toUpperCase());\n const prefix = service.toUpperCase(); // 命名规则\n\n // datasource\n if (fileName === 'datasource.ts') {\n const Cls = require(`${filePath}`).default;\n\n // 想办法为实例注入service,不能为prototype或则类本身注入,因为会造成互相污染,详尽mrDatasource\n Datasources[`${prefix}Datasource`] = class {\n constructor(...params) {\n const target = new Cls(...params, service);\n target.service = service;\n // eslint-disable-next-line no-constructor-return\n return target;\n }\n };\n }\n // query\n if (fileName === 'query.ts') {\n require(`${filePath}`);\n }\n // query_def\n if (fileName === 'query_def.ts') {\n const alias = `${prefix}InstanceAliasList`;\n const getParams = `${prefix}GetInstanceQueryParams`;\n\n const target = require(`${filePath}`);\n\n InitStates[service] = target.default; // FIXME: 这里需不需要深拷贝?\n InstanceAliasList[alias] = target[alias] ?? target['InstanceAliasList'];\n GetInstanceQueryParams[getParams] = target[getParams] ?? target['GetInstanceQueryParams'];\n }\n });\n});\n\nexport {\n InitStates as InitServiceState,\n SERVICES,\n Datasources,\n InstanceAliasList,\n GetInstanceQueryParams,\n // DefaultDimensions\n};\n\n// console.log(Datasources, InitStates, InstanceAliasList, GetInstanceQueryParams);\n","import _ from 'lodash';\nimport { BaseDatasource } from '../_base/datasource';\nimport { LBInstanceAliasList, LBInvalidDemensions } from './query_def';\n\nexport default class SCFDatasource extends BaseDatasource {\n Namespace = 'QCE/LB';\n InstanceAliasList = LBInstanceAliasList;\n InvalidDimensions = LBInvalidDemensions;\n templateQueryIdMap = {\n instance: 'AddressId',\n };\n InstanceReqConfig = {\n service: 'vpc',\n action: 'DescribeAddresses',\n responseField: 'AddressSet',\n interceptor: {\n request: (params) => {\n const { Filters } = params;\n if (!Filters) {\n params.Filters = [];\n }\n params.Filters.push({\n Name: 'address-type',\n Values: ['EIP'],\n });\n return params;\n }, // 设置一些请求参数的 默认值\n },\n };\n\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return rawSet.filter((item) =>\n /* hack:这里多加了筛选条件,是因为后端数据不准确,坑啊! 只拿取包含eip的指标 */\n item.Dimensions?.[0]?.Dimensions?.includes('eip')\n );\n }\n\n // async getInstances(region, params = {}) {\n // const rawSet = await super.getInstances(region, params);\n // /* hack:这里多加了筛选条件,是因为后端数据不准确,坑啊! 只拿取包含eip的指标 */\n // return rawSet.filter((item) => item.AddressType === 'EIP');\n // }\n\n // async getVariableInstances(region, query = {}) {\n // const rawSet = await super.getVariableInstances(region, query);\n // return rawSet.filter((item) => item.AddressType === 'EIP');\n // }\n}\n","import coreModule from 'grafana/app/core/core_module';\nimport { LBFilterDescriptor } from './query_def';\n\nexport class LBQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n // $scope.LBQueryDescriptor = LBQueryDescriptor;\n $scope.LBFilterDescriptor = LBFilterDescriptor;\n };\n\n $scope.onChecked = (srcField, dstField) => {\n if ($scope.target.queries[srcField] === true) {\n $scope.target.queries[dstField] = false;\n }\n $scope.onChange();\n };\n\n $scope.getDropdown = (field) => {\n switch (field) {\n case 'zone':\n return $scope.getZones();\n default:\n return [];\n }\n };\n\n $scope.getZones = () => {\n if (!$scope.region) {\n return [];\n }\n return $scope.datasource.getZones('cvm', $scope.region);\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n\n\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n\n\n
\n
\n \n \n \n \n \n
\n
\n\n
\n`;\n\nexport function lbQuery() {\n return {\n template: template,\n controller: LBQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n },\n };\n}\n\ncoreModule.directive('lbQuery', lbQuery);\n","import _ from 'lodash';\n\n// export const LBQueryDescriptor = [{\n// key: 'Offset',\n// enDescriptor: 'Offset',\n// cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n// link: '',\n// type: 'inputnumber',\n// min: 0,\n// },\n// {\n// key: 'Limit',\n// enDescriptor: 'Limit',\n// cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为2000',\n// link: '',\n// type: 'inputnumber',\n// min: 1,\n// max: 2000,\n// },\n// {\n// key: 'AddressId',\n// enDescriptor: 'Address Id',\n// cnDescriptor: '标识 EIP 的唯一 ID ',\n// link: '',\n// type: 'inputmulti',\n// }\n// ];\n\nexport const LBFilterDescriptor = [\n {\n key: 'address-id',\n enDescriptor: 'Address ID',\n cnDescriptor: 'EIP 的唯一 ID ',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'address-name',\n enDescriptor: 'Address Name',\n cnDescriptor: 'EIP 名称 ',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'address-ip',\n enDescriptor: 'Address IP',\n cnDescriptor: 'EIP 的 IP 地址 ',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'address-status',\n enDescriptor: 'Address Status',\n cnDescriptor: 'EIP 的状态',\n link: '',\n type: 'select',\n list: [\n { value: 'CREATING', text: 'CREATING' },\n { value: 'BINDING', text: 'BINDING' },\n { value: 'BIND', text: 'BIND' },\n { value: 'UNBINDING', text: 'UNBINDING' },\n { value: 'UNBIND', text: 'UNBIND' },\n { value: 'OFFLINING', text: 'OFFLINING' },\n { value: 'BIND_ENI', text: 'BIND_ENI' },\n ],\n },\n {\n key: 'instance-id',\n enDescriptor: 'Instance ID',\n cnDescriptor: '实例ID ',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'private-ip-address',\n enDescriptor: 'Private IP Address',\n cnDescriptor: 'EIP 绑定的内网 IP',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'network-interface-id',\n enDescriptor: 'Network Interface ID',\n cnDescriptor: 'EIP 绑定的弹性网卡 ID',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'is-arrears',\n enDescriptor: 'Arrears',\n cnDescriptor: 'EIP 是否欠费 ',\n link: '',\n type: 'select',\n list: [\n { text: '正常', value: 'FALSE' },\n { text: '欠费', value: 'TRUE' },\n ],\n },\n];\n\n// const LBFilterFields = {\n// \"address-id\": [],\n// \"address-name\": [],\n// \"address-ip\": [],\n// \"address-status \": [],\n// \"instance-id \": [],\n// \"private-ip-address\": [],\n// \"network-interface-id \": [],\n// \"is-arrears \": [],\n// };\n\nconst InstanceKey = 'AddressIds';\nconst LB_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'AddressId',\n version: '',\n queries: {\n Offset: 0,\n Limit: 20,\n [InstanceKey]: [''],\n Filters: {\n 'address-id': [],\n 'address-name': [],\n 'address-ip': [],\n 'address-status ': [],\n 'instance-id ': [],\n 'private-ip-address': [],\n 'network-interface-id ': [],\n 'is-arrears ': [],\n },\n },\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n if (queries.instanceIdsChecked) {\n if (_.isArray(queries[InstanceKey])) {\n const InstanceIds = _.compact(queries[InstanceKey]);\n if (_.uniq(InstanceIds).length > 0) {\n params[InstanceKey] = _.uniq(InstanceIds).slice(0, 100);\n }\n }\n } else if (queries.filtersChecked) {\n const Filters: any[] = [];\n _.forEach(queries.Filters, (item: any, key) => {\n if (Filters.length > 9) {\n return;\n }\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n Filters.push({ Name: key, Values: _.uniq(item).slice(0, 5) });\n }\n } else if (_.isObject(item)) {\n if (!_.isEmpty(_.get(item, 'value', []))) {\n Filters.push({ Name: key, Values: _.get(item, 'value', []).slice(0, 5) });\n }\n }\n });\n if (Filters.length > 0) {\n params.Filters = Filters;\n }\n }\n }\n return params;\n}\n\nconst LBInstanceAliasList = ['AddressId', 'AddressName', 'AddressIp'];\n\n// 维度eip对应于实例中的哪个字段?映射\nconst LBInvalidDemensions = {\n eip: 'AddressIp',\n};\n\nconst templateQueryIdMap = {\n instance: 'AddressId',\n};\n// 从monitor维度到LB实例对应字段的映射\n// export const metric2Instance = {\n// functionName: 'FunctionName',\n// namespace: 'Namespace'\n// };\n\nexport default LB_STATE;\nexport {\n LBInstanceAliasList,\n LBInvalidDemensions,\n templateQueryIdMap,\n GetInstanceQueryParams as LBGetInstanceQueryParams,\n};\n\n// monitor监控数据默认支持的维度\n// export const LBDefaultDimensionList = ['functionName', 'namespace', 'version'];\n","import _ from 'lodash';\nimport {\n LIGHTHOUSEInstanceAliasList,\n templateQueryIdMap,\n LighthouseInvalidDemensions,\n modifyDimensons,\n} from './query_def';\nimport { GetServiceAPIInfo } from '../../common/constants';\nimport { BaseDatasource } from '../_base/datasource';\n\nexport default class LighthouseDatasource extends BaseDatasource {\n Namespace = 'QCE/LIGHTHOUSE';\n InstanceAliasList = LIGHTHOUSEInstanceAliasList;\n InvalidDimensions = LighthouseInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n InstanceReqConfig = {\n service: 'lighthouse',\n action: 'DescribeInstances',\n responseField: 'InstanceSet',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n\n getRegions() {\n return this.doRequest(\n {\n url: this.url + '/api',\n data: { Product: 'lighthouse' },\n },\n 'api',\n { action: 'DescribeRegions' }\n ).then((response) => {\n return _.filter(\n _.map(response.RegionSet || [], (item) => {\n return {\n text: item.RegionName,\n value: item.Region,\n RegionState: item.RegionState,\n };\n }),\n (item) => item.RegionState === 'AVAILABLE'\n );\n });\n }\n\n getZones(region) {\n const serviceInfo = GetServiceAPIInfo(region, 'api');\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data: { Product: 'lighthouse' },\n },\n serviceInfo.service,\n { region, action: 'DescribeZones' }\n ).then((response) => {\n return _.filter(\n _.map(response.ZoneSet || [], (item) => {\n return { text: item.ZoneName, value: item.Zone, ZoneState: item.ZoneState, Zone: item.Zone };\n }),\n (item) => item.ZoneState === 'AVAILABLE'\n );\n });\n }\n\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return _.compact(\n rawSet.map((item) => {\n return modifyDimensons(item);\n })\n );\n }\n}\n","import coreModule from 'grafana/app/core/core_module';\nimport { LighthouseFilterFieldsDescriptor } from './query_def';\n\nexport class LighthouseQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.LighthouseFilterFieldsDescriptor = LighthouseFilterFieldsDescriptor;\n };\n\n $scope.onChecked = (srcField, dstField) => {\n if ($scope.target.queries[srcField] === true) {\n $scope.target.queries[dstField] = false;\n }\n $scope.onChange();\n };\n\n $scope.getDropdown = (field) => {\n switch (field) {\n case 'zone':\n return $scope.getZones();\n default:\n return [];\n }\n };\n\n $scope.getZones = () => {\n if (!$scope.region) {\n return [];\n }\n return $scope.datasource.getZones('lighthouse', $scope.region);\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n \n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n \n \n \n
\n
\n
\n`;\n\nexport function lighthouseQuery() {\n return {\n template: template,\n controller: LighthouseQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n },\n };\n}\n\ncoreModule.directive('lighthouseQuery', lighthouseQuery);\n","import _ from 'lodash';\n\nconst LighthouseStateType = [\n { text: '创建中', value: 'PENDING' },\n { text: '创建失败', value: 'LAUNCH_FAILED' },\n { text: '运行中', value: 'RUNNING' },\n { text: '关机', value: 'STOPPED' },\n { text: '开机中', value: 'STARTING' },\n { text: '关机中', value: 'STOPPING' },\n { text: '重启中', value: 'REBOOTING' },\n { text: '停止待销毁', value: 'SHUTDOWN' },\n { text: '销毁中', value: 'TERMINATING' },\n];\n\nconst LighthouseFilterFields = {\n zone: [],\n 'instance-name': [],\n 'instance-state': {},\n 'private-ip-address': [],\n 'public-ip-address': [],\n};\n\nconst LighthouseFilterFieldsDescriptor = [\n {\n key: 'instance-name',\n enDescriptor: 'Instance Name',\n cnDescriptor: '实例名称',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'private-ip-address',\n enDescriptor: 'Private IP Address',\n cnDescriptor: '实例主网卡的内网IP',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'public-ip-address',\n enDescriptor: 'Public IP Address',\n cnDescriptor: '实例主网卡的公网IP',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'zone',\n enDescriptor: 'Zone',\n cnDescriptor: '可用区',\n link: '',\n type: 'dropdownmulti',\n },\n {\n key: 'instance-state',\n enDescriptor: 'Instance State',\n cnDescriptor: '实例状态',\n link: '',\n type: 'select',\n list: LighthouseStateType,\n },\n];\n\nconst LIGHTHOUSE_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'InstanceId',\n queries: {\n Limit: 20,\n Offset: 0,\n instanceIdsChecked: false,\n filtersChecked: false,\n InstanceIds: [''],\n Filters: { ...LighthouseFilterFields },\n },\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n if (queries.instanceIdsChecked) {\n if (_.isArray(queries.InstanceIds)) {\n const InstanceIds = _.compact(queries.InstanceIds);\n if (_.uniq(InstanceIds).length > 0) {\n params.InstanceIds = _.uniq(InstanceIds).slice(0, 100);\n }\n }\n } else if (queries.filtersChecked) {\n const Filters: any[] = [];\n _.forEach(queries.Filters, (item: any, key) => {\n if (Filters.length > 9) {\n return;\n }\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n Filters.push({ Name: key, Values: _.uniq(item).slice(0, 5) });\n }\n } else if (_.isObject(item)) {\n if (!_.isEmpty(_.get(item, 'value', []))) {\n Filters.push({ Name: key, Values: _.get(item, 'value', []).slice(0, 5) });\n }\n }\n });\n if (Filters.length > 0) {\n params.Filters = Filters;\n }\n }\n }\n return params;\n}\n\nconst LIGHTHOUSEInstanceAliasList = ['InstanceId', 'InstanceName', 'PrivateIpAddresses', 'PublicIpAddresses'];\n\nconst LighthouseInvalidDemensions = {\n instanceid: 'InstanceId',\n};\n\nconst templateQueryIdMap = {\n instance: 'InstanceId',\n};\n\nfunction modifyDimensons(metricItem: any) {\n const metricTmp = _.cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n item.Dimensions = ['InstanceId'];\n });\n return metricTmp;\n}\n\nexport default LIGHTHOUSE_STATE;\n\nexport {\n LighthouseFilterFieldsDescriptor,\n LIGHTHOUSEInstanceAliasList,\n LighthouseInvalidDemensions,\n templateQueryIdMap,\n modifyDimensons,\n GetInstanceQueryParams as LIGHTHOUSEGetInstanceQueryParams,\n};\n","import _ from 'lodash';\nimport {\n MONGODBInstanceAliasList,\n MONGODBInvalidDemensions,\n templateQueryIdMap,\n queryMonitorExtraConfg,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport instanceStorage from '../../common/datasourceStorage';\n\nexport default class MONGODBDatasource extends BaseDatasource {\n Namespace = 'QCE/CMONGO';\n InstanceAliasList = MONGODBInstanceAliasList;\n ReplicaAliasList = ['ReplicaSetId', 'ReplicaSetName'];\n templateQueryIdMap = templateQueryIdMap;\n queryMonitorExtraConfg = queryMonitorExtraConfg;\n\n InstanceReqConfig = {\n service: 'mongodb',\n action: 'DescribeDBInstances',\n responseField: 'InstanceDetails',\n };\n\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n getInvalidDimensions(selfIns: any, target: any) {\n if (target.node && target.node !== '') {\n return { target: 'Node' };\n }\n if (target.replica && target.replica !== '') {\n return { target: 'Replica' };\n }\n return MONGODBInvalidDemensions;\n }\n formatVariableDisplay(data: Record, displayTpl: string | undefined, alias: string, aliasList: string[]) {\n if (displayTpl) {\n return displayTpl.replace(/\\$\\{(\\w+)\\}/g, (a, b) => {\n if (!b || !aliasList.includes(b)) {\n return '';\n }\n return this.getAliasValue(data, b);\n });\n }\n return this.getAliasValue(data, alias);\n }\n async fetchMetricData(action: string, region: string, instance: any, query: any) {\n const { display } = query;\n if (action === 'DescribeReplicas') {\n const [res] = await this.getInstances(region, { InstanceIds: [instance[this.templateQueryIdMap.instance]] });\n let { replicaalias } = query;\n replicaalias = this.ReplicaAliasList.includes(replicaalias) ? replicaalias : this.templateQueryIdMap.replica;\n const result = _.map(_.get(res, 'ReplicaSets', []), (item) => {\n const replicaAlias = this.formatVariableDisplay(item, display, replicaalias, this.ReplicaAliasList);\n item._InstanceAliasValue = replicaAlias || item[this.templateQueryIdMap.replica];\n return { text: item.ReplicaSetId, value: item.ReplicaSetId };\n });\n await instanceStorage.setExtraStorage(\n this.service,\n this.queryMonitorExtraConfg.Replica.dim_KeyInStorage,\n _.get(res, 'ReplicaSets', [])\n );\n return result;\n }\n if (action === 'DescribeReplicaNodes') {\n const [res] = await this.getInstances(region, { InstanceIds: [instance[this.templateQueryIdMap.instance]] });\n const { replicasetid } = query;\n const targetReplica = _.find(_.get(res, 'ReplicaSets', []), { ReplicaSetId: this.getVariable(replicasetid) });\n let result = _.times(targetReplica.SecondaryNum, (index) => {\n const nodeId = `${targetReplica.ReplicaSetId}-node-slave${index}`;\n return { text: nodeId, value: nodeId };\n });\n if (targetReplica) {\n result = [\n { text: `${targetReplica.ReplicaSetId}-node-primary`, value: `${targetReplica.ReplicaSetId}-node-primary` },\n ...result,\n ];\n }\n await instanceStorage.setExtraStorage(\n this.service,\n this.queryMonitorExtraConfg.Node.dim_KeyInStorage,\n result.map((item) => ({ NodeId: item.value, _InstanceAliasValue: item.value }))\n );\n return result;\n }\n\n return [];\n }\n}\n","import coreModule from 'grafana/app/core/core_module';\nimport { map, get, find, times } from 'lodash';\nimport { MONGODBFieldsDescriptor, templateQueryIdMap } from './query_def';\nimport { GetServiceFromNamespace } from '../../common/constants';\n\nexport class MongoDBQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.MONGODBFieldsDescriptor = MONGODBFieldsDescriptor;\n };\n\n $scope.onChecked = (srcField, dstField) => {\n if ($scope.target.queries[srcField] === true) {\n $scope.target.queries[dstField] = false;\n }\n $scope.onChange();\n };\n\n $scope.getDropdown = (field) => {\n switch (field) {\n default:\n return [];\n }\n };\n\n $scope.onInstanceChange = (n, o) => {\n if (n === o) {\n return;\n }\n $scope.target.replica = '';\n $scope.target.node = '';\n };\n\n $scope.getVariableId = (data, type) => {\n let variableData = data;\n const service = GetServiceFromNamespace('QCE/CMONGO');\n\n variableData = $scope.datasource.getServiceFn(service, 'getVariable')(variableData);\n if (!variableData) {\n return '';\n }\n try {\n variableData = JSON.parse(variableData)[templateQueryIdMap[type]];\n } catch (error) {\n // console.log();\n }\n return variableData;\n };\n\n $scope.getExtraDropdown = async (target, type) => {\n const { instance, replica } = $scope.target;\n const service = GetServiceFromNamespace('QCE/CMONGO');\n const instanceId = $scope.getVariableId(instance, 'instance');\n const region = $scope.datasource.getServiceFn(service, 'getVariable')(target.region);\n const [res] = await $scope.datasource.getServiceFn(service, 'getInstances')(region, {\n InstanceIds: [instanceId],\n });\n if (type === 'replica') {\n return map(get(res, 'ReplicaSets', []), (item) => {\n item._InstanceAliasValue = item.ReplicaSetId;\n return { text: item.ReplicaSetId, value: JSON.stringify(item) };\n });\n }\n if (type === 'node' && replica !== '') {\n const replicaId = $scope.getVariableId(replica, 'replica');\n const targetReplica = find(get(res, 'ReplicaSets', []), { ReplicaSetId: replicaId });\n const options = times(targetReplica.SecondaryNum, (index) => {\n const nodeId = `${targetReplica.ReplicaSetId}-node-slave${index}`;\n return {\n text: nodeId,\n value: JSON.stringify({ NodeId: nodeId, _InstanceAliasValue: `${targetReplica.ReplicaSetId} - ${nodeId}` }),\n };\n });\n return [\n {\n text: `${targetReplica.ReplicaSetId}-node-primary`,\n value: JSON.stringify({\n NodeId: `${targetReplica.ReplicaSetId}-node-primary`,\n _InstanceAliasValue: `${targetReplica.ReplicaSetId} - ${`${targetReplica.ReplicaSetId}-node-primary`}`,\n }),\n },\n ...options,\n ];\n }\n return [];\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n \n
\n
\n \n \n \n \n \n \n \n
\n
\n
\n\n
\n
\n \n
\n \n \n
\n
\n
\n\n
\n
\n \n
\n \n \n
\n
\n
\n`;\n\nexport function mongodbQuery() {\n return {\n template: template,\n controller: MongoDBQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n onRefresh: '&',\n onChange: '&',\n },\n link: (scope, element, attrs) => {\n scope.$watch('target.instance', (newValue, oldValue) => {\n scope.onInstanceChange?.(newValue, oldValue);\n });\n },\n };\n}\n\ncoreModule.directive('mongodbQuery', mongodbQuery);\n","import _ from 'lodash';\nconst InstanceTypes = [\n { text: '所有实例', value: 0 },\n { text: '正式实例', value: 1 },\n { text: '临时实例', value: 2 },\n { text: '只读实例', value: 3 },\n { text: '正式,只读,灾备实例', value: -1 },\n];\n\nconst ClusterTypes = [\n { text: '副本集实例', value: 0 },\n { text: '分片实例', value: 1 },\n { text: '所有实例', value: -1 },\n];\n\nconst Status = [\n { text: '待初始化', value: 0 },\n { text: '流程执行中', value: 1 },\n { text: '实例有效', value: 2 },\n { text: '实例已过期', value: -2 },\n];\n\nconst PayMode = [\n { text: '按量计费', value: 0 },\n { text: '包年包月', value: 1 },\n { text: '按量包年包月计费', value: -1 },\n];\n\nconst OrderBy = [\n { text: 'ProjectId', value: 'ProjectId' },\n { text: 'InstanceName', value: 'InstanceName' },\n { text: 'CreateTime', value: 'CreateTime' },\n];\n\nconst OrderByType = [\n { text: '升序', value: 'ASC' },\n { text: '降序', value: 'DESC' },\n];\n\nconst MongoDBFields = {\n InstanceIds: [],\n InstanceType: {},\n ClusterType: {},\n Status: [],\n VpcId: '',\n SubnetId: '',\n PayMode: {},\n Limit: 20,\n Offset: 0,\n OrderBy: '',\n OrderByType: '',\n};\n\nconst MONGODBFieldsDescriptor = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputnumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputnumber',\n min: 1,\n max: 100,\n },\n {\n key: 'InstanceIds',\n enDescriptor: 'InstancesIds',\n cnDescriptor: '实例名称',\n type: 'inputmulti',\n },\n {\n key: 'InstanceType',\n enDescriptor: 'InstanceType',\n cnDescriptor: '实例类型',\n link: '',\n type: 'select',\n list: InstanceTypes,\n },\n {\n key: 'ClusterType',\n enDescriptor: 'ClusterType',\n cnDescriptor: '集群类型',\n link: '',\n type: 'select',\n list: ClusterTypes,\n },\n {\n key: 'Status',\n enDescriptor: 'Status',\n cnDescriptor: '实例状态',\n link: '',\n multiple: true,\n type: 'select',\n list: Status,\n },\n {\n key: 'VpcId',\n enDescriptor: 'VpcId',\n cnDescriptor: '私有网络的ID',\n link: '',\n type: 'input',\n },\n {\n key: 'SubnetId',\n enDescriptor: 'SubnetId',\n cnDescriptor: '私有网络的子网ID,基础网络则不传该参数。入参设置该参数的同时,必须设置相应的VpcId',\n link: '',\n type: 'input',\n },\n {\n key: 'PayMode',\n enDescriptor: 'PayMode',\n cnDescriptor: '付费类型',\n link: '',\n type: 'select',\n list: PayMode,\n },\n {\n key: 'OrderBy',\n enDescriptor: 'OrderBy',\n cnDescriptor: '排序字段',\n link: '',\n type: 'select',\n list: OrderBy,\n },\n {\n key: 'OrderByType',\n enDescriptor: 'OrderByType',\n cnDescriptor: '排序方式',\n link: '',\n type: 'select',\n list: OrderByType,\n },\n];\n\nconst MONGODB_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'InstanceId',\n queries: { ...MongoDBFields },\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n queries = _.omit(queries, ['Offset', 'Limit']);\n _.forEach(queries, (item: any, key) => {\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n params[key] = _.uniq(item);\n }\n } else if (_.isObject(item)) {\n // select 单选\n if (_.isNumber(_.get(item, 'value', undefined)) || !_.isEmpty(_.get(item, 'value', undefined))) {\n params[key] = _.get(item, 'value');\n }\n } else if (_.isNumber(item) || !_.isEmpty(item)) {\n params[key] = item;\n }\n });\n }\n return params;\n}\n\nconst MONGODBInstanceAliasList = ['InstanceId', 'InstanceName'];\n\nconst MONGODBInvalidDemensions = {\n target: 'InstanceId',\n};\n\nconst templateQueryIdMap = {\n instance: 'InstanceId',\n replica: 'ReplicaSetId',\n};\n\nconst queryMonitorExtraConfg = {\n Replica: {\n dim_KeyInStorage: 'ReplicaSets',\n dim_KeyInTarget: 'replica',\n dim_KeyInMap: 'ReplicaSetId',\n dim_KeyInIns: 'ReplicaSetId',\n },\n Node: {\n dim_KeyInStorage: 'ReplicaNodeSets',\n dim_KeyInTarget: 'node',\n dim_KeyInMap: 'NodeId',\n dim_KeyInIns: 'NodeId',\n },\n};\nexport default MONGODB_STATE;\nexport {\n MONGODBFieldsDescriptor,\n MONGODBInvalidDemensions,\n MONGODBInstanceAliasList,\n templateQueryIdMap,\n queryMonitorExtraConfg,\n GetInstanceQueryParams as MONGODBGetInstanceQueryParams,\n};\n","import { GetServiceAPIInfo } from '../../common/constants';\nimport { fetchAllFactory } from '../../common/utils';\nimport { BaseDatasource } from '../_base/datasource';\nimport {\n InvalidDemensions,\n InstanceAliasList,\n templateQueryIdMap,\n keyInStorage,\n queryMonitorExtraConfg,\n} from './query_def';\nimport instanceStorage from '../../common/datasourceStorage';\n\nexport default class MrHdfsDatasource extends BaseDatasource {\n InvalidDimensions: Record = InvalidDemensions;\n InstanceAliasList: string[] = InstanceAliasList;\n templateQueryIdMap = templateQueryIdMap;\n extrasAlias = [];\n keyInStorage = keyInStorage;\n queryMonitorExtraConfg = queryMonitorExtraConfg;\n InstanceReqConfig = {\n service: 'emr',\n action: 'DescribeInstances',\n responseField: 'ClusterList',\n interceptor: {\n request: (params) => ({\n ...params,\n DisplayStrategy: params.DisplayStrategy || 'monitorManage',\n ProjectId: params.ProjectId || -1,\n }), // 设置一些请求参数的 默认值\n response: (data: any[]) => data.map(({ ClusterId, ClusterName }) => ({ ClusterId, ClusterName })),\n },\n };\n\n async fetchAllNodes(region: string, params: any) {\n const serviceInfo = GetServiceAPIInfo(region, 'emr');\n\n // 从分页数据,获取全量数据\n const rs = await fetchAllFactory(\n (data) => {\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data,\n },\n serviceInfo.service,\n { region, action: 'DescribeClusterNodes' }\n );\n },\n { ...params, isOffsetPage: true },\n 'NodeList'\n );\n\n // return rs[0].map((item) => ({ text: item.Ip, value: item.Ip }));\n return rs[0];\n }\n\n async fetchMetricData(action: string, region: string, instance: any) {\n let result;\n switch (action) {\n case 'DescribeClusterNodes': {\n const resultT = await this.fetchAllNodes(region, { InstanceId: instance.ClusterId, NodeFlag: 'all' });\n result = resultT.map((item) => {\n item._InstanceAliasValue = item[templateQueryIdMap.node];\n return { text: item[templateQueryIdMap.node], value: item[templateQueryIdMap.node] };\n });\n await instanceStorage.setExtraStorage(this.service, this.keyInStorage.node, resultT);\n\n return result;\n }\n default:\n return [];\n }\n }\n}\n","import { InstanceQueryDescriptor, templateQueryIdMap } from './query_def';\nimport coreModule from 'grafana/app/core/core_module';\n\nconst ExtraFields = [\n {\n label: 'NodeIP',\n field: 'nodeIP',\n },\n];\n\nexport class MrQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.InstanceQueryDescriptor = InstanceQueryDescriptor;\n };\n\n $scope.getDropdown = (field) => {\n switch (field) {\n default:\n return [];\n }\n };\n\n // 各个实例下的订阅,由于不想每次都重复发请求,所以这里做了一层缓存,数据结构为{ [instanceId]: { } }\n $scope.cacheMap = {};\n\n $scope.getExtraFields = () => {\n return Object.keys($scope.dims ?? {}).some((item: string) => item.startsWith('host4')) ? ExtraFields : [];\n // return ExtraFields;\n };\n\n $scope.getInstanceId = () => {\n let { instance } = $scope.target;\n instance = $scope.datasource.getServiceFn('mrHDFS', 'getVariable')(instance);\n if (!instance) {\n return '';\n }\n try {\n instance = JSON.parse(instance).ClusterId;\n } catch (error) {\n // console.log();\n }\n return instance;\n };\n\n $scope.onExtraFieldChange = (field) => {\n $scope.onRefresh();\n };\n\n $scope.getExtraDropdown = async (target, field) => {\n if (field === 'nodeIP') {\n const InstanceId = $scope.getInstanceId();\n let data = $scope.cacheMap[InstanceId];\n\n if (!data) {\n const region = $scope.datasource.getServiceFn('mrHDFS', 'getVariable')(target.region);\n const fetcher = $scope.datasource.getServiceFn('mrHDFS', 'fetchAllNodes');\n const dataT = await fetcher(region, { InstanceId, NodeFlag: 'all' });\n data = dataT.map((item) => {\n item._InstanceAliasValue = item[templateQueryIdMap.node];\n return {\n text: item[templateQueryIdMap.node],\n value: JSON.stringify(item),\n };\n });\n }\n\n // 缓存\n $scope.cacheMap[InstanceId] = data;\n return data;\n }\n return [];\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n
\n
\n
\n \n
\n\n \n \n
\n
\n
\n
\n\n
\n`;\n\nexport function mrQuery() {\n return {\n template: template,\n controller: MrQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n onRefresh: '&',\n dims: '=',\n },\n };\n}\ncoreModule.directive('mrQuery', mrQuery);\n","import _ from 'lodash';\n\nexport const InstanceQueryDescriptor = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputnumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为10,最小值为1,最大值为100',\n link: '',\n type: 'inputnumber',\n min: 1,\n max: 100,\n },\n {\n key: 'InstanceIds',\n enDescriptor: 'InstanceIds',\n cnDescriptor: '按照一个或者多个实例ID查询。实例ID形如: emr-xxxxxxxx ',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'OrderField',\n enDescriptor: 'OrderBy',\n cnDescriptor: '排序字段',\n link: '',\n type: 'select',\n list: [\n { text: '实例ID', value: 'clusterId' },\n { text: '创建时间', value: 'addTime' },\n { text: '状态', value: 'status' },\n ],\n },\n {\n key: 'Asc',\n enDescriptor: 'Order Direction',\n cnDescriptor: '排序方式',\n link: '',\n type: 'select',\n list: [\n { text: '降序', value: 0 },\n { text: '升序', value: 1 },\n ],\n },\n {\n key: 'ProjectId',\n enDescriptor: 'ProjectId',\n cnDescriptor: '实例所属项目ID',\n link: '',\n type: 'inputnumber',\n },\n {\n key: 'DisplayStrategy',\n enDescriptor: 'DisplayStrategy',\n cnDescriptor: '集群筛选策略',\n link: '',\n type: 'select',\n list: [\n { text: '未销毁的实例', value: 'clusterList' },\n { text: '正常运行的实例', value: 'monitorManage' },\n ],\n },\n];\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n queries = _.omit(queries, ['Offset', 'Limit']);\n _.forEach(queries, (item: any, key) => {\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n params[key] = _.uniq(item);\n }\n } else if (_.isObject(item)) {\n if (_.isNumber(_.get(item, 'value', undefined)) || !_.isEmpty(_.get(item, 'value', undefined))) {\n params[key] = _.get(item, 'value');\n }\n } else if (_.isNumber(item) || !_.isEmpty(item)) {\n params[key] = item;\n }\n });\n }\n return params;\n}\n\n// 向实例里面塞dimensions对应的值,dimension中的key对应到实例中的key\nexport const InvalidDemensions = new Proxy(\n {},\n {\n get(target, k, receiver) {\n if (typeof k === 'string') {\n if (k.startsWith('id4')) return 'ClusterId'; // id4****\n if (k.startsWith('host4')) return 'Ip'; // host4***\n }\n return Reflect.get(target, k, receiver);\n },\n has(target, propKey) {\n return true;\n },\n }\n);\n\nexport const templateQueryIdMap = {\n instance: 'ClusterId',\n node: 'Ip',\n};\n\n// 需要缓存到storage的内容的key列表\nconst keyInStorage = {\n node: 'nodeIP',\n};\n\n/**\n * 如果有InstanceId额外的维度,原则上都需要传入此map结构配置\n *\n * `key` 的含义:\n * 经过InvalidDemensions处理后的string。topicId => TopicId。\n * 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId\n *\n * `value` 的含义:\n * @param {1} dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、\n * @param {2} dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。\n * 默认取通过InvalidDemsion处理后的key\n * @param {3} dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。\n * 即:templateQueryIdMap中内容。\n * 联合上面 2 的内容筛选出原始sourceMap\n */\nconst queryMonitorExtraConfg = {\n Ip: {\n dim_KeyInStorage: keyInStorage.node,\n dim_KeyInTarget: 'nodeIP',\n dim_KeyInMap: templateQueryIdMap.node,\n },\n};\n\n// 与名称挂钩的变量\nconst InstanceAliasList = ['ClusterId', 'ClusterName'];\nexport { InstanceAliasList, GetInstanceQueryParams, queryMonitorExtraConfg, keyInStorage };\n\n// 界面状态模型,default\nexport default {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'ClusterId',\n nodeIP: '',\n queries: {\n Offset: 0,\n Limit: 10,\n DisplayStrategy: '',\n OrderBy: {},\n Order: {},\n InstanceIds: [],\n ProjectId: -1,\n OrderField: '',\n Asc: '',\n },\n};\n","import _ from 'lodash';\nimport { NATGATEWAYInstanceAliasList, NATInvalidDemensions } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\n\nexport default class NATGATEWAYDatasource extends BaseDatasource {\n Namespace = 'QCE/NAT_GATEWAY';\n InstanceAliasList = NATGATEWAYInstanceAliasList;\n InvalidDimensions = NATInvalidDemensions;\n templateQueryIdMap = {\n instance: 'NatGatewayId',\n };\n InstanceReqConfig = {\n service: 'vpc',\n action: 'DescribeNatGateways',\n responseField: 'NatGatewaySet',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n}\n","import coreModule from 'grafana/app/core/core_module';\nimport { NATGatewayFilterFieldsDescriptor } from './query_def';\n\nexport class NatGatewayQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.NATGatewayFilterFieldsDescriptor = NATGatewayFilterFieldsDescriptor;\n };\n\n $scope.onChecked = (srcField, dstField) => {\n if ($scope.target.queries[srcField] === true) {\n $scope.target.queries[dstField] = false;\n }\n $scope.onChange();\n };\n\n $scope.getDropdown = (field) => {\n switch (field) {\n default:\n return [];\n }\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n \n \n \n
\n
\n\n
\n`;\n\nexport function natGatewayQuery() {\n return {\n template: template,\n controller: NatGatewayQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n },\n };\n}\n\ncoreModule.directive('natGatewayQuery', natGatewayQuery);\n","import _ from 'lodash';\n\nconst NATGATEWAYInstanceAliasList = ['NatGatewayId', 'NatGatewayName'];\n\nconst NATGatewayFilterFields = {\n 'nat-gateway-id': [],\n 'nat-gateway-name': [],\n 'vpc-id': [],\n};\n\nconst NATGatewayFilterFieldsDescriptor = [\n {\n key: 'nat-gateway-id',\n enDescriptor: 'NatGateway ID',\n cnDescriptor: 'NAT网关统一 ID',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'nat-gateway-name',\n enDescriptor: 'NatGateway Name',\n cnDescriptor: 'NatGateway Name',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'vpc-id',\n enDescriptor: 'VPC ID',\n cnDescriptor: '私有网络 ID',\n link: '',\n type: 'inputmulti',\n },\n];\n\nconst NATGATEWAY_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'NatGatewayId',\n queries: {\n Limit: 20,\n Offset: 0,\n instanceIdsChecked: false,\n filtersChecked: false,\n NatGatewayIds: [''],\n Filters: { ...NATGatewayFilterFields },\n },\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n if (queries.instanceIdsChecked) {\n if (_.isArray(queries.NatGatewayIds)) {\n const NatGatewayIds = _.compact(queries.NatGatewayIds);\n if (_.uniq(NatGatewayIds).length > 0) {\n params.InstanceIds = _.uniq(NatGatewayIds).slice(0, 100);\n }\n }\n } else if (queries.filtersChecked) {\n const Filters: any[] = [];\n _.forEach(queries.Filters, (item: any, key) => {\n if (Filters.length > 9) {\n return;\n }\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n Filters.push({ Name: key, Values: _.uniq(item).slice(0, 5) });\n }\n } else if (_.isObject(item)) {\n if (!_.isEmpty(_.get(item, 'value', []))) {\n Filters.push({ Name: key, Values: _.get(item, 'value', []).slice(0, 5) });\n }\n }\n });\n if (Filters.length > 0) {\n params.Filters = Filters;\n }\n }\n }\n return params;\n}\n\nconst templateQueryIdMap = {\n instance: 'NatGatewayId',\n};\n\nconst NATInvalidDemensions = {\n natId: 'NatGatewayId',\n};\n\nexport default NATGATEWAY_STATE;\nexport {\n NATGatewayFilterFieldsDescriptor,\n NATGATEWAYInstanceAliasList,\n templateQueryIdMap,\n NATInvalidDemensions,\n GetInstanceQueryParams as NATGATEWAYGetInstanceQueryParams,\n};\n","import _ from 'lodash';\nimport { OVCDNInstanceAliasList, OVCDNInvalidDemensions } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\n\nexport default class OVCDNDatasource extends BaseDatasource {\n Namespace = 'QCE/OV_CDN';\n InstanceAliasList = OVCDNInstanceAliasList;\n InvalidDimensions = OVCDNInvalidDemensions;\n templateQueryIdMap = {\n instance: 'Domain',\n };\n InstanceReqConfig = {\n service: 'cdn',\n action: 'DescribeDomains',\n responseField: 'Domains',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n\n async metricFindQuery(query: any, regex?: string) {\n return super.metricFindQuery({ ...query, ...{ region: 'ap-guangzhou' } }, regex);\n }\n}\n","import coreModule from 'grafana/app/core/core_module';\nimport { OVCDNFilterFieldsDescriptor } from './query_def';\n\nexport class OVCDNQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.OVCDNFilterFieldsDescriptor = OVCDNFilterFieldsDescriptor;\n };\n\n // $scope.onChecked = (srcField, dstField) => {\n // if ($scope.target.queries[srcField] === true) {\n // $scope.target.queries[dstField] = false;\n // }\n // $scope.onChange();\n // };\n\n // $scope.getDropdown = (field) => {\n // switch (field) {\n // case 'zone':\n // return $scope.getZones();\n // default:\n // return [];\n // }\n // };\n\n // $scope.getZones = () => {\n // if (!$scope.region) {\n // return [];\n // }\n // return $scope.datasource.getZones('cvm', $scope.region);\n // };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n\n\n\n\n
\n\n
\n`;\n\nexport function ovCdnQuery() {\n return {\n template: template,\n controller: OVCDNQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n },\n };\n}\n\ncoreModule.directive('ovCdnQuery', ovCdnQuery);\n","import _ from 'lodash';\nconst CDNFilterFields = {\n origin: [],\n domain: [],\n resourceId: [],\n status: [],\n serviceType: [],\n projectId: [],\n domainType: [],\n fullUrlCache: [],\n https: [],\n originPullProtocol: [],\n tagKey: [],\n};\n\nconst OVCDNFilterFieldsDescriptor = [\n {\n key: 'origin',\n enDescriptor: 'origin',\n cnDescriptor: '主源站',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'domain',\n enDescriptor: 'domain',\n cnDescriptor: '域名',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'resourceId',\n enDescriptor: 'resourceId',\n cnDescriptor: '域名id',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'status',\n enDescriptor: 'status',\n cnDescriptor: '域名状态',\n link: '',\n type: 'select',\n list: [\n { text: 'online', value: 'online' },\n { text: 'offline', value: 'offline' },\n { text: 'processing', value: 'processing' },\n ],\n },\n {\n key: 'serviceType',\n enDescriptor: 'serviceType',\n cnDescriptor: '业务类型',\n link: '',\n type: 'select',\n list: [\n { text: 'web', value: 'web' },\n { text: 'download', value: 'download' },\n { text: 'media', value: 'media' },\n ],\n },\n {\n key: 'projectId',\n enDescriptor: 'projectId',\n cnDescriptor: '项目ID',\n link: '',\n type: 'inputNumbermulti',\n },\n {\n key: 'domainType',\n enDescriptor: 'domainType',\n cnDescriptor: '主源站类型',\n link: '',\n type: 'select',\n list: [\n { text: '自有源', value: 'cname' },\n { text: 'cos接入', value: 'cos' },\n ],\n },\n {\n key: 'fullUrlCache',\n enDescriptor: 'fullUrlCache',\n cnDescriptor: '全路径缓存',\n link: '',\n type: 'select',\n list: [\n { text: '打开', value: 'on' },\n { text: '关闭', value: 'off' },\n ],\n },\n {\n key: 'https',\n enDescriptor: 'https',\n cnDescriptor: '是否配置https',\n link: '',\n type: 'select',\n list: [\n { text: 'on', value: 'on' },\n { text: 'off', value: 'off' },\n { text: 'processing', value: 'processing' },\n ],\n },\n {\n key: 'originPullProtocol',\n enDescriptor: 'originPullProtocol',\n cnDescriptor: '回源协议类型',\n link: '',\n type: 'select',\n list: [\n { text: 'http', value: 'http' },\n { text: 'follow', value: 'follow' },\n { text: 'https', value: 'https' },\n ],\n },\n {\n key: 'tagKey',\n enDescriptor: 'tagKey',\n cnDescriptor: '标签键',\n link: '',\n type: 'inputmulti',\n },\n];\n\nconst OVCDN_STATE = {\n region: 'ap-guangzhou',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'Domain',\n queries: {\n Limit: 20,\n Offset: 0,\n Filters: { ...CDNFilterFields },\n },\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n const Filters: any[] = [];\n _.forEach(queries.Filters, (item: any, key) => {\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n Filters.push({ Name: key, Value: _.uniq(item).slice(0, 5) });\n }\n } else if (_.isObject(item)) {\n if (!_.isEmpty(_.get(item, 'value', []))) {\n Filters.push({ Name: key, Value: _.get(item, 'value', []).slice(0, 5) });\n }\n }\n });\n if (Filters.length > 0) {\n params.Filters = Filters;\n }\n }\n return params;\n}\n\nconst OVCDNInstanceAliasList = ['Domain', 'ResourceId'];\n\nconst OVCDNInvalidDemensions = {\n projectId: 'ProjectId',\n domain: 'Domain',\n};\nconst templateQueryIdMap = {\n instance: 'Domain',\n};\nexport default OVCDN_STATE;\nexport {\n OVCDNFilterFieldsDescriptor,\n OVCDNInstanceAliasList,\n templateQueryIdMap,\n OVCDNInvalidDemensions,\n GetInstanceQueryParams as OVCDNGetInstanceQueryParams,\n};\n","import { PCXInstanceAliasList, namespace, templateQueryIdMap } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\nimport { GetServiceAPIInfo, GetRequestParamsV2, SliceLength } from '../../common/constants';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = PCXInstanceAliasList;\n InvalidDimensions = {};\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'xx',\n action: 'xx',\n responseField: 'xx',\n };\n\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n\n getInstances(region = 'ap-guangzhou', params = {}) {\n params = { offset: 0, limit: 50, ...params };\n const serviceInfo = GetServiceAPIInfo(region, 'pcx');\n return this.doRequestV2(\n {\n url: this.url + serviceInfo.path,\n data: params,\n },\n serviceInfo.service,\n { region, action: 'DescribeVpcPeeringConnections' }\n ).then((response) => {\n return response.data || [];\n });\n }\n\n /**\n * 模板变量中获取全量的 PCX 实例列表\n * @param region 地域信息\n */\n getVariableInstances(region, query) {\n let result: any[] = [];\n const params = { Offset: 0, Limit: 50, ...query };\n const serviceInfo = GetServiceAPIInfo(region, 'pcx');\n return this.doRequestV2(\n {\n url: this.url + serviceInfo.path,\n data: params,\n },\n serviceInfo.service,\n { region, action: 'DescribeVpcPeeringConnections' }\n ).then((response) => {\n result = response.data || [];\n const total = response.totalCount || 0;\n if (result.length >= total) {\n return result;\n } else {\n const param = SliceLength(total, 50);\n const promises: any[] = [];\n _.forEach(param, (item) => {\n promises.push(this.getInstances(region, item));\n });\n return Promise.all(promises)\n .then((responses) => {\n _.forEach(responses, (item) => {\n result = _.concat(result, item);\n });\n return result;\n })\n .catch((error) => {\n return result;\n });\n }\n });\n }\n\n getVpcId(region, params: any = {}) {\n params = { Offset: 0, Limit: 20, ...params };\n // TODO 等待腾讯云接口查问题\n params.Offset = String(params.Offset);\n params.Limit = String(params.Limit);\n const serviceInfo = GetServiceAPIInfo(region, 'vpc');\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data: params,\n },\n serviceInfo.service,\n { region, action: 'DescribeVpcs' }\n ).then((response) => {\n return _.map(response.VpcSet || [], (item) => ({ text: item.VpcId, value: item.VpcId }));\n });\n }\n\n getVpcIds(region) {\n let result: any[] = [];\n const params: any = { Offset: 0, Limit: 100 };\n // TODO 等待腾讯云接口查问题\n params.Offset = String(params.Offset);\n params.Limit = String(params.Limit);\n const serviceInfo = GetServiceAPIInfo(region, 'vpc');\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data: params,\n },\n serviceInfo.service,\n { region, action: 'DescribeVpcs' }\n ).then((response) => {\n result = _.map(response.VpcSet || [], (item) => ({ text: item.VpcId, value: item.VpcId }));\n const total = response.TotalCount || 0;\n if (result.length >= total) {\n return result;\n } else {\n const param = SliceLength(total, 100);\n const promises: any[] = [];\n _.forEach(param, (item) => {\n promises.push(this.getVpcId(region, item));\n });\n return Promise.all(promises)\n .then((responses) => {\n _.forEach(responses, (item) => {\n result = _.concat(result, item);\n });\n return result;\n })\n .catch((error) => {\n return result;\n });\n }\n });\n }\n\n /**\n * 腾讯云 API 2.0 请求接口\n * @param options\n * @param service\n * @param signObj\n */\n async doRequestV2(options, service, signObj: any = {}) {\n options = await GetRequestParamsV2(\n options,\n service,\n signObj,\n this.secretId,\n this.instanceSettings.id,\n this.backendSrv\n );\n return this.backendSrv\n .datasourceRequest(options)\n .then((response) => {\n return _.get(response, 'data', {});\n })\n .catch((error) => {\n throw error;\n });\n }\n}\n","import coreModule from 'grafana/app/core/core_module';\nimport { PCXFieldsDescriptor } from './query_def';\n\nexport class PCXQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.PCXFieldsDescriptor = PCXFieldsDescriptor;\n };\n\n $scope.onChecked = (srcField, dstField) => {\n if ($scope.target.queries[srcField] === true) {\n $scope.target.queries[dstField] = false;\n }\n $scope.onChange();\n };\n\n $scope.getDropdown = (field) => {\n switch (field) {\n case 'vpcId':\n return $scope.getVpcIds();\n default:\n return [];\n }\n };\n\n $scope.getVpcIds = () => {\n if (!$scope.region) {\n return [];\n }\n return $scope.datasource.getVpcIds('pcx', $scope.region);\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n \n
\n
\n \n \n \n \n \n \n \n
\n
\n\n
\n`;\n\nexport function pcxQuery() {\n return {\n template: template,\n controller: PCXQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n onChange: '&',\n },\n };\n}\n\ncoreModule.directive('pcxQuery', pcxQuery);\n","import _ from 'lodash';\nconst namespace = 'QCE/PCX';\n\nconst PCXFields = {\n limit: 20,\n offset: 0,\n peeringConnectionId: '',\n peeringConnectionName: '',\n vpcId: '',\n state: undefined,\n};\n\nconst PCX_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'peeringConnectionId',\n queries: { ...PCXFields },\n};\n\nconst StateTypes = [\n { text: '申请中', value: 0 },\n { text: '连接成功', value: 1 },\n { text: '已过期', value: 2 },\n { text: '对端已拒绝', value: 3 },\n { text: '对端已删除', value: 4 },\n];\n\nconst PCXFieldsDescriptor = [\n {\n key: 'offset',\n enDescriptor: 'offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputnumber',\n min: 0,\n },\n {\n key: 'limit',\n enDescriptor: 'limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为50',\n link: '',\n type: 'inputnumber',\n min: 1,\n max: 50,\n },\n {\n key: 'peeringConnectionId',\n enDescriptor: 'PeeringConnection Id',\n cnDescriptor: '私有网络对等连接 ID',\n link: '',\n type: 'input',\n },\n {\n key: 'peeringConnectionName',\n enDescriptor: 'PeeringConnection Name',\n cnDescriptor: '对等连接名称',\n link: '',\n type: 'input',\n },\n {\n key: 'vpcId',\n enDescriptor: 'vpcId',\n cnDescriptor: '发起方私有网络 ID 值',\n link: 'https://cloud.tencent.com/document/api/215/1372',\n type: 'dropdown',\n },\n {\n key: 'state',\n enDescriptor: 'state',\n cnDescriptor: '连接状态',\n link: '',\n type: 'select',\n list: StateTypes,\n },\n];\n\nconst PCXInstanceAliasList = ['peeringConnectionId', 'peeringConnectionName'];\n\nconst templateQueryIdMap = {\n instance: 'peeringConnectionId',\n};\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.limit = _.get(queries, 'limit', 20) || 20;\n params.offset = _.get(queries, 'offset', 0) || 0;\n queries = _.omit(queries, ['offset', 'limit']);\n _.forEach(queries, (item: any, key) => {\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n params[key] = _.uniq(item);\n }\n } else if (_.isObject(item)) {\n if (_.isNumber(_.get(item, 'value', undefined)) || !_.isEmpty(_.get(item, 'value', undefined))) {\n params[key] = _.get(item, 'value');\n }\n } else if (_.isNumber(item) || !_.isEmpty(item)) {\n params[key] = item;\n }\n });\n }\n return params;\n}\n\nexport default PCX_STATE;\n\nexport {\n PCXInstanceAliasList,\n PCXFieldsDescriptor,\n templateQueryIdMap,\n namespace,\n GetInstanceQueryParams as PCXGetInstanceQueryParams,\n};\n","import _ from 'lodash';\nimport {\n POSTGRESInstanceAliasList,\n PostgreInvalidDemensions,\n namespace,\n modifyDimensons,\n templateQueryIdMap,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\n\nexport default class CDBDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = POSTGRESInstanceAliasList;\n InvalidDimensions = PostgreInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n InstanceReqConfig = {\n service: 'postgres',\n action: 'DescribeDBInstances',\n responseField: 'DBInstanceSet',\n };\n\n MetricReqConfig = {\n resultFilter: modifyDimensons,\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n}\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import _ from 'lodash';\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\nconst namespace = 'QCE/POSTGRES';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'postgresQuery';\n\nconst PostgresFields = {\n 'db-instance-id': [],\n 'db-instance-name': [],\n};\n\nconst PostgresFieldsDescriptor: FildDescriptorType = [\n {\n key: 'db-instance-id',\n enDescriptor: 'DB Instance ID',\n cnDescriptor: 'DB 实例ID',\n link: '',\n type: 'inputMulti',\n min: 0,\n },\n {\n key: 'db-instance-name',\n enDescriptor: 'DB Instance Name',\n cnDescriptor: 'DB 实例名称',\n link: '',\n type: 'inputMulti',\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/409/16773',\n namespace,\n fieldDescriptor: PostgresFieldsDescriptor,\n};\nconst POSTGRESInstanceAliasList = ['DBInstanceId', 'DBInstanceName'];\n\nconst POSTGRES_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'DBInstanceId',\n queries: {\n Limit: 20,\n Offset: 0,\n Filters: { ...PostgresFields },\n },\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, true);\n}\nfunction modifyDimensons(metricItem: any) {\n const metricTmp = _.cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n item.Dimensions = ['resourceId'];\n });\n return metricTmp;\n}\nconst PostgreInvalidDemensions = {\n uid: 'DBInstanceId',\n resourceId: 'DBInstanceId',\n};\nconst templateQueryIdMap = {\n instance: 'DBInstanceId',\n};\nexport default POSTGRES_STATE;\n\nexport {\n PostgresFieldsDescriptor,\n POSTGRESInstanceAliasList,\n templateQueryIdMap,\n modifyDimensons,\n namespace,\n queryEditorName,\n queryEditorConfig,\n PostgreInvalidDemensions,\n GetInstanceQueryParams as POSTGRESGetInstanceQueryParams,\n};\n","import { get } from 'lodash';\nimport { QAAPInstanceAliasList, QAAPInvalidDemensions, namespace, templateQueryIdMap } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\n\nexport default class QAAPDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = QAAPInstanceAliasList;\n InvalidDimensions = QAAPInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'gaap',\n action: 'DescribeProxies',\n responseField: 'ProxySet',\n interceptor: {\n // response: (data: unknown[]) =>[\n // {\n // \"NetDetectId\": \"netd-12345678\",\n // },\n // ],\n },\n };\n // MetricReqConfig = {\n // resultFilter: modifyDimensons,\n // };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return rawSet.filter(\n (item) =>\n get(item, 'Dimensions.length') === 1 &&\n get(item, 'Dimensions[0].Dimensions.length') === 1 &&\n get(item, 'Dimensions[0].Dimensions[0]') === 'channelId'\n );\n }\n}\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import _ from 'lodash';\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/QAAP';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'qaapQuery';\n\nconst QAAPInvalidDemensions = {\n channelId: 'InstanceId',\n};\n\nconst QAAPInstanceAliasList = ['InstanceId'];\n\nconst templateQueryIdMap = {\n instance: 'InstanceId',\n};\n\n// select类型需要注意是{},multi后缀是[]\nconst QAAPFilterFields = {\n Limit: 20,\n Offset: 0,\n ProjectId: [],\n AccessRegion: [],\n RealServerRegion: [],\n GroupId: [],\n};\n\nconst QAAPFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'ProjectId',\n enDescriptor: 'ProjectId',\n cnDescriptor: '项目ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'AccessRegion',\n enDescriptor: 'AccessRegion',\n cnDescriptor: '接入地域',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'RealServerRegion',\n enDescriptor: 'RealServerRegion',\n cnDescriptor: '源站地域',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'GroupId',\n enDescriptor: 'GroupId',\n cnDescriptor: '通道组ID',\n link: '',\n type: 'inputMulti',\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/608/36963',\n namespace,\n fieldDescriptor: QAAPFilterFieldsDescriptor,\n};\n\nconst QAAP_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'InstanceId',\n queries: QAAPFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, true);\n}\nfunction modifyDimensons(metricItem: any) {\n const metricTmp = _.cloneDeep(metricItem);\n // metricTmp.Dimensions.forEach((item) => {\n // item.Dimensions = ['netDetectId'];\n // });\n return metricTmp;\n}\nexport default QAAP_STATE;\nexport {\n QAAPFilterFieldsDescriptor,\n templateQueryIdMap,\n QAAPInstanceAliasList,\n QAAPInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n modifyDimensons,\n GetInstanceQueryParams as QAAPGetInstanceQueryParams,\n};\n","import _ from 'lodash';\nimport { REDISInstanceAliasList, RedisInvalidDemensions, isValidMetric } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\n\nexport default class REDISDatasource extends BaseDatasource {\n Namespace = 'QCE/REDIS';\n InstanceAliasList = REDISInstanceAliasList;\n InvalidDimensions = RedisInvalidDemensions;\n templateQueryIdMap = {\n instance: 'InstanceId',\n };\n InstanceReqConfig = {\n service: 'redis',\n action: 'DescribeInstances',\n responseField: 'InstanceSet',\n interceptor: {\n request: (params) => ({ ...params, MonitorVersion: '1m' }),\n },\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return rawSet.filter((item) => isValidMetric(item));\n }\n}\n","import coreModule from 'grafana/app/core/core_module';\nimport { RedisFieldsDescriptor } from './query_def';\n\nexport class RedisQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.RedisFieldsDescriptor = RedisFieldsDescriptor;\n };\n\n $scope.onChecked = (srcField, dstField) => {\n if ($scope.target.queries[srcField] === true) {\n $scope.target.queries[dstField] = false;\n }\n $scope.onChange();\n };\n\n $scope.getDropdown = (field) => {\n switch (field) {\n default:\n return [];\n }\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n \n
\n
\n \n \n \n \n \n \n \n
\n
\n\n
\n`;\n\nexport function redisQuery() {\n return {\n template: template,\n controller: RedisQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n onChange: '&',\n },\n };\n}\n\ncoreModule.directive('redisQuery', redisQuery);\n","import _ from 'lodash';\nconst BillingMode = [\n { text: '按量计费', value: 'postpaid' },\n { text: '包年包月', value: 'prepaid' },\n];\n\nconst AutoRenew = [\n { text: '手动续费', value: 0 },\n { text: '自动续费', value: 1 },\n { text: '明确不自动续费', value: 2 },\n];\n\nconst Status = [\n { text: '待初始化', value: 0 },\n { text: '流程执行中', value: 1 },\n { text: '运行中', value: 2 },\n { text: '已隔离', value: -2 },\n { text: '待删除', value: -3 },\n];\n\nconst TypeVersion = [\n { text: '单机版', value: 1 },\n { text: '主从版', value: 2 },\n { text: '集群版', value: 3 },\n];\n\nconst OrderBy = [\n { text: 'projectId', value: 'projectId' },\n { text: 'instancename', value: 'instancename' },\n { text: 'createtime', value: 'createtime' },\n { text: 'type', value: 'type' },\n { text: 'curDeadline', value: 'curDeadline' },\n];\n\nconst OrderType = [\n { text: '升序', value: 0 },\n { text: '降序', value: 1 },\n];\nconst Type = [\n { text: 'Redis老集群版', value: 1 },\n { text: 'Redis 2.8主从版', value: 2 },\n { text: 'CKV主从版', value: 3 },\n { text: 'CKV集群版', value: 4 },\n { text: 'Redis 2.8单机版', value: 5 },\n { text: 'Redis 4.0主从版', value: 6 },\n { text: 'Redis 4.0集群版', value: 7 },\n { text: 'Redis5.0主从版', value: 8 },\n { text: 'Redis5.0集群版', value: 9 },\n];\n\nconst RedisFields = {\n InstanceId: '',\n OrderBy: '',\n OrderType: null,\n VpcIds: [],\n SubnetIds: [],\n ProjectIds: [],\n SearchKey: '',\n InstanceName: '',\n UniqVpcIds: [],\n UniqSubnetIds: [],\n Status: [],\n TypeVersion: null,\n EngineName: '',\n AutoRenew: null,\n BillingMode: '',\n Type: null,\n};\n\nconst RedisFieldsDescriptor = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputnumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputnumber',\n min: 1,\n max: 100,\n },\n {\n key: 'InstanceId',\n enDescriptor: 'InstancesId',\n cnDescriptor: '实例id',\n type: 'input',\n },\n {\n key: 'OrderBy',\n enDescriptor: 'OrderBy',\n cnDescriptor: '排序字段',\n link: '',\n type: 'select',\n list: OrderBy,\n },\n {\n key: 'OrderType',\n enDescriptor: 'OrderType',\n cnDescriptor: '排序字段',\n link: '',\n type: 'select',\n list: OrderType,\n },\n {\n key: 'VpcIds',\n enDescriptor: 'VpcIds',\n cnDescriptor: '私有网络ID数组,数组下标从0开始,如果不传则默认选择基础网络,如:47525',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'SubnetIds',\n enDescriptor: 'SubnetIds',\n cnDescriptor: '子网ID数组,数组下标从0开始,如:56854',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'ProjectIds',\n enDescriptor: 'ProjectIds',\n cnDescriptor: '项目ID 组成的数组',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'SearchKey',\n enDescriptor: 'SearchKey',\n cnDescriptor: '查找实例的ID',\n link: '',\n type: 'input',\n },\n {\n key: 'InstanceName',\n enDescriptor: 'InstanceName',\n cnDescriptor: '实例名称',\n link: '',\n type: 'input',\n },\n {\n key: 'UniqVpcIds',\n enDescriptor: 'UniqVpcIds',\n cnDescriptor: '私有网络ID数组,数组下标从0开始,如果不传则默认选择基础网络,如:vpc-sad23jfdfk',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'UniqSubnetIds',\n enDescriptor: 'UniqSubnetIds',\n cnDescriptor: '子网ID数组,数组下标从0开始,如:subnet-fdj24n34j2',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'Status',\n enDescriptor: 'Status',\n cnDescriptor: '实例状态',\n multiple: true,\n type: 'select',\n list: Status,\n },\n {\n key: 'TypeVersion',\n enDescriptor: 'TypeVersion',\n cnDescriptor: '类型版本',\n link: '',\n type: 'select',\n list: TypeVersion,\n },\n {\n key: 'EngineName',\n enDescriptor: 'EngineName',\n cnDescriptor: '引擎信息:Redis-2.8,Redis-4.0,CKV',\n link: '',\n type: 'input',\n },\n {\n key: 'AutoRenew',\n enDescriptor: 'AutoRenew',\n cnDescriptor: '续费模式',\n multiple: true,\n type: 'select',\n list: AutoRenew,\n },\n {\n key: 'BillingMode',\n enDescriptor: 'BillingMode',\n cnDescriptor: '计费模式:postpaid-按量计费;prepaid-包年包月',\n link: '',\n type: 'select',\n list: BillingMode,\n },\n {\n key: 'Type',\n enDescriptor: 'Type',\n cnDescriptor: '实例类型',\n link: '',\n type: 'select',\n list: Type,\n },\n];\n\nconst REDIS_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'InstanceId',\n queries: { ...RedisFields },\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n queries = _.omit(queries, ['Offset', 'Limit']);\n _.forEach(queries, (item: any, key) => {\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n params[key] = _.uniq(item);\n }\n } else if (_.isObject(item)) {\n // select 单选\n if (_.isNumber(_.get(item, 'value', undefined)) || !_.isEmpty(_.get(item, 'value', undefined))) {\n params[key] = _.get(item, 'value');\n }\n } else if (_.isNumber(item) || !_.isEmpty(item)) {\n params[key] = item;\n }\n });\n }\n return params;\n}\n\nfunction isValidMetric(metricObj: any = {}) {\n const dimension = _.get(metricObj, 'Dimensions[0].Dimensions');\n return dimension.length === 1 && _.indexOf(dimension, 'instanceid') !== -1;\n}\n\nconst REDISInstanceAliasList = ['InstanceId', 'InstanceName', 'WanIp'];\n\nconst RedisInvalidDemensions = {\n redis_uuid: 'InstanceId',\n instanceid: 'InstanceId',\n};\n\nconst templateQueryIdMap = {\n instance: 'InstanceId',\n};\nexport default REDIS_STATE;\nexport {\n RedisFieldsDescriptor,\n RedisInvalidDemensions,\n templateQueryIdMap,\n REDISInstanceAliasList,\n isValidMetric,\n GetInstanceQueryParams as REDISGetInstanceQueryParams,\n};\n","import _ from 'lodash';\nimport {\n REDISMEMInstanceAliasList,\n namespace,\n RedisMemInvalidDemensions,\n templateQueryIdMap,\n NodeType,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport { GetServiceAPIInfo } from '../../common/constants';\nimport { fetchAllFactory } from '../../common/utils';\n\nexport default class REDISDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = REDISMEMInstanceAliasList;\n InvalidDimensions = RedisMemInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n extrasAlias = [RedisMemInvalidDemensions.pnodeid, RedisMemInvalidDemensions.rnodeid];\n InstanceReqConfig = {\n service: 'redis',\n action: 'DescribeInstances',\n responseField: 'InstanceSet',\n interceptor: {\n request: (params) => ({ ...params, MonitorVersion: '5s' }),\n },\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n\n async getInstanceNodeInfo(params: any) {\n const { region, instanceId } = params;\n const serviceInfo = GetServiceAPIInfo(region, 'redis');\n\n const res = await fetchAllFactory(\n (data) => {\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data,\n },\n serviceInfo.service,\n { region, action: 'DescribeInstanceNodeInfo' }\n );\n },\n {\n InstanceId: instanceId,\n },\n NodeType\n );\n\n return res;\n }\n async fetchMetricData(action: string, region: string, instance: any, query: any) {\n if (action === 'DescribeInstanceNodeInfo') {\n const rs = await this.getInstanceNodeInfo({ region, instanceId: instance[this.templateQueryIdMap.instance] });\n const { nodetype } = query;\n const ndoeTypeIndex = NodeType.indexOf(nodetype);\n return ndoeTypeIndex === -1\n ? []\n : _.map(rs[ndoeTypeIndex], (item) => ({ text: item.NodeId, value: item.NodeId }));\n }\n return [];\n }\n}\n","import coreModule from 'grafana/app/core/core_module';\nimport { map } from 'lodash';\nimport { RedisMemFieldsDescriptor, templateQueryIdMap, NodeType, namespace } from './query_def';\nimport { GetServiceFromNamespace } from '../../common/constants';\n\nexport class RedisMemQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.RedisMemFieldsDescriptor = RedisMemFieldsDescriptor;\n };\n\n $scope.clearExtrasAlias = () => {\n $scope.target.rnodeid = '';\n $scope.target.pnodeid = '';\n };\n\n $scope.onChecked = (srcField, dstField) => {\n if ($scope.target.queries[srcField] === true) {\n $scope.target.queries[dstField] = false;\n }\n $scope.onChange();\n };\n\n $scope.getDropdown = (field) => {\n switch (field) {\n default:\n return [];\n }\n };\n\n $scope.getVariableId = (data, type) => {\n let variableData = data;\n const service = GetServiceFromNamespace(namespace);\n\n variableData = $scope.datasource.getServiceFn(service, 'getVariable')(variableData);\n if (!variableData) {\n return '';\n }\n try {\n variableData = JSON.parse(variableData)[templateQueryIdMap[type]];\n } catch (error) {}\n return variableData;\n };\n\n $scope.getExtraDropdown = async (target, nodetype) => {\n const { instance } = $scope.target;\n const service = GetServiceFromNamespace(namespace);\n const instanceId = $scope.getVariableId(instance, 'instance');\n const region = $scope.datasource.getServiceFn(service, 'getVariable')(target.region);\n const rs = await $scope.datasource.getServiceFn(service, 'getInstanceNodeInfo')({ region, instanceId });\n\n const ndoeTypeIndex = NodeType.indexOf(nodetype);\n return ndoeTypeIndex === -1 ? [] : map(rs[ndoeTypeIndex], (item) => ({ text: item.NodeId, value: item.NodeId }));\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n \n
\n
\n \n \n \n \n \n \n \n
\n
\n\n
\n\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n \n
\n \n \n
\n
\n
\n`;\n\nexport function redisMemQuery() {\n return {\n template: template,\n controller: RedisMemQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n onChange: '&',\n onRefresh: '&',\n dims: '=',\n },\n link: (scope, element, attrs) => {\n scope.$watch('target.instance', () => {\n scope.clearExtrasAlias?.();\n });\n scope.$watch('target.metricName', () => {\n scope.clearExtrasAlias?.();\n });\n },\n };\n}\n\ncoreModule.directive('redisMemQuery', redisMemQuery);\n","import _ from 'lodash';\n\nconst namespace = 'QCE/REDIS_MEM';\nconst BillingMode = [\n { text: '按量计费', value: 'postpaid' },\n { text: '包年包月', value: 'prepaid' },\n];\n\nconst AutoRenew = [\n { text: '手动续费', value: 0 },\n { text: '自动续费', value: 1 },\n { text: '明确不自动续费', value: 2 },\n];\n\nconst Status = [\n { text: '待初始化', value: 0 },\n { text: '流程执行中', value: 1 },\n { text: '运行中', value: 2 },\n { text: '已隔离', value: -2 },\n { text: '待删除', value: -3 },\n];\n\nconst TypeVersion = [\n { text: '单机版', value: 1 },\n { text: '主从版', value: 2 },\n { text: '集群版', value: 3 },\n];\n\nconst OrderBy = [\n { text: 'projectId', value: 'projectId' },\n { text: 'instancename', value: 'instancename' },\n { text: 'createtime', value: 'createtime' },\n { text: 'type', value: 'type' },\n { text: 'curDeadline', value: 'curDeadline' },\n];\n\nconst OrderType = [\n { text: '升序', value: 0 },\n { text: '降序', value: 1 },\n];\nconst Type = [\n { text: 'Redis老集群版', value: 1 },\n { text: 'Redis 2.8主从版', value: 2 },\n { text: 'CKV主从版', value: 3 },\n { text: 'CKV集群版', value: 4 },\n { text: 'Redis 2.8单机版', value: 5 },\n { text: 'Redis 4.0主从版', value: 6 },\n { text: 'Redis 4.0集群版', value: 7 },\n { text: 'Redis5.0主从版', value: 8 },\n { text: 'Redis5.0集群版', value: 9 },\n];\n\nconst RedisFields = {\n InstanceId: '',\n OrderBy: '',\n OrderType: null,\n VpcIds: [],\n SubnetIds: [],\n ProjectIds: [],\n SearchKey: '',\n InstanceName: '',\n UniqVpcIds: [],\n UniqSubnetIds: [],\n Status: [],\n TypeVersion: null,\n EngineName: '',\n AutoRenew: null,\n BillingMode: '',\n Type: null,\n};\n\nconst RedisMemFieldsDescriptor = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputnumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputnumber',\n min: 1,\n max: 100,\n },\n {\n key: 'InstanceId',\n enDescriptor: 'InstancesId',\n cnDescriptor: '实例id',\n type: 'input',\n },\n {\n key: 'OrderBy',\n enDescriptor: 'OrderBy',\n cnDescriptor: '排序字段',\n link: '',\n type: 'select',\n list: OrderBy,\n },\n {\n key: 'OrderType',\n enDescriptor: 'OrderType',\n cnDescriptor: '排序字段',\n link: '',\n type: 'select',\n list: OrderType,\n },\n {\n key: 'VpcIds',\n enDescriptor: 'VpcIds',\n cnDescriptor: '私有网络ID数组,数组下标从0开始,如果不传则默认选择基础网络,如:47525',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'SubnetIds',\n enDescriptor: 'SubnetIds',\n cnDescriptor: '子网ID数组,数组下标从0开始,如:56854',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'ProjectIds',\n enDescriptor: 'ProjectIds',\n cnDescriptor: '项目ID 组成的数组',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'SearchKey',\n enDescriptor: 'SearchKey',\n cnDescriptor: '查找实例的ID',\n link: '',\n type: 'input',\n },\n {\n key: 'InstanceName',\n enDescriptor: 'InstanceName',\n cnDescriptor: '实例名称',\n link: '',\n type: 'input',\n },\n {\n key: 'UniqVpcIds',\n enDescriptor: 'UniqVpcIds',\n cnDescriptor: '私有网络ID数组,数组下标从0开始,如果不传则默认选择基础网络,如:vpc-sad23jfdfk',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'UniqSubnetIds',\n enDescriptor: 'UniqSubnetIds',\n cnDescriptor: '子网ID数组,数组下标从0开始,如:subnet-fdj24n34j2',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'Status',\n enDescriptor: 'Status',\n cnDescriptor: '实例状态',\n multiple: true,\n type: 'select',\n list: Status,\n },\n {\n key: 'TypeVersion',\n enDescriptor: 'TypeVersion',\n cnDescriptor: '类型版本',\n link: '',\n type: 'select',\n list: TypeVersion,\n },\n {\n key: 'EngineName',\n enDescriptor: 'EngineName',\n cnDescriptor: '引擎信息:Redis-2.8,Redis-4.0,CKV',\n link: '',\n type: 'input',\n },\n {\n key: 'AutoRenew',\n enDescriptor: 'AutoRenew',\n cnDescriptor: '续费模式',\n multiple: true,\n type: 'select',\n list: AutoRenew,\n },\n {\n key: 'BillingMode',\n enDescriptor: 'BillingMode',\n cnDescriptor: '计费模式:postpaid-按量计费;prepaid-包年包月',\n link: '',\n type: 'select',\n list: BillingMode,\n },\n {\n key: 'Type',\n enDescriptor: 'Type',\n cnDescriptor: '实例类型',\n link: '',\n type: 'select',\n list: Type,\n },\n];\n\nconst REDISMEM_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'InstanceId',\n queries: { ...RedisFields },\n rnodeid: '',\n pnodeid: '',\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n queries = _.omit(queries, ['Offset', 'Limit']);\n _.forEach(queries, (item: any, key) => {\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n params[key] = _.uniq(item);\n }\n } else if (_.isObject(item)) {\n // select 单选\n if (_.isNumber(_.get(item, 'value', undefined)) || !_.isEmpty(_.get(item, 'value', undefined))) {\n params[key] = _.get(item, 'value');\n }\n } else if (_.isNumber(item) || !_.isEmpty(item)) {\n params[key] = item;\n }\n });\n }\n return params;\n}\n\nconst REDISMEMInstanceAliasList = ['InstanceId', 'InstanceName', 'WanIp'];\n\nconst RedisMemInvalidDemensions = {\n instanceid: 'InstanceId',\n rnodeid: 'rnodeid',\n pnodeid: 'pnodeid',\n};\n\nconst templateQueryIdMap = {\n instance: 'InstanceId',\n rnodeid: 'rnodeid',\n pnodeid: 'pnodeid',\n};\n\nconst NodeType = ['Redis', 'Proxy'];\n\nexport default REDISMEM_STATE;\nexport {\n RedisMemFieldsDescriptor,\n RedisMemInvalidDemensions,\n REDISMEMInstanceAliasList,\n templateQueryIdMap,\n namespace,\n NodeType,\n GetInstanceQueryParams as REDISMEMGetInstanceQueryParams,\n};\n","import _ from 'lodash';\nimport { GetServiceAPIInfo } from '../../common/constants';\nimport { BaseDatasource } from '../_base/datasource';\nimport {\n SCFInstanceAliasList,\n SCFInvalidDemensions,\n regionSupported,\n queryMonitorExtraConfg,\n keyInStorage,\n templateQueryIdMap,\n} from './query_def';\nimport instanceStorage from '../../common/datasourceStorage';\nimport { t } from '../../../locale';\n\nexport default class SCFDatasource extends BaseDatasource {\n InstanceKey: string;\n Namespace: string;\n InstanceAliasList: string[];\n InvalidDimensions: Record;\n templateQueryIdMap = templateQueryIdMap;\n queryMonitorExtraConfg = queryMonitorExtraConfg;\n keyInStorage = keyInStorage;\n InstanceReqConfig: { service?: string | undefined; action: string; responseField: string };\n\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n\n this.Namespace = 'QCE/SCF_V2';\n this.InstanceAliasList = SCFInstanceAliasList;\n this.InvalidDimensions = SCFInvalidDemensions;\n this.InstanceReqConfig = {\n service: 'scf',\n action: 'ListFunctions',\n responseField: 'Functions',\n };\n }\n\n getRegions() {\n return Promise.resolve(regionSupported.map(({ value }) => ({ value, text: t(value) })));\n }\n\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return rawSet.filter(\n (item) =>\n /* hack:这里多加了筛选条件,是因为后端数据不准确,坑啊! 只拿取包含functionName的指标 */\n item.Dimensions?.[0]?.Dimensions?.includes('functionName') &&\n item.Dimensions?.[0]?.Dimensions?.includes('namespace') &&\n !item.MetricName.startsWith('Name')\n );\n }\n\n getVersions(region, params) {\n const serviceInfo = GetServiceAPIInfo(region, 'scf');\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data: params,\n },\n serviceInfo.service,\n { region, action: 'ListVersionByFunction' }\n ).then((response) => {\n return response.Versions;\n });\n }\n\n async fetchMetricData(action: string, region: string, instance: any) {\n // console.log({ action, region, instance });\n if (action === 'ListVersionByFunction') {\n const rs = await this.getVersions(region, { FunctionName: instance[this.templateQueryIdMap.instance] });\n const result = rs.map((o) => {\n o._InstanceAliasValue = o[this.templateQueryIdMap.version];\n return {\n text: o[this.templateQueryIdMap.version],\n value: o[this.templateQueryIdMap.version],\n };\n });\n await instanceStorage.setExtraStorage(this.service, this.keyInStorage.version, rs);\n return result;\n }\n return [];\n }\n}\n","import coreModule from 'grafana/app/core/core_module';\nimport { SCFQueryDescriptor, templateQueryIdMap } from './query_def';\n\nexport class SCFQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.SCFQueryDescriptor = SCFQueryDescriptor;\n };\n\n $scope.getInstanceId = () => {\n let { instance } = $scope.target;\n instance = $scope.datasource.getServiceFn('scf', 'getVariable')(instance);\n if (!instance) {\n return '';\n }\n try {\n instance = JSON.parse(instance).FunctionName;\n } catch (error) {\n // console.log();\n }\n return instance;\n };\n\n $scope.getVersions = async (target) => {\n // console.log(2222);\n\n // return [{ text: 1, value: 1 }];\n // console.log(target, 'target');\n // let { instance, region } = target;\n const FunctionName = $scope.getInstanceId();\n const region = $scope.datasource.getServiceFn('scf', 'getVariable')(target.region);\n if (!FunctionName || !region) return [];\n\n const fetcher = $scope.datasource.getServiceFn('scf', 'getVersions');\n\n return fetcher(region, { FunctionName }).then((res) => {\n // console.log(res, 'res');\n const result = res.map((o) => {\n o._InstanceAliasValue = o[templateQueryIdMap.version];\n return {\n text: o[templateQueryIdMap.version],\n value: JSON.stringify(o),\n };\n });\n return result;\n });\n };\n // $scope.onChecked = (srcField, dstField) => {\n // if ($scope.target.queries[srcField] === true) {\n // $scope.target.queries[dstField] = false;\n // }\n // $scope.onChange();\n // };\n\n // $scope.getDropdown = (field) => {\n // switch (field) {\n // case 'zone':\n // return $scope.getZones();\n // default:\n // return [];\n // }\n // };\n\n // $scope.getZones = () => {\n // if (!$scope.region) {\n // return [];\n // }\n // return $scope.datasource.getZones('cvm', $scope.region);\n // };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n \n
\n \n \n
\n
\n
\n\n
\n`;\n\nexport function scfQuery() {\n return {\n template: template,\n controller: SCFQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n onRefresh: '&',\n },\n };\n}\ncoreModule.directive('scfQuery', scfQuery);\n","import _ from 'lodash';\n\nexport const SCFQueryDescriptor = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputnumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputnumber',\n min: 1,\n max: 100,\n },\n {\n key: 'SearchKey',\n enDescriptor: 'SearchKey',\n cnDescriptor: '支持FunctionName模糊匹配',\n link: '',\n type: 'input',\n },\n {\n key: 'Namespace',\n enDescriptor: 'Namespace',\n cnDescriptor: '云函数命名空间',\n link: '',\n type: 'input',\n },\n {\n key: 'Description',\n enDescriptor: 'Description',\n cnDescriptor: '函数描述,支持模糊搜索',\n link: '',\n type: 'input',\n },\n {\n key: 'OrderBy',\n enDescriptor: 'OrderBy',\n cnDescriptor: '排序字段',\n link: '',\n type: 'select',\n list: [\n { text: 'AddTime', value: 'AddTime' },\n { text: 'ModTime', value: 'ModTime' },\n { text: 'FunctionName', value: 'FunctionName' },\n ],\n },\n {\n key: 'Order',\n enDescriptor: 'Order Direction',\n cnDescriptor: '排序方式',\n link: '',\n type: 'select',\n list: [\n { text: 'ASC', value: 'ASC' },\n { text: 'DESC', value: 'DESC' },\n ],\n },\n // {\n // key: 'Filters',\n // enDescriptor: 'Filters',\n // cnDescriptor: '按照标签键值对进行过滤',\n // link: '',\n // type: 'dropdownmulti',\n // },\n];\n\nconst SCF_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'FunctionName',\n version: '',\n queries: {\n Offset: 0,\n Limit: 20,\n OrderBy: {},\n Order: {},\n SearchKey: '',\n Namespace: '',\n Description: '',\n // Filters: {},\n },\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n queries = _.omit(queries, ['Offset', 'Limit']);\n _.forEach(queries, (item: any, key) => {\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n params[key] = _.uniq(item);\n }\n } else if (_.isObject(item)) {\n if (_.isNumber(_.get(item, 'value', undefined)) || !_.isEmpty(_.get(item, 'value', undefined))) {\n params[key] = _.get(item, 'value');\n }\n } else if (_.isNumber(item) || !_.isEmpty(item)) {\n params[key] = item;\n }\n });\n }\n return params;\n}\n\nconst SCFInstanceAliasList = ['FunctionId', 'FunctionName'];\n\n// 向实例里面塞dimensions对应的值,dimension中的key对应到实例中的key\nconst SCFInvalidDemensions = {\n functionName: 'FunctionName',\n namespace: 'Namespace',\n version: 'Version',\n};\n\nconst templateQueryIdMap = {\n instance: 'FunctionName',\n version: 'Version',\n};\nconst regionSupported = [\n { value: 'ap-beijing' },\n { value: 'ap-chengdu' },\n { value: 'ap-chongqing' },\n { value: 'ap-guangzhou' },\n { value: 'ap-hongkong' },\n { value: 'ap-mumbai' },\n { value: 'ap-shanghai' },\n { value: 'ap-shanghai-fsi' },\n { value: 'ap-shenzhen-fsi' },\n { value: 'ap-singapore' },\n { value: 'ap-tokyo' },\n { value: 'eu-frankfurt' },\n { value: 'na-siliconvalley' },\n { value: 'na-toronto' },\n];\n// 需要缓存到storage的内容的key列表\nconst keyInStorage = {\n version: 'version',\n};\n/*\n如果有InstanceId额外的维度,原则上都需要传入此map结构配置\nkey的含义:\n 经过InvalidDemensions处理后的string。topicId =》TopicId。\n 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId\nvalue的含义:\n 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、\n 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。\n 默认取通过InvalidDemsion处理后的key\n 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。\n 即:templateQueryIdMap中内容。\n 联合上面2的内容筛选出原始sourceMap\n*/\nconst queryMonitorExtraConfg = {\n Version: {\n dim_KeyInStorage: keyInStorage.version,\n dim_KeyInTarget: 'version',\n dim_KeyInMap: templateQueryIdMap.version,\n },\n};\nexport default SCF_STATE;\nexport {\n SCFInstanceAliasList,\n SCFInvalidDemensions,\n queryMonitorExtraConfg,\n regionSupported,\n templateQueryIdMap,\n keyInStorage,\n GetInstanceQueryParams as SCFGetInstanceQueryParams,\n};\n\n// monitor监控数据默认支持的维度\nexport const SCFDefaultDimensionList = ['functionName', 'namespace', 'version'];\n","import {\n SQLSERVERInstanceAliasList,\n SQLSERVERInvalidDemensions,\n namespace,\n templateQueryIdMap,\n regionSupported,\n modifyDimensons,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport { GetServiceAPIInfo } from '../../common/constants';\nimport _ from 'lodash';\nimport { t } from '../../../locale';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = SQLSERVERInstanceAliasList;\n InvalidDimensions = SQLSERVERInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'sqlserver',\n action: 'DescribeDBInstances',\n responseField: 'DBInstances',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return _.compact(rawSet.map((item) => modifyDimensons(item)));\n }\n getRegions() {\n return Promise.resolve(regionSupported.map(({ value }) => ({ value, text: t(value) })));\n }\n getFilterDropdown({ field, region }) {\n if (field === 'Zone') {\n const serviceInfo = GetServiceAPIInfo(region, 'cvm');\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n },\n serviceInfo.service,\n { region, action: 'DescribeZones' }\n ).then((response) => {\n return _.filter(\n _.map(response.ZoneSet || [], (item) => {\n return { text: item.ZoneName, value: item.Zone, ZoneState: item.ZoneState, Zone: item.Zone };\n }),\n (item) => item.ZoneState === 'AVAILABLE'\n );\n });\n }\n return [];\n }\n}\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service)\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\nimport _ from 'lodash';\n\nconst namespace = 'QCE/SQLSERVER';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'sqlserverQuery';\n\nconst SQLSERVERInvalidDemensions = {\n resourceId: 'InstanceId',\n};\n\nconst SQLSERVERInstanceAliasList = ['InstanceId', 'Name'];\n\nconst templateQueryIdMap = {\n instance: 'InstanceId',\n};\n\n// select类型需要注意是{},multi后缀是[]\nconst SQLSERVERNETFilterFields = {\n Limit: 20,\n Offset: 0,\n ProjectId: null,\n Status: {},\n InstanceIdSet: [],\n PayMode: {},\n VpcId: '',\n SubnetId: '',\n VipSet: [],\n InstanceNameSet: [],\n VersionSet: [],\n Zone: '',\n};\n\nconst SQLSERVERNETFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'ProjectId',\n enDescriptor: 'ProjectId',\n cnDescriptor: '项目ID',\n link: '',\n type: 'inputNumber',\n },\n {\n key: 'Status',\n enDescriptor: 'Status',\n cnDescriptor: '实例状态',\n link: '',\n type: 'select',\n list: [\n { text: '申请中', value: 1 },\n { text: '运行中', value: 2 },\n { text: '受限运行中 (主备切换中)', value: 3 },\n { text: '已隔离', value: 4 },\n { text: '回收中', value: 5 },\n { text: '已回收', value: 6 },\n { text: '任务执行中', value: 7 },\n { text: '已下线', value: 8 },\n { text: '实例扩容中', value: 9 },\n { text: '实例迁移中', value: 10 },\n { text: '只读', value: 11 },\n { text: '重启中', value: 12 },\n ],\n },\n {\n key: 'InstanceIdSet',\n enDescriptor: 'InstanceIdSet',\n cnDescriptor: '实例ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'PayMode',\n enDescriptor: 'PayMode',\n cnDescriptor: '子网实例ID',\n link: '',\n type: 'select',\n list: [\n { text: '包年包月', value: 1 },\n { text: '按量计费', value: 0 },\n ],\n },\n {\n key: 'VpcId',\n enDescriptor: 'VpcId',\n cnDescriptor: '实例所属VPC的唯一字符串ID',\n link: '',\n type: 'input',\n },\n {\n key: 'SubnetId',\n enDescriptor: 'SubnetId',\n cnDescriptor: '实例所属子网的唯一字符串ID',\n link: '',\n type: 'input',\n },\n {\n key: 'VipSet',\n enDescriptor: 'VipSet',\n cnDescriptor: '实例内网地址列表',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'InstanceNameSet',\n enDescriptor: 'InstanceNameSet',\n cnDescriptor: '实例名称列表, 模糊查询',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'VersionSet',\n enDescriptor: 'VersionSet',\n cnDescriptor: '实例版本代号列表',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'Zone',\n enDescriptor: 'Zone',\n cnDescriptor: '实例可用区',\n link: '',\n type: 'dropdown',\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/238/19969',\n namespace,\n fieldDescriptor: SQLSERVERNETFilterFieldsDescriptor,\n};\n\n// regions for dropdown\nconst regionSupported = [\n { value: 'ap-beijing' },\n { value: 'ap-chengdu' },\n { value: 'ap-chongqing' },\n { value: 'ap-guangzhou' },\n { value: 'ap-hongkong' },\n { value: 'ap-nanjing' },\n { value: 'ap-seoul' },\n { value: 'ap-shanghai' },\n { value: 'ap-shanghai-fsi' },\n { value: 'ap-shenzhen-fsi' },\n { value: 'ap-singapore' },\n { value: 'ap-tokyo' },\n { value: 'eu-moscow' },\n { value: 'na-siliconvalley' },\n];\nconst SQLSERVER_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'InstanceId',\n queries: SQLSERVERNETFilterFields,\n};\n\nfunction modifyDimensons(metricItem) {\n const metricTmp = _.cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n item.Dimensions = ['resourceId'];\n });\n return metricTmp;\n}\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, false);\n}\nexport default SQLSERVER_STATE;\nexport {\n SQLSERVERNETFilterFieldsDescriptor,\n templateQueryIdMap,\n SQLSERVERInstanceAliasList,\n SQLSERVERInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n regionSupported,\n modifyDimensons,\n // 对应产品的service的全大写拼接InstanceQueryParams\n GetInstanceQueryParams as SQLSERVERGetInstanceQueryParams,\n};\n","import { TCAPLUSInstanceAliasList, TCAPLUSInvalidDemensions, namespace, templateQueryIdMap } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\nimport { t } from '../../../locale';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = TCAPLUSInstanceAliasList;\n InvalidDimensions = TCAPLUSInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'tcaplusdb',\n action: 'DescribeTables',\n responseField: 'TableInfos',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n // 重写getRegion\n getRegions() {\n return this.doRequest(\n {\n url: this.url + '/tcaplusdb',\n },\n 'tcaplusdb',\n { action: 'DescribeRegions', region: 'ap-guangzhou' }\n ).then((response) => {\n return _.map(response.RegionInfos || [], (item) => {\n return {\n text: t(item.RegionName),\n value: item.RegionName,\n };\n });\n });\n }\n}\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service)\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport _ from 'lodash';\n\nconst namespace = 'QCE/TCAPLUS';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'tcaplusQuery';\n\nconst TCAPLUSInvalidDemensions = {\n // TableInstanceId: 'TableInstanceId',\n // ClusterId: 'ClusterId',\n};\n\n// 需和文件名对应\nconst TCAPLUSInstanceAliasList = ['TableInstanceId', 'TableName'];\n\nconst templateQueryIdMap = {\n instance: 'TableInstanceId',\n};\n\n// select类型需要注意是{},multi后缀是[],dropdown是类型\nconst TCAPLUSFilterFields = {\n Limit: 20,\n Offset: 0,\n ClusterId: '',\n TableGroupIds: [],\n\n TableName: '',\n TableInstanceId: '',\n TableIdlType: {},\n TableType: {},\n ListElementNum: null,\n ReservedVolume: null,\n ReservedReadQps: null,\n ReservedWriteQps: null,\n Memo: '',\n FileName: '',\n FileExtType: '',\n FileSize: null,\n FileContent: '',\n};\n\nconst TCAPLUSFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'ClusterId',\n enDescriptor: 'ClusterId',\n cnDescriptor: '表格所属集群ID',\n link: '',\n type: 'input',\n },\n {\n key: 'TableGroupIds',\n enDescriptor: 'TableGroupIds',\n cnDescriptor: '表格组ID列表',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'TableName',\n enDescriptor: 'TableName',\n cnDescriptor: '表格名称',\n link: '',\n type: 'input',\n },\n {\n key: 'TableInstanceId',\n enDescriptor: 'TableInstanceId',\n cnDescriptor: '表实例ID',\n link: '',\n type: 'input',\n },\n {\n key: 'TableIdlType',\n enDescriptor: 'TableIdlType',\n cnDescriptor: '表格描述语言类型',\n link: '',\n type: 'select',\n list: [\n { text: 'PROTO', value: 'PROTO' },\n { text: 'TDR', value: 'TDR' },\n ],\n },\n {\n key: 'TableType',\n enDescriptor: 'TableType',\n cnDescriptor: '表格数据结构类型',\n link: '',\n type: 'select',\n list: [\n { text: 'GENERIC', value: 'GENERIC' },\n { text: 'LIST', value: 'LIST' },\n ],\n },\n {\n key: 'ListElementNum',\n enDescriptor: 'ListElementNum',\n cnDescriptor: 'LIST表元素个数',\n link: '',\n type: 'inputNumber',\n },\n {\n key: 'ReservedVolume',\n enDescriptor: 'ReservedVolume',\n cnDescriptor: '表格预留容量(GB)',\n link: '',\n type: 'inputNumber',\n },\n {\n key: 'ReservedReadQps',\n enDescriptor: 'ReservedReadQps',\n cnDescriptor: '表格预留读CU',\n link: '',\n type: 'inputNumber',\n },\n {\n key: 'ReservedWriteQps',\n enDescriptor: 'ReservedWriteQps',\n cnDescriptor: '表格预留写CU',\n link: '',\n type: 'inputNumber',\n },\n {\n key: 'Memo',\n enDescriptor: 'Memo',\n cnDescriptor: '表格备注信息',\n link: '',\n type: 'input',\n },\n {\n key: 'FileName',\n enDescriptor: 'FileName',\n cnDescriptor: 'Key回档文件名,回档专用',\n link: '',\n type: 'input',\n },\n {\n key: 'FileExtType',\n enDescriptor: 'FileExtType',\n cnDescriptor: 'Key回档文件扩展名,回档专用',\n link: '',\n type: 'input',\n },\n {\n key: 'FileSize',\n enDescriptor: 'FileSize',\n cnDescriptor: 'Key回档文件大小,回档专用',\n link: '',\n type: 'inputNumber',\n },\n {\n key: 'FileContent',\n enDescriptor: 'FileContent',\n cnDescriptor: 'Key回档文件内容,回档专用',\n link: '',\n type: 'input',\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/596/39664',\n namespace,\n fieldDescriptor: TCAPLUSFilterFieldsDescriptor,\n};\n\nconst TCAPLUS_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'TableInstanceId',\n queries: TCAPLUSFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n params.ClusterId = _.get(queries, 'ClusterId', '') || '';\n params.TableGroupIds = _.get(queries, 'TableGroupIds', []) || [];\n queries = _.omit(queries, ['Offset', 'Limit', 'TableGroupIds', 'ClusterId']);\n const SelectedTables: any[] = [];\n _.forEach(queries, (item: any, key) => {\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n SelectedTables[key] = _.uniq(item);\n }\n } else if (_.isObject(item)) {\n if (_.isNumber(_.get(item, 'value', undefined)) || !_.isEmpty(_.get(item, 'value', undefined))) {\n SelectedTables[key] = _.get(item, 'value');\n }\n } else if (_.isNumber(item) || !_.isEmpty(item)) {\n SelectedTables[key] = item;\n }\n });\n params.SelectedTables = SelectedTables;\n return params;\n}\n// 和其他产品的展示保持一致\nconst regonsMap = {\n 'ap-beijing': '华北地区(北京)',\n 'ap-guangzhou': '华南地区(广州)',\n 'ap-hongkong': '港澳台地区(中国香港)',\n 'ap-seoul': '亚太东北(首尔)',\n 'ap-shanghai': '华东地区(上海)',\n 'ap-singapore': '亚太东南(新加坡)',\n 'ap-tokyo': '亚太东北(东京)',\n 'eu-frankfurt': '欧洲地区(法兰克福)',\n 'na-ashburn': '美国东部(弗吉尼亚)',\n 'na-siliconvalley': '美国西部(硅谷)',\n};\nexport default TCAPLUS_STATE;\nexport {\n TCAPLUSFilterFieldsDescriptor,\n templateQueryIdMap,\n TCAPLUSInstanceAliasList,\n TCAPLUSInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n regonsMap,\n // 对应产品的service的全大写拼接GetInstanceQueryParams\n GetInstanceQueryParams as TCAPLUSGetInstanceQueryParams,\n};\n","import {\n TDMQInstanceAliasList,\n TDMQInvalidDemensions,\n namespace,\n templateQueryIdMap,\n regionSupported,\n modifyDimensons,\n queryMonitorExtraConfg,\n keyInStorage,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\nimport { GetServiceAPIInfo } from '../../common/constants';\nimport { fetchAllFactory } from '../../common/utils';\nimport instanceStorage from '../../common/datasourceStorage';\nimport { t } from '../../../locale';\n\nexport default class TDMQDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = TDMQInstanceAliasList;\n InvalidDimensions = TDMQInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n queryMonitorExtraConfg = queryMonitorExtraConfg;\n keyInStorage = keyInStorage;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'tdmq',\n action: 'DescribeClusters',\n responseField: 'ClusterSet',\n };\n extraActionMap = {\n DescribeTopics: {\n service: 'tdmq',\n action: 'DescribeTopics',\n responseField: 'TopicSets',\n pickKey: 'TopicName',\n },\n DescribeEnvironments: {\n service: 'tdmq',\n action: 'DescribeEnvironments',\n responseField: 'EnvironmentSet',\n pickKey: 'EnvironmentId',\n },\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n // getFilterDropdown({ field }) {\n // return super.getRegions();\n // }\n getRegions() {\n return Promise.resolve(regionSupported.map(({ value }) => ({ value, text: t(value) })));\n }\n\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return _.compact(rawSet.map((item) => modifyDimensons(item)));\n }\n\n async getConsumerList(params: any) {\n const { region, action: act, payload } = params;\n const { service, action, responseField } = this.extraActionMap[act];\n\n const serviceInfo = GetServiceAPIInfo(region, service);\n\n // 从分页数据,获取全量数据\n const rs = await fetchAllFactory(\n (data) => {\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data,\n },\n serviceInfo.service,\n { region, action }\n );\n },\n payload,\n responseField\n );\n // console.log({ rs });\n return rs[0];\n }\n async fetchMetricData(action: string, region: string, instance: any, query: any) {\n const payload: any = {\n Limit: 100,\n ClusterId: instance[this.templateQueryIdMap.instance],\n };\n if (Object.keys(this.extraActionMap).indexOf(action) !== -1) {\n if (action === 'DescribeTopics') {\n payload.EnvironmentId = this.getVariable(query['environmentid']);\n }\n const rs = await this.getConsumerList({ region, action, payload });\n const { pickKey } = this.extraActionMap[action];\n const result = rs.map((o) => {\n o._InstanceAliasValue = o[this.templateQueryIdMap[pickKey]];\n return {\n text: o[this.templateQueryIdMap[pickKey]],\n value: o[this.templateQueryIdMap[pickKey]],\n };\n });\n await instanceStorage.setExtraStorage(this.service, this.keyInStorage[pickKey], rs);\n return result;\n }\n return [];\n }\n}\n","import coreModule from 'grafana/app/core/core_module';\nimport { TDMQFilterFieldsDescriptor, queryEditorName, namespace, templateQueryIdMap } from './query_def';\nimport { GetServiceFromNamespace } from '../../common/constants';\n\nconst ExtraFields = [\n {\n label: 'environmentId',\n field: 'environmentId',\n action: 'DescribeEnvironments',\n },\n {\n label: 'topicName',\n field: 'topicName',\n action: 'DescribeTopics',\n },\n];\n\nconst dropdownTextConfig = {\n DescribeTopics: 'topicName',\n DescribeEnvironments: 'environmentId',\n};\nexport class QueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.TDMQFilterFieldsDescriptor = TDMQFilterFieldsDescriptor;\n $scope.ExtraFields = ExtraFields;\n $scope.namespace = namespace;\n };\n\n $scope.getInstanceId = () => {\n let { instance } = $scope.target;\n const service = GetServiceFromNamespace($scope.namespace);\n instance = $scope.datasource.getServiceFn(service, 'getVariable')(instance);\n if (!instance) {\n return '';\n }\n try {\n instance = JSON.parse(instance)[templateQueryIdMap.instance];\n } catch (error) {\n // console.log();\n }\n return instance;\n };\n $scope.getExtraFields = () => {\n return ExtraFields.filter((item) => item.field in ($scope.dims ?? {}) || item.label in ($scope.dims ?? {}));\n };\n $scope.getExtraDropdown = async (target, action) => {\n const service = GetServiceFromNamespace($scope.namespace);\n const region = $scope.datasource.getServiceFn(service, 'getVariable')(target.region);\n const payload: any = {\n Limit: 100,\n ClusterId: $scope.getInstanceId(),\n };\n if (action === 'DescribeTopics') {\n let evId = $scope.target.environmentId;\n try {\n evId = JSON.parse(evId);\n evId = evId[templateQueryIdMap.environmentId];\n } catch (e) {}\n payload.EnvironmentId = evId;\n }\n\n const rs = await $scope.datasource.getServiceFn(service, 'getConsumerList')({ region, action, payload });\n const result = rs.map((o) => {\n o._InstanceAliasValue = o[templateQueryIdMap[dropdownTextConfig[action]]];\n return {\n text: o[templateQueryIdMap[dropdownTextConfig[action]]],\n label: o[templateQueryIdMap[dropdownTextConfig[action]]],\n value: JSON.stringify(o),\n };\n });\n return result;\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n`;\n\nexport function sQuery() {\n return {\n template: template,\n controller: QueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n onRefresh: '&',\n dims: '=',\n },\n };\n}\ncoreModule.directive(queryEditorName, sQuery);\n","// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service)\nimport { FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\nimport _ from 'lodash';\n\nconst namespace = 'QCE/TDMQ';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'tdmqQuery';\n\nconst TDMQInvalidDemensions = {\n tenantId: 'ClusterId',\n tenant: 'ClusterId',\n topicName: 'TopicName',\n environmentId: 'EnvironmentId',\n};\n\n// 需和文件名对应\nconst TDMQInstanceAliasList = ['ClusterId', 'ClusterName'];\n\nconst templateQueryIdMap = {\n instance: 'ClusterId',\n topicName: 'TopicName',\n environmentId: 'EnvironmentId',\n};\n\n// select类型需要注意是{},multi后缀是[],dropdown是''\nconst TDMQFilterFields = {\n Limit: 20,\n Offset: 0,\n};\n\nconst TDMQFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n];\n\nconst CDNPROVINCE_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'ClusterId',\n // 此处key应该是经过TDMQInvalidDemensions处理后的\n topicName: '',\n environmentId: '',\n queries: TDMQFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, true);\n}\nconst regionSupported = [\n { value: 'ap-beijing' },\n { value: 'ap-chengdu' },\n { value: 'ap-chongqing' },\n { value: 'ap-guangzhou' },\n { value: 'ap-shenzhen-fsi' },\n { value: 'ap-shanghai' },\n { value: 'ap-shanghai-fsi' },\n { value: 'ap-nanjing' },\n { value: 'ap-hongkong' },\n { value: 'ap-tokyo' },\n { value: 'ap-seoul' },\n { value: 'ap-singapore' },\n { value: 'ap-bangkok' },\n { value: 'ap-jakarta' },\n { value: 'ap-mumbai' },\n { value: 'eu-frankfurt' },\n { value: 'eu-moscow' },\n { value: 'na-ashburn' },\n { value: 'na-siliconvalley' },\n { value: 'na-toronto' },\n];\nfunction modifyDimensons(metricItem) {\n const metricTmp = _.cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n if (item.Dimensions.indexOf('topicName') !== -1 && item.Dimensions.indexOf('environmentId') === -1) {\n item.Dimensions.push('environmentId');\n }\n });\n return metricTmp;\n}\n// 需要缓存到storage的内容的key列表\nconst keyInStorage = {\n topicName: 'topicName',\n environmentId: 'environmentId',\n};\n/*\n如果有InstanceId额外的维度,原则上都需要传入此map结构配置\nkey的含义:\n 经过InvalidDemensions处理后的string。topicId =》TopicId。\n 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId\nvalue的含义:\n 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、\n 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。\n 默认取通过InvalidDemsion处理后的key\n 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。\n 即:templateQueryIdMap中内容。\n 联合上面2的内容筛选出原始sourceMap\n*/\nconst queryMonitorExtraConfg = {\n TopicName: {\n dim_KeyInStorage: keyInStorage.topicName,\n dim_KeyInTarget: 'topicName',\n dim_KeyInMap: templateQueryIdMap.topicName,\n },\n EnvironmentId: {\n dim_KeyInStorage: keyInStorage.environmentId,\n dim_KeyInTarget: 'environmentId',\n dim_KeyInMap: templateQueryIdMap.environmentId,\n },\n};\nexport default CDNPROVINCE_STATE;\nexport {\n TDMQFilterFieldsDescriptor,\n templateQueryIdMap,\n TDMQInstanceAliasList,\n TDMQInvalidDemensions,\n namespace,\n queryEditorName,\n queryMonitorExtraConfg,\n keyInStorage,\n modifyDimensons,\n regionSupported,\n // 对应产品的service的全大写拼接GetInstanceQueryParams\n GetInstanceQueryParams as TDMQGetInstanceQueryParams,\n};\n","import {\n TDMQRABBITMQInstanceAliasList,\n TDMQInvalidDemensions,\n namespace,\n templateQueryIdMap,\n regionSupported,\n queryMonitorExtraConfg,\n keyInStorage,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\nimport { GetServiceAPIInfo } from '../../common/constants';\nimport { fetchAllFactory } from '../../common/utils';\nimport instanceStorage from '../../common/datasourceStorage';\nimport { t } from '../../../locale';\n\nexport default class TDMQDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = TDMQRABBITMQInstanceAliasList;\n InvalidDimensions = TDMQInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n queryMonitorExtraConfg = queryMonitorExtraConfg;\n keyInStorage = keyInStorage;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'tdmq',\n action: 'DescribeRabbitMQVipInstances',\n responseField: 'Instances',\n };\n extraActionMap = {\n DescribeRabbitMQNodeList: {\n service: 'tdmq',\n action: 'DescribeRabbitMQNodeList',\n responseField: 'NodeList',\n pickKey: 'node',\n },\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n\n getRegions() {\n return Promise.resolve(regionSupported.map(({ value }) => ({ value, text: t(value) })));\n }\n\n async getConsumerList(params: any) {\n const { region, action: act, payload } = params;\n const { service, action, responseField } = this.extraActionMap[act];\n\n const serviceInfo = GetServiceAPIInfo(region, service);\n\n // 从分页数据,获取全量数据\n const rs = await fetchAllFactory(\n (data) => {\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data,\n },\n serviceInfo.service,\n { region, action }\n );\n },\n payload,\n responseField\n );\n return rs[0];\n }\n async fetchMetricData(action: string, region: string, instance: any, query: any) {\n const payload: any = {\n Limit: 100,\n InstanceId: instance[this.templateQueryIdMap.instance],\n };\n if (Object.keys(this.extraActionMap).indexOf(action) !== -1) {\n const rs = await this.getConsumerList({ region, action, payload });\n const { pickKey } = this.extraActionMap[action];\n const result = rs.map((o) => {\n o._InstanceAliasValue = o[this.templateQueryIdMap[pickKey]];\n return {\n text: o[this.templateQueryIdMap[pickKey]],\n value: o[this.templateQueryIdMap[pickKey]],\n };\n });\n await instanceStorage.setExtraStorage(this.service, this.keyInStorage[pickKey], rs);\n return result;\n }\n return [];\n }\n}\n","import coreModule from 'grafana/app/core/core_module';\nimport { TDMQFilterFieldsDescriptor, namespace, templateQueryIdMap } from './query_def';\nimport { GetServiceFromNamespace } from '../../common/constants';\n\nconst ExtraFields = [\n {\n label: 'Node',\n field: 'node',\n action: 'DescribeRabbitMQNodeList',\n },\n];\n\nconst dropdownTextConfig = {\n DescribeRabbitMQNodeList: 'node',\n};\nexport class QueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.TDMQFilterFieldsDescriptor = TDMQFilterFieldsDescriptor;\n $scope.ExtraFields = ExtraFields;\n $scope.namespace = namespace;\n };\n\n $scope.clearExtrasAlias = () => {\n $scope.target.node = '';\n };\n\n $scope.getInstanceId = () => {\n let { instance } = $scope.target;\n const service = GetServiceFromNamespace($scope.namespace);\n instance = $scope.datasource.getServiceFn(service, 'getVariable')(instance);\n if (!instance) {\n return '';\n }\n try {\n instance = JSON.parse(instance)[templateQueryIdMap.instance];\n } catch (error) {\n // console.log();\n }\n return instance;\n };\n $scope.getExtraFields = () => {\n return ExtraFields.filter((item) => item.field in ($scope.dims ?? {}) || item.label in ($scope.dims ?? {}));\n };\n $scope.getExtraDropdown = async (target, action) => {\n const service = GetServiceFromNamespace($scope.namespace);\n const region = $scope.datasource.getServiceFn(service, 'getVariable')(target.region);\n const payload: any = {\n Limit: 100,\n InstanceId: $scope.getInstanceId(),\n };\n\n const rs = await $scope.datasource.getServiceFn(service, 'getConsumerList')({ region, action, payload });\n const result = rs.map((o) => {\n o._InstanceAliasValue = o[templateQueryIdMap[dropdownTextConfig[action]]];\n return {\n text: o[templateQueryIdMap[dropdownTextConfig[action]]],\n label: o[templateQueryIdMap[dropdownTextConfig[action]]],\n value: JSON.stringify(o),\n };\n });\n return result;\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n`;\n\nexport function sQuery() {\n return {\n template: template,\n controller: QueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n onRefresh: '&',\n dims: '=',\n },\n link: (scope, element, attrs) => {\n scope.$watch('target.instance', () => {\n scope.clearExtrasAlias?.();\n });\n scope.$watch('target.metricName', () => {\n scope.clearExtrasAlias?.();\n });\n },\n };\n}\ncoreModule.directive('tdmqRabbitmqQuery', sQuery);\n","// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service)\nimport { FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\nimport _ from 'lodash';\n\nconst namespace = 'QCE/RABBITMQ';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'tdmqQuery';\n\nconst TDMQInvalidDemensions = {\n instanceid: 'InstanceId',\n node: 'NodeName',\n};\n\n// 需和文件名对应\nconst TDMQRABBITMQInstanceAliasList = ['InstanceId', 'InstanceName'];\n\nconst templateQueryIdMap = {\n instance: 'InstanceId',\n node: 'NodeName',\n};\n\n// select类型需要注意是{},multi后缀是[],dropdown是''\nconst TDMQFilterFields = {\n Limit: 20,\n Offset: 0,\n};\n\nconst TDMQFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n];\n\nconst TDMQ_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'InstanceId',\n // 此处key应该是经过TDMQInvalidDemensions处理后的\n node: '',\n queries: TDMQFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, true);\n}\nconst regionSupported = [\n { value: 'ap-beijing' },\n { value: 'ap-chengdu' },\n { value: 'ap-chongqing' },\n { value: 'ap-guangzhou' },\n { value: 'ap-shenzhen-fsi' },\n { value: 'ap-shanghai' },\n { value: 'ap-shanghai-fsi' },\n { value: 'ap-nanjing' },\n { value: 'ap-hongkong' },\n { value: 'ap-tokyo' },\n { value: 'ap-seoul' },\n { value: 'ap-singapore' },\n { value: 'ap-bangkok' },\n { value: 'ap-jakarta' },\n { value: 'ap-mumbai' },\n { value: 'eu-frankfurt' },\n { value: 'eu-moscow' },\n { value: 'na-ashburn' },\n { value: 'na-siliconvalley' },\n { value: 'na-toronto' },\n];\n\n// 需要缓存到storage的内容的key列表\nconst keyInStorage = {\n node: 'NodeName',\n};\n/*\n如果有InstanceId额外的维度,原则上都需要传入此map结构配置\nkey的含义:\n 经过InvalidDemensions处理后的string。topicId =》TopicId。\n 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId\nvalue的含义:\n 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、\n 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。\n 默认取通过InvalidDemsion处理后的key\n 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。\n 即:templateQueryIdMap中内容。\n 联合上面2的内容筛选出原始sourceMap\n*/\nconst queryMonitorExtraConfg = {\n NodeName: {\n dim_KeyInStorage: keyInStorage.node,\n dim_KeyInTarget: 'node',\n dim_KeyInMap: templateQueryIdMap.node,\n },\n};\nexport default TDMQ_STATE;\nexport {\n TDMQFilterFieldsDescriptor,\n templateQueryIdMap,\n TDMQRABBITMQInstanceAliasList,\n TDMQInvalidDemensions,\n namespace,\n queryEditorName,\n queryMonitorExtraConfg,\n keyInStorage,\n regionSupported,\n // 对应产品的service的全大写拼接GetInstanceQueryParams\n GetInstanceQueryParams as TDMQGetInstanceQueryParams,\n};\n","import {\n TDMQROCKETMQInstanceAliasList,\n TDMQInvalidDemensions,\n namespace,\n templateQueryIdMap,\n regionSupported,\n queryMonitorExtraConfg,\n keyInStorage,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\nimport { GetServiceAPIInfo } from '../../common/constants';\nimport { fetchAllFactory } from '../../common/utils';\nimport instanceStorage from '../../common/datasourceStorage';\nimport { t } from '../../../locale';\n\nexport default class TDMQDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = TDMQROCKETMQInstanceAliasList;\n InvalidDimensions = TDMQInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n queryMonitorExtraConfg = queryMonitorExtraConfg;\n keyInStorage = keyInStorage;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'tdmq',\n action: 'DescribeRocketMQClusters',\n responseField: 'ClusterList',\n interceptor: {\n response: (result) =>\n _.map(result, (item) => ({\n ...item,\n ClusterId: _.get(item, 'Info.ClusterId', ''),\n ClusterName: _.get(item, 'Info.ClusterName', ''),\n })),\n },\n };\n extraActionMap = {\n DescribeRocketMQNamespaces: {\n service: 'tdmq',\n action: 'DescribeRocketMQNamespaces',\n responseField: 'Namespaces',\n pickKey: 'namespace',\n },\n DescribeRocketMQGroups: {\n service: 'tdmq',\n action: 'DescribeRocketMQGroups',\n responseField: 'Groups',\n pickKey: 'group',\n },\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return rawSet.filter((item) => !item.Dimensions?.[0]?.Dimensions?.includes('rmqcluster'));\n }\n\n getRegions() {\n return Promise.resolve(regionSupported.map(({ value }) => ({ value, text: t(value) })));\n }\n\n async getConsumerList(params: any) {\n const { region, action: act, payload } = params;\n const { service, action, responseField } = this.extraActionMap[act];\n\n const serviceInfo = GetServiceAPIInfo(region, service);\n\n // 从分页数据,获取全量数据\n const rs = await fetchAllFactory(\n (data) => {\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data,\n },\n serviceInfo.service,\n { region, action }\n );\n },\n payload,\n responseField\n );\n return rs[0];\n }\n async fetchMetricData(action: string, region: string, instance: any, query: any) {\n const payload: any = {\n Limit: 100,\n ClusterId: instance[this.templateQueryIdMap.instance],\n };\n if (Object.keys(this.extraActionMap).indexOf(action) !== -1) {\n if (action === 'DescribeRocketMQGroups') {\n payload.NamespaceId = this.getVariable(query['clusternamespace']);\n }\n const rs = await this.getConsumerList({ region, action, payload });\n const { pickKey } = this.extraActionMap[action];\n const result = rs.map((o) => {\n o._InstanceAliasValue = o[this.templateQueryIdMap[pickKey]];\n return {\n text: o[this.templateQueryIdMap[pickKey]],\n value: o[this.templateQueryIdMap[pickKey]],\n };\n });\n await instanceStorage.setExtraStorage(this.service, this.keyInStorage[pickKey], rs);\n return result;\n }\n return [];\n }\n}\n","import coreModule from 'grafana/app/core/core_module';\nimport { TDMQFilterFieldsDescriptor, namespace, templateQueryIdMap } from './query_def';\nimport { GetServiceFromNamespace } from '../../common/constants';\n\nconst ExtraFields = [\n {\n label: 'Namespace',\n field: 'namespace',\n action: 'DescribeRocketMQNamespaces',\n },\n {\n label: 'Group',\n field: 'group',\n action: 'DescribeRocketMQGroups',\n },\n];\n\nconst dropdownTextConfig = {\n DescribeRocketMQNamespaces: 'namespace',\n DescribeRocketMQGroups: 'group',\n};\nexport class TdmqRocketmqQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.TDMQFilterFieldsDescriptor = TDMQFilterFieldsDescriptor;\n $scope.ExtraFields = ExtraFields;\n $scope.namespace = namespace;\n };\n\n $scope.clearExtrasAlias = () => {\n $scope.target.namespace = '';\n $scope.target.group = '';\n };\n\n $scope.onChecked = (srcField, dstField) => {\n if ($scope.target.queries[srcField] === true) {\n $scope.target.queries[dstField] = false;\n }\n $scope.onChange();\n };\n\n $scope.getInstanceId = () => {\n let { instance } = $scope.target;\n const service = GetServiceFromNamespace($scope.namespace);\n instance = $scope.datasource.getServiceFn(service, 'getVariable')(instance);\n if (!instance) {\n return '';\n }\n try {\n instance = JSON.parse(instance)[templateQueryIdMap.instance];\n } catch (error) {\n // console.log();\n }\n return instance;\n };\n $scope.getExtraFields = () => {\n return ExtraFields.filter((item) => item.field in ($scope.dims ?? {}) || item.label in ($scope.dims ?? {}));\n };\n $scope.getExtraDropdown = async (target, action) => {\n const service = GetServiceFromNamespace($scope.namespace);\n const region = $scope.datasource.getServiceFn(service, 'getVariable')(target.region);\n const payload: any = {\n Limit: 100,\n ClusterId: $scope.getInstanceId(),\n };\n if (action === 'DescribeRocketMQGroups') {\n let namespace = $scope.target.namespace;\n try {\n namespace = JSON.parse(namespace)[templateQueryIdMap.namespace];\n } catch (e) {}\n payload.NamespaceId = $scope.datasource.getServiceFn(service, 'getVariable')(namespace);\n }\n\n const rs = await $scope.datasource.getServiceFn(service, 'getConsumerList')({ region, action, payload });\n const result = rs.map((o) => {\n o._InstanceAliasValue = o[templateQueryIdMap[dropdownTextConfig[action]]];\n return {\n text: o[templateQueryIdMap[dropdownTextConfig[action]]],\n value: JSON.stringify(o),\n };\n });\n return result;\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n
\n \n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n`;\n\nexport function tdmqRocketmqQuery() {\n return {\n template: template,\n controller: TdmqRocketmqQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n onRefresh: '&',\n dims: '=',\n },\n link: (scope, element, attrs) => {\n scope.$watch('target.instance', () => {\n scope.clearExtrasAlias?.();\n });\n scope.$watch('target.metricName', () => {\n scope.clearExtrasAlias?.();\n });\n },\n };\n}\ncoreModule.directive('tdmqRocketmqQuery', tdmqRocketmqQuery);\n","// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service)\nimport { FildDescriptorType } from '../_base/types';\nimport _ from 'lodash';\n\nconst namespace = 'QCE/ROCKETMQ';\n\nconst TDMQInvalidDemensions = {\n tenant: 'ClusterId',\n namespace: 'NamespaceId',\n group: 'Name',\n};\n\n// 需和文件名对应\nconst TDMQROCKETMQInstanceAliasList = ['ClusterId', 'ClusterName'];\n\nconst templateQueryIdMap = {\n instance: 'ClusterId',\n namespace: 'NamespaceId',\n group: 'Name',\n};\n\n// select类型需要注意是{},multi后缀是[],dropdown是''\nconst TDMQFilterFields = {\n Limit: 20,\n Offset: 0,\n instanceIdsChecked: false,\n filtersChecked: true,\n ClusterIdList: [''],\n Filters: {\n includeVip: { text: '是', value: 'true' },\n },\n};\n\nconst TDMQFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'includeVip',\n enDescriptor: 'includeVip',\n cnDescriptor: '包含专享集群',\n link: '',\n type: 'select',\n list: [\n { text: '是', value: 'true' },\n { text: '否', value: 'false' },\n ],\n },\n];\n\nconst TDMQ_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'ClusterId',\n // 此处key应该是经过TDMQInvalidDemensions处理后的\n namespace: '',\n group: '',\n queries: TDMQFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n if (queries.instanceIdsChecked) {\n if (_.isArray(queries.ClusterIdList)) {\n const ClusterIdList = _.compact(queries.ClusterIdList);\n if (_.uniq(ClusterIdList).length > 0) {\n params.ClusterIdList = _.uniq(ClusterIdList).slice(0, 100);\n }\n }\n } else if (queries.filtersChecked) {\n const Filters: any[] = [];\n _.forEach(queries.Filters, (item: any, key) => {\n if (Filters.length > 9) {\n return;\n }\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n Filters.push({ Name: key, Values: _.uniq(item).slice(0, 5) });\n }\n } else if (_.isObject(item)) {\n if (!_.isEmpty(_.get(item, 'value', []))) {\n Filters.push({ Name: key, Values: [_.get(item, 'value', [])].slice(0, 5) });\n }\n }\n });\n if (Filters.length > 0) {\n params.Filters = Filters;\n }\n }\n }\n return params;\n}\nconst regionSupported = [\n { value: 'ap-beijing' },\n { value: 'ap-chengdu' },\n { value: 'ap-chongqing' },\n { value: 'ap-guangzhou' },\n { value: 'ap-shenzhen-fsi' },\n { value: 'ap-shanghai' },\n { value: 'ap-shanghai-fsi' },\n { value: 'ap-nanjing' },\n { value: 'ap-hongkong' },\n { value: 'ap-tokyo' },\n { value: 'ap-seoul' },\n { value: 'ap-singapore' },\n { value: 'ap-bangkok' },\n { value: 'ap-jakarta' },\n { value: 'ap-mumbai' },\n { value: 'eu-frankfurt' },\n { value: 'eu-moscow' },\n { value: 'na-ashburn' },\n { value: 'na-siliconvalley' },\n { value: 'na-toronto' },\n];\n\n// 需要缓存到storage的内容的key列表\nconst keyInStorage = {\n namespace: 'NamespaceId',\n group: 'Name',\n};\n/*\n如果有InstanceId额外的维度,原则上都需要传入此map结构配置\nkey的含义:\n 经过InvalidDemensions处理后的string。topicId =》TopicId。\n 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId\nvalue的含义:\n 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、\n 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。\n 默认取通过InvalidDemsion处理后的key\n 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。\n 即:templateQueryIdMap中内容。\n 联合上面2的内容筛选出原始sourceMap\n*/\nconst queryMonitorExtraConfg = {\n NamespaceId: {\n dim_KeyInStorage: keyInStorage.namespace,\n dim_KeyInTarget: 'namespace',\n dim_KeyInMap: templateQueryIdMap.namespace,\n },\n Name: {\n dim_KeyInStorage: keyInStorage.group,\n dim_KeyInTarget: 'group',\n dim_KeyInMap: templateQueryIdMap.group,\n },\n};\nexport default TDMQ_STATE;\nexport {\n TDMQFilterFieldsDescriptor,\n templateQueryIdMap,\n TDMQROCKETMQInstanceAliasList,\n TDMQInvalidDemensions,\n namespace,\n queryMonitorExtraConfg,\n keyInStorage,\n regionSupported,\n // 对应产品的service的全大写拼接GetInstanceQueryParams\n GetInstanceQueryParams as TDMQROCKETMQGetInstanceQueryParams,\n};\n","import { map, flatten, reduce, isEmpty, filter, split, sortBy, findIndex, trim, isArray, isString } from 'lodash';\nimport { GetServiceAPIInfo, ReplaceVariable } from '../../common/constants';\nimport { getTimeShiftInMs } from '../../common/utils';\nimport { BaseDatasource } from '../_base/datasource';\n\nconst variableToArray = (variable) => {\n if (isEmpty(variable)) {\n return [];\n }\n if (isArray(variable)) {\n return variable;\n }\n if (isString(variable)) {\n return split(variable, ',').map((item) => trim(item));\n }\n return [];\n};\n\nexport default class TKEDatasource extends BaseDatasource {\n InstanceAliasList = ['ClusterId', 'ClusterName'];\n templateQueryIdMap = {\n instance: 'ClusterId',\n };\n InvalidDimensions = {\n tke_cluster_instance_id: 'ClusterId',\n };\n InstanceReqConfig = {\n service: 'tke',\n action: 'DescribeClusters',\n responseField: 'Clusters',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n\n getMonitorData(params: any, region: any, instances: any, target: any, options: any) {\n const serviceInfo = GetServiceAPIInfo(region, 'monitor');\n const timeshift = getTimeShiftInMs(target.timeshift);\n const conditions = reduce(\n target.conditions,\n (prev, item) => {\n if (isEmpty(item.Key) || isEmpty(item.Operator) || isEmpty(item.Value)) {\n return prev;\n }\n return [\n ...filter(prev, (e) => e.Key !== item.Key),\n {\n Key: ReplaceVariable(this.templateSrv, options.scopedVars, item.Key, false),\n Operator: ReplaceVariable(this.templateSrv, options.scopedVars, item.Operator, false),\n Value: variableToArray(ReplaceVariable(this.templateSrv, options.scopedVars, item.Value, true)),\n },\n ];\n },\n [{ Key: 'tke_cluster_instance_id', Operator: '=', Value: instances.map((item) => item['ClusterId']) }]\n );\n\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data: {\n Period: params.Period,\n MetricNames: [params.MetricName],\n Module: 'monitor',\n Namespace: 'QCE/TKE',\n EndTime: params.EndTime,\n StartTime: params.StartTime,\n Conditions: conditions,\n GroupBys: variableToArray(ReplaceVariable(this.templateSrv, options.scopedVars, target.groupBys, true)),\n },\n },\n serviceInfo.service,\n { action: 'DescribeStatisticData', region }\n ).then((response) => {\n return flatten(\n map(response.Data, (data) => {\n return map(data.Points, (point) => {\n const dimensionSort = sortBy(point.Dimensions, ['Name']);\n const dimensionString = [\n ...dimensionSort.splice(findIndex(dimensionSort, { Name: 'tke_cluster_instance_id' }), 1),\n ...dimensionSort,\n ]\n .map((dimension) => dimension.Value)\n .join(' - ');\n const timeshiftString = timeshift > 0 ? `_${target.timeshift}` : '';\n return {\n target: `${data.MetricName} - ${dimensionString}${timeshiftString}`,\n datapoints: map(point.Values, (value) => [value.Value, value.Timestamp * 1000 + timeshift]),\n };\n });\n })\n );\n });\n }\n}\n","import coreModule from 'grafana/app/core/core_module';\nimport { isEmpty } from 'lodash';\nimport { TKEFilterFieldsDescriptor } from './query_def';\n\nexport class QueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.TKEFilterFieldsDescriptor = TKEFilterFieldsDescriptor;\n };\n\n $scope.onChecked = (srcField, dstField) => {\n if ($scope.target.queries[srcField] === true) {\n $scope.target.queries[dstField] = false;\n }\n $scope.onChange();\n };\n\n $scope.addCondition = () => {\n $scope.target.conditions.push({ Key: '', Operator: '=', Value: '' });\n };\n\n $scope.deleteCondition = (index) => {\n const targetCondition = $scope.target.conditions[index];\n if (isEmpty(targetCondition.Key) || isEmpty(targetCondition.Operator) || isEmpty(targetCondition.Value)) {\n $scope.target.conditions.splice(index, 1);\n } else {\n $scope.target.conditions.splice(index, 1);\n $scope.onRefresh();\n }\n };\n\n $scope.getOperator = () => {\n return Promise.resolve([\n { text: '=', value: '=' },\n { text: 'in', value: 'in' },\n ]);\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n
\n \n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n
\n
\n \n
\n
\n \n
\n \n \n
\n \n \n \n
\n
\n \n
\n
\n
\n
\n
\n
\n \n \n
\n
\n
\n`;\n\nexport function sQuery() {\n return {\n template: template,\n controller: QueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n onRefresh: '&',\n dims: '=',\n },\n };\n}\ncoreModule.directive('tkeQuery', sQuery);\n","import _ from 'lodash';\n\nconst TKE_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'ClusterId',\n conditions: [],\n groupBys: '',\n queries: {\n Limit: 20,\n Offset: 0,\n instanceIdsChecked: false,\n filtersChecked: true,\n ClusterIds: [''],\n Filters: {\n ClusterName: [],\n ClusterType: [],\n ClusterStatus: [],\n 'tag-key': [],\n },\n },\n};\n\nconst TKEFilterFieldsDescriptor = [\n {\n key: 'ClusterName',\n enDescriptor: 'Cluster Name',\n cnDescriptor: '集群名',\n link: '',\n type: 'input',\n },\n {\n key: 'ClusterType',\n enDescriptor: 'Cluster Type',\n cnDescriptor: '集群类型',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'ClusterStatus',\n enDescriptor: 'Cluster Status',\n cnDescriptor: '集群状态',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'Tags',\n enDescriptor: 'Tags',\n cnDescriptor: '标签键值对',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'vpc-id',\n enDescriptor: 'VPC',\n cnDescriptor: 'VPC',\n link: '',\n type: 'input',\n },\n {\n key: 'tag-key',\n enDescriptor: 'Tag Key',\n cnDescriptor: '标签键',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'tag-value',\n enDescriptor: 'Tag Value',\n cnDescriptor: '标签值',\n link: '',\n type: 'inputmulti',\n },\n];\n\nconst TKEInstanceAliasList = ['ClusterId', 'ClusterName'];\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n if (queries.instanceIdsChecked) {\n if (_.isArray(queries.InstanceIds)) {\n const InstanceIds = _.compact(queries.InstanceIds);\n if (_.uniq(InstanceIds).length > 0) {\n params.InstanceIds = _.uniq(InstanceIds).slice(0, 100);\n }\n }\n } else if (queries.filtersChecked) {\n const Filters: any[] = [];\n _.forEach(queries.Filters, (item: any, key) => {\n if (Filters.length > 9) {\n return;\n }\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n Filters.push({ Name: key, Values: _.uniq(item).slice(0, 5) });\n }\n } else if (_.isObject(item)) {\n if (!_.isEmpty(_.get(item, 'value', []))) {\n Filters.push({ Name: key, Values: _.get(item, 'value', []).slice(0, 5) });\n }\n }\n });\n if (Filters.length > 0) {\n params.Filters = Filters;\n }\n }\n }\n return params;\n}\n\nexport default TKE_STATE;\n\nexport { TKEFilterFieldsDescriptor, TKEInstanceAliasList, GetInstanceQueryParams as TKEGetInstanceQueryParams };\n","import _ from 'lodash';\nimport { TSFInvalidDemensions, TSFInstanceAliasList, templateQueryIdMap } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\n\nexport default class TSFDatasource extends BaseDatasource {\n Namespace = 'QCE/TSF';\n InstanceAliasList = TSFInstanceAliasList;\n InvalidDimensions = TSFInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n InstanceReqConfig = {\n service: 'tsf',\n action: 'DescribeApplications',\n responseField: 'Content',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n}\n","import coreModule from 'grafana/app/core/core_module';\nimport { TSFFieldsDescriptor } from './query_def';\n\nexport class TSFQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.TSFFieldsDescriptor = TSFFieldsDescriptor;\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n \n
\n
\n \n \n \n \n \n
\n
\n\n
\n`;\n\nexport function tsfQuery() {\n return {\n template: template,\n controller: TSFQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n onChange: '&',\n },\n };\n}\n\ncoreModule.directive('tsfQuery', tsfQuery);\n","import { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst ApplicationType = [\n { text: '所有', value: '' },\n { text: '容器应用', value: 'C' },\n { text: '普通应用/虚拟机应用', value: 'V' },\n];\n\nconst MicroserviceType = [\n { text: '所有', value: '' },\n { text: '普通应用', value: 'N' },\n { text: 'Mesh应用', value: 'M' },\n { text: '微服务网关应用', value: 'G' },\n { text: '原生应用', value: 'NATIVE' },\n];\n\nconst ApplicationResourceType = [\n { text: '默认资源类型', value: 'DEF' },\n { text: '微服务网关资源', value: 'GW' },\n];\n\nconst TSFFieldsDescriptor = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputnumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputnumber',\n min: 1,\n max: 100,\n },\n {\n key: 'SearchWord',\n enDescriptor: 'SearchWord',\n cnDescriptor: '搜索关键字',\n link: '',\n type: 'input',\n },\n {\n key: 'ApplicationIdList',\n enDescriptor: 'ApplicationIdList',\n cnDescriptor: '应用ID 组成的数组',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'ApplicationType',\n enDescriptor: 'ApplicationType',\n cnDescriptor: '应用类型',\n link: '',\n type: 'select',\n list: ApplicationType,\n },\n {\n key: 'MicroserviceType',\n enDescriptor: 'MicroserviceType',\n cnDescriptor: '应用的微服务类型',\n link: '',\n type: 'select',\n list: MicroserviceType,\n },\n {\n key: 'ApplicationResourceTypeList',\n enDescriptor: 'ApplicationResourceTypeList',\n cnDescriptor: '应用资源类型数组',\n link: '',\n type: 'select',\n multiple: true,\n list: ApplicationResourceType,\n },\n];\n\nconst TSF_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'ApplicationId',\n queries: {\n Limit: 20,\n Offset: 0,\n SearchWord: '',\n OrderBy: '',\n OrderType: null,\n ApplicationType: '',\n MicroserviceType: '',\n ApplicationResourceTypeList: [],\n ApplicationIdList: [],\n },\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, false);\n}\n\nconst TSFInstanceAliasList = ['ApplicationId', 'ApplicationName'];\n\nconst TSFInvalidDemensions = {\n applicationid: 'ApplicationId',\n};\n\nconst templateQueryIdMap = {\n instance: 'ApplicationId',\n};\n\nexport default TSF_STATE;\nexport {\n TSFInvalidDemensions,\n templateQueryIdMap,\n TSFInstanceAliasList,\n TSFFieldsDescriptor,\n GetInstanceQueryParams as TSFGetInstanceQueryParams,\n};\n","import {\n VCLBInstanceAliasList,\n VCLBInvalidDemensions,\n namespace,\n templateQueryIdMap,\n clbNamespaceMap,\n regionSupported,\n modifyDimensons,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\nimport { GetServiceAPIInfo } from '../../common/constants';\nimport { t } from '../../../locale';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = VCLBInstanceAliasList;\n InvalidDimensions = VCLBInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'clb',\n action: 'DescribeLoadBalancers',\n responseField: 'LoadBalancerSet',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n\n getRegions() {\n return Promise.resolve(regionSupported.map(({ value }) => ({ value, text: t(value) })));\n }\n async getAllMetrics(region: string) {\n const serviceInfo = GetServiceAPIInfo(region, 'monitor');\n const { MetricSet: public_metrics } = await this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data: {\n Namespace: clbNamespaceMap.public,\n },\n },\n serviceInfo.service,\n { region, action: 'DescribeBaseMetrics' }\n );\n const { MetricSet: private_metrics } = await this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data: {\n Namespace: clbNamespaceMap.private,\n },\n },\n serviceInfo.service,\n { region, action: 'DescribeBaseMetrics' }\n );\n const res = Object.values(_.keyBy(_.concat(private_metrics, public_metrics), 'MetricName'));\n return res.map((t) => modifyDimensons(t));\n }\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await this.getAllMetrics(region);\n return _.compact(rawSet);\n }\n}\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service)\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\nimport _ from 'lodash';\n\nconst namespace = 'QCE/V_CLB';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'vClbQuery';\n\nconst VCLBInvalidDemensions = {\n InstanceId: 'LoadBalancerId',\n // vip: 'LoadBalancerVips',\n // loadBalancerPort: 'Port',\n // protocol: 'Protocol',\n};\n\n// 要和文件名方式一致,ceip_summary=>CEIPSUMMARY\nconst VCLBInstanceAliasList = ['LoadBalancerId', 'LoadBalancerVips', 'LoadBalancerName'];\n\nconst templateQueryIdMap = {\n instance: 'LoadBalancerId',\n};\nconst ForwardTypes = [\n { text: '通用的负载均衡', value: 1 },\n { text: '传统的负载均衡', value: 0 },\n];\n\nconst OrderBy = [\n { text: 'LoadBalancerName', value: 'LoadBalancerName' },\n { text: 'CreateTime', value: 'CreateTime' },\n { text: 'Domain', value: 'Domain' },\n { text: 'LoadBalancerType', value: 'LoadBalancerType' },\n];\n\nconst OrderType = [\n { text: '升序', value: 0 },\n { text: '降序', value: 1 },\n];\n\nconst WithRs = [\n { text: '没有绑定后端服务', value: 0 },\n { text: '绑定后端服务', value: 1 },\n { text: '查询全部', value: -1 },\n];\nconst VCLBFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1',\n link: '',\n type: 'inputNumber',\n min: 1,\n },\n {\n key: 'LoadBalancerIds',\n enDescriptor: 'LoadBalancer ID',\n cnDescriptor: '实例ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'LoadBalancerName',\n enDescriptor: 'LoadBalancer Name',\n cnDescriptor: '实例名称',\n link: '',\n type: 'input',\n },\n {\n key: 'Forward',\n enDescriptor: 'Forward',\n cnDescriptor: '负载均衡实例类型',\n link: '',\n type: 'select',\n list: ForwardTypes,\n },\n {\n key: 'Domain',\n enDescriptor: 'Domain',\n cnDescriptor: '域名,腾讯云为负载均衡实例分配的域名,本参数仅对传统型公网负载均衡才有意义',\n link: '',\n type: 'input',\n },\n {\n key: 'LoadBalancerVips',\n enDescriptor: 'LoadBalancer Vips',\n cnDescriptor: '负载均衡实例的 VIP 地址',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'BackendPrivateIps',\n enDescriptor: 'BackendPrivate Ips',\n cnDescriptor: '负载均衡绑定的后端服务的内网 IP',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'BackendPublicIps',\n enDescriptor: 'BackendPublic Ips',\n cnDescriptor: '负载均衡绑定的后端服务的外网 IP',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'ProjectId',\n enDescriptor: 'Project ID',\n cnDescriptor: '负载均衡实例所属的项目 ID',\n link: '',\n type: 'inputNumber',\n },\n {\n key: 'VpcId',\n enDescriptor: 'Vpc ID',\n cnDescriptor: '负载均衡实例所属私有网络',\n link: '',\n type: 'input',\n },\n {\n key: 'SecurityGroup',\n enDescriptor: 'Security Group',\n cnDescriptor: '安全组ID',\n link: '',\n type: 'input',\n },\n {\n key: 'MasterZone',\n enDescriptor: 'Master Zone',\n cnDescriptor: '主可用区ID',\n link: '',\n type: 'input',\n },\n {\n key: 'WithRs',\n enDescriptor: 'WithRs',\n cnDescriptor: '负载均衡是否绑定后端服务',\n link: '',\n type: 'select',\n list: WithRs,\n },\n {\n key: 'OrderBy',\n enDescriptor: 'OrderBy',\n cnDescriptor: '排序字段',\n link: '',\n type: 'select',\n list: OrderBy,\n },\n {\n key: 'OrderType',\n enDescriptor: 'OrderByType',\n cnDescriptor: '排序方式',\n link: '',\n type: 'select',\n list: OrderType,\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/214/30685',\n namespace,\n fieldDescriptor: VCLBFilterFieldsDescriptor,\n};\nconst LBFields = {\n LoadBalancerIds: [],\n Forward: undefined,\n LoadBalancerName: '',\n Domain: '',\n LoadBalancerVips: [],\n BackendPublicIps: [],\n BackendPrivateIps: [],\n Limit: 20,\n Offset: 0,\n ProjectId: undefined,\n WithRs: {},\n VpcId: '',\n SecurityGroup: '',\n MasterZone: '',\n OrderBy: {},\n OrderType: {},\n};\n\nconst VCLB_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'LoadBalancerId',\n Port: '',\n Protocol: '',\n listener: '',\n // listenerAlias: 'ListenerId',\n queries: LBFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, false);\n}\n\n// regions for dropdown\nconst regionSupported = [\n { value: 'ap-bangkok' },\n { value: 'ap-beijing' },\n { value: 'ap-chengdu' },\n { value: 'ap-chongqing' },\n { value: 'ap-guangzhou' },\n { value: 'ap-hongkong' },\n { value: 'ap-jakarta' },\n { value: 'ap-mumbai' },\n { value: 'ap-seoul' },\n { value: 'ap-nanjing' },\n { value: 'ap-shanghai' },\n { value: 'ap-shanghai-fsi' },\n { value: 'ap-shenzhen-fsi' },\n { value: 'ap-singapore' },\n { value: 'ap-tokyo' },\n { value: 'eu-frankfurt' },\n { value: 'eu-moscow' },\n { value: 'na-ashburn' },\n { value: 'na-siliconvalley' },\n { value: 'na-toronto' },\n];\nconst clbNamespaceMap = {\n public: 'QCE/LB_PUBLIC',\n private: 'QCE/LB_PRIVATE',\n};\nfunction modifyDimensons(metricItem: any) {\n const metricTmp = _.cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n item.Dimensions = ['InstanceId'];\n });\n return metricTmp;\n}\nexport default VCLB_STATE;\nexport {\n VCLBFilterFieldsDescriptor,\n templateQueryIdMap,\n VCLBInstanceAliasList,\n VCLBInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n clbNamespaceMap,\n modifyDimensons,\n regionSupported,\n // 对应产品的service的全大写拼接GetInstanceQueryParams\n GetInstanceQueryParams as BMLBGetInstanceQueryParams,\n};\n","import { VBCInstanceAliasList, VBCInvalidDemensions, namespace, templateQueryIdMap } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = VBCInstanceAliasList;\n InvalidDimensions = VBCInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'vpc',\n action: 'DescribeCcns',\n responseField: 'CcnSet',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n getFilterDropdown({ field }) {\n return super.getRegions();\n }\n}\n","import coreModule from 'grafana/app/core/core_module';\nimport { VBCFilterFieldsDescriptor, namespace } from './query_def';\nimport { GetServiceFromNamespace } from '../../common/constants';\n\nconst ExtraFields: any = [\n // {\n // label: 'SRegion',\n // field: 'SRegion',\n // },\n // {\n // label: 'DRegion',\n // field: 'DRegion',\n // },\n];\n\nexport class VBCQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.VBCFilterFieldsDescriptor = VBCFilterFieldsDescriptor;\n $scope.namespace = namespace;\n };\n $scope.getExtraFields = () => {\n return ExtraFields.filter((item) => item.field in ($scope.dims ?? {}));\n };\n\n $scope.getExtraDropdown = (field) => {\n const service = GetServiceFromNamespace($scope.namespace);\n // return $scope.datasource.getServiceFn(service, 'getFilterDropdown')({ field })\n return $scope.datasource.getFilterDropdown(service, { field });\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n`;\n\nexport function scfQuery() {\n return {\n template: template,\n controller: VBCQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n onRefresh: '&',\n dims: '=',\n },\n };\n}\ncoreModule.directive('vbcQuery', scfQuery);\n","// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service)\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/VBC';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'vbcQuery';\n\nconst VBCInvalidDemensions = {\n // CcnId: 'CcnId',\n};\n\n// 需和文件名对应\nconst VBCInstanceAliasList = ['CcnId', 'CcnName'];\n\nconst templateQueryIdMap = {\n instance: 'CcnId',\n};\n\n// select类型需要注意是{},multi后缀是[],dropdown是''\nconst VBCFilterFields = {\n Limit: 20,\n Offset: 0,\n 'ccn-id': [],\n 'ccn-name': [],\n 'ccn-description': [],\n state: {},\n};\n\nconst VBCFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'ccn-id',\n enDescriptor: 'ccn-id',\n cnDescriptor: 'CCN实例ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'ccn-name',\n enDescriptor: 'ccn-name',\n cnDescriptor: 'CCN名称',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'ccn-description',\n enDescriptor: 'ccn-description',\n cnDescriptor: 'CCN描述',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'state',\n enDescriptor: 'state',\n cnDescriptor: '实例状态',\n link: '',\n type: 'select',\n multiple: true,\n list: [\n { text: '隔离中', value: 'ISOLATED' },\n { text: '运行中', value: 'AVAILABLE' },\n ],\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/215/19199',\n namespace,\n fieldDescriptor: VBCFilterFieldsDescriptor,\n};\n\nconst VBC_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'CcnId',\n DRegion: '',\n SRegion: '',\n queries: VBCFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, false);\n}\n// const regionSupported = [\n// { text: '华北地区(北京)', value: 'ap-beijing' },\n// { text: '西南地区(成都)', value: 'ap-chengdu' },\n// { text: '西南地区(重庆)', value: 'ap-chongqing' },\n// { text: '华南地区(广州)', value: 'ap-guangzhou' },\n// { text: '港澳台地区(中国香港)', value: 'ap-hongkong' },\n// { text: '亚太南部(孟买)', value: 'ap-mumbai' },\n// { text: '华东地区(南京)', value: 'ap-nanjing' },\n// { text: '华东地区(上海)', value: 'ap-shanghai' },\n// { text: '华东地区(上海金融)', value: 'ap-shanghai-fsi' },\n// { text: '华南地区(深圳金融)', value: 'ap-shenzhen-fsi' },\n// { text: '亚太东南(新加坡)', value: 'ap-singapore' },\n// { text: '亚太东北(东京)', value: 'ap-tokyo' },\n// { text: '欧洲地区(法兰克福)', value: 'eu-frankfurt' },\n// { text: '美国东部(弗吉尼亚)', value: 'na-ashburn' },\n// { text: '美国西部(硅谷)', value: 'na-siliconvalley' },\n// { text: '北美地区(多伦多)', value: 'na-toronto' },\n// ];\nexport default VBC_STATE;\nexport {\n VBCFilterFieldsDescriptor,\n templateQueryIdMap,\n VBCInstanceAliasList,\n VBCInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n // regionSupported,\n // 对应产品的service的全大写拼接GetInstanceQueryParams\n GetInstanceQueryParams as VBCGetInstanceQueryParams,\n};\n","import {\n VPCNETDETECTInstanceAliasList,\n VPCNETInvalidDemensions,\n namespace,\n templateQueryIdMap,\n modifyDimensons,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = VPCNETDETECTInstanceAliasList;\n InvalidDimensions = VPCNETInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'vpc',\n action: 'DescribeNetDetects',\n responseField: 'NetDetectSet',\n interceptor: {\n // response: (data: unknown[]) =>[\n // {\n // \"NetDetectId\": \"netd-12345678\",\n // },\n // ],\n },\n };\n MetricReqConfig = {\n resultFilter: modifyDimensons,\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n}\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import _ from 'lodash';\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/VPC_NET_DETECT';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'vpcNetDetectQuery';\n\nconst VPCNETInvalidDemensions = {\n netdetectid: 'NetDetectId',\n netDetectId: 'NetDetectId',\n};\n\nconst VPCNETDETECTInstanceAliasList = ['NetDetectId', 'NetDetectName'];\n\nconst templateQueryIdMap = {\n instance: 'NetDetectId',\n};\n\n// select类型需要注意是{},multi后缀是[]\nconst VPCNETFilterFields = {\n Limit: 20,\n Offset: 0,\n 'vpc-id': [],\n 'net-detect-id': [],\n 'subnet-id': [],\n 'net-detect-name': [],\n};\n\nconst VPCNETFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'vpc-id',\n enDescriptor: 'vpc-id',\n cnDescriptor: 'VPC实例ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'net-detect-id',\n enDescriptor: 'net-detect-id',\n cnDescriptor: '网络探测实例ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'subnet-id',\n enDescriptor: 'subnet-id',\n cnDescriptor: '子网实例ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'net-detect-name',\n enDescriptor: 'net-detect-name',\n cnDescriptor: '网络探测名称',\n link: '',\n type: 'inputMulti',\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/215/38696',\n namespace,\n fieldDescriptor: VPCNETFilterFieldsDescriptor,\n};\n\nconst VPCNET_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'NetDetectId',\n queries: VPCNETFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, true);\n}\nfunction modifyDimensons(metricItem: any) {\n const metricTmp = _.cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n item.Dimensions = ['netDetectId'];\n });\n return metricTmp;\n}\nexport default VPCNET_STATE;\nexport {\n VPCNETFilterFieldsDescriptor,\n templateQueryIdMap,\n VPCNETDETECTInstanceAliasList,\n VPCNETInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n modifyDimensons,\n GetInstanceQueryParams as VPCNETDETECTGetInstanceQueryParams,\n};\n","import { VPNGWInstanceAliasList, VPNGWInvalidDemensions, namespace, templateQueryIdMap } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport { GetServiceAPIInfo } from '../../common/constants';\nimport _ from 'lodash';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = VPNGWInstanceAliasList;\n InvalidDimensions = VPNGWInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'vpc',\n action: 'DescribeVpnGateways',\n responseField: 'VpnGatewaySet',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n\n getFilterDropdown({ field, region }) {\n if (field === 'zone') {\n const serviceInfo = GetServiceAPIInfo(region, 'cvm');\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n },\n serviceInfo.service,\n { region, action: 'DescribeZones' }\n ).then((response) => {\n return _.filter(\n _.map(response.ZoneSet || [], (item) => {\n return { text: item.ZoneName, value: item.Zone, ZoneState: item.ZoneState, Zone: item.Zone };\n }),\n (item) => item.ZoneState === 'AVAILABLE'\n );\n });\n }\n return [];\n }\n}\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import _ from 'lodash';\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/VPNGW';\nconst queryEditorName = 'vpngwQuery';\n\nconst VPNGWInvalidDemensions = {\n vpnGwId: 'VpnGatewayId',\n};\n\nconst VPNGWInstanceAliasList = ['VpnGatewayId', 'VpnGatewayName'];\n\nconst templateQueryIdMap = {\n instance: 'VpnGatewayId',\n};\n\n// select类型需要注意是{},multi后缀是[]\nconst VPNGWFilterFields = {\n Limit: 20,\n Offset: 0,\n 'vpc-id': [],\n 'vpn-gateway-id': [],\n 'vpn-gateway-name': [],\n type: {},\n 'public-ip-address': [],\n 'renew-flag': {},\n zone: [],\n};\n\nconst VPNGWFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'vpc-id',\n enDescriptor: 'vpc-id',\n cnDescriptor: 'VPC实例ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'vpn-gateway-id',\n enDescriptor: 'vpn-gateway-id',\n cnDescriptor: 'VPN实例ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'vpn-gateway-name',\n enDescriptor: 'vpn-gateway-name',\n cnDescriptor: 'VPN实例名称',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'type',\n enDescriptor: 'type',\n cnDescriptor: 'VPN网关类型',\n link: '',\n type: 'select',\n multiple: true,\n list: [\n { text: 'IPSEC', value: 'IPSEC' },\n { text: 'SSL', value: 'SSL' },\n ],\n },\n {\n key: 'public-ip-address',\n enDescriptor: 'public-ip-address',\n cnDescriptor: '公网IP',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'renew-flag',\n enDescriptor: 'renew-flag',\n cnDescriptor: '网关续费类型',\n link: '',\n type: 'select',\n multiple: true,\n list: [\n { text: '手动续费', value: 'NOTIFY_AND_MANUAL_RENEW' },\n { text: '自动续费', value: 'NOTIFY_AND_AUTO_RENEW' },\n ],\n },\n {\n key: 'zone',\n enDescriptor: 'zone',\n cnDescriptor: 'VPN所在可用区',\n link: '',\n type: 'dropdownMulti',\n },\n];\n\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/215/17514',\n namespace,\n fieldDescriptor: VPNGWFilterFieldsDescriptor,\n};\n\nconst VPNGW_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'VpnGatewayId',\n queries: VPNGWFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, true);\n}\nexport default VPNGW_STATE;\nexport {\n VPNGWFilterFieldsDescriptor,\n templateQueryIdMap,\n VPNGWInstanceAliasList,\n VPNGWInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n GetInstanceQueryParams as VPNGWGetInstanceQueryParams,\n};\n","import { VPNXInstanceAliasList, VPNXInvalidDemensions, namespace, templateQueryIdMap } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = VPNXInstanceAliasList;\n InvalidDimensions = VPNXInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'vpc',\n action: 'DescribeVpnConnections',\n responseField: 'VpnConnectionSet',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n}\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import _ from 'lodash';\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/VPNX';\nconst queryEditorName = 'vpnxQuery';\n\nconst VPNXInvalidDemensions = {\n vpnConnId: 'VpnConnectionId',\n};\n\nconst VPNXInstanceAliasList = ['VpnConnectionId', 'VpnConnectionName'];\n\nconst templateQueryIdMap = {\n instance: 'VpnConnectionId',\n};\n\n// select类型需要注意是{},multi后缀是[]\nconst VPNXFilterFields = {\n Limit: 20,\n Offset: 0,\n 'vpc-id': [],\n 'vpn-gateway-id': [],\n 'customer-gateway-id': [],\n 'vpn-connection-name': [],\n 'vpn-connection-id': [],\n};\n\nconst VPNXFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'vpc-id',\n enDescriptor: 'vpc-id',\n cnDescriptor: 'VPC实例ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'vpn-gateway-id',\n enDescriptor: 'vpn-gateway-id',\n cnDescriptor: 'VPN实例ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'customer-gateway-id ',\n enDescriptor: 'customer-gateway-id ',\n cnDescriptor: '对端网关实例ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'vpn-connection-name',\n enDescriptor: 'vpn-connection-name',\n cnDescriptor: '通道名称',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'vpn-connection-id',\n enDescriptor: 'vpn-connection-id',\n cnDescriptor: '通道实例ID',\n link: '',\n type: 'inputMulti',\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/215/17515',\n namespace,\n fieldDescriptor: VPNXFilterFieldsDescriptor,\n};\n\nconst VPNX_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'VpnConnectionId',\n queries: VPNXFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, true);\n}\nexport default VPNX_STATE;\nexport {\n VPNXFilterFieldsDescriptor,\n templateQueryIdMap,\n VPNXInstanceAliasList,\n VPNXInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n GetInstanceQueryParams as VPNXGetInstanceQueryParams,\n};\n","import _ from 'lodash';\nimport {\n WAFInstanceAliasList,\n WAFInvalidDemensions,\n templateQueryIdMap,\n namespace,\n regionSupported,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport { t } from '../../../locale';\n\nexport default class CDNDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = WAFInstanceAliasList;\n InvalidDimensions = WAFInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n InstanceReqConfig = {\n // service: 'waf',\n action: 'DescribeDomains',\n responseField: 'Domains',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n getRegions() {\n return Promise.resolve(regionSupported.map(({ value }) => ({ value, text: t(value) })));\n }\n async metricFindQuery(query: any, regex?: string) {\n return super.metricFindQuery({ ...query, ...{ region: 'ap-guangzhou' } }, regex);\n }\n}\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import * as _ from 'lodash';\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/WAF';\nconst queryEditorName = 'wafQuery';\nconst WAFFilterFields = {\n Limit: 20,\n Offset: 0,\n origin: [],\n domain: [],\n resourceId: [],\n status: {},\n serviceType: {},\n projectId: [],\n domainType: {},\n fullUrlCache: {},\n https: {},\n originPullProtocol: {},\n tagKey: [],\n};\n\nconst WAFFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'origin',\n enDescriptor: 'origin',\n cnDescriptor: '主源站',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'domain',\n enDescriptor: 'domain',\n cnDescriptor: '域名',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'resourceId',\n enDescriptor: 'resourceId',\n cnDescriptor: '域名id',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'status',\n enDescriptor: 'status',\n cnDescriptor: '域名状态',\n link: '',\n type: 'select',\n list: [\n { text: 'online', value: 'online' },\n { text: 'offline', value: 'offline' },\n { text: 'processing', value: 'processing' },\n ],\n },\n {\n key: 'serviceType',\n enDescriptor: 'serviceType',\n cnDescriptor: '业务类型',\n link: '',\n type: 'select',\n list: [\n { text: 'web', value: 'web' },\n { text: 'download', value: 'download' },\n { text: 'media', value: 'media' },\n ],\n },\n {\n key: 'projectId',\n enDescriptor: 'projectId',\n cnDescriptor: '项目ID',\n link: '',\n type: 'inputNumberMulti',\n },\n {\n key: 'domainType',\n enDescriptor: 'domainType',\n cnDescriptor: '主源站类型',\n link: '',\n type: 'select',\n list: [\n { text: '自有源', value: 'cname' },\n { text: 'cos接入', value: 'cos' },\n ],\n },\n {\n key: 'fullUrlCache',\n enDescriptor: 'fullUrlCache',\n cnDescriptor: '全路径缓存',\n link: '',\n type: 'select',\n list: [\n { text: '打开', value: 'on' },\n { text: '关闭', value: 'off' },\n ],\n },\n {\n key: 'https',\n enDescriptor: 'https',\n cnDescriptor: '是否配置https',\n link: '',\n type: 'select',\n list: [\n { text: 'on', value: 'on' },\n { text: 'off', value: 'off' },\n { text: 'processing', value: 'processing' },\n ],\n },\n {\n key: 'originPullProtocol',\n enDescriptor: 'originPullProtocol',\n cnDescriptor: '回源协议类型',\n link: '',\n type: 'select',\n list: [\n { text: 'http', value: 'http' },\n { text: 'follow', value: 'follow' },\n { text: 'https', value: 'https' },\n ],\n },\n {\n key: 'tagKey',\n enDescriptor: 'tagKey',\n cnDescriptor: '标签键',\n link: '',\n type: 'inputMulti',\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/228/41118',\n namespace,\n fieldDescriptor: WAFFilterFieldsDescriptor,\n};\nconst WAF_STATE = {\n region: 'ap-guangzhou',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'Domain',\n queries: WAFFilterFields,\n};\nconst regionSupported = [\n { value: 'ap-beijing' },\n { value: 'ap-chengdu' },\n { value: 'ap-chongqing' },\n { value: 'ap-guangzhou' },\n { value: 'ap-hongkong' },\n { value: 'ap-nanjing' },\n { value: 'ap-shanghai' },\n { value: 'ap-shanghai-fsi' },\n { value: 'ap-seoul' },\n { value: 'ap-singapore' },\n];\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, true);\n}\n\nconst WAFInstanceAliasList = ['Domain', 'ProjectId'];\n\nconst WAFInvalidDemensions = {\n projectId: 'ProjectId',\n domain: 'Domain',\n};\nconst templateQueryIdMap = {\n instance: 'Domain',\n};\nexport default WAF_STATE;\nexport {\n WAFFilterFieldsDescriptor,\n templateQueryIdMap,\n WAFInstanceAliasList,\n WAFInvalidDemensions,\n namespace,\n regionSupported,\n queryEditorName,\n queryEditorConfig,\n GetInstanceQueryParams as WAFGetInstanceQueryParams,\n};\n","const en_US = {\n language: 'Language',\n enable_intranet_API_mode: 'Enable Intranet API Mode',\n cloud_database: 'Cloud Database',\n cloud_load_balancer: 'Cloud Load Balancer',\n virtual_private_cloud: 'Virtual Private Cloud',\n content_delivery_network: 'Content Delivery Network',\n message_queue: 'Message Queue',\n direct_connect: 'Direct Connect',\n cloud_physical_machine: 'Cloud Physical Machine',\n elastic_mapReduce: 'Elastic MapReduce',\n edge_computing_machine: 'Edge Computing Machine',\n // namespace\n RUM: 'Real User Monitoring(RUM)',\n CLS: 'Cloud Log Service(CLS)',\n CVM: 'Cloud Virtual Machine(CVM)',\n CDB: 'TencentDB for MySQL(CDB)',\n CMONGO: 'TencentDB for MongoDB(CMONGO)',\n POSTGRES: 'TencentDB for PostgreSQL(POSTGRES)',\n REDIS: 'TencentDB for Redis(REDIS)',\n REDIS_MEM: 'TencentDB for Redis(Memory Edition, 5-Second)(REDIS_MEM)',\n SQLSERVER: 'TencentDB for SQL Server(SQLSERVER)',\n CYNOSDB_MYSQL: 'TencentDB for CYNOSDB_MYSQL(CYNOSDB_MYSQL)',\n TCAPLUS: 'TencentDB for TcaplusDB(TCAPLUS)',\n TDMYSQL: 'TDSQL for MySQL(TDMYSQL)',\n PCX: 'Peering Connection(PCX)',\n BWP: 'Bandwidth Packet(BWP)',\n NAT_GATEWAY: 'NAT Gateway(NAT_GATEWAY)',\n VPNGW: 'VPN Gateway(VPNGW)',\n VPNX: 'VPN Tunnel(VPNX)',\n DCG: 'Direct Connect Gateway(DCG)',\n CEIP_SUMMARY: 'Anycast EIP(CEIP_SUMMARY)',\n VPC_NET_DETECT: 'Network Detection(VPC_NET_DETECT)',\n VBC: 'Cloud Connect Network(VBC)',\n LB: 'Elastic IP(LB)',\n LB_PUBLIC: 'Public Network CLB(LB_PUBLIC)',\n LB_PRIVATE: 'Private Network CLB Layer-4 Protocol(LB_PRIVATE)',\n LOADBALANCE: 'Private Network CLB Layer-7 Protocol(LOADBALANCE)',\n CDN: 'Chinese Mainland Domain(CDN)',\n CDN_LOG_DATA: 'Province(CDN_LOG_DATA)',\n OV_CDN: 'Overseas Domain(OV_CDN)',\n SCF_V2: 'Serverless Cloud Function(SCF)',\n CFS: 'Cloud File Storage(CFS)',\n COS: 'Cloud Object Storage(COS)',\n CKAFKA: 'Message Queue CKafka(CKAFKA)',\n CMQ: 'Message Queue for Queue Service(CMQ)',\n CMQTOPIC: 'Message Queue for Topic Subscription(CMQTOPIC)',\n TDMQ: 'Tencent Distributed Message Queue for Pulsar(TDMQ)',\n TDMQ_ROCKETMQ: 'Tencent Distributed Message Queue for RocketMQ(ROCKETMQ)',\n TDMQ_RABBITMQ: 'Tencent Distributed Message Queue for RabbitMQ(RABBITMQ)',\n DCX: 'Direct Connect for Dedicated Tunnel(DCX)',\n DC: 'Direct Connect for Connection(DC)',\n CPM: 'Cloud Physical Machine(CPM)',\n BM_PCX: 'Cloud Physical Machine for Peering Connection(BM_PCX)',\n BM_LB: 'Cloud Physical Machine for Public Network CLB(BM_LB)',\n BM_INTRA_LB: 'Cloud Physical Machine for Private Network CLB(BM_INTRA_LB)',\n CES: 'Elasticsearch Service(CES)',\n BLOCK_STORAGE: 'Cloud Block Storage(BLOCK_STORAGE)',\n APIGATEWAY: 'API Gateway(APIGATEWAY)',\n QAAP: 'Global Application Acceleration Platform(GAAP)',\n ECM: 'Edge Computing Machine for Computation and Networking(ECM)',\n ECM_BLOCK_STORAGE: 'Edge Computing Machine for Block Storage(ECM_BLOCK_STORAGE)',\n ECM_LB: 'Edge Computing Machine for Layer-4 CLB(ECM_LB)',\n GSE: 'Game Server Elastic-scaling(GSE)',\n TKE: 'Tencent Kubernetes Engine(TKE)',\n ECDN: 'Enterprise Content Delivery Network(ECDN)',\n WAF: 'Web Application Firewall(WAF)',\n // others\n multi_scene: 'Multi-Scene',\n lite: 'Lite',\n cloud_monitor: 'Cloud Monitor',\n cloud_log_service: 'Cloud Log Service',\n real_user_monitoring: 'Real User Monitoring',\n apm_monitoring: 'Application Monitoring',\n region: 'Region',\n log_topic: 'Log Topic',\n syntax_rule: 'Syntax Rule',\n max_result_num: 'Maximum result number',\n search_statement: 'Search Statement',\n time_unit: 'Time unit',\n seconds: 'seconds',\n search_description:\n 'Search for instances according to specific query conditions, and pull the first 20 instances by default',\n // region\n 'ap-guangzhou': 'South China(Guangzhou)',\n 'ap-shenzhen-fsi': 'South China(Shenzhen Finance)',\n 'ap-guangzhou-open': 'South China(Guangzhou OPEN)',\n 'ap-shenzhen': 'South China(Shenzhen)',\n 'ap-qingyuan': 'South China(Qingyuan)',\n 'ap-shanghai': 'East China(Shanghai)',\n 'ap-shanghai-fsi': 'East China(Shanghai Finance)',\n 'ap-jinan-ec': 'East China(Jinan)',\n 'ap-hangzhou-ec': 'East China(Hangzhou)',\n 'ap-nanjing': 'East China(Nanjing)',\n 'ap-fuzhou-ec': 'East China(Fuzhou)',\n 'ap-hefei-ec': 'East China(Hefei)',\n 'ap-beijing': 'North China region(Beijing)',\n 'ap-tianjin': 'North China region(Tianjin)',\n 'ap-beijing-fsi': 'North China region(Beijing Finance)',\n 'ap-shijiazhuang-ec': 'North China region(Shijiazhuang)',\n 'ap-wuhan-ec': 'Central China(Wuhan)',\n 'ap-changsha-ec': 'Central China(Changsha)',\n 'ap-zhengzhou-ec': 'Central China(Zhengzhou)',\n 'ap-chengdu': 'Southwest China(Chengdu)',\n 'ap-chongqing': 'Southwest China(Chongqing)',\n 'ap-xian-ec': \"Northwest region(Xi'an)\",\n 'ap-shenyang-ec': 'Northeast China(Shenyang)',\n 'ap-taipei': 'Hong Kong, Macau and Taiwan (China)(Taipei, China)',\n 'ap-hongkong': 'Hong Kong, Macau and Taiwan (China)(Hong Kong, China)',\n 'ap-seoul': 'Northeast Asia(Seoul)',\n 'ap-tokyo': 'Northeast Asia(Tokyo)',\n 'ap-singapore': 'Southeast Asia(Singapore)',\n 'ap-bangkok': 'Southeast Asia(Bangkok)',\n 'ap-jakarta': 'Southeast Asia(Jakarta)',\n 'na-siliconvalley': 'US West(Silicon Valley)',\n 'eu-frankfurt': 'Europe(Frankfurt)',\n 'eu-moscow': 'Europe(Northeastern Europe)',\n 'ap-mumbai': 'South Asia(Mumbai)',\n 'na-ashburn': 'US East(Virginia)',\n 'sa-saopaulo': 'South America(São Paulo)',\n 'na-toronto': 'North America(Toronto)',\n};\nexport default en_US;\n","import zh_CN from './zh_CN';\nimport en_US from './en_US';\n\nlet locale_language = 'zh-CN';\n\nexport enum Language {\n Chinese = 'zh-CN',\n English = 'en-US',\n}\n\nexport const t = (key: string) => {\n if (locale_language === Language.Chinese) {\n return zh_CN[key];\n }\n return en_US[key];\n};\n\nexport const setLanguage = (language: Language) => {\n locale_language = language;\n};\n\nexport const getLanguage = () => locale_language;\n","const zh_CN = {\n language: '语言',\n enable_intranet_API_mode: '开启内网API模式',\n cloud_database: '云数据库',\n cloud_load_balancer: '负载均衡',\n virtual_private_cloud: '私有网络',\n content_delivery_network: '内容分发网络',\n message_queue: '消息队列',\n direct_connect: '专线接入',\n cloud_physical_machine: '黑石物理服务器',\n elastic_mapReduce: '弹性 MapReduce',\n edge_computing_machine: '边缘计算机器',\n // namespace\n RUM: '前端性能监控(RUM)',\n APM: '应用性能监控(APM)',\n CLS: '日志服务(CLS)',\n CVM: '云服务器(CVM)',\n CDB: '云数据库 MySQL(CDB)',\n CMONGO: '云数据库 MongoDB(CMONGO)',\n POSTGRES: '云数据库 PostgreSQL(POSTGRES)',\n REDIS: '云数据库 Redis(REDIS)',\n REDIS_MEM: '云数据库 Redis内存版(5s)(REDIS_MEM)',\n SQLSERVER: '云数据库 SQL Server(SQLSERVER)',\n CYNOSDB_MYSQL: '云数据库 CYNOSDB_MYSQL(CYNOSDB_MYSQL)',\n TCAPLUS: '云数据库 TcaplusDB(TCAPLUS)',\n TDMYSQL: '分布式数据库 TDSQL MySQL(TDMYSQL)',\n PCX: '私有网络-对等连接(PCX)',\n BWP: '私有网络-带宽包(BWP)',\n NAT_GATEWAY: '私有网络-NAT 网关(NAT_GATEWAY)',\n VPNGW: '私有网络-VPN 网关(VPNGW)',\n VPNX: '私有网络-VPN 通道(VPNX)',\n DCG: '私有网络-专线网关(DCG)',\n CEIP_SUMMARY: '私有网络-Anycast 弹性公网IP(CEIP_SUMMARY)',\n VPC_NET_DETECT: '私有网络-网络探测(VPC_NET_DETECT)',\n VBC: '私有网络-云联网(VBC)',\n LB: '私有网络-弹性公网IP(LB)',\n LB_PUBLIC: '公网负载均衡监控指标(LB_PUBLIC)',\n LB_PRIVATE: '内网负载均衡四层协议监控指标(LB_PRIVATE)',\n LOADBALANCE: '内网负载均衡七层协议监控指标(LOADBALANCE)',\n CDN: '国内域名(CDN)',\n CDN_LOG_DATA: '省份域名(CDN_LOG_DATA)',\n OV_CDN: '国外域名(OV_CDN)',\n SCF_V2: '云函数(SCF)',\n CFS: '文件存储(CFS)',\n COS: '对象存储(COS)',\n CKAFKA: '消息队列 CKafka(CKAFKA)',\n CMQ: '消息队列-队列服务监控(CMQ)',\n CMQTOPIC: '消息队列-主题订阅监控(CMQTOPIC)',\n TDMQ: '消息队列 Pulsar 版(TDMQ)',\n TDMQ_ROCKETMQ: '消息队列 RocketMQ 版(ROCKETMQ)',\n TDMQ_RABBITMQ: '消息队列 RabbitMQ 版(RABBITMQ)',\n DCX: '专线接入-专用通道(DCX)',\n DC: '专线接入-物理专线(DC)',\n CPM: '黑石物理服务器(CPM)',\n BM_PCX: '黑石对等连接(BM_PCX)',\n BM_LB: '黑石外网负载均衡(BM_LB)',\n BM_INTRA_LB: '黑石内网负载均衡(BM_INTRA_LB)',\n CES: 'Elasticsearch指标(CES)',\n BLOCK_STORAGE: '云硬盘(BLOCK_STORAGE)',\n APIGATEWAY: 'API 网关(APIGATEWAY)',\n QAAP: '全球应用加速(GAAP)',\n ECM: '边缘计算和网络监控(ECM)',\n ECM_BLOCK_STORAGE: '边缘计算存储监控(ECM_BLOCK_STORAGE)',\n ECM_LB: '边缘计算负载均衡(ECM_LB)',\n GSE: '游戏服务器伸缩(GSE)',\n TKE: '容器服务(TKE)',\n ECDN: '全站加速网络(ECDN)',\n WAF: 'Web 应用防火墙(WAF)',\n // others\n multi_scene: '多场景版',\n lite: '精简版',\n cloud_monitor: '云监控',\n cloud_log_service: '日志服务',\n real_user_monitoring: '前端性能监控',\n apm_monitoring: '应用性能监控',\n region: '地域',\n log_topic: '日志主题',\n syntax_rule: '语法规则',\n max_result_num: '最大结果条数',\n search_statement: '检索语句',\n time_unit: 'Time unit',\n seconds: 'seconds',\n search_description: '按照具体的查询条件搜索实例,默认拉取前 20 条实例',\n // region\n 'ap-guangzhou': '华南地区(广州)',\n 'ap-shenzhen-fsi': '华南地区(深圳金融)',\n 'ap-guangzhou-open': '华南地区(广州OPEN)',\n 'ap-shenzhen': '华南地区(深圳)',\n 'ap-qingyuan': '华南地区(清远)',\n 'ap-shanghai': '华东地区(上海)',\n 'ap-shanghai-fsi': '华东地区(上海金融)',\n 'ap-jinan-ec': '华东地区(济南)',\n 'ap-hangzhou-ec': '华东地区(杭州)',\n 'ap-nanjing': '华东地区(南京)',\n 'ap-fuzhou-ec': '华东地区(福州)',\n 'ap-hefei-ec': '华东地区(合肥)',\n 'ap-beijing': '华北地区(北京)',\n 'ap-tianjin': '华北地区(天津)',\n 'ap-beijing-fsi': '华北地区(北京金融)',\n 'ap-shijiazhuang-ec': '华北地区(石家庄)',\n 'ap-wuhan-ec': '华中地区(武汉)',\n 'ap-changsha-ec': '华中地区(长沙)',\n 'ap-zhengzhou-ec': '华中地区(郑州)',\n 'ap-chengdu': '西南地区(成都)',\n 'ap-chongqing': '西南地区(重庆)',\n 'ap-xian-ec': '西北地区(西安)',\n 'ap-shenyang-ec': '东北地区(沈阳)',\n 'ap-taipei': '港澳台地区(中国台北)',\n 'ap-hongkong': '港澳台地区(中国香港)',\n 'ap-seoul': '亚太东北(首尔)',\n 'ap-tokyo': '亚太东北(东京)',\n 'ap-singapore': '亚太东南(新加坡)',\n 'ap-bangkok': '亚太东南(曼谷)',\n 'ap-jakarta': '亚太东南(雅加达)',\n 'na-siliconvalley': '美国西部(硅谷)',\n 'eu-frankfurt': '欧洲地区(法兰克福)',\n 'eu-moscow': '欧洲地区(莫斯科)',\n 'ap-mumbai': '亚太南部(孟买)',\n 'na-ashburn': '美国东部(弗吉尼亚)',\n 'sa-saopaulo': '南美地区(圣保罗)',\n 'na-toronto': '北美地区(多伦多)',\n};\nexport default zh_CN;\n","module.exports = __WEBPACK_EXTERNAL_MODULE__grafana_data__;","module.exports = __WEBPACK_EXTERNAL_MODULE__grafana_runtime__;","module.exports = __WEBPACK_EXTERNAL_MODULE_grafana_app_core_core_module__;","module.exports = __WEBPACK_EXTERNAL_MODULE_lodash__;","module.exports = __WEBPACK_EXTERNAL_MODULE_moment__;"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://TencentCloudMonitorGrafanaApp/webpack/bootstrap","webpack://TencentCloudMonitorGrafanaApp/external \"lodash\"","webpack://TencentCloudMonitorGrafanaApp/./locale/zh_CN.ts","webpack://TencentCloudMonitorGrafanaApp/./locale/en_US.ts","webpack://TencentCloudMonitorGrafanaApp/./locale/index.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/common/sign.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/common/signV2.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/common/constants.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/_base/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/common/utils.ts","webpack://TencentCloudMonitorGrafanaApp/external \"app/core/core_module\"","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/_base/query.ts","webpack://TencentCloudMonitorGrafanaApp/external \"@grafana/data\"","webpack://TencentCloudMonitorGrafanaApp/./datasource/common/indexedDB.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/common/datasourceStorage.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ckafka/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/clb/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/tdmq/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/gse/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/dcdb/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/redis_mem/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/tdmq_rabbitmq/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/tdmq_rocketmq/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/index.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ecm_block_storage/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/external \"@grafana/runtime\"","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/apigateway/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/mr/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/v_clb/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cynosdb_mysql/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/scf/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cls/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/sqlserver/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/bmIntraLb/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/bm_lb/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/bm_pcx/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cbs/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cdn_province/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ceip_summary/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cmq_topic/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cpm/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ecdn/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ecm/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/postgresql/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/vpc_net_detect/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/waf/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cdb/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ces/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/dc/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/dcg/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/dcx/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ecm_lb/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/mongodb/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/qaap/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/tcaplus/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/vbc/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/vpngw/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/vpnx/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/lighthouse/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cfs/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cmq/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cvm/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/pcx/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/redis/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/tsf/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/bwp/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cdn/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/lb/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/nat_gateway/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ov_cdn/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/external \"moment\"","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/tke/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/apigateway/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/bmIntraLb/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/bm_lb/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/bm_pcx/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/bwp/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cbs/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cdb/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cdn/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cdn_province/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ceip_summary/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ces/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cfs/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ckafka/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/clb/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cls/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cmq/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cmq_topic/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cos/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cpm/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cvm/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cynosdb_mysql/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/dc/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/dcdb/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/dcg/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/dcx/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ecdn/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ecm/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ecm_block_storage/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ecm_lb/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/gse/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/lb/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/lighthouse/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/mongodb/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/mr/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/nat_gateway/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ov_cdn/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/pcx/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/postgresql/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/qaap/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/redis/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/redis_mem/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/scf/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/sqlserver/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/tcaplus/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/tdmq/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/tdmq_rabbitmq/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/tdmq_rocketmq/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/tke/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/tsf/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/v_clb/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/vbc/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/vpc_net_detect/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/vpngw/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/vpnx/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/waf/datasource.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/apigateway/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/bmIntraLb/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/bm_lb/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/bm_pcx/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/bwp/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cbs/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cdb/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cdn/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cdn_province/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ceip_summary/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ces/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cfs/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ckafka/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/clb/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cls/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cmq/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cmq_topic/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cos/query_def.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cpm/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cvm/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/cynosdb_mysql/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/dc/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/dcdb/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/dcg/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/dcx/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ecdn/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ecm/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ecm_block_storage/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ecm_lb/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/gse/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/lb/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/lighthouse/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/mongodb/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/mr/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/nat_gateway/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/ov_cdn/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/pcx/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/postgresql/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/qaap/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/redis/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/redis_mem/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/scf/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/sqlserver/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/tcaplus/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/tdmq/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/tdmq_rabbitmq/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/tdmq_rocketmq/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/tke/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/tsf/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/v_clb/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/vbc/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/vpc_net_detect/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/vpngw/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/vpnx/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/waf/query.ts","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor sync ^.*$","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/MonitorDatasource.ts","webpack://TencentCloudMonitorGrafanaApp/../node_modules/qs/lib/utils.js","webpack://TencentCloudMonitorGrafanaApp/../node_modules/qs/lib/formats.js","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor/_base/query_filter.ts","webpack://TencentCloudMonitorGrafanaApp/../node_modules/qs/lib/index.js","webpack://TencentCloudMonitorGrafanaApp/../node_modules/qs/lib/stringify.js","webpack://TencentCloudMonitorGrafanaApp/../node_modules/qs/lib/parse.js","webpack://TencentCloudMonitorGrafanaApp/./datasource/tc_monitor sync ^\\.\\/[a-zA-Z]\\w+\\/(datasource)|(query(_def)","webpack://TencentCloudMonitorGrafanaApp/./components/config.ts"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","__WEBPACK_EXTERNAL_MODULE__0__","language","enable_intranet_API_mode","cloud_database","cloud_load_balancer","virtual_private_cloud","content_delivery_network","message_queue","direct_connect","cloud_physical_machine","elastic_mapReduce","edge_computing_machine","RUM","APM","CLS","CVM","CDB","CMONGO","POSTGRES","REDIS","REDIS_MEM","SQLSERVER","CYNOSDB_MYSQL","TCAPLUS","TDMYSQL","PCX","BWP","NAT_GATEWAY","VPNGW","VPNX","DCG","CEIP_SUMMARY","VPC_NET_DETECT","VBC","LB","LB_PUBLIC","LB_PRIVATE","LOADBALANCE","CDN","CDN_LOG_DATA","OV_CDN","SCF_V2","CFS","COS","CKAFKA","CMQ","CMQTOPIC","TDMQ","TDMQ_ROCKETMQ","TDMQ_RABBITMQ","DCX","DC","CPM","BM_PCX","BM_LB","BM_INTRA_LB","CES","BLOCK_STORAGE","APIGATEWAY","QAAP","ECM","ECM_BLOCK_STORAGE","ECM_LB","GSE","TKE","ECDN","WAF","multi_scene","lite","cloud_monitor","cloud_log_service","real_user_monitoring","apm_monitoring","region","log_topic","syntax_rule","max_result_num","search_statement","time_unit","seconds","search_description","Language","locale_language","Chinese","setLanguage","getLanguage","options","secretId","service","action","host","version","payload","backendSrv","datasourceId","this","JSON","stringify","nowDate","utc","timestamp","unix","date","format","getHeader","getResourceHeader","res","datasourceRequest","url","method","headers","data","Host","Service","Version","Action","Region","Timestamp","Method","Uri","Query","Body","Headers","resp","authorization","token","intranet","grafanaVersion","window","grafanaBootData","settings","buildInfo","Authorization","toString","defaults","path","generateQueryString","getResourceQueryString","assign","secretKey","querystring","queryString","TcDataSourceId","id","FINACE_REGIONS","SERVICES_API_INFO","api","monitor","cls","cvm","cdb","pcx","vpc","mongodb","clb","postgres","cdn","redis","scf","cfs","ckafka","dc","cynosdb","sqlserver","bm","bmeip","bmvpc","bmlb","es","emr","cmq","cbs","tcaplusdb","dcdb","apigateway","tdmq","tdmq_rabbitmq","tdmq_rocketmq","gaap","ecm","gse","lighthouse","tsf","rum","tke","ecdn","waf","apm","FINACE_HOST","GetServiceAPIInfo","indexOf","find","__","getHostAndPath","GetServiceFromNamespace","namespace","ParseMetricQuery","query","result","queries","split","forEach","item","str","trim","val","parse","e","toLower","ReplaceVariable","templateSrv","scopedVars","field","multiple","varname","varFlag","regResult1","String","match","regResult2","parseVariableFormat","replaceVar","replace","error","isArray","GetDimensions","obj","isEmpty","dimensions","Value","undefined","push","Name","ParseQueryResult","response","instances","timeshift","instanceList","cloneDeep","dataPoints","map","dataPoint","instanceAliasValue","length","isInstanceMatch","_InstanceAliasValue","splice","target","MetricName","datapoints","parseDataPoint","timestamps","values","index","instance","isVariable","GetRequestParams","signObj","signParams","pick","headerSigned","GetRequestParamsV2","sign","SliceLength","total","len","num","Math","ceil","Offset","CoreApp","IS_DEVELOPMENT_ENVIRONMENT","instanceSettings","instanceListCache","extraMetricDims","checkKeys","MetricReqConfig","extrasAlias","queryMonitorExtraConfg","CandiateDimensions","jsonData","Namespace","getOtherAlias","alias","extra","extraAlia","getVariable","getAliasValue","Array","join","formatVarDisplay","displayTpl","instanceAlias","a","b","InstanceAliasList","includes","metricFindQuery","regex","display","instancealias","templateQueryIdMap","isObject","isString","getRegions","getVariableInstances","flatMap","insAlias","text","setInstance","getInstance","instanceCache","fetchMetricData","Promise","resolve","dimensionsFormat","dimKeys","ins","dimensionObject","keyTmp","invalidDim","InvalidDimensions","getInvalidDimensions","extraDimValue","dim_KeyInStorage","dim_KeyInTarget","dim_KeyInMap","dim_KeyInIns","extraSourceMap","getExtraStorage","extraStorage","isStringOrNumber","isNumber","otherAlias","getDimensionsVal","Ekey","tt","getOwnDimension","dimVal","filter","targets","hide","metricName","reduce","prev","cloneTarget","concat","inst","getDefaultInsObj","insInReq","keys","dimResult","Dimensions","StartTime","range","from","subtract","EndTime","to","Period","period","Instances","getMonitorData","all","then","responses","flatten","getInstanceReqConfig","selfIns","metric","rs","valStr","params","serviceInfo","doRequest","RegionSet","RegionName","RegionState","getMetrics","MetricSet","resFilterFn","resultFilter","getInstances","InstanceReqConfig","interceptor","Limit","Edition","request","Error","TotalCount","TotalCnt","TotalNumber","param","isValidConfigField","testDatasource","cvmErr","monitorErr","serviceErr","cvmAuthFail","monitorAuthFail","serviceAuthFail","messages","message","compact","uniq","status","title","statusText","code","getFieldsValue","fields","fetchAllFactory","fetcher","_params","omit","Result","firstLists","delta","batchCount","pmList","fill","_","isOffsetPage","acc","cur","lists","list","instanceQueryParamsBaseParse","isFilter","Values","slice","Filters","getNamesapceFromService","serviceName","serviceGroupBy","services","label","groupName","existedGroup","items","isTargetEqual","newTargetString","oldTargetString","newTarget","oldTarget","getTimeShiftInMs","timeShift","parts","exec","amount","parseInt","__WEBPACK_EXTERNAL_MODULE__6__","config","detailConfig","QueryCtrl","newQueryIns","$scope","$rootScope","getDropdown","datasource","getFilterDropdown","directive","template","controller","restrict","scope","showDetail","getDropdownOptions","onChange","__WEBPACK_EXTERNAL_MODULE__8__","store","promisify","type","reject","onsuccess","event","returnMap","msg","onerror","props","initDB","indexedDB","webkitIndexedDB","mozIndexedDB","msIndexedDB","open","onupgradeneeded","db","objectStoreNames","contains","createObjectStore","keyPath","openDB","insertData","storeName","transaction","objectStore","add","oncomplete","addData","isCover","getData","oldData","getObjectStore","newData","requestUpdate","put","seviceName","getAllData","getAll","insKey","cacheWay","setStorage","getStorage","setExtraStorage","EValue","serviceKey","storage","CKAFKAQueryDescriptor","enDescriptor","cnDescriptor","link","min","max","CKAFKA_STATE","metricUnit","topicId","topicName","consumerGroup","partition","Status","InstanceId","SearchWord","TagKey","GetInstanceQueryParams","CKAFKAInstanceAliasList","CKAFKATopicAliasList","CKAFKAInvalidDemensions","Proxy","prop","toLocaleLowerCase","keyInStorage","TopicList","GroupList","PartitionList","TopicId","TopicName","GroupName","PartitionId","queryEditorName","LOADBALANCEFieldsDescriptor","queryEditorConfig","instanceDocUrl","fieldDescriptor","LOADBALANCE_STATE","Port","Protocol","listener","servers","serverPort","LoadBalancerIds","Forward","LoadBalancerName","Domain","LoadBalancerVips","BackendPublicIps","BackendPrivateIps","ProjectId","WithRs","VpcId","SecurityGroup","MasterZone","OrderBy","OrderType","LOADBALANCEListenerAliasList","LOADBALANCEServerAliasList","LOADBALANCEVALIDDIMENSIONS","vip","loadBalancerPort","protocol","lanIp","port","CANDIATEDIMENSIONS","PrivateIpAddresses","ServerPort","TDMQInvalidDemensions","tenantId","tenant","environmentId","TDMQInstanceAliasList","TDMQFilterFieldsDescriptor","CDNPROVINCE_STATE","regionSupported","modifyDimensons","metricItem","metricTmp","EnvironmentId","fleetId","GSEInvalidDemensions","instanceid","fleetid","queuename","GSEInstanceAliasList","FleetId","fleet","queue","GSEFilterFieldsDescriptor","GSE_STATE","v","DCDBInvalidDemensions","nodeid","shardid","ShardId","DCDBInstanceAliasList","NodeId","ShardInstanceId","DCDBFilterFieldsDescriptor","DCDB_STATE","InstanceIds","SearchName","SearchKey","ProjectIds","SubnetId","OrderByType","ExclusterType","ExclusterIds","FilterInstanceType","modifyMetricConf","IsFilterVpc","IsFilterExcluster","RedisMemFieldsDescriptor","REDISMEM_STATE","VpcIds","SubnetIds","InstanceName","UniqVpcIds","UniqSubnetIds","TypeVersion","EngineName","AutoRenew","BillingMode","Type","rnodeid","pnodeid","REDISMEMInstanceAliasList","RedisMemInvalidDemensions","NodeType","node","TDMQRABBITMQInstanceAliasList","TDMQ_STATE","NodeName","group","TDMQROCKETMQInstanceAliasList","instanceIdsChecked","filtersChecked","ClusterIdList","includeVip","NamespaceId","SERVICES","href","hideRegion","Datasources","InitStates","hackModuleName","postgresql","mr","filePath","moduleName","fileName","prefix","toUpperCase","getParams","ECMBLOCKSTORAGEInvalidDemensions","uuid","diskId","ECMBLOCKSTORAGEInstanceAliasList","ECMBLOCKSTORAGEFilterFieldsDescriptor","ECMBLOCKSTORAGE_STATE","DiskId","__WEBPACK_EXTERNAL_MODULE__22__","APIGATEWAYInvalidDemensions","serviceId","environmentName","apiid","apiId","APIGATEWAYInstanceAliasList","environmentList","EnvironmentName","APIGATEWAYFilterFieldsDescriptor","APIGATEWAY_STATE","ServiceId","ServiceName","NotUsagePlanId","Environment","IpVersion","InstanceQueryDescriptor","InvalidDemensions","k","receiver","startsWith","Reflect","has","propKey","Ip","nodeIP","DisplayStrategy","Order","OrderField","Asc","VCLBInvalidDemensions","VCLBInstanceAliasList","VCLBFilterFieldsDescriptor","VCLB_STATE","clbNamespaceMap","public","private","cynosdbMysqlFilterFieldsDescriptor","CYNOSDB_STATE","DbType","CYNOSDBMYSQLInstanceAliasList","CYNOSDBInvalidDemensions","instanceId","SCFQueryDescriptor","SCF_STATE","Description","SCFInstanceAliasList","SCFInvalidDemensions","functionName","SCFDefaultDimensionList","CLSInvalidDemensions","CLSInstanceAliasList","CLSFilterFieldsDescriptor","CLS_STATE","uin","logsetName","logsetId","tagKey","storageType","SQLSERVERInvalidDemensions","resourceId","SQLSERVERInstanceAliasList","SQLSERVERNETFilterFieldsDescriptor","SQLSERVER_STATE","InstanceIdSet","PayMode","VipSet","InstanceNameSet","VersionSet","Zone","BMINTRALBInvalidDemensions","vpcId","BMINTRALBInstanceAliasList","BMINTRALBFilterFieldsDescriptor","BMINTRALB_STATE","BMLBValidMetricsT","isValidMetric","validMetrics","toUpper","CPMInvalidDemensions","BMLBInstanceAliasList","CPMFilterFieldsDescriptor","CPM_STATE","BMPCXInvalidDemensions","peeringConnectionId","BMPCXInstanceAliasList","BMPCXFilterFieldsDescriptor","BMPCX_STATE","VpcPeerConnectionIds","CBSInvalidDemensions","diskname","unInstanceId","CBSInstanceAliasList","CBSFilterFieldsDescriptor","CBS_STATE","DiskIds","ReturnBindAutoSnapshotPolicy","metricObj","dimension","CDNPROVINCEInvalidDemensions","domain","projectid","province","appid","CDNPROVINCEInstanceAliasList","CDNPROVINCEFilterFieldsDescriptor","isp","district","origin","serviceType","projectId","domainType","fullUrlCache","https","originPullProtocol","CEIPInvalidDemensions","eip","CEIPSUMMARYInstanceAliasList","CEIPFilterFieldsDescriptor","CEIP_STATE","subscription","subscriptionId","CPMInstanceAliasList","DeviceClassCode","WanIps","LanIps","Alias","VagueIp","AutoRenewFlag","DeviceType","IsLuckyDevice","ECDNInstanceAliasList","ECDNInvalidDemensions","ECDN_STATE","disable","area","ECDNFilterFieldsDescriptor","_queries","Fuzzy","ECMInvalidDemensions","ECMInstanceAliasList","ECMFilterFieldsDescriptor","ECM_STATE","zone","PostgresFieldsDescriptor","POSTGRESInstanceAliasList","POSTGRES_STATE","PostgreInvalidDemensions","uid","VPCNETInvalidDemensions","netdetectid","netDetectId","VPCNETDETECTInstanceAliasList","VPCNETFilterFieldsDescriptor","VPCNET_STATE","WAFFilterFieldsDescriptor","WAF_STATE","WAFInstanceAliasList","WAFInvalidDemensions","CDBFieldsDescriptor","CDB_STATE","InstanceTypes","Vips","SecurityGroupId","PayTypes","InstanceNames","TaskStatus","EngineVersions","ZoneIds","CdbErrors","OrderDirection","InitFlag","CDBInstanceAliasList","CDBInvalidDemensions","insttype","CESInvalidDemensions","uInstanceId","CESInstanceAliasList","CESFilterFieldsDescriptor","CES_STATE","OrderByKey","IpList","DCFilterFieldsDescriptor","DC_STATE","DirectConnectIds","DCInstanceAliasList","DCInvalidDemensions","directConnectId","directconnectid","DCGInvalidDemensions","directConnectGatewayId","DCGInstanceAliasList","DCGFilterFieldsDescriptor","DCG_STATE","DCXFilterFieldsDescriptor","DCX_STATE","DCXInstanceAliasList","DCXInvalidDemensions","directconnectconnid","directConnectConnId","ECMLBInvalidDemensions","ECMLBInstanceAliasList","ECMLBFilterFieldsDescriptor","MONGODBFieldsDescriptor","MONGODB_STATE","InstanceType","ClusterType","MONGODBInstanceAliasList","MONGODBInvalidDemensions","replica","Replica","Node","QAAPInvalidDemensions","channelId","QAAPInstanceAliasList","QAAPFilterFieldsDescriptor","QAAP_STATE","AccessRegion","RealServerRegion","GroupId","TCAPLUSInvalidDemensions","TCAPLUSInstanceAliasList","TCAPLUSFilterFieldsDescriptor","TCAPLUS_STATE","ClusterId","TableGroupIds","TableName","TableInstanceId","TableIdlType","TableType","ListElementNum","ReservedVolume","ReservedReadQps","ReservedWriteQps","Memo","FileName","FileExtType","FileSize","FileContent","SelectedTables","regonsMap","VBCInvalidDemensions","VBCInstanceAliasList","VBCFilterFieldsDescriptor","VBC_STATE","DRegion","SRegion","state","VPNGWInvalidDemensions","vpnGwId","VPNGWInstanceAliasList","VPNGWFilterFieldsDescriptor","VPNGW_STATE","VPNXInvalidDemensions","vpnConnId","VPNXInstanceAliasList","VPNXFilterFieldsDescriptor","VPNX_STATE","LighthouseFilterFieldsDescriptor","LIGHTHOUSE_STATE","LIGHTHOUSEInstanceAliasList","LighthouseInvalidDemensions","CFSQueryDescriptor","CFS_STATE","FileSystemId","CFSInstanceAliasList","CFSInvalidDemensions","queueId","queueName","QueueName","CVMFilterFieldsDescriptor","CVM_STATE","CVMInstanceAliasList","CVMValidMetricsT","CVMValidMetrics","PCX_STATE","limit","offset","peeringConnectionName","PCXFieldsDescriptor","PCXInstanceAliasList","RedisFieldsDescriptor","REDIS_STATE","REDISInstanceAliasList","RedisInvalidDemensions","redis_uuid","TSFFieldsDescriptor","TSF_STATE","ApplicationType","MicroserviceType","ApplicationResourceTypeList","ApplicationIdList","TSFInstanceAliasList","TSFInvalidDemensions","applicationid","BWPFilterFieldsDescriptor","BWP_STATE","BandwidthPackageIds","BWPInstanceAliasList","BWPInvalidDemensions","bandwidthPackageId","CDNFilterFieldsDescriptor","CDN_STATE","CDNInstanceAliasList","CDNInvalidDemensions","LBFilterDescriptor","LB_STATE","LBInstanceAliasList","LBInvalidDemensions","NATGATEWAYInstanceAliasList","NATGatewayFilterFieldsDescriptor","NATGATEWAY_STATE","NatGatewayIds","NATInvalidDemensions","natId","OVCDNFilterFieldsDescriptor","OVCDN_STATE","OVCDNInstanceAliasList","OVCDNInvalidDemensions","__WEBPACK_EXTERNAL_MODULE__69__","TKE_STATE","conditions","groupBys","ClusterIds","ClusterName","ClusterStatus","TKEFilterFieldsDescriptor","TKEInstanceAliasList","responseField","getEnvironmentNameList","LoadBalancerType","RegionMap","keyBy","RegionInfoSet","rawSet","getZones","ZoneSet","ZoneName","ZoneId","ZoneState","getConsumerList","MapInfoList","TopicAliasList","consumerGroupCache","getConsumerGroups","groupname","topicid","consumerGoup","topicList","GroupDetailList","uniqBy","SubscribedInfos","ConsumerGroupName","SubscribedInfo","partitions","sub","Partition","formatTopicVarDisplay","topic","topicAlias","topicalias","par","ListenerAliasList","ServerAliasList","tagret","getListenerList","LoadBalancerId","formatVariableDisplay","aliasList","getServerList","listenerId","ListenerIds","Listeners","Rules","Targets","elem","listenAlias","lisId","listenerid","serverprivateip","serveralias","serversList","chain","dims","Set","fetchAllSubscription","SubscriptionId","cosURL","Buckets","BucketName","bucket","DeviceClassSet","Product","extraActionMap","DescribeDCDBShards","pickKey","DescribeDCDBInstanceNodeInfo","RegionList","act","getDiskList","instanceObj","getQueueNameList","getFleetList","ReplicaAliasList","replicaAlias","ReplicaSetId","replicasetid","times","SecondaryNum","nodeId","fetchAllNodes","NodeFlag","resultT","doRequestV2","totalCount","getVpcId","VpcSet","getVpcIds","MonitorVersion","getInstanceNodeInfo","nodetype","ndoeTypeIndex","getVersions","Versions","FunctionName","RegionInfos","DescribeTopics","DescribeEnvironments","DescribeRabbitMQNodeList","DescribeRocketMQNamespaces","DescribeRocketMQGroups","variableToArray","variable","tke_cluster_instance_id","Key","Operator","MetricNames","Module","Conditions","GroupBys","Data","Points","point","dimensionSort","dimensionString","timeshiftString","getAllMetrics","public_metrics","private_metrics","edition","init","getInstanceId","getServiceFn","getExtraDropdown","sQuery","onRefresh","onChecked","srcField","dstField","bwpQuery","BWPQueryCtrl","cdbQuery","CDBQueryCtrl","cdnQuery","CDNQueryCtrl","ExtraFields","scfQuery","SCFQueryCtrl","onInstanceChange","getExtraFields","CKAFKAQueryCtrl","element","attrs","$watch","newValue","oldValue","onFieldChange","getVariableId","variableData","getServersDropdown","getServerPortDropdown","serverPortList","cacheMap","getTopicName","onExtraFieldChange","datas","CmqTopicQueryCtrl","cvmQuery","CVMQueryCtrl","dropdownTextConfig","actionMaps","lbQuery","LBQueryCtrl","lighthouseQuery","LighthouseQueryCtrl","replicaId","mongodbQuery","MongoDBQueryCtrl","some","dataT","mrQuery","MrQueryCtrl","natGatewayQuery","NatGatewayQueryCtrl","ovCdnQuery","OVCDNQueryCtrl","pcxQuery","PCXQueryCtrl","redisQuery","RedisQueryCtrl","clearExtrasAlias","redisMemQuery","RedisMemQueryCtrl","evId","tdmqRocketmqQuery","TdmqRocketmqQueryCtrl","addCondition","deleteCondition","targetCondition","getOperator","tsfQuery","TSFQueryCtrl","VBCQueryCtrl","webpackContext","req","webpackContextResolve","_class","getNamespaces","namespaces","getCascaderNamespaces","validServices","getSelectedServices","promises","optionsTemp","promiseTemp","Done","results","getListeners","errorMsg","upperFirst","fnName","argu","hexTable","array","arrayToObject","source","plainObjects","refs","j","pop","compacted","compactQueue","decode","decodeURIComponent","encode","string","out","charCodeAt","charAt","isBuffer","constructor","isRegExp","merge","allowPrototypes","mergeTarget","percentTwenties","formatters","RFC1738","RFC3986","SPQueryCtrl","_config","queryDDO","formats","utils","arrayPrefixGenerators","brackets","indices","repeat","toISO","Date","toISOString","delimiter","encoder","encodeValuesOnly","serializeDate","skipNulls","strictNullHandling","generateArrayPrefix","sort","allowDots","formatter","objKeys","opts","TypeError","arrayFormat","joined","addQueryPrefix","arrayLimit","decoder","depth","parameterLimit","parseKeys","givenKey","child","segment","parent","leaf","root","cleanRoot","isNaN","parseArrays","parseObject","ignoreQueryPrefix","tempObj","cleanStr","Infinity","part","bracketEqualsPos","pos","parseValues","newObj","tcFolder","folderId","tcFolder_EN","getFolderId","folders","folderEnId","post","folder","folderEn","oldPost","pluginId","location","pathname","endsWith","backendInterceptor","$injector","$q","appEditCtrl","setPostUpdateHook","postUpdate","appModel","configured","enabled","datasources","ds","moveToFolder","dashbaordUid","dashboard","overwrite","reviseDashboard","pmlist","importedUrl","templateUrl"],"mappings":"6JACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QA0Df,OArDAF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EA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B,UAAW,CACT/N,iBAAkByN,EAAaE,UAC/B1N,gBAAiB,gBACjBC,aAAczB,EAAmBwI,WAEnC+G,YAAa,CACXhO,iBAAkByN,EAAaG,cAC/B3N,gBAAiB,YACjBC,aAAczB,EAAmBoO,YAGtB,a,6BCtKf,gsBAEM9U,EAAY,kBAGZkW,EAAkB,mBAwBlBC,EAAkD,CACtD,CACE/iB,IAAK,SACLghB,aAAc,SACdC,aAAc,0CACdC,KAAM,GACNjD,KAAM,cACNkD,IAAK,GAEP,CACEnhB,IAAK,QACLghB,aAAc,QACdC,aAAc,wBACdC,KAAM,GACNjD,KAAM,cACNkD,IAAK,GAEP,CACEnhB,IAAK,kBACLghB,aAAc,kBACdC,aAAc,OACdC,KAAM,GACNjD,KAAM,cAER,CACEje,IAAK,mBACLghB,aAAc,oBACdC,aAAc,OACdC,KAAM,GACNjD,KAAM,SAER,CACEje,IAAK,UACLghB,aAAc,UACdC,aAAc,WACdC,KAAM,GACNjD,KAAM,SACN9C,KA3DiB,CACnB,CAAEtH,KAAM,UAAWnU,MAAO,GAC1B,CAAEmU,KAAM,UAAWnU,MAAO,KA2D1B,CACEM,IAAK,SACLghB,aAAc,SACdC,aAAc,wCACdC,KAAM,GACNjD,KAAM,SAER,CACEje,IAAK,mBACLghB,aAAc,oBACdC,aAAc,iBACdC,KAAM,GACNjD,KAAM,cAER,CACEje,IAAK,oBACLghB,aAAc,qBACdC,aAAc,oBACdC,KAAM,GACNjD,KAAM,cAER,CACEje,IAAK,mBACLghB,aAAc,oBACdC,aAAc,oBACdC,KAAM,GACNjD,KAAM,cAER,CACEje,IAAK,YACLghB,aAAc,aACdC,aAAc,iBACdC,KAAM,GACNjD,KAAM,eAER,CACEje,IAAK,QACLghB,aAAc,SACdC,aAAc,eACdC,KAAM,GACNjD,KAAM,SAER,CACEje,IAAK,gBACLghB,aAAc,iBACdC,aAAc,QACdC,KAAM,GACNjD,KAAM,SAER,CACEje,IAAK,aACLghB,aAAc,cACdC,aAAc,SACd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ChC,CACE97B,IAAK,OACLghB,aAAc,OACdC,aAAc,MACdC,KAAM,GACNjD,KAAM,iBAER,CACEje,IAAK,aACLghB,aAAc,aACdC,aAAc,OACdC,KAAM,kDACNjD,KAAM,oBAER,CACEje,IAAK,UACLghB,aAAc,SACdC,aAAc,SACdC,KAAM,uDACNjD,KAAM,cAER,CACEje,IAAK,SACLghB,aAAc,SACdC,aAAc,SACdC,KAAM,GACNjD,KAAM,cAER,CACEje,IAAK,YACLghB,aAAc,YACdC,aAAc,OACdC,KAAM,GACNjD,KAAM,cAER,CACEje,IAAK,cACLghB,aAAc,cACdC,aAAc,OACdC,KAAM,GACNjD,KAAM,cAER,CACEje,IAAK,oBACLghB,aAAc,oBACdC,aAAc,QACdC,KAAM,GACNjD,KAAM,cAER,CACEje,IAAK,gBACLghB,aAAc,gBACdC,aAAc,OACdC,KAAM,GACNjD,KAAM,cAER,CACEje,IAAK,UACLghB,aAAc,MACdC,aAAc,MACdC,KAAM,GACNjD,KAAM,cAER,CACEje,IAAK,uBACLghB,aAAc,uBACdC,aAAc,SACdC,KAAM,GACNjD,KAAM,SACN9C,KA3FwB,CAC1B,CAAEtH,KAAM,MAAOnU,MAAO,WACtB,CAAEmU,KAAM,MAAOnU,MAAO,oBACtB,CAAEmU,KAAM,QAASnU,MAAO,aA0FxB,CACEM,IAAK,qBACLghB,aAAc,qBACdC,aAAc,aACdC,KAAM,GACNjD,KAAM,cAER,CACEje,IAAK,oBACLghB,aAAc,oBACdC,aAAc,2CACdC,KAAM,GACNjD,KAAM,eAIJ8d,EAAY,CAChB72B,OAAQ,GACR6Q,WAAY,GACZuL,WAAY,GACZrK,YAAQlI,EACRwF,gBAAiB,KACjBhE,SAAU,GACVsC,cAAe,aACf7F,QAAS,CACP0L,MAAO,GACPpH,OAAQ,EACRgY,oBAAoB,EACpBC,gBAAgB,EAChBpC,YAAa,CAAC,IACd3L,QAAS,EAAF,GArHa,CACtBuY,KAAM,GACN,aAAc,GACd,UAAW,GACX,SAA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AGp1B,OAAS,OAELrO,OAAS,IACvBpJ,KAAK0sC,YAAa,IA6C1B,OAzEA,sCAiCQ,YAAAI,aAAN,SAAmBC,EAAsBzB,G,gGAEjB,SAAMxrC,EAAWhH,IAAI,8BAAuBi0C,K,OAElE,OAFQC,EAAc,SAAL,UAEjB,GAAMltC,EAAW6rC,KAAK,sBAAuB,CAC3CqB,UAAS,EACT1B,SAAQ,EACRn4B,QAAS,GACT85B,WAAW,K,cAJb,S,YAQI,YAAAC,gBAAN,W,qHAEiC,SAAM1B,K,OAE1B,OAFL,EAAyB,SAAxBF,EAAQ,KAAEI,EAAU,KAEhB,GAAM5rC,EAAWhH,IAAI,uBAA6B,QAAb,EAAAkH,KAAKysC,gBAAQ,eAAEzpC,GAAE,iB,OAajE,OAbMmO,EAAK,SAGLg8B,EAASh8B,EAAGlI,KAAI,SAACtC,GACb,IAAAymC,EAAsBzmC,EAAX,YAAEnE,EAASmE,EAAL,KACnBinB,EAAMwf,EAAY3mC,MAAM,KAAK,GACnC,OAAImnB,EACK,EAAKkf,aAAalf,EAAKprB,EAAK0pC,SAAS,sBAAwBR,EAAaJ,GAE1E59B,QAAQC,aAInB,GAAOD,QAAQkD,IAAIu8B,YAGf,YAAAX,WAAN,W,gGACE,OAAkB,QAAb,EAAAxsC,KAAKysC,gBAAQ,eAAEE,SAIpB,GAAM3sC,KAAKktC,mBAHT,I,OAIF,OADA,SACA,GAAOltC,KAAKqsC,GAAG1+B,SAAQ,YAtElB,EAAA0/B,YAAc,yBAwEvB,EAzEA","file":"components/config.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 212);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__0__;","const zh_CN = {\n language: '语言',\n enable_intranet_API_mode: '开启内网API模式',\n cloud_database: '云数据库',\n cloud_load_balancer: '负载均衡',\n virtual_private_cloud: '私有网络',\n content_delivery_network: '内容分发网络',\n message_queue: '消息队列',\n direct_connect: '专线接入',\n cloud_physical_machine: '黑石物理服务器',\n elastic_mapReduce: '弹性 MapReduce',\n edge_computing_machine: '边缘计算机器',\n // namespace\n RUM: '前端性能监控(RUM)',\n APM: '应用性能监控(APM)',\n CLS: '日志服务(CLS)',\n CVM: '云服务器(CVM)',\n CDB: '云数据库 MySQL(CDB)',\n CMONGO: '云数据库 MongoDB(CMONGO)',\n POSTGRES: '云数据库 PostgreSQL(POSTGRES)',\n REDIS: '云数据库 Redis(REDIS)',\n REDIS_MEM: '云数据库 Redis内存版(5s)(REDIS_MEM)',\n SQLSERVER: '云数据库 SQL Server(SQLSERVER)',\n CYNOSDB_MYSQL: '云数据库 CYNOSDB_MYSQL(CYNOSDB_MYSQL)',\n TCAPLUS: '云数据库 TcaplusDB(TCAPLUS)',\n TDMYSQL: '分布式数据库 TDSQL MySQL(TDMYSQL)',\n PCX: '私有网络-对等连接(PCX)',\n BWP: '私有网络-带宽包(BWP)',\n NAT_GATEWAY: '私有网络-NAT 网关(NAT_GATEWAY)',\n VPNGW: '私有网络-VPN 网关(VPNGW)',\n VPNX: '私有网络-VPN 通道(VPNX)',\n DCG: '私有网络-专线网关(DCG)',\n CEIP_SUMMARY: '私有网络-Anycast 弹性公网IP(CEIP_SUMMARY)',\n VPC_NET_DETECT: '私有网络-网络探测(VPC_NET_DETECT)',\n VBC: '私有网络-云联网(VBC)',\n LB: '私有网络-弹性公网IP(LB)',\n LB_PUBLIC: '公网负载均衡监控指标(LB_PUBLIC)',\n LB_PRIVATE: '内网负载均衡四层协议监控指标(LB_PRIVATE)',\n LOADBALANCE: '内网负载均衡七层协议监控指标(LOADBALANCE)',\n CDN: '国内域名(CDN)',\n CDN_LOG_DATA: '省份域名(CDN_LOG_DATA)',\n OV_CDN: '国外域名(OV_CDN)',\n SCF_V2: '云函数(SCF)',\n CFS: '文件存储(CFS)',\n COS: '对象存储(COS)',\n CKAFKA: '消息队列 CKafka(CKAFKA)',\n CMQ: '消息队列-队列服务监控(CMQ)',\n CMQTOPIC: '消息队列-主题订阅监控(CMQTOPIC)',\n TDMQ: '消息队列 Pulsar 版(TDMQ)',\n TDMQ_ROCKETMQ: '消息队列 RocketMQ 版(ROCKETMQ)',\n TDMQ_RABBITMQ: '消息队列 RabbitMQ 版(RABBITMQ)',\n DCX: '专线接入-专用通道(DCX)',\n DC: '专线接入-物理专线(DC)',\n CPM: '黑石物理服务器(CPM)',\n BM_PCX: '黑石对等连接(BM_PCX)',\n BM_LB: '黑石外网负载均衡(BM_LB)',\n BM_INTRA_LB: '黑石内网负载均衡(BM_INTRA_LB)',\n CES: 'Elasticsearch指标(CES)',\n BLOCK_STORAGE: '云硬盘(BLOCK_STORAGE)',\n APIGATEWAY: 'API 网关(APIGATEWAY)',\n QAAP: '全球应用加速(GAAP)',\n ECM: '边缘计算和网络监控(ECM)',\n ECM_BLOCK_STORAGE: '边缘计算存储监控(ECM_BLOCK_STORAGE)',\n ECM_LB: '边缘计算负载均衡(ECM_LB)',\n GSE: '游戏服务器伸缩(GSE)',\n TKE: '容器服务(TKE)',\n ECDN: '全站加速网络(ECDN)',\n WAF: 'Web 应用防火墙(WAF)',\n // others\n multi_scene: '多场景版',\n lite: '精简版',\n cloud_monitor: '云监控',\n cloud_log_service: '日志服务',\n real_user_monitoring: '前端性能监控',\n apm_monitoring: '应用性能监控',\n region: '地域',\n log_topic: '日志主题',\n syntax_rule: '语法规则',\n max_result_num: '最大结果条数',\n search_statement: '检索语句',\n time_unit: 'Time unit',\n seconds: 'seconds',\n search_description: '按照具体的查询条件搜索实例,默认拉取前 20 条实例',\n // region\n 'ap-guangzhou': '华南地区(广州)',\n 'ap-shenzhen-fsi': '华南地区(深圳金融)',\n 'ap-guangzhou-open': '华南地区(广州OPEN)',\n 'ap-shenzhen': '华南地区(深圳)',\n 'ap-qingyuan': '华南地区(清远)',\n 'ap-shanghai': '华东地区(上海)',\n 'ap-shanghai-fsi': '华东地区(上海金融)',\n 'ap-jinan-ec': '华东地区(济南)',\n 'ap-hangzhou-ec': '华东地区(杭州)',\n 'ap-nanjing': '华东地区(南京)',\n 'ap-fuzhou-ec': '华东地区(福州)',\n 'ap-hefei-ec': '华东地区(合肥)',\n 'ap-beijing': '华北地区(北京)',\n 'ap-tianjin': '华北地区(天津)',\n 'ap-beijing-fsi': '华北地区(北京金融)',\n 'ap-shijiazhuang-ec': '华北地区(石家庄)',\n 'ap-wuhan-ec': '华中地区(武汉)',\n 'ap-changsha-ec': '华中地区(长沙)',\n 'ap-zhengzhou-ec': '华中地区(郑州)',\n 'ap-chengdu': '西南地区(成都)',\n 'ap-chongqing': '西南地区(重庆)',\n 'ap-xian-ec': '西北地区(西安)',\n 'ap-shenyang-ec': '东北地区(沈阳)',\n 'ap-taipei': '港澳台地区(中国台北)',\n 'ap-hongkong': '港澳台地区(中国香港)',\n 'ap-seoul': '亚太东北(首尔)',\n 'ap-tokyo': '亚太东北(东京)',\n 'ap-singapore': '亚太东南(新加坡)',\n 'ap-bangkok': '亚太东南(曼谷)',\n 'ap-jakarta': '亚太东南(雅加达)',\n 'na-siliconvalley': '美国西部(硅谷)',\n 'eu-frankfurt': '欧洲地区(法兰克福)',\n 'eu-moscow': '欧洲地区(莫斯科)',\n 'ap-mumbai': '亚太南部(孟买)',\n 'na-ashburn': '美国东部(弗吉尼亚)',\n 'sa-saopaulo': '南美地区(圣保罗)',\n 'na-toronto': '北美地区(多伦多)',\n};\nexport default zh_CN;\n","const en_US = {\n language: 'Language',\n enable_intranet_API_mode: 'Enable Intranet API Mode',\n cloud_database: 'Cloud Database',\n cloud_load_balancer: 'Cloud Load Balancer',\n virtual_private_cloud: 'Virtual Private Cloud',\n content_delivery_network: 'Content Delivery Network',\n message_queue: 'Message Queue',\n direct_connect: 'Direct Connect',\n cloud_physical_machine: 'Cloud Physical Machine',\n elastic_mapReduce: 'Elastic MapReduce',\n edge_computing_machine: 'Edge Computing Machine',\n // namespace\n RUM: 'Real User Monitoring(RUM)',\n CLS: 'Cloud Log Service(CLS)',\n CVM: 'Cloud Virtual Machine(CVM)',\n CDB: 'TencentDB for MySQL(CDB)',\n CMONGO: 'TencentDB for MongoDB(CMONGO)',\n POSTGRES: 'TencentDB for PostgreSQL(POSTGRES)',\n REDIS: 'TencentDB for Redis(REDIS)',\n REDIS_MEM: 'TencentDB for Redis(Memory Edition, 5-Second)(REDIS_MEM)',\n SQLSERVER: 'TencentDB for SQL Server(SQLSERVER)',\n CYNOSDB_MYSQL: 'TencentDB for CYNOSDB_MYSQL(CYNOSDB_MYSQL)',\n TCAPLUS: 'TencentDB for TcaplusDB(TCAPLUS)',\n TDMYSQL: 'TDSQL for MySQL(TDMYSQL)',\n PCX: 'Peering Connection(PCX)',\n BWP: 'Bandwidth Packet(BWP)',\n NAT_GATEWAY: 'NAT Gateway(NAT_GATEWAY)',\n VPNGW: 'VPN Gateway(VPNGW)',\n VPNX: 'VPN Tunnel(VPNX)',\n DCG: 'Direct Connect Gateway(DCG)',\n CEIP_SUMMARY: 'Anycast EIP(CEIP_SUMMARY)',\n VPC_NET_DETECT: 'Network Detection(VPC_NET_DETECT)',\n VBC: 'Cloud Connect Network(VBC)',\n LB: 'Elastic IP(LB)',\n LB_PUBLIC: 'Public Network CLB(LB_PUBLIC)',\n LB_PRIVATE: 'Private Network CLB Layer-4 Protocol(LB_PRIVATE)',\n LOADBALANCE: 'Private Network CLB Layer-7 Protocol(LOADBALANCE)',\n CDN: 'Chinese Mainland Domain(CDN)',\n CDN_LOG_DATA: 'Province(CDN_LOG_DATA)',\n OV_CDN: 'Overseas Domain(OV_CDN)',\n SCF_V2: 'Serverless Cloud Function(SCF)',\n CFS: 'Cloud File Storage(CFS)',\n COS: 'Cloud Object Storage(COS)',\n CKAFKA: 'Message Queue CKafka(CKAFKA)',\n CMQ: 'Message Queue for Queue Service(CMQ)',\n CMQTOPIC: 'Message Queue for Topic Subscription(CMQTOPIC)',\n TDMQ: 'Tencent Distributed Message Queue for Pulsar(TDMQ)',\n TDMQ_ROCKETMQ: 'Tencent Distributed Message Queue for RocketMQ(ROCKETMQ)',\n TDMQ_RABBITMQ: 'Tencent Distributed Message Queue for RabbitMQ(RABBITMQ)',\n DCX: 'Direct Connect for Dedicated Tunnel(DCX)',\n DC: 'Direct Connect for Connection(DC)',\n CPM: 'Cloud Physical Machine(CPM)',\n BM_PCX: 'Cloud Physical Machine for Peering Connection(BM_PCX)',\n BM_LB: 'Cloud Physical Machine for Public Network CLB(BM_LB)',\n BM_INTRA_LB: 'Cloud Physical Machine for Private Network CLB(BM_INTRA_LB)',\n CES: 'Elasticsearch Service(CES)',\n BLOCK_STORAGE: 'Cloud Block Storage(BLOCK_STORAGE)',\n APIGATEWAY: 'API Gateway(APIGATEWAY)',\n QAAP: 'Global Application Acceleration Platform(GAAP)',\n ECM: 'Edge Computing Machine for Computation and Networking(ECM)',\n ECM_BLOCK_STORAGE: 'Edge Computing Machine for Block Storage(ECM_BLOCK_STORAGE)',\n ECM_LB: 'Edge Computing Machine for Layer-4 CLB(ECM_LB)',\n GSE: 'Game Server Elastic-scaling(GSE)',\n TKE: 'Tencent Kubernetes Engine(TKE)',\n ECDN: 'Enterprise Content Delivery Network(ECDN)',\n WAF: 'Web Application Firewall(WAF)',\n // others\n multi_scene: 'Multi-Scene',\n lite: 'Lite',\n cloud_monitor: 'Cloud Monitor',\n cloud_log_service: 'Cloud Log Service',\n real_user_monitoring: 'Real User Monitoring',\n apm_monitoring: 'Application Monitoring',\n region: 'Region',\n log_topic: 'Log Topic',\n syntax_rule: 'Syntax Rule',\n max_result_num: 'Maximum result number',\n search_statement: 'Search Statement',\n time_unit: 'Time unit',\n seconds: 'seconds',\n search_description:\n 'Search for instances according to specific query conditions, and pull the first 20 instances by default',\n // region\n 'ap-guangzhou': 'South China(Guangzhou)',\n 'ap-shenzhen-fsi': 'South China(Shenzhen Finance)',\n 'ap-guangzhou-open': 'South China(Guangzhou OPEN)',\n 'ap-shenzhen': 'South China(Shenzhen)',\n 'ap-qingyuan': 'South China(Qingyuan)',\n 'ap-shanghai': 'East China(Shanghai)',\n 'ap-shanghai-fsi': 'East China(Shanghai Finance)',\n 'ap-jinan-ec': 'East China(Jinan)',\n 'ap-hangzhou-ec': 'East China(Hangzhou)',\n 'ap-nanjing': 'East China(Nanjing)',\n 'ap-fuzhou-ec': 'East China(Fuzhou)',\n 'ap-hefei-ec': 'East China(Hefei)',\n 'ap-beijing': 'North China region(Beijing)',\n 'ap-tianjin': 'North China region(Tianjin)',\n 'ap-beijing-fsi': 'North China region(Beijing Finance)',\n 'ap-shijiazhuang-ec': 'North China region(Shijiazhuang)',\n 'ap-wuhan-ec': 'Central China(Wuhan)',\n 'ap-changsha-ec': 'Central China(Changsha)',\n 'ap-zhengzhou-ec': 'Central China(Zhengzhou)',\n 'ap-chengdu': 'Southwest China(Chengdu)',\n 'ap-chongqing': 'Southwest China(Chongqing)',\n 'ap-xian-ec': \"Northwest region(Xi'an)\",\n 'ap-shenyang-ec': 'Northeast China(Shenyang)',\n 'ap-taipei': 'Hong Kong, Macau and Taiwan (China)(Taipei, China)',\n 'ap-hongkong': 'Hong Kong, Macau and Taiwan (China)(Hong Kong, China)',\n 'ap-seoul': 'Northeast Asia(Seoul)',\n 'ap-tokyo': 'Northeast Asia(Tokyo)',\n 'ap-singapore': 'Southeast Asia(Singapore)',\n 'ap-bangkok': 'Southeast Asia(Bangkok)',\n 'ap-jakarta': 'Southeast Asia(Jakarta)',\n 'na-siliconvalley': 'US West(Silicon Valley)',\n 'eu-frankfurt': 'Europe(Frankfurt)',\n 'eu-moscow': 'Europe(Northeastern Europe)',\n 'ap-mumbai': 'South Asia(Mumbai)',\n 'na-ashburn': 'US East(Virginia)',\n 'sa-saopaulo': 'South America(São Paulo)',\n 'na-toronto': 'North America(Toronto)',\n};\nexport default en_US;\n","import zh_CN from './zh_CN';\nimport en_US from './en_US';\n\nlet locale_language = 'zh-CN';\n\nexport enum Language {\n Chinese = 'zh-CN',\n English = 'en-US',\n}\n\nexport const t = (key: string) => {\n if (locale_language === Language.Chinese) {\n return zh_CN[key];\n }\n return en_US[key];\n};\n\nexport const setLanguage = (language: Language) => {\n locale_language = language;\n};\n\nexport const getLanguage = () => locale_language;\n","import moment from 'moment';\n\nconst HttpRequestMethod = 'POST';\nconst CanonicalUri = '/';\nconst CanonicalQueryString = '';\nconst ContentType = 'application/json';\n\nexport default class Sign {\n /**\n * Tencent Cloud API Signature v3 reference: https://cloud.tencent.com/document/api/213/30654\n * secretId: SecretId for identifying identity that is applied for on Cloud API Key.\n * A SecretId corresponds to a unique SecretKey, which is used to generate the request Signature.\n * secretKey: SecretKey is used to encrypt the signature string and verify the signature string on the server\n * service: the name of service, which must be consistent with the request domain, such as cvm\n * action: The name of the API for the desired operation\n * host: the domain of service,which must be consistent with the request domain, such as cvm.tencentcloudapi.com\n * version: PI version, such as 2017-03-12\n * payload: The request parameters\n */\n\n secretId: string;\n\n service: string;\n action: string;\n host: string;\n version: string;\n payload: Record | string;\n region: string;\n timestamp: number;\n date: string;\n backendSrv: any;\n datasourceId: Number;\n constructor(options) {\n const { secretId, service, action, host, version, payload = '', region, backendSrv, datasourceId } = options;\n this.secretId = secretId;\n // this.secretKey = secretKey;\n this.service = service;\n this.action = action;\n this.host = host;\n this.version = version;\n this.payload = typeof payload === 'string' ? payload : JSON.stringify(payload);\n this.region = region;\n const nowDate = moment().utc();\n this.timestamp = nowDate.unix();\n this.date = nowDate.format('YYYY-MM-DD');\n this.backendSrv = backendSrv;\n this.datasourceId = datasourceId;\n }\n\n async getHeader() {\n return this.getResourceHeader();\n }\n\n async getResourceHeader() {\n let res: { authorization?: string; token?: string; intranet?: boolean } = {};\n try {\n const resp = await this.backendSrv.datasourceRequest({\n url: `/api/datasources/${this.datasourceId}/resources/sign_v3`,\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n data: {\n Host: this.host,\n Service: this.service,\n Version: this.version,\n Action: this.action,\n Region: this.region,\n Timestamp: this.timestamp,\n Method: HttpRequestMethod,\n Uri: CanonicalUri,\n Query: CanonicalQueryString,\n Body: this.payload,\n Headers: {\n 'content-type': ContentType,\n host: this.host,\n },\n },\n });\n res = resp.data;\n } catch (err) {}\n const { authorization, token, intranet } = res;\n const grafanaVersion = (window as any).grafanaBootData?.settings?.buildInfo?.version || '0.0.0';\n const headers = {\n Authorization: authorization,\n 'Content-Type': ContentType,\n 'X-TC-Action': this.action,\n 'X-TC-Timestamp': this.timestamp.toString(),\n 'X-TC-Version': this.version,\n 'X-TC-RequestClient': `GF_${grafanaVersion}_PL_CM_${process.env.TENCENT_CLOUD_MONITOR_GRAFANA_PLUGIN_VERSION}`,\n ...(this.region && {\n 'X-TC-Region': this.region,\n }),\n ...(token && {\n 'X-TC-Token': token,\n }),\n intranet: intranet,\n };\n return headers;\n }\n}\n","/**\n *\n * @param defaults 为对象\n * secretId\n * secretKey\n * action\n * region\n * host\n */\n\nexport default class SignV2 {\n defaults: any = {\n path: '/v2/index.php',\n method: 'POST',\n };\n backendSrv: any;\n datasourceId: Number;\n constructor(defaults: any = {}) {\n this.defaults = Object.assign(this.defaults, defaults);\n this.defaults.secretKey = '';\n this.backendSrv = defaults.backendSrv;\n this.datasourceId = defaults.datasourceId;\n }\n\n generateQueryString = async () => {\n return this.getResourceQueryString();\n };\n\n async getResourceQueryString() {\n let res: { path?: string; querystring?: any; host?: string; intranet?: boolean } = {};\n try {\n const { data } = this.defaults;\n const payload = typeof data === 'string' ? data : JSON.stringify(data);\n const resp = await this.backendSrv.datasourceRequest({\n url: `/api/datasources/${this.datasourceId}/resources/sign_v2`,\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n data: {\n Host: this.defaults.host,\n Action: this.defaults.action,\n Version: this.defaults.version,\n Region: this.defaults.region,\n Method: this.defaults.method,\n Uri: this.defaults.path,\n Query: '',\n Body: payload,\n },\n });\n res = resp.data;\n } catch (err) {}\n const { path, querystring, host, intranet } = res;\n return { queryString: querystring, path: path, host: host, intranet: intranet };\n }\n}\n","import _ from 'lodash';\nimport qs from 'qs';\nimport { SERVICES } from '../tc_monitor';\nimport Sign from './sign';\nimport SignV2 from './signV2';\nimport { toDataQueryResponse } from '@grafana/runtime';\nimport { getLanguage } from '../../locale';\n\nimport packageInfo from '../plugin.json';\nexport const TcDataSourceId = packageInfo.id;\n\n// the services of tencentcloud monitor api\nconst FINACE_REGIONS = ['ap-shanghai-fsi', 'ap-shenzhen-fsi'];\nconst SERVICES_API_INFO = {\n api: {\n service: 'api',\n version: '2020-11-06',\n path: '/api',\n host: 'api.tencentcloudapi.com',\n },\n // monitor api info\n monitor: {\n service: 'monitor',\n version: '2018-07-24',\n path: '/monitor',\n host: 'monitor.tencentcloudapi.com',\n },\n // cls api info\n cls: {\n service: 'cls',\n version: '2020-10-16',\n path: '/cls',\n host: 'cls.tencentcloudapi.com',\n },\n // cvm api info\n cvm: {\n service: 'cvm',\n version: '2017-03-12',\n path: '/cvm',\n host: 'cvm.tencentcloudapi.com',\n },\n // cdb api info\n cdb: {\n service: 'cdb',\n version: '2017-03-20',\n path: '/cdb',\n host: 'cdb.tencentcloudapi.com',\n },\n // pcx api info\n pcx: {\n service: 'pcx',\n version: '',\n path: '/pcx',\n host: 'vpc.api.qcloud.com',\n },\n // vpc api info\n vpc: {\n service: 'vpc',\n version: '2017-03-12',\n path: '/vpc',\n host: 'vpc.tencentcloudapi.com',\n },\n // mongodb api info\n mongodb: {\n service: 'mongodb',\n version: '2019-07-25',\n path: '/mongodb',\n host: 'mongodb.tencentcloudapi.com',\n },\n // 负载均衡 clb\n clb: {\n service: 'clb',\n version: '2018-03-17',\n path: '/clb',\n host: 'clb.tencentcloudapi.com',\n },\n // postgresql api info\n postgres: {\n service: 'postgres',\n version: '2017-03-12',\n path: '/postgres',\n host: 'postgres.tencentcloudapi.com',\n },\n // cdn info\n cdn: {\n service: 'cdn',\n version: '2018-06-06',\n path: '/cdn',\n host: 'cdn.tencentcloudapi.com',\n },\n // redis info\n redis: {\n service: 'redis',\n version: '2018-04-12',\n path: '/redis',\n host: 'redis.tencentcloudapi.com',\n },\n scf: {\n service: 'scf',\n version: '2018-04-16',\n path: '/scf',\n host: 'scf.tencentcloudapi.com',\n },\n cfs: {\n service: 'cfs',\n version: '2019-07-19',\n path: '/cfs',\n host: 'cfs.tencentcloudapi.com',\n },\n ckafka: {\n service: 'ckafka',\n version: '2019-08-19',\n path: '/ckafka',\n host: 'ckafka.tencentcloudapi.com',\n },\n // 专线接入实例列表\n dc: {\n service: 'dc',\n version: '2018-04-10',\n path: '/dc',\n host: 'dc.tencentcloudapi.com',\n },\n // cynosdb实例列表\n cynosdb: {\n service: 'cynosdb',\n version: '2019-01-07',\n path: '/cynosdb',\n host: 'cynosdb.tencentcloudapi.com',\n },\n // sqlserver实例列表\n sqlserver: {\n service: 'sqlserver',\n version: '2018-03-28',\n path: '/sqlserver',\n host: 'sqlserver.tencentcloudapi.com',\n },\n // bm实例列表\n bm: {\n service: 'bm',\n version: '2018-04-23',\n path: '/bm',\n host: 'bm.tencentcloudapi.com',\n },\n bmeip: {\n service: 'bmeip',\n version: '2018-06-25',\n path: '/bmeip',\n host: 'bmeip.tencentcloudapi.com',\n },\n bmvpc: {\n service: 'bmvpc',\n version: '2018-06-25',\n path: '/bmvpc',\n host: 'bmvpc.tencentcloudapi.com',\n },\n bmlb: {\n service: 'bmlb',\n version: '2018-06-25',\n path: '/bmlb',\n host: 'bmlb.tencentcloudapi.com',\n },\n // ES集群实例\n es: {\n service: 'es',\n version: '2018-04-16',\n path: '/es',\n host: 'es.tencentcloudapi.com',\n },\n // MapReduce\n emr: {\n service: 'emr',\n version: '2019-01-03',\n path: '/emr',\n host: 'emr.tencentcloudapi.com',\n },\n // CMQ消息队列\n cmq: {\n service: 'cmq',\n version: '2019-03-04',\n path: '/cmq',\n host: 'cmq.tencentcloudapi.com',\n },\n cbs: {\n service: 'cbs',\n version: '2017-03-12',\n path: '/cbs',\n host: 'cbs.tencentcloudapi.com',\n },\n // tcaplus实例\n tcaplusdb: {\n service: 'tcaplusdb',\n version: '2019-08-23',\n path: '/tcaplusdb',\n host: 'tcaplusdb.tencentcloudapi.com',\n },\n // tcaplus实例\n dcdb: {\n service: 'dcdb',\n version: '2018-04-11',\n path: '/dcdb',\n host: 'dcdb.tencentcloudapi.com',\n },\n // apigateway实例\n apigateway: {\n service: 'apigateway',\n version: '2018-08-08',\n path: '/apigateway',\n host: 'apigateway.tencentcloudapi.com',\n },\n tdmq: {\n service: 'tdmq',\n version: '2020-02-17',\n path: '/tdmq',\n host: 'tdmq.tencentcloudapi.com',\n },\n tdmq_rabbitmq: {\n service: 'tdmq',\n version: '2020-02-17',\n path: '/tdmq',\n host: 'tdmq.tencentcloudapi.com',\n },\n tdmq_rocketmq: {\n service: 'tdmq',\n version: '2020-02-17',\n path: '/tdmq',\n host: 'tdmq.tencentcloudapi.com',\n },\n gaap: {\n service: 'gaap',\n version: '2018-05-29',\n path: '/gaap',\n host: 'gaap.tencentcloudapi.com',\n },\n ecm: {\n service: 'ecm',\n version: '2019-07-19',\n path: '/ecm',\n host: 'ecm.tencentcloudapi.com',\n },\n gse: {\n service: 'gse',\n version: '2019-11-12',\n path: '/gse',\n host: 'gse.tencentcloudapi.com',\n },\n lighthouse: {\n service: 'lighthouse',\n version: '2020-03-24',\n path: '/lighthouse',\n host: 'lighthouse.tencentcloudapi.com',\n },\n tsf: {\n service: 'tsf',\n version: '2018-03-26',\n path: '/tsf',\n host: 'tsf.tencentcloudapi.com',\n },\n rum: {\n service: 'rum',\n version: '2021-06-22',\n path: '/rum',\n host: 'rum.tencentcloudapi.com',\n },\n tke: {\n service: 'tke',\n version: '2018-05-25',\n path: '/tke',\n host: 'tke.tencentcloudapi.com',\n },\n ecdn: {\n service: 'ecdn',\n version: '2019-10-12',\n path: '/ecdn',\n host: 'ecdn.tencentcloudapi.com',\n },\n waf: {\n service: 'waf',\n version: '2018-01-25',\n path: '/waf',\n host: 'waf.tencentcloudapi.com',\n },\n region: {\n service: 'region',\n version: '2022-06-27',\n path: '/region',\n host: 'region.tencentcloudapi.com',\n },\n apm: {\n service: 'apm',\n version: '2021-06-22',\n path: '/apm',\n host: 'apm.tencentcloudapi.com',\n },\n // 不单独定义lb,因为lb同样用的是vpc的配置,同上\n // lb: {\n // service: 'lb',\n // version: '2017-03-12',\n // path: '/lb',\n // host: 'vpc.tencentcloudapi.com'\n // }\n // 负载均衡四层协议 lbPrivate\n // lbPrivate: {\n // service: 'lbPrivate',\n // version: '2018-03-17',\n // path: '/clb',\n // host: 'clb.tencentcloudapi.com',\n // },\n};\n\nconst FINACE_HOST = {\n scf: {\n 'ap-shanghai-fsi': {\n path: '/fsi/scf/shanghai',\n host: 'scf.ap-shanghai-fsi.tencentcloudapi.com',\n },\n 'ap-shenzhen-fsi': {\n path: '/fsi/scf/shenzhen',\n host: 'scf.ap-shenzhen-fsi.tencentcloudapi.com',\n },\n },\n cfs: {\n 'ap-shanghai-fsi': {\n path: '/fsi/cfs/shanghai',\n host: 'cfs.ap-shanghai-fsi.tencentcloudapi.com',\n },\n 'ap-shenzhen-fsi': {\n path: '/fsi/cfs/shenzhen',\n host: 'cfs.ap-shenzhen-fsi.tencentcloudapi.com',\n },\n },\n ckafka: {\n 'ap-shanghai-fsi': {\n path: '/fsi/ckafka/shanghai',\n host: 'ckafka.ap-shanghai-fsi.tencentcloudapi.com',\n },\n 'ap-shenzhen-fsi': {\n path: '/fsi/ckafka/shenzhen',\n host: 'ckafka.ap-shenzhen-fsi.tencentcloudapi.com',\n },\n },\n clb: {\n 'ap-shanghai-fsi': {\n path: '/fsi/clb/shanghai',\n host: 'clb.ap-shanghai-fsi.tencentcloudapi.com',\n },\n 'ap-shenzhen-fsi': {\n path: '/fsi/clb/shenzhen',\n host: 'clb.ap-shenzhen-fsi.tencentcloudapi.com',\n },\n },\n mongodb: {\n 'ap-shanghai-fsi': {\n path: '/fsi/mongodb/shanghai',\n host: 'mongodb.ap-shanghai-fsi.tencentcloudapi.com',\n },\n 'ap-shenzhen-fsi': {\n path: '/fsi/mongodb/shenzhen',\n host: 'mongodb.ap-shenzhen-fsi.tencentcloudapi.com',\n },\n },\n vpc: {\n 'ap-shanghai-fsi': {\n path: '/fsi/vpc/shanghai',\n host: 'vpc.ap-shanghai-fsi.tencentcloudapi.com',\n },\n 'ap-shenzhen-fsi': {\n path: '/fsi/vpc/shenzhen',\n host: 'vpc.ap-shenzhen-fsi.tencentcloudapi.com',\n },\n },\n cvm: {\n 'ap-shanghai-fsi': {\n path: '/fsi/cvm/shanghai',\n host: 'cvm.ap-shanghai-fsi.tencentcloudapi.com',\n },\n 'ap-shenzhen-fsi': {\n path: '/fsi/cvm/shenzhen',\n host: 'cvm.ap-shenzhen-fsi.tencentcloudapi.com',\n },\n },\n cdb: {\n 'ap-shanghai-fsi': {\n path: '/fsi/cdb/shanghai',\n host: 'cdb.ap-shanghai-fsi.tencentcloudapi.com',\n },\n 'ap-shenzhen-fsi': {\n path: '/fsi/cdb/shenzhen',\n host: 'cdb.ap-shenzhen-fsi.tencentcloudapi.com',\n },\n },\n monitor: {\n 'ap-shanghai-fsi': {\n path: '/fsi/monitor/shanghai',\n host: 'monitor.ap-shanghai-fsi.tencentcloudapi.com',\n },\n 'ap-shenzhen-fsi': {\n path: '/fsi/monitor/shenzhen',\n host: 'monitor.ap-shenzhen-fsi.tencentcloudapi.com',\n },\n },\n postgres: {\n 'ap-shanghai-fsi': {\n path: '/fsi/postgres/shanghai',\n host: 'postgres.ap-shanghai-fsi.tencentcloudapi.com',\n },\n 'ap-shenzhen-fsi': {\n path: '/fsi/postgres/shenzhen',\n host: 'postgres.ap-shenzhen-fsi.tencentcloudapi.com',\n },\n },\n emr: {\n 'ap-shanghai-fsi': {\n path: '/fsi/emr/shanghai',\n host: 'emr.ap-shanghai-fsi.tencentcloudapi.com',\n },\n 'ap-shenzhen-fsi': {\n path: '/fsi/emr/shenzhen',\n host: 'emr.ap-shenzhen-fsi.tencentcloudapi.com',\n },\n },\n cmq: {\n 'ap-shanghai-fsi': {\n path: '/fsi/cmq/shanghai',\n host: 'cmq.ap-shanghai-fsi.tencentcloudapi.com',\n },\n 'ap-shenzhen-fsi': {\n path: '/fsi/cmq/shenzhen',\n host: 'cmq.ap-shenzhen-fsi.tencentcloudapi.com',\n },\n },\n cls: {\n 'ap-shanghai-fsi': {\n path: '/fsi/cls/shanghai',\n host: 'cls.ap-shanghai-fsi.tencentcloudapi.com',\n },\n 'ap-shenzhen-fsi': {\n path: '/fsi/cls/shenzhen',\n host: 'cls.ap-shenzhen-fsi.tencentcloudapi.com',\n },\n },\n};\n\n// 获取对应业务的 API 接口信息\nexport function GetServiceAPIInfo(region, service) {\n return { ...(SERVICES_API_INFO[service] || {}), ...getHostAndPath(region, service) };\n}\n\n// get host and path for finance regions\nfunction getHostAndPath(region, service) {\n if (_.indexOf(FINACE_REGIONS, region) === -1) {\n return {};\n }\n return (\n _.find(\n _.find(FINACE_HOST, (__, key) => key === service),\n (__, key) => key === region\n ) || {}\n );\n}\n\n// 变量替换指定实例按照那个字段展示\nexport const VARIABLE_ALIAS = 'instancealias';\n\nexport function GetServiceFromNamespace(namespace) {\n return _.get(\n _.find(SERVICES, (service) => service.namespace === namespace),\n 'service'\n );\n}\n// 处理存量target中保存的qce/cvm\nexport function GetLabelFromNamespace(namespace) {\n return _.get(\n _.find(SERVICES, (service) => service.namespace === namespace || service.label === namespace),\n 'label'\n );\n}\n// parse template variable query params\nexport function ParseMetricQuery(query = '') {\n if (!query) {\n return {};\n }\n const result = {};\n const queries = _.split(query, '&');\n _.forEach(queries, (item) => {\n const str = _.split(item, '=');\n if (_.trim(_.get(str, '0', ''))) {\n let val = _.trim(_.get(str, '1', ''));\n try {\n val = JSON.parse(val);\n } catch (e) {\n // console.log({ val });\n }\n result[_.toLower(_.trim(_.get(str, '0', '')))] = val;\n }\n });\n return result;\n}\n\n// parse template variable regex params\nexport function ParseMetricRegex(regex = '') {\n if (!regex) {\n return [];\n }\n regex = regex.replace(/:/g, ':');\n regex = regex.replace(/,/g, ',');\n const regexParams = ParseMetricQuery(regex);\n const result: any[] = [];\n _.forEach(regexParams, (value, key) => {\n if (key === 'tag:tag-key') {\n const valuesArr = _.split(value, ',');\n _.forEach(valuesArr, (item) => {\n const temp = _.split(item, ':');\n if (temp.length === 2) {\n result.push({ Name: `tag:${temp[0]}`, Values: temp.slice(1) });\n }\n });\n } else {\n result.push({ Name: key, Values: _.split(value, ',') });\n }\n });\n return result;\n}\n\n// get the actual value of template variable\nfunction parseVariableFormat(varname: string) {\n varname = String(varname || '');\n // $varname\n let varFlag = false;\n const regResult1 = varname.match(/^\\${?(\\w+)}?/);\n if (regResult1) {\n varFlag = true;\n varname = `\\$\\{${regResult1[1]}\\:json\\}`;\n }\n // [[varname]]\n const regResult2 = varname.match(/^\\[\\[(\\w+)(\\:\\w+)?\\]\\]/);\n if (regResult2) {\n varFlag = true;\n varname = `\\$\\{${regResult2[1]}\\:json\\}`;\n }\n return { varname, varFlag };\n}\n\nexport function ReplaceVariable(templateSrv, scopedVars, field, multiple = false) {\n const { varname, varFlag } = parseVariableFormat(field);\n let replaceVar = templateSrv.replace(varname, scopedVars);\n if (varFlag) {\n try {\n replaceVar = JSON.parse(replaceVar);\n } catch (error) {}\n }\n if (!multiple && _.isArray(replaceVar)) {\n replaceVar = _.get(replaceVar, '0', '');\n }\n return replaceVar;\n}\n\n// get dimensions for instance query param\nexport function GetDimensions(obj) {\n if (_.isEmpty(obj)) {\n return [];\n }\n const dimensions: any[] = [];\n _.forEach(obj, (item) => {\n if (item.Value !== null && item.Value !== undefined && item.Value !== '') {\n dimensions.push({ Name: item.Name, Value: typeof item.Value === 'string' ? item.Value : `${item.Value}` });\n }\n });\n return dimensions;\n}\n\n// parse query data result for panel\nexport function ParseQueryResult(response, instances: any[] = [], timeshift = 0) {\n const instanceList = _.cloneDeep(instances);\n\n const dataPoints = _.get(response, 'DataPoints', []);\n return _.map(dataPoints, (dataPoint) => {\n let instanceAliasValue = _.get(dataPoint, 'Dimensions[0].Value');\n for (let i = 0; i < instanceList.length; i++) {\n if (isInstanceMatch(instanceList[i], _.get(dataPoint, 'Dimensions', []))) {\n instanceAliasValue = instanceList[i]._InstanceAliasValue;\n instanceList.splice(i, 1);\n break;\n }\n }\n return {\n target: `${response.MetricName} - ${instanceAliasValue}`,\n datapoints: parseDataPoint(dataPoint, timeshift),\n };\n });\n}\n\n// parse tencent cloud monitor response data to grafana panel data\nfunction parseDataPoint(dataPoint, timeshift = 0) {\n const timestamps = _.get(dataPoint, 'Timestamps', []);\n const values = _.get(dataPoint, 'Values', []);\n const result = timestamps.map((timestamp, index) => {\n return [values[index], timestamp * 1000 + timeshift];\n });\n\n return result;\n}\n\n// check whether instance is match or not\nfunction isInstanceMatch(instance, dimensions) {\n let match = true;\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < dimensions.length; i++) {\n if (_.get(instance, dimensions[i].Name, '').toString() !== dimensions[i].Value.toString()) {\n match = false;\n break;\n }\n }\n return match;\n}\n\n/**\n * 检查某个变量是否模板变量,即是否匹配 ${varnam} 或 [[varname]]\n *\n * @param field 变量字段名\n */\nexport function isVariable(value) {\n if (value && (value.match(/^\\${?(\\w+)}?/) || value.match(/^\\[\\[(\\w+)(\\:\\w+)?\\]\\]/))) {\n return true;\n }\n return false;\n}\n\n/**\n * 腾讯云 API 3.0 接口协议\n * @param options 接口请求对象 { url: string, data?: object }\n * @param service 产品名字 'cvm'\n * @param signObj 接口请求相关信息 { region?: string, action: string }\n * @param secretId\n * @param secretKey\n */\nexport async function GetRequestParams(options, service, signObj: any = {}, secretId, datasourceId, backendSrv) {\n const signParams = {\n secretId,\n payload: options.data || '',\n ...signObj,\n ...(_.pick(GetServiceAPIInfo(signObj.region || '', service), ['service', 'host', 'version']) || {}),\n backendSrv,\n datasourceId,\n region: 'ap-guangzhou',\n };\n const sign = new Sign(signParams);\n const { intranet, ...headerSigned } = await sign.getHeader();\n // 传入x-tc-language实现国际化\n // zh-CN en-US ko-KR ja-JP\n options.headers = Object.assign(options.headers || {}, { ...headerSigned }, { 'x-tc-language': getLanguage() });\n options.method = 'POST';\n if (intranet) {\n options.url += '-internal';\n }\n return options;\n}\n\n/**\n * 腾讯云 API 2.0 接口协议\n * @param options 接口请求对象 { url: string, data?: object }\n * @param service 产品名字 'cvm'\n * @param signObj 接口请求相关信息 { region?: string, action: string }\n * @param secretId\n * @param secretKey\n */\nexport async function GetRequestParamsV2(\n options: any = {},\n service,\n signObj: any = {},\n secretId,\n datasourceId,\n backendSrv\n) {\n const data = options.data || {};\n const signParams = {\n secretId,\n data,\n ...signObj,\n ...(_.pick(GetServiceAPIInfo(signObj.region || '', service), ['host', 'version']) || {}),\n backendSrv,\n datasourceId,\n };\n options.method = 'POST';\n const sign = new SignV2(signParams);\n options.headers = Object.assign(options.headers || {}, { 'Content-Type': 'application/x-www-form-urlencoded' });\n const { queryString, path, host, intranet } = await sign.generateQueryString();\n options.data = qs.stringify({\n ...options.data,\n ...queryString,\n ...(host && { host: host }),\n });\n if (intranet) {\n // TODO: qcloud.com intranet host\n console.log('got intranet for sign v2');\n }\n options.url += path;\n return options;\n}\n\nexport function SliceLength(total = 0, len = 1) {\n const result: any[] = [];\n const num = Math.ceil(total / len);\n for (let i = 1; i < num; i++) {\n result.push({ Offset: len * i });\n }\n return result;\n}\n\nexport const FilterKeys = ['Namespace', 'Offset', 'Limit', 'SearchKey', 'Description', 'OrderBy', 'Order'];\n\nexport function parseDataFromBackendPlugin(res) {\n const { data } = toDataQueryResponse(res);\n return {\n authorization: _.get(data, '[0].meta.custom', ''),\n };\n}\n\n/** 当前环境是否为非生产环境 */\nexport const IS_DEVELOPMENT_ENVIRONMENT = !(process.env.NODE_ENV === 'production');\n\n/**\n * @link https://github.com/grafana/grafana/blob/3c6e0e8ef85048af952367751e478c08342e17b4/packages/grafana-data/src/types/app.ts#L12\n */\nexport enum CoreApp {\n CloudAlerting = 'cloud-alerting',\n UnifiedAlerting = 'unified-alerting',\n Dashboard = 'dashboard',\n Explore = 'explore',\n Unknown = 'unknown',\n PanelEditor = 'panel-editor',\n PanelViewer = 'panel-viewer',\n}\n","import _ from 'lodash';\nimport moment from 'moment';\nimport DatasourceInterface from '../MonitorDatasource';\nimport {\n GetRequestParams,\n GetServiceAPIInfo,\n ReplaceVariable,\n GetDimensions,\n ParseQueryResult,\n SliceLength,\n} from '../../common/constants';\nimport instanceStorage from '../../common/datasourceStorage';\nimport { MetricQuery } from './types';\nimport { getNamesapceFromService, getTimeShiftInMs } from '../../common/utils';\nimport { Language, setLanguage } from '../../../locale';\n\nexport interface TemplateQueryIdType {\n instance: string;\n listener?: string;\n}\n\ninterface queryConfigType {\n dim_KeyInStorage: string;\n dim_KeyInTarget?: string;\n dim_KeyInIns?: string;\n dim_KeyInMap: string;\n}\n\nexport abstract class BaseDatasource implements DatasourceInterface {\n Namespace?: string;\n service: string;\n instanceListCache: any[] = [];\n extraMetricDims: string[] = [];\n url: string;\n instanceSettings: any;\n backendSrv: any;\n templateSrv: any;\n secretId: string;\n checkKeys: string[] = [];\n MetricReqConfig: {\n resultFilter?: Function;\n } = {};\n extrasAlias?: string[] = [];\n /*\n 一个配置:(用于处理除了InstanceId之外的)(Record中的key是指标修正之后的维度,即通过InvalidDemsion处理后)\n 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、\n 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。为空则取即通过InvalidDemsion处理后的key\n 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。即:templateQueryIdMap中内容。联合上面2的内容筛选出原始sourceMap\n 4 通过这个dim和sourceMap获取维度值。即sourceMap[dim]\n */\n queryMonitorExtraConfg: Record = {};\n CandiateDimensions?: Record = {};\n\n InstanceReqConfig?: {\n service?: string;\n action: string;\n responseField: string;\n interceptor?: {\n request?: (params: unknown) => unknown;\n response?: (data: unknown) => unknown;\n };\n };\n InvalidDimensions?: Record;\n\n abstract InstanceAliasList: string[];\n abstract templateQueryIdMap: TemplateQueryIdType; // 必须为标识\n\n /** @ngInject */\n constructor(instanceSettings, backendSrv, templateSrv) {\n this.instanceSettings = instanceSettings;\n this.backendSrv = backendSrv;\n this.templateSrv = templateSrv;\n this.url = instanceSettings.url;\n this.secretId = (instanceSettings.jsonData || {}).secretId || '';\n setLanguage(instanceSettings.jsonData.language || Language.Chinese);\n }\n\n get namespace() {\n // 需要注意的是this.service来自于原型上,在实例中导入时注入\n return this.Namespace || getNamesapceFromService(this.service);\n }\n\n // 获取额外要显示到图例里的内容\n getOtherAlias(instance: any, target: any): string {\n let result = '';\n const alias = instance._InstanceAliasValue;\n this.extrasAlias?.forEach((extra) => {\n const extraAlia = this.getVariable(target[extra]);\n if (extraAlia && alias.indexOf(extraAlia) === -1) {\n result += ` - ${extraAlia}`;\n }\n });\n return result;\n }\n\n /* 格式化模板变量上的显示 */\n getAliasValue(instance: Record, alias: string) {\n const result = instance[alias];\n return Array.isArray(result) ? result.join() : result;\n }\n\n formatVarDisplay(instance: Record, displayTpl: string | undefined, instanceAlias: string) {\n // 获取display=aaa${InstanceName}bbb${InstanceId}ccc\n if (displayTpl) {\n return displayTpl.replace(/\\$\\{(\\w+)\\}/g, (a, b) => {\n if (!b || !this.InstanceAliasList.includes(b)) {\n return '';\n }\n return this.getAliasValue(instance, b);\n });\n }\n return this.getAliasValue(instance, instanceAlias);\n }\n /**\n * @param query 模板变量配置填写的 Query 参数对象,由顶层将字符串转换为了对象\n */\n async metricFindQuery(query: MetricQuery, regex?: string) {\n const { action, namespace, display, payload = {} } = query;\n let { region, instancealias = this.templateQueryIdMap.instance } = query;\n if (!action || !namespace) {\n return [];\n }\n // 支持payload里传入模板变量\n if (_.isObject(payload)) {\n _.forEach(payload, (value, key) => {\n payload[key] = _.isString(value) ? this.getVariable(value) : value;\n });\n }\n\n // 查询地域列表\n const regionQuery = action.match(/^DescribeRegions$/i);\n if (regionQuery) {\n return this.getRegions();\n }\n\n region = this.getVariable(region); // 将模板region转换为真实值\n\n // 查询实例列表\n if (region && action.match(/^DescribeInstances/i)) {\n const result = await this.getVariableInstances(region, payload);\n instancealias = this.InstanceAliasList.includes(instancealias) ? instancealias : this.templateQueryIdMap.instance;\n\n const res = result.flatMap((item) => {\n const insAlias = this.formatVarDisplay(item, display, instancealias);\n\n item._InstanceAliasValue = insAlias; // FIXME:\n\n if (!item[instancealias]) return [];\n return [\n {\n text: insAlias,\n value: item[this.templateQueryIdMap.instance],\n },\n ];\n });\n\n // 缓存全量实例列表\n await instanceStorage.setInstance(this.service, result);\n return res;\n }\n\n // 在instance实例的基础上查询其他数据\n let instance = this.getVariable(query['instance']);\n if (_.isArray(instance)) instance = instance[0]; // 有额外维度,仅支持实例单选情况\n if (region && action && instance) {\n try {\n // instance = JSON.parse(instance);\n const instanceCache = await instanceStorage.getInstance(this.service);\n\n instance = _.cloneDeep(instanceCache.find((item) => item[this.templateQueryIdMap.instance] === instance)) ?? {};\n // eslint-disable-next-line no-empty\n } catch (error) {}\n return this.fetchMetricData(action, region, instance, query);\n }\n\n return Promise.resolve([]);\n }\n // 获取指标数据\n async fetchMetricData(action: string, region: string, instance: any, query?: any) {\n return [];\n }\n\n /**\n * 根据 Panel 的配置项,获取相应的监控数据\n *\n * @param options Panel 的配置参数\n * @return 返回数据数组,示例如下\n * [\n * {\n * \"target\": \"AccOuttraffic - ins-123\",\n * \"datapoints\": [\n * [861, 1450754160000],\n * [767, 1450754220000]\n * ]\n * }\n * ]\n */\n async dimensionsFormat(dimKeys, ins, dimensionObject, target, service, options) {\n for (let key of dimKeys) {\n let keyTmp = key;\n const invalidDim = this.InvalidDimensions || this.getInvalidDimensions(this, target[service]);\n if (invalidDim[key]) {\n // 从【维度中】的字段到【实例中】字段的映射。 { functionName: FunctionName }\n keyTmp = invalidDim[key];\n ins[key] = ins[keyTmp];\n }\n\n let extraDimValue = this.getVariable(target[service][keyTmp]);\n if (this.queryMonitorExtraConfg[keyTmp]) {\n const {\n dim_KeyInStorage,\n dim_KeyInTarget = keyTmp,\n dim_KeyInMap,\n dim_KeyInIns,\n } = this.queryMonitorExtraConfg[keyTmp];\n let extraIns = ReplaceVariable(this.templateSrv, options.scopedVars, target[service][dim_KeyInTarget], true);\n let extraSourceMap: any = {};\n try {\n extraSourceMap = JSON.parse(extraIns); // 兼容json字符串的 形式\n } catch (error) {\n if (_.isArray(extraIns)) extraIns = extraIns[0]; // 如果多个,取第一个。除了实例ID 暂不支持其他纬度多选\n const extraStorage = await instanceStorage.getExtraStorage(this.service, dim_KeyInStorage);\n\n extraSourceMap =\n extraStorage?.find((item) => {\n if (_.isArray(item[dim_KeyInMap])) {\n return item[dim_KeyInMap][0] === extraIns;\n }\n return item[dim_KeyInMap] === extraIns;\n }) ?? {};\n }\n const isStringOrNumber = _.isString(extraSourceMap) || _.isNumber(extraSourceMap);\n // 增加ins实例之外的alias,填入到ins._InstanceAliasValue\n const insAlias = ins._InstanceAliasValue;\n const otherAlias = isStringOrNumber ? extraSourceMap : extraSourceMap._InstanceAliasValue;\n if (otherAlias && insAlias.indexOf(otherAlias) === -1) {\n ins._InstanceAliasValue += ` - ${otherAlias}`;\n }\n\n extraDimValue = isStringOrNumber ? extraSourceMap : extraSourceMap?.[dim_KeyInIns || keyTmp];\n } else {\n ins._InstanceAliasValue += this.getOtherAlias(ins, target[service]);\n }\n\n if (\n getTimeShiftInMs(target[service].timeshift) > 0 &&\n ins._InstanceAliasValue.indexOf(target[service].timeshift) === -1\n ) {\n ins._InstanceAliasValue += `_${target[service].timeshift}`;\n }\n // 设置instance,针对额外的维度,需要注意模板变量的值\n // ins[key] = ins[keyTmp] ?? extraDimValue;\n ins[key] = this.getDimensionsVal(ins, keyTmp, extraDimValue);\n // cynosdb产品接口返回维度和入参不一致\n if (this.checkKeys.length > 0) {\n this.checkKeys.forEach((Ekey) => {\n ins[Ekey] = ins[key];\n });\n }\n dimensionObject[key] = { Name: key, Value: ins[key] };\n }\n // 处理waf逻辑\n const tt = this.getOwnDimension(dimensionObject, ins);\n if (tt) {\n return tt;\n }\n return dimensionObject;\n }\n getOwnDimension(dimensionObject: any, ins: any) {\n return null;\n }\n getDimensionsVal(ins: Record, key: string, extraDimValue: string) {\n let dimVal = ins[key];\n if (_.isEmpty(dimVal) && this.CandiateDimensions[key]) {\n dimVal = ins[this.CandiateDimensions[key]];\n }\n return dimVal ?? extraDimValue;\n }\n query(options: any) {\n const service = this.service!; // 强制声明非空\n\n const queries = _.filter(options.targets, (item) => {\n // 过滤无效的查询 target\n return (\n item.hide !== true &&\n !!item.namespace &&\n !!item[service].metricName &&\n !_.isEmpty(ReplaceVariable(this.templateSrv, options.scopedVars, item[service].region, false)) &&\n !_.isEmpty(ReplaceVariable(this.templateSrv, options.scopedVars, item[service].instance, true))\n );\n })\n .reduce((prev, target) => {\n if (getTimeShiftInMs(target[service].timeshift) > 0) {\n const cloneTarget = _.cloneDeep(target);\n cloneTarget[service].timeshift = '';\n return [...prev, cloneTarget, target];\n }\n return [...prev, target];\n }, [])\n .map(async (target) => {\n // 实例 instances 可能为模板变量,需先获取实际值\n // 针对JSON字符串和id的形式,分开做处理\n let instances = ReplaceVariable(this.templateSrv, options.scopedVars, target[service].instance, true);\n const instanceCache = await instanceStorage.getInstance(this.service);\n const timeshift = getTimeShiftInMs(target[service].timeshift);\n\n instances = [].concat(instances).map((inst) => {\n try {\n return JSON.parse(inst); // 兼容json字符串的 形式\n } catch (error) {\n // 如果没拿到缓存,取默认实例组\n if (!instanceCache) return this.getDefaultInsObj?.(inst);\n return _.cloneDeep(instanceCache.find((item) => item[this.templateQueryIdMap.instance] === inst)) ?? {};\n }\n });\n const region = ReplaceVariable(this.templateSrv, options.scopedVars, target[service].region, false);\n const insInReq: any = [];\n for (let ins of instances) {\n const dimensionObject = target[service].dimensionObject;\n // 处理dimensions的值\n const dimKeys = Object.keys(dimensionObject);\n const dimResult = await this.dimensionsFormat(dimKeys, ins, dimensionObject, target, service, options);\n\n insInReq.push([{ Dimensions: GetDimensions(dimResult) }]);\n }\n const data = {\n StartTime: moment(options.range.from).subtract(timeshift).format(),\n EndTime: moment(options.range.to).subtract(timeshift).format(),\n Period: target[service].period || 300,\n Instances: _.flatMap(insInReq),\n Namespace: target.namespace,\n MetricName: target[service].metricName,\n };\n return this.getMonitorData(data, region, instances, target[service], options);\n });\n\n if (queries.length === 0) {\n return [];\n }\n\n return Promise.all(queries)\n .then((responses) => {\n return _.flatten(responses);\n })\n .catch((error) => {\n return [];\n });\n }\n getDefaultInsObj(ins: string) {\n return {} as any;\n }\n getInstanceReqConfig(selfIns: any) {\n return {} as any;\n }\n getInvalidDimensions(selfIns: any, target?: any) {\n return {} as any;\n }\n // 获取某个变量的实际值,this.templateSrv.replace() 函数返回实际值的字符串\n getVariable(metric?: string) {\n const rs = this.templateSrv.replace((metric || '').trim());\n const valStr = rs.match(/\\{([\\w-,]+)\\}/);\n // 判断是否为多选\n if (valStr) {\n return valStr[1].split(',');\n }\n return rs;\n }\n\n /**\n * 获取 监控数据\n * @param params 获取监控数据的请求参数\n * @param region 地域信息\n * @param instances 实例列表,用于对返回结果的匹配解析\n */\n getMonitorData(params, region, instances, target, options) {\n const serviceInfo = GetServiceAPIInfo(region, 'monitor');\n const timeshift = getTimeShiftInMs(target.timeshift);\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data: params,\n },\n serviceInfo.service,\n { action: 'GetMonitorData', region }\n ).then((response) => {\n return ParseQueryResult(response, instances, timeshift);\n });\n }\n\n getRegions(): any {\n return this.doRequest(\n {\n url: this.url + '/cvm',\n },\n 'cvm',\n { action: 'DescribeRegions' }\n ).then((response) => {\n return _.filter(\n _.map(response.RegionSet || [], (item) => {\n return {\n text: item.RegionName,\n value: item.Region,\n RegionState: item.RegionState,\n };\n }),\n (item) => item.RegionState === 'AVAILABLE'\n );\n });\n }\n\n getMetrics(region = 'ap-guangzhou'): Promise {\n const serviceInfo = GetServiceAPIInfo(region, 'monitor');\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data: {\n Namespace: this.namespace,\n },\n },\n serviceInfo.service,\n { region, action: 'DescribeBaseMetrics' }\n ).then((response) => {\n const res = _.filter(\n _.filter(response.MetricSet || [], (item) => !(item.Namespace !== this.namespace || !item.MetricName))\n );\n const resFilterFn = this.MetricReqConfig.resultFilter;\n if (resFilterFn) {\n return res.map((item) => resFilterFn(item));\n }\n return res;\n });\n }\n\n getInstances(region, params = {}) {\n const {\n service = this.service,\n action,\n responseField: field,\n interceptor,\n } = this.InstanceReqConfig || this.getInstanceReqConfig(this);\n params =\n service === 'waf'\n ? { Offset: 0, Limit: 100, Edition: 'sparta-waf', ...params }\n : { Offset: 0, Limit: 100, ...params };\n const serviceInfo = GetServiceAPIInfo(region, service);\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data: interceptor?.request ? interceptor.request(params) : params,\n },\n serviceInfo.service,\n { region, action }\n ).then((response) => {\n // 处理异常,则不按正常的情况处理,直接抛出错误\n if (response?.Error) {\n console.error(response.Error);\n return response;\n }\n\n let result;\n // 先,field处理\n if (field) {\n result = _.get(response, field) ?? _.get(response, `Result.${field}`) ?? [];\n }\n\n // 后,拦截器处理\n if (interceptor?.response) {\n result = interceptor.response(result);\n }\n return result;\n });\n }\n\n getVariableInstances(region, query = {}): Promise {\n let result: any[] = [];\n const params = { ...{ Offset: 0, Limit: 100 }, ...query };\n\n const {\n service = this.service,\n action,\n responseField: field,\n interceptor,\n } = this.InstanceReqConfig || this.getInstanceReqConfig(this);\n\n const serviceInfo = GetServiceAPIInfo(region, service);\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data: interceptor?.request ? interceptor.request(params) : params,\n },\n serviceInfo.service,\n { region, action }\n ).then((response) => {\n result = _.get(response, field) ?? _.get(response, `Result.${field}`) ?? [];\n const total =\n response.TotalCount ?? response.TotalCnt ?? response.TotalNumber ?? _.get(response, `Result.TotalCount`) ?? 0;\n if (result.length >= total) {\n return interceptor?.response ? interceptor.response(result) : result;\n } else {\n const param = SliceLength(total, params?.Limit || 100);\n const promises: any[] = [];\n _.forEach(param, (item) => {\n promises.push(this.getInstances(region, { ...item, ...query }));\n });\n return Promise.all(promises)\n .then((responses) => {\n _.forEach(responses, (item) => {\n result = _.concat(result, item);\n });\n return interceptor?.response ? interceptor.response(result) : result;\n })\n .catch((error) => {\n return interceptor?.response ? interceptor.response(result) : result;\n });\n }\n });\n }\n\n // 检查某变量字段是否有值\n isValidConfigField(field: string) {\n return field && field.length > 0;\n }\n\n testDatasource() {\n // const { service = this.service, action } = this.InstanceReqConfig;\n // const serviceInfo = GetServiceAPIInfo('ap-guangzhou', service);\n\n if (!this.isValidConfigField(this.secretId)) {\n return {\n service: this.service,\n status: 'error',\n message: 'The SecretId/SecretKey field is required.',\n };\n }\n\n return Promise.all([\n this.getRegions(),\n this.getMetrics(),\n // this.doRequest(\n // {\n // url: this.url + serviceInfo.path,\n // data: {\n // Offset: 0,\n // Limit: 1,\n // },\n // },\n // service,\n // { region: 'ap-guangzhou', action },\n // ),\n this.getInstances('ap-guangzhou', {\n Offset: 0,\n Limit: 1,\n }),\n ])\n .then((responses) => {\n const cvmErr = _.get(responses, '[0].Error', {});\n const monitorErr = _.get(responses, '[1].Error', {});\n const serviceErr = _.get(responses, '[2].Error', {});\n // const cvmAuthFail = _.get(cvmErr, 'Code', '').indexOf('AuthFailure') !== -1;\n // const monitorAuthFail = _.get(monitorErr, 'Code', '').indexOf('AuthFailure') !== -1;\n // const serviceAuthFail = _.get(serviceErr, 'Code', '').indexOf('AuthFailure') !== -1;\n const cvmAuthFail = _.get(cvmErr, 'Code', '');\n const monitorAuthFail = _.get(monitorErr, 'Code', '');\n const serviceAuthFail = _.get(serviceErr, 'Code', '');\n if (cvmAuthFail || monitorAuthFail || serviceAuthFail) {\n const messages: any[] = [];\n if (cvmAuthFail) {\n messages.push(_.get(cvmErr, 'Code'));\n }\n if (monitorAuthFail) {\n messages.push(_.get(monitorErr, 'Code'));\n }\n if (serviceAuthFail) {\n messages.push(_.get(serviceErr, 'Code'));\n }\n const message = _.join(_.compact(_.uniq(messages)), '; ');\n return {\n service: this.service,\n status: 'error',\n message,\n };\n } else {\n return {\n namespace: this.namespace,\n service: this.service,\n status: 'success',\n message: `Successfully queried the ${this.service} service.`,\n title: 'Success',\n };\n }\n })\n .catch((error) => {\n let message = `${this.service} service:`;\n message += error.statusText ? error.statusText + '; ' : '';\n if (_.get(error, 'data.error.code', '')) {\n message += error.data.error.code + '. ' + error.data.error.message;\n } else if (_.get(error, 'data.error', '')) {\n message += error.data.error;\n } else if (_.get(error, 'data', '')) {\n message += error.data;\n } else {\n message += `Cannot connect to ${this.service} service.`;\n }\n return {\n service: this.service,\n status: 'error',\n message: message,\n };\n });\n }\n\n async doRequest(options, service, signObj: any = {}) {\n options = await GetRequestParams(\n options,\n service,\n signObj,\n this.secretId,\n this.instanceSettings.id,\n this.backendSrv\n );\n return this.backendSrv\n .datasourceRequest(options)\n .then((response) => {\n return _.get(response, 'data.Response', {});\n })\n .catch((error) => {\n throw error;\n });\n }\n}\n","import _ from 'lodash';\nimport { SERVICES } from '../tc_monitor';\n\n/* 从分页数据获取全量数据 */\nconst PageSize = 50;\nfunction getFieldsValue(value, fields) {\n return fields.map((item) => _.get(value, item, _.get(value, `Result.${item}`, [])));\n}\n\nexport async function fetchAllFactory(fetcher: (args: any) => Promise, _params: any, field: string | string[]) {\n const params = { ..._.omit(_params, ['isOffsetPage']) };\n params.Limit = params.Limit || PageSize; // 默认给个Limit大小为50\n params.Offset = params.Offset ?? 0; // 默认给个Offset为0\n\n // 第一次请求,获取总数\n const rs = (await fetcher(params)) ?? {};\n const fields = Array.isArray(field) ? field : [field];\n\n // rs.TotalCount = rs.TotalCount ?? rs.Result.TotalCount ?? [];\n // const { TotalCount } = rs;\n const TotalCount = rs.TotalCount ?? rs.Result?.TotalCount ?? rs.TotalCnt ?? rs.Result?.TotalCnt ?? 0;\n const firstLists = getFieldsValue(rs, fields);\n\n if (TotalCount === 0 || firstLists[0].length === TotalCount) {\n // 只有一页,结束\n return firstLists;\n }\n\n // 批量请求\n const delta = TotalCount - firstLists[0].length;\n const batchCount = Math.ceil(delta / PageSize);\n const pmList = new Array(batchCount).fill(0).map((_, index) => {\n params.Offset = _params.isOffsetPage ? 1 + index : (1 + index) * params.Limit;\n return fetcher(params);\n });\n\n // 合并\n const resultList = await Promise.all(pmList); // [ {a: [], b[] }, { a: [], b:[] }]\n\n return resultList.reduce((acc, cur) => {\n const lists = getFieldsValue(cur, fields);\n // [[], [], []] + [[], [], []]\n acc.forEach((list, index) => list.push(...lists[index]));\n return acc;\n }, firstLists);\n}\n\n/**\n * 实例列表接口入参处理\n *\n * @param queries 表单键入内容\n * @param isFilter 是否需要设置为Filters格式\n */\nexport function instanceQueryParamsBaseParse(queries: any, isFilter: boolean) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n queries = _.omit(queries, ['Offset', 'Limit']);\n const Filters: any[] = [];\n _.forEach(queries, (item: any, key) => {\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n if (isFilter) {\n Filters.push({ Name: key, Values: _.uniq(item).slice(0, 5) });\n } else {\n params[key] = _.uniq(item);\n }\n }\n } else if (_.isObject(item)) {\n if (_.isNumber(_.get(item, 'value', undefined)) || !_.isEmpty(_.get(item, 'value', undefined))) {\n if (isFilter) {\n Filters.push({ Name: key, Values: _.get(item, 'value', []).slice(0, 5) });\n } else {\n params[key] = _.get(item, 'value');\n }\n }\n } else if (item !== null && item !== undefined && item !== '') {\n if (isFilter) {\n Filters.push({ Name: key, Values: item });\n } else {\n params[key] = item;\n }\n }\n });\n if (isFilter && Filters.length > 0) {\n params.Filters = Filters;\n return params;\n }\n }\n return params;\n}\n\nexport function getNamesapceFromService(serviceName: string) {\n return _.get(\n _.find(SERVICES, (service) => service.service === serviceName),\n 'namespace'\n );\n}\n\nexport function serviceGroupBy(\n services: { service: string; label: string; namespace: string; href: string; groupName?: string }[]\n) {\n const result = services.reduce((acc, cur) => {\n const { namespace, label, groupName = label } = cur;\n\n const existedGroup = acc.find((item) => item.label === groupName);\n if (!existedGroup) {\n acc.push({ label: groupName, value: groupName, items: [{ label, value: namespace }] });\n return acc;\n }\n\n existedGroup.items.push({ label, value: namespace });\n return acc;\n }, [] as any[]);\n\n // 将只有一个子元素的项目进行特殊处理\n const rs = result.map((item) =>\n item.items.length === 1 ? { label: item.items[0].label, value: item.items[0].value } : item\n );\n return rs;\n}\n\nexport const isTargetEqual = (newTargetString: string, oldTargetString: string, key: string) => {\n try {\n const newTarget = JSON.parse(newTargetString);\n const oldTarget = JSON.parse(oldTargetString);\n return newTarget[key] === oldTarget[key];\n } catch (e) {\n return newTargetString === oldTargetString;\n }\n};\n\nexport const getTimeShiftInMs = (timeShift: any) => {\n const parts = /^(\\d+)([d|h|m|s])$/.exec(timeShift);\n if (!parts) {\n return 0;\n }\n const amount = parseInt(parts[1], 10);\n const unit = parts[2];\n switch (unit) {\n case 'd':\n return amount * 86400 * 1000;\n case 'h':\n return amount * 3600 * 1000;\n case 'm':\n return amount * 60 * 1000;\n case 's':\n return amount * 1000;\n }\n return 0;\n};\n","module.exports = __WEBPACK_EXTERNAL_MODULE__6__;","import coreModule from 'grafana/app/core/core_module';\nimport { DetailQueryConfig } from './types';\nimport { GetServiceFromNamespace } from '../../common/constants';\n\nfunction classFactory(detailConfig) {\n return class QueryCtrl {\n static _config: DetailQueryConfig;\n\n /** @ngInject */\n constructor($scope, $rootScope) {\n Object.assign($scope, detailConfig);\n\n $scope.getDropdown = (field) => {\n const service = GetServiceFromNamespace($scope.namespace);\n return $scope.datasource.getFilterDropdown(service, { field, region: $scope.region });\n };\n }\n };\n}\n\nconst template = `\n
\n
\n \n
\n
\n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n
\n`;\nfunction queryDDOFactory(QueryCtrl) {\n return function queryDDO() {\n return {\n template: template,\n controller: QueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n },\n };\n };\n}\n\nexport default (name: string, config: DetailQueryConfig) => {\n // QueryCtrl._config = config;\n const newQueryIns = classFactory(config);\n coreModule.directive(name, queryDDOFactory(newQueryIns));\n};\n","module.exports = __WEBPACK_EXTERNAL_MODULE__8__;","interface DBEvent {\n target: { result: any; error: any };\n}\n// 数据库结构\ninterface DBTypes {\n store: StoreType;\n name?: string;\n version?: number;\n}\n// store表结构\ninterface StoreType {\n name: string; // 表名\n key: string; // 主键名\n cursorIndex?: { name: string; unique: boolean }[]; // 索引列表\n}\n\n// 数据结构\n// {service: 'cvm', instance: [{ins: 23}]}\ninterface DataType {\n service: string;\n [x: string]: any; // 有产品需缓存其他列表\n}\n\n// interface UpdateProps {\n// storeName: string;\n// cursorKey: string;\n// cursorValue?: any;\n// data: any;\n// }\n\nconst store: StoreType = {\n name: 'grafanaInstanceList',\n key: 'service',\n};\nconst promisify = (request: any, type?: string) => {\n return new Promise((resolve, reject) => {\n request.onsuccess = (event: DBEvent) => {\n const returnMap: any = {\n event: event.target.result,\n request: request.result,\n msg: '操作成功',\n };\n resolve(returnMap[type || 'msg']);\n };\n request.onerror = (event: DBEvent) => reject(event.target.error || '操作失败');\n });\n};\n// 固定表名和数据库名\nclass IndexedDB {\n name = 'grafanaDatabase';\n version = 1;\n\n constructor(props: DBTypes) {\n const { name = 'database', version = 1, store } = props;\n this.name = name;\n this.version = version;\n\n this.initDB(store);\n }\n\n /**\n * 初始化数据库\n * @param store 库表的结构\n */\n initDB(store: StoreType) {\n const indexeddb = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB || window.msIndexedDB;\n const request = indexeddb.open(this.name, this.version);\n\n request.onupgradeneeded = (event: IDBVersionChangeEvent) => {\n const db = (event.target as IDBOpenDBRequest).result;\n if (db.objectStoreNames.contains(store.name)) {\n // 存在表store\n }\n\n // 遍历store,设置数据表结构\n db.createObjectStore(store.name, {\n keyPath: store.key,\n });\n };\n request.onerror = () => Promise.reject(new Error('初始化数据库失败'));\n request.onsuccess = () => Promise.resolve('初始化数据库成功');\n }\n\n openDB() {\n const indexeddb = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB || window.msIndexedDB;\n const request = indexeddb.open(this.name, this.version);\n\n return promisify(request, 'event');\n }\n\n /**\n * 新增数据\n * @param storeName 表名\n * @param data 添加的数据\n */\n async insertData(storeName: string, data: any) {\n try {\n // console.time('insertData');\n const db = await this.openDB();\n const transaction = db.transaction(storeName, 'readwrite');\n const objectStore = transaction.objectStore(storeName);\n\n objectStore.add(data);\n // console.timeEnd('insertData');\n\n return new Promise((resolve, reject) => {\n transaction.oncomplete = function () {\n // console.timeEnd('insertData');\n resolve('所有数据插入成功');\n };\n\n transaction.onerror = function (event) {\n reject(event);\n };\n });\n } catch (error) {\n return Promise.reject(error);\n }\n }\n\n /**\n * 更新数据\n * @param props 查询数据的参数以及要修改的值的参数\n */\n async addData(data: DataType, isCover?: boolean) {\n try {\n // console.log('addData');\n const storeName = store.name; // 表名\n const oldData = await this.getData(data.service);\n const objectStore = await this.getObjectStore(storeName, 'readwrite');\n\n if (!oldData) {\n // 不存在则新建\n this.insertData(storeName, data);\n }\n // 存在则更新\n let newData: any = { ...oldData, ...data };\n if (isCover) newData = data; // 需要覆盖之前内容\n // 把更新过的对象放回数据库\n const requestUpdate = objectStore.put(newData);\n // console.timeEnd('updateData');\n return promisify(requestUpdate);\n } catch (error) {\n return Promise.reject(error);\n }\n }\n\n /**\n * 获取数据库的值,返回查询到的第一项\n * @param storeName 表名/存储对象的键\n * @param cursorKey key\n * @param cursorValue 要查询索引的值\n */\n async getData(seviceName: string) {\n try {\n // console.time('getData');\n const storeName = store.name;\n const objectStore = await this.getObjectStore(storeName);\n const request = objectStore.get(seviceName);\n // console.timeEnd('getData');\n return promisify(request, 'request');\n } catch (error) {\n return Promise.reject(error);\n }\n }\n async getAllData(storeName: string) {\n try {\n // console.time('getAllData');\n const objectStore = await this.getObjectStore(storeName);\n const request = objectStore.getAll();\n const result = await promisify(request, 'request');\n // console.timeEnd('getAllData');\n return result ? result : [];\n } catch (error) {\n return Promise.reject(error);\n }\n }\n /**\n * 获取对象仓库\n * @param storeName 表名\n * @param type readonly 或者 readwrite等\n */\n private async getObjectStore(storeName: string, type?: any): Promise {\n try {\n const db = await this.openDB();\n return db.transaction(storeName, type).objectStore(storeName);\n } catch (error) {\n return Promise.reject(error);\n }\n }\n}\n// console.log('testDDB')\n// const indexDB = new IndexedDB({store});\n// indexDB.addData({service: 'cvm', instance: [{ins: 23}]}).then(e=>{\n// indexDB.getData('cvm').then(dd=>{console.log({dd})})\n// })\nexport default new IndexedDB({ store });\n","import indexedDB from './indexedDB';\nclass InstanceStorage {\n // prefix = 'Datasource';\n // storageKey = 'grafanaInstanceCache';\n insKey = 'Instances';\n cacheWay = '';\n constructor() {}\n setInstance(service: string, value: Record) {\n return this.setStorage(service, this.insKey, value, true);\n }\n async getInstance(service: string) {\n return this.getStorage(service, this.insKey);\n }\n setExtraStorage(service: string, Ekey: string, EValue: Record) {\n return this.setStorage(service, Ekey, EValue, false);\n }\n async getExtraStorage(service: string, Ekey: string) {\n return this.getStorage(service, Ekey);\n }\n private setStorage(serviceKey: string, key: string, value: Record, isCover = false) {\n // console.log('set', serviceKey, key, value);\n return indexedDB.addData(\n {\n service: serviceKey,\n [key]: value,\n },\n isCover\n );\n }\n // 获取到模版变量信息\n private async getStorage(service: string, key?: string) {\n const storage = await indexedDB.getData(service);\n // console.log('get', key, storage);\n return key ? storage?.[key] : storage;\n }\n}\nexport default new InstanceStorage();\n","import _ from 'lodash';\n\nexport const CKAFKAQueryDescriptor = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputnumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为10,最小值为1,最大值为100',\n link: '',\n type: 'inputnumber',\n min: 1,\n max: 100,\n },\n {\n key: 'InstanceId',\n enDescriptor: 'InstanceId',\n cnDescriptor: '按照实例ID过滤',\n link: '',\n type: 'input',\n },\n {\n key: 'SearchWord',\n enDescriptor: 'SearchWord',\n cnDescriptor: '按照实例名称过滤,支持模糊查询',\n link: '',\n type: 'input',\n },\n {\n key: 'TagKey',\n enDescriptor: 'TagKey',\n cnDescriptor: '匹配标签key值',\n link: '',\n type: 'input',\n },\n {\n key: 'Status',\n enDescriptor: 'Status',\n cnDescriptor: '实例的状态,不填默认返回全部',\n link: '',\n type: 'select',\n multiple: true,\n list: [\n { text: '创建中', value: 0 },\n { text: '运行中', value: 1 },\n { text: '删除中', value: 2 },\n ],\n },\n];\n\nconst CKAFKA_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'InstanceId',\n topicId: '',\n topicName: '',\n consumerGroup: '',\n partition: '',\n queries: {\n Offset: 0,\n Limit: 10,\n Status: [],\n InstanceId: '',\n SearchWord: '',\n TagKey: '',\n },\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n queries = _.omit(queries, ['Offset', 'Limit']);\n _.forEach(queries, (item: any, key) => {\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n params[key] = _.uniq(item);\n }\n } else if (_.isObject(item)) {\n if (_.isNumber(_.get(item, 'value', undefined)) || !_.isEmpty(_.get(item, 'value', undefined))) {\n params[key] = _.get(item, 'value');\n }\n } else if (_.isNumber(item) || !_.isEmpty(item)) {\n params[key] = item;\n }\n });\n }\n return params;\n}\n\nconst CKAFKAInstanceAliasList = ['InstanceId', 'InstanceName'];\nconst CKAFKATopicAliasList = ['TopicId', 'TopicName'];\n// 保存在模板变量value中的key\nconst templateQueryIdMap = {\n instance: 'InstanceId',\n topicId: 'TopicId',\n groupName: 'GroupName',\n partition: 'PartitionId',\n};\n// 向实例里面塞dimensions对应的值,dimension中的key对应到实例中的key\nconst CKAFKAInvalidDemensions = new Proxy(\n {\n topicId: 'TopicId',\n topicName: 'TopicName',\n consumerGroup: 'GroupName',\n partition: 'PartitionId',\n },\n {\n get: (obj, prop) => {\n if (String(prop).toLocaleLowerCase() === 'instanceid') return 'InstanceId';\n return obj[prop];\n },\n }\n);\n// 需要缓存到storage的内容的key列表\nconst keyInStorage = {\n TopicList: 'TopicList',\n GroupList: 'GroupList',\n PartitionList: 'PartitionList',\n};\n\n/*\n如果有InstanceId额外的维度,原则上都需要传入此map结构配置\nkey的含义:\n 经过InvalidDemensions处理后的string。topicId =》TopicId。\n 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId\nvalue的含义:\n 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、\n 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。\n 默认取通过InvalidDemsion处理后的key\n 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。\n 即:templateQueryIdMap中内容。\n 联合上面2的内容筛选出原始sourceMap\n*/\nconst queryMonitorExtraConfg = {\n TopicId: {\n dim_KeyInStorage: keyInStorage.TopicList,\n dim_KeyInTarget: 'topicId',\n dim_KeyInMap: templateQueryIdMap.topicId,\n },\n // topicName和topicId是同一个storage中的source,所以根据topicId帅选\n TopicName: {\n dim_KeyInStorage: keyInStorage.TopicList,\n dim_KeyInTarget: 'topicId',\n dim_KeyInMap: templateQueryIdMap.topicId,\n },\n GroupName: {\n dim_KeyInStorage: keyInStorage.GroupList,\n dim_KeyInTarget: 'consumerGroup',\n dim_KeyInMap: templateQueryIdMap.groupName,\n },\n PartitionId: {\n dim_KeyInStorage: keyInStorage.PartitionList,\n dim_KeyInTarget: 'partition',\n dim_KeyInMap: templateQueryIdMap.partition,\n },\n};\nexport default CKAFKA_STATE;\nexport {\n CKAFKAInstanceAliasList,\n CKAFKATopicAliasList,\n CKAFKAInvalidDemensions,\n templateQueryIdMap,\n keyInStorage,\n queryMonitorExtraConfg,\n GetInstanceQueryParams as CKAFKAGetInstanceQueryParams,\n};\n","import _ from 'lodash';\n\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/LOADBALANCE';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'loadBalanceQuery';\n\nconst ForwardTypes = [\n { text: '通用的负载均衡', value: 1 },\n { text: '传统的负载均衡', value: 0 },\n];\n\nconst OrderBy = [\n { text: 'LoadBalancerName', value: 'LoadBalancerName' },\n { text: 'CreateTime', value: 'CreateTime' },\n { text: 'Domain', value: 'Domain' },\n { text: 'LoadBalancerType', value: 'LoadBalancerType' },\n];\n\nconst OrderType = [\n { text: '升序', value: 0 },\n { text: '降序', value: 1 },\n];\n\nconst WithRs = [\n { text: '没有绑定后端服务', value: 0 },\n { text: '绑定后端服务', value: 1 },\n { text: '查询全部', value: -1 },\n];\nconst LOADBALANCEFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1',\n link: '',\n type: 'inputNumber',\n min: 1,\n },\n {\n key: 'LoadBalancerIds',\n enDescriptor: 'LoadBalancer ID',\n cnDescriptor: '实例ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'LoadBalancerName',\n enDescriptor: 'LoadBalancer Name',\n cnDescriptor: '实例名称',\n link: '',\n type: 'input',\n },\n {\n key: 'Forward',\n enDescriptor: 'Forward',\n cnDescriptor: '负载均衡实例类型',\n link: '',\n type: 'select',\n list: ForwardTypes,\n },\n {\n key: 'Domain',\n enDescriptor: 'Domain',\n cnDescriptor: '域名,腾讯云为负载均衡实例分配的域名,本参数仅对传统型公网负载均衡才有意义',\n link: '',\n type: 'input',\n },\n {\n key: 'LoadBalancerVips',\n enDescriptor: 'LoadBalancer Vips',\n cnDescriptor: '负载均衡实例的 VIP 地址',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'BackendPrivateIps',\n enDescriptor: 'BackendPrivate Ips',\n cnDescriptor: '负载均衡绑定的后端服务的内网 IP',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'BackendPublicIps',\n enDescriptor: 'BackendPublic Ips',\n cnDescriptor: '负载均衡绑定的后端服务的外网 IP',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'ProjectId',\n enDescriptor: 'Project ID',\n cnDescriptor: '负载均衡实例所属的项目 ID',\n link: '',\n type: 'inputNumber',\n },\n {\n key: 'VpcId',\n enDescriptor: 'Vpc ID',\n cnDescriptor: '负载均衡实例所属私有网络',\n link: '',\n type: 'input',\n },\n {\n key: 'SecurityGroup',\n enDescriptor: 'Security Group',\n cnDescriptor: '安全组ID',\n link: '',\n type: 'input',\n },\n {\n key: 'MasterZone',\n enDescriptor: 'Master Zone',\n cnDescriptor: '主可用区ID',\n link: '',\n type: 'input',\n },\n {\n key: 'WithRs',\n enDescriptor: 'WithRs',\n cnDescriptor: '负载均衡是否绑定后端服务',\n link: '',\n type: 'select',\n list: WithRs,\n },\n {\n key: 'OrderBy',\n enDescriptor: 'OrderBy',\n cnDescriptor: '排序字段',\n link: '',\n type: 'select',\n list: OrderBy,\n },\n {\n key: 'OrderType',\n enDescriptor: 'OrderByType',\n cnDescriptor: '排序方式',\n link: '',\n type: 'select',\n list: OrderType,\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/214/30685',\n namespace,\n fieldDescriptor: LOADBALANCEFieldsDescriptor,\n};\nconst LBFields = {\n LoadBalancerIds: [],\n Forward: undefined,\n LoadBalancerName: '',\n Domain: '',\n LoadBalancerVips: [],\n BackendPublicIps: [],\n BackendPrivateIps: [],\n Limit: 20,\n Offset: 0,\n ProjectId: undefined,\n WithRs: {},\n VpcId: '',\n SecurityGroup: '',\n MasterZone: '',\n OrderBy: {},\n OrderType: {},\n};\n\nconst LOADBALANCE_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'LoadBalancerId',\n Port: '',\n Protocol: '',\n listener: '',\n servers: '',\n serverPort: '',\n // listenerAlias: 'ListenerId',\n queries: LBFields,\n};\n\n// function GetInstanceQueryParams(queries: any = {}) {\n// const params: any = {};\n// if (!_.isEmpty(queries)) {\n// params.Limit = _.get(queries, 'Limit', 20) || 20;\n// params.Offset = _.get(queries, 'Offset', 0) || 0;\n// queries = _.omit(queries, ['Offset', 'Limit']);\n// _.forEach(queries, (item: any, key) => {\n// if (_.isArray(item)) {\n// item = _.compact(item);\n// if (item.length > 0) {\n// params[key] = _.uniq(item);\n// }\n// } else if (_.isObject(item)) {\n// if (_.isNumber(_.get(item, 'value', undefined)) || !_.isEmpty(_.get(item, 'value', undefined))) {\n// params[key] = _.get(item, 'value');\n// }\n// } else if (_.isNumber(item) || !_.isEmpty(item)) {\n// params[key] = item;\n// }\n// });\n// }\n// return params;\n// }\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, false);\n}\nconst InstanceAliasList = ['LoadBalancerId', 'LoadBalancerName', 'LoadBalancerVips'];\nconst LOADBALANCEListenerAliasList = ['ListenerId', 'ListenerName', 'Port'];\nconst LOADBALANCEServerAliasList = ['PrivateIpAddresses', 'InstanceId'];\nconst LOADBALANCEVALIDDIMENSIONS = {\n vip: 'LoadBalancerVips',\n // vpcId: 'NumericalVpcId',\n loadBalancerPort: 'Port',\n protocol: 'Protocol',\n lanIp: 'PrivateIpAddresses',\n port: 'ServerPort',\n};\n// 对于ipv6类型,vip应该取AddressIPv6。\nconst CANDIATEDIMENSIONS = {\n LoadBalancerVips: 'AddressIPv6',\n};\n// dimensionObject[item] = { Name: item, Value: '' };\n// const LOADBALANCE_INSTANCE_DIMENSIONOBJECTS = {\n// vip: { Name: 'vip', Value: '' },\n// };\n// const LOADBALANCE_LISTENER_DIMENSIONOBJECTS = {\n// vip: { Name: 'vip', Value: '' },\n// loadBalancerPort: { Name: 'loadBalancerPort', Value: '' },\n// protocol: { Name: 'protocol', Value: '' },\n// };\nconst templateQueryIdMap = {\n instance: 'LoadBalancerId',\n listener: 'ListenerId',\n servers: 'PrivateIpAddresses',\n port: 'Port',\n};\n// 需要缓存到storage的内容的key列表\nconst keyInStorage = {\n listener: 'ListenerList',\n servers: 'ServersList',\n};\n/*\n如果有InstanceId额外的维度,原则上都需要传入此map结构配置\nkey的含义:\n 经过InvalidDemensions处理后的string。topicId =》TopicId。\n 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId\nvalue的含义:\n 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、\n 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。\n 默认取通过InvalidDemsion处理后的key\n 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。\n 即:templateQueryIdMap中内容。\n 联合上面2的内容筛选出原始sourceMap\n*/\nconst queryMonitorExtraConfg = {\n Port: {\n dim_KeyInStorage: keyInStorage.listener,\n dim_KeyInTarget: 'listener',\n dim_KeyInMap: templateQueryIdMap.listener,\n },\n Protocol: {\n dim_KeyInStorage: keyInStorage.listener,\n dim_KeyInTarget: 'listener',\n dim_KeyInMap: templateQueryIdMap.listener,\n },\n PrivateIpAddresses: {\n dim_KeyInStorage: keyInStorage.servers,\n dim_KeyInTarget: 'servers',\n dim_KeyInMap: templateQueryIdMap.servers,\n },\n ServerPort: {\n dim_KeyInStorage: keyInStorage.servers,\n dim_KeyInTarget: 'serverPort',\n dim_KeyInIns: 'Port',\n dim_KeyInMap: templateQueryIdMap.port,\n },\n};\nexport default LOADBALANCE_STATE;\nexport {\n LOADBALANCEFieldsDescriptor,\n InstanceAliasList,\n LOADBALANCEListenerAliasList,\n LOADBALANCEServerAliasList,\n LOADBALANCEVALIDDIMENSIONS,\n templateQueryIdMap,\n CANDIATEDIMENSIONS,\n // LOADBALANCE_LISTENER_DIMENSIONOBJECTS,\n // LOADBALANCE_INSTANCE_DIMENSIONOBJECTS,\n queryMonitorExtraConfg,\n keyInStorage,\n queryEditorConfig,\n namespace,\n queryEditorName,\n GetInstanceQueryParams,\n};\n","// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service)\nimport { FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\nimport _ from 'lodash';\n\nconst namespace = 'QCE/TDMQ';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'tdmqQuery';\n\nconst TDMQInvalidDemensions = {\n tenantId: 'ClusterId',\n tenant: 'ClusterId',\n topicName: 'TopicName',\n environmentId: 'EnvironmentId',\n};\n\n// 需和文件名对应\nconst TDMQInstanceAliasList = ['ClusterId', 'ClusterName'];\n\nconst templateQueryIdMap = {\n instance: 'ClusterId',\n topicName: 'TopicName',\n environmentId: 'EnvironmentId',\n};\n\n// select类型需要注意是{},multi后缀是[],dropdown是''\nconst TDMQFilterFields = {\n Limit: 20,\n Offset: 0,\n};\n\nconst TDMQFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n];\n\nconst CDNPROVINCE_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'ClusterId',\n // 此处key应该是经过TDMQInvalidDemensions处理后的\n topicName: '',\n environmentId: '',\n queries: TDMQFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, true);\n}\nconst regionSupported = [\n { value: 'ap-beijing' },\n { value: 'ap-chengdu' },\n { value: 'ap-chongqing' },\n { value: 'ap-guangzhou' },\n { value: 'ap-shenzhen-fsi' },\n { value: 'ap-shanghai' },\n { value: 'ap-shanghai-fsi' },\n { value: 'ap-nanjing' },\n { value: 'ap-hongkong' },\n { value: 'ap-tokyo' },\n { value: 'ap-seoul' },\n { value: 'ap-singapore' },\n { value: 'ap-bangkok' },\n { value: 'ap-jakarta' },\n { value: 'ap-mumbai' },\n { value: 'eu-frankfurt' },\n { value: 'eu-moscow' },\n { value: 'na-ashburn' },\n { value: 'na-siliconvalley' },\n { value: 'na-toronto' },\n];\nfunction modifyDimensons(metricItem) {\n const metricTmp = _.cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n if (item.Dimensions.indexOf('topicName') !== -1 && item.Dimensions.indexOf('environmentId') === -1) {\n item.Dimensions.push('environmentId');\n }\n });\n return metricTmp;\n}\n// 需要缓存到storage的内容的key列表\nconst keyInStorage = {\n topicName: 'topicName',\n environmentId: 'environmentId',\n};\n/*\n如果有InstanceId额外的维度,原则上都需要传入此map结构配置\nkey的含义:\n 经过InvalidDemensions处理后的string。topicId =》TopicId。\n 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId\nvalue的含义:\n 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、\n 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。\n 默认取通过InvalidDemsion处理后的key\n 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。\n 即:templateQueryIdMap中内容。\n 联合上面2的内容筛选出原始sourceMap\n*/\nconst queryMonitorExtraConfg = {\n TopicName: {\n dim_KeyInStorage: keyInStorage.topicName,\n dim_KeyInTarget: 'topicName',\n dim_KeyInMap: templateQueryIdMap.topicName,\n },\n EnvironmentId: {\n dim_KeyInStorage: keyInStorage.environmentId,\n dim_KeyInTarget: 'environmentId',\n dim_KeyInMap: templateQueryIdMap.environmentId,\n },\n};\nexport default CDNPROVINCE_STATE;\nexport {\n TDMQFilterFieldsDescriptor,\n templateQueryIdMap,\n TDMQInstanceAliasList,\n TDMQInvalidDemensions,\n namespace,\n queryEditorName,\n queryMonitorExtraConfg,\n keyInStorage,\n modifyDimensons,\n regionSupported,\n // 对应产品的service的全大写拼接GetInstanceQueryParams\n GetInstanceQueryParams as TDMQGetInstanceQueryParams,\n};\n","// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service)\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\nimport _ from 'lodash';\n\nconst namespace = 'QCE/GSE';\nconst fleetId = 'FleetId'; // 为和cvm其他产品保持一致,即将string[]改为Array<{fleetid: xxx}>,在此声明key\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'gseQuery';\n\nconst GSEInvalidDemensions = {\n instanceid: 'InstanceId',\n fleetid: 'FleetId',\n queuename: 'Name',\n};\n\n// 需和文件名对应\nconst GSEInstanceAliasList = ['InstanceId', 'PrivateIpAddress', 'IpAddress'];\n\nconst templateQueryIdMap = {\n instance: 'InstanceId',\n Name: 'Name',\n FleetId: fleetId,\n};\n\n// 需要缓存到storage的内容的key列表\nconst keyInStorage = {\n fleet: 'fleet', // 实例队列\n queue: 'queueName', // 会话队列\n};\n/*\n如果有InstanceId额外的维度,原则上都需要传入此map结构配置\nkey的含义:\n 经过InvalidDemensions处理后的string。topicId =》TopicId。\n 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId\nvalue的含义:\n 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、\n 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。\n 默认取通过InvalidDemsion处理后的key\n 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。\n 即:templateQueryIdMap中内容。\n 联合上面2的内容筛选出原始sourceMap\n*/\nconst queryMonitorExtraConfg = {\n FleetId: {\n dim_KeyInStorage: keyInStorage.fleet,\n dim_KeyInTarget: 'FleetId',\n dim_KeyInMap: templateQueryIdMap.FleetId,\n },\n Name: {\n dim_KeyInStorage: keyInStorage.queue,\n dim_KeyInTarget: 'Name',\n dim_KeyInMap: templateQueryIdMap.Name,\n },\n};\n// select类型需要注意是{},multi后缀是[],dropdown是''\nconst GSEFilterFields = {\n Limit: 20,\n Offset: 0,\n InstanceId: '',\n FleetId: '',\n};\n\nconst GSEFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'InstanceId',\n enDescriptor: 'resourceName',\n cnDescriptor: '资源名称',\n link: '',\n type: 'input',\n },\n {\n key: 'FleetId',\n enDescriptor: 'tagKey',\n cnDescriptor: '标签键',\n link: '',\n type: 'input',\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/1165/42604',\n namespace,\n fieldDescriptor: GSEFilterFieldsDescriptor,\n};\n\nconst GSE_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'InstanceId',\n FleetId: '', // 服务器实例\n Name: '', // 队列名称\n queries: GSEFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, true);\n}\n// regions for dropdown\nconst regionSupported = [\n { value: 'ap-bangkok' },\n { value: 'ap-beijing' },\n { value: 'ap-chengdu' },\n // { value: 'ap-chongqing' },\n { value: 'ap-guangzhou' },\n { value: 'ap-hongkong' },\n { value: 'ap-mumbai' },\n { value: 'ap-seoul' },\n { value: 'ap-nanjing' },\n { value: 'ap-shanghai' },\n // { value: 'ap-shanghai-fsi' },\n // { value: 'ap-shenzhen-fsi' },\n { value: 'ap-singapore' },\n { value: 'ap-tokyo' },\n { value: 'eu-frankfurt' },\n { value: 'na-ashburn' },\n { value: 'na-siliconvalley' },\n // { value: 'na-toronto' },\n];\nfunction modifyDimensons(metricItem: any) {\n const metricTmp = _.cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n item.Dimensions = item.Dimensions.map((v) => GSEInvalidDemensions[v] || v);\n });\n return metricTmp;\n}\nexport default GSE_STATE;\nexport {\n GSEFilterFieldsDescriptor,\n templateQueryIdMap,\n GSEInstanceAliasList,\n GSEInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n regionSupported,\n modifyDimensons,\n queryMonitorExtraConfg,\n fleetId,\n keyInStorage,\n // 对应产品的service的全大写拼接GetInstanceQueryParams\n GetInstanceQueryParams as GSEGetInstanceQueryParams,\n};\n","// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service)\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { isArray, cloneDeep } from 'lodash';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/TDMYSQL';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'dcdbQuery';\n\nconst DCDBInvalidDemensions = {\n nodeid: 'NodeId',\n instanceid: 'InstanceId',\n shardid: 'ShardInstanceId',\n ShardId: 'ShardInstanceId',\n};\n\n// 需和文件名对应\nconst DCDBInstanceAliasList = ['InstanceId', 'InstanceName'];\n\nconst templateQueryIdMap = {\n instance: 'InstanceId',\n NodeId: 'NodeId',\n ShardInstanceId: 'ShardInstanceId',\n};\n\n// select类型需要注意是{},multi后缀是[],dropdown是''\nconst DCDBFilterFields = {\n Limit: 20,\n Offset: 0,\n InstanceIds: [],\n SearchName: '',\n SearchKey: '',\n ProjectIds: [],\n // IsFilterVpc\n VpcId: '',\n SubnetId: '',\n\n OrderBy: {},\n OrderByType: {},\n // IsFilterExcluster: {},\n ExclusterType: {},\n\n ExclusterIds: [],\n FilterInstanceType: {},\n};\n\nconst DCDBFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'InstanceIds',\n enDescriptor: 'InstanceIds',\n cnDescriptor: '实例 ID 查询',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'SearchName',\n enDescriptor: 'SearchName',\n cnDescriptor: '搜索的字段名,当前支持的值有:instancename、vip、all',\n link: '',\n type: 'input',\n },\n {\n key: 'SearchKey',\n enDescriptor: 'SearchKey',\n cnDescriptor: '搜索的关键字',\n link: '',\n type: 'input',\n },\n {\n key: 'ProjectIds',\n enDescriptor: 'ProjectIds',\n cnDescriptor: '按项目 ID 查询',\n link: '',\n type: 'inputNumberMulti',\n },\n {\n key: 'VpcId',\n enDescriptor: 'VpcId',\n cnDescriptor: '私有网络 ID',\n link: '',\n type: 'input',\n },\n {\n key: 'SubnetId',\n enDescriptor: 'SubnetId',\n cnDescriptor: '私有网络的子网 ID',\n link: '',\n type: 'input',\n },\n {\n key: 'OrderBy',\n enDescriptor: 'OrderBy',\n cnDescriptor: '排序字段',\n link: '',\n type: 'select',\n list: [\n { text: 'projectId', value: 'projectId' },\n { text: 'createtime', value: 'createtime' },\n { text: 'instancename', value: 'instancename' },\n ],\n },\n {\n key: 'OrderByType',\n enDescriptor: 'OrderByType',\n cnDescriptor: '私有网络 ID',\n link: '',\n type: 'select',\n list: [\n { text: 'desc', value: 'desc' },\n { text: 'asc', value: 'asc' },\n ],\n },\n {\n key: 'ExclusterType',\n enDescriptor: 'ExclusterType',\n cnDescriptor: '集群类型',\n link: '',\n type: 'select',\n list: [\n { text: '非独享集群', value: 1 },\n { text: '独享集群', value: 2 },\n { text: '全部', value: 0 },\n { text: 'asc', value: 'asc' },\n ],\n },\n {\n key: 'ExclusterIds',\n enDescriptor: 'ExclusterIds',\n cnDescriptor: '独享集群ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'FilterInstanceType',\n enDescriptor: 'FilterInstanceType',\n cnDescriptor: '实例类型过滤',\n link: '',\n type: 'select',\n multiple: true,\n list: [\n { text: '独享实例', value: 1 },\n { text: '主实例', value: 2 },\n { text: '灾备实例', value: 3 },\n ],\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/557/16140',\n namespace,\n fieldDescriptor: DCDBFilterFieldsDescriptor,\n};\n\nconst DCDB_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'InstanceId',\n ShardId: '',\n NodeId: '',\n queries: DCDBFilterFields,\n};\nconst modifyMetricConf = {\n shardid: 'ShardId',\n instanceid: 'InstanceId',\n nodeid: 'NodeId',\n};\nfunction modifyDimensons(metricItem: any) {\n const metricTmp = cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n item.Dimensions = item.Dimensions.map((v) => modifyMetricConf[v] || v);\n });\n return metricTmp;\n}\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params = instanceQueryParamsBaseParse(queries, false);\n // 特殊处理\n params.IsFilterVpc = false;\n params.IsFilterExcluster = false;\n if (params.VpcId || params.SubnetId) params.IsFilterVpc = true;\n if (params.ExclusterType) params.IsFilterExcluster = true;\n if (isArray(params.FilterInstanceType)) params.FilterInstanceType = params.FilterInstanceType.join(',');\n return params;\n}\n// 需要缓存到storage的内容的key列表\nconst keyInStorage = {\n NodeId: 'NodeId',\n ShardInstanceId: 'ShardId',\n};\n/*\n如果有InstanceId额外的维度,原则上都需要传入此map结构配置\nkey的含义:\n 经过InvalidDemensions处理后的string。topicId =》TopicId。\n 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId\nvalue的含义:\n 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、\n 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。\n 默认取通过InvalidDemsion处理后的key\n 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。\n 即:templateQueryIdMap中内容。\n 联合上面2的内容筛选出原始sourceMap\n*/\nconst queryMonitorExtraConfg = {\n NodeId: {\n dim_KeyInStorage: keyInStorage.NodeId,\n dim_KeyInTarget: 'NodeId',\n dim_KeyInMap: templateQueryIdMap.NodeId,\n },\n ShardInstanceId: {\n dim_KeyInStorage: keyInStorage.ShardInstanceId,\n dim_KeyInTarget: 'ShardId',\n dim_KeyInMap: templateQueryIdMap.ShardInstanceId,\n },\n};\n// 和其他产品的展示保持一致\nconst regionSupported = [\n { text: '华北地区(北京)', value: 'ap-beijing' },\n { text: '西南地区(成都)', value: 'ap-chengdu' },\n { text: '西南地区(重庆)', value: 'ap-chongqing' },\n { text: '华南地区(广州)', value: 'ap-guangzhou' },\n { text: '港澳台地区(中国香港)', value: 'ap-hongkong' },\n { text: '亚太南部(孟买)', value: 'ap-mumbai' },\n { text: '华东地区(南京)', value: 'ap-nanjing' },\n { text: '华东地区(上海)', value: 'ap-shanghai' },\n { text: '华东地区(上海金融)', value: 'ap-shanghai-fsi' },\n { text: '华南地区(深圳金融)', value: 'ap-shenzhen-fsi' },\n { text: '亚太东南(新加坡)', value: 'ap-singapore' },\n { text: '亚太东北(东京)', value: 'ap-tokyo' },\n { text: '欧洲地区(法兰克福)', value: 'eu-frankfurt' },\n { text: '美国东部(弗吉尼亚)', value: 'na-ashburn' },\n { text: '美国西部(硅谷)', value: 'na-siliconvalley' },\n { text: '北美地区(多伦多)', value: 'na-toronto' },\n];\nexport default DCDB_STATE;\nexport {\n DCDBFilterFieldsDescriptor,\n templateQueryIdMap,\n DCDBInstanceAliasList,\n DCDBInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n regionSupported,\n keyInStorage,\n modifyDimensons,\n queryMonitorExtraConfg,\n // 对应产品的service的全大写拼接GetInstanceQueryParams\n GetInstanceQueryParams as DCDBGetInstanceQueryParams,\n};\n","import _ from 'lodash';\n\nconst namespace = 'QCE/REDIS_MEM';\nconst BillingMode = [\n { text: '按量计费', value: 'postpaid' },\n { text: '包年包月', value: 'prepaid' },\n];\n\nconst AutoRenew = [\n { text: '手动续费', value: 0 },\n { text: '自动续费', value: 1 },\n { text: '明确不自动续费', value: 2 },\n];\n\nconst Status = [\n { text: '待初始化', value: 0 },\n { text: '流程执行中', value: 1 },\n { text: '运行中', value: 2 },\n { text: '已隔离', value: -2 },\n { text: '待删除', value: -3 },\n];\n\nconst TypeVersion = [\n { text: '单机版', value: 1 },\n { text: '主从版', value: 2 },\n { text: '集群版', value: 3 },\n];\n\nconst OrderBy = [\n { text: 'projectId', value: 'projectId' },\n { text: 'instancename', value: 'instancename' },\n { text: 'createtime', value: 'createtime' },\n { text: 'type', value: 'type' },\n { text: 'curDeadline', value: 'curDeadline' },\n];\n\nconst OrderType = [\n { text: '升序', value: 0 },\n { text: '降序', value: 1 },\n];\nconst Type = [\n { text: 'Redis老集群版', value: 1 },\n { text: 'Redis 2.8主从版', value: 2 },\n { text: 'CKV主从版', value: 3 },\n { text: 'CKV集群版', value: 4 },\n { text: 'Redis 2.8单机版', value: 5 },\n { text: 'Redis 4.0主从版', value: 6 },\n { text: 'Redis 4.0集群版', value: 7 },\n { text: 'Redis5.0主从版', value: 8 },\n { text: 'Redis5.0集群版', value: 9 },\n];\n\nconst RedisFields = {\n InstanceId: '',\n OrderBy: '',\n OrderType: null,\n VpcIds: [],\n SubnetIds: [],\n ProjectIds: [],\n SearchKey: '',\n InstanceName: '',\n UniqVpcIds: [],\n UniqSubnetIds: [],\n Status: [],\n TypeVersion: null,\n EngineName: '',\n AutoRenew: null,\n BillingMode: '',\n Type: null,\n};\n\nconst RedisMemFieldsDescriptor = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputnumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputnumber',\n min: 1,\n max: 100,\n },\n {\n key: 'InstanceId',\n enDescriptor: 'InstancesId',\n cnDescriptor: '实例id',\n type: 'input',\n },\n {\n key: 'OrderBy',\n enDescriptor: 'OrderBy',\n cnDescriptor: '排序字段',\n link: '',\n type: 'select',\n list: OrderBy,\n },\n {\n key: 'OrderType',\n enDescriptor: 'OrderType',\n cnDescriptor: '排序字段',\n link: '',\n type: 'select',\n list: OrderType,\n },\n {\n key: 'VpcIds',\n enDescriptor: 'VpcIds',\n cnDescriptor: '私有网络ID数组,数组下标从0开始,如果不传则默认选择基础网络,如:47525',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'SubnetIds',\n enDescriptor: 'SubnetIds',\n cnDescriptor: '子网ID数组,数组下标从0开始,如:56854',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'ProjectIds',\n enDescriptor: 'ProjectIds',\n cnDescriptor: '项目ID 组成的数组',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'SearchKey',\n enDescriptor: 'SearchKey',\n cnDescriptor: '查找实例的ID',\n link: '',\n type: 'input',\n },\n {\n key: 'InstanceName',\n enDescriptor: 'InstanceName',\n cnDescriptor: '实例名称',\n link: '',\n type: 'input',\n },\n {\n key: 'UniqVpcIds',\n enDescriptor: 'UniqVpcIds',\n cnDescriptor: '私有网络ID数组,数组下标从0开始,如果不传则默认选择基础网络,如:vpc-sad23jfdfk',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'UniqSubnetIds',\n enDescriptor: 'UniqSubnetIds',\n cnDescriptor: '子网ID数组,数组下标从0开始,如:subnet-fdj24n34j2',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'Status',\n enDescriptor: 'Status',\n cnDescriptor: '实例状态',\n multiple: true,\n type: 'select',\n list: Status,\n },\n {\n key: 'TypeVersion',\n enDescriptor: 'TypeVersion',\n cnDescriptor: '类型版本',\n link: '',\n type: 'select',\n list: TypeVersion,\n },\n {\n key: 'EngineName',\n enDescriptor: 'EngineName',\n cnDescriptor: '引擎信息:Redis-2.8,Redis-4.0,CKV',\n link: '',\n type: 'input',\n },\n {\n key: 'AutoRenew',\n enDescriptor: 'AutoRenew',\n cnDescriptor: '续费模式',\n multiple: true,\n type: 'select',\n list: AutoRenew,\n },\n {\n key: 'BillingMode',\n enDescriptor: 'BillingMode',\n cnDescriptor: '计费模式:postpaid-按量计费;prepaid-包年包月',\n link: '',\n type: 'select',\n list: BillingMode,\n },\n {\n key: 'Type',\n enDescriptor: 'Type',\n cnDescriptor: '实例类型',\n link: '',\n type: 'select',\n list: Type,\n },\n];\n\nconst REDISMEM_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'InstanceId',\n queries: { ...RedisFields },\n rnodeid: '',\n pnodeid: '',\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n queries = _.omit(queries, ['Offset', 'Limit']);\n _.forEach(queries, (item: any, key) => {\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n params[key] = _.uniq(item);\n }\n } else if (_.isObject(item)) {\n // select 单选\n if (_.isNumber(_.get(item, 'value', undefined)) || !_.isEmpty(_.get(item, 'value', undefined))) {\n params[key] = _.get(item, 'value');\n }\n } else if (_.isNumber(item) || !_.isEmpty(item)) {\n params[key] = item;\n }\n });\n }\n return params;\n}\n\nconst REDISMEMInstanceAliasList = ['InstanceId', 'InstanceName', 'WanIp'];\n\nconst RedisMemInvalidDemensions = {\n instanceid: 'InstanceId',\n rnodeid: 'rnodeid',\n pnodeid: 'pnodeid',\n};\n\nconst templateQueryIdMap = {\n instance: 'InstanceId',\n rnodeid: 'rnodeid',\n pnodeid: 'pnodeid',\n};\n\nconst NodeType = ['Redis', 'Proxy'];\n\nexport default REDISMEM_STATE;\nexport {\n RedisMemFieldsDescriptor,\n RedisMemInvalidDemensions,\n REDISMEMInstanceAliasList,\n templateQueryIdMap,\n namespace,\n NodeType,\n GetInstanceQueryParams as REDISMEMGetInstanceQueryParams,\n};\n","// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service)\nimport { FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\nimport _ from 'lodash';\n\nconst namespace = 'QCE/RABBITMQ';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'tdmqQuery';\n\nconst TDMQInvalidDemensions = {\n instanceid: 'InstanceId',\n node: 'NodeName',\n};\n\n// 需和文件名对应\nconst TDMQRABBITMQInstanceAliasList = ['InstanceId', 'InstanceName'];\n\nconst templateQueryIdMap = {\n instance: 'InstanceId',\n node: 'NodeName',\n};\n\n// select类型需要注意是{},multi后缀是[],dropdown是''\nconst TDMQFilterFields = {\n Limit: 20,\n Offset: 0,\n};\n\nconst TDMQFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n];\n\nconst TDMQ_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'InstanceId',\n // 此处key应该是经过TDMQInvalidDemensions处理后的\n node: '',\n queries: TDMQFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, true);\n}\nconst regionSupported = [\n { value: 'ap-beijing' },\n { value: 'ap-chengdu' },\n { value: 'ap-chongqing' },\n { value: 'ap-guangzhou' },\n { value: 'ap-shenzhen-fsi' },\n { value: 'ap-shanghai' },\n { value: 'ap-shanghai-fsi' },\n { value: 'ap-nanjing' },\n { value: 'ap-hongkong' },\n { value: 'ap-tokyo' },\n { value: 'ap-seoul' },\n { value: 'ap-singapore' },\n { value: 'ap-bangkok' },\n { value: 'ap-jakarta' },\n { value: 'ap-mumbai' },\n { value: 'eu-frankfurt' },\n { value: 'eu-moscow' },\n { value: 'na-ashburn' },\n { value: 'na-siliconvalley' },\n { value: 'na-toronto' },\n];\n\n// 需要缓存到storage的内容的key列表\nconst keyInStorage = {\n node: 'NodeName',\n};\n/*\n如果有InstanceId额外的维度,原则上都需要传入此map结构配置\nkey的含义:\n 经过InvalidDemensions处理后的string。topicId =》TopicId。\n 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId\nvalue的含义:\n 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、\n 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。\n 默认取通过InvalidDemsion处理后的key\n 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。\n 即:templateQueryIdMap中内容。\n 联合上面2的内容筛选出原始sourceMap\n*/\nconst queryMonitorExtraConfg = {\n NodeName: {\n dim_KeyInStorage: keyInStorage.node,\n dim_KeyInTarget: 'node',\n dim_KeyInMap: templateQueryIdMap.node,\n },\n};\nexport default TDMQ_STATE;\nexport {\n TDMQFilterFieldsDescriptor,\n templateQueryIdMap,\n TDMQRABBITMQInstanceAliasList,\n TDMQInvalidDemensions,\n namespace,\n queryEditorName,\n queryMonitorExtraConfg,\n keyInStorage,\n regionSupported,\n // 对应产品的service的全大写拼接GetInstanceQueryParams\n GetInstanceQueryParams as TDMQGetInstanceQueryParams,\n};\n","// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service)\nimport { FildDescriptorType } from '../_base/types';\nimport _ from 'lodash';\n\nconst namespace = 'QCE/ROCKETMQ';\n\nconst TDMQInvalidDemensions = {\n tenant: 'ClusterId',\n namespace: 'NamespaceId',\n group: 'Name',\n};\n\n// 需和文件名对应\nconst TDMQROCKETMQInstanceAliasList = ['ClusterId', 'ClusterName'];\n\nconst templateQueryIdMap = {\n instance: 'ClusterId',\n namespace: 'NamespaceId',\n group: 'Name',\n};\n\n// select类型需要注意是{},multi后缀是[],dropdown是''\nconst TDMQFilterFields = {\n Limit: 20,\n Offset: 0,\n instanceIdsChecked: false,\n filtersChecked: true,\n ClusterIdList: [''],\n Filters: {\n includeVip: { text: '是', value: 'true' },\n },\n};\n\nconst TDMQFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'includeVip',\n enDescriptor: 'includeVip',\n cnDescriptor: '包含专享集群',\n link: '',\n type: 'select',\n list: [\n { text: '是', value: 'true' },\n { text: '否', value: 'false' },\n ],\n },\n];\n\nconst TDMQ_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'ClusterId',\n // 此处key应该是经过TDMQInvalidDemensions处理后的\n namespace: '',\n group: '',\n queries: TDMQFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n if (queries.instanceIdsChecked) {\n if (_.isArray(queries.ClusterIdList)) {\n const ClusterIdList = _.compact(queries.ClusterIdList);\n if (_.uniq(ClusterIdList).length > 0) {\n params.ClusterIdList = _.uniq(ClusterIdList).slice(0, 100);\n }\n }\n } else if (queries.filtersChecked) {\n const Filters: any[] = [];\n _.forEach(queries.Filters, (item: any, key) => {\n if (Filters.length > 9) {\n return;\n }\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n Filters.push({ Name: key, Values: _.uniq(item).slice(0, 5) });\n }\n } else if (_.isObject(item)) {\n if (!_.isEmpty(_.get(item, 'value', []))) {\n Filters.push({ Name: key, Values: [_.get(item, 'value', [])].slice(0, 5) });\n }\n }\n });\n if (Filters.length > 0) {\n params.Filters = Filters;\n }\n }\n }\n return params;\n}\nconst regionSupported = [\n { value: 'ap-beijing' },\n { value: 'ap-chengdu' },\n { value: 'ap-chongqing' },\n { value: 'ap-guangzhou' },\n { value: 'ap-shenzhen-fsi' },\n { value: 'ap-shanghai' },\n { value: 'ap-shanghai-fsi' },\n { value: 'ap-nanjing' },\n { value: 'ap-hongkong' },\n { value: 'ap-tokyo' },\n { value: 'ap-seoul' },\n { value: 'ap-singapore' },\n { value: 'ap-bangkok' },\n { value: 'ap-jakarta' },\n { value: 'ap-mumbai' },\n { value: 'eu-frankfurt' },\n { value: 'eu-moscow' },\n { value: 'na-ashburn' },\n { value: 'na-siliconvalley' },\n { value: 'na-toronto' },\n];\n\n// 需要缓存到storage的内容的key列表\nconst keyInStorage = {\n namespace: 'NamespaceId',\n group: 'Name',\n};\n/*\n如果有InstanceId额外的维度,原则上都需要传入此map结构配置\nkey的含义:\n 经过InvalidDemensions处理后的string。topicId =》TopicId。\n 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId\nvalue的含义:\n 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、\n 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。\n 默认取通过InvalidDemsion处理后的key\n 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。\n 即:templateQueryIdMap中内容。\n 联合上面2的内容筛选出原始sourceMap\n*/\nconst queryMonitorExtraConfg = {\n NamespaceId: {\n dim_KeyInStorage: keyInStorage.namespace,\n dim_KeyInTarget: 'namespace',\n dim_KeyInMap: templateQueryIdMap.namespace,\n },\n Name: {\n dim_KeyInStorage: keyInStorage.group,\n dim_KeyInTarget: 'group',\n dim_KeyInMap: templateQueryIdMap.group,\n },\n};\nexport default TDMQ_STATE;\nexport {\n TDMQFilterFieldsDescriptor,\n templateQueryIdMap,\n TDMQROCKETMQInstanceAliasList,\n TDMQInvalidDemensions,\n namespace,\n queryMonitorExtraConfg,\n keyInStorage,\n regionSupported,\n // 对应产品的service的全大写拼接GetInstanceQueryParams\n GetInstanceQueryParams as TDMQROCKETMQGetInstanceQueryParams,\n};\n","import { t } from '../../locale';\n// name (产品名称), service(对应的真实service)\ninterface ServiceType {\n service: string;\n label: string;\n namespace: string;\n href: string;\n groupName?: string;\n hideRegion?: boolean;\n}\nconst SERVICES: ServiceType[] = [\n {\n service: 'cvm',\n get label() {\n return t('CVM');\n },\n namespace: 'QCE/CVM',\n href: 'https://cloud.tencent.com/document/api/213/15688',\n },\n {\n service: 'cdb',\n get label() {\n return t('CDB');\n },\n namespace: 'QCE/CDB',\n href: 'https://cloud.tencent.com/document/api/236/15829',\n get groupName() {\n return t('cloud_database');\n },\n },\n {\n service: 'mongoDB',\n get label() {\n return t('CMONGO');\n },\n namespace: 'QCE/CMONGO',\n href: 'https://cloud.tencent.com/document/api/240/38568',\n get groupName() {\n return t('cloud_database');\n },\n },\n {\n service: 'postgres',\n get label() {\n return t('POSTGRES');\n },\n namespace: 'QCE/POSTGRES',\n href: 'https://cloud.tencent.com/document/product/248/45105',\n get groupName() {\n return t('cloud_database');\n },\n },\n {\n service: 'redis',\n get label() {\n return t('REDIS');\n },\n namespace: 'QCE/REDIS',\n href: 'https://cloud.tencent.com/document/product/248/45110',\n get groupName() {\n return t('cloud_database');\n },\n },\n {\n service: 'redisMem',\n get label() {\n return t('REDIS_MEM');\n },\n namespace: 'QCE/REDIS_MEM',\n href: 'https://cloud.tencent.com/document/product/248/49729',\n get groupName() {\n return t('cloud_database');\n },\n },\n {\n service: 'sqlserver',\n get label() {\n return t('SQLSERVER');\n },\n namespace: 'QCE/SQLSERVER',\n href: 'https://cloud.tencent.com/document/product/248/45146',\n get groupName() {\n return t('cloud_database');\n },\n },\n {\n service: 'cynosdbMysql',\n get label() {\n return t('CYNOSDB_MYSQL');\n },\n namespace: 'QCE/CYNOSDB_MYSQL',\n href: 'https://cloud.tencent.com/document/product/248/45106',\n get groupName() {\n return t('cloud_database');\n },\n },\n {\n service: 'tcaplus',\n get label() {\n return t('TCAPLUS');\n },\n namespace: 'QCE/TCAPLUS',\n href: 'https://cloud.tencent.com/document/product/248/45107',\n get groupName() {\n return t('cloud_database');\n },\n },\n {\n service: 'dcdb',\n get label() {\n return t('TDMYSQL');\n },\n namespace: 'QCE/TDMYSQL',\n href: 'https://cloud.tencent.com/document/product/248/45108',\n },\n {\n service: 'pcx',\n get label() {\n return t('PCX');\n },\n namespace: 'QCE/PCX',\n href: 'https://cloud.tencent.com/document/product/215/5181',\n get groupName() {\n return t('virtual_private_cloud');\n },\n },\n {\n service: 'bwp',\n get label() {\n return t('BWP');\n },\n namespace: 'QCE/BWP',\n href: 'https://cloud.tencent.com/document/api/215/19209',\n get groupName() {\n return t('virtual_private_cloud');\n },\n },\n {\n service: 'natGateway',\n get label() {\n return t('NAT_GATEWAY');\n },\n namespace: 'QCE/NAT_GATEWAY',\n href: 'https://cloud.tencent.com/document/api/215/36034',\n get groupName() {\n return t('virtual_private_cloud');\n },\n },\n {\n service: 'vpngw',\n get label() {\n return t('VPNGW');\n },\n namespace: 'QCE/VPNGW',\n href: 'https://cloud.tencent.com/document/product/248/45070',\n get groupName() {\n return t('virtual_private_cloud');\n },\n },\n {\n service: 'vpnx',\n get label() {\n return t('VPNX');\n },\n namespace: 'QCE/VPNX',\n href: 'https://cloud.tencent.com/document/product/248/45071',\n get groupName() {\n return t('virtual_private_cloud');\n },\n },\n {\n service: 'dcg',\n get label() {\n return t('DCG');\n },\n namespace: 'QCE/DCG',\n href: 'https://cloud.tencent.com/document/product/248/45072',\n get groupName() {\n return t('virtual_private_cloud');\n },\n },\n {\n service: 'ceipSummary',\n get label() {\n return t('CEIP_SUMMARY');\n },\n namespace: 'QCE/CEIP_SUMMARY',\n href: 'https://cloud.tencent.com/document/product/248/50381',\n get groupName() {\n return t('virtual_private_cloud');\n },\n },\n {\n service: 'vpcNetDetect',\n get label() {\n return t('VPC_NET_DETECT');\n },\n namespace: 'QCE/VPC_NET_DETECT',\n href: 'https://cloud.tencent.com/document/product/248/50384',\n get groupName() {\n return t('virtual_private_cloud');\n },\n },\n {\n service: 'vbc',\n get label() {\n return t('VBC');\n },\n namespace: 'QCE/VBC',\n href: 'https://cloud.tencent.com/document/product/248/45073',\n get groupName() {\n return t('virtual_private_cloud');\n },\n },\n {\n service: 'lb',\n get label() {\n return t('LB');\n },\n namespace: 'QCE/LB',\n href: 'https://cloud.tencent.com/document/product/248/45099',\n get groupName() {\n return t('virtual_private_cloud');\n },\n },\n {\n service: 'lbPublic',\n get label() {\n return t('LB_PUBLIC');\n },\n namespace: 'QCE/LB_PUBLIC',\n href: 'https://cloud.tencent.com/document/product/248/51898',\n get groupName() {\n return `${t('cloud_load_balancer')}(${t('multi_scene')})`;\n },\n },\n {\n service: 'lbPrivate',\n get label() {\n return t('LB_PRIVATE');\n },\n namespace: 'QCE/LB_PRIVATE',\n href: 'https://cloud.tencent.com/document/product/248/51899',\n get groupName() {\n return `${t('cloud_load_balancer')}(${t('multi_scene')})`;\n },\n },\n {\n service: 'loadBalance',\n get label() {\n return t('LOADBALANCE');\n },\n namespace: 'QCE/LOADBALANCE',\n href: 'https://cloud.tencent.com/document/product/248/51901',\n get groupName() {\n return `${t('cloud_load_balancer')}(${t('multi_scene')})`;\n },\n },\n {\n service: 'vClb',\n get label() {\n return `${t('cloud_load_balancer')}(${t('lite')})`;\n },\n namespace: 'QCE/V_CLB',\n href: 'https://cloud.tencent.com/document/product/248/51901',\n get groupName() {\n return `${t('cloud_load_balancer')}(${t('lite')})`;\n },\n },\n {\n service: 'cdn',\n get label() {\n return t('CDN');\n },\n namespace: 'QCE/CDN',\n hideRegion: true,\n href: 'https://cloud.tencent.com/document/product/248/50386',\n get groupName() {\n return t('content_delivery_network');\n },\n },\n {\n service: 'cdnProvince',\n get label() {\n return t('CDN_LOG_DATA');\n },\n namespace: 'QCE/CDN_LOG_DATA',\n hideRegion: true,\n href: 'https://cloud.tencent.com/document/product/248/50388',\n get groupName() {\n return t('content_delivery_network');\n },\n },\n {\n service: 'ovCdn',\n get label() {\n return t('OV_CDN');\n },\n namespace: 'QCE/OV_CDN',\n hideRegion: true,\n href: 'https://cloud.tencent.com/document/product/248/50387',\n get groupName() {\n return t('content_delivery_network');\n },\n },\n {\n service: 'scf',\n get label() {\n return t('SCF_V2');\n },\n namespace: 'QCE/SCF_V2',\n href: 'https://cloud.tencent.com/document/product/248/45130',\n },\n {\n service: 'cfs',\n get label() {\n return t('CFS');\n },\n namespace: 'QCE/CFS',\n href: 'https://cloud.tencent.com/document/product/248/45143',\n },\n {\n service: 'cos',\n get label() {\n return t('COS');\n },\n namespace: 'QCE/COS',\n href: 'https://cloud.tencent.com/document/product/248/45140',\n },\n {\n service: 'ckafka',\n get label() {\n return t('CKAFKA');\n },\n namespace: 'QCE/CKAFKA',\n href: 'https://cloud.tencent.com/document/product/248/45121',\n get groupName() {\n return t('message_queue');\n },\n },\n {\n service: 'cmq',\n get label() {\n return t('CMQ');\n },\n namespace: 'QCE/CMQ',\n href: 'https://cloud.tencent.com/document/product/248/45114',\n get groupName() {\n return t('message_queue');\n },\n },\n {\n service: 'cmqTopic',\n get label() {\n return t('CMQTOPIC');\n },\n namespace: 'QCE/CMQTOPIC',\n href: 'https://cloud.tencent.com/document/product/248/45113',\n get groupName() {\n return t('message_queue');\n },\n },\n {\n service: 'tdmq',\n get label() {\n return t('TDMQ');\n },\n namespace: 'QCE/TDMQ',\n href: 'https://cloud.tencent.com/document/product/248/51450',\n get groupName() {\n return t('message_queue');\n },\n },\n {\n service: 'tdmqRocketmq',\n get label() {\n return t('TDMQ_ROCKETMQ');\n },\n namespace: 'QCE/ROCKETMQ',\n href: 'https://cloud.tencent.com/document/product/248/51450',\n get groupName() {\n return t('message_queue');\n },\n },\n {\n service: 'tdmqRabbitmq',\n get label() {\n return t('TDMQ_RABBITMQ');\n },\n namespace: 'QCE/RABBITMQ',\n href: 'https://cloud.tencent.com/document/product/248/51450',\n get groupName() {\n return t('message_queue');\n },\n },\n {\n service: 'dcx',\n get label() {\n return t('DCX');\n },\n namespace: 'QCE/DCX',\n href: 'https://cloud.tencent.com/document/product/248/45101',\n get groupName() {\n return t('direct_connect');\n },\n },\n {\n service: 'dc',\n get label() {\n return t('DC');\n },\n namespace: 'QCE/DC',\n href: 'https://cloud.tencent.com/document/product/248/45102',\n get groupName() {\n return t('direct_connect');\n },\n },\n {\n service: 'cpm',\n get label() {\n return t('CPM');\n },\n namespace: 'QCE/CPM',\n href: 'https://cloud.tencent.com/document/product/248/45881',\n get groupName() {\n return t('cloud_physical_machine');\n },\n },\n {\n service: 'bmPcx',\n get label() {\n return t('BM_PCX');\n },\n namespace: 'QCE/BM_PCX',\n href: 'https://cloud.tencent.com/document/product/248/45884',\n get groupName() {\n return t('cloud_physical_machine');\n },\n },\n {\n service: 'bmLb',\n get label() {\n return t('BM_LB');\n },\n namespace: 'QCE/BM_LB',\n href: 'https://cloud.tencent.com/document/product/248/45886',\n get groupName() {\n return t('cloud_physical_machine');\n },\n },\n {\n service: 'bmIntraLb',\n get label() {\n return t('BM_INTRA_LB');\n },\n namespace: 'QCE/BM_INTRA_LB',\n href: 'https://cloud.tencent.com/document/product/248/45885',\n get groupName() {\n return t('cloud_physical_machine');\n },\n },\n {\n service: 'ces',\n get label() {\n return t('CES');\n },\n namespace: 'QCE/CES',\n href: 'https://cloud.tencent.com/document/product/248/45129',\n },\n {\n service: 'mrHDFS',\n get label() {\n return `${t('elastic_mapReduce')}(HDFS)`;\n },\n namespace: 'QCE/TXMR_HDFS',\n href: 'https://cloud.tencent.com/document/product/248/44797',\n get groupName() {\n return t('elastic_mapReduce');\n },\n },\n {\n service: 'mrHBASE',\n get label() {\n return `${t('elastic_mapReduce')}(HBASE)`;\n },\n namespace: 'QCE/TXMR_HBASE',\n href: 'https://cloud.tencent.com/document/product/248/45567',\n get groupName() {\n return t('elastic_mapReduce');\n },\n },\n {\n service: 'mrHIVE',\n get label() {\n return `${t('elastic_mapReduce')}(HIVE)`;\n },\n namespace: 'QCE/TXMR_HIVE',\n href: 'https://cloud.tencent.com/document/product/248/45569',\n get groupName() {\n return t('elastic_mapReduce');\n },\n },\n {\n service: 'mrNODE',\n get label() {\n return `${t('elastic_mapReduce')}(NODE)`;\n },\n namespace: 'QCE/TXMR_NODE',\n href: 'https://cloud.tencent.com/document/product/248/45570',\n get groupName() {\n return t('elastic_mapReduce');\n },\n },\n {\n service: 'mrPRESTO',\n get label() {\n return `${t('elastic_mapReduce')}(PRESTO)`;\n },\n namespace: 'QCE/TXMR_PRESTO',\n href: 'https://cloud.tencent.com/document/product/248/45571',\n get groupName() {\n return t('elastic_mapReduce');\n },\n },\n {\n service: 'mrSPARK',\n get label() {\n return `${t('elastic_mapReduce')}(SPARK)`;\n },\n namespace: 'QCE/TXMR_SPARK',\n href: 'https://cloud.tencent.com/document/product/248/45572',\n get groupName() {\n return t('elastic_mapReduce');\n },\n },\n {\n service: 'mrYARN',\n get label() {\n return `${t('elastic_mapReduce')}(YARN)`;\n },\n namespace: 'QCE/TXMR_YARN',\n href: 'https://cloud.tencent.com/document/product/248/45573',\n get groupName() {\n return t('elastic_mapReduce');\n },\n },\n {\n service: 'mrZOOKEEPER',\n get label() {\n return `${t('elastic_mapReduce')}(ZOOKEEPER)`;\n },\n namespace: 'QCE/TXMR_ZOOKEEPER',\n href: 'https://cloud.tencent.com/document/product/248/45574',\n get groupName() {\n return t('elastic_mapReduce');\n },\n },\n {\n service: 'cbs',\n get label() {\n return t('BLOCK_STORAGE');\n },\n namespace: 'QCE/BLOCK_STORAGE',\n href: 'https://cloud.tencent.com/document/product/362/2345',\n },\n {\n service: 'apigateway',\n get label() {\n return t('APIGATEWAY');\n },\n namespace: 'QCE/APIGATEWAY',\n href: 'https://cloud.tencent.com/document/product/248/45127',\n },\n {\n service: 'qaap',\n get label() {\n return t('QAAP');\n },\n namespace: 'QCE/QAAP',\n href: 'https://cloud.tencent.com/document/product/608',\n },\n {\n service: 'ecm',\n get label() {\n return t('ECM');\n },\n hideRegion: true,\n namespace: 'QCE/ECM',\n href: 'https://cloud.tencent.com/document/product/1108',\n get groupName() {\n return t('edge_computing_machine');\n },\n },\n {\n service: 'ecmBlockStorage',\n get label() {\n return t('ECM_BLOCK_STORAGE');\n },\n hideRegion: true,\n namespace: 'QCE/ECM_BLOCK_STORAGE',\n href: 'https://cloud.tencent.com/document/product/1108',\n get groupName() {\n return t('edge_computing_machine');\n },\n },\n {\n service: 'ecmLb',\n get label() {\n return t('ECM_LB');\n },\n hideRegion: true,\n namespace: 'QCE/ECM_LB',\n href: 'https://cloud.tencent.com/document/product/1108',\n get groupName() {\n return t('edge_computing_machine');\n },\n },\n {\n service: 'gse',\n get label() {\n return t('GSE');\n },\n namespace: 'QCE/GSE',\n href: 'https://cloud.tencent.com/document/product/1165',\n },\n {\n service: 'cls',\n get label() {\n return t('CLS');\n },\n namespace: 'QCE/CLS',\n href: 'https://cloud.tencent.com/document/product/614',\n },\n {\n service: 'tke',\n get label() {\n return t('TKE');\n },\n namespace: 'QCE/TKE2',\n href: 'https://cloud.tencent.com/document/product/457',\n },\n {\n service: 'ecdn',\n get label() {\n return t('ECDN');\n },\n namespace: 'QCE/DSA',\n href: 'https://cloud.tencent.com/document/product/570',\n },\n // {\n // service: 'lighthouse',\n // label: '轻量应用服务器(LIGHTHOUSE)',\n // namespace: 'QCE/LIGHTHOUSE',\n // href: 'https://cloud.tencent.com/document/product/1207',\n // },\n // {\n // service: 'tsf',\n // label: ' 微服务平台(TSF)',\n // namespace: 'QCE/TSF',\n // href: 'https://cloud.tencent.com/document/product/649',\n // },\n {\n service: 'waf',\n get label() {\n return t('WAF');\n },\n // hideRegion: true,\n namespace: 'QCE/WAF',\n href: 'https://cloud.tencent.com/document/product/627',\n },\n];\nconst Datasources = {};\nconst InitStates = {};\nconst InstanceAliasList = {};\nconst GetInstanceQueryParams = {};\n\n/**\n * 由于目录命名不规范,导致需要使用额外逻辑保证正确性。从目录到具体service的映射\n */\nconst hackModuleName = {\n // lb_loadBalance: 'loadBalance',\n postgresql: 'postgres',\n mongodb: 'mongoDB',\n clb: ['lbPrivate', 'lbPublic', 'loadBalance'],\n mr: ['mrHDFS', 'mrHBASE', 'mrHIVE', 'mrNODE', 'mrPRESTO', 'mrSPARK', 'mrYARN', 'mrZOOKEEPER'],\n};\n\nconst requireModule = (require as any).context('./', true, /^\\.\\/[a-zA-Z]\\w+\\/(datasource)|(query(_def)?)\\.ts$/);\n\nrequireModule.keys().forEach((filePath) => {\n let [, moduleName, fileName] = filePath.split('/');\n\n // hack: 这里是由于产品目录命名不规范,所以才会多这么一段代码\n moduleName = hackModuleName[moduleName] ?? moduleName;\n\n // 目录与模块的映射关系,不管是一对一还是一对多,均按数组进行统一处理\n [].concat(moduleName).forEach((module: string) => {\n // 这个service就是产品配置中的service,需要注意这里的service是根据目录名称算出来的,因此目录名称一定要和service对应\n const service = module.replace(/_([a-zA-Z])/g, (_, b) => b.toUpperCase());\n const prefix = service.toUpperCase(); // 命名规则\n\n // datasource\n if (fileName === 'datasource.ts') {\n const Cls = require(`${filePath}`).default;\n\n // 想办法为实例注入service,不能为prototype或则类本身注入,因为会造成互相污染,详尽mrDatasource\n Datasources[`${prefix}Datasource`] = class {\n constructor(...params) {\n const target = new Cls(...params, service);\n target.service = service;\n // eslint-disable-next-line no-constructor-return\n return target;\n }\n };\n }\n // query\n if (fileName === 'query.ts') {\n require(`${filePath}`);\n }\n // query_def\n if (fileName === 'query_def.ts') {\n const alias = `${prefix}InstanceAliasList`;\n const getParams = `${prefix}GetInstanceQueryParams`;\n\n const target = require(`${filePath}`);\n\n InitStates[service] = target.default; // FIXME: 这里需不需要深拷贝?\n InstanceAliasList[alias] = target[alias] ?? target['InstanceAliasList'];\n GetInstanceQueryParams[getParams] = target[getParams] ?? target['GetInstanceQueryParams'];\n }\n });\n});\n\nexport {\n InitStates as InitServiceState,\n SERVICES,\n Datasources,\n InstanceAliasList,\n GetInstanceQueryParams,\n // DefaultDimensions\n};\n\n// console.log(Datasources, InitStates, InstanceAliasList, GetInstanceQueryParams);\n","// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service)\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/ECM_BLOCK_STORAGE';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'ecmBlockStorageQuery';\n\nconst ECMBLOCKSTORAGEInvalidDemensions = {\n uuid: 'UUID',\n diskId: 'DiskId',\n};\n\n// 需和文件名对应\nconst ECMBLOCKSTORAGEInstanceAliasList = ['InstanceId', 'InstanceName'];\n\nconst templateQueryIdMap = {\n instance: 'InstanceId',\n diskId: 'DiskId',\n};\n\n// select类型需要注意是{},multi后缀是[],dropdown是''\nconst ECMBLOCKSTORAGEFilterFields = {\n Limit: 20,\n Offset: 0,\n 'zone-name': [],\n 'module-id': [],\n 'module-name': [],\n 'instance-id': [],\n 'instance-name': [],\n 'ip-address': [],\n 'instance-uuid': [],\n 'instance-state': {},\n 'internet-service-provider': [],\n 'instance-family': [],\n 'image-id': [],\n 'vpc-id': [],\n 'subnet-id': [],\n};\n\nconst ECMBLOCKSTORAGEFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'zone-name',\n enDescriptor: 'zone-name',\n cnDescriptor: '排列顺序',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'module-id',\n enDescriptor: 'module-id',\n cnDescriptor: '模块ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'module-name',\n enDescriptor: 'module-name',\n cnDescriptor: '模块名称',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'instance-id',\n enDescriptor: 'instance-id',\n cnDescriptor: '实例ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'instance-name',\n enDescriptor: 'instance-name',\n cnDescriptor: '实例名称',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'ip-address',\n enDescriptor: 'ip-address',\n cnDescriptor: '内网/公网IP',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'instance-uuid',\n enDescriptor: 'instance-uuid',\n cnDescriptor: '实例uuid',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'instance-state',\n enDescriptor: 'instance-state',\n cnDescriptor: '实例状态',\n link: '',\n type: 'select',\n multiple: true,\n list: [\n { text: '创建中', value: 'PENDING' },\n { text: '创建失败', value: 'LAUNCH_FAILED' },\n { text: '运行中', value: 'RUNNING' },\n { text: '关机', value: 'STOPPED' },\n { text: '开机中', value: 'STARTING' },\n { text: '关机中', value: 'STOPPING' },\n { text: '重启中', value: 'REBOOTING' },\n { text: '停止待销毁', value: 'SHUTDOWN' },\n { text: '销毁中', value: 'TERMINATING' },\n ],\n },\n {\n key: 'internet-service-provider',\n enDescriptor: 'internet-service-provider',\n cnDescriptor: '公网IP所属的运营商',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'instance-family',\n enDescriptor: 'instance-family',\n cnDescriptor: '机型family',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'image-id',\n enDescriptor: 'image-id',\n cnDescriptor: '镜像ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'vpc-id',\n enDescriptor: 'vpc-id',\n cnDescriptor: '实例的vpc id',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'subnet-id',\n enDescriptor: 'subnet-id',\n cnDescriptor: '实例的subnet id',\n link: '',\n type: 'inputMulti',\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/1108/42565',\n namespace,\n fieldDescriptor: ECMBLOCKSTORAGEFilterFieldsDescriptor,\n};\n\nconst ECMBLOCKSTORAGE_STATE = {\n region: 'ap-guangzhou',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'InstanceId',\n diskId: '',\n queries: ECMBLOCKSTORAGEFilterFields,\n};\n\n// 需要缓存到storage的内容的key列表\nconst keyInStorage = {\n diskId: 'diskId',\n};\n/*\n如果有InstanceId额外的维度,原则上都需要传入此map结构配置\nkey的含义:\n 经过InvalidDemensions处理后的string。topicId =》TopicId。\n 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId\nvalue的含义:\n 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、\n 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。\n 默认取通过InvalidDemsion处理后的key\n 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。\n 即:templateQueryIdMap中内容。\n 联合上面2的内容筛选出原始sourceMap\n*/\nconst queryMonitorExtraConfg = {\n DiskId: {\n dim_KeyInStorage: keyInStorage.diskId,\n dim_KeyInTarget: 'diskId',\n dim_KeyInMap: templateQueryIdMap.diskId,\n },\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, true);\n}\nexport default ECMBLOCKSTORAGE_STATE;\nexport {\n ECMBLOCKSTORAGEFilterFieldsDescriptor,\n templateQueryIdMap,\n ECMBLOCKSTORAGEInstanceAliasList,\n ECMBLOCKSTORAGEInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n keyInStorage,\n queryMonitorExtraConfg,\n // 对应产品的service的全大写拼接GetInstanceQueryParams\n GetInstanceQueryParams as ECMBLOCKSTORAGEGetInstanceQueryParams,\n};\n","module.exports = __WEBPACK_EXTERNAL_MODULE__22__;","// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service)\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/APIGATEWAY';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'apigatewayQuery';\n\nconst APIGATEWAYInvalidDemensions = {\n serviceId: 'ServiceId',\n environmentName: 'EnvironmentName',\n apiid: 'Apiid',\n apiId: 'Apiid',\n};\n\n// 需和文件名对应\nconst APIGATEWAYInstanceAliasList = ['ServiceId', 'ServiceName'];\n\nconst templateQueryIdMap = {\n instance: 'ServiceId',\n environmentName: 'EnvironmentName',\n};\n\n// 需要缓存到storage的内容的key列表\nconst keyInStorage = {\n environmentList: 'EnvironmentList',\n};\n/*\n如果有InstanceId额外的维度,原则上都需要传入此map结构配置\nkey的含义:\n 经过InvalidDemensions处理后的string。topicId =》TopicId。\n 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId\nvalue的含义:\n 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、\n 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。\n 默认取通过InvalidDemsion处理后的key\n 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。\n 即:templateQueryIdMap中内容。\n 联合上面2的内容筛选出原始sourceMap\n*/\nconst queryMonitorExtraConfg = {\n EnvironmentName: {\n dim_KeyInStorage: keyInStorage.environmentList,\n dim_KeyInTarget: 'EnvironmentName',\n dim_KeyInMap: templateQueryIdMap.environmentName,\n },\n};\n// select类型需要注意是{},multi后缀是[],dropdown是''\nconst APIGATEWAYFilterFields = {\n Limit: 20,\n Offset: 0,\n ServiceId: [],\n ServiceName: [],\n NotUsagePlanId: [],\n Environment: [],\n IpVersion: [],\n};\n\nconst APIGATEWAYFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'ServiceId',\n enDescriptor: 'ServiceId',\n cnDescriptor: '服务id',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'ServiceName',\n enDescriptor: 'ServiceName',\n cnDescriptor: '服务名称',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'NotUsagePlanId',\n enDescriptor: 'NotUsagePlanId',\n cnDescriptor: 'NotUsagePlanId',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'Environment',\n enDescriptor: 'Environment',\n cnDescriptor: '环境名称',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'IpVersion',\n enDescriptor: 'IpVersion',\n cnDescriptor: 'IP版本',\n link: '',\n type: 'inputMulti',\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/628/45198',\n namespace,\n fieldDescriptor: APIGATEWAYFilterFieldsDescriptor,\n};\n\nconst APIGATEWAY_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'ServiceId',\n EnvironmentName: '',\n queries: APIGATEWAYFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, true);\n}\n// regions for dropdown\nconst regionSupported = [\n { value: 'ap-beijing' },\n { value: 'ap-chengdu' },\n { value: 'ap-chongqing' },\n { value: 'ap-guangzhou' },\n { value: 'ap-hongkong' },\n { value: 'ap-mumbai' },\n { value: 'ap-nanjing' },\n { value: 'ap-shanghai' },\n { value: 'ap-shanghai-fsi' },\n { value: 'ap-shenzhen-fsi' },\n { value: 'ap-singapore' },\n { value: 'ap-tokyo' },\n { value: 'eu-frankfurt' },\n { value: 'na-ashburn' },\n { value: 'na-siliconvalley' },\n { value: 'na-toronto' },\n];\nexport default APIGATEWAY_STATE;\nexport {\n APIGATEWAYFilterFieldsDescriptor,\n templateQueryIdMap,\n APIGATEWAYInstanceAliasList,\n APIGATEWAYInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n regionSupported,\n queryMonitorExtraConfg,\n keyInStorage,\n // 对应产品的service的全大写拼接GetInstanceQueryParams\n GetInstanceQueryParams as APIGATEWAYGetInstanceQueryParams,\n};\n","import _ from 'lodash';\n\nexport const InstanceQueryDescriptor = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputnumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为10,最小值为1,最大值为100',\n link: '',\n type: 'inputnumber',\n min: 1,\n max: 100,\n },\n {\n key: 'InstanceIds',\n enDescriptor: 'InstanceIds',\n cnDescriptor: '按照一个或者多个实例ID查询。实例ID形如: emr-xxxxxxxx ',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'OrderField',\n enDescriptor: 'OrderBy',\n cnDescriptor: '排序字段',\n link: '',\n type: 'select',\n list: [\n { text: '实例ID', value: 'clusterId' },\n { text: '创建时间', value: 'addTime' },\n { text: '状态', value: 'status' },\n ],\n },\n {\n key: 'Asc',\n enDescriptor: 'Order Direction',\n cnDescriptor: '排序方式',\n link: '',\n type: 'select',\n list: [\n { text: '降序', value: 0 },\n { text: '升序', value: 1 },\n ],\n },\n {\n key: 'ProjectId',\n enDescriptor: 'ProjectId',\n cnDescriptor: '实例所属项目ID',\n link: '',\n type: 'inputnumber',\n },\n {\n key: 'DisplayStrategy',\n enDescriptor: 'DisplayStrategy',\n cnDescriptor: '集群筛选策略',\n link: '',\n type: 'select',\n list: [\n { text: '未销毁的实例', value: 'clusterList' },\n { text: '正常运行的实例', value: 'monitorManage' },\n ],\n },\n];\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n queries = _.omit(queries, ['Offset', 'Limit']);\n _.forEach(queries, (item: any, key) => {\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n params[key] = _.uniq(item);\n }\n } else if (_.isObject(item)) {\n if (_.isNumber(_.get(item, 'value', undefined)) || !_.isEmpty(_.get(item, 'value', undefined))) {\n params[key] = _.get(item, 'value');\n }\n } else if (_.isNumber(item) || !_.isEmpty(item)) {\n params[key] = item;\n }\n });\n }\n return params;\n}\n\n// 向实例里面塞dimensions对应的值,dimension中的key对应到实例中的key\nexport const InvalidDemensions = new Proxy(\n {},\n {\n get(target, k, receiver) {\n if (typeof k === 'string') {\n if (k.startsWith('id4')) return 'ClusterId'; // id4****\n if (k.startsWith('host4')) return 'Ip'; // host4***\n }\n return Reflect.get(target, k, receiver);\n },\n has(target, propKey) {\n return true;\n },\n }\n);\n\nexport const templateQueryIdMap = {\n instance: 'ClusterId',\n node: 'Ip',\n};\n\n// 需要缓存到storage的内容的key列表\nconst keyInStorage = {\n node: 'nodeIP',\n};\n\n/**\n * 如果有InstanceId额外的维度,原则上都需要传入此map结构配置\n *\n * `key` 的含义:\n * 经过InvalidDemensions处理后的string。topicId => TopicId。\n * 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId\n *\n * `value` 的含义:\n * @param {1} dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、\n * @param {2} dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。\n * 默认取通过InvalidDemsion处理后的key\n * @param {3} dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。\n * 即:templateQueryIdMap中内容。\n * 联合上面 2 的内容筛选出原始sourceMap\n */\nconst queryMonitorExtraConfg = {\n Ip: {\n dim_KeyInStorage: keyInStorage.node,\n dim_KeyInTarget: 'nodeIP',\n dim_KeyInMap: templateQueryIdMap.node,\n },\n};\n\n// 与名称挂钩的变量\nconst InstanceAliasList = ['ClusterId', 'ClusterName'];\nexport { InstanceAliasList, GetInstanceQueryParams, queryMonitorExtraConfg, keyInStorage };\n\n// 界面状态模型,default\nexport default {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'ClusterId',\n nodeIP: '',\n queries: {\n Offset: 0,\n Limit: 10,\n DisplayStrategy: '',\n OrderBy: {},\n Order: {},\n InstanceIds: [],\n ProjectId: -1,\n OrderField: '',\n Asc: '',\n },\n};\n","// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service)\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\nimport _ from 'lodash';\n\nconst namespace = 'QCE/V_CLB';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'vClbQuery';\n\nconst VCLBInvalidDemensions = {\n InstanceId: 'LoadBalancerId',\n // vip: 'LoadBalancerVips',\n // loadBalancerPort: 'Port',\n // protocol: 'Protocol',\n};\n\n// 要和文件名方式一致,ceip_summary=>CEIPSUMMARY\nconst VCLBInstanceAliasList = ['LoadBalancerId', 'LoadBalancerVips', 'LoadBalancerName'];\n\nconst templateQueryIdMap = {\n instance: 'LoadBalancerId',\n};\nconst ForwardTypes = [\n { text: '通用的负载均衡', value: 1 },\n { text: '传统的负载均衡', value: 0 },\n];\n\nconst OrderBy = [\n { text: 'LoadBalancerName', value: 'LoadBalancerName' },\n { text: 'CreateTime', value: 'CreateTime' },\n { text: 'Domain', value: 'Domain' },\n { text: 'LoadBalancerType', value: 'LoadBalancerType' },\n];\n\nconst OrderType = [\n { text: '升序', value: 0 },\n { text: '降序', value: 1 },\n];\n\nconst WithRs = [\n { text: '没有绑定后端服务', value: 0 },\n { text: '绑定后端服务', value: 1 },\n { text: '查询全部', value: -1 },\n];\nconst VCLBFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1',\n link: '',\n type: 'inputNumber',\n min: 1,\n },\n {\n key: 'LoadBalancerIds',\n enDescriptor: 'LoadBalancer ID',\n cnDescriptor: '实例ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'LoadBalancerName',\n enDescriptor: 'LoadBalancer Name',\n cnDescriptor: '实例名称',\n link: '',\n type: 'input',\n },\n {\n key: 'Forward',\n enDescriptor: 'Forward',\n cnDescriptor: '负载均衡实例类型',\n link: '',\n type: 'select',\n list: ForwardTypes,\n },\n {\n key: 'Domain',\n enDescriptor: 'Domain',\n cnDescriptor: '域名,腾讯云为负载均衡实例分配的域名,本参数仅对传统型公网负载均衡才有意义',\n link: '',\n type: 'input',\n },\n {\n key: 'LoadBalancerVips',\n enDescriptor: 'LoadBalancer Vips',\n cnDescriptor: '负载均衡实例的 VIP 地址',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'BackendPrivateIps',\n enDescriptor: 'BackendPrivate Ips',\n cnDescriptor: '负载均衡绑定的后端服务的内网 IP',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'BackendPublicIps',\n enDescriptor: 'BackendPublic Ips',\n cnDescriptor: '负载均衡绑定的后端服务的外网 IP',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'ProjectId',\n enDescriptor: 'Project ID',\n cnDescriptor: '负载均衡实例所属的项目 ID',\n link: '',\n type: 'inputNumber',\n },\n {\n key: 'VpcId',\n enDescriptor: 'Vpc ID',\n cnDescriptor: '负载均衡实例所属私有网络',\n link: '',\n type: 'input',\n },\n {\n key: 'SecurityGroup',\n enDescriptor: 'Security Group',\n cnDescriptor: '安全组ID',\n link: '',\n type: 'input',\n },\n {\n key: 'MasterZone',\n enDescriptor: 'Master Zone',\n cnDescriptor: '主可用区ID',\n link: '',\n type: 'input',\n },\n {\n key: 'WithRs',\n enDescriptor: 'WithRs',\n cnDescriptor: '负载均衡是否绑定后端服务',\n link: '',\n type: 'select',\n list: WithRs,\n },\n {\n key: 'OrderBy',\n enDescriptor: 'OrderBy',\n cnDescriptor: '排序字段',\n link: '',\n type: 'select',\n list: OrderBy,\n },\n {\n key: 'OrderType',\n enDescriptor: 'OrderByType',\n cnDescriptor: '排序方式',\n link: '',\n type: 'select',\n list: OrderType,\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/214/30685',\n namespace,\n fieldDescriptor: VCLBFilterFieldsDescriptor,\n};\nconst LBFields = {\n LoadBalancerIds: [],\n Forward: undefined,\n LoadBalancerName: '',\n Domain: '',\n LoadBalancerVips: [],\n BackendPublicIps: [],\n BackendPrivateIps: [],\n Limit: 20,\n Offset: 0,\n ProjectId: undefined,\n WithRs: {},\n VpcId: '',\n SecurityGroup: '',\n MasterZone: '',\n OrderBy: {},\n OrderType: {},\n};\n\nconst VCLB_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'LoadBalancerId',\n Port: '',\n Protocol: '',\n listener: '',\n // listenerAlias: 'ListenerId',\n queries: LBFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, false);\n}\n\n// regions for dropdown\nconst regionSupported = [\n { value: 'ap-bangkok' },\n { value: 'ap-beijing' },\n { value: 'ap-chengdu' },\n { value: 'ap-chongqing' },\n { value: 'ap-guangzhou' },\n { value: 'ap-hongkong' },\n { value: 'ap-jakarta' },\n { value: 'ap-mumbai' },\n { value: 'ap-seoul' },\n { value: 'ap-nanjing' },\n { value: 'ap-shanghai' },\n { value: 'ap-shanghai-fsi' },\n { value: 'ap-shenzhen-fsi' },\n { value: 'ap-singapore' },\n { value: 'ap-tokyo' },\n { value: 'eu-frankfurt' },\n { value: 'eu-moscow' },\n { value: 'na-ashburn' },\n { value: 'na-siliconvalley' },\n { value: 'na-toronto' },\n];\nconst clbNamespaceMap = {\n public: 'QCE/LB_PUBLIC',\n private: 'QCE/LB_PRIVATE',\n};\nfunction modifyDimensons(metricItem: any) {\n const metricTmp = _.cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n item.Dimensions = ['InstanceId'];\n });\n return metricTmp;\n}\nexport default VCLB_STATE;\nexport {\n VCLBFilterFieldsDescriptor,\n templateQueryIdMap,\n VCLBInstanceAliasList,\n VCLBInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n clbNamespaceMap,\n modifyDimensons,\n regionSupported,\n // 对应产品的service的全大写拼接GetInstanceQueryParams\n GetInstanceQueryParams as BMLBGetInstanceQueryParams,\n};\n","import _ from 'lodash';\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/CYNOSDB_MYSQL';\n\n// 按照驼峰方式命名,和SERVICES保持一致,abcDeF会成为angular组件名字\nconst queryEditorName = 'cynosdbMysqlQuery';\n\nconst cynosdbMysqlFilterFields = {\n Limit: 20,\n Offset: 0,\n OrderBy: {},\n OrderByType: {},\n InstanceIds: [],\n DbType: {},\n // Status: '',\n};\n\nconst cynosdbMysqlFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 1000,\n },\n {\n key: 'InstanceIds',\n enDescriptor: 'InstanceIds',\n cnDescriptor: '实例id列表',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'OrderBy',\n enDescriptor: 'OrderBy',\n cnDescriptor: '排序字段',\n link: '',\n type: 'select',\n list: [\n { text: '创建时间', value: 'CREATETIME' },\n { text: '过期时间', value: 'PERIODENDTIME' },\n ],\n },\n {\n key: 'OrderByType',\n enDescriptor: 'OrderByType',\n cnDescriptor: '排序类型',\n link: '',\n type: 'select',\n list: [\n { text: '升序', value: 'ASC' },\n { text: '降序', value: 'DESC' },\n ],\n },\n {\n key: 'DbType',\n enDescriptor: 'DbType',\n cnDescriptor: '引擎类型',\n link: '',\n type: 'select',\n list: [\n { text: 'MYSQL', value: 'MYSQL' },\n { text: 'POSTGRESQL', value: 'POSTGRESQL' },\n ],\n },\n // {\n // key: 'Status',\n // enDescriptor: 'Status',\n // cnDescriptor: '实例状态',\n // link: '',\n // type: 'input',\n // },\n];\n// regions for dropdown\nconst regionSupported = [\n { value: 'ap-beijing' },\n { value: 'ap-guangzhou' },\n { value: 'ap-nanjing' },\n { value: 'ap-shanghai' },\n];\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/1003/48334',\n namespace,\n fieldDescriptor: cynosdbMysqlFilterFieldsDescriptor,\n};\n\nconst CYNOSDB_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'InstanceId',\n queries: cynosdbMysqlFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, false);\n}\n// 和文件名字一样CYNOSDBMYSQL\nconst CYNOSDBMYSQLInstanceAliasList = ['InstanceId', 'InstanceName'];\n\nconst templateQueryIdMap = {\n instance: 'InstanceId',\n};\n\nconst CYNOSDBInvalidDemensions = {\n instanceid: 'InstanceId',\n instanceId: 'InstanceId',\n};\nconst checkKeys = ['instanceId'];\nfunction modifyDimensons(metricItem) {\n const metricTmp = _.cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n item.Dimensions = ['InstanceId'];\n });\n return metricTmp;\n}\n\nexport default CYNOSDB_STATE;\nexport {\n cynosdbMysqlFilterFieldsDescriptor,\n templateQueryIdMap,\n CYNOSDBMYSQLInstanceAliasList,\n CYNOSDBInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n regionSupported,\n modifyDimensons,\n checkKeys,\n // params前缀为service的全大写\n GetInstanceQueryParams as CYNOSDBMYSQLGetInstanceQueryParams,\n};\n","import _ from 'lodash';\n\nexport const SCFQueryDescriptor = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputnumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputnumber',\n min: 1,\n max: 100,\n },\n {\n key: 'SearchKey',\n enDescriptor: 'SearchKey',\n cnDescriptor: '支持FunctionName模糊匹配',\n link: '',\n type: 'input',\n },\n {\n key: 'Namespace',\n enDescriptor: 'Namespace',\n cnDescriptor: '云函数命名空间',\n link: '',\n type: 'input',\n },\n {\n key: 'Description',\n enDescriptor: 'Description',\n cnDescriptor: '函数描述,支持模糊搜索',\n link: '',\n type: 'input',\n },\n {\n key: 'OrderBy',\n enDescriptor: 'OrderBy',\n cnDescriptor: '排序字段',\n link: '',\n type: 'select',\n list: [\n { text: 'AddTime', value: 'AddTime' },\n { text: 'ModTime', value: 'ModTime' },\n { text: 'FunctionName', value: 'FunctionName' },\n ],\n },\n {\n key: 'Order',\n enDescriptor: 'Order Direction',\n cnDescriptor: '排序方式',\n link: '',\n type: 'select',\n list: [\n { text: 'ASC', value: 'ASC' },\n { text: 'DESC', value: 'DESC' },\n ],\n },\n // {\n // key: 'Filters',\n // enDescriptor: 'Filters',\n // cnDescriptor: '按照标签键值对进行过滤',\n // link: '',\n // type: 'dropdownmulti',\n // },\n];\n\nconst SCF_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'FunctionName',\n version: '',\n queries: {\n Offset: 0,\n Limit: 20,\n OrderBy: {},\n Order: {},\n SearchKey: '',\n Namespace: '',\n Description: '',\n // Filters: {},\n },\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n queries = _.omit(queries, ['Offset', 'Limit']);\n _.forEach(queries, (item: any, key) => {\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n params[key] = _.uniq(item);\n }\n } else if (_.isObject(item)) {\n if (_.isNumber(_.get(item, 'value', undefined)) || !_.isEmpty(_.get(item, 'value', undefined))) {\n params[key] = _.get(item, 'value');\n }\n } else if (_.isNumber(item) || !_.isEmpty(item)) {\n params[key] = item;\n }\n });\n }\n return params;\n}\n\nconst SCFInstanceAliasList = ['FunctionId', 'FunctionName'];\n\n// 向实例里面塞dimensions对应的值,dimension中的key对应到实例中的key\nconst SCFInvalidDemensions = {\n functionName: 'FunctionName',\n namespace: 'Namespace',\n version: 'Version',\n};\n\nconst templateQueryIdMap = {\n instance: 'FunctionName',\n version: 'Version',\n};\nconst regionSupported = [\n { value: 'ap-beijing' },\n { value: 'ap-chengdu' },\n { value: 'ap-chongqing' },\n { value: 'ap-guangzhou' },\n { value: 'ap-hongkong' },\n { value: 'ap-mumbai' },\n { value: 'ap-shanghai' },\n { value: 'ap-shanghai-fsi' },\n { value: 'ap-shenzhen-fsi' },\n { value: 'ap-singapore' },\n { value: 'ap-tokyo' },\n { value: 'eu-frankfurt' },\n { value: 'na-siliconvalley' },\n { value: 'na-toronto' },\n];\n// 需要缓存到storage的内容的key列表\nconst keyInStorage = {\n version: 'version',\n};\n/*\n如果有InstanceId额外的维度,原则上都需要传入此map结构配置\nkey的含义:\n 经过InvalidDemensions处理后的string。topicId =》TopicId。\n 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId\nvalue的含义:\n 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、\n 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。\n 默认取通过InvalidDemsion处理后的key\n 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。\n 即:templateQueryIdMap中内容。\n 联合上面2的内容筛选出原始sourceMap\n*/\nconst queryMonitorExtraConfg = {\n Version: {\n dim_KeyInStorage: keyInStorage.version,\n dim_KeyInTarget: 'version',\n dim_KeyInMap: templateQueryIdMap.version,\n },\n};\nexport default SCF_STATE;\nexport {\n SCFInstanceAliasList,\n SCFInvalidDemensions,\n queryMonitorExtraConfg,\n regionSupported,\n templateQueryIdMap,\n keyInStorage,\n GetInstanceQueryParams as SCFGetInstanceQueryParams,\n};\n\n// monitor监控数据默认支持的维度\nexport const SCFDefaultDimensionList = ['functionName', 'namespace', 'version'];\n","// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service)\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\nimport _ from 'lodash';\n\nconst namespace = 'QCE/CLS';\nconst queryEditorName = 'clsQuery';\n\nconst CLSInvalidDemensions = {\n // instanceid: 'TopicId',\n};\n\n// 需和文件名对应\nconst CLSInstanceAliasList = ['TopicId', 'TopicName'];\n\nconst templateQueryIdMap = {\n instance: 'TopicId',\n};\n\n// 需要缓存到storage的内容的key列表\n// const keyInStorage = {\n// fleet: 'fleet', // 实例队列\n// queue: 'queueName', // 会话队列\n// };\n/*\n如果有InstanceId额外的维度,原则上都需要传入此map结构配置\nkey的含义:\n 经过InvalidDemensions处理后的string。topicId =》TopicId。\n 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId\nvalue的含义:\n 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、\n 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。\n 默认取通过InvalidDemsion处理后的key\n 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。\n 即:templateQueryIdMap中内容。\n 联合上面2的内容筛选出原始sourceMap\n*/\n// const queryMonitorExtraConfg = {\n// FleetId: {\n// dim_KeyInStorage: keyInStorage.fleet,\n// dim_KeyInTarget: 'FleetId',\n// dim_KeyInMap: templateQueryIdMap.FleetId,\n// },\n// Name: {\n// dim_KeyInStorage: keyInStorage.queue,\n// dim_KeyInTarget: 'Name',\n// dim_KeyInMap: templateQueryIdMap.Name,\n// },\n// };\n// select类型需要注意是{},multi后缀是[],dropdown是''\nconst CLSFilterFields = {\n Limit: 20,\n Offset: 0,\n topicName: [],\n topicId: [],\n logsetName: [],\n logsetId: [],\n tagKey: [],\n 'tag:tagKey': [],\n storageType: {},\n};\n\nconst CLSFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'topicName',\n enDescriptor: 'topicName',\n cnDescriptor: '日志主题名称',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'topicId',\n enDescriptor: 'topicId',\n cnDescriptor: '日志主题ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'logsetName',\n enDescriptor: 'logsetName',\n cnDescriptor: '日志集名称',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'logsetId',\n enDescriptor: 'logsetId',\n cnDescriptor: '日志集ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'tagKey',\n enDescriptor: 'tagKey',\n cnDescriptor: '标签键',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'tag:tagKey',\n enDescriptor: 'tag - tagKey',\n cnDescriptor: '标签键值对',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'storageType',\n enDescriptor: 'storageType',\n cnDescriptor: '日志主题的存储类型',\n link: '',\n type: 'select',\n list: [\n { text: '实时存储', value: 'hot' },\n { text: '离线存储', value: 'cold' },\n ],\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/614/56454',\n namespace,\n fieldDescriptor: CLSFilterFieldsDescriptor,\n};\n\nconst CLS_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'TopicId',\n uin: '',\n queries: CLSFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, true);\n}\n// regions for dropdown\nconst regionSupported = [\n { value: 'ap-bangkok' },\n { value: 'ap-beijing' },\n { value: 'ap-chengdu' },\n { value: 'ap-chongqing' },\n { value: 'ap-guangzhou' },\n { value: 'ap-hongkong' },\n { value: 'ap-jakarta' },\n { value: 'ap-mumbai' },\n { value: 'ap-seoul' },\n { value: 'ap-nanjing' },\n { value: 'ap-shanghai' },\n { value: 'ap-shanghai-fsi' },\n { value: 'ap-shenzhen-fsi' },\n { value: 'ap-singapore' },\n { value: 'ap-tokyo' },\n { value: 'eu-frankfurt' },\n { value: 'eu-moscow' },\n { value: 'na-ashburn' },\n { value: 'na-siliconvalley' },\n { value: 'na-toronto' },\n];\nfunction modifyDimensons(metricItem: any) {\n const metricTmp = _.cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n // item.Dimensions = item.Dimensions.map((v) => CLSInvalidDemensions[v] || v);\n item.Dimensions = ['uin', 'TopicId'];\n });\n return metricTmp;\n}\nexport default CLS_STATE;\nexport {\n CLSFilterFieldsDescriptor,\n templateQueryIdMap,\n CLSInstanceAliasList,\n CLSInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n regionSupported,\n modifyDimensons,\n // queryMonitorExtraConfg,\n // fleetId,\n // keyInStorage,\n // 对应产品的service的全大写拼接GetInstanceQueryParams\n GetInstanceQueryParams as CLSGetInstanceQueryParams,\n};\n","// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service)\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\nimport _ from 'lodash';\n\nconst namespace = 'QCE/SQLSERVER';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'sqlserverQuery';\n\nconst SQLSERVERInvalidDemensions = {\n resourceId: 'InstanceId',\n};\n\nconst SQLSERVERInstanceAliasList = ['InstanceId', 'Name'];\n\nconst templateQueryIdMap = {\n instance: 'InstanceId',\n};\n\n// select类型需要注意是{},multi后缀是[]\nconst SQLSERVERNETFilterFields = {\n Limit: 20,\n Offset: 0,\n ProjectId: null,\n Status: {},\n InstanceIdSet: [],\n PayMode: {},\n VpcId: '',\n SubnetId: '',\n VipSet: [],\n InstanceNameSet: [],\n VersionSet: [],\n Zone: '',\n};\n\nconst SQLSERVERNETFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'ProjectId',\n enDescriptor: 'ProjectId',\n cnDescriptor: '项目ID',\n link: '',\n type: 'inputNumber',\n },\n {\n key: 'Status',\n enDescriptor: 'Status',\n cnDescriptor: '实例状态',\n link: '',\n type: 'select',\n list: [\n { text: '申请中', value: 1 },\n { text: '运行中', value: 2 },\n { text: '受限运行中 (主备切换中)', value: 3 },\n { text: '已隔离', value: 4 },\n { text: '回收中', value: 5 },\n { text: '已回收', value: 6 },\n { text: '任务执行中', value: 7 },\n { text: '已下线', value: 8 },\n { text: '实例扩容中', value: 9 },\n { text: '实例迁移中', value: 10 },\n { text: '只读', value: 11 },\n { text: '重启中', value: 12 },\n ],\n },\n {\n key: 'InstanceIdSet',\n enDescriptor: 'InstanceIdSet',\n cnDescriptor: '实例ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'PayMode',\n enDescriptor: 'PayMode',\n cnDescriptor: '子网实例ID',\n link: '',\n type: 'select',\n list: [\n { text: '包年包月', value: 1 },\n { text: '按量计费', value: 0 },\n ],\n },\n {\n key: 'VpcId',\n enDescriptor: 'VpcId',\n cnDescriptor: '实例所属VPC的唯一字符串ID',\n link: '',\n type: 'input',\n },\n {\n key: 'SubnetId',\n enDescriptor: 'SubnetId',\n cnDescriptor: '实例所属子网的唯一字符串ID',\n link: '',\n type: 'input',\n },\n {\n key: 'VipSet',\n enDescriptor: 'VipSet',\n cnDescriptor: '实例内网地址列表',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'InstanceNameSet',\n enDescriptor: 'InstanceNameSet',\n cnDescriptor: '实例名称列表, 模糊查询',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'VersionSet',\n enDescriptor: 'VersionSet',\n cnDescriptor: '实例版本代号列表',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'Zone',\n enDescriptor: 'Zone',\n cnDescriptor: '实例可用区',\n link: '',\n type: 'dropdown',\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/238/19969',\n namespace,\n fieldDescriptor: SQLSERVERNETFilterFieldsDescriptor,\n};\n\n// regions for dropdown\nconst regionSupported = [\n { value: 'ap-beijing' },\n { value: 'ap-chengdu' },\n { value: 'ap-chongqing' },\n { value: 'ap-guangzhou' },\n { value: 'ap-hongkong' },\n { value: 'ap-nanjing' },\n { value: 'ap-seoul' },\n { value: 'ap-shanghai' },\n { value: 'ap-shanghai-fsi' },\n { value: 'ap-shenzhen-fsi' },\n { value: 'ap-singapore' },\n { value: 'ap-tokyo' },\n { value: 'eu-moscow' },\n { value: 'na-siliconvalley' },\n];\nconst SQLSERVER_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'InstanceId',\n queries: SQLSERVERNETFilterFields,\n};\n\nfunction modifyDimensons(metricItem) {\n const metricTmp = _.cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n item.Dimensions = ['resourceId'];\n });\n return metricTmp;\n}\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, false);\n}\nexport default SQLSERVER_STATE;\nexport {\n SQLSERVERNETFilterFieldsDescriptor,\n templateQueryIdMap,\n SQLSERVERInstanceAliasList,\n SQLSERVERInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n regionSupported,\n modifyDimensons,\n // 对应产品的service的全大写拼接InstanceQueryParams\n GetInstanceQueryParams as SQLSERVERGetInstanceQueryParams,\n};\n","// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service)\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\nimport _ from 'lodash';\n\nconst namespace = 'QCE/BM_INTRA_LB';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'bmIntraLbQuery';\n\nconst BMINTRALBInvalidDemensions = {\n vip: 'LoadBalancerVips',\n vpcId: 'VpcId',\n};\n\n// 要和文件名方式一致,ceip_summary=>CEIPSUMMARY\nconst BMINTRALBInstanceAliasList = ['LoadBalancerId', 'LoadBalancerVips', 'LoadBalancerName'];\n\nconst templateQueryIdMap = {\n instance: 'LoadBalancerId',\n};\n\n// select类型需要注意是{},multi后缀是[],dropdown是类型\nconst BMINTRALBFilterFields = {\n Limit: 20,\n Offset: 0,\n LoadBalancerIds: [],\n LoadBalancerName: [],\n LoadBalancerVips: [],\n};\n\nconst BMINTRALBFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'LoadBalancerIds',\n enDescriptor: 'LoadBalancerIds',\n cnDescriptor: '负载均衡器ID数组',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'LoadBalancerName',\n enDescriptor: 'LoadBalancerName',\n cnDescriptor: '负载均衡器名称',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'LoadBalancerVips',\n enDescriptor: 'LoadBalancerVips',\n cnDescriptor: '负载均衡获得的公网IP地址',\n link: '',\n type: 'inputMulti',\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/1027/33280',\n namespace,\n fieldDescriptor: BMINTRALBFilterFieldsDescriptor,\n};\n\nconst BMINTRALB_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'LoadBalancerId',\n queries: BMINTRALBFilterFields,\n};\nconst BMLBValidMetricsT = ['Inpkg', 'Outpkg', 'Intraffic', 'Outtraffic', 'Connum', 'Req'];\nfunction isValidMetric(metric) {\n const validMetrics = _.map(BMLBValidMetricsT, _.toUpper);\n return _.indexOf(validMetrics, _.toUpper(metric.MetricName)) !== -1;\n}\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, false);\n}\nexport default BMINTRALB_STATE;\nexport {\n BMINTRALBFilterFieldsDescriptor,\n templateQueryIdMap,\n BMINTRALBInstanceAliasList,\n BMINTRALBInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n isValidMetric,\n // 对应产品的service的全大写拼接GetInstanceQueryParams\n GetInstanceQueryParams as BMINTRALBGetInstanceQueryParams,\n};\n","// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service)\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\nimport _ from 'lodash';\n\nconst namespace = 'QCE/BM_LB';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'bmLbQuery';\n\nconst CPMInvalidDemensions = {\n vip: 'LoadBalancerVips',\n};\n\n// 要和文件名方式一致,ceip_summary=>CEIPSUMMARY\nconst BMLBInstanceAliasList = ['LoadBalancerId', 'LoadBalancerVips', 'LoadBalancerName'];\n\nconst templateQueryIdMap = {\n instance: 'LoadBalancerId',\n};\n\n// select类型需要注意是{},multi后缀是[],dropdown是类型\nconst CPMFilterFields = {\n Limit: 20,\n Offset: 0,\n LoadBalancerIds: [],\n LoadBalancerName: [],\n LoadBalancerVips: [],\n};\n\nconst CPMFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'LoadBalancerIds',\n enDescriptor: 'LoadBalancerIds',\n cnDescriptor: '负载均衡器ID数组',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'LoadBalancerName',\n enDescriptor: 'LoadBalancerName',\n cnDescriptor: '负载均衡器名称',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'LoadBalancerVips',\n enDescriptor: 'LoadBalancerVips',\n cnDescriptor: '负载均衡获得的公网IP地址',\n link: '',\n type: 'inputMulti',\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/1027/33280',\n namespace,\n fieldDescriptor: CPMFilterFieldsDescriptor,\n};\n\nconst CPM_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'LoadBalancerId',\n queries: CPMFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, false);\n}\nconst BMLBValidMetricsT = ['Inpkg', 'Outpkg', 'Intraffic', 'Outtraffic', 'Connum', 'Req'];\nfunction isValidMetric(metric) {\n const validMetrics = _.map(BMLBValidMetricsT, _.toUpper);\n return _.indexOf(validMetrics, _.toUpper(metric.MetricName)) !== -1;\n}\nexport default CPM_STATE;\nexport {\n CPMFilterFieldsDescriptor,\n templateQueryIdMap,\n BMLBInstanceAliasList,\n CPMInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n isValidMetric,\n // 对应产品的service的全大写拼接GetInstanceQueryParams\n GetInstanceQueryParams as BMLBGetInstanceQueryParams,\n};\n","// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service)\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\nimport _ from 'lodash';\n\nconst namespace = 'QCE/BM_PCX';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'bmPcxQuery';\n\nconst BMPCXInvalidDemensions = {\n peeringConnectionId: 'VpcPeerConnectionId',\n};\n\n// 要和文件名方式一致,ceip_summary=>CEIPSUMMARY\nconst BMPCXInstanceAliasList = ['VpcPeerConnectionId', 'VpcPeerConnectionName'];\n\nconst templateQueryIdMap = {\n instance: 'VpcPeerConnectionId',\n};\n\n// select类型需要注意是{},multi后缀是[],dropdown是类型\nconst BMPCXFilterFields = {\n Limit: 20,\n Offset: 0,\n VpcPeerConnectionIds: [],\n};\n\nconst BMPCXFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'VpcPeerConnectionIds',\n enDescriptor: 'VpcPeerConnectionIds',\n cnDescriptor: '对等连接实例ID',\n link: '',\n type: 'inputMulti',\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/product/1024/36903',\n namespace,\n fieldDescriptor: BMPCXFilterFieldsDescriptor,\n};\n\nconst BMPCX_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'VpcPeerConnectionId',\n queries: BMPCXFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, false);\n}\nfunction modifyDimensons(metricItem: any) {\n const metricTmp = _.cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n item.Dimensions = ['peeringConnectionId'];\n });\n return metricTmp;\n}\nexport default BMPCX_STATE;\nexport {\n BMPCXFilterFieldsDescriptor,\n templateQueryIdMap,\n BMPCXInstanceAliasList,\n BMPCXInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n modifyDimensons,\n // 对应产品的service的全大写拼接GetInstanceQueryParams\n GetInstanceQueryParams as BMPCXGetInstanceQueryParams,\n};\n","import * as _ from 'lodash';\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/BLOCK_STORAGE';\nconst queryEditorName = 'cbsQuery';\n\nconst CBSInvalidDemensions = {\n diskId: 'DiskId',\n InstanceId: 'InstanceId',\n diskname: 'DiskName',\n unInstanceId: 'InstanceId',\n};\n\nconst CBSInstanceAliasList = ['DiskId', 'DiskName'];\n\nconst templateQueryIdMap = {\n instance: 'DiskId',\n};\n\n// select类型需要注意是{},multi后缀是[]\nconst CBSFilterFields = {\n Limit: 20,\n Offset: 0,\n DiskIds: [],\n OrderField: [],\n Order: [],\n ReturnBindAutoSnapshotPolicy: false,\n};\n\nconst CBSFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'DiskIds',\n enDescriptor: 'DiskIds',\n cnDescriptor: '云硬盘ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'Order',\n enDescriptor: 'Order',\n cnDescriptor: '排列顺序',\n link: '',\n type: 'select',\n list: [\n { text: '升序排列', value: 'ASC' },\n { text: '降序排列', value: 'DESC' },\n ],\n },\n {\n key: 'OrderField',\n enDescriptor: 'OrderField',\n cnDescriptor: '排序的依据字段',\n link: '',\n type: 'select',\n list: [\n { text: '云盘的创建时间排序', value: 'CREATE_TIME' },\n { text: '云盘的到期时间排序', value: 'DEADLINE' },\n ],\n },\n {\n key: 'ReturnBindAutoSnapshotPolicy',\n enDescriptor: 'ReturnBindAutoSnapshotPolicy',\n cnDescriptor: '否需要返回云盘绑定的定期快照策略ID',\n link: '',\n type: 'switch',\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/362/16315',\n namespace,\n fieldDescriptor: CBSFilterFieldsDescriptor,\n};\n\nconst CBS_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'DiskId',\n queries: CBSFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, false);\n}\nfunction isValidMetric(metricObj: any = {}) {\n const dimension = _.get(metricObj, 'Dimensions[0].Dimensions');\n // console.log('dimension', dimension, dimension.length === 1 && _.indexOf(dimension, 'diskId') !== -1);\n return dimension.length === 1 && _.indexOf(dimension, 'diskId') !== -1;\n}\nexport default CBS_STATE;\nexport {\n CBSFilterFieldsDescriptor,\n templateQueryIdMap,\n CBSInstanceAliasList,\n CBSInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n isValidMetric,\n GetInstanceQueryParams as CBSGetInstanceQueryParams,\n};\n","// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service)\nimport { FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/CDN_LOG_DATA';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'cdnProvinceQuery';\n\nconst CDNPROVINCEInvalidDemensions = {\n domain: 'Domain',\n // isp: 'Isp',\n projectid: 'ProjectId',\n province: 'district',\n appid: 'AppId',\n};\n\n// 需和文件名对应\nconst CDNPROVINCEInstanceAliasList = ['Domain', 'ProjectId'];\n\nconst templateQueryIdMap = {\n instance: 'Domain',\n};\n\n// select类型需要注意是{},multi后缀是[],dropdown是''\nconst CDNPROVINCEFilterFields = {\n Limit: 20,\n Offset: 0,\n origin: [],\n domain: [],\n resourceId: [],\n status: {},\n serviceType: {},\n projectId: [],\n domainType: {},\n fullUrlCache: {},\n https: {},\n originPullProtocol: {},\n tagKey: [],\n};\n\nconst CDNPROVINCEFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'origin',\n enDescriptor: 'origin',\n cnDescriptor: '主源站',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'domain',\n enDescriptor: 'domain',\n cnDescriptor: '域名',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'resourceId',\n enDescriptor: 'resourceId',\n cnDescriptor: '域名id',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'status',\n enDescriptor: 'status',\n cnDescriptor: '域名状态',\n link: '',\n type: 'select',\n list: [\n { text: 'online', value: 'online' },\n { text: 'offline', value: 'offline' },\n { text: 'processing', value: 'processing' },\n ],\n },\n {\n key: 'serviceType',\n enDescriptor: 'serviceType',\n cnDescriptor: '业务类型',\n link: '',\n type: 'select',\n list: [\n { text: 'web', value: 'web' },\n { text: 'download', value: 'download' },\n { text: 'media', value: 'media' },\n ],\n },\n {\n key: 'projectId',\n enDescriptor: 'projectId',\n cnDescriptor: '项目ID',\n link: '',\n type: 'inputNumberMulti',\n },\n {\n key: 'domainType',\n enDescriptor: 'domainType',\n cnDescriptor: '主源站类型',\n link: '',\n type: 'select',\n list: [\n { text: '自有源', value: 'cname' },\n { text: 'cos接入', value: 'cos' },\n ],\n },\n {\n key: 'fullUrlCache',\n enDescriptor: 'fullUrlCache',\n cnDescriptor: '全路径缓存',\n link: '',\n type: 'select',\n list: [\n { text: '打开', value: 'on' },\n { text: '关闭', value: 'off' },\n ],\n },\n {\n key: 'https',\n enDescriptor: 'https',\n cnDescriptor: '是否配置https',\n link: '',\n type: 'select',\n list: [\n { text: 'on', value: 'on' },\n { text: 'off', value: 'off' },\n { text: 'processing', value: 'processing' },\n ],\n },\n {\n key: 'originPullProtocol',\n enDescriptor: 'originPullProtocol',\n cnDescriptor: '回源协议类型',\n link: '',\n type: 'select',\n list: [\n { text: 'http', value: 'http' },\n { text: 'follow', value: 'follow' },\n { text: 'https', value: 'https' },\n ],\n },\n {\n key: 'tagKey',\n enDescriptor: 'tagKey',\n cnDescriptor: '标签键',\n link: '',\n type: 'inputMulti',\n },\n];\n\nconst CDNPROVINCE_STATE = {\n region: 'ap-guangzhou',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'Domain',\n // Isp Province分别在两个接口,单独保存在state\n isp: '',\n district: '',\n queries: CDNPROVINCEFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, true);\n}\n// const regionSupported = [\n// { text: '华北地区(北京)', value: 'ap-beijing' },\n// { text: '西南地区(成都)', value: 'ap-chengdu' },\n// { text: '西南地区(重庆)', value: 'ap-chongqing' },\n// { text: '华南地区(广州)', value: 'ap-guangzhou' },\n// { text: '港澳台地区(中国香港)', value: 'ap-hongkong' },\n// { text: '亚太南部(孟买)', value: 'ap-mumbai' },\n// { text: '华东地区(南京)', value: 'ap-nanjing' },\n// { text: '华东地区(上海)', value: 'ap-shanghai' },\n// { text: '华东地区(上海金融)', value: 'ap-shanghai-fsi' },\n// { text: '华南地区(深圳金融)', value: 'ap-shenzhen-fsi' },\n// { text: '亚太东南(新加坡)', value: 'ap-singapore' },\n// { text: '亚太东北(东京)', value: 'ap-tokyo' },\n// { text: '欧洲地区(法兰克福)', value: 'eu-frankfurt' },\n// { text: '美国东部(弗吉尼亚)', value: 'na-ashburn' },\n// { text: '美国西部(硅谷)', value: 'na-siliconvalley' },\n// { text: '北美地区(多伦多)', value: 'na-toronto' },\n// ];\nexport default CDNPROVINCE_STATE;\nexport {\n CDNPROVINCEFilterFieldsDescriptor,\n templateQueryIdMap,\n CDNPROVINCEInstanceAliasList,\n CDNPROVINCEInvalidDemensions,\n namespace,\n queryEditorName,\n // regionSupported,\n // 对应产品的service的全大写拼接GetInstanceQueryParams\n GetInstanceQueryParams as CDNPROVINCEGetInstanceQueryParams,\n};\n","import _ from 'lodash';\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/CEIP_SUMMARY';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'ceipSummaryQuery';\n\nconst CEIPInvalidDemensions = {\n vip: 'AddressIp',\n eip: 'AddressIp',\n};\n\n// 要和文件名方式一致,ceip_summary=>CEIPSUMMARY\nconst CEIPSUMMARYInstanceAliasList = ['AddressId', 'AddressName', 'AddressIp'];\n\nconst templateQueryIdMap = {\n instance: 'AddressId',\n};\n\n// select类型需要注意是{},multi后缀是[]\nconst CEIPFilterFields = {\n Limit: 20,\n Offset: 0,\n 'address-id': [],\n 'address-name': [],\n 'address-ip': [],\n 'address-status': {},\n 'is-arrears': {},\n 'address-isp': {},\n 'instance-id': [],\n 'private-ip-address': [],\n 'network-interface-id': [],\n};\n\nconst CEIPFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'address-id',\n enDescriptor: 'address-id',\n cnDescriptor: ' EIP 的唯一 ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'address-name',\n enDescriptor: 'address-name',\n cnDescriptor: 'EIP 名称',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'address-ip',\n enDescriptor: 'address-ip',\n cnDescriptor: 'EIP 的 IP 地址',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'address-status',\n enDescriptor: 'address-status',\n cnDescriptor: 'EIP 的状态',\n link: '',\n type: 'select',\n multiple: true,\n list: [\n { text: 'CREATING', value: 'CREATING' },\n { text: 'BINDING', value: 'BINDING' },\n { text: 'BIND', value: 'BIND' },\n { text: 'UNBINDING', value: 'UNBINDING' },\n { text: 'UNBIND', value: 'UNBIND' },\n { text: 'OFFLINING', value: 'OFFLINING' },\n { text: 'BIND_ENI', value: 'BIND_ENI' },\n ],\n },\n {\n key: 'instance-id',\n enDescriptor: 'instance-id',\n cnDescriptor: 'EIP 绑定的实例 ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'private-ip-address',\n enDescriptor: 'private-ip-address',\n cnDescriptor: 'EIP 绑定的内网 IP ',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'network-interface-id',\n enDescriptor: 'network-interface-id',\n cnDescriptor: ' EIP 绑定的弹性网卡 ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'is-arrears',\n enDescriptor: 'is-arrears',\n cnDescriptor: 'EIP 是否欠费',\n link: '',\n type: 'select',\n multiple: true,\n list: [\n { text: '欠费状态', value: 'TRUE' },\n { text: '费用状态正常', value: 'FALSE' },\n ],\n },\n {\n key: 'address-isp',\n enDescriptor: 'address-isp',\n cnDescriptor: '运营商类型',\n link: '',\n type: 'select',\n multiple: true,\n list: [\n { text: 'BGP', value: 'BGP' },\n { text: 'CMCC', value: 'CMCC' },\n { text: 'CUCC', value: 'CUCC' },\n { text: 'CTCC', value: 'CTCC' },\n ],\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/215/16702',\n namespace,\n fieldDescriptor: CEIPFilterFieldsDescriptor,\n};\n\nconst CEIP_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'AddressId',\n queries: CEIPFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, true);\n}\nfunction modifyDimensons(metricItem: any) {\n const metricTmp = _.cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n item.Dimensions = ['eip'];\n });\n return metricTmp;\n}\nexport default CEIP_STATE;\nexport {\n CEIPFilterFieldsDescriptor,\n templateQueryIdMap,\n CEIPSUMMARYInstanceAliasList,\n CEIPInvalidDemensions,\n namespace,\n queryEditorName,\n modifyDimensons,\n queryEditorConfig,\n GetInstanceQueryParams as CEIPSUMMARYGetInstanceQueryParams,\n};\n","import _ from 'lodash';\nimport { FildDescriptorType } from '../_base/types';\n\nexport const InstanceQueryDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为10,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 50,\n },\n {\n key: 'TopicName',\n enDescriptor: 'TopicName',\n cnDescriptor: '精确匹配TopicName',\n link: '',\n type: 'input',\n },\n {\n key: 'TagKey',\n enDescriptor: 'TagKey',\n cnDescriptor: '标签搜索',\n link: '',\n type: 'input',\n },\n];\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n queries = _.omit(queries, ['Offset', 'Limit']);\n _.forEach(queries, (item: any, key) => {\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n params[key] = _.uniq(item);\n }\n } else if (_.isObject(item)) {\n if (_.isNumber(_.get(item, 'value', undefined)) || !_.isEmpty(_.get(item, 'value', undefined))) {\n params[key] = _.get(item, 'value');\n }\n } else if (_.isNumber(item) || !_.isEmpty(item)) {\n params[key] = item;\n }\n });\n }\n return params;\n}\n\n// 向实例里面塞dimensions对应的值,dimension中的key对应到实例中的key\nexport const InvalidDemensions = {\n topicId: 'TopicId',\n};\n\n// 因为cmq那边,以TopciName为主键\nexport const templateQueryIdMap = {\n instance: 'TopicName',\n subscription: 'SubscriptionId',\n};\n\n// 需要缓存到storage的内容的key列表\nconst keyInStorage = {\n subscriptionId: 'subscriptionId',\n};\n/*\n如果有InstanceId额外的维度,原则上都需要传入此map结构配置\nkey的含义:\n 经过InvalidDemensions处理后的string。topicId =》TopicId。\n 否则认为指标中维度正确,和指标中维度字段保持一致,即topicId\nvalue的含义:\n 1 dim_KeyInStorage 指标中维度dimension对应的storage中的key,获取缓存列表,sourceMapList、\n 2 dim_KeyInTarget 通过getVariable方法获取变量中选中项。比如ListnerId为Lis-xxxx;即:STATE中的key。\n 默认取通过InvalidDemsion处理后的key\n 3 dim_KeyInMap 保存在模板变量value比如(监听器ID)源自sourceMapList(接口返回内容)的哪个key(ListenerId)。\n 即:templateQueryIdMap中内容。\n 联合上面2的内容筛选出原始sourceMap\n*/\nconst queryMonitorExtraConfg = {\n subscriptionId: {\n dim_KeyInStorage: keyInStorage.subscriptionId,\n dim_KeyInTarget: 'subscriptionId',\n dim_KeyInMap: templateQueryIdMap.subscription,\n },\n};\n// 与名称挂钩的变量\nconst InstanceAliasList = ['TopicName', 'TopicId'];\nexport { InstanceAliasList, GetInstanceQueryParams, queryMonitorExtraConfg, keyInStorage };\n\n// 界面状态模型,default\nexport default {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'TopicName',\n subscriptionId: '',\n queries: {\n Offset: 0,\n Limit: 20,\n TopicName: '',\n TagKey: '',\n },\n};\n","// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service)\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\nimport _ from 'lodash';\n\nconst namespace = 'QCE/CPM';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'cpmQuery';\n\nconst CPMInvalidDemensions = {\n instanceId: 'InstanceId',\n // uniqid: 'InstanceId',\n};\n\nconst CPMInstanceAliasList = ['InstanceId', 'Name'];\n\nconst templateQueryIdMap = {\n instance: 'InstanceId',\n};\n\n// select类型需要注意是{},multi后缀是[],dropdown是''\nconst CPMFilterFields = {\n Limit: 20,\n Offset: 0,\n DeviceClassCode: '',\n InstanceIds: [],\n WanIps: [],\n LanIps: [],\n Alias: '',\n VagueIp: '',\n AutoRenewFlag: {},\n VpcId: '',\n SubnetId: '',\n DeviceType: {},\n IsLuckyDevice: {},\n};\n\nconst CPMFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'DeviceClassCode',\n enDescriptor: 'DeviceClassCode',\n cnDescriptor: '机型ID',\n link: '',\n type: 'dropdown',\n },\n {\n key: 'InstanceIds',\n enDescriptor: 'InstanceIds',\n cnDescriptor: '设备ID数组',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'WanIps',\n enDescriptor: 'WanIps',\n cnDescriptor: '外网IP数组',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'LanIps',\n enDescriptor: 'LanIps',\n cnDescriptor: '内网IP数组',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'Alias',\n enDescriptor: 'Alias',\n cnDescriptor: '设备名称',\n link: '',\n type: 'input',\n },\n {\n key: 'VagueIp',\n enDescriptor: 'VagueIp',\n cnDescriptor: '模糊IP查询',\n link: '',\n type: 'input',\n },\n {\n key: 'AutoRenewFlag',\n enDescriptor: 'AutoRenewFlag',\n cnDescriptor: '自动续费标志',\n link: '',\n type: 'select',\n list: [\n { text: '不自动续费', value: 0 },\n { text: '自动续费', value: 1 },\n ],\n },\n {\n key: 'VpcId',\n enDescriptor: 'VpcId',\n cnDescriptor: '私有网络唯一ID',\n link: '',\n type: 'input',\n },\n {\n key: 'SubnetId',\n enDescriptor: 'SubnetId',\n cnDescriptor: '子网唯一ID',\n link: '',\n type: 'input',\n },\n {\n key: 'DeviceType',\n enDescriptor: 'DeviceType',\n cnDescriptor: '子网实例ID',\n link: '',\n type: 'select',\n list: [\n { text: '计算型', value: 'compute' },\n { text: '标准型', value: 'standard' },\n { text: '存储型', value: 'storage' },\n ],\n },\n {\n key: 'IsLuckyDevice',\n enDescriptor: 'IsLuckyDevice',\n cnDescriptor: '竞价实例机器过滤',\n link: '',\n type: 'select',\n list: [\n { text: '非竞价实例机器', value: 0 },\n { text: '竞价实例的机器', value: 1 },\n ],\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/386/32904',\n namespace,\n fieldDescriptor: CPMFilterFieldsDescriptor,\n};\n\nconst CPM_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'InstanceId',\n queries: CPMFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, false);\n}\n\nfunction modifyDimensons(metricItem: any) {\n const metricTmp = _.cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n item.Dimensions = ['instanceId'];\n });\n return metricTmp;\n}\nexport default CPM_STATE;\nexport {\n CPMFilterFieldsDescriptor,\n templateQueryIdMap,\n CPMInstanceAliasList,\n CPMInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n modifyDimensons,\n // 对应产品的service的全大写拼接GetInstanceQueryParams\n GetInstanceQueryParams as CPMGetInstanceQueryParams,\n};\n","import { cloneDeep, compact, forEach, get, isArray, isEmpty, isObject, omit, uniq } from 'lodash';\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\n\nconst namespace = 'QCE/DSA';\nconst queryEditorName = 'ecdnQuery';\n\nconst ECDNInstanceAliasList = ['Domain'];\n\nconst templateQueryIdMap = {\n instance: 'Domain',\n};\n\nconst ECDNInvalidDemensions = {\n domain: 'Domain',\n projectid: 'ProjectId',\n};\n\nconst ECDN_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'Domain',\n queries: {\n Limit: 100,\n Offset: 0,\n origin: [],\n domain: [],\n resourceId: [],\n status: [],\n disable: [],\n projectId: [],\n fullUrlCache: [],\n https: [],\n originPullProtocol: [],\n area: [],\n tagKey: [],\n },\n};\n\nconst ECDNFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'origin',\n enDescriptor: 'Origin',\n cnDescriptor: '主源站',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'domain',\n enDescriptor: 'Domain',\n cnDescriptor: '域名',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'resourceId',\n enDescriptor: 'ResourceId',\n cnDescriptor: '域名id',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'status',\n enDescriptor: 'Status',\n cnDescriptor: '域名状态',\n link: '',\n type: 'select',\n list: [\n { text: 'online', value: 'online' },\n { text: 'offline', value: 'offline' },\n { text: 'processing', value: 'processing' },\n ],\n },\n {\n key: 'disable',\n enDescriptor: 'Disable',\n cnDescriptor: '域名封禁状态',\n link: '',\n type: 'select',\n list: [\n { text: 'normal', value: 'normal' },\n { text: 'unlicensed', value: 'unlicensed' },\n ],\n },\n {\n key: 'projectId',\n enDescriptor: 'ProjectId',\n cnDescriptor: '项目ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'fullUrlCache',\n enDescriptor: 'FullUrlCache',\n cnDescriptor: '全路径缓存',\n link: '',\n type: 'select',\n list: [\n { text: 'on', value: 'on' },\n { text: 'off', value: 'off' },\n ],\n },\n {\n key: 'https',\n enDescriptor: 'Https',\n cnDescriptor: '是否配置https',\n link: '',\n type: 'select',\n list: [\n { text: 'on', value: 'on' },\n { text: 'off', value: 'off' },\n { text: 'processing', value: 'processing' },\n ],\n },\n {\n key: 'originPullProtocol',\n enDescriptor: 'OriginPullProtocol',\n cnDescriptor: '回源协议类型',\n link: '',\n type: 'select',\n list: [\n { text: 'http', value: 'http' },\n { text: 'https', value: 'https' },\n { text: 'follow', value: 'follow' },\n ],\n },\n {\n key: 'area',\n enDescriptor: 'Area',\n cnDescriptor: '加速区域',\n link: '',\n type: 'select',\n list: [\n { text: 'mainland', value: 'mainland' },\n { text: 'overseas', value: 'overseas' },\n { text: 'global', value: 'global' },\n ],\n },\n {\n key: 'tagKey',\n enDescriptor: 'TagKey',\n cnDescriptor: '标签键',\n link: '',\n type: 'inputMulti',\n },\n];\n\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/570/42462',\n namespace,\n fieldDescriptor: ECDNFilterFieldsDescriptor,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!isEmpty(queries)) {\n params.Limit = get(queries, 'Limit', 20) || 20;\n params.Offset = get(queries, 'Offset', 0) || 0;\n const _queries = omit(queries, ['Offset', 'Limit']);\n const Filters: any[] = [];\n forEach(_queries, (item: any, key) => {\n if (isArray(item)) {\n item = compact(item);\n if (item.length > 0) {\n Filters.push({ Name: key, Value: uniq(item).slice(0, 5) });\n }\n } else if (isObject(item)) {\n if (!isEmpty(get(item, 'value', []))) {\n Filters.push({ Name: key, Value: [get(item, 'value', [])].slice(0, 5) });\n }\n }\n });\n if (Filters.length > 0) {\n params.Filters = Filters.map((item) => {\n if (item.Name === 'domain') {\n return { ...item, Fuzzy: true };\n }\n return item;\n });\n return params;\n }\n }\n return params;\n}\n\nfunction modifyDimensons(metricItem) {\n const metricTmp = cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n item.Dimensions = ['domain', 'projectid'];\n });\n return metricTmp;\n}\n\nexport default ECDN_STATE;\n\nexport {\n ECDNFilterFieldsDescriptor,\n templateQueryIdMap,\n ECDNInstanceAliasList,\n ECDNInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n modifyDimensons,\n GetInstanceQueryParams as ECDNGetInstanceQueryParams,\n};\n","import * as _ from 'lodash';\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/ECM';\nconst queryEditorName = 'ecmQuery';\n\nconst ECMInvalidDemensions = {\n // diskId: 'InstanceId',\n uuid: 'UUID',\n // unInstanceId: 'InstanceId',\n};\n\nconst ECMInstanceAliasList = ['InstanceId', 'InstanceName'];\n\nconst templateQueryIdMap = {\n instance: 'InstanceId',\n};\n\n// select类型需要注意是{},multi后缀是[]\nconst ECMFilterFields = {\n Limit: 20,\n Offset: 0,\n zone: [],\n 'zone-name': [],\n 'module-id': [],\n 'module-name': [],\n 'instance-id': [],\n 'instance-name': [],\n 'ip-address': [],\n 'instance-uuid': [],\n 'instance-state': {},\n 'internet-service-provider': [],\n 'instance-family': [],\n 'image-id': [],\n 'vpc-id': [],\n 'subnet-id': [],\n};\n\nconst ECMFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'zone',\n enDescriptor: 'zone',\n cnDescriptor: '可用区英文标识',\n link: '',\n type: 'dropdownMulti',\n },\n {\n key: 'zone-name',\n enDescriptor: 'zone-name',\n cnDescriptor: '排列顺序',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'module-id',\n enDescriptor: 'module-id',\n cnDescriptor: '模块ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'module-name',\n enDescriptor: 'module-name',\n cnDescriptor: '模块名称',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'instance-id',\n enDescriptor: 'instance-id',\n cnDescriptor: '实例ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'instance-name',\n enDescriptor: 'instance-name',\n cnDescriptor: '实例名称',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'ip-address',\n enDescriptor: 'ip-address',\n cnDescriptor: '内网/公网IP',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'instance-uuid',\n enDescriptor: 'instance-uuid',\n cnDescriptor: '实例uuid',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'instance-state',\n enDescriptor: 'instance-state',\n cnDescriptor: '实例状态',\n link: '',\n type: 'select',\n multiple: true,\n list: [\n { text: '创建中', value: 'PENDING' },\n { text: '创建失败', value: 'LAUNCH_FAILED' },\n { text: '运行中', value: 'RUNNING' },\n { text: '关机', value: 'STOPPED' },\n { text: '开机中', value: 'STARTING' },\n { text: '关机中', value: 'STOPPING' },\n { text: '重启中', value: 'REBOOTING' },\n { text: '停止待销毁', value: 'SHUTDOWN' },\n { text: '销毁中', value: 'TERMINATING' },\n ],\n },\n {\n key: 'internet-service-provider',\n enDescriptor: 'internet-service-provider',\n cnDescriptor: '公网IP所属的运营商',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'instance-family',\n enDescriptor: 'instance-family',\n cnDescriptor: '机型family',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'image-id',\n enDescriptor: 'image-id',\n cnDescriptor: '镜像ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'vpc-id',\n enDescriptor: 'vpc-id',\n cnDescriptor: '实例的vpc id',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'subnet-id',\n enDescriptor: 'subnet-id',\n cnDescriptor: '实例的subnet id',\n link: '',\n type: 'inputMulti',\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/1108/42565',\n namespace,\n fieldDescriptor: ECMFilterFieldsDescriptor,\n};\n\nconst ECM_STATE = {\n region: 'ap-guangzhou',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'InstanceId',\n queries: ECMFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, true);\n}\n// function isValidMetric(metricObj: any = {}) {\n// const dimension = _.get(metricObj, 'Dimensions[0].Dimensions');\n// // console.log('dimension', dimension, dimension.length === 1 && _.indexOf(dimension, 'diskId') !== -1);\n// return dimension.length === 1 &&( _.indexOf(dimension, 'UUID') !== -1 || _.indexOf(dimension, 'uuid') !== -1);\n// }\n\nfunction modifyDimensons(metricItem: any) {\n const metricTmp = _.cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n item.Dimensions = ['UUID'];\n });\n return metricTmp;\n}\nexport default ECM_STATE;\nexport {\n ECMFilterFieldsDescriptor,\n templateQueryIdMap,\n ECMInstanceAliasList,\n ECMInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n modifyDimensons,\n GetInstanceQueryParams as ECMGetInstanceQueryParams,\n};\n","import _ from 'lodash';\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\nconst namespace = 'QCE/POSTGRES';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'postgresQuery';\n\nconst PostgresFields = {\n 'db-instance-id': [],\n 'db-instance-name': [],\n};\n\nconst PostgresFieldsDescriptor: FildDescriptorType = [\n {\n key: 'db-instance-id',\n enDescriptor: 'DB Instance ID',\n cnDescriptor: 'DB 实例ID',\n link: '',\n type: 'inputMulti',\n min: 0,\n },\n {\n key: 'db-instance-name',\n enDescriptor: 'DB Instance Name',\n cnDescriptor: 'DB 实例名称',\n link: '',\n type: 'inputMulti',\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/409/16773',\n namespace,\n fieldDescriptor: PostgresFieldsDescriptor,\n};\nconst POSTGRESInstanceAliasList = ['DBInstanceId', 'DBInstanceName'];\n\nconst POSTGRES_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'DBInstanceId',\n queries: {\n Limit: 20,\n Offset: 0,\n Filters: { ...PostgresFields },\n },\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, true);\n}\nfunction modifyDimensons(metricItem: any) {\n const metricTmp = _.cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n item.Dimensions = ['resourceId'];\n });\n return metricTmp;\n}\nconst PostgreInvalidDemensions = {\n uid: 'DBInstanceId',\n resourceId: 'DBInstanceId',\n};\nconst templateQueryIdMap = {\n instance: 'DBInstanceId',\n};\nexport default POSTGRES_STATE;\n\nexport {\n PostgresFieldsDescriptor,\n POSTGRESInstanceAliasList,\n templateQueryIdMap,\n modifyDimensons,\n namespace,\n queryEditorName,\n queryEditorConfig,\n PostgreInvalidDemensions,\n GetInstanceQueryParams as POSTGRESGetInstanceQueryParams,\n};\n","import _ from 'lodash';\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/VPC_NET_DETECT';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'vpcNetDetectQuery';\n\nconst VPCNETInvalidDemensions = {\n netdetectid: 'NetDetectId',\n netDetectId: 'NetDetectId',\n};\n\nconst VPCNETDETECTInstanceAliasList = ['NetDetectId', 'NetDetectName'];\n\nconst templateQueryIdMap = {\n instance: 'NetDetectId',\n};\n\n// select类型需要注意是{},multi后缀是[]\nconst VPCNETFilterFields = {\n Limit: 20,\n Offset: 0,\n 'vpc-id': [],\n 'net-detect-id': [],\n 'subnet-id': [],\n 'net-detect-name': [],\n};\n\nconst VPCNETFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'vpc-id',\n enDescriptor: 'vpc-id',\n cnDescriptor: 'VPC实例ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'net-detect-id',\n enDescriptor: 'net-detect-id',\n cnDescriptor: '网络探测实例ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'subnet-id',\n enDescriptor: 'subnet-id',\n cnDescriptor: '子网实例ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'net-detect-name',\n enDescriptor: 'net-detect-name',\n cnDescriptor: '网络探测名称',\n link: '',\n type: 'inputMulti',\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/215/38696',\n namespace,\n fieldDescriptor: VPCNETFilterFieldsDescriptor,\n};\n\nconst VPCNET_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'NetDetectId',\n queries: VPCNETFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, true);\n}\nfunction modifyDimensons(metricItem: any) {\n const metricTmp = _.cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n item.Dimensions = ['netDetectId'];\n });\n return metricTmp;\n}\nexport default VPCNET_STATE;\nexport {\n VPCNETFilterFieldsDescriptor,\n templateQueryIdMap,\n VPCNETDETECTInstanceAliasList,\n VPCNETInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n modifyDimensons,\n GetInstanceQueryParams as VPCNETDETECTGetInstanceQueryParams,\n};\n","import * as _ from 'lodash';\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/WAF';\nconst queryEditorName = 'wafQuery';\nconst WAFFilterFields = {\n Limit: 20,\n Offset: 0,\n origin: [],\n domain: [],\n resourceId: [],\n status: {},\n serviceType: {},\n projectId: [],\n domainType: {},\n fullUrlCache: {},\n https: {},\n originPullProtocol: {},\n tagKey: [],\n};\n\nconst WAFFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'origin',\n enDescriptor: 'origin',\n cnDescriptor: '主源站',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'domain',\n enDescriptor: 'domain',\n cnDescriptor: '域名',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'resourceId',\n enDescriptor: 'resourceId',\n cnDescriptor: '域名id',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'status',\n enDescriptor: 'status',\n cnDescriptor: '域名状态',\n link: '',\n type: 'select',\n list: [\n { text: 'online', value: 'online' },\n { text: 'offline', value: 'offline' },\n { text: 'processing', value: 'processing' },\n ],\n },\n {\n key: 'serviceType',\n enDescriptor: 'serviceType',\n cnDescriptor: '业务类型',\n link: '',\n type: 'select',\n list: [\n { text: 'web', value: 'web' },\n { text: 'download', value: 'download' },\n { text: 'media', value: 'media' },\n ],\n },\n {\n key: 'projectId',\n enDescriptor: 'projectId',\n cnDescriptor: '项目ID',\n link: '',\n type: 'inputNumberMulti',\n },\n {\n key: 'domainType',\n enDescriptor: 'domainType',\n cnDescriptor: '主源站类型',\n link: '',\n type: 'select',\n list: [\n { text: '自有源', value: 'cname' },\n { text: 'cos接入', value: 'cos' },\n ],\n },\n {\n key: 'fullUrlCache',\n enDescriptor: 'fullUrlCache',\n cnDescriptor: '全路径缓存',\n link: '',\n type: 'select',\n list: [\n { text: '打开', value: 'on' },\n { text: '关闭', value: 'off' },\n ],\n },\n {\n key: 'https',\n enDescriptor: 'https',\n cnDescriptor: '是否配置https',\n link: '',\n type: 'select',\n list: [\n { text: 'on', value: 'on' },\n { text: 'off', value: 'off' },\n { text: 'processing', value: 'processing' },\n ],\n },\n {\n key: 'originPullProtocol',\n enDescriptor: 'originPullProtocol',\n cnDescriptor: '回源协议类型',\n link: '',\n type: 'select',\n list: [\n { text: 'http', value: 'http' },\n { text: 'follow', value: 'follow' },\n { text: 'https', value: 'https' },\n ],\n },\n {\n key: 'tagKey',\n enDescriptor: 'tagKey',\n cnDescriptor: '标签键',\n link: '',\n type: 'inputMulti',\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/228/41118',\n namespace,\n fieldDescriptor: WAFFilterFieldsDescriptor,\n};\nconst WAF_STATE = {\n region: 'ap-guangzhou',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'Domain',\n queries: WAFFilterFields,\n};\nconst regionSupported = [\n { value: 'ap-beijing' },\n { value: 'ap-chengdu' },\n { value: 'ap-chongqing' },\n { value: 'ap-guangzhou' },\n { value: 'ap-hongkong' },\n { value: 'ap-nanjing' },\n { value: 'ap-shanghai' },\n { value: 'ap-shanghai-fsi' },\n { value: 'ap-seoul' },\n { value: 'ap-singapore' },\n];\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, true);\n}\n\nconst WAFInstanceAliasList = ['Domain', 'ProjectId'];\n\nconst WAFInvalidDemensions = {\n projectId: 'ProjectId',\n domain: 'Domain',\n};\nconst templateQueryIdMap = {\n instance: 'Domain',\n};\nexport default WAF_STATE;\nexport {\n WAFFilterFieldsDescriptor,\n templateQueryIdMap,\n WAFInstanceAliasList,\n WAFInvalidDemensions,\n namespace,\n regionSupported,\n queryEditorName,\n queryEditorConfig,\n GetInstanceQueryParams as WAFGetInstanceQueryParams,\n};\n","import _ from 'lodash';\n\nconst InstanceTypes = [\n { text: '主实例', value: 1 },\n { text: '备灾实例', value: 2 },\n { text: '只读实例', value: 3 },\n];\n\nconst Status = [\n { text: '创建中', value: 0 },\n { text: '运行中', value: 1 },\n { text: '隔离中', value: 4 },\n { text: '已隔离', value: 5 },\n];\n\nconst PayTypes = [\n { text: '包年包月', value: 0 },\n { text: '小时计费', value: 1 },\n];\n\nconst TaskStatus = [\n { text: '没有任务', value: 0 },\n { text: '升级中', value: 1 },\n { text: '数据导入中', value: 2 },\n { text: '开放Slave中', value: 3 },\n { text: '外网访问开通中', value: 4 },\n { text: '批量操作执行中', value: 5 },\n { text: '回档中', value: 6 },\n { text: '外网访问关闭中', value: 7 },\n { text: '密码修改中', value: 8 },\n { text: '实例名修改中', value: 9 },\n { text: '重启中', value: 10 },\n { text: '自建迁移中', value: 12 },\n { text: '删除库表中', value: 13 },\n { text: '灾备实例创建同步中', value: 14 },\n { text: '升级待切换', value: 15 },\n { text: '升级切换中', value: 16 },\n { text: '升级切换完成', value: 17 },\n];\n\nconst EngineVersions = [\n { text: '5.1', value: '5.1' },\n { text: '5.5', value: '5.5' },\n { text: '5.6', value: '5.6' },\n { text: '5.7', value: '5.7' },\n];\n\nconst OrderBy = [\n { text: 'InstanceId', value: 'InstanceId' },\n { text: 'InstanceName', value: 'InstanceName' },\n { text: 'CreateTime', value: 'CreateTime' },\n { text: 'DeadlineTime', value: 'DeadlineTime' },\n];\n\nconst OrderDirection = [\n { text: 'ASC', value: 'ASC' },\n { text: 'DESC', value: 'DESC' },\n];\n\nconst InitFlag = [\n { text: '未初始化', value: 0 },\n { text: '初始化', value: 1 },\n];\n\nconst CdbErrors = [\n { text: '未锁定', value: 0 },\n { text: '锁定', value: 1 },\n];\n\nconst CDBFields = {\n ProjectId: '',\n InstanceTypes: {},\n Vips: [],\n Status: {},\n Offset: 0,\n Limit: 20,\n SecurityGroupId: '',\n PayTypes: {},\n InstanceNames: [],\n TaskStatus: {},\n EngineVersions: {},\n VpcIds: [],\n ZoneIds: [],\n SubnetIds: [],\n CdbErrors: {},\n OrderBy: {},\n OrderDirection: {},\n InstanceIds: [],\n InitFlag: {},\n};\n\nconst CDBFieldsDescriptor = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputnumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputnumber',\n min: 1,\n max: 100,\n },\n {\n key: 'InstanceNames',\n enDescriptor: 'Instance Name',\n cnDescriptor: '实例名称',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'InstanceIds',\n enDescriptor: 'Instance ID',\n cnDescriptor: '实例ID',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'ZoneIds',\n enDescriptor: 'Zone ID',\n cnDescriptor: '可用区的ID',\n link: '',\n type: 'dropdownmulti',\n },\n {\n key: 'InstanceTypes',\n enDescriptor: 'Instance Type',\n cnDescriptor: '实例类型',\n link: '',\n multiple: true,\n type: 'select',\n list: InstanceTypes,\n },\n {\n key: 'EngineVersions',\n enDescriptor: 'Engine Version',\n cnDescriptor: '实例数据库引擎版本',\n link: '',\n multiple: true,\n type: 'select',\n list: EngineVersions,\n },\n {\n key: 'TaskStatus',\n enDescriptor: 'Task Status',\n cnDescriptor: '实例任务',\n link: '',\n multiple: true,\n type: 'select',\n list: TaskStatus,\n },\n {\n key: 'InitFlag',\n enDescriptor: 'Init Flag',\n cnDescriptor: '实例初始化状态',\n link: '',\n multiple: true,\n type: 'select',\n list: InitFlag,\n },\n {\n key: 'PayTypes',\n enDescriptor: 'Pay Type',\n cnDescriptor: '付费类型',\n link: '',\n multiple: true,\n type: 'select',\n list: PayTypes,\n },\n {\n key: 'CdbErrors',\n enDescriptor: 'CDB Errors',\n cnDescriptor: '实例锁定标记',\n link: '',\n multiple: true,\n type: 'select',\n list: CdbErrors,\n },\n {\n key: 'Status',\n enDescriptor: 'Status',\n cnDescriptor: '实例状态',\n link: '',\n multiple: true,\n type: 'select',\n list: Status,\n },\n {\n key: 'OrderBy',\n enDescriptor: 'OrderBy',\n cnDescriptor: '排序字段',\n link: '',\n type: 'select',\n list: OrderBy,\n },\n {\n key: 'OrderDirection',\n enDescriptor: 'Order Direction',\n cnDescriptor: '排序方式',\n link: '',\n type: 'select',\n list: OrderDirection,\n },\n {\n key: 'Vips',\n enDescriptor: 'Vip',\n cnDescriptor: '实例内网IP地址',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'VpcIds',\n enDescriptor: 'Vpc ID',\n cnDescriptor: '私有网络ID',\n link: 'https://cloud.tencent.com/document/api/215/15778',\n type: 'inputmulti',\n },\n {\n key: 'SubnetIds',\n enDescriptor: 'Subnet ID',\n cnDescriptor: '子网ID',\n link: 'https://cloud.tencent.com/document/api/215/15784',\n type: 'inputmulti',\n },\n {\n key: 'ProjectId',\n enDescriptor: 'Project ID',\n cnDescriptor: '项目ID',\n link: 'https://cloud.tencent.com/document/product/378/4400',\n type: 'input',\n },\n {\n key: 'SecurityGroupId',\n enDescriptor: 'Security Group ID',\n cnDescriptor: '安全组ID',\n link: 'https://cloud.tencent.com/document/api/236/15854',\n type: 'input',\n },\n];\n\nconst CDB_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'InstanceId',\n queries: { ...CDBFields },\n};\n\nconst CDBInstanceAliasList = ['InstanceId', 'InstanceName', 'Vip'];\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n queries = _.omit(queries, ['Offset', 'Limit']);\n _.forEach(queries, (item: any, key) => {\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n params[key] = _.uniq(item);\n }\n } else if (_.isObject(item)) {\n if (_.isNumber(_.get(item, 'value', undefined)) || !_.isEmpty(_.get(item, 'value', undefined))) {\n params[key] = _.get(item, 'value');\n }\n } else if (_.isNumber(item) || !_.isEmpty(item)) {\n params[key] = item;\n }\n });\n }\n return params;\n}\nfunction isValidMetric(metricObj: any = {}) {\n const dimension = _.get(metricObj, 'Dimensions[0].Dimensions');\n return (\n dimension.length === 2 &&\n ((_.indexOf(dimension, 'instanceid') !== -1 && _.indexOf(dimension, 'insttype') !== -1) ||\n (_.indexOf(dimension, 'InstanceId') !== -1 && _.indexOf(dimension, 'InstanceType') !== -1))\n );\n}\nfunction modifyDimensons(metricItem: any) {\n const metricTmp = _.cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n item.Dimensions = item.Dimensions.map((i) => CDBInvalidDemensions[i] || i);\n });\n return metricTmp;\n}\nconst CDBInvalidDemensions = {\n instanceid: 'InstanceId',\n insttype: 'InstanceType',\n region: 'Region',\n};\nconst templateQueryIdMap = {\n instance: 'InstanceId',\n};\nexport default CDB_STATE;\n\nexport {\n CDBFieldsDescriptor,\n CDBInstanceAliasList,\n templateQueryIdMap,\n CDBInvalidDemensions,\n isValidMetric,\n modifyDimensons,\n GetInstanceQueryParams as CDBGetInstanceQueryParams,\n};\n","// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service)\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/CES';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'cesQuery';\n\nconst CESInvalidDemensions = {\n uInstanceId: 'InstanceId',\n};\n\nconst CESInstanceAliasList = ['InstanceId', 'InstanceName'];\n\nconst templateQueryIdMap = {\n instance: 'InstanceId',\n};\n\n// select类型需要注意是{},multi后缀是[],dropdown是类型\nconst CESFilterFields = {\n Limit: 20,\n Offset: 0,\n InstanceIds: [],\n InstanceNames: [],\n OrderByKey: {},\n OrderByType: {},\n IpList: [],\n};\n\nconst CESFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'InstanceIds',\n enDescriptor: 'InstanceIds',\n cnDescriptor: '集群实例ID列表',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'InstanceNames',\n enDescriptor: 'InstanceNames',\n cnDescriptor: '集群实例名称列表',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'OrderByKey',\n enDescriptor: 'OrderByKey',\n cnDescriptor: '排序字段',\n link: '',\n type: 'select',\n list: [\n { text: '实例ID', value: 1 },\n { text: '实例名称', value: 2 },\n { text: '可用区', value: 3 },\n { text: '创建时间', value: 4 },\n ],\n },\n {\n key: 'OrderByType',\n enDescriptor: 'OrderByType',\n cnDescriptor: '排序方式',\n link: '',\n type: 'select',\n list: [\n { text: '升序', value: 0 },\n { text: '降序', value: 1 },\n ],\n },\n {\n key: 'IpList',\n enDescriptor: 'IpList',\n cnDescriptor: '私有网络vip列表',\n link: '',\n type: 'inputMulti',\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/845/30631',\n namespace,\n fieldDescriptor: CESFilterFieldsDescriptor,\n};\n\nconst CES_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'InstanceId',\n queries: CESFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, false);\n}\nexport default CES_STATE;\nexport {\n CESFilterFieldsDescriptor,\n templateQueryIdMap,\n CESInstanceAliasList,\n CESInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n // 对应产品的service的全大写拼接GetInstanceQueryParams\n GetInstanceQueryParams as CESGetInstanceQueryParams,\n};\n","import _ from 'lodash';\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/DC';\nconst queryEditorName = 'dcQuery';\n\nconst DCFilterFields = {\n Limit: 20,\n Offset: 0,\n DirectConnectIds: [],\n};\n\nconst DCFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'DirectConnectIds',\n enDescriptor: 'DirectConnectIds',\n cnDescriptor: '物理专线 ID',\n link: '',\n type: 'inputMulti',\n },\n];\n\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/216/34826',\n namespace,\n fieldDescriptor: DCFilterFieldsDescriptor,\n};\n\nconst DC_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'DirectConnectId',\n queries: DCFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, false);\n}\n\nconst DCInstanceAliasList = ['DirectConnectId', 'DirectConnectName'];\n\nconst templateQueryIdMap = {\n instance: 'DirectConnectId',\n};\n\nconst DCInvalidDemensions = {\n directConnectId: 'DirectConnectId',\n directconnectid: 'DirectConnectId',\n};\nfunction modifyDimensons(metricItem) {\n const metricTmp = _.cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n item.Dimensions = ['directConnectId'];\n });\n return metricTmp;\n}\nexport default DC_STATE;\nexport {\n DCFilterFieldsDescriptor,\n templateQueryIdMap,\n DCInstanceAliasList,\n DCInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n modifyDimensons,\n GetInstanceQueryParams as DCGetInstanceQueryParams,\n};\n","import _ from 'lodash';\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/DCG';\nconst queryEditorName = 'dcgQuery';\n\nconst DCGInvalidDemensions = {\n directConnectGatewayId: 'DirectConnectGatewayId',\n};\n\nconst DCGInstanceAliasList = ['DirectConnectGatewayId', 'DirectConnectGatewayName'];\n\nconst templateQueryIdMap = {\n instance: 'DirectConnectGatewayId',\n};\n\n// select类型需要注意是{},multi后缀是[]\nconst DCGFilterFields = {\n Limit: 20,\n Offset: 0,\n 'direct-connect-gateway-id': [],\n 'direct-connect-gateway-name': [],\n 'direct-connect-gateway-ip': [],\n 'gateway-type': {},\n 'network-type': {},\n 'ccn-id': [],\n 'vpc-id': [],\n};\n\nconst DCGFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'direct-connect-gateway-id',\n enDescriptor: 'direct-connect-gateway-id',\n cnDescriptor: '专线网关唯一ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'direct-connect-gateway-name',\n enDescriptor: 'direct-connect-gateway-name',\n cnDescriptor: '专线网关名称',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'direct-connect-gateway-ip',\n enDescriptor: 'direct-connect-gateway-ip',\n cnDescriptor: '专线网关IP',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'gateway-type',\n enDescriptor: 'gateway-type',\n cnDescriptor: '网关类型',\n link: '',\n type: 'select',\n multiple: true,\n list: [\n { text: '普通型', value: 'NORMAL' },\n { text: 'NAT型', value: 'NAT' },\n ],\n },\n {\n key: 'network-type',\n enDescriptor: 'network-type',\n cnDescriptor: '网络类型',\n link: '',\n type: 'select',\n multiple: true,\n list: [\n { text: '私有网络类型', value: 'VPC' },\n { text: '云联网类型', value: 'CCN' },\n ],\n },\n {\n key: 'ccn-id',\n enDescriptor: 'ccn-id',\n cnDescriptor: '专线网关所在云联网ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'vpc-id',\n enDescriptor: 'vpc-id',\n cnDescriptor: '专线网关所在私有网络ID',\n link: '',\n type: 'inputMulti',\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/215/30644',\n namespace,\n fieldDescriptor: DCGFilterFieldsDescriptor,\n};\n\nconst DCG_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'DirectConnectGatewayId',\n queries: DCGFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, true);\n}\nexport default DCG_STATE;\nexport {\n DCGFilterFieldsDescriptor,\n templateQueryIdMap,\n DCGInstanceAliasList,\n DCGInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n GetInstanceQueryParams as DCGGetInstanceQueryParams,\n};\n","import _ from 'lodash';\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/DCX';\nconst queryEditorName = 'dcxQuery';\n\nconst DCXFilterFields = {\n 'direct-connect-tunnel-name': [],\n 'direct-connect-tunnel-id': [],\n 'direct-connect-id': [],\n};\n\nconst DCXFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'direct-connect-tunnel-name',\n enDescriptor: 'direct-connect-tunnel-name',\n cnDescriptor: '专用通道名称',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'direct-connect-tunnel-id',\n enDescriptor: 'direct-connect-tunnel-id',\n cnDescriptor: '专用通道实例ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'direct-connect-id',\n enDescriptor: 'direct-connect-id',\n cnDescriptor: '物理专线实例ID',\n link: '',\n type: 'inputMulti',\n },\n];\n\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/216/19819',\n namespace,\n fieldDescriptor: DCXFilterFieldsDescriptor,\n};\n\nconst DCX_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'DirectConnectTunnelId',\n queries: {\n Limit: 20,\n Offset: 0,\n ...DCXFilterFields,\n },\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, true);\n}\n\nconst DCXInstanceAliasList = ['DirectConnectTunnelId', 'DirectConnectTunnelName'];\n\nconst templateQueryIdMap = {\n instance: 'DirectConnectTunnelId',\n};\n\nconst DCXInvalidDemensions = {\n directconnectconnid: 'DirectConnectTunnelId',\n directConnectConnId: 'DirectConnectTunnelId',\n};\nfunction modifyDimensons(metricItem) {\n const metricTmp = _.cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n item.Dimensions = ['directConnectConnId'];\n });\n return metricTmp;\n}\nexport default DCX_STATE;\nexport {\n DCXFilterFieldsDescriptor,\n templateQueryIdMap,\n DCXInstanceAliasList,\n DCXInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n modifyDimensons,\n GetInstanceQueryParams as DCXGetInstanceQueryParams,\n};\n","import * as _ from 'lodash';\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/ECM_LB';\nconst queryEditorName = 'ecmLbQuery';\n\nconst ECMLBInvalidDemensions = {\n vip: 'LoadBalancerVips',\n};\n\nconst ECMLBInstanceAliasList = ['LoadBalancerId', 'LoadBalancerName'];\n\nconst templateQueryIdMap = {\n instance: 'LoadBalancerId',\n};\n\n// select类型需要注意是{},multi后缀是[]\nconst ECMLBFilterFields = {\n Limit: 20,\n Offset: 0,\n LoadBalancerIds: [],\n LoadBalancerName: [],\n LoadBalancerVips: [],\n BackendPrivateIps: [],\n VpcId: '',\n};\n\nconst ECMLBFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'LoadBalancerIds',\n enDescriptor: 'LoadBalancerIds',\n cnDescriptor: '负载均衡器ID数组',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'LoadBalancerName',\n enDescriptor: 'LoadBalancerName',\n cnDescriptor: '负载均衡器名称',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'LoadBalancerVips',\n enDescriptor: 'LoadBalancerVips',\n cnDescriptor: '负载均衡获得的公网IP地址',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'BackendPrivateIps',\n enDescriptor: 'BackendPrivateIps',\n cnDescriptor: '绑定的后端服务的内网 IP',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'VpcId',\n enDescriptor: 'VpcId',\n cnDescriptor: '实例所属私有网络唯一ID',\n link: '',\n type: 'input',\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/1108/48459',\n namespace,\n fieldDescriptor: ECMLBFilterFieldsDescriptor,\n};\n\nconst ECM_STATE = {\n region: 'ap-guangzhou',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'LoadBalancerId',\n queries: ECMLBFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, false);\n}\n// function isValidMetric(metricObj: any = {}) {\n// const dimension = _.get(metricObj, 'Dimensions[0].Dimensions');\n// // console.log('dimension', dimension, dimension.length === 1 && _.indexOf(dimension, 'diskId') !== -1);\n// return dimension.length === 1 &&( _.indexOf(dimension, 'UUID') !== -1 || _.indexOf(dimension, 'uuid') !== -1);\n// }\n\nfunction modifyDimensons(metricItem: any) {\n const metricTmp = _.cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n // item.Dimensions = ['UUID'];\n });\n return metricTmp;\n}\nexport default ECM_STATE;\nexport {\n ECMLBFilterFieldsDescriptor,\n templateQueryIdMap,\n ECMLBInstanceAliasList,\n ECMLBInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n modifyDimensons,\n GetInstanceQueryParams as ECMLBGetInstanceQueryParams,\n};\n","import _ from 'lodash';\nconst InstanceTypes = [\n { text: '所有实例', value: 0 },\n { text: '正式实例', value: 1 },\n { text: '临时实例', value: 2 },\n { text: '只读实例', value: 3 },\n { text: '正式,只读,灾备实例', value: -1 },\n];\n\nconst ClusterTypes = [\n { text: '副本集实例', value: 0 },\n { text: '分片实例', value: 1 },\n { text: '所有实例', value: -1 },\n];\n\nconst Status = [\n { text: '待初始化', value: 0 },\n { text: '流程执行中', value: 1 },\n { text: '实例有效', value: 2 },\n { text: '实例已过期', value: -2 },\n];\n\nconst PayMode = [\n { text: '按量计费', value: 0 },\n { text: '包年包月', value: 1 },\n { text: '按量包年包月计费', value: -1 },\n];\n\nconst OrderBy = [\n { text: 'ProjectId', value: 'ProjectId' },\n { text: 'InstanceName', value: 'InstanceName' },\n { text: 'CreateTime', value: 'CreateTime' },\n];\n\nconst OrderByType = [\n { text: '升序', value: 'ASC' },\n { text: '降序', value: 'DESC' },\n];\n\nconst MongoDBFields = {\n InstanceIds: [],\n InstanceType: {},\n ClusterType: {},\n Status: [],\n VpcId: '',\n SubnetId: '',\n PayMode: {},\n Limit: 20,\n Offset: 0,\n OrderBy: '',\n OrderByType: '',\n};\n\nconst MONGODBFieldsDescriptor = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputnumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputnumber',\n min: 1,\n max: 100,\n },\n {\n key: 'InstanceIds',\n enDescriptor: 'InstancesIds',\n cnDescriptor: '实例名称',\n type: 'inputmulti',\n },\n {\n key: 'InstanceType',\n enDescriptor: 'InstanceType',\n cnDescriptor: '实例类型',\n link: '',\n type: 'select',\n list: InstanceTypes,\n },\n {\n key: 'ClusterType',\n enDescriptor: 'ClusterType',\n cnDescriptor: '集群类型',\n link: '',\n type: 'select',\n list: ClusterTypes,\n },\n {\n key: 'Status',\n enDescriptor: 'Status',\n cnDescriptor: '实例状态',\n link: '',\n multiple: true,\n type: 'select',\n list: Status,\n },\n {\n key: 'VpcId',\n enDescriptor: 'VpcId',\n cnDescriptor: '私有网络的ID',\n link: '',\n type: 'input',\n },\n {\n key: 'SubnetId',\n enDescriptor: 'SubnetId',\n cnDescriptor: '私有网络的子网ID,基础网络则不传该参数。入参设置该参数的同时,必须设置相应的VpcId',\n link: '',\n type: 'input',\n },\n {\n key: 'PayMode',\n enDescriptor: 'PayMode',\n cnDescriptor: '付费类型',\n link: '',\n type: 'select',\n list: PayMode,\n },\n {\n key: 'OrderBy',\n enDescriptor: 'OrderBy',\n cnDescriptor: '排序字段',\n link: '',\n type: 'select',\n list: OrderBy,\n },\n {\n key: 'OrderByType',\n enDescriptor: 'OrderByType',\n cnDescriptor: '排序方式',\n link: '',\n type: 'select',\n list: OrderByType,\n },\n];\n\nconst MONGODB_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'InstanceId',\n queries: { ...MongoDBFields },\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n queries = _.omit(queries, ['Offset', 'Limit']);\n _.forEach(queries, (item: any, key) => {\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n params[key] = _.uniq(item);\n }\n } else if (_.isObject(item)) {\n // select 单选\n if (_.isNumber(_.get(item, 'value', undefined)) || !_.isEmpty(_.get(item, 'value', undefined))) {\n params[key] = _.get(item, 'value');\n }\n } else if (_.isNumber(item) || !_.isEmpty(item)) {\n params[key] = item;\n }\n });\n }\n return params;\n}\n\nconst MONGODBInstanceAliasList = ['InstanceId', 'InstanceName'];\n\nconst MONGODBInvalidDemensions = {\n target: 'InstanceId',\n};\n\nconst templateQueryIdMap = {\n instance: 'InstanceId',\n replica: 'ReplicaSetId',\n};\n\nconst queryMonitorExtraConfg = {\n Replica: {\n dim_KeyInStorage: 'ReplicaSets',\n dim_KeyInTarget: 'replica',\n dim_KeyInMap: 'ReplicaSetId',\n dim_KeyInIns: 'ReplicaSetId',\n },\n Node: {\n dim_KeyInStorage: 'ReplicaNodeSets',\n dim_KeyInTarget: 'node',\n dim_KeyInMap: 'NodeId',\n dim_KeyInIns: 'NodeId',\n },\n};\nexport default MONGODB_STATE;\nexport {\n MONGODBFieldsDescriptor,\n MONGODBInvalidDemensions,\n MONGODBInstanceAliasList,\n templateQueryIdMap,\n queryMonitorExtraConfg,\n GetInstanceQueryParams as MONGODBGetInstanceQueryParams,\n};\n","import _ from 'lodash';\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/QAAP';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'qaapQuery';\n\nconst QAAPInvalidDemensions = {\n channelId: 'InstanceId',\n};\n\nconst QAAPInstanceAliasList = ['InstanceId'];\n\nconst templateQueryIdMap = {\n instance: 'InstanceId',\n};\n\n// select类型需要注意是{},multi后缀是[]\nconst QAAPFilterFields = {\n Limit: 20,\n Offset: 0,\n ProjectId: [],\n AccessRegion: [],\n RealServerRegion: [],\n GroupId: [],\n};\n\nconst QAAPFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'ProjectId',\n enDescriptor: 'ProjectId',\n cnDescriptor: '项目ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'AccessRegion',\n enDescriptor: 'AccessRegion',\n cnDescriptor: '接入地域',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'RealServerRegion',\n enDescriptor: 'RealServerRegion',\n cnDescriptor: '源站地域',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'GroupId',\n enDescriptor: 'GroupId',\n cnDescriptor: '通道组ID',\n link: '',\n type: 'inputMulti',\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/608/36963',\n namespace,\n fieldDescriptor: QAAPFilterFieldsDescriptor,\n};\n\nconst QAAP_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'InstanceId',\n queries: QAAPFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, true);\n}\nfunction modifyDimensons(metricItem: any) {\n const metricTmp = _.cloneDeep(metricItem);\n // metricTmp.Dimensions.forEach((item) => {\n // item.Dimensions = ['netDetectId'];\n // });\n return metricTmp;\n}\nexport default QAAP_STATE;\nexport {\n QAAPFilterFieldsDescriptor,\n templateQueryIdMap,\n QAAPInstanceAliasList,\n QAAPInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n modifyDimensons,\n GetInstanceQueryParams as QAAPGetInstanceQueryParams,\n};\n","// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service)\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport _ from 'lodash';\n\nconst namespace = 'QCE/TCAPLUS';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'tcaplusQuery';\n\nconst TCAPLUSInvalidDemensions = {\n // TableInstanceId: 'TableInstanceId',\n // ClusterId: 'ClusterId',\n};\n\n// 需和文件名对应\nconst TCAPLUSInstanceAliasList = ['TableInstanceId', 'TableName'];\n\nconst templateQueryIdMap = {\n instance: 'TableInstanceId',\n};\n\n// select类型需要注意是{},multi后缀是[],dropdown是类型\nconst TCAPLUSFilterFields = {\n Limit: 20,\n Offset: 0,\n ClusterId: '',\n TableGroupIds: [],\n\n TableName: '',\n TableInstanceId: '',\n TableIdlType: {},\n TableType: {},\n ListElementNum: null,\n ReservedVolume: null,\n ReservedReadQps: null,\n ReservedWriteQps: null,\n Memo: '',\n FileName: '',\n FileExtType: '',\n FileSize: null,\n FileContent: '',\n};\n\nconst TCAPLUSFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'ClusterId',\n enDescriptor: 'ClusterId',\n cnDescriptor: '表格所属集群ID',\n link: '',\n type: 'input',\n },\n {\n key: 'TableGroupIds',\n enDescriptor: 'TableGroupIds',\n cnDescriptor: '表格组ID列表',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'TableName',\n enDescriptor: 'TableName',\n cnDescriptor: '表格名称',\n link: '',\n type: 'input',\n },\n {\n key: 'TableInstanceId',\n enDescriptor: 'TableInstanceId',\n cnDescriptor: '表实例ID',\n link: '',\n type: 'input',\n },\n {\n key: 'TableIdlType',\n enDescriptor: 'TableIdlType',\n cnDescriptor: '表格描述语言类型',\n link: '',\n type: 'select',\n list: [\n { text: 'PROTO', value: 'PROTO' },\n { text: 'TDR', value: 'TDR' },\n ],\n },\n {\n key: 'TableType',\n enDescriptor: 'TableType',\n cnDescriptor: '表格数据结构类型',\n link: '',\n type: 'select',\n list: [\n { text: 'GENERIC', value: 'GENERIC' },\n { text: 'LIST', value: 'LIST' },\n ],\n },\n {\n key: 'ListElementNum',\n enDescriptor: 'ListElementNum',\n cnDescriptor: 'LIST表元素个数',\n link: '',\n type: 'inputNumber',\n },\n {\n key: 'ReservedVolume',\n enDescriptor: 'ReservedVolume',\n cnDescriptor: '表格预留容量(GB)',\n link: '',\n type: 'inputNumber',\n },\n {\n key: 'ReservedReadQps',\n enDescriptor: 'ReservedReadQps',\n cnDescriptor: '表格预留读CU',\n link: '',\n type: 'inputNumber',\n },\n {\n key: 'ReservedWriteQps',\n enDescriptor: 'ReservedWriteQps',\n cnDescriptor: '表格预留写CU',\n link: '',\n type: 'inputNumber',\n },\n {\n key: 'Memo',\n enDescriptor: 'Memo',\n cnDescriptor: '表格备注信息',\n link: '',\n type: 'input',\n },\n {\n key: 'FileName',\n enDescriptor: 'FileName',\n cnDescriptor: 'Key回档文件名,回档专用',\n link: '',\n type: 'input',\n },\n {\n key: 'FileExtType',\n enDescriptor: 'FileExtType',\n cnDescriptor: 'Key回档文件扩展名,回档专用',\n link: '',\n type: 'input',\n },\n {\n key: 'FileSize',\n enDescriptor: 'FileSize',\n cnDescriptor: 'Key回档文件大小,回档专用',\n link: '',\n type: 'inputNumber',\n },\n {\n key: 'FileContent',\n enDescriptor: 'FileContent',\n cnDescriptor: 'Key回档文件内容,回档专用',\n link: '',\n type: 'input',\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/596/39664',\n namespace,\n fieldDescriptor: TCAPLUSFilterFieldsDescriptor,\n};\n\nconst TCAPLUS_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'TableInstanceId',\n queries: TCAPLUSFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n params.ClusterId = _.get(queries, 'ClusterId', '') || '';\n params.TableGroupIds = _.get(queries, 'TableGroupIds', []) || [];\n queries = _.omit(queries, ['Offset', 'Limit', 'TableGroupIds', 'ClusterId']);\n const SelectedTables: any[] = [];\n _.forEach(queries, (item: any, key) => {\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n SelectedTables[key] = _.uniq(item);\n }\n } else if (_.isObject(item)) {\n if (_.isNumber(_.get(item, 'value', undefined)) || !_.isEmpty(_.get(item, 'value', undefined))) {\n SelectedTables[key] = _.get(item, 'value');\n }\n } else if (_.isNumber(item) || !_.isEmpty(item)) {\n SelectedTables[key] = item;\n }\n });\n params.SelectedTables = SelectedTables;\n return params;\n}\n// 和其他产品的展示保持一致\nconst regonsMap = {\n 'ap-beijing': '华北地区(北京)',\n 'ap-guangzhou': '华南地区(广州)',\n 'ap-hongkong': '港澳台地区(中国香港)',\n 'ap-seoul': '亚太东北(首尔)',\n 'ap-shanghai': '华东地区(上海)',\n 'ap-singapore': '亚太东南(新加坡)',\n 'ap-tokyo': '亚太东北(东京)',\n 'eu-frankfurt': '欧洲地区(法兰克福)',\n 'na-ashburn': '美国东部(弗吉尼亚)',\n 'na-siliconvalley': '美国西部(硅谷)',\n};\nexport default TCAPLUS_STATE;\nexport {\n TCAPLUSFilterFieldsDescriptor,\n templateQueryIdMap,\n TCAPLUSInstanceAliasList,\n TCAPLUSInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n regonsMap,\n // 对应产品的service的全大写拼接GetInstanceQueryParams\n GetInstanceQueryParams as TCAPLUSGetInstanceQueryParams,\n};\n","// 产品目录名字和service名字匹配即 lb_private(目录名) => lbPrivate(service)\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/VBC';\n\n// 组件名称。这里名字要和index.ts中的SERVICES对应,后面会根据SERVICES中service字段拼接这个query组件名称\nconst queryEditorName = 'vbcQuery';\n\nconst VBCInvalidDemensions = {\n // CcnId: 'CcnId',\n};\n\n// 需和文件名对应\nconst VBCInstanceAliasList = ['CcnId', 'CcnName'];\n\nconst templateQueryIdMap = {\n instance: 'CcnId',\n};\n\n// select类型需要注意是{},multi后缀是[],dropdown是''\nconst VBCFilterFields = {\n Limit: 20,\n Offset: 0,\n 'ccn-id': [],\n 'ccn-name': [],\n 'ccn-description': [],\n state: {},\n};\n\nconst VBCFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'ccn-id',\n enDescriptor: 'ccn-id',\n cnDescriptor: 'CCN实例ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'ccn-name',\n enDescriptor: 'ccn-name',\n cnDescriptor: 'CCN名称',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'ccn-description',\n enDescriptor: 'ccn-description',\n cnDescriptor: 'CCN描述',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'state',\n enDescriptor: 'state',\n cnDescriptor: '实例状态',\n link: '',\n type: 'select',\n multiple: true,\n list: [\n { text: '隔离中', value: 'ISOLATED' },\n { text: '运行中', value: 'AVAILABLE' },\n ],\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/215/19199',\n namespace,\n fieldDescriptor: VBCFilterFieldsDescriptor,\n};\n\nconst VBC_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'CcnId',\n DRegion: '',\n SRegion: '',\n queries: VBCFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, false);\n}\n// const regionSupported = [\n// { text: '华北地区(北京)', value: 'ap-beijing' },\n// { text: '西南地区(成都)', value: 'ap-chengdu' },\n// { text: '西南地区(重庆)', value: 'ap-chongqing' },\n// { text: '华南地区(广州)', value: 'ap-guangzhou' },\n// { text: '港澳台地区(中国香港)', value: 'ap-hongkong' },\n// { text: '亚太南部(孟买)', value: 'ap-mumbai' },\n// { text: '华东地区(南京)', value: 'ap-nanjing' },\n// { text: '华东地区(上海)', value: 'ap-shanghai' },\n// { text: '华东地区(上海金融)', value: 'ap-shanghai-fsi' },\n// { text: '华南地区(深圳金融)', value: 'ap-shenzhen-fsi' },\n// { text: '亚太东南(新加坡)', value: 'ap-singapore' },\n// { text: '亚太东北(东京)', value: 'ap-tokyo' },\n// { text: '欧洲地区(法兰克福)', value: 'eu-frankfurt' },\n// { text: '美国东部(弗吉尼亚)', value: 'na-ashburn' },\n// { text: '美国西部(硅谷)', value: 'na-siliconvalley' },\n// { text: '北美地区(多伦多)', value: 'na-toronto' },\n// ];\nexport default VBC_STATE;\nexport {\n VBCFilterFieldsDescriptor,\n templateQueryIdMap,\n VBCInstanceAliasList,\n VBCInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n // regionSupported,\n // 对应产品的service的全大写拼接GetInstanceQueryParams\n GetInstanceQueryParams as VBCGetInstanceQueryParams,\n};\n","import _ from 'lodash';\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/VPNGW';\nconst queryEditorName = 'vpngwQuery';\n\nconst VPNGWInvalidDemensions = {\n vpnGwId: 'VpnGatewayId',\n};\n\nconst VPNGWInstanceAliasList = ['VpnGatewayId', 'VpnGatewayName'];\n\nconst templateQueryIdMap = {\n instance: 'VpnGatewayId',\n};\n\n// select类型需要注意是{},multi后缀是[]\nconst VPNGWFilterFields = {\n Limit: 20,\n Offset: 0,\n 'vpc-id': [],\n 'vpn-gateway-id': [],\n 'vpn-gateway-name': [],\n type: {},\n 'public-ip-address': [],\n 'renew-flag': {},\n zone: [],\n};\n\nconst VPNGWFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'vpc-id',\n enDescriptor: 'vpc-id',\n cnDescriptor: 'VPC实例ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'vpn-gateway-id',\n enDescriptor: 'vpn-gateway-id',\n cnDescriptor: 'VPN实例ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'vpn-gateway-name',\n enDescriptor: 'vpn-gateway-name',\n cnDescriptor: 'VPN实例名称',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'type',\n enDescriptor: 'type',\n cnDescriptor: 'VPN网关类型',\n link: '',\n type: 'select',\n multiple: true,\n list: [\n { text: 'IPSEC', value: 'IPSEC' },\n { text: 'SSL', value: 'SSL' },\n ],\n },\n {\n key: 'public-ip-address',\n enDescriptor: 'public-ip-address',\n cnDescriptor: '公网IP',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'renew-flag',\n enDescriptor: 'renew-flag',\n cnDescriptor: '网关续费类型',\n link: '',\n type: 'select',\n multiple: true,\n list: [\n { text: '手动续费', value: 'NOTIFY_AND_MANUAL_RENEW' },\n { text: '自动续费', value: 'NOTIFY_AND_AUTO_RENEW' },\n ],\n },\n {\n key: 'zone',\n enDescriptor: 'zone',\n cnDescriptor: 'VPN所在可用区',\n link: '',\n type: 'dropdownMulti',\n },\n];\n\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/215/17514',\n namespace,\n fieldDescriptor: VPNGWFilterFieldsDescriptor,\n};\n\nconst VPNGW_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'VpnGatewayId',\n queries: VPNGWFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, true);\n}\nexport default VPNGW_STATE;\nexport {\n VPNGWFilterFieldsDescriptor,\n templateQueryIdMap,\n VPNGWInstanceAliasList,\n VPNGWInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n GetInstanceQueryParams as VPNGWGetInstanceQueryParams,\n};\n","import _ from 'lodash';\nimport { DetailQueryConfig, FildDescriptorType } from '../_base/types';\nimport { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst namespace = 'QCE/VPNX';\nconst queryEditorName = 'vpnxQuery';\n\nconst VPNXInvalidDemensions = {\n vpnConnId: 'VpnConnectionId',\n};\n\nconst VPNXInstanceAliasList = ['VpnConnectionId', 'VpnConnectionName'];\n\nconst templateQueryIdMap = {\n instance: 'VpnConnectionId',\n};\n\n// select类型需要注意是{},multi后缀是[]\nconst VPNXFilterFields = {\n Limit: 20,\n Offset: 0,\n 'vpc-id': [],\n 'vpn-gateway-id': [],\n 'customer-gateway-id': [],\n 'vpn-connection-name': [],\n 'vpn-connection-id': [],\n};\n\nconst VPNXFilterFieldsDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 100,\n },\n {\n key: 'vpc-id',\n enDescriptor: 'vpc-id',\n cnDescriptor: 'VPC实例ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'vpn-gateway-id',\n enDescriptor: 'vpn-gateway-id',\n cnDescriptor: 'VPN实例ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'customer-gateway-id ',\n enDescriptor: 'customer-gateway-id ',\n cnDescriptor: '对端网关实例ID',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'vpn-connection-name',\n enDescriptor: 'vpn-connection-name',\n cnDescriptor: '通道名称',\n link: '',\n type: 'inputMulti',\n },\n {\n key: 'vpn-connection-id',\n enDescriptor: 'vpn-connection-id',\n cnDescriptor: '通道实例ID',\n link: '',\n type: 'inputMulti',\n },\n];\n\n// 各产品实例列表detail配置\nconst queryEditorConfig: DetailQueryConfig = {\n instanceDocUrl: 'https://cloud.tencent.com/document/api/215/17515',\n namespace,\n fieldDescriptor: VPNXFilterFieldsDescriptor,\n};\n\nconst VPNX_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'VpnConnectionId',\n queries: VPNXFilterFields,\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, true);\n}\nexport default VPNX_STATE;\nexport {\n VPNXFilterFieldsDescriptor,\n templateQueryIdMap,\n VPNXInstanceAliasList,\n VPNXInvalidDemensions,\n namespace,\n queryEditorName,\n queryEditorConfig,\n GetInstanceQueryParams as VPNXGetInstanceQueryParams,\n};\n","import _ from 'lodash';\n\nconst LighthouseStateType = [\n { text: '创建中', value: 'PENDING' },\n { text: '创建失败', value: 'LAUNCH_FAILED' },\n { text: '运行中', value: 'RUNNING' },\n { text: '关机', value: 'STOPPED' },\n { text: '开机中', value: 'STARTING' },\n { text: '关机中', value: 'STOPPING' },\n { text: '重启中', value: 'REBOOTING' },\n { text: '停止待销毁', value: 'SHUTDOWN' },\n { text: '销毁中', value: 'TERMINATING' },\n];\n\nconst LighthouseFilterFields = {\n zone: [],\n 'instance-name': [],\n 'instance-state': {},\n 'private-ip-address': [],\n 'public-ip-address': [],\n};\n\nconst LighthouseFilterFieldsDescriptor = [\n {\n key: 'instance-name',\n enDescriptor: 'Instance Name',\n cnDescriptor: '实例名称',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'private-ip-address',\n enDescriptor: 'Private IP Address',\n cnDescriptor: '实例主网卡的内网IP',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'public-ip-address',\n enDescriptor: 'Public IP Address',\n cnDescriptor: '实例主网卡的公网IP',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'zone',\n enDescriptor: 'Zone',\n cnDescriptor: '可用区',\n link: '',\n type: 'dropdownmulti',\n },\n {\n key: 'instance-state',\n enDescriptor: 'Instance State',\n cnDescriptor: '实例状态',\n link: '',\n type: 'select',\n list: LighthouseStateType,\n },\n];\n\nconst LIGHTHOUSE_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'InstanceId',\n queries: {\n Limit: 20,\n Offset: 0,\n instanceIdsChecked: false,\n filtersChecked: false,\n InstanceIds: [''],\n Filters: { ...LighthouseFilterFields },\n },\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n if (queries.instanceIdsChecked) {\n if (_.isArray(queries.InstanceIds)) {\n const InstanceIds = _.compact(queries.InstanceIds);\n if (_.uniq(InstanceIds).length > 0) {\n params.InstanceIds = _.uniq(InstanceIds).slice(0, 100);\n }\n }\n } else if (queries.filtersChecked) {\n const Filters: any[] = [];\n _.forEach(queries.Filters, (item: any, key) => {\n if (Filters.length > 9) {\n return;\n }\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n Filters.push({ Name: key, Values: _.uniq(item).slice(0, 5) });\n }\n } else if (_.isObject(item)) {\n if (!_.isEmpty(_.get(item, 'value', []))) {\n Filters.push({ Name: key, Values: _.get(item, 'value', []).slice(0, 5) });\n }\n }\n });\n if (Filters.length > 0) {\n params.Filters = Filters;\n }\n }\n }\n return params;\n}\n\nconst LIGHTHOUSEInstanceAliasList = ['InstanceId', 'InstanceName', 'PrivateIpAddresses', 'PublicIpAddresses'];\n\nconst LighthouseInvalidDemensions = {\n instanceid: 'InstanceId',\n};\n\nconst templateQueryIdMap = {\n instance: 'InstanceId',\n};\n\nfunction modifyDimensons(metricItem: any) {\n const metricTmp = _.cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n item.Dimensions = ['InstanceId'];\n });\n return metricTmp;\n}\n\nexport default LIGHTHOUSE_STATE;\n\nexport {\n LighthouseFilterFieldsDescriptor,\n LIGHTHOUSEInstanceAliasList,\n LighthouseInvalidDemensions,\n templateQueryIdMap,\n modifyDimensons,\n GetInstanceQueryParams as LIGHTHOUSEGetInstanceQueryParams,\n};\n","import _ from 'lodash';\n\nexport const CFSQueryDescriptor = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputnumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputnumber',\n min: 1,\n max: 100,\n },\n {\n key: 'FileSystemId',\n enDescriptor: 'File System Id',\n cnDescriptor: '文件系统 ID',\n link: '',\n type: 'input',\n },\n {\n key: 'VpcId',\n enDescriptor: 'VpcId',\n cnDescriptor: '私有网络(VPC) ID',\n link: '',\n type: 'input',\n },\n {\n key: 'SubnetId',\n enDescriptor: 'SubnetId',\n cnDescriptor: '子网 ID',\n link: '',\n type: 'input',\n },\n];\n\nconst CFS_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'FileSystemId',\n version: '',\n queries: {\n Offset: 0,\n Limit: 20,\n FileSystemId: '',\n VpcId: '',\n SubnetId: '',\n },\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n queries = _.omit(queries, ['Offset', 'Limit']);\n _.forEach(queries, (item: any, key) => {\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n params[key] = _.uniq(item);\n }\n } else if (_.isObject(item)) {\n if (_.isNumber(_.get(item, 'value', undefined)) || !_.isEmpty(_.get(item, 'value', undefined))) {\n params[key] = _.get(item, 'value');\n }\n } else if (_.isNumber(item) || !_.isEmpty(item)) {\n params[key] = item;\n }\n });\n }\n return params;\n}\n\nconst CFSInstanceAliasList = ['FileSystemId', 'FsName'];\n\n// 向实例里面塞dimensions对应的值,dimension中的key对应到实例中的key\nconst CFSInvalidDemensions = {\n // functionName: 'FunctionName',\n // namespace: 'Namespace'\n};\n\nconst regionSupported = [\n { value: 'ap-beijing' },\n { value: 'ap-chengdu' },\n { value: 'ap-chongqing' },\n { value: 'ap-guangzhou' },\n { value: 'ap-hongkong' },\n { value: 'ap-mumbai' },\n { value: 'ap-nanjing' },\n { value: 'ap-seoul' },\n { value: 'ap-shanghai' },\n { value: 'ap-shanghai-fsi' },\n { value: 'ap-shenzhen-fsi' },\n { value: 'ap-singapore' },\n { value: 'ap-tokyo' },\n { value: 'eu-frankfurt' },\n { value: 'na-siliconvalley' },\n { value: 'na-toronto' },\n];\nconst templateQueryIdMap = {\n instance: 'InstanceId',\n};\nexport default CFS_STATE;\nexport {\n CFSInstanceAliasList,\n CFSInvalidDemensions,\n templateQueryIdMap,\n regionSupported,\n GetInstanceQueryParams as CFSGetInstanceQueryParams,\n};\n\n// monitor监控数据默认支持的维度\n// export const SCFDefaultDimensionList = ['functionName', 'namespace', 'version'];\n","import _ from 'lodash';\nimport { FildDescriptorType } from '../_base/types';\n\nexport const InstanceQueryDescriptor: FildDescriptorType = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputNumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为10,最小值为1,最大值为100',\n link: '',\n type: 'inputNumber',\n min: 1,\n max: 50,\n },\n {\n key: 'QueueName',\n enDescriptor: 'QueueName',\n cnDescriptor: '精确匹配QueueName',\n link: '',\n type: 'input',\n },\n {\n key: 'TagKey',\n enDescriptor: 'TagKey',\n cnDescriptor: '标签搜索',\n link: '',\n type: 'input',\n },\n];\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n queries = _.omit(queries, ['Offset', 'Limit']);\n _.forEach(queries, (item: any, key) => {\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n params[key] = _.uniq(item);\n }\n } else if (_.isObject(item)) {\n if (_.isNumber(_.get(item, 'value', undefined)) || !_.isEmpty(_.get(item, 'value', undefined))) {\n params[key] = _.get(item, 'value');\n }\n } else if (_.isNumber(item) || !_.isEmpty(item)) {\n params[key] = item;\n }\n });\n }\n return params;\n}\n\n// 向实例里面塞dimensions对应的值,dimension中的key对应到实例中的key\nexport const InvalidDemensions = {\n queueId: 'QueueId',\n queueName: 'QueueName',\n};\n\nexport const templateQueryIdMap = {\n instance: 'QueueName',\n};\n\n// 与名称挂钩的变量\nconst InstanceAliasList = ['QueueName', 'QueueId'];\nexport { InstanceAliasList, GetInstanceQueryParams };\n\n// 界面状态模型,default\nexport default {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'QueueName',\n queries: {\n Offset: 0,\n Limit: 20,\n QueueName: '',\n TagKey: '',\n },\n};\n","import _ from 'lodash';\nconst instanceChargeTypes = [\n { text: '预付费', value: 'PREPAID' },\n { text: '后付费', value: 'POSTPAID_BY_HOUR' },\n { text: 'CDH付费', value: 'CDHPAID' },\n];\n\nconst CVMFilterFields = {\n zone: [],\n 'project-id': [],\n 'host-id': [],\n 'vpc-id': [],\n 'subnet-id': [],\n 'instance-id': [],\n 'security-group-id': [],\n 'instance-name': [],\n 'instance-charge-type': {},\n 'private-ip-address': [],\n 'public-ip-address': [],\n 'tag-key': [],\n};\n\nconst CVMFilterFieldsDescriptor = [\n {\n key: 'zone',\n enDescriptor: 'Zone',\n cnDescriptor: '可用区',\n link: '',\n type: 'dropdownmulti',\n },\n {\n key: 'project-id',\n enDescriptor: 'Project ID',\n cnDescriptor: '项目ID',\n link: 'https://cloud.tencent.com/document/api/378/4400',\n type: 'inputNumbermulti',\n },\n {\n key: 'host-id',\n enDescriptor: 'CDH ID',\n cnDescriptor: 'CDH ID',\n link: 'https://cloud.tencent.com/document/product/416/19730',\n type: 'inputmulti',\n },\n {\n key: 'vpc-id',\n enDescriptor: 'VPC ID',\n cnDescriptor: 'VPC ID',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'subnet-id',\n enDescriptor: 'Subnet ID',\n cnDescriptor: '子网ID',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'instance-id',\n enDescriptor: 'Instance ID',\n cnDescriptor: '实例ID',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'security-group-id',\n enDescriptor: 'Security Group ID',\n cnDescriptor: '安全组ID',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'instance-name',\n enDescriptor: 'Instance Name',\n cnDescriptor: '实例名称',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'tag-key',\n enDescriptor: '标签简',\n cnDescriptor: '标签简',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'instance-charge-type',\n enDescriptor: 'Instance Charge Type',\n cnDescriptor: '实例计费模式',\n link: '',\n type: 'select',\n list: instanceChargeTypes,\n },\n {\n key: 'private-ip-address',\n enDescriptor: 'Private IP Address',\n cnDescriptor: '实例主网卡的内网IP',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'public-ip-address',\n enDescriptor: 'Public IP Address',\n cnDescriptor: '实例主网卡的公网IP,包含实例创建时自动分配的IP和实例创建后手动绑定的弹性IP',\n link: '',\n type: 'inputmulti',\n },\n];\n\nconst CVM_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'InstanceId',\n queries: {\n Limit: 20,\n Offset: 0,\n instanceIdsChecked: false,\n filtersChecked: false,\n InstanceIds: [''],\n Filters: { ...CVMFilterFields },\n },\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n if (queries.instanceIdsChecked) {\n if (_.isArray(queries.InstanceIds)) {\n const InstanceIds = _.compact(queries.InstanceIds);\n if (_.uniq(InstanceIds).length > 0) {\n params.InstanceIds = _.uniq(InstanceIds).slice(0, 100);\n }\n }\n } else if (queries.filtersChecked) {\n const Filters: any[] = [];\n _.forEach(queries.Filters, (item: any, key) => {\n if (Filters.length > 9) {\n return;\n }\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n Filters.push({ Name: key, Values: _.uniq(item).slice(0, 5) });\n }\n } else if (_.isObject(item)) {\n if (!_.isEmpty(_.get(item, 'value', []))) {\n Filters.push({ Name: key, Values: _.get(item, 'value', []).slice(0, 5) });\n }\n }\n });\n if (Filters.length > 0) {\n params.Filters = Filters;\n }\n }\n }\n return params;\n}\n\nconst CVMInstanceAliasList = ['InstanceId', 'InstanceName', 'PrivateIpAddresses', 'PublicIpAddresses'];\n\nconst CVMValidMetricsT = [\n 'CPUUsage',\n 'CpuLoadavg',\n 'Cpuloadavg5m',\n 'Cpuloadavg15m',\n 'BaseCpuUsage',\n 'GpuMemTotal',\n 'GpuMemUsage',\n 'GpuMemUsed',\n 'GpuPowDraw',\n 'GpuPowLimit',\n 'GpuPowUsage',\n 'GpuTemp',\n 'GpuUtil',\n 'LanOuttraffic',\n 'LanIntraffic',\n 'LanOutpkg',\n 'LanInpkg',\n 'WanOuttraffic',\n 'WanIntraffic',\n 'WanOutpkg',\n 'WanInpkg',\n 'AccOuttraffic',\n 'TcpCurrEstab',\n 'TimeOffset',\n 'MemUsed',\n 'MemUsage',\n 'CvmDiskUsage',\n 'BaseCpuUsage',\n 'VmDiskReadIops',\n];\n// const CVMInvalidDemensions = {\n// 'vm_uuid': 'InstanceId',\n// 'vmUuid': 'InstanceId',\n// };\n\nconst templateQueryIdMap = {\n instance: 'InstanceId',\n};\nfunction isValidMetric(metric) {\n const CVMValidMetrics = _.map(CVMValidMetricsT, _.toUpper);\n return _.indexOf(CVMValidMetrics, _.toUpper(metric.MetricName)) !== -1;\n}\nfunction modifyDimensons(metricItem) {\n const metricTmp = _.cloneDeep(metricItem);\n metricTmp.Dimensions.forEach((item) => {\n item.Dimensions = ['InstanceId'];\n });\n return metricTmp;\n}\nexport default CVM_STATE;\nexport {\n CVMFilterFieldsDescriptor,\n CVMInstanceAliasList,\n isValidMetric,\n modifyDimensons,\n templateQueryIdMap,\n // CVMInvalidDemensions,\n GetInstanceQueryParams as CVMGetInstanceQueryParams,\n};\n","import _ from 'lodash';\nconst namespace = 'QCE/PCX';\n\nconst PCXFields = {\n limit: 20,\n offset: 0,\n peeringConnectionId: '',\n peeringConnectionName: '',\n vpcId: '',\n state: undefined,\n};\n\nconst PCX_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'peeringConnectionId',\n queries: { ...PCXFields },\n};\n\nconst StateTypes = [\n { text: '申请中', value: 0 },\n { text: '连接成功', value: 1 },\n { text: '已过期', value: 2 },\n { text: '对端已拒绝', value: 3 },\n { text: '对端已删除', value: 4 },\n];\n\nconst PCXFieldsDescriptor = [\n {\n key: 'offset',\n enDescriptor: 'offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputnumber',\n min: 0,\n },\n {\n key: 'limit',\n enDescriptor: 'limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为50',\n link: '',\n type: 'inputnumber',\n min: 1,\n max: 50,\n },\n {\n key: 'peeringConnectionId',\n enDescriptor: 'PeeringConnection Id',\n cnDescriptor: '私有网络对等连接 ID',\n link: '',\n type: 'input',\n },\n {\n key: 'peeringConnectionName',\n enDescriptor: 'PeeringConnection Name',\n cnDescriptor: '对等连接名称',\n link: '',\n type: 'input',\n },\n {\n key: 'vpcId',\n enDescriptor: 'vpcId',\n cnDescriptor: '发起方私有网络 ID 值',\n link: 'https://cloud.tencent.com/document/api/215/1372',\n type: 'dropdown',\n },\n {\n key: 'state',\n enDescriptor: 'state',\n cnDescriptor: '连接状态',\n link: '',\n type: 'select',\n list: StateTypes,\n },\n];\n\nconst PCXInstanceAliasList = ['peeringConnectionId', 'peeringConnectionName'];\n\nconst templateQueryIdMap = {\n instance: 'peeringConnectionId',\n};\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.limit = _.get(queries, 'limit', 20) || 20;\n params.offset = _.get(queries, 'offset', 0) || 0;\n queries = _.omit(queries, ['offset', 'limit']);\n _.forEach(queries, (item: any, key) => {\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n params[key] = _.uniq(item);\n }\n } else if (_.isObject(item)) {\n if (_.isNumber(_.get(item, 'value', undefined)) || !_.isEmpty(_.get(item, 'value', undefined))) {\n params[key] = _.get(item, 'value');\n }\n } else if (_.isNumber(item) || !_.isEmpty(item)) {\n params[key] = item;\n }\n });\n }\n return params;\n}\n\nexport default PCX_STATE;\n\nexport {\n PCXInstanceAliasList,\n PCXFieldsDescriptor,\n templateQueryIdMap,\n namespace,\n GetInstanceQueryParams as PCXGetInstanceQueryParams,\n};\n","import _ from 'lodash';\nconst BillingMode = [\n { text: '按量计费', value: 'postpaid' },\n { text: '包年包月', value: 'prepaid' },\n];\n\nconst AutoRenew = [\n { text: '手动续费', value: 0 },\n { text: '自动续费', value: 1 },\n { text: '明确不自动续费', value: 2 },\n];\n\nconst Status = [\n { text: '待初始化', value: 0 },\n { text: '流程执行中', value: 1 },\n { text: '运行中', value: 2 },\n { text: '已隔离', value: -2 },\n { text: '待删除', value: -3 },\n];\n\nconst TypeVersion = [\n { text: '单机版', value: 1 },\n { text: '主从版', value: 2 },\n { text: '集群版', value: 3 },\n];\n\nconst OrderBy = [\n { text: 'projectId', value: 'projectId' },\n { text: 'instancename', value: 'instancename' },\n { text: 'createtime', value: 'createtime' },\n { text: 'type', value: 'type' },\n { text: 'curDeadline', value: 'curDeadline' },\n];\n\nconst OrderType = [\n { text: '升序', value: 0 },\n { text: '降序', value: 1 },\n];\nconst Type = [\n { text: 'Redis老集群版', value: 1 },\n { text: 'Redis 2.8主从版', value: 2 },\n { text: 'CKV主从版', value: 3 },\n { text: 'CKV集群版', value: 4 },\n { text: 'Redis 2.8单机版', value: 5 },\n { text: 'Redis 4.0主从版', value: 6 },\n { text: 'Redis 4.0集群版', value: 7 },\n { text: 'Redis5.0主从版', value: 8 },\n { text: 'Redis5.0集群版', value: 9 },\n];\n\nconst RedisFields = {\n InstanceId: '',\n OrderBy: '',\n OrderType: null,\n VpcIds: [],\n SubnetIds: [],\n ProjectIds: [],\n SearchKey: '',\n InstanceName: '',\n UniqVpcIds: [],\n UniqSubnetIds: [],\n Status: [],\n TypeVersion: null,\n EngineName: '',\n AutoRenew: null,\n BillingMode: '',\n Type: null,\n};\n\nconst RedisFieldsDescriptor = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputnumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputnumber',\n min: 1,\n max: 100,\n },\n {\n key: 'InstanceId',\n enDescriptor: 'InstancesId',\n cnDescriptor: '实例id',\n type: 'input',\n },\n {\n key: 'OrderBy',\n enDescriptor: 'OrderBy',\n cnDescriptor: '排序字段',\n link: '',\n type: 'select',\n list: OrderBy,\n },\n {\n key: 'OrderType',\n enDescriptor: 'OrderType',\n cnDescriptor: '排序字段',\n link: '',\n type: 'select',\n list: OrderType,\n },\n {\n key: 'VpcIds',\n enDescriptor: 'VpcIds',\n cnDescriptor: '私有网络ID数组,数组下标从0开始,如果不传则默认选择基础网络,如:47525',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'SubnetIds',\n enDescriptor: 'SubnetIds',\n cnDescriptor: '子网ID数组,数组下标从0开始,如:56854',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'ProjectIds',\n enDescriptor: 'ProjectIds',\n cnDescriptor: '项目ID 组成的数组',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'SearchKey',\n enDescriptor: 'SearchKey',\n cnDescriptor: '查找实例的ID',\n link: '',\n type: 'input',\n },\n {\n key: 'InstanceName',\n enDescriptor: 'InstanceName',\n cnDescriptor: '实例名称',\n link: '',\n type: 'input',\n },\n {\n key: 'UniqVpcIds',\n enDescriptor: 'UniqVpcIds',\n cnDescriptor: '私有网络ID数组,数组下标从0开始,如果不传则默认选择基础网络,如:vpc-sad23jfdfk',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'UniqSubnetIds',\n enDescriptor: 'UniqSubnetIds',\n cnDescriptor: '子网ID数组,数组下标从0开始,如:subnet-fdj24n34j2',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'Status',\n enDescriptor: 'Status',\n cnDescriptor: '实例状态',\n multiple: true,\n type: 'select',\n list: Status,\n },\n {\n key: 'TypeVersion',\n enDescriptor: 'TypeVersion',\n cnDescriptor: '类型版本',\n link: '',\n type: 'select',\n list: TypeVersion,\n },\n {\n key: 'EngineName',\n enDescriptor: 'EngineName',\n cnDescriptor: '引擎信息:Redis-2.8,Redis-4.0,CKV',\n link: '',\n type: 'input',\n },\n {\n key: 'AutoRenew',\n enDescriptor: 'AutoRenew',\n cnDescriptor: '续费模式',\n multiple: true,\n type: 'select',\n list: AutoRenew,\n },\n {\n key: 'BillingMode',\n enDescriptor: 'BillingMode',\n cnDescriptor: '计费模式:postpaid-按量计费;prepaid-包年包月',\n link: '',\n type: 'select',\n list: BillingMode,\n },\n {\n key: 'Type',\n enDescriptor: 'Type',\n cnDescriptor: '实例类型',\n link: '',\n type: 'select',\n list: Type,\n },\n];\n\nconst REDIS_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'InstanceId',\n queries: { ...RedisFields },\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n queries = _.omit(queries, ['Offset', 'Limit']);\n _.forEach(queries, (item: any, key) => {\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n params[key] = _.uniq(item);\n }\n } else if (_.isObject(item)) {\n // select 单选\n if (_.isNumber(_.get(item, 'value', undefined)) || !_.isEmpty(_.get(item, 'value', undefined))) {\n params[key] = _.get(item, 'value');\n }\n } else if (_.isNumber(item) || !_.isEmpty(item)) {\n params[key] = item;\n }\n });\n }\n return params;\n}\n\nfunction isValidMetric(metricObj: any = {}) {\n const dimension = _.get(metricObj, 'Dimensions[0].Dimensions');\n return dimension.length === 1 && _.indexOf(dimension, 'instanceid') !== -1;\n}\n\nconst REDISInstanceAliasList = ['InstanceId', 'InstanceName', 'WanIp'];\n\nconst RedisInvalidDemensions = {\n redis_uuid: 'InstanceId',\n instanceid: 'InstanceId',\n};\n\nconst templateQueryIdMap = {\n instance: 'InstanceId',\n};\nexport default REDIS_STATE;\nexport {\n RedisFieldsDescriptor,\n RedisInvalidDemensions,\n templateQueryIdMap,\n REDISInstanceAliasList,\n isValidMetric,\n GetInstanceQueryParams as REDISGetInstanceQueryParams,\n};\n","import { instanceQueryParamsBaseParse } from '../../common/utils';\n\nconst ApplicationType = [\n { text: '所有', value: '' },\n { text: '容器应用', value: 'C' },\n { text: '普通应用/虚拟机应用', value: 'V' },\n];\n\nconst MicroserviceType = [\n { text: '所有', value: '' },\n { text: '普通应用', value: 'N' },\n { text: 'Mesh应用', value: 'M' },\n { text: '微服务网关应用', value: 'G' },\n { text: '原生应用', value: 'NATIVE' },\n];\n\nconst ApplicationResourceType = [\n { text: '默认资源类型', value: 'DEF' },\n { text: '微服务网关资源', value: 'GW' },\n];\n\nconst TSFFieldsDescriptor = [\n {\n key: 'Offset',\n enDescriptor: 'Offset',\n cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n link: '',\n type: 'inputnumber',\n min: 0,\n },\n {\n key: 'Limit',\n enDescriptor: 'Limit',\n cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为100',\n link: '',\n type: 'inputnumber',\n min: 1,\n max: 100,\n },\n {\n key: 'SearchWord',\n enDescriptor: 'SearchWord',\n cnDescriptor: '搜索关键字',\n link: '',\n type: 'input',\n },\n {\n key: 'ApplicationIdList',\n enDescriptor: 'ApplicationIdList',\n cnDescriptor: '应用ID 组成的数组',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'ApplicationType',\n enDescriptor: 'ApplicationType',\n cnDescriptor: '应用类型',\n link: '',\n type: 'select',\n list: ApplicationType,\n },\n {\n key: 'MicroserviceType',\n enDescriptor: 'MicroserviceType',\n cnDescriptor: '应用的微服务类型',\n link: '',\n type: 'select',\n list: MicroserviceType,\n },\n {\n key: 'ApplicationResourceTypeList',\n enDescriptor: 'ApplicationResourceTypeList',\n cnDescriptor: '应用资源类型数组',\n link: '',\n type: 'select',\n multiple: true,\n list: ApplicationResourceType,\n },\n];\n\nconst TSF_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'ApplicationId',\n queries: {\n Limit: 20,\n Offset: 0,\n SearchWord: '',\n OrderBy: '',\n OrderType: null,\n ApplicationType: '',\n MicroserviceType: '',\n ApplicationResourceTypeList: [],\n ApplicationIdList: [],\n },\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n return instanceQueryParamsBaseParse(queries, false);\n}\n\nconst TSFInstanceAliasList = ['ApplicationId', 'ApplicationName'];\n\nconst TSFInvalidDemensions = {\n applicationid: 'ApplicationId',\n};\n\nconst templateQueryIdMap = {\n instance: 'ApplicationId',\n};\n\nexport default TSF_STATE;\nexport {\n TSFInvalidDemensions,\n templateQueryIdMap,\n TSFInstanceAliasList,\n TSFFieldsDescriptor,\n GetInstanceQueryParams as TSFGetInstanceQueryParams,\n};\n","import _ from 'lodash';\nconst networkTypes = [\n { text: 'BGP', value: 'BGP' },\n { text: 'SINGLEISP', value: 'SINGLEISP' },\n { text: 'ANYCAST', value: 'ANYCAST' },\n];\n\nconst chargeTypes = [\n { text: 'top5计费', value: 'TOP5_POSTPAID_BY_MONTH' },\n { text: '月95计费', value: 'PERCENT95_POSTPAID_BY_MONTH' },\n];\nconst BWPFilterFields = {\n 'bandwidth-package_id': [],\n 'bandwidth-package-name': [],\n 'network-type': [],\n 'charge-type': [],\n};\n\nconst BWPFilterFieldsDescriptor = [\n {\n key: 'bandwidth-package_id',\n enDescriptor: 'BandwidthPackage Id',\n cnDescriptor: '带宽包ID',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'bandwidth-package-name',\n enDescriptor: 'BandwidthPackage Name',\n cnDescriptor: '带宽包名称',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'network-type',\n enDescriptor: 'network type',\n cnDescriptor: '带宽包类型',\n link: '',\n type: 'select',\n list: networkTypes,\n },\n {\n key: 'charge-type',\n enDescriptor: 'charge type',\n cnDescriptor: '带宽包计费类型',\n link: '',\n type: 'select',\n list: chargeTypes,\n },\n];\n\nconst BWP_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'BandwidthPackageId',\n queries: {\n Limit: 20,\n Offset: 0,\n instanceIdsChecked: false,\n filtersChecked: false,\n BandwidthPackageIds: [''],\n Filters: { ...BWPFilterFields },\n },\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n if (queries.instanceIdsChecked) {\n if (_.isArray(queries.BandwidthPackageIds)) {\n const BandwidthPackageIds = _.compact(queries.BandwidthPackageIds);\n if (_.uniq(BandwidthPackageIds).length > 0) {\n params.BandwidthPackageIds = _.uniq(BandwidthPackageIds).slice(0, 100);\n }\n }\n } else if (queries.filtersChecked) {\n const Filters: any[] = [];\n _.forEach(queries.Filters, (item: any, key) => {\n if (Filters.length > 9) {\n return;\n }\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n Filters.push({ Name: key, Values: _.uniq(item).slice(0, 5) });\n }\n } else if (_.isObject(item)) {\n if (!_.isEmpty(_.get(item, 'value', []))) {\n Filters.push({ Name: key, Values: _.get(item, 'value', []).slice(0, 5) });\n }\n }\n });\n if (Filters.length > 0) {\n params.Filters = Filters;\n }\n }\n }\n return params;\n}\n\nconst BWPInstanceAliasList = ['BandwidthPackageId', 'BandwidthPackageName'];\n\nconst templateQueryIdMap = {\n instance: 'BandwidthPackageId',\n};\n\nconst BWPInvalidDemensions = {\n bandwidthPackageId: 'BandwidthPackageId',\n};\nexport default BWP_STATE;\nexport {\n BWPFilterFieldsDescriptor,\n templateQueryIdMap,\n BWPInstanceAliasList,\n BWPInvalidDemensions,\n GetInstanceQueryParams as BWPGetInstanceQueryParams,\n};\n","import _ from 'lodash';\nconst CDNFilterFields = {\n origin: [],\n domain: [],\n resourceId: [],\n status: {},\n serviceType: {},\n projectId: [],\n domainType: {},\n fullUrlCache: {},\n https: {},\n originPullProtocol: {},\n tagKey: [],\n};\n\nconst CDNFilterFieldsDescriptor = [\n {\n key: 'origin',\n enDescriptor: 'origin',\n cnDescriptor: '主源站',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'domain',\n enDescriptor: 'domain',\n cnDescriptor: '域名',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'resourceId',\n enDescriptor: 'resourceId',\n cnDescriptor: '域名id',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'status',\n enDescriptor: 'status',\n cnDescriptor: '域名状态',\n link: '',\n type: 'select',\n list: [\n { text: 'online', value: 'online' },\n { text: 'offline', value: 'offline' },\n { text: 'processing', value: 'processing' },\n ],\n },\n {\n key: 'serviceType',\n enDescriptor: 'serviceType',\n cnDescriptor: '业务类型',\n link: '',\n type: 'select',\n list: [\n { text: 'web', value: 'web' },\n { text: 'download', value: 'download' },\n { text: 'media', value: 'media' },\n ],\n },\n {\n key: 'projectId',\n enDescriptor: 'projectId',\n cnDescriptor: '项目ID',\n link: '',\n type: 'inputNumbermulti',\n },\n {\n key: 'domainType',\n enDescriptor: 'domainType',\n cnDescriptor: '主源站类型',\n link: '',\n type: 'select',\n list: [\n { text: '自有源', value: 'cname' },\n { text: 'cos接入', value: 'cos' },\n ],\n },\n {\n key: 'fullUrlCache',\n enDescriptor: 'fullUrlCache',\n cnDescriptor: '全路径缓存',\n link: '',\n type: 'select',\n list: [\n { text: '打开', value: 'on' },\n { text: '关闭', value: 'off' },\n ],\n },\n {\n key: 'https',\n enDescriptor: 'https',\n cnDescriptor: '是否配置https',\n link: '',\n type: 'select',\n list: [\n { text: 'on', value: 'on' },\n { text: 'off', value: 'off' },\n { text: 'processing', value: 'processing' },\n ],\n },\n {\n key: 'originPullProtocol',\n enDescriptor: 'originPullProtocol',\n cnDescriptor: '回源协议类型',\n link: '',\n type: 'select',\n list: [\n { text: 'http', value: 'http' },\n { text: 'follow', value: 'follow' },\n { text: 'https', value: 'https' },\n ],\n },\n {\n key: 'tagKey',\n enDescriptor: 'tagKey',\n cnDescriptor: '标签键',\n link: '',\n type: 'inputmulti',\n },\n];\n\nconst CDN_STATE = {\n region: 'ap-guangzhou',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'Domain',\n queries: {\n Limit: 20,\n Offset: 0,\n Filters: { ...CDNFilterFields },\n },\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n const Filters: any[] = [];\n _.forEach(queries.Filters, (item: any, key) => {\n // console.log('item', item, queries);\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n Filters.push({ Name: key, Value: _.uniq(item).slice(0, 5) });\n }\n } else if (_.isObject(item)) {\n if (!_.isEmpty(_.get(item, 'value', []))) {\n Filters.push({ Name: key, Value: _.get(item, 'value', []).slice(0, 5) });\n }\n }\n });\n if (Filters.length > 0) {\n params.Filters = Filters;\n }\n }\n return params;\n}\n\nconst CDNInstanceAliasList = ['Domain', 'ProjectId'];\n\nconst CDNInvalidDemensions = {\n projectId: 'ProjectId',\n domain: 'Domain',\n};\nconst templateQueryIdMap = {\n instance: 'Domain',\n};\nexport default CDN_STATE;\nexport {\n CDNFilterFieldsDescriptor,\n templateQueryIdMap,\n CDNInstanceAliasList,\n CDNInvalidDemensions,\n GetInstanceQueryParams as CDNGetInstanceQueryParams,\n};\n","import _ from 'lodash';\n\n// export const LBQueryDescriptor = [{\n// key: 'Offset',\n// enDescriptor: 'Offset',\n// cnDescriptor: '偏移量, 例如Offset=20&Limit=20 返回第 20 到 40 项',\n// link: '',\n// type: 'inputnumber',\n// min: 0,\n// },\n// {\n// key: 'Limit',\n// enDescriptor: 'Limit',\n// cnDescriptor: '单次请求返回的数量,默认为20,最小值为1,最大值为2000',\n// link: '',\n// type: 'inputnumber',\n// min: 1,\n// max: 2000,\n// },\n// {\n// key: 'AddressId',\n// enDescriptor: 'Address Id',\n// cnDescriptor: '标识 EIP 的唯一 ID ',\n// link: '',\n// type: 'inputmulti',\n// }\n// ];\n\nexport const LBFilterDescriptor = [\n {\n key: 'address-id',\n enDescriptor: 'Address ID',\n cnDescriptor: 'EIP 的唯一 ID ',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'address-name',\n enDescriptor: 'Address Name',\n cnDescriptor: 'EIP 名称 ',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'address-ip',\n enDescriptor: 'Address IP',\n cnDescriptor: 'EIP 的 IP 地址 ',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'address-status',\n enDescriptor: 'Address Status',\n cnDescriptor: 'EIP 的状态',\n link: '',\n type: 'select',\n list: [\n { value: 'CREATING', text: 'CREATING' },\n { value: 'BINDING', text: 'BINDING' },\n { value: 'BIND', text: 'BIND' },\n { value: 'UNBINDING', text: 'UNBINDING' },\n { value: 'UNBIND', text: 'UNBIND' },\n { value: 'OFFLINING', text: 'OFFLINING' },\n { value: 'BIND_ENI', text: 'BIND_ENI' },\n ],\n },\n {\n key: 'instance-id',\n enDescriptor: 'Instance ID',\n cnDescriptor: '实例ID ',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'private-ip-address',\n enDescriptor: 'Private IP Address',\n cnDescriptor: 'EIP 绑定的内网 IP',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'network-interface-id',\n enDescriptor: 'Network Interface ID',\n cnDescriptor: 'EIP 绑定的弹性网卡 ID',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'is-arrears',\n enDescriptor: 'Arrears',\n cnDescriptor: 'EIP 是否欠费 ',\n link: '',\n type: 'select',\n list: [\n { text: '正常', value: 'FALSE' },\n { text: '欠费', value: 'TRUE' },\n ],\n },\n];\n\n// const LBFilterFields = {\n// \"address-id\": [],\n// \"address-name\": [],\n// \"address-ip\": [],\n// \"address-status \": [],\n// \"instance-id \": [],\n// \"private-ip-address\": [],\n// \"network-interface-id \": [],\n// \"is-arrears \": [],\n// };\n\nconst InstanceKey = 'AddressIds';\nconst LB_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'AddressId',\n version: '',\n queries: {\n Offset: 0,\n Limit: 20,\n [InstanceKey]: [''],\n Filters: {\n 'address-id': [],\n 'address-name': [],\n 'address-ip': [],\n 'address-status ': [],\n 'instance-id ': [],\n 'private-ip-address': [],\n 'network-interface-id ': [],\n 'is-arrears ': [],\n },\n },\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n if (queries.instanceIdsChecked) {\n if (_.isArray(queries[InstanceKey])) {\n const InstanceIds = _.compact(queries[InstanceKey]);\n if (_.uniq(InstanceIds).length > 0) {\n params[InstanceKey] = _.uniq(InstanceIds).slice(0, 100);\n }\n }\n } else if (queries.filtersChecked) {\n const Filters: any[] = [];\n _.forEach(queries.Filters, (item: any, key) => {\n if (Filters.length > 9) {\n return;\n }\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n Filters.push({ Name: key, Values: _.uniq(item).slice(0, 5) });\n }\n } else if (_.isObject(item)) {\n if (!_.isEmpty(_.get(item, 'value', []))) {\n Filters.push({ Name: key, Values: _.get(item, 'value', []).slice(0, 5) });\n }\n }\n });\n if (Filters.length > 0) {\n params.Filters = Filters;\n }\n }\n }\n return params;\n}\n\nconst LBInstanceAliasList = ['AddressId', 'AddressName', 'AddressIp'];\n\n// 维度eip对应于实例中的哪个字段?映射\nconst LBInvalidDemensions = {\n eip: 'AddressIp',\n};\n\nconst templateQueryIdMap = {\n instance: 'AddressId',\n};\n// 从monitor维度到LB实例对应字段的映射\n// export const metric2Instance = {\n// functionName: 'FunctionName',\n// namespace: 'Namespace'\n// };\n\nexport default LB_STATE;\nexport {\n LBInstanceAliasList,\n LBInvalidDemensions,\n templateQueryIdMap,\n GetInstanceQueryParams as LBGetInstanceQueryParams,\n};\n\n// monitor监控数据默认支持的维度\n// export const LBDefaultDimensionList = ['functionName', 'namespace', 'version'];\n","import _ from 'lodash';\n\nconst NATGATEWAYInstanceAliasList = ['NatGatewayId', 'NatGatewayName'];\n\nconst NATGatewayFilterFields = {\n 'nat-gateway-id': [],\n 'nat-gateway-name': [],\n 'vpc-id': [],\n};\n\nconst NATGatewayFilterFieldsDescriptor = [\n {\n key: 'nat-gateway-id',\n enDescriptor: 'NatGateway ID',\n cnDescriptor: 'NAT网关统一 ID',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'nat-gateway-name',\n enDescriptor: 'NatGateway Name',\n cnDescriptor: 'NatGateway Name',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'vpc-id',\n enDescriptor: 'VPC ID',\n cnDescriptor: '私有网络 ID',\n link: '',\n type: 'inputmulti',\n },\n];\n\nconst NATGATEWAY_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'NatGatewayId',\n queries: {\n Limit: 20,\n Offset: 0,\n instanceIdsChecked: false,\n filtersChecked: false,\n NatGatewayIds: [''],\n Filters: { ...NATGatewayFilterFields },\n },\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n if (queries.instanceIdsChecked) {\n if (_.isArray(queries.NatGatewayIds)) {\n const NatGatewayIds = _.compact(queries.NatGatewayIds);\n if (_.uniq(NatGatewayIds).length > 0) {\n params.InstanceIds = _.uniq(NatGatewayIds).slice(0, 100);\n }\n }\n } else if (queries.filtersChecked) {\n const Filters: any[] = [];\n _.forEach(queries.Filters, (item: any, key) => {\n if (Filters.length > 9) {\n return;\n }\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n Filters.push({ Name: key, Values: _.uniq(item).slice(0, 5) });\n }\n } else if (_.isObject(item)) {\n if (!_.isEmpty(_.get(item, 'value', []))) {\n Filters.push({ Name: key, Values: _.get(item, 'value', []).slice(0, 5) });\n }\n }\n });\n if (Filters.length > 0) {\n params.Filters = Filters;\n }\n }\n }\n return params;\n}\n\nconst templateQueryIdMap = {\n instance: 'NatGatewayId',\n};\n\nconst NATInvalidDemensions = {\n natId: 'NatGatewayId',\n};\n\nexport default NATGATEWAY_STATE;\nexport {\n NATGatewayFilterFieldsDescriptor,\n NATGATEWAYInstanceAliasList,\n templateQueryIdMap,\n NATInvalidDemensions,\n GetInstanceQueryParams as NATGATEWAYGetInstanceQueryParams,\n};\n","import _ from 'lodash';\nconst CDNFilterFields = {\n origin: [],\n domain: [],\n resourceId: [],\n status: [],\n serviceType: [],\n projectId: [],\n domainType: [],\n fullUrlCache: [],\n https: [],\n originPullProtocol: [],\n tagKey: [],\n};\n\nconst OVCDNFilterFieldsDescriptor = [\n {\n key: 'origin',\n enDescriptor: 'origin',\n cnDescriptor: '主源站',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'domain',\n enDescriptor: 'domain',\n cnDescriptor: '域名',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'resourceId',\n enDescriptor: 'resourceId',\n cnDescriptor: '域名id',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'status',\n enDescriptor: 'status',\n cnDescriptor: '域名状态',\n link: '',\n type: 'select',\n list: [\n { text: 'online', value: 'online' },\n { text: 'offline', value: 'offline' },\n { text: 'processing', value: 'processing' },\n ],\n },\n {\n key: 'serviceType',\n enDescriptor: 'serviceType',\n cnDescriptor: '业务类型',\n link: '',\n type: 'select',\n list: [\n { text: 'web', value: 'web' },\n { text: 'download', value: 'download' },\n { text: 'media', value: 'media' },\n ],\n },\n {\n key: 'projectId',\n enDescriptor: 'projectId',\n cnDescriptor: '项目ID',\n link: '',\n type: 'inputNumbermulti',\n },\n {\n key: 'domainType',\n enDescriptor: 'domainType',\n cnDescriptor: '主源站类型',\n link: '',\n type: 'select',\n list: [\n { text: '自有源', value: 'cname' },\n { text: 'cos接入', value: 'cos' },\n ],\n },\n {\n key: 'fullUrlCache',\n enDescriptor: 'fullUrlCache',\n cnDescriptor: '全路径缓存',\n link: '',\n type: 'select',\n list: [\n { text: '打开', value: 'on' },\n { text: '关闭', value: 'off' },\n ],\n },\n {\n key: 'https',\n enDescriptor: 'https',\n cnDescriptor: '是否配置https',\n link: '',\n type: 'select',\n list: [\n { text: 'on', value: 'on' },\n { text: 'off', value: 'off' },\n { text: 'processing', value: 'processing' },\n ],\n },\n {\n key: 'originPullProtocol',\n enDescriptor: 'originPullProtocol',\n cnDescriptor: '回源协议类型',\n link: '',\n type: 'select',\n list: [\n { text: 'http', value: 'http' },\n { text: 'follow', value: 'follow' },\n { text: 'https', value: 'https' },\n ],\n },\n {\n key: 'tagKey',\n enDescriptor: 'tagKey',\n cnDescriptor: '标签键',\n link: '',\n type: 'inputmulti',\n },\n];\n\nconst OVCDN_STATE = {\n region: 'ap-guangzhou',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'Domain',\n queries: {\n Limit: 20,\n Offset: 0,\n Filters: { ...CDNFilterFields },\n },\n};\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n const Filters: any[] = [];\n _.forEach(queries.Filters, (item: any, key) => {\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n Filters.push({ Name: key, Value: _.uniq(item).slice(0, 5) });\n }\n } else if (_.isObject(item)) {\n if (!_.isEmpty(_.get(item, 'value', []))) {\n Filters.push({ Name: key, Value: _.get(item, 'value', []).slice(0, 5) });\n }\n }\n });\n if (Filters.length > 0) {\n params.Filters = Filters;\n }\n }\n return params;\n}\n\nconst OVCDNInstanceAliasList = ['Domain', 'ResourceId'];\n\nconst OVCDNInvalidDemensions = {\n projectId: 'ProjectId',\n domain: 'Domain',\n};\nconst templateQueryIdMap = {\n instance: 'Domain',\n};\nexport default OVCDN_STATE;\nexport {\n OVCDNFilterFieldsDescriptor,\n OVCDNInstanceAliasList,\n templateQueryIdMap,\n OVCDNInvalidDemensions,\n GetInstanceQueryParams as OVCDNGetInstanceQueryParams,\n};\n","module.exports = __WEBPACK_EXTERNAL_MODULE__69__;","import _ from 'lodash';\n\nconst TKE_STATE = {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'ClusterId',\n conditions: [],\n groupBys: '',\n queries: {\n Limit: 20,\n Offset: 0,\n instanceIdsChecked: false,\n filtersChecked: true,\n ClusterIds: [''],\n Filters: {\n ClusterName: [],\n ClusterType: [],\n ClusterStatus: [],\n 'tag-key': [],\n },\n },\n};\n\nconst TKEFilterFieldsDescriptor = [\n {\n key: 'ClusterName',\n enDescriptor: 'Cluster Name',\n cnDescriptor: '集群名',\n link: '',\n type: 'input',\n },\n {\n key: 'ClusterType',\n enDescriptor: 'Cluster Type',\n cnDescriptor: '集群类型',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'ClusterStatus',\n enDescriptor: 'Cluster Status',\n cnDescriptor: '集群状态',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'Tags',\n enDescriptor: 'Tags',\n cnDescriptor: '标签键值对',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'vpc-id',\n enDescriptor: 'VPC',\n cnDescriptor: 'VPC',\n link: '',\n type: 'input',\n },\n {\n key: 'tag-key',\n enDescriptor: 'Tag Key',\n cnDescriptor: '标签键',\n link: '',\n type: 'inputmulti',\n },\n {\n key: 'tag-value',\n enDescriptor: 'Tag Value',\n cnDescriptor: '标签值',\n link: '',\n type: 'inputmulti',\n },\n];\n\nconst TKEInstanceAliasList = ['ClusterId', 'ClusterName'];\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n if (queries.instanceIdsChecked) {\n if (_.isArray(queries.InstanceIds)) {\n const InstanceIds = _.compact(queries.InstanceIds);\n if (_.uniq(InstanceIds).length > 0) {\n params.InstanceIds = _.uniq(InstanceIds).slice(0, 100);\n }\n }\n } else if (queries.filtersChecked) {\n const Filters: any[] = [];\n _.forEach(queries.Filters, (item: any, key) => {\n if (Filters.length > 9) {\n return;\n }\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n Filters.push({ Name: key, Values: _.uniq(item).slice(0, 5) });\n }\n } else if (_.isObject(item)) {\n if (!_.isEmpty(_.get(item, 'value', []))) {\n Filters.push({ Name: key, Values: _.get(item, 'value', []).slice(0, 5) });\n }\n }\n });\n if (Filters.length > 0) {\n params.Filters = Filters;\n }\n }\n }\n return params;\n}\n\nexport default TKE_STATE;\n\nexport { TKEFilterFieldsDescriptor, TKEInstanceAliasList, GetInstanceQueryParams as TKEGetInstanceQueryParams };\n","import {\n APIGATEWAYInstanceAliasList,\n APIGATEWAYInvalidDemensions,\n namespace,\n templateQueryIdMap,\n regionSupported,\n keyInStorage,\n queryMonitorExtraConfg,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\nimport { GetServiceAPIInfo } from '../../common/constants';\nimport { fetchAllFactory } from '../../common/utils';\nimport instanceStorage from '../../common/datasourceStorage';\nimport { t } from '../../../locale';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = APIGATEWAYInstanceAliasList;\n InvalidDimensions = APIGATEWAYInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'apigateway',\n action: 'DescribeServicesStatus',\n responseField: 'ServiceSet',\n };\n\n keyInStorage = keyInStorage;\n queryMonitorExtraConfg = queryMonitorExtraConfg;\n\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n // getFilterDropdown({ field }) {\n // return super.getRegions();\n // }\n getRegions() {\n return Promise.resolve(regionSupported.map(({ value }) => ({ value, text: t(value) })));\n }\n async getEnvironmentNameList(params: any) {\n const { region, instanceId } = params;\n const serviceInfo = GetServiceAPIInfo(region, this.service);\n\n // 从分页数据,获取全量数据\n const res = await fetchAllFactory(\n (data) => {\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data,\n },\n serviceInfo.service,\n { region, action: 'DescribeServiceEnvironmentList' }\n );\n },\n {\n ServiceId: instanceId,\n },\n 'EnvironmentList'\n );\n const [rs] = res;\n return rs;\n }\n async fetchMetricData(action: string, region: string, instance: any) {\n // console.log({ action, region, instance });\n if (action === 'DescribeServiceEnvironmentList') {\n const rs = await this.getEnvironmentNameList({ region, instanceId: instance[this.templateQueryIdMap.instance] });\n const result = rs.map((o) => {\n o._InstanceAliasValue = o[this.templateQueryIdMap.environmentName];\n return {\n text: o[this.templateQueryIdMap.environmentName],\n value: o[this.templateQueryIdMap.environmentName],\n };\n });\n await instanceStorage.setExtraStorage(this.service, this.keyInStorage.environmentList, rs);\n return result;\n }\n return [];\n }\n}\n","import {\n BMINTRALBInstanceAliasList,\n BMINTRALBInvalidDemensions,\n namespace,\n templateQueryIdMap,\n isValidMetric,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\nimport { t } from '../../../locale';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = BMINTRALBInstanceAliasList;\n InvalidDimensions = BMINTRALBInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'bmlb',\n action: 'DescribeLoadBalancers',\n responseField: 'LoadBalancerSet',\n interceptor: {\n request: (params) => ({\n ...params,\n LoadBalancerType: 'internal',\n }), // 设置一些请求参数的 默认值\n },\n };\n RegionMap = {};\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n // 重写getRegion\n getRegions() {\n return this.doRequest(\n {\n url: this.url + '/bm',\n },\n 'bm',\n { action: 'DescribeRegions', region: 'ap-guangzhou' }\n ).then((response) => {\n // 缓存,后面获取可用区zone\n this.RegionMap = _.keyBy(response.RegionInfoSet, 'Region');\n return _.map(response.RegionInfoSet || [], (item) => {\n return {\n text: t(item.Region),\n value: item.Region,\n };\n });\n });\n }\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return _.compact(\n rawSet.map((item) => {\n if (isValidMetric(item)) {\n return item;\n }\n return null;\n })\n );\n }\n}\n","import { BMLBInstanceAliasList, CPMInvalidDemensions, namespace, templateQueryIdMap, isValidMetric } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\nimport { t } from '../../../locale';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = BMLBInstanceAliasList;\n InvalidDimensions = CPMInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'bmlb',\n action: 'DescribeLoadBalancers',\n responseField: 'LoadBalancerSet',\n interceptor: {\n request: (params) => ({\n ...params,\n LoadBalancerType: 'open',\n }), // 设置一些请求参数的 默认值\n },\n };\n RegionMap = {};\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return _.compact(\n rawSet.map((item) => {\n if (isValidMetric(item)) {\n return item;\n }\n return null;\n })\n );\n }\n // 重写getRegion\n getRegions() {\n return this.doRequest(\n {\n url: this.url + '/bm',\n },\n 'bm',\n { action: 'DescribeRegions', region: 'ap-guangzhou' }\n ).then((response) => {\n // 缓存,后面获取可用区zone\n this.RegionMap = _.keyBy(response.RegionInfoSet, 'Region');\n return _.map(response.RegionInfoSet || [], (item) => {\n return {\n text: t(item.Region),\n value: item.Region,\n };\n });\n });\n }\n}\n","import {\n BMPCXInstanceAliasList,\n BMPCXInvalidDemensions,\n namespace,\n templateQueryIdMap,\n modifyDimensons,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\nimport { t } from '../../../locale';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = BMPCXInstanceAliasList;\n InvalidDimensions = BMPCXInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'bmvpc',\n action: 'DescribeVpcPeerConnections',\n responseField: 'VpcPeerConnectionSet',\n };\n MetricReqConfig = {\n resultFilter: modifyDimensons,\n };\n RegionMap = {};\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n // 重写getRegion\n getRegions() {\n return this.doRequest(\n {\n url: this.url + '/bm',\n },\n 'bm',\n { action: 'DescribeRegions', region: 'ap-guangzhou' }\n ).then((response) => {\n // 缓存,后面获取可用区zone\n this.RegionMap = _.keyBy(response.RegionInfoSet, 'Region');\n return _.map(response.RegionInfoSet || [], (item) => {\n return {\n text: t(item.Region),\n value: item.Region,\n };\n });\n });\n }\n}\n","import { BWPInstanceAliasList, BWPInvalidDemensions } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\n\nexport default class BWPDatasource extends BaseDatasource {\n Namespace = 'QCE/BWP';\n InstanceAliasList = BWPInstanceAliasList;\n InvalidDimensions = BWPInvalidDemensions;\n templateQueryIdMap = {\n instance: 'BandwidthPackageId',\n };\n InstanceReqConfig = {\n service: 'vpc',\n action: 'DescribeBandwidthPackages',\n responseField: 'BandwidthPackageSet',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n}\n","import { CBSInstanceAliasList, CBSInvalidDemensions, namespace, templateQueryIdMap, isValidMetric } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = CBSInstanceAliasList;\n InvalidDimensions = CBSInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'cbs',\n action: 'DescribeDisks',\n responseField: 'DiskSet',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return _.filter(rawSet, isValidMetric);\n }\n}\n","import _ from 'lodash';\nimport {\n CDBInstanceAliasList,\n CDBInvalidDemensions,\n isValidMetric,\n modifyDimensons,\n templateQueryIdMap,\n} from './query_def';\nimport { GetServiceAPIInfo } from '../../common/constants';\nimport { BaseDatasource } from '../_base/datasource';\n\nexport default class CDBDatasource extends BaseDatasource {\n Namespace = 'QCE/CDB';\n InstanceAliasList = CDBInstanceAliasList;\n InvalidDimensions = CDBInvalidDemensions;\n templateQueryIdMap = {\n instance: 'InstanceId',\n };\n InstanceReqConfig = {\n service: 'cdb',\n action: 'DescribeDBInstances',\n responseField: 'Items',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return _.compact(\n rawSet.map((item) => {\n if (isValidMetric(item)) {\n return modifyDimensons(item);\n }\n return null;\n })\n );\n }\n /**\n * 获取 可用区\n * @param region 地域信息\n */\n getZones(region) {\n const serviceInfo = GetServiceAPIInfo(region, 'cvm');\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n },\n serviceInfo.service,\n { region, action: 'DescribeZones' }\n ).then((response) => {\n return _.filter(\n _.map(response.ZoneSet || [], (item) => {\n return { text: item.ZoneName, value: item.ZoneId, ZoneState: item.ZoneState, Zone: item.Zone };\n }),\n (item) => item.ZoneState === 'AVAILABLE'\n );\n });\n }\n // 仅对维度组合是InstanceId和InstanceType的指标,其他指标不支持\n getDefaultInsObj(ins: string) {\n return {\n [templateQueryIdMap.instance]: ins,\n InstanceType: 1,\n };\n }\n}\n","import _ from 'lodash';\nimport { CDNInstanceAliasList, CDNInvalidDemensions } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\n\nexport default class CDNDatasource extends BaseDatasource {\n Namespace = 'QCE/CDN';\n InstanceAliasList = CDNInstanceAliasList;\n InvalidDimensions = CDNInvalidDemensions;\n templateQueryIdMap = {\n instance: 'Domain',\n };\n InstanceReqConfig = {\n service: 'cdn',\n action: 'DescribeDomains',\n responseField: 'Domains',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n async metricFindQuery(query: any, regex?: string) {\n return super.metricFindQuery({ ...query, ...{ region: 'ap-guangzhou' } }, regex);\n }\n}\n","import { CDNPROVINCEInstanceAliasList, CDNPROVINCEInvalidDemensions, namespace, templateQueryIdMap } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\nimport { GetServiceAPIInfo } from '../../common/constants';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = CDNPROVINCEInstanceAliasList;\n InvalidDimensions = CDNPROVINCEInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'cdn',\n action: 'DescribeDomains',\n responseField: 'Domains',\n };\n extrasAlias = ['isp', 'district'];\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n // getFilterDropdown({ field }) {\n // return super.getRegions();\n // }\n async metricFindQuery(query: any, regex?: string) {\n return super.metricFindQuery({ ...query, ...{ region: 'ap-guangzhou' } }, regex);\n }\n async getConsumerList(params: any) {\n const { region, field } = params;\n const serviceInfo = GetServiceAPIInfo(region, 'cdn');\n\n // 从分页数据,获取全量数据\n const rs = await this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data: {\n Name: field,\n },\n },\n serviceInfo.service,\n { action: 'DescribeMapInfo' }\n );\n return (rs.MapInfoList || []).map((o) => {\n return {\n text: o.Name,\n value: o.Name,\n };\n });\n }\n async fetchMetricData(action: string, region: string, instance: any, query: any) {\n if (action === 'DescribeMapInfo') {\n const { name: field } = query;\n const rs = await this.getConsumerList({ region, field });\n return rs;\n }\n return [];\n }\n}\n","import {\n CEIPSUMMARYInstanceAliasList,\n CEIPInvalidDemensions,\n namespace,\n templateQueryIdMap,\n modifyDimensons,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = CEIPSUMMARYInstanceAliasList;\n InvalidDimensions = CEIPInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'vpc',\n action: 'DescribeAddresses',\n responseField: 'AddressSet',\n interceptor: {\n request: (params) => {\n const { Filters } = params;\n if (!Filters) {\n params.Filters = [];\n }\n params.Filters.push({\n Name: 'address-type',\n Values: ['AnycastEIP'],\n });\n return params;\n }, // 设置一些请求参数的 默认值\n // response: (data: unknown[]) =>[\n // {\n // AddressId: 'AddressId',\n // AddressIp: '111.22.3.4'\n // },\n // ],\n },\n };\n MetricReqConfig = {\n resultFilter: modifyDimensons,\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n\n // async getInstances(region, params = {}) {\n // const rawSet = await super.getInstances(region, params);\n // return rawSet.filter((item) => item.AddressType === 'AnycastEIP');\n // }\n\n // async getVariableInstances(region, query = {}) {\n // const rawSet = await super.getVariableInstances(region, query);\n // return rawSet.filter((item) => item.AddressType === 'AnycastEIP');\n // }\n}\n","import { CESInstanceAliasList, CESInvalidDemensions, namespace, templateQueryIdMap } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = CESInstanceAliasList;\n InvalidDimensions = CESInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'es',\n action: 'DescribeInstances',\n responseField: 'InstanceList',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n}\n","import _ from 'lodash';\nimport { BaseDatasource } from '../_base/datasource';\nimport { CFSInstanceAliasList, CFSInvalidDemensions, regionSupported } from './query_def';\nimport { t } from '../../../locale';\nexport default class CFSDatasource extends BaseDatasource {\n InstanceKey: string;\n Namespace: string;\n InstanceAliasList: string[];\n InvalidDimensions: Record;\n templateQueryIdMap = {\n instance: 'FileSystemId',\n };\n extrasAlias = ['version'];\n InstanceReqConfig: { service?: string | undefined; action: string; responseField: string };\n\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n\n this.Namespace = 'QCE/CFS';\n this.InstanceAliasList = CFSInstanceAliasList;\n this.InvalidDimensions = CFSInvalidDemensions;\n this.InstanceReqConfig = {\n service: 'cfs',\n action: 'DescribeCfsFileSystems',\n responseField: 'FileSystems',\n };\n }\n getRegions() {\n return Promise.resolve(regionSupported.map(({ value }) => ({ value, text: t(value) })));\n }\n}\n","import _, { flattenDeep } from 'lodash';\nimport { GetServiceAPIInfo } from '../../common/constants';\nimport { fetchAllFactory } from '../../common/utils';\nimport { BaseDatasource } from '../_base/datasource';\nimport {\n CKAFKAInstanceAliasList,\n CKAFKATopicAliasList,\n CKAFKAInvalidDemensions,\n templateQueryIdMap,\n keyInStorage,\n queryMonitorExtraConfg,\n} from './query_def';\n\nimport instanceStorage from '../../common/datasourceStorage';\n\nexport default class CKFKADatasource extends BaseDatasource {\n Namespace = 'QCE/CKAFKA';\n InstanceAliasList = CKAFKAInstanceAliasList;\n TopicAliasList = CKAFKATopicAliasList;\n InvalidDimensions = CKAFKAInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n InstanceReqConfig = {\n service: 'ckafka',\n action: 'DescribeInstances',\n responseField: 'InstanceList',\n };\n extraMetricDims = ['topicId'];\n // extrasAlias = ['topicId', 'consumerGroup', 'partition'];\n keyInStorage = keyInStorage;\n queryMonitorExtraConfg = queryMonitorExtraConfg;\n consumerGroupCache = {};\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n\n async getConsumerGroups(region, params) {\n const serviceInfo = GetServiceAPIInfo(region, 'ckafka');\n let { InstanceId, groupname = '', topicid = '' } = params;\n groupname = this.getVariable(groupname); // 将模板转换为真实值\n topicid = this.getVariable(topicid); // 将模板转换为真实值\n try {\n groupname = JSON.parse(groupname)[templateQueryIdMap.groupName];\n topicid = JSON.parse(topicid)[templateQueryIdMap.topicId];\n } catch (e) {}\n let consumerGoup = this.consumerGroupCache[InstanceId];\n if (!consumerGoup) {\n // 从分页数据,获取全量数据\n consumerGoup = await fetchAllFactory(\n (data) => {\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data,\n },\n serviceInfo.service,\n { region, action: 'DescribeConsumerGroup' }\n );\n },\n _.pick(params, 'InstanceId'),\n ['GroupListForMonitor', 'TopicListForMonitor', 'PartitionListForMonitor', 'GroupList']\n );\n // topick数据从DescribeTopic\n const topicList = await fetchAllFactory(\n (data) => {\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data,\n },\n serviceInfo.service,\n { region, action: 'DescribeTopic' }\n );\n },\n _.pick(params, 'InstanceId'),\n ['TopicList']\n );\n consumerGoup[1] = flattenDeep(topicList);\n console.log({ consumerGoup, topicList });\n this.consumerGroupCache[InstanceId] = consumerGoup;\n }\n\n let [GroupList, TopicList, PartitionList, GroupDetailList] = consumerGoup;\n // 无重复数组\n TopicList = _.uniqBy(TopicList, (item) => (item as any).TopicId);\n GroupList = _.uniqBy(GroupList, (item) => (item as any).GroupName);\n PartitionList = _.uniqBy(PartitionList, (item) => (item as any).PartitionId);\n GroupDetailList = _.uniqBy(GroupDetailList, (item) => (item as any).ConsumerGroupName);\n // 如果传入消费者信息,consumergroupname,获取该用户的订阅信息列表\n const SubscribedInfos = GroupDetailList.find((d) => d.ConsumerGroupName === groupname)?.SubscribedInfo || [];\n // 这里为了兼容PartitonList格式,最后转化为数组对象的方式\n const partitions =\n SubscribedInfos.find((sub) => sub.TopicId === topicid)?.Partition?.map((p) => ({\n [templateQueryIdMap.partition]: p,\n })) || [];\n return {\n GroupList,\n TopicList:\n SubscribedInfos.length > 0\n ? SubscribedInfos.map(({ TopicId, TopicName }) => ({ TopicId, TopicName }))\n : TopicList,\n PartitionList: partitions.length > 0 ? partitions : PartitionList,\n };\n }\n formatTopicVarDisplay(topic: Record, displayTpl: string | undefined, topicAlias: string) {\n if (displayTpl) {\n return displayTpl.replace(/\\$\\{(\\w+)\\}/g, (a, b) => {\n if (!b || !this.TopicAliasList.includes(b)) {\n return '';\n }\n return this.getAliasValue(topic, b);\n });\n }\n return this.getAliasValue(topic, topicAlias);\n }\n // 查询指标下的数据\n async fetchMetricData(action: string, region: string, instance: any, query: any) {\n let { topicalias, groupname, topicid } = query;\n const result = await this.getConsumerGroups(region, {\n InstanceId: instance.InstanceId,\n groupname,\n topicid,\n });\n let { display } = query;\n const { TopicList, GroupList, PartitionList } = result;\n topicalias = this.TopicAliasList.includes(topicalias) ? topicalias : this.templateQueryIdMap.topicId;\n\n const rs = {\n GroupList: GroupList.map((group) => {\n group._InstanceAliasValue = group.GroupName;\n return {\n text: group.GroupName,\n value: group[templateQueryIdMap.groupName],\n };\n }),\n TopicList: TopicList.map((topic) => {\n const topicAlias = this.formatTopicVarDisplay(topic, display, topicalias);\n topic._InstanceAliasValue = topicAlias || topic[templateQueryIdMap.topicId];\n return {\n text: topicAlias || topic[templateQueryIdMap.topicId],\n value: topic[templateQueryIdMap.topicId], // 为了获取多维度的值,这里完全可以使用JSON.stringify()将整个对象放进去\n TopicName: topic.TopicName,\n };\n }),\n PartitionList: PartitionList.map((par) => {\n par._InstanceAliasValue = par[templateQueryIdMap.partition];\n return {\n text: par[templateQueryIdMap.partition],\n value: par[templateQueryIdMap.partition],\n };\n }),\n };\n await instanceStorage.setExtraStorage(this.service, this.keyInStorage.TopicList, TopicList);\n await instanceStorage.setExtraStorage(this.service, this.keyInStorage.GroupList, GroupList);\n await instanceStorage.setExtraStorage(this.service, this.keyInStorage.PartitionList, PartitionList);\n // console.log({ res1, res2, res3 });\n // console.log({rs});\n // 根据action返回指定的维度数据列表\n switch (action) {\n case 'DescribeTopicList':\n return rs.TopicList;\n case 'DescribeGroup':\n return rs.GroupList;\n case 'DescribePartion':\n return rs.PartitionList;\n default:\n return [];\n }\n }\n\n // async getOtherAlias(datapoints) {\n // let dimension;\n // for(let j = 0; j < datapoints.Dimensions.length; j++){\n // if(datapoints.Dimensions[j] !== 'InstanceName'){\n // dimension.push(datapoints.Dimensions[j])\n // }\n // }\n // console.log(dimension);\n\n // return dimension\n // }\n}\n","import {\n InstanceAliasList,\n LOADBALANCEListenerAliasList,\n LOADBALANCEServerAliasList,\n LOADBALANCEVALIDDIMENSIONS,\n templateQueryIdMap,\n keyInStorage,\n CANDIATEDIMENSIONS,\n queryMonitorExtraConfg,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\nimport { GetServiceAPIInfo } from '../../common/constants';\nimport { fetchAllFactory } from '../../common/utils';\nimport instanceStorage from '../../common/datasourceStorage';\n\nexport default class DCDatasource extends BaseDatasource {\n // Namespace = namespace;\n InstanceAliasList = InstanceAliasList;\n ListenerAliasList = LOADBALANCEListenerAliasList;\n ServerAliasList = LOADBALANCEServerAliasList;\n CandiateDimensions = CANDIATEDIMENSIONS;\n // InvalidDimensions = LOADBALANCEVALIDDIMENSIONS;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n // InstanceReqConfig = {\n // service: 'clb',\n // action: 'DescribeLoadBalancers',\n // responseField: 'LoadBalancerSet',\n // };\n keyInStorage = keyInStorage;\n queryMonitorExtraConfg = queryMonitorExtraConfg;\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n // getFilterDropdown({ field }) {\n // return super.getRegions();\n // }\n getInvalidDimensions(selfIns: any, tagret: any) {\n if (selfIns.service === 'lbPrivate' || (selfIns.service === 'lbPublic' && tagret.servers))\n return { ...LOADBALANCEVALIDDIMENSIONS, vpcId: 'NumericalVpcId' };\n return LOADBALANCEVALIDDIMENSIONS;\n }\n getInstanceReqConfig(selfIns: any) {\n const res: any = {\n service: 'clb',\n action: 'DescribeLoadBalancers',\n responseField: 'LoadBalancerSet',\n };\n if (selfIns.service === 'lbPrivate' || selfIns.service === 'loadBalance') {\n res.interceptor = {\n request: (param) => ({ ...param, LoadBalancerType: 'INTERNAL' }),\n };\n }\n if (selfIns.service === 'lbPublic') {\n res.interceptor = {\n request: (param) => ({ ...param, LoadBalancerType: 'OPEN' }),\n };\n }\n return res;\n }\n async getListenerList(params: any) {\n const { region, instanceId } = params;\n const serviceInfo = GetServiceAPIInfo(region, 'clb');\n\n // 从分页数据,获取全量数据\n const res = await fetchAllFactory(\n (data) => {\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data,\n },\n serviceInfo.service,\n { region, action: 'DescribeListeners' }\n );\n },\n {\n LoadBalancerId: instanceId,\n },\n 'Listeners'\n );\n const [rs] = res;\n return rs;\n }\n formatVariableDisplay(data: Record, displayTpl: string | undefined, alias: string, aliasList: string[]) {\n if (displayTpl) {\n return displayTpl.replace(/\\$\\{(\\w+)\\}/g, (a, b) => {\n if (!b || !aliasList.includes(b)) {\n return '';\n }\n return this.getAliasValue(data, b);\n });\n }\n return this.getAliasValue(data, alias);\n }\n async getServerList(params: any) {\n const { region, instanceId, listenerId } = params;\n const serviceInfo = GetServiceAPIInfo(region, 'clb');\n\n const res = await this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data: { LoadBalancerId: instanceId, ListenerIds: [listenerId] },\n },\n serviceInfo.service,\n { region, action: 'DescribeTargets' }\n );\n const { Listeners } = res;\n const serversList = _.reduce(\n Listeners,\n (prev, item) => {\n const { Rules, Targets } = item;\n if (!_.isEmpty(Rules)) {\n return _.concat(prev, _.flatten(_.map(Rules, (elem) => (_.isEmpty(elem.Targets) ? [] : elem.Targets))));\n }\n if (!_.isEmpty(Targets)) {\n return _.concat(prev, Targets);\n }\n return prev;\n },\n []\n );\n return serversList;\n }\n async fetchMetricData(action: string, region: string, instance: any, query: any) {\n const { display } = query;\n if (action === 'DescribeListeners') {\n const rs = await this.getListenerList({ region, instanceId: instance[this.templateQueryIdMap.instance] });\n let { listeneralias } = query;\n listeneralias = this.ListenerAliasList.includes(listeneralias) ? listeneralias : this.templateQueryIdMap.listener;\n const result = rs.flatMap((o) => {\n const listenAlias = this.formatVariableDisplay(o, display, listeneralias, this.ListenerAliasList);\n const lisId = o[this.templateQueryIdMap.listener];\n o._InstanceAliasValue = listenAlias || lisId;\n // if (!o[listeneralias]) return [];\n return {\n text: listenAlias || lisId,\n value: lisId,\n };\n });\n await instanceStorage.setExtraStorage(this.service, this.keyInStorage.listener, rs);\n return result;\n }\n if (action === 'DescribeServer' || action === 'DescribeServerPort') {\n const { listenerid, serverprivateip, serveralias } = query;\n const serverPrivateIp = this.getVariable(serverprivateip);\n const serversList = await this.getServerList({\n region,\n instanceId: instance[this.templateQueryIdMap.instance],\n listenerId: this.getVariable(listenerid),\n });\n const serverAlias = this.ServerAliasList.includes(serveralias) ? serveralias : this.templateQueryIdMap.servers;\n const result = _.chain(serversList)\n .filter((item) => {\n if (action === 'DescribeServer') {\n return true;\n }\n return serverPrivateIp === _.get(item, 'PrivateIpAddresses.0');\n })\n .map((item) => {\n const alias = this.formatVariableDisplay(item, display, serverAlias, this.ServerAliasList);\n const id = item[this.templateQueryIdMap.servers][0];\n item._InstanceAliasValue = alias || id;\n return action === 'DescribeServer'\n ? {\n text: alias || id,\n value: id,\n }\n : {\n text: `${_.get(item, 'Port')}`,\n value: _.get(item, 'Port'),\n };\n })\n .value();\n await instanceStorage.setExtraStorage(this.service, this.keyInStorage.servers, serversList);\n return action === 'DescribeServer' ? result : _.uniqBy(result, 'text');\n }\n return [];\n }\n}\n","import {\n CLSInstanceAliasList,\n CLSInvalidDemensions,\n namespace,\n templateQueryIdMap,\n regionSupported,\n modifyDimensons,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\nimport { t } from '../../../locale';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = CLSInstanceAliasList;\n InvalidDimensions = CLSInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'cls',\n action: 'DescribeTopics',\n responseField: 'Topics',\n };\n\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n // getFilterDropdown({ field }) {\n // return super.getRegions();\n // }\n getRegions() {\n return Promise.resolve(regionSupported.map(({ value }) => ({ value, text: t(value) })));\n }\n // async getInstances(region, params = {}) {\n // const superRes = await super.getInstances(region, params);\n // console.log({ superRes });\n // }\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return _.compact(\n rawSet.map((item) => {\n return modifyDimensons(item);\n })\n );\n }\n}\n","import { BaseDatasource } from '../_base/datasource';\nimport { InvalidDemensions, InstanceAliasList, templateQueryIdMap } from './query_def';\n\nexport default class CmqDatasource extends BaseDatasource {\n InvalidDimensions: Record = InvalidDemensions;\n InstanceAliasList: string[] = InstanceAliasList;\n templateQueryIdMap = templateQueryIdMap;\n InstanceReqConfig = {\n service: 'cmq',\n action: 'DescribeQueueDetail',\n responseField: 'QueueSet',\n };\n\n async getMetrics(region = 'ap-guangzhou') {\n const rawMetric = await super.getMetrics(region);\n return rawMetric.map((metric) => {\n let dims = metric.Dimensions[0].Dimensions;\n dims = Array.from(new Set([...dims, 'queueId', 'queueName']));\n metric.Dimensions[0].Dimensions = dims;\n return metric;\n });\n }\n}\n","import { GetServiceAPIInfo } from '../../common/constants';\nimport { fetchAllFactory } from '../../common/utils';\nimport { BaseDatasource } from '../_base/datasource';\nimport {\n InvalidDemensions,\n InstanceAliasList,\n templateQueryIdMap,\n keyInStorage,\n queryMonitorExtraConfg,\n} from './query_def';\nimport instanceStorage from '../../common/datasourceStorage';\n\nexport default class CmqTopicDatasource extends BaseDatasource {\n Namespace = 'QCE/CMQTOPIC';\n InvalidDimensions: Record = InvalidDemensions;\n InstanceAliasList: string[] = InstanceAliasList;\n templateQueryIdMap = templateQueryIdMap;\n InstanceReqConfig = {\n service: 'cmq',\n action: 'DescribeTopicDetail',\n responseField: 'TopicSet',\n };\n keyInStorage = keyInStorage;\n queryMonitorExtraConfg = queryMonitorExtraConfg;\n extraMetricDims = ['subscriptionId']; // 多选\n\n async fetchAllSubscription(region: string, params: any) {\n const serviceInfo = GetServiceAPIInfo(region, 'cmq');\n // console.log(serviceInfo, 'serviceinfo');\n\n // 从分页数据,获取全量数据\n const rs = await fetchAllFactory(\n (data) => {\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data,\n },\n serviceInfo.service,\n { region, action: 'DescribeSubscriptionDetail' }\n );\n },\n params,\n 'SubscriptionSet'\n );\n\n return rs[0];\n }\n\n async fetchMetricData(action: string, region: string, instance: any) {\n let result;\n switch (action) {\n case 'DescribeSubscriptionDetail':\n result = await this.fetchAllSubscription(region, { TopicName: instance.TopicName });\n // eslint-disable-next-line no-case-declarations\n const rs = result.map((item) => {\n item._InstanceAliasValue = item.SubscriptionId;\n return { text: item.SubscriptionId, value: item[templateQueryIdMap.subscription] };\n });\n await instanceStorage.setExtraStorage(this.service, this.keyInStorage.subscriptionId, result);\n return rs;\n default:\n return [];\n }\n }\n\n async getMetrics(region = 'ap-guangzhou') {\n const rawMetric = await super.getMetrics(region);\n return rawMetric.map((metric) => {\n let dims = metric.Dimensions[0].Dimensions;\n dims.push('topicId');\n if (['NumOfNotify', 'NumOfSuccNotify'].includes(metric.MetricName)) {\n dims.push('subscriptionId');\n }\n\n dims = Array.from(new Set(dims));\n metric.Dimensions[0].Dimensions = dims;\n return metric;\n });\n }\n}\n","import { BaseDatasource } from '../_base/datasource';\n\ninterface BucketListResult {\n Owner: { ID: 'string'; DisplayName: 'string' };\n Buckets: { Name: string; Region: string }[];\n}\n\nexport default class CosDatasource extends BaseDatasource {\n InvalidDimensions: Record = {};\n InstanceAliasList: string[] = ['BucketName'];\n templateQueryIdMap = {\n instance: 'BucketName',\n };\n InstanceReqConfig = {} as any; // 不必要的配置\n cosURL: string;\n\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n this.cosURL = `/api/datasources/${this.instanceSettings.id}/resources/tc_cos_list`;\n }\n async getInstances(region: string) {\n return this.backendSrv\n .datasourceRequest({\n url: this.cosURL,\n method: 'GET',\n params: { region },\n headers: { 'Content-Type': 'application/json' },\n })\n .then((res) => {\n let { data }: { data: BucketListResult } = res;\n data = data || ({} as any);\n let { Buckets } = data;\n Buckets = Buckets || [];\n\n // name contains appid,see detail https://cloud.tencent.com/document/product/436/8291\n return Buckets.map((item) => ({\n ...item,\n BucketName: item.Name,\n bucket: item.Name,\n appid: item.Name.split('-').slice(-1)[0],\n }));\n });\n }\n\n async getVariableInstances(region) {\n return this.getInstances(region);\n }\n}\n","import {\n CPMInstanceAliasList,\n CPMInvalidDemensions,\n namespace,\n templateQueryIdMap,\n modifyDimensons,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport { GetServiceAPIInfo } from '../../common/constants';\nimport _ from 'lodash';\nimport { t } from '../../../locale';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = CPMInstanceAliasList;\n InvalidDimensions = CPMInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'bm',\n action: 'DescribeDevices',\n responseField: 'DeviceInfoSet',\n };\n RegionMap = {};\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n // 重写getRegion\n getRegions() {\n return this.doRequest(\n {\n url: this.url + '/bm',\n },\n 'bm',\n { action: 'DescribeRegions', region: 'ap-guangzhou' }\n ).then((response) => {\n // 缓存,后面获取可用区zone\n this.RegionMap = _.keyBy(response.RegionInfoSet, 'Region');\n return _.map(response.RegionInfoSet || [], (item) => {\n return {\n text: t(item.Region),\n value: item.Region,\n };\n });\n });\n }\n\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return rawSet.map((item) => modifyDimensons(item));\n }\n\n getFilterDropdown({ field, region }) {\n if (field === 'DeviceClassCode') {\n const serviceInfo = GetServiceAPIInfo(region, 'bm');\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n },\n 'bm',\n { region, action: 'DescribeDeviceClass' }\n ).then((response) => {\n return _.map(response.DeviceClassSet || [], (item) => {\n return { text: item.DeviceClassCode, value: item.DeviceClassCode };\n });\n });\n }\n return [];\n }\n}\n","import _ from 'lodash';\nimport { CVMInstanceAliasList, isValidMetric, modifyDimensons } from './query_def';\nimport { GetServiceAPIInfo } from '../../common/constants';\nimport { BaseDatasource } from '../_base/datasource';\n\nexport default class CVMDatasource extends BaseDatasource {\n Namespace = 'QCE/CVM';\n InstanceAliasList = CVMInstanceAliasList;\n InvalidDimensions = {};\n templateQueryIdMap = {\n instance: 'InstanceId',\n };\n InstanceReqConfig = {\n service: 'cvm',\n action: 'DescribeInstances',\n responseField: 'InstanceSet',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return _.compact(\n rawSet.map((item) => {\n if (isValidMetric(item)) {\n return modifyDimensons(item);\n }\n return null;\n })\n );\n }\n\n getRegions() {\n return this.doRequest(\n {\n url: this.url + '/api',\n data: { Product: 'cvm' },\n },\n 'api',\n { action: 'DescribeRegions' }\n ).then((response) => {\n return _.filter(\n _.map(response.RegionSet || [], (item) => {\n return {\n text: item.RegionName,\n value: item.Region,\n RegionState: item.RegionState,\n };\n }),\n (item) => item.RegionState === 'AVAILABLE'\n );\n });\n }\n\n getZones(region) {\n const serviceInfo = GetServiceAPIInfo(region, 'api');\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data: { Product: 'cvm' },\n },\n serviceInfo.service,\n { region, action: 'DescribeZones' }\n ).then((response) => {\n return _.filter(\n _.map(response.ZoneSet || [], (item) => {\n return { text: item.ZoneName, value: item.Zone, ZoneState: item.ZoneState, Zone: item.Zone };\n }),\n (item) => item.ZoneState === 'AVAILABLE'\n );\n });\n }\n}\n","import {\n CYNOSDBMYSQLInstanceAliasList,\n CYNOSDBInvalidDemensions,\n namespace,\n templateQueryIdMap,\n modifyDimensons,\n checkKeys,\n} from './query_def';\nimport _ from 'lodash';\nimport { BaseDatasource } from '../_base/datasource';\n// import { t } from '../../../locale';\n\nexport default class CYNOSDBMYSQLDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = CYNOSDBMYSQLInstanceAliasList;\n InvalidDimensions = CYNOSDBInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n checkKeys = checkKeys;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'cynosdb',\n action: 'DescribeInstances',\n responseField: 'InstanceSet',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return rawSet.map((item) => modifyDimensons(item));\n }\n // getRegions() {\n // return Promise.resolve(regionSupported.map(({ value }) => ({ value, text: t(value) })));\n // }\n getRegions() {\n return this.doRequest(\n {\n url: this.url + '/api',\n data: { Product: 'cynosdbmysql' },\n },\n 'api',\n { action: 'DescribeRegions' }\n ).then((response) => {\n return _.filter(\n _.map(response.RegionSet || [], (item) => {\n return {\n text: item.RegionName,\n value: item.Region,\n RegionState: item.RegionState,\n };\n }),\n (item) => item.RegionState === 'AVAILABLE'\n );\n });\n }\n // 仅对维度组合是InstanceId的指标,其他指标不支持\n getDefaultInsObj(ins: string) {\n return {\n [templateQueryIdMap.instance]: ins,\n };\n }\n}\n","import { DCInstanceAliasList, DCInvalidDemensions, namespace, modifyDimensons } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = DCInstanceAliasList;\n InvalidDimensions = DCInvalidDemensions;\n templateQueryIdMap = {\n instance: 'DirectConnectId',\n };\n InstanceReqConfig = {\n service: 'dc',\n action: 'DescribeDirectConnects',\n responseField: 'DirectConnectSet',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return rawSet.map((item) => modifyDimensons(item));\n }\n}\n","import {\n DCDBInstanceAliasList,\n DCDBInvalidDemensions,\n namespace,\n templateQueryIdMap,\n modifyDimensons,\n keyInStorage,\n queryMonitorExtraConfg,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\nimport { GetServiceAPIInfo } from '../../common/constants';\nimport { fetchAllFactory } from '../../common/utils';\nimport instanceStorage from '../../common/datasourceStorage';\nimport { t } from '../../../locale';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = DCDBInstanceAliasList;\n InvalidDimensions = DCDBInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'dcdb',\n action: 'DescribeDCDBInstances',\n responseField: 'Instances',\n };\n keyInStorage = keyInStorage;\n queryMonitorExtraConfg = queryMonitorExtraConfg;\n extraActionMap = {\n DescribeDCDBShards: {\n service: 'dcdb',\n action: 'DescribeDCDBShards',\n responseField: 'Shards',\n pickKey: 'ShardInstanceId',\n },\n DescribeDCDBInstanceNodeInfo: {\n service: 'dcdb',\n action: 'DescribeDCDBInstanceNodeInfo',\n responseField: 'NodesInfo',\n pickKey: 'NodeId',\n },\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n // 重写getRegion, 入参的region用广州\n getRegions() {\n return this.doRequest(\n {\n url: this.url + '/dcdb',\n },\n 'dcdb',\n { action: 'DescribeDCDBSaleInfo', region: 'ap-guangzhou' }\n ).then((response) => {\n return _.map(response.RegionList || [], (item) => {\n return {\n text: t(item.Region),\n value: item.Region,\n RegionState: item.RegionState,\n };\n });\n });\n }\n\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return _.compact(\n rawSet.map((item) => {\n return modifyDimensons(item);\n })\n );\n }\n async getConsumerList(params: any) {\n const { region, action: act, payload } = params;\n const { service, action, responseField } = this.extraActionMap[act];\n\n const serviceInfo = GetServiceAPIInfo(region, service);\n\n // 从分页数据,获取全量数据\n const rs = await fetchAllFactory(\n (data) => {\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data,\n },\n serviceInfo.service,\n { region, action }\n );\n },\n payload,\n responseField\n );\n return rs[0];\n }\n async fetchMetricData(action: string, region: string, instance: any, query: any) {\n const payload: any = {\n InstanceId: instance[this.templateQueryIdMap.instance],\n Limit: 100,\n };\n if (Object.keys(this.extraActionMap).indexOf(action) !== -1) {\n const rs = await this.getConsumerList({ region, action, payload });\n const { pickKey } = this.extraActionMap[action];\n const result = rs.map((o) => {\n o._InstanceAliasValue = o[this.templateQueryIdMap[pickKey]];\n return {\n text: o[this.templateQueryIdMap[pickKey]],\n value: o[this.templateQueryIdMap[pickKey]],\n };\n });\n await instanceStorage.setExtraStorage(this.service, this.keyInStorage[pickKey], rs);\n return result;\n }\n return [];\n }\n}\n","import { DCGInstanceAliasList, DCGInvalidDemensions, namespace, templateQueryIdMap } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = DCGInstanceAliasList;\n InvalidDimensions = DCGInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'vpc',\n action: 'DescribeDirectConnectGateways',\n responseField: 'DirectConnectGatewaySet',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n}\n","import { DCXInstanceAliasList, DCXInvalidDemensions, namespace, modifyDimensons } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\n\nexport default class DCXDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = DCXInstanceAliasList;\n InvalidDimensions = DCXInvalidDemensions;\n templateQueryIdMap = {\n instance: 'DirectConnectTunnelId',\n };\n InstanceReqConfig = {\n service: 'dc',\n action: 'DescribeDirectConnectTunnels',\n responseField: 'DirectConnectTunnelSet',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return rawSet.map((item) => modifyDimensons(item));\n }\n}\n","import { BaseDatasource } from '../_base/datasource';\nimport {\n ECDNInstanceAliasList,\n ECDNInvalidDemensions,\n modifyDimensons,\n namespace,\n templateQueryIdMap,\n} from './query_def';\n\nexport default class ECDNDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = ECDNInstanceAliasList;\n InvalidDimensions = ECDNInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n InstanceReqConfig = {\n service: 'ecdn',\n action: 'DescribeDomains',\n responseField: 'Domains',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return rawSet.map((item) => modifyDimensons(item));\n }\n}\n","import {\n ECMInstanceAliasList,\n ECMInvalidDemensions,\n namespace,\n templateQueryIdMap,\n modifyDimensons,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = ECMInstanceAliasList;\n InvalidDimensions = ECMInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'ecm',\n action: 'DescribeInstances',\n responseField: 'InstanceSet',\n };\n MetricReqConfig = {\n resultFilter: modifyDimensons,\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n async metricFindQuery(query: any, regex?: string) {\n return super.metricFindQuery({ ...query, ...{ region: 'ap-guangzhou' } }, regex);\n }\n}\n","import {\n ECMBLOCKSTORAGEInstanceAliasList,\n ECMBLOCKSTORAGEInvalidDemensions,\n namespace,\n templateQueryIdMap,\n queryMonitorExtraConfg,\n keyInStorage,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\nimport instanceStorage from '../../common/datasourceStorage';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = ECMBLOCKSTORAGEInstanceAliasList;\n InvalidDimensions = ECMBLOCKSTORAGEInvalidDemensions;\n queryMonitorExtraConfg = queryMonitorExtraConfg;\n templateQueryIdMap = templateQueryIdMap;\n keyInStorage = keyInStorage;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'ecm',\n action: 'DescribeInstances',\n responseField: 'InstanceSet',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n async getDiskList(params: any) {\n const { payload } = params;\n const { InstanceId } = payload;\n const instanceCache = await instanceStorage.getInstance(this.service);\n const instanceObj: any =\n _.cloneDeep(instanceCache.find((item) => item[this.templateQueryIdMap.instance] === InstanceId)) ?? {};\n const { DataDisks: dataDisks } = instanceObj;\n return dataDisks;\n }\n async fetchMetricData(action: string, region: string, instance: any, query: any) {\n const payload: any = {\n InstanceId: instance,\n Limit: 100,\n };\n const rs = await this.getDiskList({ region, action, payload });\n const result = rs.map((o) => {\n o._InstanceAliasValue = o[this.templateQueryIdMap.diskId];\n return {\n text: o[this.templateQueryIdMap.diskId],\n value: o[this.templateQueryIdMap.diskId],\n };\n });\n await instanceStorage.setExtraStorage(this.service, this.keyInStorage.diskId, rs);\n return result;\n }\n}\n","import { ECMLBInstanceAliasList, ECMLBInvalidDemensions, namespace, templateQueryIdMap } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = ECMLBInstanceAliasList;\n InvalidDimensions = ECMLBInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'ecm',\n action: 'DescribeLoadBalancers',\n responseField: 'LoadBalancerSet',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n async metricFindQuery(query: any, regex?: string) {\n return super.metricFindQuery({ ...query, ...{ region: 'ap-guangzhou' } }, regex);\n }\n}\n","import {\n GSEInstanceAliasList,\n GSEInvalidDemensions,\n namespace,\n templateQueryIdMap,\n regionSupported,\n keyInStorage,\n queryMonitorExtraConfg,\n modifyDimensons,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\nimport { GetServiceAPIInfo } from '../../common/constants';\nimport { fetchAllFactory } from '../../common/utils';\nimport instanceStorage from '../../common/datasourceStorage';\nimport { t } from '../../../locale';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = GSEInstanceAliasList;\n InvalidDimensions = GSEInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n queryMonitorExtraConfg = queryMonitorExtraConfg;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'gse',\n action: 'DescribeInstances',\n responseField: 'Instances',\n };\n\n keyInStorage = keyInStorage;\n\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n // getFilterDropdown({ field }) {\n // return super.getRegions();\n // }\n getRegions() {\n return Promise.resolve(regionSupported.map(({ value }) => ({ value, text: t(value) })));\n }\n\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return _.compact(\n rawSet.map((item) => {\n return modifyDimensons(item);\n })\n );\n }\n async getQueueNameList(params: any) {\n const { region } = params;\n const serviceInfo = GetServiceAPIInfo(region, this.service);\n\n // 从分页数据,获取全量数据\n const res = await fetchAllFactory(\n (data) => {\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data,\n },\n serviceInfo.service,\n { region, action: 'DescribeGameServerSessionQueues' }\n );\n },\n {},\n 'GameServerSessionQueues'\n );\n const [rs] = res;\n return rs;\n }\n async getFleetList(params: any) {\n const { region } = params;\n const serviceInfo = GetServiceAPIInfo(region, this.service);\n\n // 从分页数据,获取全量数据\n const res = await fetchAllFactory(\n (data) => {\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data,\n },\n serviceInfo.service,\n { region, action: 'ListFleets' }\n );\n },\n {},\n 'FleetIds'\n );\n const [rs] = res;\n return rs.map((r) => ({ [this.templateQueryIdMap.FleetId]: r }));\n }\n async fetchMetricData(action: string, region: string, instance: any) {\n // console.log({ action, region, instance });\n if (action === 'DescribeGameServerSessionQueues') {\n const rs = await this.getQueueNameList({ region, instanceId: instance[this.templateQueryIdMap.instance] });\n const result = rs.map((o) => {\n o._InstanceAliasValue = o[this.templateQueryIdMap.Name];\n return {\n text: o[this.templateQueryIdMap.Name],\n value: o[this.templateQueryIdMap.Name],\n };\n });\n await instanceStorage.setExtraStorage(this.service, this.keyInStorage.queue, rs);\n return result;\n }\n if (action === 'ListFleets') {\n const rs = await this.getFleetList({ region, instanceId: instance[this.templateQueryIdMap.instance] });\n const result = rs.map((o) => {\n o._InstanceAliasValue = o[this.templateQueryIdMap.FleetId];\n return {\n text: o[this.templateQueryIdMap.FleetId],\n value: o[this.templateQueryIdMap.FleetId],\n };\n });\n await instanceStorage.setExtraStorage(this.service, this.keyInStorage.fleet, rs);\n return result;\n }\n return [];\n }\n}\n","import _ from 'lodash';\nimport { BaseDatasource } from '../_base/datasource';\nimport { LBInstanceAliasList, LBInvalidDemensions } from './query_def';\n\nexport default class SCFDatasource extends BaseDatasource {\n Namespace = 'QCE/LB';\n InstanceAliasList = LBInstanceAliasList;\n InvalidDimensions = LBInvalidDemensions;\n templateQueryIdMap = {\n instance: 'AddressId',\n };\n InstanceReqConfig = {\n service: 'vpc',\n action: 'DescribeAddresses',\n responseField: 'AddressSet',\n interceptor: {\n request: (params) => {\n const { Filters } = params;\n if (!Filters) {\n params.Filters = [];\n }\n params.Filters.push({\n Name: 'address-type',\n Values: ['EIP'],\n });\n return params;\n }, // 设置一些请求参数的 默认值\n },\n };\n\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return rawSet.filter((item) =>\n /* hack:这里多加了筛选条件,是因为后端数据不准确,坑啊! 只拿取包含eip的指标 */\n item.Dimensions?.[0]?.Dimensions?.includes('eip')\n );\n }\n\n // async getInstances(region, params = {}) {\n // const rawSet = await super.getInstances(region, params);\n // /* hack:这里多加了筛选条件,是因为后端数据不准确,坑啊! 只拿取包含eip的指标 */\n // return rawSet.filter((item) => item.AddressType === 'EIP');\n // }\n\n // async getVariableInstances(region, query = {}) {\n // const rawSet = await super.getVariableInstances(region, query);\n // return rawSet.filter((item) => item.AddressType === 'EIP');\n // }\n}\n","import _ from 'lodash';\nimport {\n LIGHTHOUSEInstanceAliasList,\n templateQueryIdMap,\n LighthouseInvalidDemensions,\n modifyDimensons,\n} from './query_def';\nimport { GetServiceAPIInfo } from '../../common/constants';\nimport { BaseDatasource } from '../_base/datasource';\n\nexport default class LighthouseDatasource extends BaseDatasource {\n Namespace = 'QCE/LIGHTHOUSE';\n InstanceAliasList = LIGHTHOUSEInstanceAliasList;\n InvalidDimensions = LighthouseInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n InstanceReqConfig = {\n service: 'lighthouse',\n action: 'DescribeInstances',\n responseField: 'InstanceSet',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n\n getRegions() {\n return this.doRequest(\n {\n url: this.url + '/api',\n data: { Product: 'lighthouse' },\n },\n 'api',\n { action: 'DescribeRegions' }\n ).then((response) => {\n return _.filter(\n _.map(response.RegionSet || [], (item) => {\n return {\n text: item.RegionName,\n value: item.Region,\n RegionState: item.RegionState,\n };\n }),\n (item) => item.RegionState === 'AVAILABLE'\n );\n });\n }\n\n getZones(region) {\n const serviceInfo = GetServiceAPIInfo(region, 'api');\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data: { Product: 'lighthouse' },\n },\n serviceInfo.service,\n { region, action: 'DescribeZones' }\n ).then((response) => {\n return _.filter(\n _.map(response.ZoneSet || [], (item) => {\n return { text: item.ZoneName, value: item.Zone, ZoneState: item.ZoneState, Zone: item.Zone };\n }),\n (item) => item.ZoneState === 'AVAILABLE'\n );\n });\n }\n\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return _.compact(\n rawSet.map((item) => {\n return modifyDimensons(item);\n })\n );\n }\n}\n","import _ from 'lodash';\nimport {\n MONGODBInstanceAliasList,\n MONGODBInvalidDemensions,\n templateQueryIdMap,\n queryMonitorExtraConfg,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport instanceStorage from '../../common/datasourceStorage';\n\nexport default class MONGODBDatasource extends BaseDatasource {\n Namespace = 'QCE/CMONGO';\n InstanceAliasList = MONGODBInstanceAliasList;\n ReplicaAliasList = ['ReplicaSetId', 'ReplicaSetName'];\n templateQueryIdMap = templateQueryIdMap;\n queryMonitorExtraConfg = queryMonitorExtraConfg;\n\n InstanceReqConfig = {\n service: 'mongodb',\n action: 'DescribeDBInstances',\n responseField: 'InstanceDetails',\n };\n\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n getInvalidDimensions(selfIns: any, target: any) {\n if (target.node && target.node !== '') {\n return { target: 'Node' };\n }\n if (target.replica && target.replica !== '') {\n return { target: 'Replica' };\n }\n return MONGODBInvalidDemensions;\n }\n formatVariableDisplay(data: Record, displayTpl: string | undefined, alias: string, aliasList: string[]) {\n if (displayTpl) {\n return displayTpl.replace(/\\$\\{(\\w+)\\}/g, (a, b) => {\n if (!b || !aliasList.includes(b)) {\n return '';\n }\n return this.getAliasValue(data, b);\n });\n }\n return this.getAliasValue(data, alias);\n }\n async fetchMetricData(action: string, region: string, instance: any, query: any) {\n const { display } = query;\n if (action === 'DescribeReplicas') {\n const [res] = await this.getInstances(region, { InstanceIds: [instance[this.templateQueryIdMap.instance]] });\n let { replicaalias } = query;\n replicaalias = this.ReplicaAliasList.includes(replicaalias) ? replicaalias : this.templateQueryIdMap.replica;\n const result = _.map(_.get(res, 'ReplicaSets', []), (item) => {\n const replicaAlias = this.formatVariableDisplay(item, display, replicaalias, this.ReplicaAliasList);\n item._InstanceAliasValue = replicaAlias || item[this.templateQueryIdMap.replica];\n return { text: item.ReplicaSetId, value: item.ReplicaSetId };\n });\n await instanceStorage.setExtraStorage(\n this.service,\n this.queryMonitorExtraConfg.Replica.dim_KeyInStorage,\n _.get(res, 'ReplicaSets', [])\n );\n return result;\n }\n if (action === 'DescribeReplicaNodes') {\n const [res] = await this.getInstances(region, { InstanceIds: [instance[this.templateQueryIdMap.instance]] });\n const { replicasetid } = query;\n const targetReplica = _.find(_.get(res, 'ReplicaSets', []), { ReplicaSetId: this.getVariable(replicasetid) });\n let result = _.times(targetReplica.SecondaryNum, (index) => {\n const nodeId = `${targetReplica.ReplicaSetId}-node-slave${index}`;\n return { text: nodeId, value: nodeId };\n });\n if (targetReplica) {\n result = [\n { text: `${targetReplica.ReplicaSetId}-node-primary`, value: `${targetReplica.ReplicaSetId}-node-primary` },\n ...result,\n ];\n }\n await instanceStorage.setExtraStorage(\n this.service,\n this.queryMonitorExtraConfg.Node.dim_KeyInStorage,\n result.map((item) => ({ NodeId: item.value, _InstanceAliasValue: item.value }))\n );\n return result;\n }\n\n return [];\n }\n}\n","import { GetServiceAPIInfo } from '../../common/constants';\nimport { fetchAllFactory } from '../../common/utils';\nimport { BaseDatasource } from '../_base/datasource';\nimport {\n InvalidDemensions,\n InstanceAliasList,\n templateQueryIdMap,\n keyInStorage,\n queryMonitorExtraConfg,\n} from './query_def';\nimport instanceStorage from '../../common/datasourceStorage';\n\nexport default class MrHdfsDatasource extends BaseDatasource {\n InvalidDimensions: Record = InvalidDemensions;\n InstanceAliasList: string[] = InstanceAliasList;\n templateQueryIdMap = templateQueryIdMap;\n extrasAlias = [];\n keyInStorage = keyInStorage;\n queryMonitorExtraConfg = queryMonitorExtraConfg;\n InstanceReqConfig = {\n service: 'emr',\n action: 'DescribeInstances',\n responseField: 'ClusterList',\n interceptor: {\n request: (params) => ({\n ...params,\n DisplayStrategy: params.DisplayStrategy || 'monitorManage',\n ProjectId: params.ProjectId || -1,\n }), // 设置一些请求参数的 默认值\n response: (data: any[]) => data.map(({ ClusterId, ClusterName }) => ({ ClusterId, ClusterName })),\n },\n };\n\n async fetchAllNodes(region: string, params: any) {\n const serviceInfo = GetServiceAPIInfo(region, 'emr');\n\n // 从分页数据,获取全量数据\n const rs = await fetchAllFactory(\n (data) => {\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data,\n },\n serviceInfo.service,\n { region, action: 'DescribeClusterNodes' }\n );\n },\n { ...params, isOffsetPage: true },\n 'NodeList'\n );\n\n // return rs[0].map((item) => ({ text: item.Ip, value: item.Ip }));\n return rs[0];\n }\n\n async fetchMetricData(action: string, region: string, instance: any) {\n let result;\n switch (action) {\n case 'DescribeClusterNodes': {\n const resultT = await this.fetchAllNodes(region, { InstanceId: instance.ClusterId, NodeFlag: 'all' });\n result = resultT.map((item) => {\n item._InstanceAliasValue = item[templateQueryIdMap.node];\n return { text: item[templateQueryIdMap.node], value: item[templateQueryIdMap.node] };\n });\n await instanceStorage.setExtraStorage(this.service, this.keyInStorage.node, resultT);\n\n return result;\n }\n default:\n return [];\n }\n }\n}\n","import _ from 'lodash';\nimport { NATGATEWAYInstanceAliasList, NATInvalidDemensions } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\n\nexport default class NATGATEWAYDatasource extends BaseDatasource {\n Namespace = 'QCE/NAT_GATEWAY';\n InstanceAliasList = NATGATEWAYInstanceAliasList;\n InvalidDimensions = NATInvalidDemensions;\n templateQueryIdMap = {\n instance: 'NatGatewayId',\n };\n InstanceReqConfig = {\n service: 'vpc',\n action: 'DescribeNatGateways',\n responseField: 'NatGatewaySet',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n}\n","import _ from 'lodash';\nimport { OVCDNInstanceAliasList, OVCDNInvalidDemensions } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\n\nexport default class OVCDNDatasource extends BaseDatasource {\n Namespace = 'QCE/OV_CDN';\n InstanceAliasList = OVCDNInstanceAliasList;\n InvalidDimensions = OVCDNInvalidDemensions;\n templateQueryIdMap = {\n instance: 'Domain',\n };\n InstanceReqConfig = {\n service: 'cdn',\n action: 'DescribeDomains',\n responseField: 'Domains',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n\n async metricFindQuery(query: any, regex?: string) {\n return super.metricFindQuery({ ...query, ...{ region: 'ap-guangzhou' } }, regex);\n }\n}\n","import { PCXInstanceAliasList, namespace, templateQueryIdMap } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\nimport { GetServiceAPIInfo, GetRequestParamsV2, SliceLength } from '../../common/constants';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = PCXInstanceAliasList;\n InvalidDimensions = {};\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'xx',\n action: 'xx',\n responseField: 'xx',\n };\n\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n\n getInstances(region = 'ap-guangzhou', params = {}) {\n params = { offset: 0, limit: 50, ...params };\n const serviceInfo = GetServiceAPIInfo(region, 'pcx');\n return this.doRequestV2(\n {\n url: this.url + serviceInfo.path,\n data: params,\n },\n serviceInfo.service,\n { region, action: 'DescribeVpcPeeringConnections' }\n ).then((response) => {\n return response.data || [];\n });\n }\n\n /**\n * 模板变量中获取全量的 PCX 实例列表\n * @param region 地域信息\n */\n getVariableInstances(region, query) {\n let result: any[] = [];\n const params = { Offset: 0, Limit: 50, ...query };\n const serviceInfo = GetServiceAPIInfo(region, 'pcx');\n return this.doRequestV2(\n {\n url: this.url + serviceInfo.path,\n data: params,\n },\n serviceInfo.service,\n { region, action: 'DescribeVpcPeeringConnections' }\n ).then((response) => {\n result = response.data || [];\n const total = response.totalCount || 0;\n if (result.length >= total) {\n return result;\n } else {\n const param = SliceLength(total, 50);\n const promises: any[] = [];\n _.forEach(param, (item) => {\n promises.push(this.getInstances(region, item));\n });\n return Promise.all(promises)\n .then((responses) => {\n _.forEach(responses, (item) => {\n result = _.concat(result, item);\n });\n return result;\n })\n .catch((error) => {\n return result;\n });\n }\n });\n }\n\n getVpcId(region, params: any = {}) {\n params = { Offset: 0, Limit: 20, ...params };\n // TODO 等待腾讯云接口查问题\n params.Offset = String(params.Offset);\n params.Limit = String(params.Limit);\n const serviceInfo = GetServiceAPIInfo(region, 'vpc');\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data: params,\n },\n serviceInfo.service,\n { region, action: 'DescribeVpcs' }\n ).then((response) => {\n return _.map(response.VpcSet || [], (item) => ({ text: item.VpcId, value: item.VpcId }));\n });\n }\n\n getVpcIds(region) {\n let result: any[] = [];\n const params: any = { Offset: 0, Limit: 100 };\n // TODO 等待腾讯云接口查问题\n params.Offset = String(params.Offset);\n params.Limit = String(params.Limit);\n const serviceInfo = GetServiceAPIInfo(region, 'vpc');\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data: params,\n },\n serviceInfo.service,\n { region, action: 'DescribeVpcs' }\n ).then((response) => {\n result = _.map(response.VpcSet || [], (item) => ({ text: item.VpcId, value: item.VpcId }));\n const total = response.TotalCount || 0;\n if (result.length >= total) {\n return result;\n } else {\n const param = SliceLength(total, 100);\n const promises: any[] = [];\n _.forEach(param, (item) => {\n promises.push(this.getVpcId(region, item));\n });\n return Promise.all(promises)\n .then((responses) => {\n _.forEach(responses, (item) => {\n result = _.concat(result, item);\n });\n return result;\n })\n .catch((error) => {\n return result;\n });\n }\n });\n }\n\n /**\n * 腾讯云 API 2.0 请求接口\n * @param options\n * @param service\n * @param signObj\n */\n async doRequestV2(options, service, signObj: any = {}) {\n options = await GetRequestParamsV2(\n options,\n service,\n signObj,\n this.secretId,\n this.instanceSettings.id,\n this.backendSrv\n );\n return this.backendSrv\n .datasourceRequest(options)\n .then((response) => {\n return _.get(response, 'data', {});\n })\n .catch((error) => {\n throw error;\n });\n }\n}\n","import _ from 'lodash';\nimport {\n POSTGRESInstanceAliasList,\n PostgreInvalidDemensions,\n namespace,\n modifyDimensons,\n templateQueryIdMap,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\n\nexport default class CDBDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = POSTGRESInstanceAliasList;\n InvalidDimensions = PostgreInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n InstanceReqConfig = {\n service: 'postgres',\n action: 'DescribeDBInstances',\n responseField: 'DBInstanceSet',\n };\n\n MetricReqConfig = {\n resultFilter: modifyDimensons,\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n}\n","import { get } from 'lodash';\nimport { QAAPInstanceAliasList, QAAPInvalidDemensions, namespace, templateQueryIdMap } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\n\nexport default class QAAPDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = QAAPInstanceAliasList;\n InvalidDimensions = QAAPInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'gaap',\n action: 'DescribeProxies',\n responseField: 'ProxySet',\n interceptor: {\n // response: (data: unknown[]) =>[\n // {\n // \"NetDetectId\": \"netd-12345678\",\n // },\n // ],\n },\n };\n // MetricReqConfig = {\n // resultFilter: modifyDimensons,\n // };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return rawSet.filter(\n (item) =>\n get(item, 'Dimensions.length') === 1 &&\n get(item, 'Dimensions[0].Dimensions.length') === 1 &&\n get(item, 'Dimensions[0].Dimensions[0]') === 'channelId'\n );\n }\n}\n","import _ from 'lodash';\nimport { REDISInstanceAliasList, RedisInvalidDemensions, isValidMetric } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\n\nexport default class REDISDatasource extends BaseDatasource {\n Namespace = 'QCE/REDIS';\n InstanceAliasList = REDISInstanceAliasList;\n InvalidDimensions = RedisInvalidDemensions;\n templateQueryIdMap = {\n instance: 'InstanceId',\n };\n InstanceReqConfig = {\n service: 'redis',\n action: 'DescribeInstances',\n responseField: 'InstanceSet',\n interceptor: {\n request: (params) => ({ ...params, MonitorVersion: '1m' }),\n },\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return rawSet.filter((item) => isValidMetric(item));\n }\n}\n","import _ from 'lodash';\nimport {\n REDISMEMInstanceAliasList,\n namespace,\n RedisMemInvalidDemensions,\n templateQueryIdMap,\n NodeType,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport { GetServiceAPIInfo } from '../../common/constants';\nimport { fetchAllFactory } from '../../common/utils';\n\nexport default class REDISDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = REDISMEMInstanceAliasList;\n InvalidDimensions = RedisMemInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n extrasAlias = [RedisMemInvalidDemensions.pnodeid, RedisMemInvalidDemensions.rnodeid];\n InstanceReqConfig = {\n service: 'redis',\n action: 'DescribeInstances',\n responseField: 'InstanceSet',\n interceptor: {\n request: (params) => ({ ...params, MonitorVersion: '5s' }),\n },\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n\n async getInstanceNodeInfo(params: any) {\n const { region, instanceId } = params;\n const serviceInfo = GetServiceAPIInfo(region, 'redis');\n\n const res = await fetchAllFactory(\n (data) => {\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data,\n },\n serviceInfo.service,\n { region, action: 'DescribeInstanceNodeInfo' }\n );\n },\n {\n InstanceId: instanceId,\n },\n NodeType\n );\n\n return res;\n }\n async fetchMetricData(action: string, region: string, instance: any, query: any) {\n if (action === 'DescribeInstanceNodeInfo') {\n const rs = await this.getInstanceNodeInfo({ region, instanceId: instance[this.templateQueryIdMap.instance] });\n const { nodetype } = query;\n const ndoeTypeIndex = NodeType.indexOf(nodetype);\n return ndoeTypeIndex === -1\n ? []\n : _.map(rs[ndoeTypeIndex], (item) => ({ text: item.NodeId, value: item.NodeId }));\n }\n return [];\n }\n}\n","import _ from 'lodash';\nimport { GetServiceAPIInfo } from '../../common/constants';\nimport { BaseDatasource } from '../_base/datasource';\nimport {\n SCFInstanceAliasList,\n SCFInvalidDemensions,\n regionSupported,\n queryMonitorExtraConfg,\n keyInStorage,\n templateQueryIdMap,\n} from './query_def';\nimport instanceStorage from '../../common/datasourceStorage';\nimport { t } from '../../../locale';\n\nexport default class SCFDatasource extends BaseDatasource {\n InstanceKey: string;\n Namespace: string;\n InstanceAliasList: string[];\n InvalidDimensions: Record;\n templateQueryIdMap = templateQueryIdMap;\n queryMonitorExtraConfg = queryMonitorExtraConfg;\n keyInStorage = keyInStorage;\n InstanceReqConfig: { service?: string | undefined; action: string; responseField: string };\n\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n\n this.Namespace = 'QCE/SCF_V2';\n this.InstanceAliasList = SCFInstanceAliasList;\n this.InvalidDimensions = SCFInvalidDemensions;\n this.InstanceReqConfig = {\n service: 'scf',\n action: 'ListFunctions',\n responseField: 'Functions',\n };\n }\n\n getRegions() {\n return Promise.resolve(regionSupported.map(({ value }) => ({ value, text: t(value) })));\n }\n\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return rawSet.filter(\n (item) =>\n /* hack:这里多加了筛选条件,是因为后端数据不准确,坑啊! 只拿取包含functionName的指标 */\n item.Dimensions?.[0]?.Dimensions?.includes('functionName') &&\n item.Dimensions?.[0]?.Dimensions?.includes('namespace') &&\n !item.MetricName.startsWith('Name')\n );\n }\n\n getVersions(region, params) {\n const serviceInfo = GetServiceAPIInfo(region, 'scf');\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data: params,\n },\n serviceInfo.service,\n { region, action: 'ListVersionByFunction' }\n ).then((response) => {\n return response.Versions;\n });\n }\n\n async fetchMetricData(action: string, region: string, instance: any) {\n // console.log({ action, region, instance });\n if (action === 'ListVersionByFunction') {\n const rs = await this.getVersions(region, { FunctionName: instance[this.templateQueryIdMap.instance] });\n const result = rs.map((o) => {\n o._InstanceAliasValue = o[this.templateQueryIdMap.version];\n return {\n text: o[this.templateQueryIdMap.version],\n value: o[this.templateQueryIdMap.version],\n };\n });\n await instanceStorage.setExtraStorage(this.service, this.keyInStorage.version, rs);\n return result;\n }\n return [];\n }\n}\n","import {\n SQLSERVERInstanceAliasList,\n SQLSERVERInvalidDemensions,\n namespace,\n templateQueryIdMap,\n regionSupported,\n modifyDimensons,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport { GetServiceAPIInfo } from '../../common/constants';\nimport _ from 'lodash';\nimport { t } from '../../../locale';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = SQLSERVERInstanceAliasList;\n InvalidDimensions = SQLSERVERInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'sqlserver',\n action: 'DescribeDBInstances',\n responseField: 'DBInstances',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return _.compact(rawSet.map((item) => modifyDimensons(item)));\n }\n getRegions() {\n return Promise.resolve(regionSupported.map(({ value }) => ({ value, text: t(value) })));\n }\n getFilterDropdown({ field, region }) {\n if (field === 'Zone') {\n const serviceInfo = GetServiceAPIInfo(region, 'cvm');\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n },\n serviceInfo.service,\n { region, action: 'DescribeZones' }\n ).then((response) => {\n return _.filter(\n _.map(response.ZoneSet || [], (item) => {\n return { text: item.ZoneName, value: item.Zone, ZoneState: item.ZoneState, Zone: item.Zone };\n }),\n (item) => item.ZoneState === 'AVAILABLE'\n );\n });\n }\n return [];\n }\n}\n","import { TCAPLUSInstanceAliasList, TCAPLUSInvalidDemensions, namespace, templateQueryIdMap } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\nimport { t } from '../../../locale';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = TCAPLUSInstanceAliasList;\n InvalidDimensions = TCAPLUSInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'tcaplusdb',\n action: 'DescribeTables',\n responseField: 'TableInfos',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n // 重写getRegion\n getRegions() {\n return this.doRequest(\n {\n url: this.url + '/tcaplusdb',\n },\n 'tcaplusdb',\n { action: 'DescribeRegions', region: 'ap-guangzhou' }\n ).then((response) => {\n return _.map(response.RegionInfos || [], (item) => {\n return {\n text: t(item.RegionName),\n value: item.RegionName,\n };\n });\n });\n }\n}\n","import {\n TDMQInstanceAliasList,\n TDMQInvalidDemensions,\n namespace,\n templateQueryIdMap,\n regionSupported,\n modifyDimensons,\n queryMonitorExtraConfg,\n keyInStorage,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\nimport { GetServiceAPIInfo } from '../../common/constants';\nimport { fetchAllFactory } from '../../common/utils';\nimport instanceStorage from '../../common/datasourceStorage';\nimport { t } from '../../../locale';\n\nexport default class TDMQDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = TDMQInstanceAliasList;\n InvalidDimensions = TDMQInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n queryMonitorExtraConfg = queryMonitorExtraConfg;\n keyInStorage = keyInStorage;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'tdmq',\n action: 'DescribeClusters',\n responseField: 'ClusterSet',\n };\n extraActionMap = {\n DescribeTopics: {\n service: 'tdmq',\n action: 'DescribeTopics',\n responseField: 'TopicSets',\n pickKey: 'TopicName',\n },\n DescribeEnvironments: {\n service: 'tdmq',\n action: 'DescribeEnvironments',\n responseField: 'EnvironmentSet',\n pickKey: 'EnvironmentId',\n },\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n // getFilterDropdown({ field }) {\n // return super.getRegions();\n // }\n getRegions() {\n return Promise.resolve(regionSupported.map(({ value }) => ({ value, text: t(value) })));\n }\n\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return _.compact(rawSet.map((item) => modifyDimensons(item)));\n }\n\n async getConsumerList(params: any) {\n const { region, action: act, payload } = params;\n const { service, action, responseField } = this.extraActionMap[act];\n\n const serviceInfo = GetServiceAPIInfo(region, service);\n\n // 从分页数据,获取全量数据\n const rs = await fetchAllFactory(\n (data) => {\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data,\n },\n serviceInfo.service,\n { region, action }\n );\n },\n payload,\n responseField\n );\n // console.log({ rs });\n return rs[0];\n }\n async fetchMetricData(action: string, region: string, instance: any, query: any) {\n const payload: any = {\n Limit: 100,\n ClusterId: instance[this.templateQueryIdMap.instance],\n };\n if (Object.keys(this.extraActionMap).indexOf(action) !== -1) {\n if (action === 'DescribeTopics') {\n payload.EnvironmentId = this.getVariable(query['environmentid']);\n }\n const rs = await this.getConsumerList({ region, action, payload });\n const { pickKey } = this.extraActionMap[action];\n const result = rs.map((o) => {\n o._InstanceAliasValue = o[this.templateQueryIdMap[pickKey]];\n return {\n text: o[this.templateQueryIdMap[pickKey]],\n value: o[this.templateQueryIdMap[pickKey]],\n };\n });\n await instanceStorage.setExtraStorage(this.service, this.keyInStorage[pickKey], rs);\n return result;\n }\n return [];\n }\n}\n","import {\n TDMQRABBITMQInstanceAliasList,\n TDMQInvalidDemensions,\n namespace,\n templateQueryIdMap,\n regionSupported,\n queryMonitorExtraConfg,\n keyInStorage,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\nimport { GetServiceAPIInfo } from '../../common/constants';\nimport { fetchAllFactory } from '../../common/utils';\nimport instanceStorage from '../../common/datasourceStorage';\nimport { t } from '../../../locale';\n\nexport default class TDMQDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = TDMQRABBITMQInstanceAliasList;\n InvalidDimensions = TDMQInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n queryMonitorExtraConfg = queryMonitorExtraConfg;\n keyInStorage = keyInStorage;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'tdmq',\n action: 'DescribeRabbitMQVipInstances',\n responseField: 'Instances',\n };\n extraActionMap = {\n DescribeRabbitMQNodeList: {\n service: 'tdmq',\n action: 'DescribeRabbitMQNodeList',\n responseField: 'NodeList',\n pickKey: 'node',\n },\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n\n getRegions() {\n return Promise.resolve(regionSupported.map(({ value }) => ({ value, text: t(value) })));\n }\n\n async getConsumerList(params: any) {\n const { region, action: act, payload } = params;\n const { service, action, responseField } = this.extraActionMap[act];\n\n const serviceInfo = GetServiceAPIInfo(region, service);\n\n // 从分页数据,获取全量数据\n const rs = await fetchAllFactory(\n (data) => {\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data,\n },\n serviceInfo.service,\n { region, action }\n );\n },\n payload,\n responseField\n );\n return rs[0];\n }\n async fetchMetricData(action: string, region: string, instance: any, query: any) {\n const payload: any = {\n Limit: 100,\n InstanceId: instance[this.templateQueryIdMap.instance],\n };\n if (Object.keys(this.extraActionMap).indexOf(action) !== -1) {\n const rs = await this.getConsumerList({ region, action, payload });\n const { pickKey } = this.extraActionMap[action];\n const result = rs.map((o) => {\n o._InstanceAliasValue = o[this.templateQueryIdMap[pickKey]];\n return {\n text: o[this.templateQueryIdMap[pickKey]],\n value: o[this.templateQueryIdMap[pickKey]],\n };\n });\n await instanceStorage.setExtraStorage(this.service, this.keyInStorage[pickKey], rs);\n return result;\n }\n return [];\n }\n}\n","import {\n TDMQROCKETMQInstanceAliasList,\n TDMQInvalidDemensions,\n namespace,\n templateQueryIdMap,\n regionSupported,\n queryMonitorExtraConfg,\n keyInStorage,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\nimport { GetServiceAPIInfo } from '../../common/constants';\nimport { fetchAllFactory } from '../../common/utils';\nimport instanceStorage from '../../common/datasourceStorage';\nimport { t } from '../../../locale';\n\nexport default class TDMQDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = TDMQROCKETMQInstanceAliasList;\n InvalidDimensions = TDMQInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n queryMonitorExtraConfg = queryMonitorExtraConfg;\n keyInStorage = keyInStorage;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'tdmq',\n action: 'DescribeRocketMQClusters',\n responseField: 'ClusterList',\n interceptor: {\n response: (result) =>\n _.map(result, (item) => ({\n ...item,\n ClusterId: _.get(item, 'Info.ClusterId', ''),\n ClusterName: _.get(item, 'Info.ClusterName', ''),\n })),\n },\n };\n extraActionMap = {\n DescribeRocketMQNamespaces: {\n service: 'tdmq',\n action: 'DescribeRocketMQNamespaces',\n responseField: 'Namespaces',\n pickKey: 'namespace',\n },\n DescribeRocketMQGroups: {\n service: 'tdmq',\n action: 'DescribeRocketMQGroups',\n responseField: 'Groups',\n pickKey: 'group',\n },\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await super.getMetrics(region);\n return rawSet.filter((item) => !item.Dimensions?.[0]?.Dimensions?.includes('rmqcluster'));\n }\n\n getRegions() {\n return Promise.resolve(regionSupported.map(({ value }) => ({ value, text: t(value) })));\n }\n\n async getConsumerList(params: any) {\n const { region, action: act, payload } = params;\n const { service, action, responseField } = this.extraActionMap[act];\n\n const serviceInfo = GetServiceAPIInfo(region, service);\n\n // 从分页数据,获取全量数据\n const rs = await fetchAllFactory(\n (data) => {\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data,\n },\n serviceInfo.service,\n { region, action }\n );\n },\n payload,\n responseField\n );\n return rs[0];\n }\n async fetchMetricData(action: string, region: string, instance: any, query: any) {\n const payload: any = {\n Limit: 100,\n ClusterId: instance[this.templateQueryIdMap.instance],\n };\n if (Object.keys(this.extraActionMap).indexOf(action) !== -1) {\n if (action === 'DescribeRocketMQGroups') {\n payload.NamespaceId = this.getVariable(query['clusternamespace']);\n }\n const rs = await this.getConsumerList({ region, action, payload });\n const { pickKey } = this.extraActionMap[action];\n const result = rs.map((o) => {\n o._InstanceAliasValue = o[this.templateQueryIdMap[pickKey]];\n return {\n text: o[this.templateQueryIdMap[pickKey]],\n value: o[this.templateQueryIdMap[pickKey]],\n };\n });\n await instanceStorage.setExtraStorage(this.service, this.keyInStorage[pickKey], rs);\n return result;\n }\n return [];\n }\n}\n","import { map, flatten, reduce, isEmpty, filter, split, sortBy, findIndex, trim, isArray, isString } from 'lodash';\nimport { GetServiceAPIInfo, ReplaceVariable } from '../../common/constants';\nimport { getTimeShiftInMs } from '../../common/utils';\nimport { BaseDatasource } from '../_base/datasource';\n\nconst variableToArray = (variable) => {\n if (isEmpty(variable)) {\n return [];\n }\n if (isArray(variable)) {\n return variable;\n }\n if (isString(variable)) {\n return split(variable, ',').map((item) => trim(item));\n }\n return [];\n};\n\nexport default class TKEDatasource extends BaseDatasource {\n InstanceAliasList = ['ClusterId', 'ClusterName'];\n templateQueryIdMap = {\n instance: 'ClusterId',\n };\n InvalidDimensions = {\n tke_cluster_instance_id: 'ClusterId',\n };\n InstanceReqConfig = {\n service: 'tke',\n action: 'DescribeClusters',\n responseField: 'Clusters',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n\n getMonitorData(params: any, region: any, instances: any, target: any, options: any) {\n const serviceInfo = GetServiceAPIInfo(region, 'monitor');\n const timeshift = getTimeShiftInMs(target.timeshift);\n const conditions = reduce(\n target.conditions,\n (prev, item) => {\n if (isEmpty(item.Key) || isEmpty(item.Operator) || isEmpty(item.Value)) {\n return prev;\n }\n return [\n ...filter(prev, (e) => e.Key !== item.Key),\n {\n Key: ReplaceVariable(this.templateSrv, options.scopedVars, item.Key, false),\n Operator: ReplaceVariable(this.templateSrv, options.scopedVars, item.Operator, false),\n Value: variableToArray(ReplaceVariable(this.templateSrv, options.scopedVars, item.Value, true)),\n },\n ];\n },\n [{ Key: 'tke_cluster_instance_id', Operator: '=', Value: instances.map((item) => item['ClusterId']) }]\n );\n\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data: {\n Period: params.Period,\n MetricNames: [params.MetricName],\n Module: 'monitor',\n Namespace: 'QCE/TKE',\n EndTime: params.EndTime,\n StartTime: params.StartTime,\n Conditions: conditions,\n GroupBys: variableToArray(ReplaceVariable(this.templateSrv, options.scopedVars, target.groupBys, true)),\n },\n },\n serviceInfo.service,\n { action: 'DescribeStatisticData', region }\n ).then((response) => {\n return flatten(\n map(response.Data, (data) => {\n return map(data.Points, (point) => {\n const dimensionSort = sortBy(point.Dimensions, ['Name']);\n const dimensionString = [\n ...dimensionSort.splice(findIndex(dimensionSort, { Name: 'tke_cluster_instance_id' }), 1),\n ...dimensionSort,\n ]\n .map((dimension) => dimension.Value)\n .join(' - ');\n const timeshiftString = timeshift > 0 ? `_${target.timeshift}` : '';\n return {\n target: `${data.MetricName} - ${dimensionString}${timeshiftString}`,\n datapoints: map(point.Values, (value) => [value.Value, value.Timestamp * 1000 + timeshift]),\n };\n });\n })\n );\n });\n }\n}\n","import _ from 'lodash';\nimport { TSFInvalidDemensions, TSFInstanceAliasList, templateQueryIdMap } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\n\nexport default class TSFDatasource extends BaseDatasource {\n Namespace = 'QCE/TSF';\n InstanceAliasList = TSFInstanceAliasList;\n InvalidDimensions = TSFInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n InstanceReqConfig = {\n service: 'tsf',\n action: 'DescribeApplications',\n responseField: 'Content',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n}\n","import {\n VCLBInstanceAliasList,\n VCLBInvalidDemensions,\n namespace,\n templateQueryIdMap,\n clbNamespaceMap,\n regionSupported,\n modifyDimensons,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\nimport { GetServiceAPIInfo } from '../../common/constants';\nimport { t } from '../../../locale';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = VCLBInstanceAliasList;\n InvalidDimensions = VCLBInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'clb',\n action: 'DescribeLoadBalancers',\n responseField: 'LoadBalancerSet',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n\n getRegions() {\n return Promise.resolve(regionSupported.map(({ value }) => ({ value, text: t(value) })));\n }\n async getAllMetrics(region: string) {\n const serviceInfo = GetServiceAPIInfo(region, 'monitor');\n const { MetricSet: public_metrics } = await this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data: {\n Namespace: clbNamespaceMap.public,\n },\n },\n serviceInfo.service,\n { region, action: 'DescribeBaseMetrics' }\n );\n const { MetricSet: private_metrics } = await this.doRequest(\n {\n url: this.url + serviceInfo.path,\n data: {\n Namespace: clbNamespaceMap.private,\n },\n },\n serviceInfo.service,\n { region, action: 'DescribeBaseMetrics' }\n );\n const res = Object.values(_.keyBy(_.concat(private_metrics, public_metrics), 'MetricName'));\n return res.map((t) => modifyDimensons(t));\n }\n async getMetrics(region = 'ap-guangzhou') {\n const rawSet = await this.getAllMetrics(region);\n return _.compact(rawSet);\n }\n}\n","import { VBCInstanceAliasList, VBCInvalidDemensions, namespace, templateQueryIdMap } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport _ from 'lodash';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = VBCInstanceAliasList;\n InvalidDimensions = VBCInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'vpc',\n action: 'DescribeCcns',\n responseField: 'CcnSet',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n getFilterDropdown({ field }) {\n return super.getRegions();\n }\n}\n","import {\n VPCNETDETECTInstanceAliasList,\n VPCNETInvalidDemensions,\n namespace,\n templateQueryIdMap,\n modifyDimensons,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = VPCNETDETECTInstanceAliasList;\n InvalidDimensions = VPCNETInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'vpc',\n action: 'DescribeNetDetects',\n responseField: 'NetDetectSet',\n interceptor: {\n // response: (data: unknown[]) =>[\n // {\n // \"NetDetectId\": \"netd-12345678\",\n // },\n // ],\n },\n };\n MetricReqConfig = {\n resultFilter: modifyDimensons,\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n}\n","import { VPNGWInstanceAliasList, VPNGWInvalidDemensions, namespace, templateQueryIdMap } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport { GetServiceAPIInfo } from '../../common/constants';\nimport _ from 'lodash';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = VPNGWInstanceAliasList;\n InvalidDimensions = VPNGWInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'vpc',\n action: 'DescribeVpnGateways',\n responseField: 'VpnGatewaySet',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n\n getFilterDropdown({ field, region }) {\n if (field === 'zone') {\n const serviceInfo = GetServiceAPIInfo(region, 'cvm');\n return this.doRequest(\n {\n url: this.url + serviceInfo.path,\n },\n serviceInfo.service,\n { region, action: 'DescribeZones' }\n ).then((response) => {\n return _.filter(\n _.map(response.ZoneSet || [], (item) => {\n return { text: item.ZoneName, value: item.Zone, ZoneState: item.ZoneState, Zone: item.Zone };\n }),\n (item) => item.ZoneState === 'AVAILABLE'\n );\n });\n }\n return [];\n }\n}\n","import { VPNXInstanceAliasList, VPNXInvalidDemensions, namespace, templateQueryIdMap } from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\n\nexport default class DCDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = VPNXInstanceAliasList;\n InvalidDimensions = VPNXInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n // 此处service是接口的配置参数,需和plugin.json里一致,和constant.ts中SERVICES_API_INFO保持一致\n InstanceReqConfig = {\n service: 'vpc',\n action: 'DescribeVpnConnections',\n responseField: 'VpnConnectionSet',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n}\n","import _ from 'lodash';\nimport {\n WAFInstanceAliasList,\n WAFInvalidDemensions,\n templateQueryIdMap,\n namespace,\n regionSupported,\n} from './query_def';\nimport { BaseDatasource } from '../_base/datasource';\nimport { t } from '../../../locale';\n\nexport default class CDNDatasource extends BaseDatasource {\n Namespace = namespace;\n InstanceAliasList = WAFInstanceAliasList;\n InvalidDimensions = WAFInvalidDemensions;\n templateQueryIdMap = templateQueryIdMap;\n InstanceReqConfig = {\n service: 'waf',\n // action: 'DescribeDomains', // DescribeMonitorDomains\n action: 'DescribeMonitorDomains', //\n responseField: 'Domains',\n };\n constructor(instanceSettings, backendSrv, templateSrv) {\n super(instanceSettings, backendSrv, templateSrv);\n }\n getRegions() {\n return Promise.resolve(regionSupported.map(({ value }) => ({ value, text: t(value) })));\n }\n async metricFindQuery(query: any, regex?: string) {\n return super.metricFindQuery({ ...query, ...{ region: 'ap-guangzhou' } }, regex);\n }\n\n getOwnDimension(dimensionObject: any, ins: any) {\n const { Edition = '' } = ins;\n return {\n ...dimensionObject,\n edition: {\n Name: 'edition',\n Value: Edition,\n },\n };\n }\n}\n","import coreModule from 'grafana/app/core/core_module';\nimport { APIGATEWAYFilterFieldsDescriptor, templateQueryIdMap, queryEditorName, namespace } from './query_def';\nimport { GetServiceFromNamespace } from '../../common/constants';\n\nexport class QueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.APIGATEWAYFilterFieldsDescriptor = APIGATEWAYFilterFieldsDescriptor;\n $scope.namespace = namespace;\n };\n $scope.getInstanceId = () => {\n let { instance } = $scope.target;\n const service = GetServiceFromNamespace($scope.namespace);\n // console.log({namespace, service});\n instance = $scope.datasource.getServiceFn(service, 'getVariable')(instance);\n if (!instance) {\n return '';\n }\n try {\n instance = JSON.parse(instance)[templateQueryIdMap.instance];\n } catch (error) {\n // console.log();\n }\n return instance;\n };\n $scope.getExtraDropdown = async (target) => {\n const service = GetServiceFromNamespace($scope.namespace);\n const instanceId = $scope.getInstanceId();\n const region = $scope.datasource.getServiceFn(service, 'getVariable')(target.region);\n const rs = await $scope.datasource.getServiceFn(service, 'getEnvironmentNameList')({ region, instanceId });\n\n const result = rs.map((o) => {\n return {\n text: o.EnvironmentName,\n value: JSON.stringify(o),\n };\n });\n return result;\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n`;\n\nexport function sQuery() {\n return {\n template: template,\n controller: QueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n onRefresh: '&',\n dims: '=',\n },\n };\n}\ncoreModule.directive(queryEditorName, sQuery);\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import coreModule from 'grafana/app/core/core_module';\nimport { BWPFilterFieldsDescriptor } from './query_def';\n\nexport class BWPQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.BWPFilterFieldsDescriptor = BWPFilterFieldsDescriptor;\n };\n\n $scope.onChecked = (srcField, dstField) => {\n if ($scope.target.queries[srcField] === true) {\n $scope.target.queries[dstField] = false;\n }\n $scope.onChange();\n };\n\n $scope.getDropdown = (field) => {\n switch (field) {\n case 'zone':\n return $scope.getZones();\n default:\n return [];\n }\n };\n\n $scope.getZones = () => {\n if (!$scope.region) {\n return [];\n }\n return $scope.datasource.getZones('cvm', $scope.region);\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n \n \n \n
\n
\n\n
\n`;\n\nexport function bwpQuery() {\n return {\n template: template,\n controller: BWPQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n },\n };\n}\n\ncoreModule.directive('bwpQuery', bwpQuery);\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import coreModule from 'grafana/app/core/core_module';\nimport { CDBFieldsDescriptor } from './query_def';\n\nexport class CDBQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.CDBFieldsDescriptor = CDBFieldsDescriptor;\n };\n\n $scope.onChecked = (srcField, dstField) => {\n if ($scope.target.queries[srcField] === true) {\n $scope.target.queries[dstField] = false;\n }\n $scope.onChange();\n };\n\n $scope.getDropdown = (field) => {\n switch (field) {\n case 'ZoneIds':\n return $scope.getZones();\n default:\n return [];\n }\n };\n\n $scope.getZones = () => {\n if (!$scope.region) {\n return [];\n }\n return $scope.datasource.getZones('cdb', $scope.region);\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n`;\n\nexport function cdbQuery() {\n return {\n template: template,\n controller: CDBQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n },\n };\n}\n\ncoreModule.directive('cdbQuery', cdbQuery);\n","import coreModule from 'grafana/app/core/core_module';\nimport { CDNFilterFieldsDescriptor } from './query_def';\n\nexport class CDNQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.CDNFilterFieldsDescriptor = CDNFilterFieldsDescriptor;\n };\n\n // $scope.onChecked = (srcField, dstField) => {\n // if ($scope.target.queries[srcField] === true) {\n // $scope.target.queries[dstField] = false;\n // }\n // $scope.onChange();\n // };\n\n // $scope.getDropdown = (field) => {\n // switch (field) {\n // case 'zone':\n // return $scope.getZones();\n // default:\n // return [];\n // }\n // };\n\n // $scope.getZones = () => {\n // if (!$scope.region) {\n // return [];\n // }\n // return $scope.datasource.getZones('cvm', $scope.region);\n // };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n\n\n\n\n
\n\n
\n`;\n\nexport function cdnQuery() {\n return {\n template: template,\n controller: CDNQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n },\n };\n}\n\ncoreModule.directive('cdnQuery', cdnQuery);\n","import coreModule from 'grafana/app/core/core_module';\nimport { CDNPROVINCEFilterFieldsDescriptor, queryEditorName, namespace } from './query_def';\nimport { GetServiceFromNamespace } from '../../common/constants';\n\nconst ExtraFields = [\n {\n label: 'Isp',\n field: 'isp',\n },\n {\n label: 'Province',\n field: 'district',\n },\n];\nexport class QueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.CDNPROVINCEFilterFieldsDescriptor = CDNPROVINCEFilterFieldsDescriptor;\n $scope.ExtraFields = ExtraFields;\n $scope.namespace = namespace;\n };\n\n $scope.getExtraDropdown = async (target, field) => {\n const service = GetServiceFromNamespace($scope.namespace);\n const region = $scope.datasource.getServiceFn(service, 'getVariable')(target.region);\n const rs = await $scope.datasource.getServiceFn(service, 'getConsumerList')({ region, field });\n return rs;\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n`;\n\nexport function sQuery() {\n return {\n template: template,\n controller: QueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n onRefresh: '&',\n dims: '=',\n },\n };\n}\ncoreModule.directive(queryEditorName, sQuery);\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import coreModule from 'grafana/app/core/core_module';\nimport { CFSQueryDescriptor } from './query_def';\n\nexport class SCFQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.CFSQueryDescriptor = CFSQueryDescriptor;\n };\n\n $scope.getVersions = async (target) => {\n // console.log(2222);\n\n // return [{ text: 1, value: 1 }];\n // console.log(target, 'target');\n const { instance, region } = target;\n const fetcher = $scope.datasource.getServiceFn('scf', 'getVersions');\n if (!instance || !region) return [];\n\n return fetcher(region, { FunctionName: JSON.parse(instance).FunctionName }).then((res) => {\n // console.log(res, 'res');\n\n return res;\n });\n };\n // $scope.onChecked = (srcField, dstField) => {\n // if ($scope.target.queries[srcField] === true) {\n // $scope.target.queries[dstField] = false;\n // }\n // $scope.onChange();\n // };\n\n // $scope.getDropdown = (field) => {\n // switch (field) {\n // case 'zone':\n // return $scope.getZones();\n // default:\n // return [];\n // }\n // };\n\n // $scope.getZones = () => {\n // if (!$scope.region) {\n // return [];\n // }\n // return $scope.datasource.getZones('cvm', $scope.region);\n // };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n
\n`;\n\nexport function scfQuery() {\n return {\n template: template,\n controller: SCFQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n },\n };\n}\ncoreModule.directive('cfsQuery', scfQuery);\n","import coreModule from 'grafana/app/core/core_module';\nimport { CKAFKAQueryDescriptor, templateQueryIdMap } from './query_def';\nimport { isTargetEqual } from '../../common/utils';\n\nconst ExtraFields = [\n {\n label: 'ConsumerGroup',\n field: 'consumerGroup',\n },\n {\n label: 'TopicId',\n field: 'topicId',\n },\n {\n label: 'Partition',\n field: 'partition',\n },\n];\n\nexport class CKAFKAQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.CKAFKAQueryDescriptor = CKAFKAQueryDescriptor;\n };\n\n $scope.getDropdown = (field) => {\n switch (field) {\n default:\n return [];\n }\n };\n $scope.onInstanceChange = (n, o) => {\n if (isTargetEqual(n, o, 'LoadBalancerId')) return;\n $scope.target.consumerGroup = '';\n $scope.target.topicId = '';\n $scope.target.topicName = '';\n $scope.target.partition = '';\n };\n $scope.getExtraFields = () => {\n return ExtraFields.filter((item) => item.field in ($scope.dims ?? {}));\n };\n\n $scope.getInstanceId = () => {\n let { instance } = $scope.target;\n instance = $scope.datasource.getServiceFn('ckafka', 'getVariable')(instance);\n if (Array.isArray(instance)) instance = instance[0];\n if (!instance) {\n return '';\n }\n try {\n instance = JSON.parse(instance).InstanceId;\n } catch (error) {\n // console.log();\n }\n return instance;\n };\n\n $scope.getExtraDropdown = async (target, field) => {\n const InstanceId = $scope.getInstanceId();\n const fetcher = $scope.datasource.getServiceFn('ckafka', 'getConsumerGroups');\n const region = $scope.datasource.getServiceFn('ckafka', 'getVariable')(target.region);\n const res = await fetcher(region, { InstanceId, groupname: target.consumerGroup, topicid: target.topicId });\n\n const { TopicList, GroupList, PartitionList } = res;\n const data = {\n GroupList: GroupList.map((group) => {\n group._InstanceAliasValue = group.GroupName;\n return {\n text: group.GroupName,\n value: JSON.stringify(group),\n };\n }),\n TopicList: TopicList.map((topic) => {\n topic._InstanceAliasValue = topic[templateQueryIdMap.topicId];\n return {\n text: topic[templateQueryIdMap.topicId],\n value: JSON.stringify(topic), // 为了获取多维度的值,这里完全可以使用JSON.stringify()将整个对象放进去\n };\n }),\n PartitionList: PartitionList.map((par) => {\n par._InstanceAliasValue = par[templateQueryIdMap.partition];\n return {\n text: String(par[templateQueryIdMap.partition]),\n value: JSON.stringify(par),\n };\n }),\n };\n\n switch (field) {\n case 'consumerGroup':\n return data.GroupList;\n case 'topicId':\n return data.TopicList;\n case 'partition':\n return data.PartitionList;\n }\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n\n
\n`;\n\nexport function scfQuery() {\n return {\n template: template,\n controller: CKAFKAQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n onRefresh: '&',\n dims: '=',\n instance: '=',\n },\n link: (scope, element, attrs) => {\n scope.$watch('target.instance', (newValue, oldValue) => {\n scope.onInstanceChange?.(newValue, oldValue);\n });\n },\n };\n}\ncoreModule.directive('ckafkaQuery', scfQuery);\n","import coreModule from 'grafana/app/core/core_module';\nimport { get, chain } from 'lodash';\nimport { LOADBALANCEFieldsDescriptor, templateQueryIdMap, namespace } from './query_def';\nimport { GetServiceFromNamespace } from '../../common/constants';\nimport { isTargetEqual } from '../../common/utils';\n\nexport class QueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.LOADBALANCEFieldsDescriptor = LOADBALANCEFieldsDescriptor;\n $scope.serversList = [];\n };\n $scope.onFieldChange = (field) => {\n $scope.onRefresh();\n };\n $scope.onInstanceChange = (n, o) => {\n if (isTargetEqual(n, o, 'InstanceId')) return;\n $scope.target.listener = '';\n $scope.target.servers = '';\n $scope.target.serverPort = '';\n };\n $scope.getVariableId = (data, type) => {\n let variableData = data;\n const service = GetServiceFromNamespace(namespace);\n\n variableData = $scope.datasource.getServiceFn(service, 'getVariable')(variableData);\n if (!variableData) {\n return '';\n }\n try {\n variableData = JSON.parse(variableData)[templateQueryIdMap[type]];\n } catch (error) {\n // console.log();\n }\n return variableData;\n };\n $scope.getExtraDropdown = async (target) => {\n const { instance } = $scope.target;\n const service = GetServiceFromNamespace(namespace);\n const instanceId = $scope.getVariableId(instance, 'instance');\n const region = $scope.datasource.getServiceFn(service, 'getVariable')(target.region);\n const rs = await $scope.datasource.getServiceFn(service, 'getListenerList')({ region, instanceId });\n const result = rs.map((o) => {\n o._InstanceAliasValue = o[templateQueryIdMap.listener];\n return {\n text: o[templateQueryIdMap.listener],\n value: JSON.stringify(o),\n };\n });\n return result;\n };\n $scope.getServersDropdown = async (target) => {\n const { instance, listener } = $scope.target;\n const service = GetServiceFromNamespace(namespace);\n const instanceId = $scope.getVariableId(instance, 'instance');\n const listenerId = $scope.getVariableId(listener, 'listener');\n const region = $scope.datasource.getServiceFn(service, 'getVariable')(target.region);\n const serversList = await $scope.datasource.getServiceFn(\n service,\n 'getServerList'\n )({ region, instanceId, listenerId });\n $scope.serversList = serversList;\n const res = chain(serversList)\n .map((item) => {\n item._InstanceAliasValue = get(item, 'PrivateIpAddresses.0');\n return {\n text: get(item, 'PrivateIpAddresses.0'),\n value: JSON.stringify(item),\n };\n })\n .uniqBy('text')\n .value();\n return res;\n };\n $scope.getServerPortDropdown = async (target) => {\n const { servers } = $scope.target;\n let serverPortList: any[] = [];\n try {\n const serversSource = JSON.parse(servers);\n serverPortList = chain($scope.serversList)\n .filter((item) => get(serversSource, 'PrivateIpAddresses.0') === get(item, 'PrivateIpAddresses.0'))\n .map((item) => {\n item._InstanceAliasValue = get(item, 'Port');\n return {\n text: `${get(item, 'Port')}`,\n value: JSON.stringify(item),\n };\n })\n .value();\n } catch (error) {}\n return serverPortList;\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n
\n\n\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n \n
\n \n \n
\n
\n
\n`;\n\nexport function sQuery() {\n return {\n template: template,\n controller: QueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n namespace: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n onRefresh: '&',\n dims: '=',\n },\n link: (scope, element, attrs) => {\n scope.$watch('target.instance', (newValue, oldValue) => {\n scope.onInstanceChange?.(newValue, oldValue);\n });\n },\n };\n}\ncoreModule.directive('clbQuery', sQuery);\n","import coreModule from 'grafana/app/core/core_module';\nimport { CLSFilterFieldsDescriptor, queryEditorName } from './query_def';\n\nexport class QueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.GSEFilterFieldsDescriptor = CLSFilterFieldsDescriptor;\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n
\n \n \n
\n
\n
\n
\n`;\n\nexport function sQuery() {\n return {\n template: template,\n controller: QueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n onRefresh: '&',\n dims: '=',\n },\n };\n}\ncoreModule.directive(queryEditorName, sQuery);\n","import createQuery from '../_base/query';\nimport { InstanceQueryDescriptor } from './query_def';\n\ncreateQuery('cmqQuery', {\n fieldDescriptor: InstanceQueryDescriptor,\n instanceDocUrl: 'https://cloud.tencent.com/document/api/406/42624',\n namespace: 'QCE/CMQ',\n});\n","import coreModule from 'grafana/app/core/core_module';\nimport { InstanceQueryDescriptor } from './query_def';\n\nconst ExtraFields = [\n {\n label: 'Subscription(订阅)',\n field: 'subscriptionId',\n },\n];\n\nexport class CmqTopicQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.InstanceQueryDescriptor = InstanceQueryDescriptor;\n };\n\n $scope.getDropdown = (field) => {\n switch (field) {\n default:\n return [];\n }\n };\n\n // 各个实例下的订阅,由于不想每次都重复发请求,所以这里做了一层缓存,数据结构为{ [instanceId]: { } }\n $scope.cacheMap = {};\n\n $scope.getExtraFields = () => {\n return ExtraFields.filter((item) => item.field in ($scope.dims ?? {}));\n };\n\n $scope.getTopicName = () => {\n let { instance } = $scope.target;\n instance = $scope.datasource.getServiceFn('cmqTopic', 'getVariable')(instance);\n if (!instance) {\n return '';\n }\n try {\n instance = JSON.parse(instance).TopicName;\n } catch (error) {\n // console.log();\n }\n return instance;\n };\n\n $scope.onExtraFieldChange = (field) => {\n $scope.onRefresh();\n };\n\n $scope.getExtraDropdown = async (target, field) => {\n if (field === 'subscriptionId') {\n const TopicName = $scope.getTopicName();\n let data = $scope.cacheMap[TopicName];\n\n if (!data) {\n const region = $scope.datasource.getServiceFn('cmqTopic', 'getVariable')(target.region);\n const fetcher = $scope.datasource.getServiceFn('cmqTopic', 'fetchAllSubscription');\n const datas = await fetcher(region, { TopicName });\n data = datas.map((item) => {\n item._InstanceAliasValue = item.SubscriptionId;\n return { text: item.SubscriptionId, value: JSON.stringify(item) };\n });\n }\n\n // 缓存\n $scope.cacheMap[TopicName] = data;\n return data;\n }\n return [];\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n\n
\n`;\n\nexport function scfQuery() {\n return {\n template: template,\n controller: CmqTopicQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n onRefresh: '&',\n dims: '=',\n },\n };\n}\ncoreModule.directive('cmqTopicQuery', scfQuery);\n","import _ from 'lodash';\n\nfunction GetInstanceQueryParams(queries: any = {}) {\n const params: any = {};\n if (!_.isEmpty(queries)) {\n params.Limit = _.get(queries, 'Limit', 20) || 20;\n params.Offset = _.get(queries, 'Offset', 0) || 0;\n queries = _.omit(queries, ['Offset', 'Limit']);\n _.forEach(queries, (item: any, key) => {\n if (_.isArray(item)) {\n item = _.compact(item);\n if (item.length > 0) {\n params[key] = _.uniq(item);\n }\n } else if (_.isObject(item)) {\n if (_.isNumber(_.get(item, 'value', undefined)) || !_.isEmpty(_.get(item, 'value', undefined))) {\n params[key] = _.get(item, 'value');\n }\n } else if (_.isNumber(item) || !_.isEmpty(item)) {\n params[key] = item;\n }\n });\n }\n return params;\n}\n\n// 与名称挂钩的变量\nconst InstanceAliasList = ['BucketName'];\nexport { InstanceAliasList, GetInstanceQueryParams };\n\n// 界面状态模型,default\nexport default {\n region: '',\n metricName: '',\n metricUnit: '',\n period: undefined,\n dimensionObject: null,\n instance: '',\n instanceAlias: 'BucketName',\n queries: {},\n};\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import coreModule from 'grafana/app/core/core_module';\nimport { CVMFilterFieldsDescriptor } from './query_def';\n\nexport class CVMQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.CVMFilterFieldsDescriptor = CVMFilterFieldsDescriptor;\n };\n\n $scope.onChecked = (srcField, dstField) => {\n if ($scope.target.queries[srcField] === true) {\n $scope.target.queries[dstField] = false;\n }\n $scope.onChange();\n };\n\n $scope.getDropdown = (field) => {\n switch (field) {\n case 'zone':\n return $scope.getZones();\n default:\n return [];\n }\n };\n\n $scope.getZones = () => {\n if (!$scope.region) {\n return [];\n }\n return $scope.datasource.getZones('cvm', $scope.region);\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n \n \n \n
\n
\n\n
\n`;\n\nexport function cvmQuery() {\n return {\n template: template,\n controller: CVMQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n },\n };\n}\n\ncoreModule.directive('cvmQuery', cvmQuery);\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import coreModule from 'grafana/app/core/core_module';\nimport { DCDBFilterFieldsDescriptor, queryEditorName, namespace, templateQueryIdMap } from './query_def';\nimport { GetServiceFromNamespace } from '../../common/constants';\n\nconst ExtraFields = [\n {\n label: 'nodeid',\n field: 'NodeId',\n action: 'DescribeDCDBInstanceNodeInfo',\n },\n {\n label: 'shardid',\n field: 'ShardId',\n action: 'DescribeDCDBShards',\n },\n];\nconst dropdownTextConfig = {\n DescribeDCDBInstanceNodeInfo: 'NodeId',\n DescribeDCDBShards: 'ShardInstanceId',\n};\nexport class QueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.DCDBFilterFieldsDescriptor = DCDBFilterFieldsDescriptor;\n $scope.ExtraFields = ExtraFields;\n $scope.namespace = namespace;\n };\n\n $scope.getInstanceId = () => {\n let { instance } = $scope.target;\n const service = GetServiceFromNamespace($scope.namespace);\n instance = $scope.datasource.getServiceFn(service, 'getVariable')(instance);\n if (!instance) {\n return '';\n }\n try {\n instance = JSON.parse(instance)[templateQueryIdMap.instance];\n } catch (error) {\n // console.log();\n }\n return instance;\n };\n $scope.getExtraFields = () => {\n return ExtraFields.filter((item) => item.field in ($scope.dims ?? {}) || item.label in ($scope.dims ?? {}));\n };\n $scope.getExtraDropdown = async (target, action) => {\n const service = GetServiceFromNamespace($scope.namespace);\n const region = $scope.datasource.getServiceFn(service, 'getVariable')(target.region);\n const instanceId = $scope.getInstanceId();\n const payload: any = {\n InstanceId: instanceId,\n Limit: 100,\n };\n const rs = await $scope.datasource.getServiceFn(service, 'getConsumerList')({ region, action, payload });\n\n const result = rs.map((o) => {\n o._InstanceAliasValue = o[templateQueryIdMap[dropdownTextConfig[action]]];\n return {\n text: o[templateQueryIdMap[dropdownTextConfig[action]]],\n value: JSON.stringify(o),\n };\n });\n return result;\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n`;\n\nexport function sQuery() {\n return {\n template: template,\n controller: QueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n onRefresh: '&',\n dims: '=',\n },\n };\n}\ncoreModule.directive(queryEditorName, sQuery);\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import coreModule from 'grafana/app/core/core_module';\nimport { ECMBLOCKSTORAGEFilterFieldsDescriptor, queryEditorName, namespace, templateQueryIdMap } from './query_def';\nimport { GetServiceFromNamespace } from '../../common/constants';\n\nconst ExtraFields = [\n // {\n // label: 'nodeid',\n // field: 'NodeId',\n // action: 'DescribeInstanceNodeInfo',\n // },\n {\n label: 'diskId',\n field: 'diskId',\n },\n];\nexport class QueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.ECMBLOCKSTORAGEFilterFieldsDescriptor = ECMBLOCKSTORAGEFilterFieldsDescriptor;\n $scope.ExtraFields = ExtraFields;\n $scope.namespace = namespace;\n };\n\n // $scope.getInstanceId = () => {\n // let { instance } = $scope.target;\n // const service = GetServiceFromNamespace($scope.namespace);\n // instance = $scope.datasource.getServiceFn(service, 'getVariable')(instance);\n // if (!instance) {\n // return '';\n // }\n // try {\n // instance = JSON.parse(instance)[templateQueryIdMap.instance];\n // } catch (error) {\n // console.log();\n // }\n // return instance;\n // };\n $scope.getExtraFields = () => {\n return ExtraFields.filter((item) => item.field in ($scope.dims ?? {}) || item.label in ($scope.dims ?? {}));\n };\n $scope.getExtraDropdown = (target, action) => {\n let { instance } = target;\n const service = GetServiceFromNamespace($scope.namespace);\n instance = $scope.datasource.getServiceFn(service, 'getVariable')(instance);\n try {\n instance = JSON.parse(instance);\n const { DataDisks: dataDisks } = instance;\n return dataDisks.map((o) => {\n o._InstanceAliasValue = o[templateQueryIdMap.diskId];\n return {\n text: o[templateQueryIdMap.diskId],\n value: JSON.stringify(o),\n };\n });\n } catch (error) {\n // console.log('instance error', instance);\n const payload: any = {\n InstanceId: instance,\n };\n const rs = $scope.datasource.getServiceFn(service, 'getDiskList')({ payload });\n const result = rs.map((o) => {\n return {\n text: o[templateQueryIdMap.diskId],\n value: JSON.stringify(o),\n };\n });\n return result;\n }\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n`;\n\nexport function sQuery() {\n return {\n template: template,\n controller: QueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n onRefresh: '&',\n dims: '=',\n },\n };\n}\ncoreModule.directive(queryEditorName, sQuery);\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import coreModule from 'grafana/app/core/core_module';\nimport { GSEFilterFieldsDescriptor, templateQueryIdMap, queryEditorName, namespace } from './query_def';\nimport { GetServiceFromNamespace } from '../../common/constants';\n\nconst ExtraFields = [\n {\n label: 'fleetId',\n field: 'FleetId',\n },\n {\n label: 'queueName',\n field: 'Name',\n },\n];\nconst actionMaps = {\n FleetId: 'getFleetList',\n Name: 'getQueueNameList',\n};\nexport class QueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.GSEFilterFieldsDescriptor = GSEFilterFieldsDescriptor;\n $scope.namespace = namespace;\n };\n\n $scope.getExtraFields = () => {\n return ExtraFields.filter((item) => item.field in ($scope.dims ?? {}));\n };\n\n $scope.getInstanceId = () => {\n let { instance } = $scope.target;\n const service = GetServiceFromNamespace($scope.namespace);\n // console.log({namespace, service});\n instance = $scope.datasource.getServiceFn(service, 'getVariable')(instance);\n if (!instance) {\n return '';\n }\n try {\n instance = JSON.parse(instance)[templateQueryIdMap.instance];\n } catch (error) {\n // console.log();\n }\n return instance;\n };\n $scope.getExtraDropdown = async (target, field) => {\n const service = GetServiceFromNamespace($scope.namespace);\n const instanceId = $scope.getInstanceId();\n const region = $scope.datasource.getServiceFn(service, 'getVariable')(target.region);\n // const rs = await $scope.datasource.getServiceFn(service, 'getEnvironmentNameList')({ region, instanceId });\n let rs = await $scope.datasource.getServiceFn(service, actionMaps[field])({ region, instanceId });\n const result = rs.map((o) => {\n o._InstanceAliasValue = o[templateQueryIdMap[field]];\n return {\n text: o[templateQueryIdMap[field]],\n value: JSON.stringify(o),\n };\n });\n return result;\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n`;\n\nexport function sQuery() {\n return {\n template: template,\n controller: QueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n onRefresh: '&',\n dims: '=',\n },\n };\n}\ncoreModule.directive(queryEditorName, sQuery);\n","import coreModule from 'grafana/app/core/core_module';\nimport { LBFilterDescriptor } from './query_def';\n\nexport class LBQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n // $scope.LBQueryDescriptor = LBQueryDescriptor;\n $scope.LBFilterDescriptor = LBFilterDescriptor;\n };\n\n $scope.onChecked = (srcField, dstField) => {\n if ($scope.target.queries[srcField] === true) {\n $scope.target.queries[dstField] = false;\n }\n $scope.onChange();\n };\n\n $scope.getDropdown = (field) => {\n switch (field) {\n case 'zone':\n return $scope.getZones();\n default:\n return [];\n }\n };\n\n $scope.getZones = () => {\n if (!$scope.region) {\n return [];\n }\n return $scope.datasource.getZones('cvm', $scope.region);\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n\n\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n\n\n
\n
\n \n \n \n \n \n
\n
\n\n
\n`;\n\nexport function lbQuery() {\n return {\n template: template,\n controller: LBQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n },\n };\n}\n\ncoreModule.directive('lbQuery', lbQuery);\n","import coreModule from 'grafana/app/core/core_module';\nimport { LighthouseFilterFieldsDescriptor } from './query_def';\n\nexport class LighthouseQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.LighthouseFilterFieldsDescriptor = LighthouseFilterFieldsDescriptor;\n };\n\n $scope.onChecked = (srcField, dstField) => {\n if ($scope.target.queries[srcField] === true) {\n $scope.target.queries[dstField] = false;\n }\n $scope.onChange();\n };\n\n $scope.getDropdown = (field) => {\n switch (field) {\n case 'zone':\n return $scope.getZones();\n default:\n return [];\n }\n };\n\n $scope.getZones = () => {\n if (!$scope.region) {\n return [];\n }\n return $scope.datasource.getZones('lighthouse', $scope.region);\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n \n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n \n \n \n
\n
\n
\n`;\n\nexport function lighthouseQuery() {\n return {\n template: template,\n controller: LighthouseQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n },\n };\n}\n\ncoreModule.directive('lighthouseQuery', lighthouseQuery);\n","import coreModule from 'grafana/app/core/core_module';\nimport { map, get, find, times } from 'lodash';\nimport { MONGODBFieldsDescriptor, templateQueryIdMap } from './query_def';\nimport { GetServiceFromNamespace } from '../../common/constants';\n\nexport class MongoDBQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.MONGODBFieldsDescriptor = MONGODBFieldsDescriptor;\n };\n\n $scope.onChecked = (srcField, dstField) => {\n if ($scope.target.queries[srcField] === true) {\n $scope.target.queries[dstField] = false;\n }\n $scope.onChange();\n };\n\n $scope.getDropdown = (field) => {\n switch (field) {\n default:\n return [];\n }\n };\n\n $scope.onInstanceChange = (n, o) => {\n if (n === o) {\n return;\n }\n $scope.target.replica = '';\n $scope.target.node = '';\n };\n\n $scope.getVariableId = (data, type) => {\n let variableData = data;\n const service = GetServiceFromNamespace('QCE/CMONGO');\n\n variableData = $scope.datasource.getServiceFn(service, 'getVariable')(variableData);\n if (!variableData) {\n return '';\n }\n try {\n variableData = JSON.parse(variableData)[templateQueryIdMap[type]];\n } catch (error) {\n // console.log();\n }\n return variableData;\n };\n\n $scope.getExtraDropdown = async (target, type) => {\n const { instance, replica } = $scope.target;\n const service = GetServiceFromNamespace('QCE/CMONGO');\n const instanceId = $scope.getVariableId(instance, 'instance');\n const region = $scope.datasource.getServiceFn(service, 'getVariable')(target.region);\n const [res] = await $scope.datasource.getServiceFn(service, 'getInstances')(region, {\n InstanceIds: [instanceId],\n });\n if (type === 'replica') {\n return map(get(res, 'ReplicaSets', []), (item) => {\n item._InstanceAliasValue = item.ReplicaSetId;\n return { text: item.ReplicaSetId, value: JSON.stringify(item) };\n });\n }\n if (type === 'node' && replica !== '') {\n const replicaId = $scope.getVariableId(replica, 'replica');\n const targetReplica = find(get(res, 'ReplicaSets', []), { ReplicaSetId: replicaId });\n const options = times(targetReplica.SecondaryNum, (index) => {\n const nodeId = `${targetReplica.ReplicaSetId}-node-slave${index}`;\n return {\n text: nodeId,\n value: JSON.stringify({ NodeId: nodeId, _InstanceAliasValue: `${targetReplica.ReplicaSetId} - ${nodeId}` }),\n };\n });\n return [\n {\n text: `${targetReplica.ReplicaSetId}-node-primary`,\n value: JSON.stringify({\n NodeId: `${targetReplica.ReplicaSetId}-node-primary`,\n _InstanceAliasValue: `${targetReplica.ReplicaSetId} - ${`${targetReplica.ReplicaSetId}-node-primary`}`,\n }),\n },\n ...options,\n ];\n }\n return [];\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n \n
\n
\n \n \n \n \n \n \n \n
\n
\n
\n\n
\n
\n \n
\n \n \n
\n
\n
\n\n
\n
\n \n
\n \n \n
\n
\n
\n`;\n\nexport function mongodbQuery() {\n return {\n template: template,\n controller: MongoDBQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n onRefresh: '&',\n onChange: '&',\n },\n link: (scope, element, attrs) => {\n scope.$watch('target.instance', (newValue, oldValue) => {\n scope.onInstanceChange?.(newValue, oldValue);\n });\n },\n };\n}\n\ncoreModule.directive('mongodbQuery', mongodbQuery);\n","import { InstanceQueryDescriptor, templateQueryIdMap } from './query_def';\nimport coreModule from 'grafana/app/core/core_module';\n\nconst ExtraFields = [\n {\n label: 'NodeIP',\n field: 'nodeIP',\n },\n];\n\nexport class MrQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.InstanceQueryDescriptor = InstanceQueryDescriptor;\n };\n\n $scope.getDropdown = (field) => {\n switch (field) {\n default:\n return [];\n }\n };\n\n // 各个实例下的订阅,由于不想每次都重复发请求,所以这里做了一层缓存,数据结构为{ [instanceId]: { } }\n $scope.cacheMap = {};\n\n $scope.getExtraFields = () => {\n return Object.keys($scope.dims ?? {}).some((item: string) => item.startsWith('host4')) ? ExtraFields : [];\n // return ExtraFields;\n };\n\n $scope.getInstanceId = () => {\n let { instance } = $scope.target;\n instance = $scope.datasource.getServiceFn('mrHDFS', 'getVariable')(instance);\n if (!instance) {\n return '';\n }\n try {\n instance = JSON.parse(instance).ClusterId;\n } catch (error) {\n // console.log();\n }\n return instance;\n };\n\n $scope.onExtraFieldChange = (field) => {\n $scope.onRefresh();\n };\n\n $scope.getExtraDropdown = async (target, field) => {\n if (field === 'nodeIP') {\n const InstanceId = $scope.getInstanceId();\n let data = $scope.cacheMap[InstanceId];\n\n if (!data) {\n const region = $scope.datasource.getServiceFn('mrHDFS', 'getVariable')(target.region);\n const fetcher = $scope.datasource.getServiceFn('mrHDFS', 'fetchAllNodes');\n const dataT = await fetcher(region, { InstanceId, NodeFlag: 'all' });\n data = dataT.map((item) => {\n item._InstanceAliasValue = item[templateQueryIdMap.node];\n return {\n text: item[templateQueryIdMap.node],\n value: JSON.stringify(item),\n };\n });\n }\n\n // 缓存\n $scope.cacheMap[InstanceId] = data;\n return data;\n }\n return [];\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n
\n
\n
\n \n
\n\n \n \n
\n
\n
\n
\n\n
\n`;\n\nexport function mrQuery() {\n return {\n template: template,\n controller: MrQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n onRefresh: '&',\n dims: '=',\n },\n };\n}\ncoreModule.directive('mrQuery', mrQuery);\n","import coreModule from 'grafana/app/core/core_module';\nimport { NATGatewayFilterFieldsDescriptor } from './query_def';\n\nexport class NatGatewayQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.NATGatewayFilterFieldsDescriptor = NATGatewayFilterFieldsDescriptor;\n };\n\n $scope.onChecked = (srcField, dstField) => {\n if ($scope.target.queries[srcField] === true) {\n $scope.target.queries[dstField] = false;\n }\n $scope.onChange();\n };\n\n $scope.getDropdown = (field) => {\n switch (field) {\n default:\n return [];\n }\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n \n \n \n
\n
\n\n
\n`;\n\nexport function natGatewayQuery() {\n return {\n template: template,\n controller: NatGatewayQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n },\n };\n}\n\ncoreModule.directive('natGatewayQuery', natGatewayQuery);\n","import coreModule from 'grafana/app/core/core_module';\nimport { OVCDNFilterFieldsDescriptor } from './query_def';\n\nexport class OVCDNQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.OVCDNFilterFieldsDescriptor = OVCDNFilterFieldsDescriptor;\n };\n\n // $scope.onChecked = (srcField, dstField) => {\n // if ($scope.target.queries[srcField] === true) {\n // $scope.target.queries[dstField] = false;\n // }\n // $scope.onChange();\n // };\n\n // $scope.getDropdown = (field) => {\n // switch (field) {\n // case 'zone':\n // return $scope.getZones();\n // default:\n // return [];\n // }\n // };\n\n // $scope.getZones = () => {\n // if (!$scope.region) {\n // return [];\n // }\n // return $scope.datasource.getZones('cvm', $scope.region);\n // };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n\n\n\n\n
\n\n
\n`;\n\nexport function ovCdnQuery() {\n return {\n template: template,\n controller: OVCDNQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n },\n };\n}\n\ncoreModule.directive('ovCdnQuery', ovCdnQuery);\n","import coreModule from 'grafana/app/core/core_module';\nimport { PCXFieldsDescriptor } from './query_def';\n\nexport class PCXQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.PCXFieldsDescriptor = PCXFieldsDescriptor;\n };\n\n $scope.onChecked = (srcField, dstField) => {\n if ($scope.target.queries[srcField] === true) {\n $scope.target.queries[dstField] = false;\n }\n $scope.onChange();\n };\n\n $scope.getDropdown = (field) => {\n switch (field) {\n case 'vpcId':\n return $scope.getVpcIds();\n default:\n return [];\n }\n };\n\n $scope.getVpcIds = () => {\n if (!$scope.region) {\n return [];\n }\n return $scope.datasource.getVpcIds('pcx', $scope.region);\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n \n
\n
\n \n \n \n \n \n \n \n
\n
\n\n
\n`;\n\nexport function pcxQuery() {\n return {\n template: template,\n controller: PCXQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n onChange: '&',\n },\n };\n}\n\ncoreModule.directive('pcxQuery', pcxQuery);\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import coreModule from 'grafana/app/core/core_module';\nimport { RedisFieldsDescriptor } from './query_def';\n\nexport class RedisQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.RedisFieldsDescriptor = RedisFieldsDescriptor;\n };\n\n $scope.onChecked = (srcField, dstField) => {\n if ($scope.target.queries[srcField] === true) {\n $scope.target.queries[dstField] = false;\n }\n $scope.onChange();\n };\n\n $scope.getDropdown = (field) => {\n switch (field) {\n default:\n return [];\n }\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n \n
\n
\n \n \n \n \n \n \n \n
\n
\n\n
\n`;\n\nexport function redisQuery() {\n return {\n template: template,\n controller: RedisQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n onChange: '&',\n },\n };\n}\n\ncoreModule.directive('redisQuery', redisQuery);\n","import coreModule from 'grafana/app/core/core_module';\nimport { map } from 'lodash';\nimport { RedisMemFieldsDescriptor, templateQueryIdMap, NodeType, namespace } from './query_def';\nimport { GetServiceFromNamespace } from '../../common/constants';\n\nexport class RedisMemQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.RedisMemFieldsDescriptor = RedisMemFieldsDescriptor;\n };\n\n $scope.clearExtrasAlias = () => {\n $scope.target.rnodeid = '';\n $scope.target.pnodeid = '';\n };\n\n $scope.onChecked = (srcField, dstField) => {\n if ($scope.target.queries[srcField] === true) {\n $scope.target.queries[dstField] = false;\n }\n $scope.onChange();\n };\n\n $scope.getDropdown = (field) => {\n switch (field) {\n default:\n return [];\n }\n };\n\n $scope.getVariableId = (data, type) => {\n let variableData = data;\n const service = GetServiceFromNamespace(namespace);\n\n variableData = $scope.datasource.getServiceFn(service, 'getVariable')(variableData);\n if (!variableData) {\n return '';\n }\n try {\n variableData = JSON.parse(variableData)[templateQueryIdMap[type]];\n } catch (error) {}\n return variableData;\n };\n\n $scope.getExtraDropdown = async (target, nodetype) => {\n const { instance } = $scope.target;\n const service = GetServiceFromNamespace(namespace);\n const instanceId = $scope.getVariableId(instance, 'instance');\n const region = $scope.datasource.getServiceFn(service, 'getVariable')(target.region);\n const rs = await $scope.datasource.getServiceFn(service, 'getInstanceNodeInfo')({ region, instanceId });\n\n const ndoeTypeIndex = NodeType.indexOf(nodetype);\n return ndoeTypeIndex === -1 ? [] : map(rs[ndoeTypeIndex], (item) => ({ text: item.NodeId, value: item.NodeId }));\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n \n
\n
\n \n \n \n \n \n \n \n
\n
\n\n
\n\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n \n
\n \n \n
\n
\n
\n`;\n\nexport function redisMemQuery() {\n return {\n template: template,\n controller: RedisMemQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n onChange: '&',\n onRefresh: '&',\n dims: '=',\n },\n link: (scope, element, attrs) => {\n scope.$watch('target.instance', () => {\n scope.clearExtrasAlias?.();\n });\n scope.$watch('target.metricName', () => {\n scope.clearExtrasAlias?.();\n });\n },\n };\n}\n\ncoreModule.directive('redisMemQuery', redisMemQuery);\n","import coreModule from 'grafana/app/core/core_module';\nimport { SCFQueryDescriptor, templateQueryIdMap } from './query_def';\n\nexport class SCFQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.SCFQueryDescriptor = SCFQueryDescriptor;\n };\n\n $scope.getInstanceId = () => {\n let { instance } = $scope.target;\n instance = $scope.datasource.getServiceFn('scf', 'getVariable')(instance);\n if (!instance) {\n return '';\n }\n try {\n instance = JSON.parse(instance).FunctionName;\n } catch (error) {\n // console.log();\n }\n return instance;\n };\n\n $scope.getVersions = async (target) => {\n // console.log(2222);\n\n // return [{ text: 1, value: 1 }];\n // console.log(target, 'target');\n // let { instance, region } = target;\n const FunctionName = $scope.getInstanceId();\n const region = $scope.datasource.getServiceFn('scf', 'getVariable')(target.region);\n if (!FunctionName || !region) return [];\n\n const fetcher = $scope.datasource.getServiceFn('scf', 'getVersions');\n\n return fetcher(region, { FunctionName }).then((res) => {\n // console.log(res, 'res');\n const result = res.map((o) => {\n o._InstanceAliasValue = o[templateQueryIdMap.version];\n return {\n text: o[templateQueryIdMap.version],\n value: JSON.stringify(o),\n };\n });\n return result;\n });\n };\n // $scope.onChecked = (srcField, dstField) => {\n // if ($scope.target.queries[srcField] === true) {\n // $scope.target.queries[dstField] = false;\n // }\n // $scope.onChange();\n // };\n\n // $scope.getDropdown = (field) => {\n // switch (field) {\n // case 'zone':\n // return $scope.getZones();\n // default:\n // return [];\n // }\n // };\n\n // $scope.getZones = () => {\n // if (!$scope.region) {\n // return [];\n // }\n // return $scope.datasource.getZones('cvm', $scope.region);\n // };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n \n
\n \n \n
\n
\n
\n\n
\n`;\n\nexport function scfQuery() {\n return {\n template: template,\n controller: SCFQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n onRefresh: '&',\n },\n };\n}\ncoreModule.directive('scfQuery', scfQuery);\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import coreModule from 'grafana/app/core/core_module';\nimport { TDMQFilterFieldsDescriptor, queryEditorName, namespace, templateQueryIdMap } from './query_def';\nimport { GetServiceFromNamespace } from '../../common/constants';\n\nconst ExtraFields = [\n {\n label: 'environmentId',\n field: 'environmentId',\n action: 'DescribeEnvironments',\n },\n {\n label: 'topicName',\n field: 'topicName',\n action: 'DescribeTopics',\n },\n];\n\nconst dropdownTextConfig = {\n DescribeTopics: 'topicName',\n DescribeEnvironments: 'environmentId',\n};\nexport class QueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.TDMQFilterFieldsDescriptor = TDMQFilterFieldsDescriptor;\n $scope.ExtraFields = ExtraFields;\n $scope.namespace = namespace;\n };\n\n $scope.getInstanceId = () => {\n let { instance } = $scope.target;\n const service = GetServiceFromNamespace($scope.namespace);\n instance = $scope.datasource.getServiceFn(service, 'getVariable')(instance);\n if (!instance) {\n return '';\n }\n try {\n instance = JSON.parse(instance)[templateQueryIdMap.instance];\n } catch (error) {\n // console.log();\n }\n return instance;\n };\n $scope.getExtraFields = () => {\n return ExtraFields.filter((item) => item.field in ($scope.dims ?? {}) || item.label in ($scope.dims ?? {}));\n };\n $scope.getExtraDropdown = async (target, action) => {\n const service = GetServiceFromNamespace($scope.namespace);\n const region = $scope.datasource.getServiceFn(service, 'getVariable')(target.region);\n const payload: any = {\n Limit: 100,\n ClusterId: $scope.getInstanceId(),\n };\n if (action === 'DescribeTopics') {\n let evId = $scope.target.environmentId;\n try {\n evId = JSON.parse(evId);\n evId = evId[templateQueryIdMap.environmentId];\n } catch (e) {}\n payload.EnvironmentId = evId;\n }\n\n const rs = await $scope.datasource.getServiceFn(service, 'getConsumerList')({ region, action, payload });\n const result = rs.map((o) => {\n o._InstanceAliasValue = o[templateQueryIdMap[dropdownTextConfig[action]]];\n return {\n text: o[templateQueryIdMap[dropdownTextConfig[action]]],\n label: o[templateQueryIdMap[dropdownTextConfig[action]]],\n value: JSON.stringify(o),\n };\n });\n return result;\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n`;\n\nexport function sQuery() {\n return {\n template: template,\n controller: QueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n onRefresh: '&',\n dims: '=',\n },\n };\n}\ncoreModule.directive(queryEditorName, sQuery);\n","import coreModule from 'grafana/app/core/core_module';\nimport { TDMQFilterFieldsDescriptor, namespace, templateQueryIdMap } from './query_def';\nimport { GetServiceFromNamespace } from '../../common/constants';\n\nconst ExtraFields = [\n {\n label: 'Node',\n field: 'node',\n action: 'DescribeRabbitMQNodeList',\n },\n];\n\nconst dropdownTextConfig = {\n DescribeRabbitMQNodeList: 'node',\n};\nexport class QueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.TDMQFilterFieldsDescriptor = TDMQFilterFieldsDescriptor;\n $scope.ExtraFields = ExtraFields;\n $scope.namespace = namespace;\n };\n\n $scope.clearExtrasAlias = () => {\n $scope.target.node = '';\n };\n\n $scope.getInstanceId = () => {\n let { instance } = $scope.target;\n const service = GetServiceFromNamespace($scope.namespace);\n instance = $scope.datasource.getServiceFn(service, 'getVariable')(instance);\n if (!instance) {\n return '';\n }\n try {\n instance = JSON.parse(instance)[templateQueryIdMap.instance];\n } catch (error) {\n // console.log();\n }\n return instance;\n };\n $scope.getExtraFields = () => {\n return ExtraFields.filter((item) => item.field in ($scope.dims ?? {}) || item.label in ($scope.dims ?? {}));\n };\n $scope.getExtraDropdown = async (target, action) => {\n const service = GetServiceFromNamespace($scope.namespace);\n const region = $scope.datasource.getServiceFn(service, 'getVariable')(target.region);\n const payload: any = {\n Limit: 100,\n InstanceId: $scope.getInstanceId(),\n };\n\n const rs = await $scope.datasource.getServiceFn(service, 'getConsumerList')({ region, action, payload });\n const result = rs.map((o) => {\n o._InstanceAliasValue = o[templateQueryIdMap[dropdownTextConfig[action]]];\n return {\n text: o[templateQueryIdMap[dropdownTextConfig[action]]],\n label: o[templateQueryIdMap[dropdownTextConfig[action]]],\n value: JSON.stringify(o),\n };\n });\n return result;\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n`;\n\nexport function sQuery() {\n return {\n template: template,\n controller: QueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n onRefresh: '&',\n dims: '=',\n },\n link: (scope, element, attrs) => {\n scope.$watch('target.instance', () => {\n scope.clearExtrasAlias?.();\n });\n scope.$watch('target.metricName', () => {\n scope.clearExtrasAlias?.();\n });\n },\n };\n}\ncoreModule.directive('tdmqRabbitmqQuery', sQuery);\n","import coreModule from 'grafana/app/core/core_module';\nimport { TDMQFilterFieldsDescriptor, namespace, templateQueryIdMap } from './query_def';\nimport { GetServiceFromNamespace } from '../../common/constants';\n\nconst ExtraFields = [\n {\n label: 'Namespace',\n field: 'namespace',\n action: 'DescribeRocketMQNamespaces',\n },\n {\n label: 'Group',\n field: 'group',\n action: 'DescribeRocketMQGroups',\n },\n];\n\nconst dropdownTextConfig = {\n DescribeRocketMQNamespaces: 'namespace',\n DescribeRocketMQGroups: 'group',\n};\nexport class TdmqRocketmqQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.TDMQFilterFieldsDescriptor = TDMQFilterFieldsDescriptor;\n $scope.ExtraFields = ExtraFields;\n $scope.namespace = namespace;\n };\n\n $scope.clearExtrasAlias = () => {\n $scope.target.namespace = '';\n $scope.target.group = '';\n };\n\n $scope.onChecked = (srcField, dstField) => {\n if ($scope.target.queries[srcField] === true) {\n $scope.target.queries[dstField] = false;\n }\n $scope.onChange();\n };\n\n $scope.getInstanceId = () => {\n let { instance } = $scope.target;\n const service = GetServiceFromNamespace($scope.namespace);\n instance = $scope.datasource.getServiceFn(service, 'getVariable')(instance);\n if (!instance) {\n return '';\n }\n try {\n instance = JSON.parse(instance)[templateQueryIdMap.instance];\n } catch (error) {\n // console.log();\n }\n return instance;\n };\n $scope.getExtraFields = () => {\n return ExtraFields.filter((item) => item.field in ($scope.dims ?? {}) || item.label in ($scope.dims ?? {}));\n };\n $scope.getExtraDropdown = async (target, action) => {\n const service = GetServiceFromNamespace($scope.namespace);\n const region = $scope.datasource.getServiceFn(service, 'getVariable')(target.region);\n const payload: any = {\n Limit: 100,\n ClusterId: $scope.getInstanceId(),\n };\n if (action === 'DescribeRocketMQGroups') {\n let namespace = $scope.target.namespace;\n try {\n namespace = JSON.parse(namespace)[templateQueryIdMap.namespace];\n } catch (e) {}\n payload.NamespaceId = $scope.datasource.getServiceFn(service, 'getVariable')(namespace);\n }\n\n const rs = await $scope.datasource.getServiceFn(service, 'getConsumerList')({ region, action, payload });\n const result = rs.map((o) => {\n o._InstanceAliasValue = o[templateQueryIdMap[dropdownTextConfig[action]]];\n return {\n text: o[templateQueryIdMap[dropdownTextConfig[action]]],\n value: JSON.stringify(o),\n };\n });\n return result;\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n
\n \n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n`;\n\nexport function tdmqRocketmqQuery() {\n return {\n template: template,\n controller: TdmqRocketmqQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n onRefresh: '&',\n dims: '=',\n },\n link: (scope, element, attrs) => {\n scope.$watch('target.instance', () => {\n scope.clearExtrasAlias?.();\n });\n scope.$watch('target.metricName', () => {\n scope.clearExtrasAlias?.();\n });\n },\n };\n}\ncoreModule.directive('tdmqRocketmqQuery', tdmqRocketmqQuery);\n","import coreModule from 'grafana/app/core/core_module';\nimport { isEmpty } from 'lodash';\nimport { TKEFilterFieldsDescriptor } from './query_def';\n\nexport class QueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.TKEFilterFieldsDescriptor = TKEFilterFieldsDescriptor;\n };\n\n $scope.onChecked = (srcField, dstField) => {\n if ($scope.target.queries[srcField] === true) {\n $scope.target.queries[dstField] = false;\n }\n $scope.onChange();\n };\n\n $scope.addCondition = () => {\n $scope.target.conditions.push({ Key: '', Operator: '=', Value: '' });\n };\n\n $scope.deleteCondition = (index) => {\n const targetCondition = $scope.target.conditions[index];\n if (isEmpty(targetCondition.Key) || isEmpty(targetCondition.Operator) || isEmpty(targetCondition.Value)) {\n $scope.target.conditions.splice(index, 1);\n } else {\n $scope.target.conditions.splice(index, 1);\n $scope.onRefresh();\n }\n };\n\n $scope.getOperator = () => {\n return Promise.resolve([\n { text: '=', value: '=' },\n { text: 'in', value: 'in' },\n ]);\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n
\n \n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n
\n
\n \n
\n
\n \n
\n \n \n
\n \n \n \n
\n
\n \n
\n
\n
\n
\n
\n
\n \n \n
\n
\n
\n`;\n\nexport function sQuery() {\n return {\n template: template,\n controller: QueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n onRefresh: '&',\n dims: '=',\n },\n };\n}\ncoreModule.directive('tkeQuery', sQuery);\n","import coreModule from 'grafana/app/core/core_module';\nimport { TSFFieldsDescriptor } from './query_def';\n\nexport class TSFQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.TSFFieldsDescriptor = TSFFieldsDescriptor;\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n \n
\n
\n \n \n \n \n \n
\n
\n\n
\n`;\n\nexport function tsfQuery() {\n return {\n template: template,\n controller: TSFQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n onChange: '&',\n },\n };\n}\n\ncoreModule.directive('tsfQuery', tsfQuery);\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import coreModule from 'grafana/app/core/core_module';\nimport { VBCFilterFieldsDescriptor, namespace } from './query_def';\nimport { GetServiceFromNamespace } from '../../common/constants';\n\nconst ExtraFields: any = [\n // {\n // label: 'SRegion',\n // field: 'SRegion',\n // },\n // {\n // label: 'DRegion',\n // field: 'DRegion',\n // },\n];\n\nexport class VBCQueryCtrl {\n /** @ngInject */\n constructor($scope, $rootScope) {\n $scope.init = () => {\n $scope.VBCFilterFieldsDescriptor = VBCFilterFieldsDescriptor;\n $scope.namespace = namespace;\n };\n $scope.getExtraFields = () => {\n return ExtraFields.filter((item) => item.field in ($scope.dims ?? {}));\n };\n\n $scope.getExtraDropdown = (field) => {\n const service = GetServiceFromNamespace($scope.namespace);\n // return $scope.datasource.getServiceFn(service, 'getFilterDropdown')({ field })\n return $scope.datasource.getFilterDropdown(service, { field });\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n
\n \n
\n
\n \n \n \n \n \n \n
\n
\n
\n\n\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n`;\n\nexport function scfQuery() {\n return {\n template: template,\n controller: VBCQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n onRefresh: '&',\n dims: '=',\n },\n };\n}\ncoreModule.directive('vbcQuery', scfQuery);\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","import queryFactory from '../_base/query';\nimport { queryEditorConfig, queryEditorName } from './query_def';\nqueryFactory(queryEditorName, queryEditorConfig);\n","var map = {\n\t\".\": 20,\n\t\"./\": 20,\n\t\"./MonitorDatasource\": 188,\n\t\"./MonitorDatasource.ts\": 188,\n\t\"./_base/datasource\": 3,\n\t\"./_base/datasource.ts\": 3,\n\t\"./_base/query\": 7,\n\t\"./_base/query.ts\": 7,\n\t\"./_base/query_filter\": 195,\n\t\"./_base/query_filter.ts\": 195,\n\t\"./_base/types\": 196,\n\t\"./_base/types.ts\": 196,\n\t\"./apigateway/datasource\": 75,\n\t\"./apigateway/datasource.ts\": 75,\n\t\"./apigateway/query\": 131,\n\t\"./apigateway/query.ts\": 131,\n\t\"./apigateway/query_def\": 23,\n\t\"./apigateway/query_def.ts\": 23,\n\t\"./bmIntraLb/datasource\": 76,\n\t\"./bmIntraLb/datasource.ts\": 76,\n\t\"./bmIntraLb/query\": 132,\n\t\"./bmIntraLb/query.ts\": 132,\n\t\"./bmIntraLb/query_def\": 31,\n\t\"./bmIntraLb/query_def.ts\": 31,\n\t\"./bm_lb/datasource\": 77,\n\t\"./bm_lb/datasource.ts\": 77,\n\t\"./bm_lb/query\": 133,\n\t\"./bm_lb/query.ts\": 133,\n\t\"./bm_lb/query_def\": 32,\n\t\"./bm_lb/query_def.ts\": 32,\n\t\"./bm_pcx/datasource\": 78,\n\t\"./bm_pcx/datasource.ts\": 78,\n\t\"./bm_pcx/query\": 134,\n\t\"./bm_pcx/query.ts\": 134,\n\t\"./bm_pcx/query_def\": 33,\n\t\"./bm_pcx/query_def.ts\": 33,\n\t\"./bwp/datasource\": 79,\n\t\"./bwp/datasource.ts\": 79,\n\t\"./bwp/query\": 135,\n\t\"./bwp/query.ts\": 135,\n\t\"./bwp/query_def\": 63,\n\t\"./bwp/query_def.ts\": 63,\n\t\"./cbs/datasource\": 80,\n\t\"./cbs/datasource.ts\": 80,\n\t\"./cbs/query\": 136,\n\t\"./cbs/query.ts\": 136,\n\t\"./cbs/query_def\": 34,\n\t\"./cbs/query_def.ts\": 34,\n\t\"./cdb/datasource\": 81,\n\t\"./cdb/datasource.ts\": 81,\n\t\"./cdb/query\": 137,\n\t\"./cdb/query.ts\": 137,\n\t\"./cdb/query_def\": 44,\n\t\"./cdb/query_def.ts\": 44,\n\t\"./cdn/datasource\": 82,\n\t\"./cdn/datasource.ts\": 82,\n\t\"./cdn/query\": 138,\n\t\"./cdn/query.ts\": 138,\n\t\"./cdn/query_def\": 64,\n\t\"./cdn/query_def.ts\": 64,\n\t\"./cdn_province/datasource\": 83,\n\t\"./cdn_province/datasource.ts\": 83,\n\t\"./cdn_province/query\": 139,\n\t\"./cdn_province/query.ts\": 139,\n\t\"./cdn_province/query_def\": 35,\n\t\"./cdn_province/query_def.ts\": 35,\n\t\"./ceip_summary/datasource\": 84,\n\t\"./ceip_summary/datasource.ts\": 84,\n\t\"./ceip_summary/query\": 140,\n\t\"./ceip_summary/query.ts\": 140,\n\t\"./ceip_summary/query_def\": 36,\n\t\"./ceip_summary/query_def.ts\": 36,\n\t\"./ces/datasource\": 85,\n\t\"./ces/datasource.ts\": 85,\n\t\"./ces/query\": 141,\n\t\"./ces/query.ts\": 141,\n\t\"./ces/query_def\": 45,\n\t\"./ces/query_def.ts\": 45,\n\t\"./cfs/datasource\": 86,\n\t\"./cfs/datasource.ts\": 86,\n\t\"./cfs/query\": 142,\n\t\"./cfs/query.ts\": 142,\n\t\"./cfs/query_def\": 57,\n\t\"./cfs/query_def.ts\": 57,\n\t\"./ckafka/datasource\": 87,\n\t\"./ckafka/datasource.ts\": 87,\n\t\"./ckafka/query\": 143,\n\t\"./ckafka/query.ts\": 143,\n\t\"./ckafka/query_def\": 11,\n\t\"./ckafka/query_def.ts\": 11,\n\t\"./clb/datasource\": 88,\n\t\"./clb/datasource.ts\": 88,\n\t\"./clb/query\": 144,\n\t\"./clb/query.ts\": 144,\n\t\"./clb/query_def\": 12,\n\t\"./clb/query_def.ts\": 12,\n\t\"./cls/datasource\": 89,\n\t\"./cls/datasource.ts\": 89,\n\t\"./cls/query\": 145,\n\t\"./cls/query.ts\": 145,\n\t\"./cls/query_def\": 29,\n\t\"./cls/query_def.ts\": 29,\n\t\"./cmq/datasource\": 90,\n\t\"./cmq/datasource.ts\": 90,\n\t\"./cmq/query\": 146,\n\t\"./cmq/query.ts\": 146,\n\t\"./cmq/query_def\": 58,\n\t\"./cmq/query_def.ts\": 58,\n\t\"./cmq_topic/datasource\": 91,\n\t\"./cmq_topic/datasource.ts\": 91,\n\t\"./cmq_topic/query\": 147,\n\t\"./cmq_topic/query.ts\": 147,\n\t\"./cmq_topic/query_def\": 37,\n\t\"./cmq_topic/query_def.ts\": 37,\n\t\"./cos/datasource\": 92,\n\t\"./cos/datasource.ts\": 92,\n\t\"./cos/query_def\": 148,\n\t\"./cos/query_def.ts\": 148,\n\t\"./cpm/datasource\": 93,\n\t\"./cpm/datasource.ts\": 93,\n\t\"./cpm/query\": 149,\n\t\"./cpm/query.ts\": 149,\n\t\"./cpm/query_def\": 38,\n\t\"./cpm/query_def.ts\": 38,\n\t\"./cvm/datasource\": 94,\n\t\"./cvm/datasource.ts\": 94,\n\t\"./cvm/query\": 150,\n\t\"./cvm/query.ts\": 150,\n\t\"./cvm/query_def\": 59,\n\t\"./cvm/query_def.ts\": 59,\n\t\"./cynosdb_mysql/datasource\": 95,\n\t\"./cynosdb_mysql/datasource.ts\": 95,\n\t\"./cynosdb_mysql/query\": 151,\n\t\"./cynosdb_mysql/query.ts\": 151,\n\t\"./cynosdb_mysql/query_def\": 27,\n\t\"./cynosdb_mysql/query_def.ts\": 27,\n\t\"./dc/datasource\": 96,\n\t\"./dc/datasource.ts\": 96,\n\t\"./dc/query\": 152,\n\t\"./dc/query.ts\": 152,\n\t\"./dc/query_def\": 46,\n\t\"./dc/query_def.ts\": 46,\n\t\"./dcdb/datasource\": 97,\n\t\"./dcdb/datasource.ts\": 97,\n\t\"./dcdb/query\": 153,\n\t\"./dcdb/query.ts\": 153,\n\t\"./dcdb/query_def\": 16,\n\t\"./dcdb/query_def.ts\": 16,\n\t\"./dcg/datasource\": 98,\n\t\"./dcg/datasource.ts\": 98,\n\t\"./dcg/query\": 154,\n\t\"./dcg/query.ts\": 154,\n\t\"./dcg/query_def\": 47,\n\t\"./dcg/query_def.ts\": 47,\n\t\"./dcx/datasource\": 99,\n\t\"./dcx/datasource.ts\": 99,\n\t\"./dcx/query\": 155,\n\t\"./dcx/query.ts\": 155,\n\t\"./dcx/query_def\": 48,\n\t\"./dcx/query_def.ts\": 48,\n\t\"./ecdn/datasource\": 100,\n\t\"./ecdn/datasource.ts\": 100,\n\t\"./ecdn/query\": 156,\n\t\"./ecdn/query.ts\": 156,\n\t\"./ecdn/query_def\": 39,\n\t\"./ecdn/query_def.ts\": 39,\n\t\"./ecm/datasource\": 101,\n\t\"./ecm/datasource.ts\": 101,\n\t\"./ecm/query\": 157,\n\t\"./ecm/query.ts\": 157,\n\t\"./ecm/query_def\": 40,\n\t\"./ecm/query_def.ts\": 40,\n\t\"./ecm_block_storage/datasource\": 102,\n\t\"./ecm_block_storage/datasource.ts\": 102,\n\t\"./ecm_block_storage/query\": 158,\n\t\"./ecm_block_storage/query.ts\": 158,\n\t\"./ecm_block_storage/query_def\": 21,\n\t\"./ecm_block_storage/query_def.ts\": 21,\n\t\"./ecm_lb/datasource\": 103,\n\t\"./ecm_lb/datasource.ts\": 103,\n\t\"./ecm_lb/query\": 159,\n\t\"./ecm_lb/query.ts\": 159,\n\t\"./ecm_lb/query_def\": 49,\n\t\"./ecm_lb/query_def.ts\": 49,\n\t\"./gse/datasource\": 104,\n\t\"./gse/datasource.ts\": 104,\n\t\"./gse/query\": 160,\n\t\"./gse/query.ts\": 160,\n\t\"./gse/query_def\": 15,\n\t\"./gse/query_def.ts\": 15,\n\t\"./index\": 20,\n\t\"./index.ts\": 20,\n\t\"./lb/datasource\": 105,\n\t\"./lb/datasource.ts\": 105,\n\t\"./lb/query\": 161,\n\t\"./lb/query.ts\": 161,\n\t\"./lb/query_def\": 65,\n\t\"./lb/query_def.ts\": 65,\n\t\"./lighthouse/datasource\": 106,\n\t\"./lighthouse/datasource.ts\": 106,\n\t\"./lighthouse/query\": 162,\n\t\"./lighthouse/query.ts\": 162,\n\t\"./lighthouse/query_def\": 56,\n\t\"./lighthouse/query_def.ts\": 56,\n\t\"./mongodb/datasource\": 107,\n\t\"./mongodb/datasource.ts\": 107,\n\t\"./mongodb/query\": 163,\n\t\"./mongodb/query.ts\": 163,\n\t\"./mongodb/query_def\": 50,\n\t\"./mongodb/query_def.ts\": 50,\n\t\"./mr/datasource\": 108,\n\t\"./mr/datasource.ts\": 108,\n\t\"./mr/query\": 164,\n\t\"./mr/query.ts\": 164,\n\t\"./mr/query_def\": 24,\n\t\"./mr/query_def.ts\": 24,\n\t\"./nat_gateway/datasource\": 109,\n\t\"./nat_gateway/datasource.ts\": 109,\n\t\"./nat_gateway/query\": 165,\n\t\"./nat_gateway/query.ts\": 165,\n\t\"./nat_gateway/query_def\": 66,\n\t\"./nat_gateway/query_def.ts\": 66,\n\t\"./ov_cdn/datasource\": 110,\n\t\"./ov_cdn/datasource.ts\": 110,\n\t\"./ov_cdn/query\": 166,\n\t\"./ov_cdn/query.ts\": 166,\n\t\"./ov_cdn/query_def\": 67,\n\t\"./ov_cdn/query_def.ts\": 67,\n\t\"./pcx/datasource\": 111,\n\t\"./pcx/datasource.ts\": 111,\n\t\"./pcx/query\": 167,\n\t\"./pcx/query.ts\": 167,\n\t\"./pcx/query_def\": 60,\n\t\"./pcx/query_def.ts\": 60,\n\t\"./postgresql/datasource\": 112,\n\t\"./postgresql/datasource.ts\": 112,\n\t\"./postgresql/query\": 168,\n\t\"./postgresql/query.ts\": 168,\n\t\"./postgresql/query_def\": 41,\n\t\"./postgresql/query_def.ts\": 41,\n\t\"./qaap/datasource\": 113,\n\t\"./qaap/datasource.ts\": 113,\n\t\"./qaap/query\": 169,\n\t\"./qaap/query.ts\": 169,\n\t\"./qaap/query_def\": 51,\n\t\"./qaap/query_def.ts\": 51,\n\t\"./redis/datasource\": 114,\n\t\"./redis/datasource.ts\": 114,\n\t\"./redis/query\": 170,\n\t\"./redis/query.ts\": 170,\n\t\"./redis/query_def\": 61,\n\t\"./redis/query_def.ts\": 61,\n\t\"./redis_mem/datasource\": 115,\n\t\"./redis_mem/datasource.ts\": 115,\n\t\"./redis_mem/query\": 171,\n\t\"./redis_mem/query.ts\": 171,\n\t\"./redis_mem/query_def\": 17,\n\t\"./redis_mem/query_def.ts\": 17,\n\t\"./scf/datasource\": 116,\n\t\"./scf/datasource.ts\": 116,\n\t\"./scf/query\": 172,\n\t\"./scf/query.ts\": 172,\n\t\"./scf/query_def\": 28,\n\t\"./scf/query_def.ts\": 28,\n\t\"./sqlserver/datasource\": 117,\n\t\"./sqlserver/datasource.ts\": 117,\n\t\"./sqlserver/query\": 173,\n\t\"./sqlserver/query.ts\": 173,\n\t\"./sqlserver/query_def\": 30,\n\t\"./sqlserver/query_def.ts\": 30,\n\t\"./tcaplus/datasource\": 118,\n\t\"./tcaplus/datasource.ts\": 118,\n\t\"./tcaplus/query\": 174,\n\t\"./tcaplus/query.ts\": 174,\n\t\"./tcaplus/query_def\": 52,\n\t\"./tcaplus/query_def.ts\": 52,\n\t\"./tdmq/datasource\": 119,\n\t\"./tdmq/datasource.ts\": 119,\n\t\"./tdmq/query\": 175,\n\t\"./tdmq/query.ts\": 175,\n\t\"./tdmq/query_def\": 13,\n\t\"./tdmq/query_def.ts\": 13,\n\t\"./tdmq_rabbitmq/datasource\": 120,\n\t\"./tdmq_rabbitmq/datasource.ts\": 120,\n\t\"./tdmq_rabbitmq/query\": 176,\n\t\"./tdmq_rabbitmq/query.ts\": 176,\n\t\"./tdmq_rabbitmq/query_def\": 18,\n\t\"./tdmq_rabbitmq/query_def.ts\": 18,\n\t\"./tdmq_rocketmq/datasource\": 121,\n\t\"./tdmq_rocketmq/datasource.ts\": 121,\n\t\"./tdmq_rocketmq/query\": 177,\n\t\"./tdmq_rocketmq/query.ts\": 177,\n\t\"./tdmq_rocketmq/query_def\": 19,\n\t\"./tdmq_rocketmq/query_def.ts\": 19,\n\t\"./tke/datasource\": 122,\n\t\"./tke/datasource.ts\": 122,\n\t\"./tke/query\": 178,\n\t\"./tke/query.ts\": 178,\n\t\"./tke/query_def\": 74,\n\t\"./tke/query_def.ts\": 74,\n\t\"./tsf/datasource\": 123,\n\t\"./tsf/datasource.ts\": 123,\n\t\"./tsf/query\": 179,\n\t\"./tsf/query.ts\": 179,\n\t\"./tsf/query_def\": 62,\n\t\"./tsf/query_def.ts\": 62,\n\t\"./v_clb/datasource\": 124,\n\t\"./v_clb/datasource.ts\": 124,\n\t\"./v_clb/query\": 180,\n\t\"./v_clb/query.ts\": 180,\n\t\"./v_clb/query_def\": 25,\n\t\"./v_clb/query_def.ts\": 25,\n\t\"./vbc/datasource\": 125,\n\t\"./vbc/datasource.ts\": 125,\n\t\"./vbc/query\": 181,\n\t\"./vbc/query.ts\": 181,\n\t\"./vbc/query_def\": 53,\n\t\"./vbc/query_def.ts\": 53,\n\t\"./vpc_net_detect/datasource\": 126,\n\t\"./vpc_net_detect/datasource.ts\": 126,\n\t\"./vpc_net_detect/query\": 182,\n\t\"./vpc_net_detect/query.ts\": 182,\n\t\"./vpc_net_detect/query_def\": 42,\n\t\"./vpc_net_detect/query_def.ts\": 42,\n\t\"./vpngw/datasource\": 127,\n\t\"./vpngw/datasource.ts\": 127,\n\t\"./vpngw/query\": 183,\n\t\"./vpngw/query.ts\": 183,\n\t\"./vpngw/query_def\": 54,\n\t\"./vpngw/query_def.ts\": 54,\n\t\"./vpnx/datasource\": 128,\n\t\"./vpnx/datasource.ts\": 128,\n\t\"./vpnx/query\": 184,\n\t\"./vpnx/query.ts\": 184,\n\t\"./vpnx/query_def\": 55,\n\t\"./vpnx/query_def.ts\": 55,\n\t\"./waf/datasource\": 129,\n\t\"./waf/datasource.ts\": 129,\n\t\"./waf/query\": 185,\n\t\"./waf/query.ts\": 185,\n\t\"./waf/query_def\": 43,\n\t\"./waf/query_def.ts\": 43\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 186;","import _ from 'lodash';\nimport { Datasources, SERVICES } from './index';\nimport { GetServiceFromNamespace, ParseMetricQuery } from '../common/constants';\nimport { serviceGroupBy } from '../common/utils';\nimport { LoadingState } from '@grafana/data';\n\nexport default interface DatasourceInterface {\n instanceSettings: any;\n backendSrv: any;\n templateSrv: any;\n query: (options: any) => any;\n testDatasource: () => any;\n metricFindQuery: (query: any) => any;\n getRegions?: (service: string) => any;\n getMetrics: (service: string, region: string) => any;\n getInstances: (service: string, region: string, params: any) => any;\n getZones?: (service: string, region: string) => any;\n}\n\nexport class TCMonitorDatasource implements DatasourceInterface {\n instanceSettings: any;\n backendSrv: any;\n templateSrv: any;\n\n /** @ngInject */\n constructor(instanceSettings, backendSrv, templateSrv) {\n this.instanceSettings = instanceSettings;\n this.backendSrv = backendSrv;\n this.templateSrv = templateSrv;\n _.forEach(Datasources, (_class: any, key) => {\n this[key] = new _class(this.instanceSettings, this.backendSrv, this.templateSrv);\n });\n }\n\n // 根据 Datasource Config 配置时勾选的监控服务项,获取相应的命名空间\n getNamespaces() {\n const namespaces: any[] = [];\n _.forEach(SERVICES, (service) => {\n if (this.instanceSettings.jsonData[service.service] === true) {\n // namespaces.push(service.namespace);\n namespaces.push(service);\n }\n });\n return namespaces;\n }\n\n getCascaderNamespaces() {\n const validServices = SERVICES.filter((service) => this.instanceSettings.jsonData[service.service]);\n return serviceGroupBy(validServices);\n }\n\n getSelectedServices() {\n const namespaces = this.getNamespaces();\n return _.map(namespaces, ({ namespace }) => {\n return GetServiceFromNamespace(namespace);\n });\n }\n\n /**\n * 根据 Panel 的配置项,获取相应的监控数据\n *\n * @param options Panel 的配置参数,示例如下\n * {\n * cacheTimeout: undefined,\n * dashboardId: 41,\n * interval: \"30s\",\n * intervalMs: 30000,\n * maxDataPoints: 554,\n * panelId: 2,\n * range: {\n * from: Moment,\n * to: Moment,\n * raw: {from: \"now-6h\", to: \"now\"}\n * },\n * rangeRaw: {from: \"now-6h\", to: \"now\"},\n * scopedVars: {__interval: {…}, __interval_ms: {…}}\n * targets: [\n * {\n * namespace: \"QCE/CVM\",\n * refId: \"A\",\n * service: \"cvm\",\n * showInstanceDetails: false,\n * cvm: {\n * dimensionObject: {InstanceId: {…}}\n * instance: \"\",\n * instanceAlias: \"InstanceId\",\n * metricName: \"AccOuttraffic\",\n * metricUnit: \"MB\",\n * period: 10,\n * queries: {Filters: {…}, InstanceIds: Array(1), Limit: 20, Offset: 0, filtersChecked: false, …},\n * region: \"ap-beijing\"\n * },\n * cdb: {},\n * },\n * ],\n * timezone: \"browser\"\n * }\n * @return 返回数据对象,示例如下\n * {\n * data: [\n * {\n * \"target\": \"AccOuttraffic - ins-123\",\n * \"datapoints\": [\n * [861, 1450754160000],\n * [767, 1450754220000]\n * ]\n * }\n * ]\n * }\n */\n query(options: any) {\n const promises: any[] = [];\n const services = this.getSelectedServices();\n _.forEach(services, (service) => {\n const optionsTemp = _.cloneDeep(options);\n const targets = _.filter(optionsTemp.targets, (item) => item.service === service);\n optionsTemp.targets = targets;\n if (optionsTemp.targets.length > 0) {\n const promiseTemp = this[`${_.toUpper(service)}Datasource`].query(optionsTemp);\n if (promiseTemp) {\n promises.push(promiseTemp);\n }\n }\n });\n if (promises.length === 0) {\n return Promise.resolve({ data: [], state: LoadingState.Done });\n }\n return Promise.all(promises).then((results) => {\n return { data: _.flatten(results), state: LoadingState.Done };\n });\n }\n\n /**\n * 获取模板变量的选择项列表\n *\n * @param query 模板变量配置填写的 Query 参数字符串\n */\n metricFindQuery(query: string, options?: any) {\n const queries = ParseMetricQuery(query);\n const service = GetServiceFromNamespace(queries['namespace'] || '');\n\n if (_.isEmpty(queries) || !queries['namespace'] || !queries['action'] || !service) {\n return Promise.resolve([]);\n }\n if (this[`${_.toUpper(service)}Datasource`].metricFindQuery) {\n const result = this[`${_.toUpper(service)}Datasource`].metricFindQuery(\n queries,\n _.get(options, 'variable.regex', undefined)\n );\n if (result) {\n return result;\n }\n }\n return Promise.resolve([]);\n }\n\n /**\n * 获取地域列表\n * @param service\n */\n getRegions(service) {\n if (this[`${_.toUpper(service)}Datasource`].getRegions) {\n return this[`${_.toUpper(service)}Datasource`].getRegions();\n }\n return [];\n }\n\n /**\n * 获取监控指标列表\n * @param service\n * @param region\n */\n getMetrics(service, region) {\n return this[`${_.toUpper(service)}Datasource`].getMetrics(region);\n }\n\n /**\n * 获取可用区列表\n * @param service\n * @param region\n */\n getZones(service, region) {\n if (this[`${_.toUpper(service)}Datasource`].getZones) {\n return this[`${_.toUpper(service)}Datasource`].getZones(region);\n }\n return [];\n }\n\n /**\n * 获取filter中dropdown列表\n * @param service\n * @param param\n */\n getFilterDropdown(service, param) {\n if (this[`${_.toUpper(service)}Datasource`].getFilterDropdown) {\n return this[`${_.toUpper(service)}Datasource`].getFilterDropdown(param);\n }\n return [];\n }\n\n /**\n * 获取实例列表\n * @param service\n * @param region\n * @param params\n */\n getInstances(service, region, params) {\n return this[`${_.toUpper(service)}Datasource`].getInstances(region, params);\n }\n\n /**\n * 获取监听器列表\n * @param service\n * @param region\n * @param params\n */\n getListeners(service, region, instance) {\n if (!this[`${_.toUpper(service)}Datasource`].getListeners) {\n return [];\n }\n return this[`${_.toUpper(service)}Datasource`].getListeners(region, instance);\n }\n\n /**\n * 获取 私有网络列表\n * @param service\n */\n getVpcIds(service, region) {\n if (this[`${_.toUpper(service)}Datasource`].getVpcIds) {\n return this[`${_.toUpper(service)}Datasource`].getVpcIds(region);\n }\n }\n\n // 在 Datasource Config 配置时,验证 SerectId、SerectKey 的有效性,并测试勾选的监控服务项的对应 API 连通性\n testDatasource() {\n const promises: any[] = [];\n const services = this.getSelectedServices();\n _.forEach(services, (service) => {\n promises.push(this[`${_.toUpper(service)}Datasource`].testDatasource());\n });\n if (promises.length === 0) {\n return Promise.resolve(null);\n }\n\n return Promise.all(promises).then((results) => {\n let status = 'success';\n let message = 'DataSource Connection OK';\n\n const errorMsg = _.reduce(\n results,\n (acc, cur) => {\n if (cur.status === 'error') {\n if (acc === '') acc += 'Oops! Found an error in: ';\n acc += `${cur.service}: ${cur.message}; \\n`;\n }\n return acc;\n },\n ''\n );\n\n if (errorMsg) {\n status = 'error';\n message = errorMsg;\n }\n\n return {\n status,\n message,\n title: _.upperFirst(status),\n };\n });\n }\n\n getServiceFn(service, fnName) {\n return (...argu) => {\n if (!this[`${_.toUpper(service)}Datasource`][fnName]) {\n return [];\n }\n return this[`${_.toUpper(service)}Datasource`][fnName](...argu);\n };\n }\n}\n","'use strict';\n\nvar has = Object.prototype.hasOwnProperty;\n\nvar hexTable = (function () {\n var array = [];\n for (var i = 0; i < 256; ++i) {\n array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());\n }\n\n return array;\n}());\n\nvar compactQueue = function compactQueue(queue) {\n var obj;\n\n while (queue.length) {\n var item = queue.pop();\n obj = item.obj[item.prop];\n\n if (Array.isArray(obj)) {\n var compacted = [];\n\n for (var j = 0; j < obj.length; ++j) {\n if (typeof obj[j] !== 'undefined') {\n compacted.push(obj[j]);\n }\n }\n\n item.obj[item.prop] = compacted;\n }\n }\n\n return obj;\n};\n\nvar arrayToObject = function arrayToObject(source, options) {\n var obj = options && options.plainObjects ? Object.create(null) : {};\n for (var i = 0; i < source.length; ++i) {\n if (typeof source[i] !== 'undefined') {\n obj[i] = source[i];\n }\n }\n\n return obj;\n};\n\nvar merge = function merge(target, source, options) {\n if (!source) {\n return target;\n }\n\n if (typeof source !== 'object') {\n if (Array.isArray(target)) {\n target.push(source);\n } else if (typeof target === 'object') {\n if (options.plainObjects || options.allowPrototypes || !has.call(Object.prototype, source)) {\n target[source] = true;\n }\n } else {\n return [target, source];\n }\n\n return target;\n }\n\n if (typeof target !== 'object') {\n return [target].concat(source);\n }\n\n var mergeTarget = target;\n if (Array.isArray(target) && !Array.isArray(source)) {\n mergeTarget = arrayToObject(target, options);\n }\n\n if (Array.isArray(target) && Array.isArray(source)) {\n source.forEach(function (item, i) {\n if (has.call(target, i)) {\n if (target[i] && typeof target[i] === 'object') {\n target[i] = merge(target[i], item, options);\n } else {\n target.push(item);\n }\n } else {\n target[i] = item;\n }\n });\n return target;\n }\n\n return Object.keys(source).reduce(function (acc, key) {\n var value = source[key];\n\n if (has.call(acc, key)) {\n acc[key] = merge(acc[key], value, options);\n } else {\n acc[key] = value;\n }\n return acc;\n }, mergeTarget);\n};\n\nvar assign = function assignSingleSource(target, source) {\n return Object.keys(source).reduce(function (acc, key) {\n acc[key] = source[key];\n return acc;\n }, target);\n};\n\nvar decode = function (str) {\n try {\n return decodeURIComponent(str.replace(/\\+/g, ' '));\n } catch (e) {\n return str;\n }\n};\n\nvar encode = function encode(str) {\n // This code was originally written by Brian White (mscdex) for the io.js core querystring library.\n // It has been adapted here for stricter adherence to RFC 3986\n if (str.length === 0) {\n return str;\n }\n\n var string = typeof str === 'string' ? str : String(str);\n\n var out = '';\n for (var i = 0; i < string.length; ++i) {\n var c = string.charCodeAt(i);\n\n if (\n c === 0x2D // -\n || c === 0x2E // .\n || c === 0x5F // _\n || c === 0x7E // ~\n || (c >= 0x30 && c <= 0x39) // 0-9\n || (c >= 0x41 && c <= 0x5A) // a-z\n || (c >= 0x61 && c <= 0x7A) // A-Z\n ) {\n out += string.charAt(i);\n continue;\n }\n\n if (c < 0x80) {\n out = out + hexTable[c];\n continue;\n }\n\n if (c < 0x800) {\n out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);\n continue;\n }\n\n if (c < 0xD800 || c >= 0xE000) {\n out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);\n continue;\n }\n\n i += 1;\n c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));\n out += hexTable[0xF0 | (c >> 18)]\n + hexTable[0x80 | ((c >> 12) & 0x3F)]\n + hexTable[0x80 | ((c >> 6) & 0x3F)]\n + hexTable[0x80 | (c & 0x3F)];\n }\n\n return out;\n};\n\nvar compact = function compact(value) {\n var queue = [{ obj: { o: value }, prop: 'o' }];\n var refs = [];\n\n for (var i = 0; i < queue.length; ++i) {\n var item = queue[i];\n var obj = item.obj[item.prop];\n\n var keys = Object.keys(obj);\n for (var j = 0; j < keys.length; ++j) {\n var key = keys[j];\n var val = obj[key];\n if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {\n queue.push({ obj: obj, prop: key });\n refs.push(val);\n }\n }\n }\n\n return compactQueue(queue);\n};\n\nvar isRegExp = function isRegExp(obj) {\n return Object.prototype.toString.call(obj) === '[object RegExp]';\n};\n\nvar isBuffer = function isBuffer(obj) {\n if (obj === null || typeof obj === 'undefined') {\n return false;\n }\n\n return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));\n};\n\nmodule.exports = {\n arrayToObject: arrayToObject,\n assign: assign,\n compact: compact,\n decode: decode,\n encode: encode,\n isBuffer: isBuffer,\n isRegExp: isRegExp,\n merge: merge\n};\n","'use strict';\n\nvar replace = String.prototype.replace;\nvar percentTwenties = /%20/g;\n\nmodule.exports = {\n 'default': 'RFC3986',\n formatters: {\n RFC1738: function (value) {\n return replace.call(value, percentTwenties, '+');\n },\n RFC3986: function (value) {\n return value;\n }\n },\n RFC1738: 'RFC1738',\n RFC3986: 'RFC3986'\n};\n","import coreModule from 'grafana/app/core/core_module';\nimport { DetailQueryConfig } from './types';\n\nclass SPQueryCtrl {\n static _config: DetailQueryConfig;\n\n /** @ngInject */\n constructor($scope, $rootScope) {\n Object.assign($scope, SPQueryCtrl._config);\n\n $scope.onChecked = (srcField, dstField) => {\n if ($scope.target.queries[srcField] === true) {\n $scope.target.queries[dstField] = false;\n }\n $scope.onChange();\n };\n\n $scope.init();\n }\n}\n\nconst template = `\n
\n\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n \n \n \n
\n
\n
\n`;\n\nexport function queryDDO() {\n return {\n template: template,\n controller: SPQueryCtrl,\n restrict: 'E',\n scope: {\n target: '=',\n showDetail: '=',\n region: '=',\n datasource: '=',\n getDropdownOptions: '&',\n onChange: '&',\n },\n };\n}\n\nexport default (name: string, config: DetailQueryConfig) => {\n SPQueryCtrl._config = config;\n coreModule.directive(name, queryDDO);\n};\n","'use strict';\n\nvar stringify = require('./stringify');\nvar parse = require('./parse');\nvar formats = require('./formats');\n\nmodule.exports = {\n formats: formats,\n parse: parse,\n stringify: stringify\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar formats = require('./formats');\n\nvar arrayPrefixGenerators = {\n brackets: function brackets(prefix) { // eslint-disable-line func-name-matching\n return prefix + '[]';\n },\n indices: function indices(prefix, key) { // eslint-disable-line func-name-matching\n return prefix + '[' + key + ']';\n },\n repeat: function repeat(prefix) { // eslint-disable-line func-name-matching\n return prefix;\n }\n};\n\nvar toISO = Date.prototype.toISOString;\n\nvar defaults = {\n delimiter: '&',\n encode: true,\n encoder: utils.encode,\n encodeValuesOnly: false,\n serializeDate: function serializeDate(date) { // eslint-disable-line func-name-matching\n return toISO.call(date);\n },\n skipNulls: false,\n strictNullHandling: false\n};\n\nvar stringify = function stringify( // eslint-disable-line func-name-matching\n object,\n prefix,\n generateArrayPrefix,\n strictNullHandling,\n skipNulls,\n encoder,\n filter,\n sort,\n allowDots,\n serializeDate,\n formatter,\n encodeValuesOnly\n) {\n var obj = object;\n if (typeof filter === 'function') {\n obj = filter(prefix, obj);\n } else if (obj instanceof Date) {\n obj = serializeDate(obj);\n } else if (obj === null) {\n if (strictNullHandling) {\n return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder) : prefix;\n }\n\n obj = '';\n }\n\n if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || utils.isBuffer(obj)) {\n if (encoder) {\n var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder);\n return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder))];\n }\n return [formatter(prefix) + '=' + formatter(String(obj))];\n }\n\n var values = [];\n\n if (typeof obj === 'undefined') {\n return values;\n }\n\n var objKeys;\n if (Array.isArray(filter)) {\n objKeys = filter;\n } else {\n var keys = Object.keys(obj);\n objKeys = sort ? keys.sort(sort) : keys;\n }\n\n for (var i = 0; i < objKeys.length; ++i) {\n var key = objKeys[i];\n\n if (skipNulls && obj[key] === null) {\n continue;\n }\n\n if (Array.isArray(obj)) {\n values = values.concat(stringify(\n obj[key],\n generateArrayPrefix(prefix, key),\n generateArrayPrefix,\n strictNullHandling,\n skipNulls,\n encoder,\n filter,\n sort,\n allowDots,\n serializeDate,\n formatter,\n encodeValuesOnly\n ));\n } else {\n values = values.concat(stringify(\n obj[key],\n prefix + (allowDots ? '.' + key : '[' + key + ']'),\n generateArrayPrefix,\n strictNullHandling,\n skipNulls,\n encoder,\n filter,\n sort,\n allowDots,\n serializeDate,\n formatter,\n encodeValuesOnly\n ));\n }\n }\n\n return values;\n};\n\nmodule.exports = function (object, opts) {\n var obj = object;\n var options = opts ? utils.assign({}, opts) : {};\n\n if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') {\n throw new TypeError('Encoder has to be a function.');\n }\n\n var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter;\n var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;\n var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls;\n var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode;\n var encoder = typeof options.encoder === 'function' ? options.encoder : defaults.encoder;\n var sort = typeof options.sort === 'function' ? options.sort : null;\n var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots;\n var serializeDate = typeof options.serializeDate === 'function' ? options.serializeDate : defaults.serializeDate;\n var encodeValuesOnly = typeof options.encodeValuesOnly === 'boolean' ? options.encodeValuesOnly : defaults.encodeValuesOnly;\n if (typeof options.format === 'undefined') {\n options.format = formats['default'];\n } else if (!Object.prototype.hasOwnProperty.call(formats.formatters, options.format)) {\n throw new TypeError('Unknown format option provided.');\n }\n var formatter = formats.formatters[options.format];\n var objKeys;\n var filter;\n\n if (typeof options.filter === 'function') {\n filter = options.filter;\n obj = filter('', obj);\n } else if (Array.isArray(options.filter)) {\n filter = options.filter;\n objKeys = filter;\n }\n\n var keys = [];\n\n if (typeof obj !== 'object' || obj === null) {\n return '';\n }\n\n var arrayFormat;\n if (options.arrayFormat in arrayPrefixGenerators) {\n arrayFormat = options.arrayFormat;\n } else if ('indices' in options) {\n arrayFormat = options.indices ? 'indices' : 'repeat';\n } else {\n arrayFormat = 'indices';\n }\n\n var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];\n\n if (!objKeys) {\n objKeys = Object.keys(obj);\n }\n\n if (sort) {\n objKeys.sort(sort);\n }\n\n for (var i = 0; i < objKeys.length; ++i) {\n var key = objKeys[i];\n\n if (skipNulls && obj[key] === null) {\n continue;\n }\n\n keys = keys.concat(stringify(\n obj[key],\n key,\n generateArrayPrefix,\n strictNullHandling,\n skipNulls,\n encode ? encoder : null,\n filter,\n sort,\n allowDots,\n serializeDate,\n formatter,\n encodeValuesOnly\n ));\n }\n\n var joined = keys.join(delimiter);\n var prefix = options.addQueryPrefix === true ? '?' : '';\n\n return joined.length > 0 ? prefix + joined : '';\n};\n","'use strict';\n\nvar utils = require('./utils');\n\nvar has = Object.prototype.hasOwnProperty;\n\nvar defaults = {\n allowDots: false,\n allowPrototypes: false,\n arrayLimit: 20,\n decoder: utils.decode,\n delimiter: '&',\n depth: 5,\n parameterLimit: 1000,\n plainObjects: false,\n strictNullHandling: false\n};\n\nvar parseValues = function parseQueryStringValues(str, options) {\n var obj = {};\n var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\\?/, '') : str;\n var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;\n var parts = cleanStr.split(options.delimiter, limit);\n\n for (var i = 0; i < parts.length; ++i) {\n var part = parts[i];\n\n var bracketEqualsPos = part.indexOf(']=');\n var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;\n\n var key, val;\n if (pos === -1) {\n key = options.decoder(part, defaults.decoder);\n val = options.strictNullHandling ? null : '';\n } else {\n key = options.decoder(part.slice(0, pos), defaults.decoder);\n val = options.decoder(part.slice(pos + 1), defaults.decoder);\n }\n if (has.call(obj, key)) {\n obj[key] = [].concat(obj[key]).concat(val);\n } else {\n obj[key] = val;\n }\n }\n\n return obj;\n};\n\nvar parseObject = function (chain, val, options) {\n var leaf = val;\n\n for (var i = chain.length - 1; i >= 0; --i) {\n var obj;\n var root = chain[i];\n\n if (root === '[]') {\n obj = [];\n obj = obj.concat(leaf);\n } else {\n obj = options.plainObjects ? Object.create(null) : {};\n var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;\n var index = parseInt(cleanRoot, 10);\n if (\n !isNaN(index)\n && root !== cleanRoot\n && String(index) === cleanRoot\n && index >= 0\n && (options.parseArrays && index <= options.arrayLimit)\n ) {\n obj = [];\n obj[index] = leaf;\n } else {\n obj[cleanRoot] = leaf;\n }\n }\n\n leaf = obj;\n }\n\n return leaf;\n};\n\nvar parseKeys = function parseQueryStringKeys(givenKey, val, options) {\n if (!givenKey) {\n return;\n }\n\n // Transform dot notation to bracket notation\n var key = options.allowDots ? givenKey.replace(/\\.([^.[]+)/g, '[$1]') : givenKey;\n\n // The regex chunks\n\n var brackets = /(\\[[^[\\]]*])/;\n var child = /(\\[[^[\\]]*])/g;\n\n // Get the parent\n\n var segment = brackets.exec(key);\n var parent = segment ? key.slice(0, segment.index) : key;\n\n // Stash the parent if it exists\n\n var keys = [];\n if (parent) {\n // If we aren't using plain objects, optionally prefix keys\n // that would overwrite object prototype properties\n if (!options.plainObjects && has.call(Object.prototype, parent)) {\n if (!options.allowPrototypes) {\n return;\n }\n }\n\n keys.push(parent);\n }\n\n // Loop through children appending to the array until we hit depth\n\n var i = 0;\n while ((segment = child.exec(key)) !== null && i < options.depth) {\n i += 1;\n if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {\n if (!options.allowPrototypes) {\n return;\n }\n }\n keys.push(segment[1]);\n }\n\n // If there's a remainder, just add whatever is left\n\n if (segment) {\n keys.push('[' + key.slice(segment.index) + ']');\n }\n\n return parseObject(keys, val, options);\n};\n\nmodule.exports = function (str, opts) {\n var options = opts ? utils.assign({}, opts) : {};\n\n if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') {\n throw new TypeError('Decoder has to be a function.');\n }\n\n options.ignoreQueryPrefix = options.ignoreQueryPrefix === true;\n options.delimiter = typeof options.delimiter === 'string' || utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter;\n options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth;\n options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit;\n options.parseArrays = options.parseArrays !== false;\n options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder;\n options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots;\n options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects;\n options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes;\n options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit;\n options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;\n\n if (str === '' || str === null || typeof str === 'undefined') {\n return options.plainObjects ? Object.create(null) : {};\n }\n\n var tempObj = typeof str === 'string' ? parseValues(str, options) : str;\n var obj = options.plainObjects ? Object.create(null) : {};\n\n // Iterate over the keys and setup the new object\n\n var keys = Object.keys(tempObj);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n var newObj = parseKeys(key, tempObj[key], options);\n obj = utils.merge(obj, newObj, options);\n }\n\n return utils.compact(obj);\n};\n","var map = {\n\t\"./_base/query.ts\": 7,\n\t\"./apigateway/datasource\": 75,\n\t\"./apigateway/datasource.ts\": 75,\n\t\"./apigateway/query.ts\": 131,\n\t\"./apigateway/query_def.ts\": 23,\n\t\"./bmIntraLb/datasource\": 76,\n\t\"./bmIntraLb/datasource.ts\": 76,\n\t\"./bmIntraLb/query.ts\": 132,\n\t\"./bmIntraLb/query_def.ts\": 31,\n\t\"./bm_lb/datasource\": 77,\n\t\"./bm_lb/datasource.ts\": 77,\n\t\"./bm_lb/query.ts\": 133,\n\t\"./bm_lb/query_def.ts\": 32,\n\t\"./bm_pcx/datasource\": 78,\n\t\"./bm_pcx/datasource.ts\": 78,\n\t\"./bm_pcx/query.ts\": 134,\n\t\"./bm_pcx/query_def.ts\": 33,\n\t\"./bwp/datasource\": 79,\n\t\"./bwp/datasource.ts\": 79,\n\t\"./bwp/query.ts\": 135,\n\t\"./bwp/query_def.ts\": 63,\n\t\"./cbs/datasource\": 80,\n\t\"./cbs/datasource.ts\": 80,\n\t\"./cbs/query.ts\": 136,\n\t\"./cbs/query_def.ts\": 34,\n\t\"./cdb/datasource\": 81,\n\t\"./cdb/datasource.ts\": 81,\n\t\"./cdb/query.ts\": 137,\n\t\"./cdb/query_def.ts\": 44,\n\t\"./cdn/datasource\": 82,\n\t\"./cdn/datasource.ts\": 82,\n\t\"./cdn/query.ts\": 138,\n\t\"./cdn/query_def.ts\": 64,\n\t\"./cdn_province/datasource\": 83,\n\t\"./cdn_province/datasource.ts\": 83,\n\t\"./cdn_province/query.ts\": 139,\n\t\"./cdn_province/query_def.ts\": 35,\n\t\"./ceip_summary/datasource\": 84,\n\t\"./ceip_summary/datasource.ts\": 84,\n\t\"./ceip_summary/query.ts\": 140,\n\t\"./ceip_summary/query_def.ts\": 36,\n\t\"./ces/datasource\": 85,\n\t\"./ces/datasource.ts\": 85,\n\t\"./ces/query.ts\": 141,\n\t\"./ces/query_def.ts\": 45,\n\t\"./cfs/datasource\": 86,\n\t\"./cfs/datasource.ts\": 86,\n\t\"./cfs/query.ts\": 142,\n\t\"./cfs/query_def.ts\": 57,\n\t\"./ckafka/datasource\": 87,\n\t\"./ckafka/datasource.ts\": 87,\n\t\"./ckafka/query.ts\": 143,\n\t\"./ckafka/query_def.ts\": 11,\n\t\"./clb/datasource\": 88,\n\t\"./clb/datasource.ts\": 88,\n\t\"./clb/query.ts\": 144,\n\t\"./clb/query_def.ts\": 12,\n\t\"./cls/datasource\": 89,\n\t\"./cls/datasource.ts\": 89,\n\t\"./cls/query.ts\": 145,\n\t\"./cls/query_def.ts\": 29,\n\t\"./cmq/datasource\": 90,\n\t\"./cmq/datasource.ts\": 90,\n\t\"./cmq/query.ts\": 146,\n\t\"./cmq/query_def.ts\": 58,\n\t\"./cmq_topic/datasource\": 91,\n\t\"./cmq_topic/datasource.ts\": 91,\n\t\"./cmq_topic/query.ts\": 147,\n\t\"./cmq_topic/query_def.ts\": 37,\n\t\"./cos/datasource\": 92,\n\t\"./cos/datasource.ts\": 92,\n\t\"./cos/query_def.ts\": 148,\n\t\"./cpm/datasource\": 93,\n\t\"./cpm/datasource.ts\": 93,\n\t\"./cpm/query.ts\": 149,\n\t\"./cpm/query_def.ts\": 38,\n\t\"./cvm/datasource\": 94,\n\t\"./cvm/datasource.ts\": 94,\n\t\"./cvm/query.ts\": 150,\n\t\"./cvm/query_def.ts\": 59,\n\t\"./cynosdb_mysql/datasource\": 95,\n\t\"./cynosdb_mysql/datasource.ts\": 95,\n\t\"./cynosdb_mysql/query.ts\": 151,\n\t\"./cynosdb_mysql/query_def.ts\": 27,\n\t\"./dc/datasource\": 96,\n\t\"./dc/datasource.ts\": 96,\n\t\"./dc/query.ts\": 152,\n\t\"./dc/query_def.ts\": 46,\n\t\"./dcdb/datasource\": 97,\n\t\"./dcdb/datasource.ts\": 97,\n\t\"./dcdb/query.ts\": 153,\n\t\"./dcdb/query_def.ts\": 16,\n\t\"./dcg/datasource\": 98,\n\t\"./dcg/datasource.ts\": 98,\n\t\"./dcg/query.ts\": 154,\n\t\"./dcg/query_def.ts\": 47,\n\t\"./dcx/datasource\": 99,\n\t\"./dcx/datasource.ts\": 99,\n\t\"./dcx/query.ts\": 155,\n\t\"./dcx/query_def.ts\": 48,\n\t\"./ecdn/datasource\": 100,\n\t\"./ecdn/datasource.ts\": 100,\n\t\"./ecdn/query.ts\": 156,\n\t\"./ecdn/query_def.ts\": 39,\n\t\"./ecm/datasource\": 101,\n\t\"./ecm/datasource.ts\": 101,\n\t\"./ecm/query.ts\": 157,\n\t\"./ecm/query_def.ts\": 40,\n\t\"./ecm_block_storage/datasource\": 102,\n\t\"./ecm_block_storage/datasource.ts\": 102,\n\t\"./ecm_block_storage/query.ts\": 158,\n\t\"./ecm_block_storage/query_def.ts\": 21,\n\t\"./ecm_lb/datasource\": 103,\n\t\"./ecm_lb/datasource.ts\": 103,\n\t\"./ecm_lb/query.ts\": 159,\n\t\"./ecm_lb/query_def.ts\": 49,\n\t\"./gse/datasource\": 104,\n\t\"./gse/datasource.ts\": 104,\n\t\"./gse/query.ts\": 160,\n\t\"./gse/query_def.ts\": 15,\n\t\"./lb/datasource\": 105,\n\t\"./lb/datasource.ts\": 105,\n\t\"./lb/query.ts\": 161,\n\t\"./lb/query_def.ts\": 65,\n\t\"./lighthouse/datasource\": 106,\n\t\"./lighthouse/datasource.ts\": 106,\n\t\"./lighthouse/query.ts\": 162,\n\t\"./lighthouse/query_def.ts\": 56,\n\t\"./mongodb/datasource\": 107,\n\t\"./mongodb/datasource.ts\": 107,\n\t\"./mongodb/query.ts\": 163,\n\t\"./mongodb/query_def.ts\": 50,\n\t\"./mr/datasource\": 108,\n\t\"./mr/datasource.ts\": 108,\n\t\"./mr/query.ts\": 164,\n\t\"./mr/query_def.ts\": 24,\n\t\"./nat_gateway/datasource\": 109,\n\t\"./nat_gateway/datasource.ts\": 109,\n\t\"./nat_gateway/query.ts\": 165,\n\t\"./nat_gateway/query_def.ts\": 66,\n\t\"./ov_cdn/datasource\": 110,\n\t\"./ov_cdn/datasource.ts\": 110,\n\t\"./ov_cdn/query.ts\": 166,\n\t\"./ov_cdn/query_def.ts\": 67,\n\t\"./pcx/datasource\": 111,\n\t\"./pcx/datasource.ts\": 111,\n\t\"./pcx/query.ts\": 167,\n\t\"./pcx/query_def.ts\": 60,\n\t\"./postgresql/datasource\": 112,\n\t\"./postgresql/datasource.ts\": 112,\n\t\"./postgresql/query.ts\": 168,\n\t\"./postgresql/query_def.ts\": 41,\n\t\"./qaap/datasource\": 113,\n\t\"./qaap/datasource.ts\": 113,\n\t\"./qaap/query.ts\": 169,\n\t\"./qaap/query_def.ts\": 51,\n\t\"./redis/datasource\": 114,\n\t\"./redis/datasource.ts\": 114,\n\t\"./redis/query.ts\": 170,\n\t\"./redis/query_def.ts\": 61,\n\t\"./redis_mem/datasource\": 115,\n\t\"./redis_mem/datasource.ts\": 115,\n\t\"./redis_mem/query.ts\": 171,\n\t\"./redis_mem/query_def.ts\": 17,\n\t\"./scf/datasource\": 116,\n\t\"./scf/datasource.ts\": 116,\n\t\"./scf/query.ts\": 172,\n\t\"./scf/query_def.ts\": 28,\n\t\"./sqlserver/datasource\": 117,\n\t\"./sqlserver/datasource.ts\": 117,\n\t\"./sqlserver/query.ts\": 173,\n\t\"./sqlserver/query_def.ts\": 30,\n\t\"./tcaplus/datasource\": 118,\n\t\"./tcaplus/datasource.ts\": 118,\n\t\"./tcaplus/query.ts\": 174,\n\t\"./tcaplus/query_def.ts\": 52,\n\t\"./tdmq/datasource\": 119,\n\t\"./tdmq/datasource.ts\": 119,\n\t\"./tdmq/query.ts\": 175,\n\t\"./tdmq/query_def.ts\": 13,\n\t\"./tdmq_rabbitmq/datasource\": 120,\n\t\"./tdmq_rabbitmq/datasource.ts\": 120,\n\t\"./tdmq_rabbitmq/query.ts\": 176,\n\t\"./tdmq_rabbitmq/query_def.ts\": 18,\n\t\"./tdmq_rocketmq/datasource\": 121,\n\t\"./tdmq_rocketmq/datasource.ts\": 121,\n\t\"./tdmq_rocketmq/query.ts\": 177,\n\t\"./tdmq_rocketmq/query_def.ts\": 19,\n\t\"./tke/datasource\": 122,\n\t\"./tke/datasource.ts\": 122,\n\t\"./tke/query.ts\": 178,\n\t\"./tke/query_def.ts\": 74,\n\t\"./tsf/datasource\": 123,\n\t\"./tsf/datasource.ts\": 123,\n\t\"./tsf/query.ts\": 179,\n\t\"./tsf/query_def.ts\": 62,\n\t\"./v_clb/datasource\": 124,\n\t\"./v_clb/datasource.ts\": 124,\n\t\"./v_clb/query.ts\": 180,\n\t\"./v_clb/query_def.ts\": 25,\n\t\"./vbc/datasource\": 125,\n\t\"./vbc/datasource.ts\": 125,\n\t\"./vbc/query.ts\": 181,\n\t\"./vbc/query_def.ts\": 53,\n\t\"./vpc_net_detect/datasource\": 126,\n\t\"./vpc_net_detect/datasource.ts\": 126,\n\t\"./vpc_net_detect/query.ts\": 182,\n\t\"./vpc_net_detect/query_def.ts\": 42,\n\t\"./vpngw/datasource\": 127,\n\t\"./vpngw/datasource.ts\": 127,\n\t\"./vpngw/query.ts\": 183,\n\t\"./vpngw/query_def.ts\": 54,\n\t\"./vpnx/datasource\": 128,\n\t\"./vpnx/datasource.ts\": 128,\n\t\"./vpnx/query.ts\": 184,\n\t\"./vpnx/query_def.ts\": 55,\n\t\"./waf/datasource\": 129,\n\t\"./waf/datasource.ts\": 129,\n\t\"./waf/query.ts\": 185,\n\t\"./waf/query_def.ts\": 43\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 209;","import { PluginMeta } from '@grafana/data';\nimport { config, getBackendSrv } from '@grafana/runtime';\nimport { TcDataSourceId } from '../datasource/common/constants';\n\nconst backendSrv = getBackendSrv();\n\nconst tcFolder = {\n uid: 'tencent-cloud-monitor',\n title: '腾讯云监控',\n folderId: null,\n};\n\nconst tcFolder_EN = {\n uid: 'tencent-cloud-monitor-english',\n title: 'Tencent Cloud Monitor',\n folderId: null,\n};\n\n/**\n * 生成腾讯云专用目录\n * @returns\n */\nasync function getFolderId() {\n if (tcFolder.folderId && tcFolder_EN.folderId) {\n return [tcFolder.folderId, tcFolder_EN.folderId];\n }\n const folders: any[] = await backendSrv.get('/api/folders');\n let folderId = folders.find((item) => item.uid === tcFolder.uid)?.id;\n let folderEnId = folders.find((item) => item.uid === tcFolder_EN.uid)?.id;\n if (!folderId) {\n const folder = await backendSrv.post('/api/folders', tcFolder);\n folderId = folder?.id || 0;\n }\n if (!folderEnId) {\n const folderEn = await backendSrv.post('/api/folders', tcFolder_EN);\n folderEnId = folderEn?.id || 0;\n }\n tcFolder.folderId = folderId;\n tcFolder_EN.folderId = folderEnId;\n return [folderId, folderEnId];\n}\n\n/**\n * 请求拦截器,拦截导入按钮的接口请求\n */\nfunction backendInterceptor() {\n const oldPost = backendSrv.post.bind(getBackendSrv());\n const pluginId = window.location.pathname.split('/').filter((item) => item)[1];\n backendSrv.post = async (url, data) => {\n // 拦截判断:拦截指定接口\n if (url === '/api/dashboards/import' && data.pluginId === pluginId) {\n const [folderId, folderEnId] = await getFolderId();\n data.folderId = data.path.endsWith('_en_dashboard.json') ? folderEnId : folderId;\n }\n return oldPost(url, data);\n };\n}\n\nbackendInterceptor();\n\nexport class MonitorAppConfigCtrl {\n static templateUrl = 'components/config.html';\n appEditCtrl: any;\n appModel?: PluginMeta;\n $q: any;\n configured: boolean;\n\n /** @ngInject */\n constructor($scope: any, $injector: any, $q: any) {\n this.appEditCtrl.setPostUpdateHook(this.postUpdate.bind(this));\n this.$q = $q;\n // Make sure it has a JSON Data spot\n if (!this.appModel) {\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n this.appModel = {} as PluginMeta;\n }\n\n // Required until we get the types sorted on appModel :(\n const appModel = this.appModel as any;\n if (!appModel.jsonData) {\n appModel.jsonData = {};\n }\n this.configured = false;\n if (this.appModel?.enabled) {\n const datasources = Object.values(config.datasources).filter((ds) => {\n return ds.type === TcDataSourceId;\n });\n if (datasources.length > 0) {\n this.configured = true;\n }\n }\n }\n\n async moveToFolder(dashbaordUid: string, folderId: number) {\n // 获取dashboard\n const { dashboard } = await backendSrv.get(`/api/dashboards/uid/${dashbaordUid}`);\n // 移动目录\n await backendSrv.post('/api/dashboards/db/', {\n dashboard,\n folderId,\n message: '',\n overwrite: true,\n });\n }\n\n async reviseDashboard() {\n // 1. 生成腾讯云目录\n const [folderId, folderEnId] = await getFolderId();\n // 2. 获取所有腾讯云插件下的dashboard\n const rs = await backendSrv.get(`/api/plugins/${this.appModel?.id}/dashboards`);\n\n // 3. 调用api更新dashboard\n const pmlist = rs.map((item) => {\n const { importedUrl, path } = item;\n const uid = importedUrl.split('/')[2];\n if (uid) {\n return this.moveToFolder(uid, path.endsWith('_en_dashboard.json') ? folderEnId : folderId);\n } else {\n return Promise.resolve();\n }\n });\n\n return Promise.all(pmlist);\n }\n\n async postUpdate() {\n if (!this.appModel?.enabled) {\n return;\n }\n // enable或者update时,对预设dashboard进行修改\n await this.reviseDashboard();\n return this.$q.resolve(true);\n }\n}\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/datasource/module.js b/dist/datasource/module.js index 6063b07..9382477 100644 --- a/dist/datasource/module.js +++ b/dist/datasource/module.js @@ -1,73714 +1,3 @@ -define("TencentCloudMonitorGrafanaApp", ["@grafana/data","@grafana/runtime","@grafana/ui","angular","emotion","app/core/core_module","app/core/table_model","app/core/utils/kbn","app/plugins/sdk","lodash","moment","react","react-dom","rxjs"], function(__WEBPACK_EXTERNAL_MODULE__grafana_data__, __WEBPACK_EXTERNAL_MODULE__grafana_runtime__, __WEBPACK_EXTERNAL_MODULE__grafana_ui__, __WEBPACK_EXTERNAL_MODULE_angular__, __WEBPACK_EXTERNAL_MODULE_emotion__, __WEBPACK_EXTERNAL_MODULE_grafana_app_core_core_module__, __WEBPACK_EXTERNAL_MODULE_grafana_app_core_table_model__, __WEBPACK_EXTERNAL_MODULE_grafana_app_core_utils_kbn__, __WEBPACK_EXTERNAL_MODULE_grafana_app_plugins_sdk__, __WEBPACK_EXTERNAL_MODULE_lodash__, __WEBPACK_EXTERNAL_MODULE_moment__, __WEBPACK_EXTERNAL_MODULE_react__, __WEBPACK_EXTERNAL_MODULE_react_dom__, __WEBPACK_EXTERNAL_MODULE_rxjs__) { return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); -/******/ } -/******/ }; -/******/ -/******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ -/******/ // create a fake namespace object -/******/ // mode & 1: value is a module id, require it -/******/ // mode & 2: merge all properties of value into the ns -/******/ // mode & 4: return value when already ns object -/******/ // mode & 8|1: behave like require -/******/ __webpack_require__.t = function(value, mode) { -/******/ if(mode & 1) value = __webpack_require__(value); -/******/ if(mode & 8) return value; -/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; -/******/ var ns = Object.create(null); -/******/ __webpack_require__.r(ns); -/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); -/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); -/******/ return ns; -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = "/"; -/******/ -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = "./datasource/module.ts"); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ "../node_modules/@grafana/toolkit/node_modules/webpack/buildin/global.js": -/*!*******************************************************************************!*\ - !*** ../node_modules/@grafana/toolkit/node_modules/webpack/buildin/global.js ***! - \*******************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -var g; - -// This works in non-strict mode -g = (function() { - return this; -})(); - -try { - // This works if eval is allowed (see CSP) - g = g || new Function("return this")(); -} catch (e) { - // This works if the window reference is available - if (typeof window === "object") g = window; -} - -// g can still be undefined, but nothing to do about it... -// We return undefined, instead of nothing here, so it's -// easier to handle this case. if(!global) { ...} - -module.exports = g; - - -/***/ }), - -/***/ "../node_modules/@xobotyi/scrollbar-width/dist/index.esm.js": -/*!******************************************************************!*\ - !*** ../node_modules/@xobotyi/scrollbar-width/dist/index.esm.js ***! - \******************************************************************/ -/*! exports provided: scrollbarWidth */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scrollbarWidth", function() { return e; }); -var e=function(t){if("undefined"==typeof document)return 0;if(document.body&&(!document.readyState||"loading"!==document.readyState)){if(!0!==t&&"number"==typeof e.__cache)return e.__cache;var o=document.createElement("div"),d=o.style;d.display="block",d.position="absolute",d.width="100px",d.height="100px",d.left="-999px",d.top="-999px",d.overflow="scroll",document.body.insertBefore(o,null);var n=o.clientWidth;if(0!==n)return e.__cache=100-n,document.body.removeChild(o),e.__cache;document.body.removeChild(o)}}; - - -/***/ }), - -/***/ "../node_modules/base64-js/index.js": -/*!******************************************!*\ - !*** ../node_modules/base64-js/index.js ***! - \******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -exports.byteLength = byteLength -exports.toByteArray = toByteArray -exports.fromByteArray = fromByteArray - -var lookup = [] -var revLookup = [] -var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array - -var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' -for (var i = 0, len = code.length; i < len; ++i) { - lookup[i] = code[i] - revLookup[code.charCodeAt(i)] = i -} - -// Support decoding URL-safe base64 strings, as Node.js does. -// See: https://en.wikipedia.org/wiki/Base64#URL_applications -revLookup['-'.charCodeAt(0)] = 62 -revLookup['_'.charCodeAt(0)] = 63 - -function getLens (b64) { - var len = b64.length - - if (len % 4 > 0) { - throw new Error('Invalid string. Length must be a multiple of 4') - } - - // Trim off extra bytes after placeholder bytes are found - // See: https://github.com/beatgammit/base64-js/issues/42 - var validLen = b64.indexOf('=') - if (validLen === -1) validLen = len - - var placeHoldersLen = validLen === len - ? 0 - : 4 - (validLen % 4) - - return [validLen, placeHoldersLen] -} - -// base64 is 4/3 + up to two characters of the original data -function byteLength (b64) { - var lens = getLens(b64) - var validLen = lens[0] - var placeHoldersLen = lens[1] - return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen -} - -function _byteLength (b64, validLen, placeHoldersLen) { - return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen -} - -function toByteArray (b64) { - var tmp - var lens = getLens(b64) - var validLen = lens[0] - var placeHoldersLen = lens[1] - - var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) - - var curByte = 0 - - // if there are placeholders, only get up to the last complete 4 chars - var len = placeHoldersLen > 0 - ? validLen - 4 - : validLen - - var i - for (i = 0; i < len; i += 4) { - tmp = - (revLookup[b64.charCodeAt(i)] << 18) | - (revLookup[b64.charCodeAt(i + 1)] << 12) | - (revLookup[b64.charCodeAt(i + 2)] << 6) | - revLookup[b64.charCodeAt(i + 3)] - arr[curByte++] = (tmp >> 16) & 0xFF - arr[curByte++] = (tmp >> 8) & 0xFF - arr[curByte++] = tmp & 0xFF - } - - if (placeHoldersLen === 2) { - tmp = - (revLookup[b64.charCodeAt(i)] << 2) | - (revLookup[b64.charCodeAt(i + 1)] >> 4) - arr[curByte++] = tmp & 0xFF - } - - if (placeHoldersLen === 1) { - tmp = - (revLookup[b64.charCodeAt(i)] << 10) | - (revLookup[b64.charCodeAt(i + 1)] << 4) | - (revLookup[b64.charCodeAt(i + 2)] >> 2) - arr[curByte++] = (tmp >> 8) & 0xFF - arr[curByte++] = tmp & 0xFF - } - - return arr -} - -function tripletToBase64 (num) { - return lookup[num >> 18 & 0x3F] + - lookup[num >> 12 & 0x3F] + - lookup[num >> 6 & 0x3F] + - lookup[num & 0x3F] -} - -function encodeChunk (uint8, start, end) { - var tmp - var output = [] - for (var i = start; i < end; i += 3) { - tmp = - ((uint8[i] << 16) & 0xFF0000) + - ((uint8[i + 1] << 8) & 0xFF00) + - (uint8[i + 2] & 0xFF) - output.push(tripletToBase64(tmp)) - } - return output.join('') -} - -function fromByteArray (uint8) { - var tmp - var len = uint8.length - var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes - var parts = [] - var maxChunkLength = 16383 // must be multiple of 3 - - // go through the array every three bytes, we'll deal with trailing stuff later - for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { - parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) - } - - // pad the end with zeros, but make sure to not forget the extra bytes - if (extraBytes === 1) { - tmp = uint8[len - 1] - parts.push( - lookup[tmp >> 2] + - lookup[(tmp << 4) & 0x3F] + - '==' - ) - } else if (extraBytes === 2) { - tmp = (uint8[len - 2] << 8) + uint8[len - 1] - parts.push( - lookup[tmp >> 10] + - lookup[(tmp >> 4) & 0x3F] + - lookup[(tmp << 2) & 0x3F] + - '=' - ) - } - - return parts.join('') -} - - -/***/ }), - -/***/ "../node_modules/buffer/index.js": -/*!***************************************!*\ - !*** ../node_modules/buffer/index.js ***! - \***************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(global) {/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */ -/* eslint-disable no-proto */ - - - -var base64 = __webpack_require__(/*! base64-js */ "../node_modules/base64-js/index.js") -var ieee754 = __webpack_require__(/*! ieee754 */ "../node_modules/ieee754/index.js") -var isArray = __webpack_require__(/*! isarray */ "../node_modules/isarray/index.js") - -exports.Buffer = Buffer -exports.SlowBuffer = SlowBuffer -exports.INSPECT_MAX_BYTES = 50 - -/** - * If `Buffer.TYPED_ARRAY_SUPPORT`: - * === true Use Uint8Array implementation (fastest) - * === false Use Object implementation (most compatible, even IE6) - * - * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, - * Opera 11.6+, iOS 4.2+. - * - * Due to various browser bugs, sometimes the Object implementation will be used even - * when the browser supports typed arrays. - * - * Note: - * - * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, - * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. - * - * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. - * - * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of - * incorrect length in some situations. - - * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they - * get the Object implementation, which is slower but behaves correctly. - */ -Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined - ? global.TYPED_ARRAY_SUPPORT - : typedArraySupport() - -/* - * Export kMaxLength after typed array support is determined. - */ -exports.kMaxLength = kMaxLength() - -function typedArraySupport () { - try { - var arr = new Uint8Array(1) - arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }} - return arr.foo() === 42 && // typed array instances can be augmented - typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` - arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` - } catch (e) { - return false - } -} - -function kMaxLength () { - return Buffer.TYPED_ARRAY_SUPPORT - ? 0x7fffffff - : 0x3fffffff -} - -function createBuffer (that, length) { - if (kMaxLength() < length) { - throw new RangeError('Invalid typed array length') - } - if (Buffer.TYPED_ARRAY_SUPPORT) { - // Return an augmented `Uint8Array` instance, for best performance - that = new Uint8Array(length) - that.__proto__ = Buffer.prototype - } else { - // Fallback: Return an object instance of the Buffer class - if (that === null) { - that = new Buffer(length) - } - that.length = length - } - - return that -} - -/** - * The Buffer constructor returns instances of `Uint8Array` that have their - * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of - * `Uint8Array`, so the returned instances will have all the node `Buffer` methods - * and the `Uint8Array` methods. Square bracket notation works as expected -- it - * returns a single octet. - * - * The `Uint8Array` prototype remains unmodified. - */ - -function Buffer (arg, encodingOrOffset, length) { - if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) { - return new Buffer(arg, encodingOrOffset, length) - } - - // Common case. - if (typeof arg === 'number') { - if (typeof encodingOrOffset === 'string') { - throw new Error( - 'If encoding is specified then the first argument must be a string' - ) - } - return allocUnsafe(this, arg) - } - return from(this, arg, encodingOrOffset, length) -} - -Buffer.poolSize = 8192 // not used by this implementation - -// TODO: Legacy, not needed anymore. Remove in next major version. -Buffer._augment = function (arr) { - arr.__proto__ = Buffer.prototype - return arr -} - -function from (that, value, encodingOrOffset, length) { - if (typeof value === 'number') { - throw new TypeError('"value" argument must not be a number') - } - - if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { - return fromArrayBuffer(that, value, encodingOrOffset, length) - } - - if (typeof value === 'string') { - return fromString(that, value, encodingOrOffset) - } - - return fromObject(that, value) -} - -/** - * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError - * if value is a number. - * Buffer.from(str[, encoding]) - * Buffer.from(array) - * Buffer.from(buffer) - * Buffer.from(arrayBuffer[, byteOffset[, length]]) - **/ -Buffer.from = function (value, encodingOrOffset, length) { - return from(null, value, encodingOrOffset, length) -} - -if (Buffer.TYPED_ARRAY_SUPPORT) { - Buffer.prototype.__proto__ = Uint8Array.prototype - Buffer.__proto__ = Uint8Array - if (typeof Symbol !== 'undefined' && Symbol.species && - Buffer[Symbol.species] === Buffer) { - // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 - Object.defineProperty(Buffer, Symbol.species, { - value: null, - configurable: true - }) - } -} - -function assertSize (size) { - if (typeof size !== 'number') { - throw new TypeError('"size" argument must be a number') - } else if (size < 0) { - throw new RangeError('"size" argument must not be negative') - } -} - -function alloc (that, size, fill, encoding) { - assertSize(size) - if (size <= 0) { - return createBuffer(that, size) - } - if (fill !== undefined) { - // Only pay attention to encoding if it's a string. This - // prevents accidentally sending in a number that would - // be interpretted as a start offset. - return typeof encoding === 'string' - ? createBuffer(that, size).fill(fill, encoding) - : createBuffer(that, size).fill(fill) - } - return createBuffer(that, size) -} - -/** - * Creates a new filled Buffer instance. - * alloc(size[, fill[, encoding]]) - **/ -Buffer.alloc = function (size, fill, encoding) { - return alloc(null, size, fill, encoding) -} - -function allocUnsafe (that, size) { - assertSize(size) - that = createBuffer(that, size < 0 ? 0 : checked(size) | 0) - if (!Buffer.TYPED_ARRAY_SUPPORT) { - for (var i = 0; i < size; ++i) { - that[i] = 0 - } - } - return that -} - -/** - * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. - * */ -Buffer.allocUnsafe = function (size) { - return allocUnsafe(null, size) -} -/** - * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. - */ -Buffer.allocUnsafeSlow = function (size) { - return allocUnsafe(null, size) -} - -function fromString (that, string, encoding) { - if (typeof encoding !== 'string' || encoding === '') { - encoding = 'utf8' - } - - if (!Buffer.isEncoding(encoding)) { - throw new TypeError('"encoding" must be a valid string encoding') - } - - var length = byteLength(string, encoding) | 0 - that = createBuffer(that, length) - - var actual = that.write(string, encoding) - - if (actual !== length) { - // Writing a hex string, for example, that contains invalid characters will - // cause everything after the first invalid character to be ignored. (e.g. - // 'abxxcd' will be treated as 'ab') - that = that.slice(0, actual) - } - - return that -} - -function fromArrayLike (that, array) { - var length = array.length < 0 ? 0 : checked(array.length) | 0 - that = createBuffer(that, length) - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255 - } - return that -} - -function fromArrayBuffer (that, array, byteOffset, length) { - array.byteLength // this throws if `array` is not a valid ArrayBuffer - - if (byteOffset < 0 || array.byteLength < byteOffset) { - throw new RangeError('\'offset\' is out of bounds') - } - - if (array.byteLength < byteOffset + (length || 0)) { - throw new RangeError('\'length\' is out of bounds') - } - - if (byteOffset === undefined && length === undefined) { - array = new Uint8Array(array) - } else if (length === undefined) { - array = new Uint8Array(array, byteOffset) - } else { - array = new Uint8Array(array, byteOffset, length) - } - - if (Buffer.TYPED_ARRAY_SUPPORT) { - // Return an augmented `Uint8Array` instance, for best performance - that = array - that.__proto__ = Buffer.prototype - } else { - // Fallback: Return an object instance of the Buffer class - that = fromArrayLike(that, array) - } - return that -} - -function fromObject (that, obj) { - if (Buffer.isBuffer(obj)) { - var len = checked(obj.length) | 0 - that = createBuffer(that, len) - - if (that.length === 0) { - return that - } - - obj.copy(that, 0, 0, len) - return that - } - - if (obj) { - if ((typeof ArrayBuffer !== 'undefined' && - obj.buffer instanceof ArrayBuffer) || 'length' in obj) { - if (typeof obj.length !== 'number' || isnan(obj.length)) { - return createBuffer(that, 0) - } - return fromArrayLike(that, obj) - } - - if (obj.type === 'Buffer' && isArray(obj.data)) { - return fromArrayLike(that, obj.data) - } - } - - throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.') -} - -function checked (length) { - // Note: cannot use `length < kMaxLength()` here because that fails when - // length is NaN (which is otherwise coerced to zero.) - if (length >= kMaxLength()) { - throw new RangeError('Attempt to allocate Buffer larger than maximum ' + - 'size: 0x' + kMaxLength().toString(16) + ' bytes') - } - return length | 0 -} - -function SlowBuffer (length) { - if (+length != length) { // eslint-disable-line eqeqeq - length = 0 - } - return Buffer.alloc(+length) -} - -Buffer.isBuffer = function isBuffer (b) { - return !!(b != null && b._isBuffer) -} - -Buffer.compare = function compare (a, b) { - if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { - throw new TypeError('Arguments must be Buffers') - } - - if (a === b) return 0 - - var x = a.length - var y = b.length - - for (var i = 0, len = Math.min(x, y); i < len; ++i) { - if (a[i] !== b[i]) { - x = a[i] - y = b[i] - break - } - } - - if (x < y) return -1 - if (y < x) return 1 - return 0 -} - -Buffer.isEncoding = function isEncoding (encoding) { - switch (String(encoding).toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'latin1': - case 'binary': - case 'base64': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return true - default: - return false - } -} - -Buffer.concat = function concat (list, length) { - if (!isArray(list)) { - throw new TypeError('"list" argument must be an Array of Buffers') - } - - if (list.length === 0) { - return Buffer.alloc(0) - } - - var i - if (length === undefined) { - length = 0 - for (i = 0; i < list.length; ++i) { - length += list[i].length - } - } - - var buffer = Buffer.allocUnsafe(length) - var pos = 0 - for (i = 0; i < list.length; ++i) { - var buf = list[i] - if (!Buffer.isBuffer(buf)) { - throw new TypeError('"list" argument must be an Array of Buffers') - } - buf.copy(buffer, pos) - pos += buf.length - } - return buffer -} - -function byteLength (string, encoding) { - if (Buffer.isBuffer(string)) { - return string.length - } - if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && - (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) { - return string.byteLength - } - if (typeof string !== 'string') { - string = '' + string - } - - var len = string.length - if (len === 0) return 0 - - // Use a for loop to avoid recursion - var loweredCase = false - for (;;) { - switch (encoding) { - case 'ascii': - case 'latin1': - case 'binary': - return len - case 'utf8': - case 'utf-8': - case undefined: - return utf8ToBytes(string).length - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return len * 2 - case 'hex': - return len >>> 1 - case 'base64': - return base64ToBytes(string).length - default: - if (loweredCase) return utf8ToBytes(string).length // assume utf8 - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } - } -} -Buffer.byteLength = byteLength - -function slowToString (encoding, start, end) { - var loweredCase = false - - // No need to verify that "this.length <= MAX_UINT32" since it's a read-only - // property of a typed array. - - // This behaves neither like String nor Uint8Array in that we set start/end - // to their upper/lower bounds if the value passed is out of range. - // undefined is handled specially as per ECMA-262 6th Edition, - // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. - if (start === undefined || start < 0) { - start = 0 - } - // Return early if start > this.length. Done here to prevent potential uint32 - // coercion fail below. - if (start > this.length) { - return '' - } - - if (end === undefined || end > this.length) { - end = this.length - } - - if (end <= 0) { - return '' - } - - // Force coersion to uint32. This will also coerce falsey/NaN values to 0. - end >>>= 0 - start >>>= 0 - - if (end <= start) { - return '' - } - - if (!encoding) encoding = 'utf8' - - while (true) { - switch (encoding) { - case 'hex': - return hexSlice(this, start, end) - - case 'utf8': - case 'utf-8': - return utf8Slice(this, start, end) - - case 'ascii': - return asciiSlice(this, start, end) - - case 'latin1': - case 'binary': - return latin1Slice(this, start, end) - - case 'base64': - return base64Slice(this, start, end) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return utf16leSlice(this, start, end) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = (encoding + '').toLowerCase() - loweredCase = true - } - } -} - -// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect -// Buffer instances. -Buffer.prototype._isBuffer = true - -function swap (b, n, m) { - var i = b[n] - b[n] = b[m] - b[m] = i -} - -Buffer.prototype.swap16 = function swap16 () { - var len = this.length - if (len % 2 !== 0) { - throw new RangeError('Buffer size must be a multiple of 16-bits') - } - for (var i = 0; i < len; i += 2) { - swap(this, i, i + 1) - } - return this -} - -Buffer.prototype.swap32 = function swap32 () { - var len = this.length - if (len % 4 !== 0) { - throw new RangeError('Buffer size must be a multiple of 32-bits') - } - for (var i = 0; i < len; i += 4) { - swap(this, i, i + 3) - swap(this, i + 1, i + 2) - } - return this -} - -Buffer.prototype.swap64 = function swap64 () { - var len = this.length - if (len % 8 !== 0) { - throw new RangeError('Buffer size must be a multiple of 64-bits') - } - for (var i = 0; i < len; i += 8) { - swap(this, i, i + 7) - swap(this, i + 1, i + 6) - swap(this, i + 2, i + 5) - swap(this, i + 3, i + 4) - } - return this -} - -Buffer.prototype.toString = function toString () { - var length = this.length | 0 - if (length === 0) return '' - if (arguments.length === 0) return utf8Slice(this, 0, length) - return slowToString.apply(this, arguments) -} - -Buffer.prototype.equals = function equals (b) { - if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') - if (this === b) return true - return Buffer.compare(this, b) === 0 -} - -Buffer.prototype.inspect = function inspect () { - var str = '' - var max = exports.INSPECT_MAX_BYTES - if (this.length > 0) { - str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') - if (this.length > max) str += ' ... ' - } - return '' -} - -Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { - if (!Buffer.isBuffer(target)) { - throw new TypeError('Argument must be a Buffer') - } - - if (start === undefined) { - start = 0 - } - if (end === undefined) { - end = target ? target.length : 0 - } - if (thisStart === undefined) { - thisStart = 0 - } - if (thisEnd === undefined) { - thisEnd = this.length - } - - if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { - throw new RangeError('out of range index') - } - - if (thisStart >= thisEnd && start >= end) { - return 0 - } - if (thisStart >= thisEnd) { - return -1 - } - if (start >= end) { - return 1 - } - - start >>>= 0 - end >>>= 0 - thisStart >>>= 0 - thisEnd >>>= 0 - - if (this === target) return 0 - - var x = thisEnd - thisStart - var y = end - start - var len = Math.min(x, y) - - var thisCopy = this.slice(thisStart, thisEnd) - var targetCopy = target.slice(start, end) - - for (var i = 0; i < len; ++i) { - if (thisCopy[i] !== targetCopy[i]) { - x = thisCopy[i] - y = targetCopy[i] - break - } - } - - if (x < y) return -1 - if (y < x) return 1 - return 0 -} - -// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, -// OR the last index of `val` in `buffer` at offset <= `byteOffset`. -// -// Arguments: -// - buffer - a Buffer to search -// - val - a string, Buffer, or number -// - byteOffset - an index into `buffer`; will be clamped to an int32 -// - encoding - an optional encoding, relevant is val is a string -// - dir - true for indexOf, false for lastIndexOf -function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { - // Empty buffer means no match - if (buffer.length === 0) return -1 - - // Normalize byteOffset - if (typeof byteOffset === 'string') { - encoding = byteOffset - byteOffset = 0 - } else if (byteOffset > 0x7fffffff) { - byteOffset = 0x7fffffff - } else if (byteOffset < -0x80000000) { - byteOffset = -0x80000000 - } - byteOffset = +byteOffset // Coerce to Number. - if (isNaN(byteOffset)) { - // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer - byteOffset = dir ? 0 : (buffer.length - 1) - } - - // Normalize byteOffset: negative offsets start from the end of the buffer - if (byteOffset < 0) byteOffset = buffer.length + byteOffset - if (byteOffset >= buffer.length) { - if (dir) return -1 - else byteOffset = buffer.length - 1 - } else if (byteOffset < 0) { - if (dir) byteOffset = 0 - else return -1 - } - - // Normalize val - if (typeof val === 'string') { - val = Buffer.from(val, encoding) - } - - // Finally, search either indexOf (if dir is true) or lastIndexOf - if (Buffer.isBuffer(val)) { - // Special case: looking for empty string/buffer always fails - if (val.length === 0) { - return -1 - } - return arrayIndexOf(buffer, val, byteOffset, encoding, dir) - } else if (typeof val === 'number') { - val = val & 0xFF // Search for a byte value [0-255] - if (Buffer.TYPED_ARRAY_SUPPORT && - typeof Uint8Array.prototype.indexOf === 'function') { - if (dir) { - return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) - } else { - return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) - } - } - return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) - } - - throw new TypeError('val must be string, number or Buffer') -} - -function arrayIndexOf (arr, val, byteOffset, encoding, dir) { - var indexSize = 1 - var arrLength = arr.length - var valLength = val.length - - if (encoding !== undefined) { - encoding = String(encoding).toLowerCase() - if (encoding === 'ucs2' || encoding === 'ucs-2' || - encoding === 'utf16le' || encoding === 'utf-16le') { - if (arr.length < 2 || val.length < 2) { - return -1 - } - indexSize = 2 - arrLength /= 2 - valLength /= 2 - byteOffset /= 2 - } - } - - function read (buf, i) { - if (indexSize === 1) { - return buf[i] - } else { - return buf.readUInt16BE(i * indexSize) - } - } - - var i - if (dir) { - var foundIndex = -1 - for (i = byteOffset; i < arrLength; i++) { - if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { - if (foundIndex === -1) foundIndex = i - if (i - foundIndex + 1 === valLength) return foundIndex * indexSize - } else { - if (foundIndex !== -1) i -= i - foundIndex - foundIndex = -1 - } - } - } else { - if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength - for (i = byteOffset; i >= 0; i--) { - var found = true - for (var j = 0; j < valLength; j++) { - if (read(arr, i + j) !== read(val, j)) { - found = false - break - } - } - if (found) return i - } - } - - return -1 -} - -Buffer.prototype.includes = function includes (val, byteOffset, encoding) { - return this.indexOf(val, byteOffset, encoding) !== -1 -} - -Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { - return bidirectionalIndexOf(this, val, byteOffset, encoding, true) -} - -Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { - return bidirectionalIndexOf(this, val, byteOffset, encoding, false) -} - -function hexWrite (buf, string, offset, length) { - offset = Number(offset) || 0 - var remaining = buf.length - offset - if (!length) { - length = remaining - } else { - length = Number(length) - if (length > remaining) { - length = remaining - } - } - - // must be an even number of digits - var strLen = string.length - if (strLen % 2 !== 0) throw new TypeError('Invalid hex string') - - if (length > strLen / 2) { - length = strLen / 2 - } - for (var i = 0; i < length; ++i) { - var parsed = parseInt(string.substr(i * 2, 2), 16) - if (isNaN(parsed)) return i - buf[offset + i] = parsed - } - return i -} - -function utf8Write (buf, string, offset, length) { - return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) -} - -function asciiWrite (buf, string, offset, length) { - return blitBuffer(asciiToBytes(string), buf, offset, length) -} - -function latin1Write (buf, string, offset, length) { - return asciiWrite(buf, string, offset, length) -} - -function base64Write (buf, string, offset, length) { - return blitBuffer(base64ToBytes(string), buf, offset, length) -} - -function ucs2Write (buf, string, offset, length) { - return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) -} - -Buffer.prototype.write = function write (string, offset, length, encoding) { - // Buffer#write(string) - if (offset === undefined) { - encoding = 'utf8' - length = this.length - offset = 0 - // Buffer#write(string, encoding) - } else if (length === undefined && typeof offset === 'string') { - encoding = offset - length = this.length - offset = 0 - // Buffer#write(string, offset[, length][, encoding]) - } else if (isFinite(offset)) { - offset = offset | 0 - if (isFinite(length)) { - length = length | 0 - if (encoding === undefined) encoding = 'utf8' - } else { - encoding = length - length = undefined - } - // legacy write(string, encoding, offset, length) - remove in v0.13 - } else { - throw new Error( - 'Buffer.write(string, encoding, offset[, length]) is no longer supported' - ) - } - - var remaining = this.length - offset - if (length === undefined || length > remaining) length = remaining - - if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { - throw new RangeError('Attempt to write outside buffer bounds') - } - - if (!encoding) encoding = 'utf8' - - var loweredCase = false - for (;;) { - switch (encoding) { - case 'hex': - return hexWrite(this, string, offset, length) - - case 'utf8': - case 'utf-8': - return utf8Write(this, string, offset, length) - - case 'ascii': - return asciiWrite(this, string, offset, length) - - case 'latin1': - case 'binary': - return latin1Write(this, string, offset, length) - - case 'base64': - // Warning: maxLength not taken into account in base64Write - return base64Write(this, string, offset, length) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return ucs2Write(this, string, offset, length) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } - } -} - -Buffer.prototype.toJSON = function toJSON () { - return { - type: 'Buffer', - data: Array.prototype.slice.call(this._arr || this, 0) - } -} - -function base64Slice (buf, start, end) { - if (start === 0 && end === buf.length) { - return base64.fromByteArray(buf) - } else { - return base64.fromByteArray(buf.slice(start, end)) - } -} - -function utf8Slice (buf, start, end) { - end = Math.min(buf.length, end) - var res = [] - - var i = start - while (i < end) { - var firstByte = buf[i] - var codePoint = null - var bytesPerSequence = (firstByte > 0xEF) ? 4 - : (firstByte > 0xDF) ? 3 - : (firstByte > 0xBF) ? 2 - : 1 - - if (i + bytesPerSequence <= end) { - var secondByte, thirdByte, fourthByte, tempCodePoint - - switch (bytesPerSequence) { - case 1: - if (firstByte < 0x80) { - codePoint = firstByte - } - break - case 2: - secondByte = buf[i + 1] - if ((secondByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) - if (tempCodePoint > 0x7F) { - codePoint = tempCodePoint - } - } - break - case 3: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) - if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { - codePoint = tempCodePoint - } - } - break - case 4: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - fourthByte = buf[i + 3] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) - if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { - codePoint = tempCodePoint - } - } - } - } - - if (codePoint === null) { - // we did not generate a valid codePoint so insert a - // replacement char (U+FFFD) and advance only 1 byte - codePoint = 0xFFFD - bytesPerSequence = 1 - } else if (codePoint > 0xFFFF) { - // encode to utf16 (surrogate pair dance) - codePoint -= 0x10000 - res.push(codePoint >>> 10 & 0x3FF | 0xD800) - codePoint = 0xDC00 | codePoint & 0x3FF - } - - res.push(codePoint) - i += bytesPerSequence - } - - return decodeCodePointsArray(res) -} - -// Based on http://stackoverflow.com/a/22747272/680742, the browser with -// the lowest limit is Chrome, with 0x10000 args. -// We go 1 magnitude less, for safety -var MAX_ARGUMENTS_LENGTH = 0x1000 - -function decodeCodePointsArray (codePoints) { - var len = codePoints.length - if (len <= MAX_ARGUMENTS_LENGTH) { - return String.fromCharCode.apply(String, codePoints) // avoid extra slice() - } - - // Decode in chunks to avoid "call stack size exceeded". - var res = '' - var i = 0 - while (i < len) { - res += String.fromCharCode.apply( - String, - codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) - ) - } - return res -} - -function asciiSlice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; ++i) { - ret += String.fromCharCode(buf[i] & 0x7F) - } - return ret -} - -function latin1Slice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; ++i) { - ret += String.fromCharCode(buf[i]) - } - return ret -} - -function hexSlice (buf, start, end) { - var len = buf.length - - if (!start || start < 0) start = 0 - if (!end || end < 0 || end > len) end = len - - var out = '' - for (var i = start; i < end; ++i) { - out += toHex(buf[i]) - } - return out -} - -function utf16leSlice (buf, start, end) { - var bytes = buf.slice(start, end) - var res = '' - for (var i = 0; i < bytes.length; i += 2) { - res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) - } - return res -} - -Buffer.prototype.slice = function slice (start, end) { - var len = this.length - start = ~~start - end = end === undefined ? len : ~~end - - if (start < 0) { - start += len - if (start < 0) start = 0 - } else if (start > len) { - start = len - } - - if (end < 0) { - end += len - if (end < 0) end = 0 - } else if (end > len) { - end = len - } - - if (end < start) end = start - - var newBuf - if (Buffer.TYPED_ARRAY_SUPPORT) { - newBuf = this.subarray(start, end) - newBuf.__proto__ = Buffer.prototype - } else { - var sliceLen = end - start - newBuf = new Buffer(sliceLen, undefined) - for (var i = 0; i < sliceLen; ++i) { - newBuf[i] = this[i + start] - } - } - - return newBuf -} - -/* - * Need to make sure that buffer isn't trying to write out of bounds. - */ -function checkOffset (offset, ext, length) { - if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') - if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') -} - -Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - - return val -} - -Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) { - checkOffset(offset, byteLength, this.length) - } - - var val = this[offset + --byteLength] - var mul = 1 - while (byteLength > 0 && (mul *= 0x100)) { - val += this[offset + --byteLength] * mul - } - - return val -} - -Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length) - return this[offset] -} - -Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - return this[offset] | (this[offset + 1] << 8) -} - -Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - return (this[offset] << 8) | this[offset + 1] -} - -Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return ((this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16)) + - (this[offset + 3] * 0x1000000) -} - -Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] * 0x1000000) + - ((this[offset + 1] << 16) | - (this[offset + 2] << 8) | - this[offset + 3]) -} - -Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var i = byteLength - var mul = 1 - var val = this[offset + --i] - while (i > 0 && (mul *= 0x100)) { - val += this[offset + --i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length) - if (!(this[offset] & 0x80)) return (this[offset]) - return ((0xff - this[offset] + 1) * -1) -} - -Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset] | (this[offset + 1] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset + 1] | (this[offset] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16) | - (this[offset + 3] << 24) -} - -Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] << 24) | - (this[offset + 1] << 16) | - (this[offset + 2] << 8) | - (this[offset + 3]) -} - -Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, true, 23, 4) -} - -Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, false, 23, 4) -} - -Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, true, 52, 8) -} - -Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, false, 52, 8) -} - -function checkInt (buf, value, offset, ext, max, min) { - if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') - if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') - if (offset + ext > buf.length) throw new RangeError('Index out of range') -} - -Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) { - var maxBytes = Math.pow(2, 8 * byteLength) - 1 - checkInt(this, value, offset, byteLength, maxBytes, 0) - } - - var mul = 1 - var i = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) { - var maxBytes = Math.pow(2, 8 * byteLength) - 1 - checkInt(this, value, offset, byteLength, maxBytes, 0) - } - - var i = byteLength - 1 - var mul = 1 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) - this[offset] = (value & 0xff) - return offset + 1 -} - -function objectWriteUInt16 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffff + value + 1 - for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) { - buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> - (littleEndian ? i : 1 - i) * 8 - } -} - -Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - } else { - objectWriteUInt16(this, value, offset, true) - } - return offset + 2 -} - -Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - } else { - objectWriteUInt16(this, value, offset, false) - } - return offset + 2 -} - -function objectWriteUInt32 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffffffff + value + 1 - for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) { - buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff - } -} - -Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset + 3] = (value >>> 24) - this[offset + 2] = (value >>> 16) - this[offset + 1] = (value >>> 8) - this[offset] = (value & 0xff) - } else { - objectWriteUInt32(this, value, offset, true) - } - return offset + 4 -} - -Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - } else { - objectWriteUInt32(this, value, offset, false) - } - return offset + 4 -} - -Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = 0 - var mul = 1 - var sub = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { - sub = 1 - } - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = byteLength - 1 - var mul = 1 - var sub = 0 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { - sub = 1 - } - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) - if (value < 0) value = 0xff + value + 1 - this[offset] = (value & 0xff) - return offset + 1 -} - -Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - } else { - objectWriteUInt16(this, value, offset, true) - } - return offset + 2 -} - -Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - } else { - objectWriteUInt16(this, value, offset, false) - } - return offset + 2 -} - -Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - this[offset + 2] = (value >>> 16) - this[offset + 3] = (value >>> 24) - } else { - objectWriteUInt32(this, value, offset, true) - } - return offset + 4 -} - -Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (value < 0) value = 0xffffffff + value + 1 - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - } else { - objectWriteUInt32(this, value, offset, false) - } - return offset + 4 -} - -function checkIEEE754 (buf, value, offset, ext, max, min) { - if (offset + ext > buf.length) throw new RangeError('Index out of range') - if (offset < 0) throw new RangeError('Index out of range') -} - -function writeFloat (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) - } - ieee754.write(buf, value, offset, littleEndian, 23, 4) - return offset + 4 -} - -Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { - return writeFloat(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { - return writeFloat(this, value, offset, false, noAssert) -} - -function writeDouble (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) - } - ieee754.write(buf, value, offset, littleEndian, 52, 8) - return offset + 8 -} - -Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { - return writeDouble(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { - return writeDouble(this, value, offset, false, noAssert) -} - -// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) -Buffer.prototype.copy = function copy (target, targetStart, start, end) { - if (!start) start = 0 - if (!end && end !== 0) end = this.length - if (targetStart >= target.length) targetStart = target.length - if (!targetStart) targetStart = 0 - if (end > 0 && end < start) end = start - - // Copy 0 bytes; we're done - if (end === start) return 0 - if (target.length === 0 || this.length === 0) return 0 - - // Fatal error conditions - if (targetStart < 0) { - throw new RangeError('targetStart out of bounds') - } - if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') - if (end < 0) throw new RangeError('sourceEnd out of bounds') - - // Are we oob? - if (end > this.length) end = this.length - if (target.length - targetStart < end - start) { - end = target.length - targetStart + start - } - - var len = end - start - var i - - if (this === target && start < targetStart && targetStart < end) { - // descending copy from end - for (i = len - 1; i >= 0; --i) { - target[i + targetStart] = this[i + start] - } - } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { - // ascending copy from start - for (i = 0; i < len; ++i) { - target[i + targetStart] = this[i + start] - } - } else { - Uint8Array.prototype.set.call( - target, - this.subarray(start, start + len), - targetStart - ) - } - - return len -} - -// Usage: -// buffer.fill(number[, offset[, end]]) -// buffer.fill(buffer[, offset[, end]]) -// buffer.fill(string[, offset[, end]][, encoding]) -Buffer.prototype.fill = function fill (val, start, end, encoding) { - // Handle string cases: - if (typeof val === 'string') { - if (typeof start === 'string') { - encoding = start - start = 0 - end = this.length - } else if (typeof end === 'string') { - encoding = end - end = this.length - } - if (val.length === 1) { - var code = val.charCodeAt(0) - if (code < 256) { - val = code - } - } - if (encoding !== undefined && typeof encoding !== 'string') { - throw new TypeError('encoding must be a string') - } - if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { - throw new TypeError('Unknown encoding: ' + encoding) - } - } else if (typeof val === 'number') { - val = val & 255 - } - - // Invalid ranges are not set to a default, so can range check early. - if (start < 0 || this.length < start || this.length < end) { - throw new RangeError('Out of range index') - } - - if (end <= start) { - return this - } - - start = start >>> 0 - end = end === undefined ? this.length : end >>> 0 - - if (!val) val = 0 - - var i - if (typeof val === 'number') { - for (i = start; i < end; ++i) { - this[i] = val - } - } else { - var bytes = Buffer.isBuffer(val) - ? val - : utf8ToBytes(new Buffer(val, encoding).toString()) - var len = bytes.length - for (i = 0; i < end - start; ++i) { - this[i + start] = bytes[i % len] - } - } - - return this -} - -// HELPER FUNCTIONS -// ================ - -var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g - -function base64clean (str) { - // Node strips out invalid characters like \n and \t from the string, base64-js does not - str = stringtrim(str).replace(INVALID_BASE64_RE, '') - // Node converts strings with length < 2 to '' - if (str.length < 2) return '' - // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not - while (str.length % 4 !== 0) { - str = str + '=' - } - return str -} - -function stringtrim (str) { - if (str.trim) return str.trim() - return str.replace(/^\s+|\s+$/g, '') -} - -function toHex (n) { - if (n < 16) return '0' + n.toString(16) - return n.toString(16) -} - -function utf8ToBytes (string, units) { - units = units || Infinity - var codePoint - var length = string.length - var leadSurrogate = null - var bytes = [] - - for (var i = 0; i < length; ++i) { - codePoint = string.charCodeAt(i) - - // is surrogate component - if (codePoint > 0xD7FF && codePoint < 0xE000) { - // last char was a lead - if (!leadSurrogate) { - // no lead yet - if (codePoint > 0xDBFF) { - // unexpected trail - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } else if (i + 1 === length) { - // unpaired lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } - - // valid lead - leadSurrogate = codePoint - - continue - } - - // 2 leads in a row - if (codePoint < 0xDC00) { - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - leadSurrogate = codePoint - continue - } - - // valid surrogate pair - codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 - } else if (leadSurrogate) { - // valid bmp char, but last char was a lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - } - - leadSurrogate = null - - // encode utf8 - if (codePoint < 0x80) { - if ((units -= 1) < 0) break - bytes.push(codePoint) - } else if (codePoint < 0x800) { - if ((units -= 2) < 0) break - bytes.push( - codePoint >> 0x6 | 0xC0, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x10000) { - if ((units -= 3) < 0) break - bytes.push( - codePoint >> 0xC | 0xE0, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x110000) { - if ((units -= 4) < 0) break - bytes.push( - codePoint >> 0x12 | 0xF0, - codePoint >> 0xC & 0x3F | 0x80, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else { - throw new Error('Invalid code point') - } - } - - return bytes -} - -function asciiToBytes (str) { - var byteArray = [] - for (var i = 0; i < str.length; ++i) { - // Node's code seems to be doing this and not & 0x7F.. - byteArray.push(str.charCodeAt(i) & 0xFF) - } - return byteArray -} - -function utf16leToBytes (str, units) { - var c, hi, lo - var byteArray = [] - for (var i = 0; i < str.length; ++i) { - if ((units -= 2) < 0) break - - c = str.charCodeAt(i) - hi = c >> 8 - lo = c % 256 - byteArray.push(lo) - byteArray.push(hi) - } - - return byteArray -} - -function base64ToBytes (str) { - return base64.toByteArray(base64clean(str)) -} - -function blitBuffer (src, dst, offset, length) { - for (var i = 0; i < length; ++i) { - if ((i + offset >= dst.length) || (i >= src.length)) break - dst[i + offset] = src[i] - } - return i -} - -function isnan (val) { - return val !== val // eslint-disable-line no-self-compare -} - -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../@grafana/toolkit/node_modules/webpack/buildin/global.js */ "../node_modules/@grafana/toolkit/node_modules/webpack/buildin/global.js"))) - -/***/ }), - -/***/ "../node_modules/copy-to-clipboard/index.js": -/*!**************************************************!*\ - !*** ../node_modules/copy-to-clipboard/index.js ***! - \**************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var deselectCurrent = __webpack_require__(/*! toggle-selection */ "../node_modules/toggle-selection/index.js"); - -var clipboardToIE11Formatting = { - "text/plain": "Text", - "text/html": "Url", - "default": "Text" -} - -var defaultMessage = "Copy to clipboard: #{key}, Enter"; - -function format(message) { - var copyKey = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C"; - return message.replace(/#{\s*key\s*}/g, copyKey); -} - -function copy(text, options) { - var debug, - message, - reselectPrevious, - range, - selection, - mark, - success = false; - if (!options) { - options = {}; - } - debug = options.debug || false; - try { - reselectPrevious = deselectCurrent(); - - range = document.createRange(); - selection = document.getSelection(); - - mark = document.createElement("span"); - mark.textContent = text; - // reset user styles for span element - mark.style.all = "unset"; - // prevents scrolling to the end of the page - mark.style.position = "fixed"; - mark.style.top = 0; - mark.style.clip = "rect(0, 0, 0, 0)"; - // used to preserve spaces and line breaks - mark.style.whiteSpace = "pre"; - // do not inherit user-select (it may be `none`) - mark.style.webkitUserSelect = "text"; - mark.style.MozUserSelect = "text"; - mark.style.msUserSelect = "text"; - mark.style.userSelect = "text"; - mark.addEventListener("copy", function(e) { - e.stopPropagation(); - if (options.format) { - e.preventDefault(); - if (typeof e.clipboardData === "undefined") { // IE 11 - debug && console.warn("unable to use e.clipboardData"); - debug && console.warn("trying IE specific stuff"); - window.clipboardData.clearData(); - var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting["default"] - window.clipboardData.setData(format, text); - } else { // all other browsers - e.clipboardData.clearData(); - e.clipboardData.setData(options.format, text); - } - } - if (options.onCopy) { - e.preventDefault(); - options.onCopy(e.clipboardData); - } - }); - - document.body.appendChild(mark); - - range.selectNodeContents(mark); - selection.addRange(range); - - var successful = document.execCommand("copy"); - if (!successful) { - throw new Error("copy command was unsuccessful"); - } - success = true; - } catch (err) { - debug && console.error("unable to copy using execCommand: ", err); - debug && console.warn("trying IE specific stuff"); - try { - window.clipboardData.setData(options.format || "text", text); - options.onCopy && options.onCopy(window.clipboardData); - success = true; - } catch (err) { - debug && console.error("unable to copy using clipboardData: ", err); - debug && console.error("falling back to prompt"); - message = format("message" in options ? options.message : defaultMessage); - window.prompt(message, text); - } - } finally { - if (selection) { - if (typeof selection.removeRange == "function") { - selection.removeRange(range); - } else { - selection.removeAllRanges(); - } - } - - if (mark) { - document.body.removeChild(mark); - } - reselectPrevious(); - } - - return success; -} - -module.exports = copy; - - -/***/ }), - -/***/ "../node_modules/css-loader/dist/cjs.js?!../node_modules/postcss-loader/src/index.js?!../node_modules/less-loader/dist/cjs.js?!./datasource/log-service/index.less": -/*!**********************************************************************************************************************************************************************************************!*\ - !*** ../node_modules/css-loader/dist/cjs.js??ref--10-1!../node_modules/postcss-loader/src??ref--10-2!../node_modules/less-loader/dist/cjs.js??ref--10-3!./datasource/log-service/index.less ***! - \**********************************************************************************************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -// Imports -var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "../node_modules/css-loader/dist/runtime/api.js"); -exports = ___CSS_LOADER_API_IMPORT___(true); -// Module -exports.push([module.i, ".log-service-monospaced-font-family {\n font-family: RobotoMono-Regular, monospace, Roboto, sans-serif;\n}\n.log-service-monospaced-font-family button,\n.log-service-monospaced-font-family input,\n.log-service-monospaced-font-family select,\n.log-service-monospaced-font-family textarea {\n font-family: RobotoMono-Regular, monospace, Roboto, sans-serif;\n}\n", "",{"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA;EACE,8DAA8D;AAChE;AACA;;;;EAIE,8DAA8D;AAChE","file":"index.less","sourcesContent":[".log-service-monospaced-font-family {\n font-family: RobotoMono-Regular, monospace, Roboto, sans-serif;\n}\n.log-service-monospaced-font-family button,\n.log-service-monospaced-font-family input,\n.log-service-monospaced-font-family select,\n.log-service-monospaced-font-family textarea {\n font-family: RobotoMono-Regular, monospace, Roboto, sans-serif;\n}\n"]}]); -// Exports -module.exports = exports; - - -/***/ }), - -/***/ "../node_modules/css-loader/dist/cjs.js?!../node_modules/postcss-loader/src/index.js?!../node_modules/sass-loader/dist/cjs.js!./datasource/query-ctrl/css/query_editor.css": -/*!******************************************************************************************************************************************************************************************!*\ - !*** ../node_modules/css-loader/dist/cjs.js??ref--8-1!../node_modules/postcss-loader/src??ref--8-2!../node_modules/sass-loader/dist/cjs.js!./datasource/query-ctrl/css/query_editor.css ***! - \******************************************************************************************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -// Imports -var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "../node_modules/css-loader/dist/runtime/api.js"); -exports = ___CSS_LOADER_API_IMPORT___(true); -// Module -exports.push([module.i, ".tc-sub-params {\n margin-top: 4px;\n margin-left: 125px;\n}\n\n.tc-sub-params .gf-form-inline {\n min-height: 42px;\n}\n\n.tc-sub-params .gf-form-inline .gf-form-label {\n margin-bottom: 2px;\n}\n\n.tc-sub-params .tc-info-label {\n margin-bottom: 6px;\n}\n\n.tc-sub-params .tc-info-label > a {\n margin-left: 10px;\n}\n\n.tc-switch {\n border-left: 1px solid #262628;\n margin-bottom: 0 !important;\n}\n\n.tc-condition-block {\n margin-right: 10px;\n display: inline-block;\n}\n\n.tc-condition-block .tc-condition-input {\n border-radius: 0;\n}\n\n.tc-condition-block .tc-condition-minus {\n vertical-align: top;\n border-radius: 0 3px 3px 0;\n}\n\n.tc-condition-block .tc-condition-dropdown {\n display: inline-block;\n}\n\n.tc-condition-block > input {\n display: inline-block;\n margin-right: 0;\n}\n\n.tc-condition-block > label {\n display: inline-block;\n}\n\n.tc-condition-add {\n display: inline-block;\n vertical-align: top;\n}\n\n.tc-condition-add > label {\n border-radius: 3px;\n}\n\n.filtered-color {\n color: #ff851b;\n}\n\n.secret-tips {\n position: absolute;\n right: -25px;\n border-radius: 2px;\n background: #1b1b1b;\n padding: 10px;\n top: -35px;\n width: 300px;\n border: 1px solid #2c3235;\n}\n\n.secret-tips-tri {\n position: absolute;\n width: 15px;\n height: 15px;\n left: -8px;\n top: 60px;\n background: #1b1b1b;\n border: 1px solid #2c3235;\n border-top: 0;\n border-right: 0;\n transform: rotate(45deg);\n}\n\n.rc-cascader-menu-item {\n min-width: 160px;\n font-size: 14px;\n}", "",{"version":3,"sources":["query_editor.css"],"names":[],"mappings":"AAAA;EACE,eAAe;EACf,kBAAkB;AACpB;;AAEA;EACE,gBAAgB;AAClB;;AAEA;EACE,kBAAkB;AACpB;;AAEA;EACE,kBAAkB;AACpB;;AAEA;EACE,iBAAiB;AACnB;;AAEA;EACE,8BAA8B;EAC9B,2BAA2B;AAC7B;;AAEA;EACE,kBAAkB;EAClB,qBAAqB;AACvB;;AAEA;EACE,gBAAgB;AAClB;;AAEA;EACE,mBAAmB;EACnB,0BAA0B;AAC5B;;AAEA;EACE,qBAAqB;AACvB;;AAEA;EACE,qBAAqB;EACrB,eAAe;AACjB;;AAEA;EACE,qBAAqB;AACvB;;AAEA;EACE,qBAAqB;EACrB,mBAAmB;AACrB;;AAEA;EACE,kBAAkB;AACpB;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,kBAAkB;EAClB,YAAY;EACZ,kBAAkB;EAClB,mBAAmB;EACnB,aAAa;EACb,UAAU;EACV,YAAY;EACZ,yBAAyB;AAC3B;;AAEA;EACE,kBAAkB;EAClB,WAAW;EACX,YAAY;EACZ,UAAU;EACV,SAAS;EACT,mBAAmB;EACnB,yBAAyB;EACzB,aAAa;EACb,eAAe;EACf,wBAAwB;AAC1B;;AAEA;EACE,gBAAgB;EAChB,eAAe;AACjB","file":"query_editor.css","sourcesContent":[".tc-sub-params {\n margin-top: 4px;\n margin-left: 125px;\n}\n\n.tc-sub-params .gf-form-inline {\n min-height: 42px;\n}\n\n.tc-sub-params .gf-form-inline .gf-form-label {\n margin-bottom: 2px;\n}\n\n.tc-sub-params .tc-info-label {\n margin-bottom: 6px;\n}\n\n.tc-sub-params .tc-info-label > a {\n margin-left: 10px;\n}\n\n.tc-switch {\n border-left: 1px solid #262628;\n margin-bottom: 0 !important;\n}\n\n.tc-condition-block {\n margin-right: 10px;\n display: inline-block;\n}\n\n.tc-condition-block .tc-condition-input {\n border-radius: 0;\n}\n\n.tc-condition-block .tc-condition-minus {\n vertical-align: top;\n border-radius: 0 3px 3px 0;\n}\n\n.tc-condition-block .tc-condition-dropdown {\n display: inline-block;\n}\n\n.tc-condition-block > input {\n display: inline-block;\n margin-right: 0;\n}\n\n.tc-condition-block > label {\n display: inline-block;\n}\n\n.tc-condition-add {\n display: inline-block;\n vertical-align: top;\n}\n\n.tc-condition-add > label {\n border-radius: 3px;\n}\n\n.filtered-color {\n color: #ff851b;\n}\n\n.secret-tips {\n position: absolute;\n right: -25px;\n border-radius: 2px;\n background: #1b1b1b;\n padding: 10px;\n top: -35px;\n width: 300px;\n border: 1px solid #2c3235;\n}\n\n.secret-tips-tri {\n position: absolute;\n width: 15px;\n height: 15px;\n left: -8px;\n top: 60px;\n background: #1b1b1b;\n border: 1px solid #2c3235;\n border-top: 0;\n border-right: 0;\n transform: rotate(45deg);\n}\n\n.rc-cascader-menu-item {\n min-width: 160px;\n font-size: 14px;\n}"]}]); -// Exports -module.exports = exports; - - -/***/ }), - -/***/ "../node_modules/css-loader/dist/runtime/api.js": -/*!******************************************************!*\ - !*** ../node_modules/css-loader/dist/runtime/api.js ***! - \******************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ -// css base code, injected by the css-loader -// eslint-disable-next-line func-names -module.exports = function (useSourceMap) { - var list = []; // return the list of modules as css string - - list.toString = function toString() { - return this.map(function (item) { - var content = cssWithMappingToString(item, useSourceMap); - - if (item[2]) { - return "@media ".concat(item[2], " {").concat(content, "}"); - } - - return content; - }).join(''); - }; // import a list of modules into the list - // eslint-disable-next-line func-names - - - list.i = function (modules, mediaQuery, dedupe) { - if (typeof modules === 'string') { - // eslint-disable-next-line no-param-reassign - modules = [[null, modules, '']]; - } - - var alreadyImportedModules = {}; - - if (dedupe) { - for (var i = 0; i < this.length; i++) { - // eslint-disable-next-line prefer-destructuring - var id = this[i][0]; - - if (id != null) { - alreadyImportedModules[id] = true; - } - } - } - - for (var _i = 0; _i < modules.length; _i++) { - var item = [].concat(modules[_i]); - - if (dedupe && alreadyImportedModules[item[0]]) { - // eslint-disable-next-line no-continue - continue; - } - - if (mediaQuery) { - if (!item[2]) { - item[2] = mediaQuery; - } else { - item[2] = "".concat(mediaQuery, " and ").concat(item[2]); - } - } - - list.push(item); - } - }; - - return list; -}; - -function cssWithMappingToString(item, useSourceMap) { - var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring - - var cssMapping = item[3]; - - if (!cssMapping) { - return content; - } - - if (useSourceMap && typeof btoa === 'function') { - var sourceMapping = toComment(cssMapping); - var sourceURLs = cssMapping.sources.map(function (source) { - return "/*# sourceURL=".concat(cssMapping.sourceRoot || '').concat(source, " */"); - }); - return [content].concat(sourceURLs).concat([sourceMapping]).join('\n'); - } - - return [content].join('\n'); -} // Adapted from convert-source-map (MIT) - - -function toComment(sourceMap) { - // eslint-disable-next-line no-undef - var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))); - var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64); - return "/*# ".concat(data, " */"); -} - -/***/ }), - -/***/ "../node_modules/eventemitter3/index.js": -/*!**********************************************!*\ - !*** ../node_modules/eventemitter3/index.js ***! - \**********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var has = Object.prototype.hasOwnProperty - , prefix = '~'; - -/** - * Constructor to create a storage for our `EE` objects. - * An `Events` instance is a plain object whose properties are event names. - * - * @constructor - * @private - */ -function Events() {} - -// -// We try to not inherit from `Object.prototype`. In some engines creating an -// instance in this way is faster than calling `Object.create(null)` directly. -// If `Object.create(null)` is not supported we prefix the event names with a -// character to make sure that the built-in object properties are not -// overridden or used as an attack vector. -// -if (Object.create) { - Events.prototype = Object.create(null); - - // - // This hack is needed because the `__proto__` property is still inherited in - // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5. - // - if (!new Events().__proto__) prefix = false; -} - -/** - * Representation of a single event listener. - * - * @param {Function} fn The listener function. - * @param {*} context The context to invoke the listener with. - * @param {Boolean} [once=false] Specify if the listener is a one-time listener. - * @constructor - * @private - */ -function EE(fn, context, once) { - this.fn = fn; - this.context = context; - this.once = once || false; -} - -/** - * Add a listener for a given event. - * - * @param {EventEmitter} emitter Reference to the `EventEmitter` instance. - * @param {(String|Symbol)} event The event name. - * @param {Function} fn The listener function. - * @param {*} context The context to invoke the listener with. - * @param {Boolean} once Specify if the listener is a one-time listener. - * @returns {EventEmitter} - * @private - */ -function addListener(emitter, event, fn, context, once) { - if (typeof fn !== 'function') { - throw new TypeError('The listener must be a function'); - } - - var listener = new EE(fn, context || emitter, once) - , evt = prefix ? prefix + event : event; - - if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++; - else if (!emitter._events[evt].fn) emitter._events[evt].push(listener); - else emitter._events[evt] = [emitter._events[evt], listener]; - - return emitter; -} - -/** - * Clear event by name. - * - * @param {EventEmitter} emitter Reference to the `EventEmitter` instance. - * @param {(String|Symbol)} evt The Event name. - * @private - */ -function clearEvent(emitter, evt) { - if (--emitter._eventsCount === 0) emitter._events = new Events(); - else delete emitter._events[evt]; -} - -/** - * Minimal `EventEmitter` interface that is molded against the Node.js - * `EventEmitter` interface. - * - * @constructor - * @public - */ -function EventEmitter() { - this._events = new Events(); - this._eventsCount = 0; -} - -/** - * Return an array listing the events for which the emitter has registered - * listeners. - * - * @returns {Array} - * @public - */ -EventEmitter.prototype.eventNames = function eventNames() { - var names = [] - , events - , name; - - if (this._eventsCount === 0) return names; - - for (name in (events = this._events)) { - if (has.call(events, name)) names.push(prefix ? name.slice(1) : name); - } - - if (Object.getOwnPropertySymbols) { - return names.concat(Object.getOwnPropertySymbols(events)); - } - - return names; -}; - -/** - * Return the listeners registered for a given event. - * - * @param {(String|Symbol)} event The event name. - * @returns {Array} The registered listeners. - * @public - */ -EventEmitter.prototype.listeners = function listeners(event) { - var evt = prefix ? prefix + event : event - , handlers = this._events[evt]; - - if (!handlers) return []; - if (handlers.fn) return [handlers.fn]; - - for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) { - ee[i] = handlers[i].fn; - } - - return ee; -}; - -/** - * Return the number of listeners listening to a given event. - * - * @param {(String|Symbol)} event The event name. - * @returns {Number} The number of listeners. - * @public - */ -EventEmitter.prototype.listenerCount = function listenerCount(event) { - var evt = prefix ? prefix + event : event - , listeners = this._events[evt]; - - if (!listeners) return 0; - if (listeners.fn) return 1; - return listeners.length; -}; - -/** - * Calls each of the listeners registered for a given event. - * - * @param {(String|Symbol)} event The event name. - * @returns {Boolean} `true` if the event had listeners, else `false`. - * @public - */ -EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) { - var evt = prefix ? prefix + event : event; - - if (!this._events[evt]) return false; - - var listeners = this._events[evt] - , len = arguments.length - , args - , i; - - if (listeners.fn) { - if (listeners.once) this.removeListener(event, listeners.fn, undefined, true); - - switch (len) { - case 1: return listeners.fn.call(listeners.context), true; - case 2: return listeners.fn.call(listeners.context, a1), true; - case 3: return listeners.fn.call(listeners.context, a1, a2), true; - case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true; - case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true; - case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true; - } - - for (i = 1, args = new Array(len -1); i < len; i++) { - args[i - 1] = arguments[i]; - } - - listeners.fn.apply(listeners.context, args); - } else { - var length = listeners.length - , j; - - for (i = 0; i < length; i++) { - if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true); - - switch (len) { - case 1: listeners[i].fn.call(listeners[i].context); break; - case 2: listeners[i].fn.call(listeners[i].context, a1); break; - case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break; - case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break; - default: - if (!args) for (j = 1, args = new Array(len -1); j < len; j++) { - args[j - 1] = arguments[j]; - } - - listeners[i].fn.apply(listeners[i].context, args); - } - } - } - - return true; -}; - -/** - * Add a listener for a given event. - * - * @param {(String|Symbol)} event The event name. - * @param {Function} fn The listener function. - * @param {*} [context=this] The context to invoke the listener with. - * @returns {EventEmitter} `this`. - * @public - */ -EventEmitter.prototype.on = function on(event, fn, context) { - return addListener(this, event, fn, context, false); -}; - -/** - * Add a one-time listener for a given event. - * - * @param {(String|Symbol)} event The event name. - * @param {Function} fn The listener function. - * @param {*} [context=this] The context to invoke the listener with. - * @returns {EventEmitter} `this`. - * @public - */ -EventEmitter.prototype.once = function once(event, fn, context) { - return addListener(this, event, fn, context, true); -}; - -/** - * Remove the listeners of a given event. - * - * @param {(String|Symbol)} event The event name. - * @param {Function} fn Only remove the listeners that match this function. - * @param {*} context Only remove the listeners that have this context. - * @param {Boolean} once Only remove one-time listeners. - * @returns {EventEmitter} `this`. - * @public - */ -EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) { - var evt = prefix ? prefix + event : event; - - if (!this._events[evt]) return this; - if (!fn) { - clearEvent(this, evt); - return this; - } - - var listeners = this._events[evt]; - - if (listeners.fn) { - if ( - listeners.fn === fn && - (!once || listeners.once) && - (!context || listeners.context === context) - ) { - clearEvent(this, evt); - } - } else { - for (var i = 0, events = [], length = listeners.length; i < length; i++) { - if ( - listeners[i].fn !== fn || - (once && !listeners[i].once) || - (context && listeners[i].context !== context) - ) { - events.push(listeners[i]); - } - } - - // - // Reset the array, or remove it completely if we have no more listeners. - // - if (events.length) this._events[evt] = events.length === 1 ? events[0] : events; - else clearEvent(this, evt); - } - - return this; -}; - -/** - * Remove all listeners, or those of the specified event. - * - * @param {(String|Symbol)} [event] The event name. - * @returns {EventEmitter} `this`. - * @public - */ -EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) { - var evt; - - if (event) { - evt = prefix ? prefix + event : event; - if (this._events[evt]) clearEvent(this, evt); - } else { - this._events = new Events(); - this._eventsCount = 0; - } - - return this; -}; - -// -// Alias methods names because people roll like that. -// -EventEmitter.prototype.off = EventEmitter.prototype.removeListener; -EventEmitter.prototype.addListener = EventEmitter.prototype.on; - -// -// Expose the prefix. -// -EventEmitter.prefixed = prefix; - -// -// Allow `EventEmitter` to be imported as module namespace. -// -EventEmitter.EventEmitter = EventEmitter; - -// -// Expose the module. -// -if (true) { - module.exports = EventEmitter; -} - - -/***/ }), - -/***/ "../node_modules/fast-deep-equal/react.js": -/*!************************************************!*\ - !*** ../node_modules/fast-deep-equal/react.js ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -// do not edit .js files directly - edit src/index.jst - - - -module.exports = function equal(a, b) { - if (a === b) return true; - - if (a && b && typeof a == 'object' && typeof b == 'object') { - if (a.constructor !== b.constructor) return false; - - var length, i, keys; - if (Array.isArray(a)) { - length = a.length; - if (length != b.length) return false; - for (i = length; i-- !== 0;) - if (!equal(a[i], b[i])) return false; - return true; - } - - - - if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags; - if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf(); - if (a.toString !== Object.prototype.toString) return a.toString() === b.toString(); - - keys = Object.keys(a); - length = keys.length; - if (length !== Object.keys(b).length) return false; - - for (i = length; i-- !== 0;) - if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; - - for (i = length; i-- !== 0;) { - var key = keys[i]; - - if (key === '_owner' && a.$$typeof) { - // React-specific: avoid traversing React elements' _owner. - // _owner contains circular references - // and is not needed when comparing the actual elements (and not their owners) - continue; - } - - if (!equal(a[key], b[key])) return false; - } - - return true; - } - - // true if both NaN, false otherwise - return a!==a && b!==b; -}; - - -/***/ }), - -/***/ "../node_modules/fast-shallow-equal/index.js": -/*!***************************************************!*\ - !*** ../node_modules/fast-shallow-equal/index.js ***! - \***************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -var keyList = Object.keys; - -exports.equal = function equal (a, b) { - if (a === b) return true; - if (!(a instanceof Object) || !(b instanceof Object)) return false; - - var keys = keyList(a); - var length = keys.length; - - for (var i = 0; i < length; i++) - if (!(keys[i] in b)) return false; - - for (var i = 0; i < length; i++) - if (a[keys[i]] !== b[keys[i]]) return false; - - return length === keyList(b).length; -}; - - -/***/ }), - -/***/ "../node_modules/ieee754/index.js": -/*!****************************************!*\ - !*** ../node_modules/ieee754/index.js ***! - \****************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ -exports.read = function (buffer, offset, isLE, mLen, nBytes) { - var e, m - var eLen = (nBytes * 8) - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var nBits = -7 - var i = isLE ? (nBytes - 1) : 0 - var d = isLE ? -1 : 1 - var s = buffer[offset + i] - - i += d - - e = s & ((1 << (-nBits)) - 1) - s >>= (-nBits) - nBits += eLen - for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {} - - m = e & ((1 << (-nBits)) - 1) - e >>= (-nBits) - nBits += mLen - for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {} - - if (e === 0) { - e = 1 - eBias - } else if (e === eMax) { - return m ? NaN : ((s ? -1 : 1) * Infinity) - } else { - m = m + Math.pow(2, mLen) - e = e - eBias - } - return (s ? -1 : 1) * m * Math.pow(2, e - mLen) -} - -exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { - var e, m, c - var eLen = (nBytes * 8) - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) - var i = isLE ? 0 : (nBytes - 1) - var d = isLE ? 1 : -1 - var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 - - value = Math.abs(value) - - if (isNaN(value) || value === Infinity) { - m = isNaN(value) ? 1 : 0 - e = eMax - } else { - e = Math.floor(Math.log(value) / Math.LN2) - if (value * (c = Math.pow(2, -e)) < 1) { - e-- - c *= 2 - } - if (e + eBias >= 1) { - value += rt / c - } else { - value += rt * Math.pow(2, 1 - eBias) - } - if (value * c >= 2) { - e++ - c /= 2 - } - - if (e + eBias >= eMax) { - m = 0 - e = eMax - } else if (e + eBias >= 1) { - m = ((value * c) - 1) * Math.pow(2, mLen) - e = e + eBias - } else { - m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) - e = 0 - } - } - - for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} - - e = (e << mLen) | m - eLen += mLen - for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} - - buffer[offset + i - d] |= s * 128 -} - - -/***/ }), - -/***/ "../node_modules/isarray/index.js": -/*!****************************************!*\ - !*** ../node_modules/isarray/index.js ***! - \****************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -var toString = {}.toString; - -module.exports = Array.isArray || function (arr) { - return toString.call(arr) == '[object Array]'; -}; - - -/***/ }), - -/***/ "../node_modules/js-cookie/src/js.cookie.js": -/*!**************************************************!*\ - !*** ../node_modules/js-cookie/src/js.cookie.js ***! - \**************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! - * JavaScript Cookie v2.2.1 - * https://github.com/js-cookie/js-cookie - * - * Copyright 2006, 2015 Klaus Hartl & Fagner Brack - * Released under the MIT license - */ -;(function (factory) { - var registeredInModuleLoader; - if (true) { - !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), - __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? - (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : - __WEBPACK_AMD_DEFINE_FACTORY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - registeredInModuleLoader = true; - } - if (true) { - module.exports = factory(); - registeredInModuleLoader = true; - } - if (!registeredInModuleLoader) { - var OldCookies = window.Cookies; - var api = window.Cookies = factory(); - api.noConflict = function () { - window.Cookies = OldCookies; - return api; - }; - } -}(function () { - function extend () { - var i = 0; - var result = {}; - for (; i < arguments.length; i++) { - var attributes = arguments[ i ]; - for (var key in attributes) { - result[key] = attributes[key]; - } - } - return result; - } - - function decode (s) { - return s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent); - } - - function init (converter) { - function api() {} - - function set (key, value, attributes) { - if (typeof document === 'undefined') { - return; - } - - attributes = extend({ - path: '/' - }, api.defaults, attributes); - - if (typeof attributes.expires === 'number') { - attributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5); - } - - // We're using "expires" because "max-age" is not supported by IE - attributes.expires = attributes.expires ? attributes.expires.toUTCString() : ''; - - try { - var result = JSON.stringify(value); - if (/^[\{\[]/.test(result)) { - value = result; - } - } catch (e) {} - - value = converter.write ? - converter.write(value, key) : - encodeURIComponent(String(value)) - .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent); - - key = encodeURIComponent(String(key)) - .replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent) - .replace(/[\(\)]/g, escape); - - var stringifiedAttributes = ''; - for (var attributeName in attributes) { - if (!attributes[attributeName]) { - continue; - } - stringifiedAttributes += '; ' + attributeName; - if (attributes[attributeName] === true) { - continue; - } - - // Considers RFC 6265 section 5.2: - // ... - // 3. If the remaining unparsed-attributes contains a %x3B (";") - // character: - // Consume the characters of the unparsed-attributes up to, - // not including, the first %x3B (";") character. - // ... - stringifiedAttributes += '=' + attributes[attributeName].split(';')[0]; - } - - return (document.cookie = key + '=' + value + stringifiedAttributes); - } - - function get (key, json) { - if (typeof document === 'undefined') { - return; - } - - var jar = {}; - // To prevent the for loop in the first place assign an empty array - // in case there are no cookies at all. - var cookies = document.cookie ? document.cookie.split('; ') : []; - var i = 0; - - for (; i < cookies.length; i++) { - var parts = cookies[i].split('='); - var cookie = parts.slice(1).join('='); - - if (!json && cookie.charAt(0) === '"') { - cookie = cookie.slice(1, -1); - } - - try { - var name = decode(parts[0]); - cookie = (converter.read || converter)(cookie, name) || - decode(cookie); - - if (json) { - try { - cookie = JSON.parse(cookie); - } catch (e) {} - } - - jar[name] = cookie; - - if (key === name) { - break; - } - } catch (e) {} - } - - return key ? jar[key] : jar; - } - - api.set = set; - api.get = function (key) { - return get(key, false /* read as raw */); - }; - api.getJSON = function (key) { - return get(key, true /* read as json */); - }; - api.remove = function (key, attributes) { - set(key, '', extend(attributes, { - expires: -1 - })); - }; - - api.defaults = {}; - - api.withConverter = init; - - return api; - } - - return init(function () {}); -})); - - -/***/ }), - -/***/ "../node_modules/nano-css/addon/__dev__/warnOnMissingDependencies.js": -/*!***************************************************************************!*\ - !*** ../node_modules/nano-css/addon/__dev__/warnOnMissingDependencies.js ***! - \***************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var pkgName = 'nano-css'; - -module.exports = function warnOnMissingDependencies (addon, renderer, deps) { - var missing = []; - - for (var i = 0; i < deps.length; i++) { - var name = deps[i]; - - if (!renderer[name]) { - missing.push(name); - } - } - - if (missing.length) { - var str = 'Addon "' + addon + '" is missing the following dependencies:'; - - for (var j = 0; j < missing.length; j++) { - str += '\n require("' + pkgName + '/addon/' + missing[j] + '").addon(nano);'; - } - - throw new Error(str); - } -}; - - -/***/ }), - -/***/ "../node_modules/nano-css/addon/cssom.js": -/*!***********************************************!*\ - !*** ../node_modules/nano-css/addon/cssom.js ***! - \***********************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -exports.addon = function (renderer) { - // CSSOM support only browser environment. - if (!renderer.client) return; - - if (true) { - __webpack_require__(/*! ./__dev__/warnOnMissingDependencies */ "../node_modules/nano-css/addon/__dev__/warnOnMissingDependencies.js")('cssom', renderer, ['sh']); - } - - // Style sheet for media queries. - document.head.appendChild(renderer.msh = document.createElement('style')); - - renderer.createRule = function (selector, prelude) { - var rawCss = selector + '{}'; - if (prelude) rawCss = prelude + '{' + rawCss + '}'; - var sheet = prelude ? renderer.msh.sheet : renderer.sh.sheet; - var index = sheet.insertRule(rawCss, sheet.cssRules.length); - var rule = (sheet.cssRules || sheet.rules)[index]; - - // Keep track of `index` where rule was inserted in the sheet. This is - // needed for rule deletion. - rule.index = index; - - if (prelude) { - // If rule has media query (it has prelude), move style (CSSStyleDeclaration) - // object to the "top" to normalize it with a rule without the media - // query, so that both rules have `.style` property available. - var selectorRule = (rule.cssRules || rule.rules)[0]; - rule.style = selectorRule.style; - rule.styleMap = selectorRule.styleMap; - } - - return rule; - }; -}; - - -/***/ }), - -/***/ "../node_modules/nano-css/addon/vcssom.js": -/*!************************************************!*\ - !*** ../node_modules/nano-css/addon/vcssom.js ***! - \************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var removeRule = __webpack_require__(/*! ./vcssom/removeRule */ "../node_modules/nano-css/addon/vcssom/removeRule.js").removeRule; - -exports.addon = function (renderer) { - // VCSSOM support only browser environment. - if (!renderer.client) return; - - if (true) { - __webpack_require__(/*! ./__dev__/warnOnMissingDependencies */ "../node_modules/nano-css/addon/__dev__/warnOnMissingDependencies.js")('cssom', renderer, ['createRule']); // cssom - } - - var kebab = renderer.kebab; - - function VRule (selector, prelude) { - this.rule = renderer.createRule(selector, prelude); - this.decl = {}; - } - VRule.prototype.diff = function (newDecl) { - var oldDecl = this.decl; - var style = this.rule.style; - var property; - for (property in oldDecl) - if (newDecl[property] === undefined) - style.removeProperty(property); - for (property in newDecl) - if (newDecl[property] !== oldDecl[property]) - style.setProperty(kebab(property), newDecl[property]); - this.decl = newDecl; - }; - VRule.prototype.del = function () { - removeRule(this.rule); - }; - - function VSheet () { - /** - * { - * '': { - * '': { - * color: 'red - * } - * } - * } - */ - this.tree = {}; - } - VSheet.prototype.diff = function (newTree) { - var oldTree = this.tree; - - // Remove media queries not present in new tree. - for (var prelude in oldTree) { - if (newTree[prelude] === undefined) { - var rules = oldTree[prelude]; - for (var selector in rules) - rules[selector].del(); - } - } - - for (var prelude in newTree) { - if (oldTree[prelude] === undefined) { - // Whole media query is new. - for (var selector in newTree[prelude]) { - var rule = new VRule(selector, prelude); - rule.diff(newTree[prelude][selector]); - newTree[prelude][selector] = rule; - } - } else { - // Old tree already has rules with this media query. - var oldRules = oldTree[prelude]; - var newRules = newTree[prelude]; - - // Remove rules not present in new tree. - for (var selector in oldRules) - if (!newRules[selector]) - oldRules[selector].del(); - - // Apply new rules. - for (var selector in newRules) { - var rule = oldRules[selector]; - if (rule) { - rule.diff(newRules[selector]); - newRules[selector] = rule; - } else { - rule = new VRule(selector, prelude); - rule.diff(newRules[selector]); - newRules[selector] = rule; - } - } - } - } - - this.tree = newTree; - }; - - renderer.VRule = VRule; - renderer.VSheet = VSheet; -}; - - -/***/ }), - -/***/ "../node_modules/nano-css/addon/vcssom/cssToTree.js": -/*!**********************************************************!*\ - !*** ../node_modules/nano-css/addon/vcssom/cssToTree.js ***! - \**********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -function cssToTree (tree, css, selector, prelude) { - var declarations = {}; - var hasDeclarations = false; - var key, value; - - for (key in css) { - value = css[key]; - if (typeof value !== 'object') { - hasDeclarations = true; - declarations[key] = value; - } - } - - if (hasDeclarations) { - if (!tree[prelude]) tree[prelude] = {}; - tree[prelude][selector] = declarations; - } - - for (key in css) { - value = css[key]; - if (typeof value === 'object') { - if (key[0] === '@') { - cssToTree(tree, value, selector, key); - } else { - var hasCurrentSymbol = key.indexOf('&') > -1; - var selectorParts = selector.split(','); - if (hasCurrentSymbol) { - for (var i = 0; i < selectorParts.length; i++) { - selectorParts[i] = key.replace(/&/g, selectorParts[i]); - } - } else { - for (var i = 0; i < selectorParts.length; i++) { - selectorParts[i] = selectorParts[i] + ' ' + key; - } - } - cssToTree(tree, value, selectorParts.join(','), prelude); - } - } - } -}; - -exports.cssToTree = cssToTree; - - -/***/ }), - -/***/ "../node_modules/nano-css/addon/vcssom/removeRule.js": -/*!***********************************************************!*\ - !*** ../node_modules/nano-css/addon/vcssom/removeRule.js ***! - \***********************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -function removeRule (rule) { - var maxIndex = rule.index; - var sh = rule.parentStyleSheet; - var rules = sh.cssRules || sh.rules; - maxIndex = Math.max(maxIndex, rules.length - 1); - while (maxIndex >= 0) { - if (rules[maxIndex] === rule) { - sh.deleteRule(maxIndex); - break; - } - maxIndex--; - } -} - -exports.removeRule = removeRule; - - -/***/ }), - -/***/ "../node_modules/nano-css/index.js": -/*!*****************************************!*\ - !*** ../node_modules/nano-css/index.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var KEBAB_REGEX = /[A-Z]/g; - -var hash = function (str) { - var h = 5381, i = str.length; - - while (i) h = (h * 33) ^ str.charCodeAt(--i); - - return '_' + (h >>> 0).toString(36); -}; - -exports.create = function (config) { - config = config || {}; - var assign = config.assign || Object.assign; - var client = typeof window === 'object'; - - // Check if we are really in browser environment. - if (true) { - if (client) { - if ((typeof document !== 'object') || !document.getElementsByTagName('HTML')) { - console.error( - 'nano-css detected browser environment because of "window" global, but ' + - '"document" global seems to be defective.' - ); - } - } - } - - var renderer = assign({ - raw: '', - pfx: '_', - client: client, - assign: assign, - stringify: JSON.stringify, - kebab: function (prop) { - return prop.replace(KEBAB_REGEX, '-$&').toLowerCase(); - }, - decl: function (key, value) { - key = renderer.kebab(key); - return key + ':' + value + ';'; - }, - hash: function (obj) { - return hash(renderer.stringify(obj)); - }, - selector: function (parent, selector) { - return parent + (selector[0] === ':' ? '' : ' ') + selector; - }, - putRaw: function (rawCssRule) { - renderer.raw += rawCssRule; - } - }, config); - - if (renderer.client) { - if (!renderer.sh) - document.head.appendChild(renderer.sh = document.createElement('style')); - - if (true) { - renderer.sh.setAttribute('data-nano-css-dev', ''); - - // Test style sheet used in DEV mode to test if .insetRule() would throw. - renderer.shTest = document.createElement('style'); - renderer.shTest.setAttribute('data-nano-css-dev-tests', ''); - document.head.appendChild(renderer.shTest); - } - - renderer.putRaw = function (rawCssRule) { - // .insertRule() is faster than .appendChild(), that's why we use it in PROD. - // But CSS injected using .insertRule() is not displayed in Chrome Devtools, - // that's why we use .appendChild in DEV. - if (false) { var sheet; } else { - // Test if .insertRule() works in dev mode. Unknown pseudo-selectors will throw when - // .insertRule() is used, but .appendChild() will not throw. - try { - renderer.shTest.sheet.insertRule(rawCssRule, renderer.shTest.sheet.cssRules.length); - } catch (error) { - if (config.verbose) { - console.error(error); - } - } - - // Insert pretty-printed CSS for dev mode. - renderer.sh.appendChild(document.createTextNode(rawCssRule)); - } - }; - } - - renderer.put = function (selector, decls, atrule) { - var str = ''; - var prop, value; - var postponed = []; - - for (prop in decls) { - value = decls[prop]; - - if ((value instanceof Object) && !(value instanceof Array)) { - postponed.push(prop); - } else { - if (( true) && !renderer.sourcemaps) { - str += ' ' + renderer.decl(prop, value, selector, atrule) + '\n'; - } else { - str += renderer.decl(prop, value, selector, atrule); - } - } - } - - if (str) { - if (( true) && !renderer.sourcemaps) { - str = '\n' + selector + ' {\n' + str + '}\n'; - } else { - str = selector + '{' + str + '}'; - } - renderer.putRaw(atrule ? atrule + '{' + str + '}' : str); - } - - for (var i = 0; i < postponed.length; i++) { - prop = postponed[i]; - - if (prop[0] === '@' && prop !== '@font-face') { - renderer.putAt(selector, decls[prop], prop); - } else { - renderer.put(renderer.selector(selector, prop), decls[prop], atrule); - } - } - }; - - renderer.putAt = renderer.put; - - return renderer; -}; - - -/***/ }), - -/***/ "../node_modules/qs/lib/formats.js": -/*!*****************************************!*\ - !*** ../node_modules/qs/lib/formats.js ***! - \*****************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var replace = String.prototype.replace; -var percentTwenties = /%20/g; - -module.exports = { - 'default': 'RFC3986', - formatters: { - RFC1738: function (value) { - return replace.call(value, percentTwenties, '+'); - }, - RFC3986: function (value) { - return value; - } - }, - RFC1738: 'RFC1738', - RFC3986: 'RFC3986' -}; - - -/***/ }), - -/***/ "../node_modules/qs/lib/index.js": -/*!***************************************!*\ - !*** ../node_modules/qs/lib/index.js ***! - \***************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var stringify = __webpack_require__(/*! ./stringify */ "../node_modules/qs/lib/stringify.js"); -var parse = __webpack_require__(/*! ./parse */ "../node_modules/qs/lib/parse.js"); -var formats = __webpack_require__(/*! ./formats */ "../node_modules/qs/lib/formats.js"); - -module.exports = { - formats: formats, - parse: parse, - stringify: stringify -}; - - -/***/ }), - -/***/ "../node_modules/qs/lib/parse.js": -/*!***************************************!*\ - !*** ../node_modules/qs/lib/parse.js ***! - \***************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var utils = __webpack_require__(/*! ./utils */ "../node_modules/qs/lib/utils.js"); - -var has = Object.prototype.hasOwnProperty; - -var defaults = { - allowDots: false, - allowPrototypes: false, - arrayLimit: 20, - decoder: utils.decode, - delimiter: '&', - depth: 5, - parameterLimit: 1000, - plainObjects: false, - strictNullHandling: false -}; - -var parseValues = function parseQueryStringValues(str, options) { - var obj = {}; - var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str; - var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit; - var parts = cleanStr.split(options.delimiter, limit); - - for (var i = 0; i < parts.length; ++i) { - var part = parts[i]; - - var bracketEqualsPos = part.indexOf(']='); - var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1; - - var key, val; - if (pos === -1) { - key = options.decoder(part, defaults.decoder); - val = options.strictNullHandling ? null : ''; - } else { - key = options.decoder(part.slice(0, pos), defaults.decoder); - val = options.decoder(part.slice(pos + 1), defaults.decoder); - } - if (has.call(obj, key)) { - obj[key] = [].concat(obj[key]).concat(val); - } else { - obj[key] = val; - } - } - - return obj; -}; - -var parseObject = function (chain, val, options) { - var leaf = val; - - for (var i = chain.length - 1; i >= 0; --i) { - var obj; - var root = chain[i]; - - if (root === '[]') { - obj = []; - obj = obj.concat(leaf); - } else { - obj = options.plainObjects ? Object.create(null) : {}; - var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root; - var index = parseInt(cleanRoot, 10); - if ( - !isNaN(index) - && root !== cleanRoot - && String(index) === cleanRoot - && index >= 0 - && (options.parseArrays && index <= options.arrayLimit) - ) { - obj = []; - obj[index] = leaf; - } else { - obj[cleanRoot] = leaf; - } - } - - leaf = obj; - } - - return leaf; -}; - -var parseKeys = function parseQueryStringKeys(givenKey, val, options) { - if (!givenKey) { - return; - } - - // Transform dot notation to bracket notation - var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey; - - // The regex chunks - - var brackets = /(\[[^[\]]*])/; - var child = /(\[[^[\]]*])/g; - - // Get the parent - - var segment = brackets.exec(key); - var parent = segment ? key.slice(0, segment.index) : key; - - // Stash the parent if it exists - - var keys = []; - if (parent) { - // If we aren't using plain objects, optionally prefix keys - // that would overwrite object prototype properties - if (!options.plainObjects && has.call(Object.prototype, parent)) { - if (!options.allowPrototypes) { - return; - } - } - - keys.push(parent); - } - - // Loop through children appending to the array until we hit depth - - var i = 0; - while ((segment = child.exec(key)) !== null && i < options.depth) { - i += 1; - if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) { - if (!options.allowPrototypes) { - return; - } - } - keys.push(segment[1]); - } - - // If there's a remainder, just add whatever is left - - if (segment) { - keys.push('[' + key.slice(segment.index) + ']'); - } - - return parseObject(keys, val, options); -}; - -module.exports = function (str, opts) { - var options = opts ? utils.assign({}, opts) : {}; - - if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') { - throw new TypeError('Decoder has to be a function.'); - } - - options.ignoreQueryPrefix = options.ignoreQueryPrefix === true; - options.delimiter = typeof options.delimiter === 'string' || utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter; - options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth; - options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit; - options.parseArrays = options.parseArrays !== false; - options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder; - options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots; - options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects; - options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes; - options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit; - options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; - - if (str === '' || str === null || typeof str === 'undefined') { - return options.plainObjects ? Object.create(null) : {}; - } - - var tempObj = typeof str === 'string' ? parseValues(str, options) : str; - var obj = options.plainObjects ? Object.create(null) : {}; - - // Iterate over the keys and setup the new object - - var keys = Object.keys(tempObj); - for (var i = 0; i < keys.length; ++i) { - var key = keys[i]; - var newObj = parseKeys(key, tempObj[key], options); - obj = utils.merge(obj, newObj, options); - } - - return utils.compact(obj); -}; - - -/***/ }), - -/***/ "../node_modules/qs/lib/stringify.js": -/*!*******************************************!*\ - !*** ../node_modules/qs/lib/stringify.js ***! - \*******************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var utils = __webpack_require__(/*! ./utils */ "../node_modules/qs/lib/utils.js"); -var formats = __webpack_require__(/*! ./formats */ "../node_modules/qs/lib/formats.js"); - -var arrayPrefixGenerators = { - brackets: function brackets(prefix) { // eslint-disable-line func-name-matching - return prefix + '[]'; - }, - indices: function indices(prefix, key) { // eslint-disable-line func-name-matching - return prefix + '[' + key + ']'; - }, - repeat: function repeat(prefix) { // eslint-disable-line func-name-matching - return prefix; - } -}; - -var toISO = Date.prototype.toISOString; - -var defaults = { - delimiter: '&', - encode: true, - encoder: utils.encode, - encodeValuesOnly: false, - serializeDate: function serializeDate(date) { // eslint-disable-line func-name-matching - return toISO.call(date); - }, - skipNulls: false, - strictNullHandling: false -}; - -var stringify = function stringify( // eslint-disable-line func-name-matching - object, - prefix, - generateArrayPrefix, - strictNullHandling, - skipNulls, - encoder, - filter, - sort, - allowDots, - serializeDate, - formatter, - encodeValuesOnly -) { - var obj = object; - if (typeof filter === 'function') { - obj = filter(prefix, obj); - } else if (obj instanceof Date) { - obj = serializeDate(obj); - } else if (obj === null) { - if (strictNullHandling) { - return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder) : prefix; - } - - obj = ''; - } - - if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || utils.isBuffer(obj)) { - if (encoder) { - var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder); - return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder))]; - } - return [formatter(prefix) + '=' + formatter(String(obj))]; - } - - var values = []; - - if (typeof obj === 'undefined') { - return values; - } - - var objKeys; - if (Array.isArray(filter)) { - objKeys = filter; - } else { - var keys = Object.keys(obj); - objKeys = sort ? keys.sort(sort) : keys; - } - - for (var i = 0; i < objKeys.length; ++i) { - var key = objKeys[i]; - - if (skipNulls && obj[key] === null) { - continue; - } - - if (Array.isArray(obj)) { - values = values.concat(stringify( - obj[key], - generateArrayPrefix(prefix, key), - generateArrayPrefix, - strictNullHandling, - skipNulls, - encoder, - filter, - sort, - allowDots, - serializeDate, - formatter, - encodeValuesOnly - )); - } else { - values = values.concat(stringify( - obj[key], - prefix + (allowDots ? '.' + key : '[' + key + ']'), - generateArrayPrefix, - strictNullHandling, - skipNulls, - encoder, - filter, - sort, - allowDots, - serializeDate, - formatter, - encodeValuesOnly - )); - } - } - - return values; -}; - -module.exports = function (object, opts) { - var obj = object; - var options = opts ? utils.assign({}, opts) : {}; - - if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') { - throw new TypeError('Encoder has to be a function.'); - } - - var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter; - var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; - var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls; - var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode; - var encoder = typeof options.encoder === 'function' ? options.encoder : defaults.encoder; - var sort = typeof options.sort === 'function' ? options.sort : null; - var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots; - var serializeDate = typeof options.serializeDate === 'function' ? options.serializeDate : defaults.serializeDate; - var encodeValuesOnly = typeof options.encodeValuesOnly === 'boolean' ? options.encodeValuesOnly : defaults.encodeValuesOnly; - if (typeof options.format === 'undefined') { - options.format = formats['default']; - } else if (!Object.prototype.hasOwnProperty.call(formats.formatters, options.format)) { - throw new TypeError('Unknown format option provided.'); - } - var formatter = formats.formatters[options.format]; - var objKeys; - var filter; - - if (typeof options.filter === 'function') { - filter = options.filter; - obj = filter('', obj); - } else if (Array.isArray(options.filter)) { - filter = options.filter; - objKeys = filter; - } - - var keys = []; - - if (typeof obj !== 'object' || obj === null) { - return ''; - } - - var arrayFormat; - if (options.arrayFormat in arrayPrefixGenerators) { - arrayFormat = options.arrayFormat; - } else if ('indices' in options) { - arrayFormat = options.indices ? 'indices' : 'repeat'; - } else { - arrayFormat = 'indices'; - } - - var generateArrayPrefix = arrayPrefixGenerators[arrayFormat]; - - if (!objKeys) { - objKeys = Object.keys(obj); - } - - if (sort) { - objKeys.sort(sort); - } - - for (var i = 0; i < objKeys.length; ++i) { - var key = objKeys[i]; - - if (skipNulls && obj[key] === null) { - continue; - } - - keys = keys.concat(stringify( - obj[key], - key, - generateArrayPrefix, - strictNullHandling, - skipNulls, - encode ? encoder : null, - filter, - sort, - allowDots, - serializeDate, - formatter, - encodeValuesOnly - )); - } - - var joined = keys.join(delimiter); - var prefix = options.addQueryPrefix === true ? '?' : ''; - - return joined.length > 0 ? prefix + joined : ''; -}; - - -/***/ }), - -/***/ "../node_modules/qs/lib/utils.js": -/*!***************************************!*\ - !*** ../node_modules/qs/lib/utils.js ***! - \***************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var has = Object.prototype.hasOwnProperty; - -var hexTable = (function () { - var array = []; - for (var i = 0; i < 256; ++i) { - array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase()); - } - - return array; -}()); - -var compactQueue = function compactQueue(queue) { - var obj; - - while (queue.length) { - var item = queue.pop(); - obj = item.obj[item.prop]; - - if (Array.isArray(obj)) { - var compacted = []; - - for (var j = 0; j < obj.length; ++j) { - if (typeof obj[j] !== 'undefined') { - compacted.push(obj[j]); - } - } - - item.obj[item.prop] = compacted; - } - } - - return obj; -}; - -var arrayToObject = function arrayToObject(source, options) { - var obj = options && options.plainObjects ? Object.create(null) : {}; - for (var i = 0; i < source.length; ++i) { - if (typeof source[i] !== 'undefined') { - obj[i] = source[i]; - } - } - - return obj; -}; - -var merge = function merge(target, source, options) { - if (!source) { - return target; - } - - if (typeof source !== 'object') { - if (Array.isArray(target)) { - target.push(source); - } else if (typeof target === 'object') { - if (options.plainObjects || options.allowPrototypes || !has.call(Object.prototype, source)) { - target[source] = true; - } - } else { - return [target, source]; - } - - return target; - } - - if (typeof target !== 'object') { - return [target].concat(source); - } - - var mergeTarget = target; - if (Array.isArray(target) && !Array.isArray(source)) { - mergeTarget = arrayToObject(target, options); - } - - if (Array.isArray(target) && Array.isArray(source)) { - source.forEach(function (item, i) { - if (has.call(target, i)) { - if (target[i] && typeof target[i] === 'object') { - target[i] = merge(target[i], item, options); - } else { - target.push(item); - } - } else { - target[i] = item; - } - }); - return target; - } - - return Object.keys(source).reduce(function (acc, key) { - var value = source[key]; - - if (has.call(acc, key)) { - acc[key] = merge(acc[key], value, options); - } else { - acc[key] = value; - } - return acc; - }, mergeTarget); -}; - -var assign = function assignSingleSource(target, source) { - return Object.keys(source).reduce(function (acc, key) { - acc[key] = source[key]; - return acc; - }, target); -}; - -var decode = function (str) { - try { - return decodeURIComponent(str.replace(/\+/g, ' ')); - } catch (e) { - return str; - } -}; - -var encode = function encode(str) { - // This code was originally written by Brian White (mscdex) for the io.js core querystring library. - // It has been adapted here for stricter adherence to RFC 3986 - if (str.length === 0) { - return str; - } - - var string = typeof str === 'string' ? str : String(str); - - var out = ''; - for (var i = 0; i < string.length; ++i) { - var c = string.charCodeAt(i); - - if ( - c === 0x2D // - - || c === 0x2E // . - || c === 0x5F // _ - || c === 0x7E // ~ - || (c >= 0x30 && c <= 0x39) // 0-9 - || (c >= 0x41 && c <= 0x5A) // a-z - || (c >= 0x61 && c <= 0x7A) // A-Z - ) { - out += string.charAt(i); - continue; - } - - if (c < 0x80) { - out = out + hexTable[c]; - continue; - } - - if (c < 0x800) { - out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); - continue; - } - - if (c < 0xD800 || c >= 0xE000) { - out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); - continue; - } - - i += 1; - c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); - out += hexTable[0xF0 | (c >> 18)] - + hexTable[0x80 | ((c >> 12) & 0x3F)] - + hexTable[0x80 | ((c >> 6) & 0x3F)] - + hexTable[0x80 | (c & 0x3F)]; - } - - return out; -}; - -var compact = function compact(value) { - var queue = [{ obj: { o: value }, prop: 'o' }]; - var refs = []; - - for (var i = 0; i < queue.length; ++i) { - var item = queue[i]; - var obj = item.obj[item.prop]; - - var keys = Object.keys(obj); - for (var j = 0; j < keys.length; ++j) { - var key = keys[j]; - var val = obj[key]; - if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) { - queue.push({ obj: obj, prop: key }); - refs.push(val); - } - } - } - - return compactQueue(queue); -}; - -var isRegExp = function isRegExp(obj) { - return Object.prototype.toString.call(obj) === '[object RegExp]'; -}; - -var isBuffer = function isBuffer(obj) { - if (obj === null || typeof obj === 'undefined') { - return false; - } - - return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); -}; - -module.exports = { - arrayToObject: arrayToObject, - assign: assign, - compact: compact, - decode: decode, - encode: encode, - isBuffer: isBuffer, - isRegExp: isRegExp, - merge: merge -}; - - -/***/ }), - -/***/ "../node_modules/react-universal-interface/lib/addClassDecoratorSupport.js": -/*!*********************************************************************************!*\ - !*** ../node_modules/react-universal-interface/lib/addClassDecoratorSupport.js ***! - \*********************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js"); -var wrapInStatefulComponent_1 = tslib_1.__importDefault(__webpack_require__(/*! ./wrapInStatefulComponent */ "../node_modules/react-universal-interface/lib/wrapInStatefulComponent.js")); -var addClassDecoratorSupport = function (Comp) { - var isSFC = !Comp.prototype; - return !isSFC ? Comp : wrapInStatefulComponent_1.default(Comp); -}; -exports.default = addClassDecoratorSupport; -//# sourceMappingURL=addClassDecoratorSupport.js.map - -/***/ }), - -/***/ "../node_modules/react-universal-interface/lib/createEnhancer.js": -/*!***********************************************************************!*\ - !*** ../node_modules/react-universal-interface/lib/createEnhancer.js ***! - \***********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.divWrapper = void 0; -var tslib_1 = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js"); -var React = tslib_1.__importStar(__webpack_require__(/*! react */ "react")); -var addClassDecoratorSupport_1 = tslib_1.__importDefault(__webpack_require__(/*! ./addClassDecoratorSupport */ "../node_modules/react-universal-interface/lib/addClassDecoratorSupport.js")); -var h = React.createElement; -var noWrap = function (Comp, propName, props, state) { - var _a; - return h(Comp, propName ? tslib_1.__assign((_a = {}, _a[propName] = state, _a), props) : tslib_1.__assign(tslib_1.__assign({}, state), props)); -}; -exports.divWrapper = function (Comp, propName, props, state) { - return h('div', null, noWrap(Comp, propName, props, state)); -}; -var createEnhancer = function (Facc, prop, wrapper) { - if (wrapper === void 0) { wrapper = noWrap; } - var enhancer = function (Comp, propName, faccProps) { - if (propName === void 0) { propName = prop; } - if (faccProps === void 0) { faccProps = null; } - var isClassDecoratorMethodCall = typeof Comp === 'string'; - if (isClassDecoratorMethodCall) { - return function (Klass) { return enhancer(Klass, Comp || prop, propName); }; - } - var Enhanced = function (props) { - return h(Facc, faccProps, function (state) { return wrapper(Comp, propName, props, state); }); - }; - if (true) { - Enhanced.displayName = (Facc.displayName || Facc.name) + "(" + (Comp.displayName || Comp.name) + ")"; - } - return isClassDecoratorMethodCall ? addClassDecoratorSupport_1.default(Enhanced) : Enhanced; - }; - return enhancer; -}; -exports.default = createEnhancer; -//# sourceMappingURL=createEnhancer.js.map - -/***/ }), - -/***/ "../node_modules/react-universal-interface/lib/hookToRenderProp.js": -/*!*************************************************************************!*\ - !*** ../node_modules/react-universal-interface/lib/hookToRenderProp.js ***! - \*************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js"); -var render_1 = tslib_1.__importDefault(__webpack_require__(/*! ./render */ "../node_modules/react-universal-interface/lib/render.js")); -var defaultMapPropsToArgs = function (props) { return [props]; }; -var hookToRenderProp = function (hook, mapPropsToArgs) { - if (mapPropsToArgs === void 0) { mapPropsToArgs = defaultMapPropsToArgs; } - return function (props) { return render_1.default(props, hook.apply(void 0, mapPropsToArgs(props))); }; -}; -exports.default = hookToRenderProp; -//# sourceMappingURL=hookToRenderProp.js.map - -/***/ }), - -/***/ "../node_modules/react-universal-interface/lib/index.js": -/*!**************************************************************!*\ - !*** ../node_modules/react-universal-interface/lib/index.js ***! - \**************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.hookToRenderProp = exports.createEnhancer = exports.render = void 0; -var tslib_1 = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js"); -var render_1 = tslib_1.__importDefault(__webpack_require__(/*! ./render */ "../node_modules/react-universal-interface/lib/render.js")); -exports.render = render_1.default; -var createEnhancer_1 = tslib_1.__importDefault(__webpack_require__(/*! ./createEnhancer */ "../node_modules/react-universal-interface/lib/createEnhancer.js")); -exports.createEnhancer = createEnhancer_1.default; -var hookToRenderProp_1 = tslib_1.__importDefault(__webpack_require__(/*! ./hookToRenderProp */ "../node_modules/react-universal-interface/lib/hookToRenderProp.js")); -exports.hookToRenderProp = hookToRenderProp_1.default; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "../node_modules/react-universal-interface/lib/render.js": -/*!***************************************************************!*\ - !*** ../node_modules/react-universal-interface/lib/render.js ***! - \***************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js"); -var react_1 = __webpack_require__(/*! react */ "react"); -var isReact16Plus = parseInt(react_1.version.substr(0, react_1.version.indexOf('.'))) > 15; -var isFn = function (fn) { return typeof fn === 'function'; }; -var render = function (props, data) { - var more = []; - for (var _i = 2; _i < arguments.length; _i++) { - more[_i - 2] = arguments[_i]; - } - if (true) { - if (typeof props !== 'object') { - throw new TypeError('renderChildren(props, data) first argument must be a props object.'); - } - var children_1 = props.children, render_1 = props.render; - if (isFn(children_1) && isFn(render_1)) { - console.warn('Both "render" and "children" are specified for in a universal interface component. ' + - 'Children will be used.'); - console.trace(); - } - if (typeof data !== 'object') { - console.warn('Universal component interface normally expects data to be an object, ' + - ("\"" + typeof data + "\" received.")); - console.trace(); - } - } - var render = props.render, _a = props.children, children = _a === void 0 ? render : _a, component = props.component, _b = props.comp, comp = _b === void 0 ? component : _b; - if (isFn(children)) - return children.apply(void 0, tslib_1.__spreadArrays([data], more)); - if (comp) { - return react_1.createElement(comp, data); - } - if (children instanceof Array) - return isReact16Plus ? children : react_1.createElement.apply(void 0, tslib_1.__spreadArrays(['div', null], children)); - if (children && (children instanceof Object)) { - if (true) { - if (!children.type || ((typeof children.type !== 'string') && (typeof children.type !== 'function') && (typeof children.type !== 'symbol'))) { - console.warn('Universal component interface received object as children, ' + - 'expected React element, but received unexpected React "type".'); - console.trace(); - } - if (typeof children.type === 'string') - return children; - return react_1.cloneElement(children, Object.assign({}, children.props, data)); - } - else {} - } - return children || null; -}; -exports.default = render; -//# sourceMappingURL=render.js.map - -/***/ }), - -/***/ "../node_modules/react-universal-interface/lib/wrapInStatefulComponent.js": -/*!********************************************************************************!*\ - !*** ../node_modules/react-universal-interface/lib/wrapInStatefulComponent.js ***! - \********************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js"); -var React = tslib_1.__importStar(__webpack_require__(/*! react */ "react")); -var wrapInStatefulComponent = function (Comp) { - var Decorated = (function (_super) { - tslib_1.__extends(class_1, _super); - function class_1() { - return _super !== null && _super.apply(this, arguments) || this; - } - class_1.prototype.render = function () { - return Comp(this.props, this.context); - }; - return class_1; - }(React.Component)); - if (true) { - Decorated.displayName = "Decorated(" + (Comp.displayName || Comp.name) + ")"; - } - return Decorated; -}; -exports.default = wrapInStatefulComponent; -//# sourceMappingURL=wrapInStatefulComponent.js.map - -/***/ }), - -/***/ "../node_modules/react-use/esm/factory/createBreakpoint.js": -/*!*****************************************************************!*\ - !*** ../node_modules/react-use/esm/factory/createBreakpoint.js ***! - \*****************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _misc_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../misc/util */ "../node_modules/react-use/esm/misc/util.js"); - - -var createBreakpoint = function (breakpoints) { - if (breakpoints === void 0) { breakpoints = { laptopL: 1440, laptop: 1024, tablet: 768 }; } - return function () { - var _a = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])(_misc_util__WEBPACK_IMPORTED_MODULE_1__["isBrowser"] ? window.innerWidth : 0), screen = _a[0], setScreen = _a[1]; - Object(react__WEBPACK_IMPORTED_MODULE_0__["useEffect"])(function () { - var setSideScreen = function () { - setScreen(window.innerWidth); - }; - setSideScreen(); - Object(_misc_util__WEBPACK_IMPORTED_MODULE_1__["on"])(window, 'resize', setSideScreen); - return function () { - Object(_misc_util__WEBPACK_IMPORTED_MODULE_1__["off"])(window, 'resize', setSideScreen); - }; - }); - var sortedBreakpoints = Object(react__WEBPACK_IMPORTED_MODULE_0__["useMemo"])(function () { return Object.entries(breakpoints).sort(function (a, b) { return (a[1] >= b[1] ? 1 : -1); }); }, [breakpoints]); - var result = sortedBreakpoints.reduce(function (acc, _a) { - var name = _a[0], width = _a[1]; - if (screen >= width) { - return name; - } - else { - return acc; - } - }, sortedBreakpoints[0][0]); - return result; - }; -}; -/* harmony default export */ __webpack_exports__["default"] = (createBreakpoint); - - -/***/ }), - -/***/ "../node_modules/react-use/esm/factory/createGlobalState.js": -/*!******************************************************************!*\ - !*** ../node_modules/react-use/esm/factory/createGlobalState.js ***! - \******************************************************************/ -/*! exports provided: createGlobalState, default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createGlobalState", function() { return createGlobalState; }); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _misc_hookState__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../misc/hookState */ "../node_modules/react-use/esm/misc/hookState.js"); -/* harmony import */ var _useEffectOnce__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../useEffectOnce */ "../node_modules/react-use/esm/useEffectOnce.js"); -/* harmony import */ var _useIsomorphicLayoutEffect__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../useIsomorphicLayoutEffect */ "../node_modules/react-use/esm/useIsomorphicLayoutEffect.js"); - - - - -function createGlobalState(initialState) { - var store = { - state: initialState instanceof Function ? initialState() : initialState, - setState: function (nextState) { - store.state = Object(_misc_hookState__WEBPACK_IMPORTED_MODULE_1__["resolveHookState"])(nextState, store.state); - store.setters.forEach(function (setter) { return setter(store.state); }); - }, - setters: [], - }; - return function () { - var _a = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])(store.state), globalState = _a[0], stateSetter = _a[1]; - Object(_useEffectOnce__WEBPACK_IMPORTED_MODULE_2__["default"])(function () { return function () { - store.setters = store.setters.filter(function (setter) { return setter !== stateSetter; }); - }; }); - Object(_useIsomorphicLayoutEffect__WEBPACK_IMPORTED_MODULE_3__["default"])(function () { - if (!store.setters.includes(stateSetter)) { - store.setters.push(stateSetter); - } - }); - return [globalState, store.setState]; - }; -} -/* harmony default export */ __webpack_exports__["default"] = (createGlobalState); - - -/***/ }), - -/***/ "../node_modules/react-use/esm/factory/createHTMLMediaHook.js": -/*!********************************************************************!*\ - !*** ../node_modules/react-use/esm/factory/createHTMLMediaHook.js ***! - \********************************************************************/ -/*! exports provided: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return createHTMLMediaHook; }); -/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/react-use/node_modules/tslib/tslib.es6.js"); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _useSetState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../useSetState */ "../node_modules/react-use/esm/useSetState.js"); -/* harmony import */ var _misc_parseTimeRanges__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../misc/parseTimeRanges */ "../node_modules/react-use/esm/misc/parseTimeRanges.js"); - - - - - -function createHTMLMediaHook(tag) { - return function (elOrProps) { - var element; - var props; - if (react__WEBPACK_IMPORTED_MODULE_1__["isValidElement"](elOrProps)) { - element = elOrProps; - props = element.props; - } - else { - props = elOrProps; - } - var _a = Object(_useSetState__WEBPACK_IMPORTED_MODULE_2__["default"])({ - buffered: [], - time: 0, - duration: 0, - paused: true, - muted: false, - volume: 1, - playing: false, - }), state = _a[0], setState = _a[1]; - var ref = Object(react__WEBPACK_IMPORTED_MODULE_1__["useRef"])(null); - var wrapEvent = function (userEvent, proxyEvent) { - return function (event) { - try { - proxyEvent && proxyEvent(event); - } - finally { - userEvent && userEvent(event); - } - }; - }; - var onPlay = function () { return setState({ paused: false }); }; - var onPlaying = function () { return setState({ playing: true }); }; - var onWaiting = function () { return setState({ playing: false }); }; - var onPause = function () { return setState({ paused: true, playing: false }); }; - var onVolumeChange = function () { - var el = ref.current; - if (!el) { - return; - } - setState({ - muted: el.muted, - volume: el.volume, - }); - }; - var onDurationChange = function () { - var el = ref.current; - if (!el) { - return; - } - var duration = el.duration, buffered = el.buffered; - setState({ - duration: duration, - buffered: Object(_misc_parseTimeRanges__WEBPACK_IMPORTED_MODULE_3__["default"])(buffered), - }); - }; - var onTimeUpdate = function () { - var el = ref.current; - if (!el) { - return; - } - setState({ time: el.currentTime }); - }; - var onProgress = function () { - var el = ref.current; - if (!el) { - return; - } - setState({ buffered: Object(_misc_parseTimeRanges__WEBPACK_IMPORTED_MODULE_3__["default"])(el.buffered) }); - }; - if (element) { - element = react__WEBPACK_IMPORTED_MODULE_1__["cloneElement"](element, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ controls: false }, props), { ref: ref, onPlay: wrapEvent(props.onPlay, onPlay), onPlaying: wrapEvent(props.onPlaying, onPlaying), onWaiting: wrapEvent(props.onWaiting, onWaiting), onPause: wrapEvent(props.onPause, onPause), onVolumeChange: wrapEvent(props.onVolumeChange, onVolumeChange), onDurationChange: wrapEvent(props.onDurationChange, onDurationChange), onTimeUpdate: wrapEvent(props.onTimeUpdate, onTimeUpdate), onProgress: wrapEvent(props.onProgress, onProgress) })); - } - else { - element = react__WEBPACK_IMPORTED_MODULE_1__["createElement"](tag, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ controls: false }, props), { ref: ref, onPlay: wrapEvent(props.onPlay, onPlay), onPlaying: wrapEvent(props.onPlaying, onPlaying), onWaiting: wrapEvent(props.onWaiting, onWaiting), onPause: wrapEvent(props.onPause, onPause), onVolumeChange: wrapEvent(props.onVolumeChange, onVolumeChange), onDurationChange: wrapEvent(props.onDurationChange, onDurationChange), onTimeUpdate: wrapEvent(props.onTimeUpdate, onTimeUpdate), onProgress: wrapEvent(props.onProgress, onProgress) })); // TODO: fix this typing. - } - // Some browsers return `Promise` on `.play()` and may throw errors - // if one tries to execute another `.play()` or `.pause()` while that - // promise is resolving. So we prevent that with this lock. - // See: https://bugs.chromium.org/p/chromium/issues/detail?id=593273 - var lockPlay = false; - var controls = { - play: function () { - var el = ref.current; - if (!el) { - return undefined; - } - if (!lockPlay) { - var promise = el.play(); - var isPromise = typeof promise === 'object'; - if (isPromise) { - lockPlay = true; - var resetLock = function () { - lockPlay = false; - }; - promise.then(resetLock, resetLock); - } - return promise; - } - return undefined; - }, - pause: function () { - var el = ref.current; - if (el && !lockPlay) { - return el.pause(); - } - }, - seek: function (time) { - var el = ref.current; - if (!el || state.duration === undefined) { - return; - } - time = Math.min(state.duration, Math.max(0, time)); - el.currentTime = time; - }, - volume: function (volume) { - var el = ref.current; - if (!el) { - return; - } - volume = Math.min(1, Math.max(0, volume)); - el.volume = volume; - setState({ volume: volume }); - }, - mute: function () { - var el = ref.current; - if (!el) { - return; - } - el.muted = true; - }, - unmute: function () { - var el = ref.current; - if (!el) { - return; - } - el.muted = false; - }, - }; - Object(react__WEBPACK_IMPORTED_MODULE_1__["useEffect"])(function () { - var el = ref.current; - if (!el) { - if (true) { - if (tag === 'audio') { - console.error('useAudio() ref to