From ef982f3133fe64dee687c4eb8147b20530776d00 Mon Sep 17 00:00:00 2001 From: NeerajUnnikrishnan Date: Thu, 17 Dec 2020 19:26:58 +0530 Subject: [PATCH] Back-end fixes and coopyright information to self developed files for Web UI --- .../memory/ClusterMemoryManager.java | 4 +- .../queryeditorui/metadata/ColumnCache.java | 5 +++ .../metadata/PreviewTableCache.java | 5 +++ .../resources/TablesResource.java | 4 ++ .../store/history/LocalJobHistoryStore.java | 5 ++- .../server/ClusterStatsResource.java | 2 +- .../resources/webapp/dist/headerfooter.js | 10 ++--- .../resources/webapp/dist/hetuqueryeditor.js | 44 +++++++++---------- .../src/main/resources/webapp/dist/index.js | 24 +++++++--- .../src/main/resources/webapp/dist/nodes.js | 32 +++++++++----- .../main/resources/webapp/dist/overview.js | 20 ++++----- .../src/main/resources/webapp/nodes.html | 14 ++++++ .../resources/webapp/src/HeaderFooter.jsx | 14 ++++++ .../resources/webapp/src/NavigationMenu.jsx | 1 + .../main/resources/webapp/src/addcatalog.jsx | 1 + .../src/main/resources/webapp/src/nodes.jsx | 14 ++++++ .../webapp/src/overview/EchartPart.jsx | 14 ++++++ .../webapp/src/overview/NodesMain.jsx | 3 ++ .../webapp/src/overview/OverviewActions.js | 14 ++++++ .../webapp/src/overview/OverviewApiUtils.js | 14 ++++++ .../webapp/src/overview/OverviewStore.js | 14 ++++++ .../src/queryeditor/actions/CatalogActions.js | 1 + .../queryeditor/actions/CnxnMonitorActions.js | 1 + .../queryeditor/actions/ConnectorActions.js | 1 + .../src/queryeditor/actions/SchemaActions.js | 1 + .../src/queryeditor/components/AddCatalog.jsx | 1 + .../src/queryeditor/components/Footer.jsx | 1 + .../queryeditor/components/ModalDialog.jsx | 1 + .../src/queryeditor/components/SchemaTree.jsx | 1 + .../queryeditor/components/StatusFooter.jsx | 1 + .../queryeditor/stores/CnxnMonitorStore.js | 1 + .../src/queryeditor/stores/ConnectorStore.js | 1 + .../src/queryeditor/stores/SchemaStore.js | 1 + .../src/queryeditor/stores/TableStore.js | 4 -- .../src/queryeditor/utils/CatalogApiUtils.js | 1 + .../queryeditor/utils/ConnectorApiUtils.js | 1 + .../webapp/src/queryeditor/utils/xhrform.js | 1 + .../webapp/src/queryeditor/utils/xhrutil.js | 1 + 38 files changed, 216 insertions(+), 62 deletions(-) diff --git a/presto-main/src/main/java/io/prestosql/memory/ClusterMemoryManager.java b/presto-main/src/main/java/io/prestosql/memory/ClusterMemoryManager.java index b5ad65c26..e81de502c 100644 --- a/presto-main/src/main/java/io/prestosql/memory/ClusterMemoryManager.java +++ b/presto-main/src/main/java/io/prestosql/memory/ClusterMemoryManager.java @@ -583,8 +583,8 @@ public class ClusterMemoryManager { Map> memoryInfo = new HashMap<>(); for (Entry entry : nodes.entrySet()) { - // workerId is of the form "node_identifier [node_host]" - String workerId = entry.getKey() + " [" + entry.getValue().getNode().getHost() + "]"; + // workerId is of the form "node_identifier [node_host] isCoordinator" + String workerId = entry.getKey() + " [" + entry.getValue().getNode().getHost() + "] " + entry.getValue().getNode().isCoordinator(); memoryInfo.put(workerId, entry.getValue().getInfo()); } return memoryInfo; diff --git a/presto-main/src/main/java/io/prestosql/queryeditorui/metadata/ColumnCache.java b/presto-main/src/main/java/io/prestosql/queryeditorui/metadata/ColumnCache.java index 00931a6cb..769be6029 100644 --- a/presto-main/src/main/java/io/prestosql/queryeditorui/metadata/ColumnCache.java +++ b/presto-main/src/main/java/io/prestosql/queryeditorui/metadata/ColumnCache.java @@ -106,6 +106,11 @@ public class ColumnCache return cache.build(); } + public void refreshCache() + { + tableColumnCache.invalidateAll(); + } + public void populateCache(final String fqnTableName) { requireNonNull(fqnTableName, "fqnTableName is null"); diff --git a/presto-main/src/main/java/io/prestosql/queryeditorui/metadata/PreviewTableCache.java b/presto-main/src/main/java/io/prestosql/queryeditorui/metadata/PreviewTableCache.java index 6e61f739f..e35b9a3ba 100644 --- a/presto-main/src/main/java/io/prestosql/queryeditorui/metadata/PreviewTableCache.java +++ b/presto-main/src/main/java/io/prestosql/queryeditorui/metadata/PreviewTableCache.java @@ -107,6 +107,11 @@ public class PreviewTableCache return cache.build(); } + public void refreshCache() + { + previewTableCache.invalidateAll(); + } + public List> getPreview(final String schema, final String table) throws ExecutionException diff --git a/presto-main/src/main/java/io/prestosql/queryeditorui/resources/TablesResource.java b/presto-main/src/main/java/io/prestosql/queryeditorui/resources/TablesResource.java index ba73385fe..b9d38fdfe 100644 --- a/presto-main/src/main/java/io/prestosql/queryeditorui/resources/TablesResource.java +++ b/presto-main/src/main/java/io/prestosql/queryeditorui/resources/TablesResource.java @@ -130,6 +130,10 @@ public class TablesResource @QueryParam("force") boolean force) throws ExecutionException { + if (force) { + previewTableCache.refreshCache(); + columnCache.refreshCache(); + } dataCenterConnectorManager.loadAllDCCatalogs(); List catalogs = catalogManager.getCatalogs().stream().map(c -> c.getCatalogName()).collect(Collectors.toList()); final ImmutableList.Builder builder = ImmutableList.builder(); diff --git a/presto-main/src/main/java/io/prestosql/queryeditorui/store/history/LocalJobHistoryStore.java b/presto-main/src/main/java/io/prestosql/queryeditorui/store/history/LocalJobHistoryStore.java index 88b9d1de7..bf02258a7 100644 --- a/presto-main/src/main/java/io/prestosql/queryeditorui/store/history/LocalJobHistoryStore.java +++ b/presto-main/src/main/java/io/prestosql/queryeditorui/store/history/LocalJobHistoryStore.java @@ -21,6 +21,7 @@ import io.prestosql.queryeditorui.EvictingDeque; import io.prestosql.queryeditorui.protocol.Job; import io.prestosql.queryeditorui.protocol.Table; +import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.concurrent.LinkedBlockingDeque; @@ -86,12 +87,12 @@ public class LocalJobHistoryStore final ImmutableList.Builder builder = ImmutableList.builder(); long added = 0; - for (Job job : historyCache) { + for (Iterator job = historyCache.descendingIterator(); job.hasNext(); ) { if (added + 1 > maxResults) { break; } - builder.add(job); + builder.add(job.next()); added += 1; } diff --git a/presto-main/src/main/java/io/prestosql/server/ClusterStatsResource.java b/presto-main/src/main/java/io/prestosql/server/ClusterStatsResource.java index 6e78e3320..64a03c9b7 100644 --- a/presto-main/src/main/java/io/prestosql/server/ClusterStatsResource.java +++ b/presto-main/src/main/java/io/prestosql/server/ClusterStatsResource.java @@ -86,7 +86,7 @@ public class ClusterStatsResource if (query.getState() == QueryState.QUEUED) { queuedQueries++; } - else if (query.getState() == QueryState.RUNNING) { + else if (query.getState() == QueryState.RUNNING || query.getState() == QueryState.FINISHING) { if (query.getQueryStats().isFullyBlocked()) { blockedQueries++; } diff --git a/presto-main/src/main/resources/webapp/dist/headerfooter.js b/presto-main/src/main/resources/webapp/dist/headerfooter.js index 8092979d4..6f3c1001c 100644 --- a/presto-main/src/main/resources/webapp/dist/headerfooter.js +++ b/presto-main/src/main/resources/webapp/dist/headerfooter.js @@ -94,7 +94,7 @@ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactDom = __webpack_require__(/*! react-dom */ \"./node_modules/react-dom/index.js\");\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nvar _Header = __webpack_require__(/*! ./queryeditor/components/Header */ \"./queryeditor/components/Header.jsx\");\n\nvar _Header2 = _interopRequireDefault(_Header);\n\nvar _Footer = __webpack_require__(/*! ./queryeditor/components/Footer */ \"./queryeditor/components/Footer.jsx\");\n\nvar _Footer2 = _interopRequireDefault(_Footer);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n_reactDom2.default.render(_react2.default.createElement(\n \"div\",\n { className: \"flex flex-row flex-initial header\" },\n _react2.default.createElement(_Header2.default, null)\n), document.getElementById('page-header'));\n\n_reactDom2.default.render(_react2.default.createElement(\n \"div\",\n { className: \"flex flex-row flex-initial footer\" },\n _react2.default.createElement(_Footer2.default, null)\n), document.getElementById('page-footer'));\n\n//# sourceURL=webpack:///./HeaderFooter.jsx?"); +eval("\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactDom = __webpack_require__(/*! react-dom */ \"./node_modules/react-dom/index.js\");\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nvar _Header = __webpack_require__(/*! ./queryeditor/components/Header */ \"./queryeditor/components/Header.jsx\");\n\nvar _Header2 = _interopRequireDefault(_Header);\n\nvar _Footer = __webpack_require__(/*! ./queryeditor/components/Footer */ \"./queryeditor/components/Footer.jsx\");\n\nvar _Footer2 = _interopRequireDefault(_Footer);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n_reactDom2.default.render(_react2.default.createElement(\n \"div\",\n { className: \"flex flex-row flex-initial header\" },\n _react2.default.createElement(_Header2.default, null)\n), document.getElementById('page-header'));\n\n_reactDom2.default.render(_react2.default.createElement(\n \"div\",\n { className: \"flex flex-row flex-initial footer\" },\n _react2.default.createElement(_Footer2.default, null)\n), document.getElementById('page-footer'));\n\n//# sourceURL=webpack:///./HeaderFooter.jsx?"); /***/ }), @@ -354,7 +354,7 @@ eval("module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _alt = __webpack_require__(/*! ../alt */ \"./queryeditor/alt.js\");\n\nvar _alt2 = _interopRequireDefault(_alt);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar CnxnMonitorActions = function CnxnMonitorActions() {\n _classCallCheck(this, CnxnMonitorActions);\n\n this.generateActions('submitSuccess', 'submitFailed', 'pollingFailed', 'clear');\n};\n\nexports.default = _alt2.default.createActions(CnxnMonitorActions);\n\n//# sourceURL=webpack:///./queryeditor/actions/CnxnMonitorActions.js?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _alt = __webpack_require__(/*! ../alt */ \"./queryeditor/alt.js\");\n\nvar _alt2 = _interopRequireDefault(_alt);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } } /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar CnxnMonitorActions = function CnxnMonitorActions() {\n _classCallCheck(this, CnxnMonitorActions);\n\n this.generateActions('submitSuccess', 'submitFailed', 'pollingFailed', 'clear');\n};\n\nexports.default = _alt2.default.createActions(CnxnMonitorActions);\n\n//# sourceURL=webpack:///./queryeditor/actions/CnxnMonitorActions.js?"); /***/ }), @@ -402,7 +402,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar Footer = function (_React$Component) {\n _inherits(Footer, _React$Component);\n\n function Footer() {\n _classCallCheck(this, Footer);\n\n return _possibleConstructorReturn(this, (Footer.__proto__ || Object.getPrototypeOf(Footer)).apply(this, arguments));\n }\n\n _createClass(Footer, [{\n key: 'componentDidMount',\n value: function componentDidMount() {}\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n { className: 'flex footer' },\n _react2.default.createElement(\n 'div',\n { className: 'flex flex-initial' },\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { href: 'mailto:contact@openlookeng.io' },\n 'contact@openlookeng.io'\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'flex justify-flex-end' },\n _react2.default.createElement(\n 'div',\n { className: 'flex flex-initial' },\n _react2.default.createElement(\n 'p',\n null,\n 'Copyright \\xA9 2020 ',\n _react2.default.createElement(\n 'a',\n { href: \"https://openlookeng.io\", target: '_blank' },\n 'openLooKeng'\n ),\n '. All rights reserved'\n )\n )\n )\n );\n }\n }]);\n\n return Footer;\n}(_react2.default.Component);\n\nexports.default = Footer;\n\n//# sourceURL=webpack:///./queryeditor/components/Footer.jsx?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar Footer = function (_React$Component) {\n _inherits(Footer, _React$Component);\n\n function Footer() {\n _classCallCheck(this, Footer);\n\n return _possibleConstructorReturn(this, (Footer.__proto__ || Object.getPrototypeOf(Footer)).apply(this, arguments));\n }\n\n _createClass(Footer, [{\n key: 'componentDidMount',\n value: function componentDidMount() {}\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n { className: 'flex footer' },\n _react2.default.createElement(\n 'div',\n { className: 'flex flex-initial' },\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { href: 'mailto:contact@openlookeng.io' },\n 'contact@openlookeng.io'\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'flex justify-flex-end' },\n _react2.default.createElement(\n 'div',\n { className: 'flex flex-initial' },\n _react2.default.createElement(\n 'p',\n null,\n 'Copyright \\xA9 2020 ',\n _react2.default.createElement(\n 'a',\n { href: \"https://openlookeng.io\", target: '_blank' },\n 'openLooKeng'\n ),\n '. All rights reserved'\n )\n )\n )\n );\n }\n }]);\n\n return Footer;\n}(_react2.default.Component);\n\nexports.default = Footer;\n\n//# sourceURL=webpack:///./queryeditor/components/Footer.jsx?"); /***/ }), @@ -414,7 +414,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n}); /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _UserActions = __webpack_require__(/*! ../actions/UserActions */ \"./queryeditor/actions/UserActions.js\");\n\nvar _UserActions2 = _interopRequireDefault(_UserActions);\n\nvar _UserStore = __webpack_require__(/*! ../stores/UserStore */ \"./queryeditor/stores/UserStore.js\");\n\nvar _UserStore2 = _interopRequireDefault(_UserStore);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n// State actions\nfunction getStateFromStore() {\n return {\n user: _UserStore2.default.getCurrentUser()\n };\n}\n\nvar Header = function (_React$Component) {\n _inherits(Header, _React$Component);\n\n function Header(props) {\n _classCallCheck(this, Header);\n\n var _this = _possibleConstructorReturn(this, (Header.__proto__ || Object.getPrototypeOf(Header)).call(this, props));\n\n _this.state = getStateFromStore();\n _this._onChange = _this._onChange.bind(_this);\n return _this;\n }\n\n _createClass(Header, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n _UserStore2.default.listen(this._onChange);\n _UserActions2.default.fetchCurrentUser();\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n _UserStore2.default.unlisten(this._onChange);\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'header',\n { className: 'flex flex-row' },\n _react2.default.createElement(\n 'div',\n { className: 'flex' },\n _react2.default.createElement(\n 'a',\n { className: \"hetu-header-brand-name\", href: \"/\", style: { fontFamily: \"roboto!important\" } },\n _react2.default.createElement('img', { src: \"assets/lk-logos.svg\", alt: \"openLooKeng logo\", className: \"hetu-header-brand-name\" })\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'flex justify-flex-end menu' },\n _react2.default.createElement(\n 'div',\n { className: 'flex flex-initial' },\n _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement('i', { className: 'glyphicon glyphicon-user' }),\n this.state.user.name\n ),\n this.state.user.secure ? _react2.default.createElement(\n 'div',\n { className: 'logout' },\n _react2.default.createElement(\n 'form',\n { method: 'post', action: '../ui/api/logout' },\n _react2.default.createElement(\n 'button',\n { type: 'submit', className: 'btn btn-sm' },\n _react2.default.createElement('i', { className: 'fa fa-sign-out' }),\n 'Logout'\n )\n )\n ) : null\n )\n )\n );\n }\n\n /* Store events */\n\n }, {\n key: '_onChange',\n value: function _onChange() {\n this.setState(getStateFromStore());\n }\n }]);\n\n return Header;\n}(_react2.default.Component);\n\nexports.default = Header;\n\n//# sourceURL=webpack:///./queryeditor/components/Header.jsx?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _UserActions = __webpack_require__(/*! ../actions/UserActions */ \"./queryeditor/actions/UserActions.js\");\n\nvar _UserActions2 = _interopRequireDefault(_UserActions);\n\nvar _UserStore = __webpack_require__(/*! ../stores/UserStore */ \"./queryeditor/stores/UserStore.js\");\n\nvar _UserStore2 = _interopRequireDefault(_UserStore);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n// State actions\nfunction getStateFromStore() {\n return {\n user: _UserStore2.default.getCurrentUser()\n };\n}\n\nvar Header = function (_React$Component) {\n _inherits(Header, _React$Component);\n\n function Header(props) {\n _classCallCheck(this, Header);\n\n var _this = _possibleConstructorReturn(this, (Header.__proto__ || Object.getPrototypeOf(Header)).call(this, props));\n\n _this.state = {\n user: _UserStore2.default.getCurrentUser(),\n noConnection: false,\n lightShown: false,\n info: null,\n lastSuccess: Date.now(),\n modalShown: false,\n errorText: null\n };\n _this._onChange = _this._onChange.bind(_this);\n return _this;\n }\n\n _createClass(Header, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n _UserStore2.default.listen(this._onChange);\n _UserActions2.default.fetchCurrentUser();\n this.refreshLoop.bind(this)();\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n _UserStore2.default.unlisten(this._onChange);\n }\n }, {\n key: 'refreshLoop',\n value: function refreshLoop() {\n var _this2 = this;\n\n clearTimeout(this.timeoutId);\n fetch(\"../v1/info\").then(function (response) {\n return response.json();\n }).then(function (info) {\n _this2.setState({\n info: info,\n noConnection: false,\n lastSuccess: Date.now(),\n modalShown: false\n });\n _this2.resetTimer();\n }).catch(function (error) {\n _this2.setState({\n noConnection: true,\n lightShown: !_this2.state.lightShown,\n errorText: error\n });\n _this2.resetTimer();\n });\n }\n }, {\n key: 'resetTimer',\n value: function resetTimer() {\n clearTimeout(this.timeoutId);\n this.timeoutId = setTimeout(this.refreshLoop.bind(this), 1000);\n }\n }, {\n key: 'renderStatusLight',\n value: function renderStatusLight() {\n if (this.state.noConnection) {\n if (this.state.lightShown) {\n return _react2.default.createElement('span', { className: 'status-light status-light-red', id: 'status-indicator' });\n } else {\n return _react2.default.createElement('span', { className: 'status-light', id: 'status-indicator' });\n }\n }\n return _react2.default.createElement('span', { className: 'status-light status-light-green', id: 'status-indicator' });\n }\n }, {\n key: 'render',\n value: function render() {\n var info = this.state.info;\n return _react2.default.createElement(\n 'header',\n { className: 'flex flex-row' },\n _react2.default.createElement(\n 'div',\n { className: 'flex' },\n _react2.default.createElement(\n 'a',\n { className: \"hetu-header-brand-name\", href: \"/\", style: { fontFamily: \"roboto!important\" } },\n _react2.default.createElement('img', { src: \"assets/lk-logos.svg\", alt: \"openLooKeng logo\", className: \"hetu-header-brand-name\" })\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'flex justify-flex-end menu' },\n _react2.default.createElement(\n 'div',\n { className: 'flex flex-initial version' },\n _react2.default.createElement(\n 'div',\n { className: 'version-inner' },\n 'Version :',\n _react2.default.createElement(\n 'span',\n { className: 'uppercase' },\n info ? info.nodeVersion.version : 'null'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'version-inner' },\n 'Environment :',\n _react2.default.createElement(\n 'span',\n { className: 'uppercase' },\n info ? info.environment : 'null'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'version-inner' },\n _react2.default.createElement(\n 'span',\n null,\n 'Uptime'\n ),\n _react2.default.createElement(\n 'span',\n { 'data-toggle': 'tooltip', 'data-placement': 'bottom', title: 'Connection status' },\n this.renderStatusLight()\n ),\n _react2.default.createElement(\n 'span',\n { className: 'uppercase' },\n ': ',\n info ? info.uptime : '0s'\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'flex flex-initial' },\n _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement('i', { className: 'glyphicon glyphicon-user' }),\n this.state.user.name\n ),\n this.state.user.secure ? _react2.default.createElement(\n 'div',\n { className: 'logout' },\n _react2.default.createElement(\n 'form',\n { method: 'post', action: '../ui/api/logout' },\n _react2.default.createElement(\n 'button',\n { type: 'submit', className: 'btn btn-sm' },\n _react2.default.createElement('i', { className: 'fa fa-sign-out' }),\n 'Logout'\n )\n )\n ) : null\n )\n )\n );\n }\n\n /* Store events */\n\n }, {\n key: '_onChange',\n value: function _onChange() {\n this.setState(getStateFromStore());\n }\n }]);\n\n return Header;\n}(_react2.default.Component);\n\nexports.default = Header;\n\n//# sourceURL=webpack:///./queryeditor/components/Header.jsx?"); /***/ }), @@ -498,7 +498,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar getStatusText = exports.getStatusText = function getStatusText(response) {\n if (response.statusText != \"\") {\n return response.statusText;\n }\n switch (response.status) {\n case 200:\n {\n return \"OK\";\n }\n case 201:\n {\n return \"Created\";\n }\n case 202:\n {\n return \"Accepted\";\n }\n case 204:\n {\n return \"No Content\";\n }\n case 205:\n {\n return \"Reset Content\";\n }\n case 206:\n {\n return \"Partial Content\";\n }\n case 301:\n {\n return \"Moved Permanently\";\n }\n case 302:\n {\n return \"Found\";\n }\n case 303:\n {\n return \"See Other\";\n }\n case 304:\n {\n return \"Not Modified\";\n }\n case 305:\n {\n return \"Use Proxy\";\n }\n case 307:\n {\n return \"Temporary Redirect\";\n }\n case 400:\n {\n return \"Bad Request\";\n }\n case 401:\n {\n return \"Unauthorized\";\n }\n case 402:\n {\n return \"Payment Required\";\n }\n case 403:\n {\n return \"Forbidden\";\n }\n case 404:\n {\n return \"Not Found\";\n }\n case 405:\n {\n return \"Method Not Allowed\";\n }\n case 406:\n {\n return \"Not Acceptable\";\n }\n case 407:\n {\n return \"Proxy Authentication Required\";\n }\n case 408:\n {\n return \"Request Timeout\";\n }\n case 409:\n {\n return \"Conflict\";\n }\n case 410:\n {\n return \"Gone\";\n }\n case 411:\n {\n return \"Length Required\";\n }\n case 412:\n {\n return \"Precondition Failed\";\n }\n case 413:\n {\n return \"Request Entity Too Large\";\n }\n case 414:\n {\n return \"Request-URI Too Long\";\n }\n case 415:\n {\n return \"Unsupported Media Type\";\n }\n case 416:\n {\n return \"Requested Range Not Satisfiable\";\n }\n case 417:\n {\n return \"Expectation Failed\";\n }\n case 428:\n {\n return \"Precondition Required\";\n }\n case 429:\n {\n return \"Too Many Requests\";\n }\n case 431:\n {\n return \"Request Header Fields Too Large\";\n }\n case 500:\n {\n return \"Internal Server Error\";\n }\n case 501:\n {\n return \"Not Implemented\";\n }\n case 502:\n {\n return \"Bad Gateway\";\n }\n case 503:\n {\n return \"Service Unavailable\";\n }\n case 504:\n {\n return \"Gateway Timeout\";\n }\n case 505:\n {\n return \"HTTP Version Not Supported\";\n }\n case 511:\n {\n return \"Network Authentication Required\";\n }\n }\n};\n\n//# sourceURL=webpack:///./queryeditor/utils/xhrutil.js?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar getStatusText = exports.getStatusText = function getStatusText(response) {\n if (response.statusText != \"\") {\n return response.statusText;\n }\n switch (response.status) {\n case 200:\n {\n return \"OK\";\n }\n case 201:\n {\n return \"Created\";\n }\n case 202:\n {\n return \"Accepted\";\n }\n case 204:\n {\n return \"No Content\";\n }\n case 205:\n {\n return \"Reset Content\";\n }\n case 206:\n {\n return \"Partial Content\";\n }\n case 301:\n {\n return \"Moved Permanently\";\n }\n case 302:\n {\n return \"Found\";\n }\n case 303:\n {\n return \"See Other\";\n }\n case 304:\n {\n return \"Not Modified\";\n }\n case 305:\n {\n return \"Use Proxy\";\n }\n case 307:\n {\n return \"Temporary Redirect\";\n }\n case 400:\n {\n return \"Bad Request\";\n }\n case 401:\n {\n return \"Unauthorized\";\n }\n case 402:\n {\n return \"Payment Required\";\n }\n case 403:\n {\n return \"Forbidden\";\n }\n case 404:\n {\n return \"Not Found\";\n }\n case 405:\n {\n return \"Method Not Allowed\";\n }\n case 406:\n {\n return \"Not Acceptable\";\n }\n case 407:\n {\n return \"Proxy Authentication Required\";\n }\n case 408:\n {\n return \"Request Timeout\";\n }\n case 409:\n {\n return \"Conflict\";\n }\n case 410:\n {\n return \"Gone\";\n }\n case 411:\n {\n return \"Length Required\";\n }\n case 412:\n {\n return \"Precondition Failed\";\n }\n case 413:\n {\n return \"Request Entity Too Large\";\n }\n case 414:\n {\n return \"Request-URI Too Long\";\n }\n case 415:\n {\n return \"Unsupported Media Type\";\n }\n case 416:\n {\n return \"Requested Range Not Satisfiable\";\n }\n case 417:\n {\n return \"Expectation Failed\";\n }\n case 428:\n {\n return \"Precondition Required\";\n }\n case 429:\n {\n return \"Too Many Requests\";\n }\n case 431:\n {\n return \"Request Header Fields Too Large\";\n }\n case 500:\n {\n return \"Internal Server Error\";\n }\n case 501:\n {\n return \"Not Implemented\";\n }\n case 502:\n {\n return \"Bad Gateway\";\n }\n case 503:\n {\n return \"Service Unavailable\";\n }\n case 504:\n {\n return \"Gateway Timeout\";\n }\n case 505:\n {\n return \"HTTP Version Not Supported\";\n }\n case 511:\n {\n return \"Network Authentication Required\";\n }\n }\n};\n\n//# sourceURL=webpack:///./queryeditor/utils/xhrutil.js?"); /***/ }) diff --git a/presto-main/src/main/resources/webapp/dist/hetuqueryeditor.js b/presto-main/src/main/resources/webapp/dist/hetuqueryeditor.js index f3b480a1f..0f6e94494 100644 --- a/presto-main/src/main/resources/webapp/dist/hetuqueryeditor.js +++ b/presto-main/src/main/resources/webapp/dist/hetuqueryeditor.js @@ -94,7 +94,7 @@ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar NavigationMenu = function (_React$Component) {\n _inherits(NavigationMenu, _React$Component);\n\n function NavigationMenu(args) {\n _classCallCheck(this, NavigationMenu);\n\n return _possibleConstructorReturn(this, (NavigationMenu.__proto__ || Object.getPrototypeOf(NavigationMenu)).call(this, args));\n }\n\n _createClass(NavigationMenu, [{\n key: \"render\",\n value: function render() {\n return _react2.default.createElement(\n \"div\",\n { className: \"menu-left\" },\n _react2.default.createElement(\n \"ul\",\n null,\n _react2.default.createElement(\n \"li\",\n { className: this.props.active === 'queryeditor' ? \"active\" : \"\" },\n _react2.default.createElement(\n \"a\",\n { href: this.props.active === 'queryeditor' ? \"#\" : \"./queryeditor.html\" },\n _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\"i\", { className: \"fa fa-home\" })\n ),\n _react2.default.createElement(\n \"div\",\n null,\n \"Home\"\n )\n )\n ),\n _react2.default.createElement(\n \"li\",\n { className: this.props.active === 'metrics' ? \"active\" : \"\" },\n _react2.default.createElement(\n \"a\",\n { href: this.props.active === 'metrics' ? \"#\" : \"./overview.html\" },\n _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\"i\", { className: \"fa fa-line-chart\" })\n ),\n _react2.default.createElement(\n \"div\",\n null,\n \"Metrics\"\n )\n )\n ),\n _react2.default.createElement(\n \"li\",\n { className: this.props.active === 'nodes' ? \"active\" : \"\" },\n _react2.default.createElement(\n \"a\",\n { href: this.props.active === 'nodes' ? \"#\" : \"./nodes.html\" },\n _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\"i\", { className: \"fa fa-server\" })\n ),\n _react2.default.createElement(\n \"div\",\n null,\n \"Nodes\"\n )\n )\n ),\n _react2.default.createElement(\n \"li\",\n { className: this.props.active === 'queryhistory' ? \"active\" : \"\" },\n _react2.default.createElement(\n \"a\",\n { href: this.props.active === 'queryhistory' ? \"#\" : \"./queryhistory.html\" },\n _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\"i\", { className: \"fa fa-history\" })\n ),\n _react2.default.createElement(\n \"div\",\n null,\n \"Query History\"\n )\n )\n )\n )\n );\n }\n }]);\n\n return NavigationMenu;\n}(_react2.default.Component);\n\nexports.default = NavigationMenu;\n\n//# sourceURL=webpack:///./NavigationMenu.jsx?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar NavigationMenu = function (_React$Component) {\n _inherits(NavigationMenu, _React$Component);\n\n function NavigationMenu(args) {\n _classCallCheck(this, NavigationMenu);\n\n return _possibleConstructorReturn(this, (NavigationMenu.__proto__ || Object.getPrototypeOf(NavigationMenu)).call(this, args));\n }\n\n _createClass(NavigationMenu, [{\n key: \"render\",\n value: function render() {\n return _react2.default.createElement(\n \"div\",\n { className: \"menu-left\" },\n _react2.default.createElement(\n \"ul\",\n null,\n _react2.default.createElement(\n \"li\",\n { className: this.props.active === 'queryeditor' ? \"active\" : \"\" },\n _react2.default.createElement(\n \"a\",\n { href: this.props.active === 'queryeditor' ? \"#\" : \"./queryeditor.html\" },\n _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\"i\", { className: \"fa fa-home\" })\n ),\n _react2.default.createElement(\n \"div\",\n null,\n \"Home\"\n )\n )\n ),\n _react2.default.createElement(\n \"li\",\n { className: this.props.active === 'metrics' ? \"active\" : \"\" },\n _react2.default.createElement(\n \"a\",\n { href: this.props.active === 'metrics' ? \"#\" : \"./overview.html\" },\n _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\"i\", { className: \"fa fa-line-chart\" })\n ),\n _react2.default.createElement(\n \"div\",\n null,\n \"Metrics\"\n )\n )\n ),\n _react2.default.createElement(\n \"li\",\n { className: this.props.active === 'nodes' ? \"active\" : \"\" },\n _react2.default.createElement(\n \"a\",\n { href: this.props.active === 'nodes' ? \"#\" : \"./nodes.html\" },\n _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\"i\", { className: \"fa fa-server\" })\n ),\n _react2.default.createElement(\n \"div\",\n null,\n \"Nodes\"\n )\n )\n ),\n _react2.default.createElement(\n \"li\",\n { className: this.props.active === 'queryhistory' ? \"active\" : \"\" },\n _react2.default.createElement(\n \"a\",\n { href: this.props.active === 'queryhistory' ? \"#\" : \"./queryhistory.html\" },\n _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\"i\", { className: \"fa fa-history\" })\n ),\n _react2.default.createElement(\n \"div\",\n null,\n \"Query History\"\n )\n )\n )\n )\n );\n }\n }]);\n\n return NavigationMenu;\n}(_react2.default.Component);\n\nexports.default = NavigationMenu;\n\n//# sourceURL=webpack:///./NavigationMenu.jsx?"); /***/ }), @@ -106,7 +106,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n}); /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactDom = __webpack_require__(/*! react-dom */ \"./node_modules/react-dom/index.js\");\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nvar _AddCatalog = __webpack_require__(/*! ./queryeditor/components/AddCatalog.jsx */ \"./queryeditor/components/AddCatalog.jsx\");\n\nvar _AddCatalog2 = _interopRequireDefault(_AddCatalog);\n\nvar _ModalDialog = __webpack_require__(/*! ./queryeditor/components/ModalDialog */ \"./queryeditor/components/ModalDialog.jsx\");\n\nvar _ModalDialog2 = _interopRequireDefault(_ModalDialog);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar AddCatalogContainer = function (_React$Component) {\n _inherits(AddCatalogContainer, _React$Component);\n\n function AddCatalogContainer(props) {\n _classCallCheck(this, AddCatalogContainer);\n\n var _this = _possibleConstructorReturn(this, (AddCatalogContainer.__proto__ || Object.getPrototypeOf(AddCatalogContainer)).call(this));\n\n _this.state = {\n show: false\n };\n _this.showModal = _this.showModal.bind(_this);\n return _this;\n }\n\n _createClass(AddCatalogContainer, [{\n key: \"showModal\",\n value: function showModal(e) {\n var newState = this.state;\n newState.show = !this.state.show;\n this.setState(newState);\n }\n }, {\n key: \"render\",\n value: function render() {\n return _react2.default.createElement(\n \"div\",\n { style: this.props.style, className: this.props.className },\n _react2.default.createElement(\n \"button\",\n { className: \"btn btn-success btn-lg active addcatalog\", style: { margin: '10px' },\n onClick: this.showModal.bind(this) },\n \"Add Catalog\"\n ),\n _react2.default.createElement(\n _ModalDialog2.default,\n { onClose: this.showModal, header: \"Add Catalog\", footer: \"\",\n show: this.state.show },\n _react2.default.createElement(_AddCatalog2.default, { onClose: this.showModal.bind(this), refreshCallback: this.props.refreshCallback })\n )\n );\n }\n }]);\n\n return AddCatalogContainer;\n}(_react2.default.Component);\n\nexports.default = AddCatalogContainer;\n\n//# sourceURL=webpack:///./addcatalog.jsx?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactDom = __webpack_require__(/*! react-dom */ \"./node_modules/react-dom/index.js\");\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nvar _AddCatalog = __webpack_require__(/*! ./queryeditor/components/AddCatalog.jsx */ \"./queryeditor/components/AddCatalog.jsx\");\n\nvar _AddCatalog2 = _interopRequireDefault(_AddCatalog);\n\nvar _ModalDialog = __webpack_require__(/*! ./queryeditor/components/ModalDialog */ \"./queryeditor/components/ModalDialog.jsx\");\n\nvar _ModalDialog2 = _interopRequireDefault(_ModalDialog);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar AddCatalogContainer = function (_React$Component) {\n _inherits(AddCatalogContainer, _React$Component);\n\n function AddCatalogContainer(props) {\n _classCallCheck(this, AddCatalogContainer);\n\n var _this = _possibleConstructorReturn(this, (AddCatalogContainer.__proto__ || Object.getPrototypeOf(AddCatalogContainer)).call(this));\n\n _this.state = {\n show: false\n };\n _this.showModal = _this.showModal.bind(_this);\n return _this;\n }\n\n _createClass(AddCatalogContainer, [{\n key: \"showModal\",\n value: function showModal(e) {\n var newState = this.state;\n newState.show = !this.state.show;\n this.setState(newState);\n }\n }, {\n key: \"render\",\n value: function render() {\n return _react2.default.createElement(\n \"div\",\n { style: this.props.style, className: this.props.className },\n _react2.default.createElement(\n \"button\",\n { className: \"btn btn-success btn-lg active addcatalog\", style: { margin: '10px' },\n onClick: this.showModal.bind(this) },\n \"Add Catalog\"\n ),\n _react2.default.createElement(\n _ModalDialog2.default,\n { onClose: this.showModal, header: \"Add Catalog\", footer: \"\",\n show: this.state.show },\n _react2.default.createElement(_AddCatalog2.default, { onClose: this.showModal.bind(this), refreshCallback: this.props.refreshCallback })\n )\n );\n }\n }]);\n\n return AddCatalogContainer;\n}(_react2.default.Component);\n\nexports.default = AddCatalogContainer;\n\n//# sourceURL=webpack:///./addcatalog.jsx?"); /***/ }), @@ -28391,7 +28391,7 @@ eval("module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar _alt = __webpack_require__(/*! ../alt */ \"./queryeditor/alt.js\");\n\nvar _alt2 = _interopRequireDefault(_alt);\n\nvar _CatalogApiUtils = __webpack_require__(/*! ../utils/CatalogApiUtils */ \"./queryeditor/utils/CatalogApiUtils.js\");\n\nvar _CatalogApiUtils2 = _interopRequireDefault(_CatalogApiUtils);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar CatalogActions = function () {\n function CatalogActions() {\n _classCallCheck(this, CatalogActions);\n }\n\n _createClass(CatalogActions, [{\n key: \"addCatalog\",\n value: function addCatalog(formData) {\n return _CatalogApiUtils2.default.addCatalog(formData).then(function () {\n return {\n result: true,\n message: \"Success\"\n };\n }).catch(function (error) {\n return {\n result: false,\n message: error.message\n };\n });\n }\n }]);\n\n return CatalogActions;\n}();\n\nexports.default = _alt2.default.createActions(CatalogActions);\n\n//# sourceURL=webpack:///./queryeditor/actions/CatalogActions.js?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar _alt = __webpack_require__(/*! ../alt */ \"./queryeditor/alt.js\");\n\nvar _alt2 = _interopRequireDefault(_alt);\n\nvar _CatalogApiUtils = __webpack_require__(/*! ../utils/CatalogApiUtils */ \"./queryeditor/utils/CatalogApiUtils.js\");\n\nvar _CatalogApiUtils2 = _interopRequireDefault(_CatalogApiUtils);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar CatalogActions = function () {\n function CatalogActions() {\n _classCallCheck(this, CatalogActions);\n }\n\n _createClass(CatalogActions, [{\n key: \"addCatalog\",\n value: function addCatalog(formData) {\n return _CatalogApiUtils2.default.addCatalog(formData).then(function () {\n return {\n result: true,\n message: \"Success\"\n };\n }).catch(function (error) {\n return {\n result: false,\n message: error.message\n };\n });\n }\n }]);\n\n return CatalogActions;\n}();\n\nexports.default = _alt2.default.createActions(CatalogActions);\n\n//# sourceURL=webpack:///./queryeditor/actions/CatalogActions.js?"); /***/ }), @@ -28403,7 +28403,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n}); /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _alt = __webpack_require__(/*! ../alt */ \"./queryeditor/alt.js\");\n\nvar _alt2 = _interopRequireDefault(_alt);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar CnxnMonitorActions = function CnxnMonitorActions() {\n _classCallCheck(this, CnxnMonitorActions);\n\n this.generateActions('submitSuccess', 'submitFailed', 'pollingFailed', 'clear');\n};\n\nexports.default = _alt2.default.createActions(CnxnMonitorActions);\n\n//# sourceURL=webpack:///./queryeditor/actions/CnxnMonitorActions.js?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _alt = __webpack_require__(/*! ../alt */ \"./queryeditor/alt.js\");\n\nvar _alt2 = _interopRequireDefault(_alt);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } } /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar CnxnMonitorActions = function CnxnMonitorActions() {\n _classCallCheck(this, CnxnMonitorActions);\n\n this.generateActions('submitSuccess', 'submitFailed', 'pollingFailed', 'clear');\n};\n\nexports.default = _alt2.default.createActions(CnxnMonitorActions);\n\n//# sourceURL=webpack:///./queryeditor/actions/CnxnMonitorActions.js?"); /***/ }), @@ -28415,7 +28415,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n}); /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar _alt = __webpack_require__(/*! ../alt */ \"./queryeditor/alt.js\");\n\nvar _alt2 = _interopRequireDefault(_alt);\n\nvar _ConnectorApiUtils = __webpack_require__(/*! ../utils/ConnectorApiUtils */ \"./queryeditor/utils/ConnectorApiUtils.js\");\n\nvar _ConnectorApiUtils2 = _interopRequireDefault(_ConnectorApiUtils);\n\nvar _logError = __webpack_require__(/*! ../utils/logError */ \"./queryeditor/utils/logError.js\");\n\nvar _logError2 = _interopRequireDefault(_logError);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar ConnectorActions = function () {\n function ConnectorActions() {\n _classCallCheck(this, ConnectorActions);\n\n this.generateActions('receivedConnector', 'receivedConnectors');\n }\n\n _createClass(ConnectorActions, [{\n key: 'fetchSupportedConnectors',\n value: function fetchSupportedConnectors() {\n var _this = this;\n\n _ConnectorApiUtils2.default.fetchSupportedConnectors().then(function (results) {\n _this.actions.receivedConnectors(results);\n }).catch(_logError2.default);\n }\n }]);\n\n return ConnectorActions;\n}();\n\nexports.default = _alt2.default.createActions(ConnectorActions);\n\n//# sourceURL=webpack:///./queryeditor/actions/ConnectorActions.js?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar _alt = __webpack_require__(/*! ../alt */ \"./queryeditor/alt.js\");\n\nvar _alt2 = _interopRequireDefault(_alt);\n\nvar _ConnectorApiUtils = __webpack_require__(/*! ../utils/ConnectorApiUtils */ \"./queryeditor/utils/ConnectorApiUtils.js\");\n\nvar _ConnectorApiUtils2 = _interopRequireDefault(_ConnectorApiUtils);\n\nvar _logError = __webpack_require__(/*! ../utils/logError */ \"./queryeditor/utils/logError.js\");\n\nvar _logError2 = _interopRequireDefault(_logError);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar ConnectorActions = function () {\n function ConnectorActions() {\n _classCallCheck(this, ConnectorActions);\n\n this.generateActions('receivedConnector', 'receivedConnectors');\n }\n\n _createClass(ConnectorActions, [{\n key: 'fetchSupportedConnectors',\n value: function fetchSupportedConnectors() {\n var _this = this;\n\n _ConnectorApiUtils2.default.fetchSupportedConnectors().then(function (results) {\n _this.actions.receivedConnectors(results);\n }).catch(_logError2.default);\n }\n }]);\n\n return ConnectorActions;\n}();\n\nexports.default = _alt2.default.createActions(ConnectorActions);\n\n//# sourceURL=webpack:///./queryeditor/actions/ConnectorActions.js?"); /***/ }), @@ -28463,7 +28463,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.dataType = undefined;\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar _alt = __webpack_require__(/*! ../alt */ \"./queryeditor/alt.js\");\n\nvar _alt2 = _interopRequireDefault(_alt);\n\nvar _xhr = __webpack_require__(/*! ../utils/xhr */ \"./queryeditor/utils/xhr.js\");\n\nvar _xhr2 = _interopRequireDefault(_xhr);\n\nvar _lodash = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n\nvar _lodash2 = _interopRequireDefault(_lodash);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar dataType = exports.dataType = {\n ROOT: \"ROOT\",\n CATALOG: \"CATALOG\",\n SCHEMA: \"SCHEMA\",\n TABLE: \"TABLE\"\n};\n\nvar SchemaActions = function () {\n function SchemaActions() {\n _classCallCheck(this, SchemaActions);\n\n this.generateActions('updateSchemas', 'updateTables');\n }\n\n _createClass(SchemaActions, [{\n key: \"fetchSchemas\",\n value: function fetchSchemas(catalogs) {\n var _this = this;\n\n var refresh = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n return (0, _xhr2.default)(\"../api/table/schemas?force=\" + refresh).then(function (data) {\n if (refresh) {\n catalogs = [];\n }\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = data.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var _ref = _step.value;\n\n var _ref2 = _slicedToArray(_ref, 2);\n\n var index = _ref2[0];\n var entry = _ref2[1];\n\n var catalog = _lodash2.default.find(catalogs, { name: entry.catalogName });\n if (_lodash2.default.isUndefined(catalog)) {\n catalog = {\n name: entry.catalogName,\n type: dataType.CATALOG,\n fqn: \"schematree-catalog.\" + entry.catalogName,\n children: []\n };\n catalogs.push(catalog);\n }\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n for (var _iterator2 = entry.schemas.entries()[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n var _ref3 = _step2.value;\n\n var _ref4 = _slicedToArray(_ref3, 2);\n\n var index2 = _ref4[0];\n var _schemaName = _ref4[1];\n\n var schemas = catalog.children;\n var schema = _lodash2.default.find(schemas, { name: _schemaName });\n if (_lodash2.default.isUndefined(schema)) {\n schema = {\n name: _schemaName,\n type: dataType.SCHEMA,\n catalog: catalog.name,\n fqn: \"schematree-schema.\" + catalog.name + \".\" + _schemaName,\n children: []\n };\n schemas.push(schema);\n }\n }\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n\n if (!refresh) {\n //Remove deleted schemas\n //Reverse iterate and mutate array by index.\n var existingSchemas = catalog.children;\n var schemaIndex = existingSchemas.length - 1;\n while (schemaIndex >= 0) {\n var currentSchema = existingSchemas[schemaIndex];\n var fetchedSchema = entry.schemas.indexOf(currentSchema.name);\n if (_lodash2.default.isUndefined(fetchedSchema) || fetchedSchema < 0) {\n existingSchemas.splice(schemaIndex, 1);\n }\n schemaIndex -= 1;\n }\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n if (!refresh) {\n //Remove removed catalogs\n //Reverse iterate and mutate array by index.\n var _index = catalogs.length - 1;\n while (_index >= 0) {\n var currentCatalog = catalogs[_index];\n var fetchedCatalog = _lodash2.default.find(data, { catalogName: currentCatalog.name });\n if (_lodash2.default.isUndefined(fetchedCatalog)) {\n catalogs.splice(_index, 1);\n }\n _index -= 1;\n }\n }\n return catalogs;\n }).then(function (catalogs) {\n _this.actions.updateSchemas(catalogs);\n return catalogs;\n });\n }\n }, {\n key: \"fetchTables\",\n value: function fetchTables(catalogs) {\n var _this2 = this;\n\n return (0, _xhr2.default)(\"../api/table\").then(function (data) {\n var _iteratorNormalCompletion3 = true;\n var _didIteratorError3 = false;\n var _iteratorError3 = undefined;\n\n try {\n for (var _iterator3 = data.entries()[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {\n var _ref5 = _step3.value;\n\n var _ref6 = _slicedToArray(_ref5, 2);\n\n var index = _ref6[0];\n var entry = _ref6[1];\n\n var catalog = _lodash2.default.find(catalogs, { name: entry.connectorId });\n if (_lodash2.default.isUndefined(catalog)) {\n catalog = {\n name: entry.connectorId,\n type: dataType.CATALOG,\n fqn: \"schematree-catalog.\" + entry.catalogName,\n children: []\n };\n catalogs.push(catalog);\n }\n var schemas = catalog.children;\n var schema = _lodash2.default.find(schemas, { name: entry.schema });\n if (_lodash2.default.isUndefined(schema)) {\n schema = {\n name: entry.schema,\n type: dataType.SCHEMA,\n catalog: entry.connectorId,\n fqn: \"schematree-schema.\" + catalog.name + \".\" + schemaName,\n children: []\n };\n schemas.push(schema);\n }\n var tables = schema.children;\n var table = _lodash2.default.find(tables, { name: entry.table });\n if (_lodash2.default.isUndefined(table)) {\n table = {\n name: entry.table,\n type: dataType.TABLE,\n catalog: entry.connectorId,\n schema: entry.schema,\n fqn: entry.fqn\n };\n tables.push(table);\n }\n }\n } catch (err) {\n _didIteratorError3 = true;\n _iteratorError3 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion3 && _iterator3.return) {\n _iterator3.return();\n }\n } finally {\n if (_didIteratorError3) {\n throw _iteratorError3;\n }\n }\n }\n\n catalogs.forEach(function (catalog, index, catalogsArray) {\n catalog.children.forEach(function (schema, schemaIndex, schemasArray) {\n //Remove deleted tables\n //Reverse iterate and mutate array by index.\n var existingTables = schema.children;\n var tableIndex = existingTables.length - 1;\n while (tableIndex >= 0) {\n var currentTable = existingTables[tableIndex];\n var fetchedTable = _lodash2.default.find(data, { connectorId: catalog.name, schema: schema.name, table: currentTable.name });\n if (_lodash2.default.isUndefined(fetchedTable)) {\n existingTables.splice(tableIndex, 1);\n }\n tableIndex -= 1;\n }\n });\n });\n return catalogs;\n }).then(function (catalogs) {\n _this2.actions.updateTables(catalogs);\n return catalogs;\n });\n }\n }]);\n\n return SchemaActions;\n}();\n\nexports.default = _alt2.default.createActions(SchemaActions);\n\n//# sourceURL=webpack:///./queryeditor/actions/SchemaActions.js?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.dataType = undefined;\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar _alt = __webpack_require__(/*! ../alt */ \"./queryeditor/alt.js\");\n\nvar _alt2 = _interopRequireDefault(_alt);\n\nvar _xhr = __webpack_require__(/*! ../utils/xhr */ \"./queryeditor/utils/xhr.js\");\n\nvar _xhr2 = _interopRequireDefault(_xhr);\n\nvar _lodash = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n\nvar _lodash2 = _interopRequireDefault(_lodash);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar dataType = exports.dataType = {\n ROOT: \"ROOT\",\n CATALOG: \"CATALOG\",\n SCHEMA: \"SCHEMA\",\n TABLE: \"TABLE\"\n};\n\nvar SchemaActions = function () {\n function SchemaActions() {\n _classCallCheck(this, SchemaActions);\n\n this.generateActions('updateSchemas', 'updateTables');\n }\n\n _createClass(SchemaActions, [{\n key: \"deleteCatalog\",\n value: function deleteCatalog(catalogName) {\n return (0, _xhr2.default)(\"../v1/catalog/\" + catalogName).then(function () {\n return {\n result: true,\n message: \"Success\"\n };\n }).catch(function (error) {\n return {\n result: false,\n message: error.message\n };\n });\n }\n }, {\n key: \"fetchSchemas\",\n value: function fetchSchemas(catalogs) {\n var _this = this;\n\n var refresh = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n return (0, _xhr2.default)(\"../api/table/schemas?force=\" + refresh).then(function (data) {\n if (refresh) {\n catalogs = [];\n }\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = data.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var _ref = _step.value;\n\n var _ref2 = _slicedToArray(_ref, 2);\n\n var index = _ref2[0];\n var entry = _ref2[1];\n\n var catalog = _lodash2.default.find(catalogs, { name: entry.catalogName });\n if (_lodash2.default.isUndefined(catalog)) {\n catalog = {\n name: entry.catalogName,\n type: dataType.CATALOG,\n fqn: \"schematree-catalog.\" + entry.catalogName,\n children: []\n };\n catalogs.push(catalog);\n }\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n for (var _iterator2 = entry.schemas.entries()[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n var _ref3 = _step2.value;\n\n var _ref4 = _slicedToArray(_ref3, 2);\n\n var index2 = _ref4[0];\n var _schemaName = _ref4[1];\n\n var schemas = catalog.children;\n var schema = _lodash2.default.find(schemas, { name: _schemaName });\n if (_lodash2.default.isUndefined(schema)) {\n schema = {\n name: _schemaName,\n type: dataType.SCHEMA,\n catalog: catalog.name,\n fqn: \"schematree-schema.\" + catalog.name + \".\" + _schemaName,\n children: []\n };\n schemas.push(schema);\n }\n }\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n\n if (!refresh) {\n //Remove deleted schemas\n //Reverse iterate and mutate array by index.\n var existingSchemas = catalog.children;\n var schemaIndex = existingSchemas.length - 1;\n while (schemaIndex >= 0) {\n var currentSchema = existingSchemas[schemaIndex];\n var fetchedSchema = entry.schemas.indexOf(currentSchema.name);\n if (_lodash2.default.isUndefined(fetchedSchema) || fetchedSchema < 0) {\n existingSchemas.splice(schemaIndex, 1);\n }\n schemaIndex -= 1;\n }\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n if (!refresh) {\n //Remove removed catalogs\n //Reverse iterate and mutate array by index.\n var _index = catalogs.length - 1;\n while (_index >= 0) {\n var currentCatalog = catalogs[_index];\n var fetchedCatalog = _lodash2.default.find(data, { catalogName: currentCatalog.name });\n if (_lodash2.default.isUndefined(fetchedCatalog)) {\n catalogs.splice(_index, 1);\n }\n _index -= 1;\n }\n }\n return catalogs;\n }).then(function (catalogs) {\n _this.actions.updateSchemas(catalogs);\n return catalogs;\n });\n }\n }, {\n key: \"fetchTables\",\n value: function fetchTables(catalogs) {\n var _this2 = this;\n\n return (0, _xhr2.default)(\"../api/table\").then(function (data) {\n var _iteratorNormalCompletion3 = true;\n var _didIteratorError3 = false;\n var _iteratorError3 = undefined;\n\n try {\n for (var _iterator3 = data.entries()[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {\n var _ref5 = _step3.value;\n\n var _ref6 = _slicedToArray(_ref5, 2);\n\n var index = _ref6[0];\n var entry = _ref6[1];\n\n var catalog = _lodash2.default.find(catalogs, { name: entry.connectorId });\n if (_lodash2.default.isUndefined(catalog)) {\n catalog = {\n name: entry.connectorId,\n type: dataType.CATALOG,\n fqn: \"schematree-catalog.\" + entry.catalogName,\n children: []\n };\n catalogs.push(catalog);\n }\n var schemas = catalog.children;\n var schema = _lodash2.default.find(schemas, { name: entry.schema });\n if (_lodash2.default.isUndefined(schema)) {\n schema = {\n name: entry.schema,\n type: dataType.SCHEMA,\n catalog: entry.connectorId,\n fqn: \"schematree-schema.\" + catalog.name + \".\" + schemaName,\n children: []\n };\n schemas.push(schema);\n }\n var tables = schema.children;\n var table = _lodash2.default.find(tables, { name: entry.table });\n if (_lodash2.default.isUndefined(table)) {\n table = {\n name: entry.table,\n type: dataType.TABLE,\n catalog: entry.connectorId,\n schema: entry.schema,\n fqn: entry.fqn\n };\n tables.push(table);\n }\n }\n } catch (err) {\n _didIteratorError3 = true;\n _iteratorError3 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion3 && _iterator3.return) {\n _iterator3.return();\n }\n } finally {\n if (_didIteratorError3) {\n throw _iteratorError3;\n }\n }\n }\n\n catalogs.forEach(function (catalog, index, catalogsArray) {\n catalog.children.forEach(function (schema, schemaIndex, schemasArray) {\n //Remove deleted tables\n //Reverse iterate and mutate array by index.\n var existingTables = schema.children;\n var tableIndex = existingTables.length - 1;\n while (tableIndex >= 0) {\n var currentTable = existingTables[tableIndex];\n var fetchedTable = _lodash2.default.find(data, { connectorId: catalog.name, schema: schema.name, table: currentTable.name });\n if (_lodash2.default.isUndefined(fetchedTable)) {\n existingTables.splice(tableIndex, 1);\n }\n tableIndex -= 1;\n }\n });\n });\n return catalogs;\n }).then(function (catalogs) {\n _this2.actions.updateTables(catalogs);\n return catalogs;\n });\n }\n }]);\n\n return SchemaActions;\n}();\n\nexports.default = _alt2.default.createActions(SchemaActions);\n\n//# sourceURL=webpack:///./queryeditor/actions/SchemaActions.js?"); /***/ }), @@ -28523,7 +28523,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactBootstrap = __webpack_require__(/*! react-bootstrap */ \"./node_modules/react-bootstrap/esm/index.js\");\n\nvar _FormFileInput = __webpack_require__(/*! react-bootstrap/FormFileInput */ \"./node_modules/react-bootstrap/esm/FormFileInput.js\");\n\nvar _FormFileInput2 = _interopRequireDefault(_FormFileInput);\n\nvar _Row = __webpack_require__(/*! react-bootstrap/Row */ \"./node_modules/react-bootstrap/esm/Row.js\");\n\nvar _Row2 = _interopRequireDefault(_Row);\n\nvar _Alert = __webpack_require__(/*! react-bootstrap/Alert */ \"./node_modules/react-bootstrap/esm/Alert.js\");\n\nvar _CatalogActions = __webpack_require__(/*! ../actions/CatalogActions */ \"./queryeditor/actions/CatalogActions.js\");\n\nvar _CatalogActions2 = _interopRequireDefault(_CatalogActions);\n\nvar _ConnectorActions = __webpack_require__(/*! ../actions/ConnectorActions */ \"./queryeditor/actions/ConnectorActions.js\");\n\nvar _ConnectorActions2 = _interopRequireDefault(_ConnectorActions);\n\nvar _ConnectorStore = __webpack_require__(/*! ../stores/ConnectorStore */ \"./queryeditor/stores/ConnectorStore.js\");\n\nvar _ConnectorStore2 = _interopRequireDefault(_ConnectorStore);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nfunction getStateFromStore() {\n return {\n supportedConnectors: _ConnectorStore2.default.getCollection().all({\n sort: true\n })\n };\n}\n\nvar AddCatalog = function (_React$Component) {\n _inherits(AddCatalog, _React$Component);\n\n function AddCatalog(props) {\n _classCallCheck(this, AddCatalog);\n\n var _this = _possibleConstructorReturn(this, (AddCatalog.__proto__ || Object.getPrototypeOf(AddCatalog)).call(this, props));\n\n _this.state = _this.getInitialState();\n _this.handleSubmit = _this.handleSubmit.bind(_this);\n _this.handleClose = _this.handleClose.bind(_this);\n _this.handleChange = _this.handleChange.bind(_this);\n _this.addProperty = _this.addProperty.bind(_this);\n _this.addConfiguration = _this.addConfiguration.bind(_this);\n _this.handleValidation = _this.handleValidation.bind(_this);\n _this._fetchConnectors = _this._fetchConnectors.bind(_this);\n _this._onChange = _this._onChange.bind(_this);\n return _this;\n }\n\n _createClass(AddCatalog, [{\n key: \"getInitialErrors\",\n value: function getInitialErrors() {\n return {\n catalogProperties: [],\n catalogConfigProperties: [],\n globalConfigProperties: []\n };\n }\n }, {\n key: \"getInitialState\",\n value: function getInitialState() {\n return {\n supportedConnectors: _ConnectorStore2.default.getCollection().all({\n sort: true\n }),\n catalogName: \"\",\n connectorName: \"\",\n selectedConnector: \"\",\n catalogAreaProperties: \"\",\n catalogProperties: [],\n catalogConfigProperties: [],\n globalConfigProperties: [],\n errors: this.getInitialErrors()\n };\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n _ConnectorStore2.default.listen(this._onChange);\n this._fetchConnectors();\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n _ConnectorStore2.default.unlisten(this._onChange);\n }\n }, {\n key: \"_fetchConnectors\",\n value: function _fetchConnectors() {\n _ConnectorActions2.default.fetchSupportedConnectors();\n }\n }, {\n key: \"_onChange\",\n value: function _onChange() {\n this.setState(getStateFromStore());\n }\n }, {\n key: \"handleValidation\",\n value: function handleValidation() {\n var state = this.state;\n var errors = {\n catalogProperties: [],\n catalogConfigProperties: [],\n globalConfigProperties: []\n };\n var error = false;\n state.catalogName = state.catalogName.trim();\n if (state.catalogName == \"\") {\n errors.catalogName = \"Catalog Name cannot be empty\";\n error = true;\n } else if (!state.catalogName.match(\"^([A-Za-z]+)([A-Za-z0-9_]*)([A-Za-z0-9]+)$\")) {\n errors.catalogName = \"Catalog name must contain only alphanumeric and/or underscore(s). Must start with alphabet and end with alphanumeric character\";\n error = true;\n }\n\n if (state.connectorName.trim() == \"\" || state.connectorName == \"placeholder\") {\n errors.connectorName = \"Select a connector\";\n error = true;\n }\n\n if (state.catalogProperties.length > 0) {\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = state.catalogProperties.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var _ref = _step.value;\n\n var _ref2 = _slicedToArray(_ref, 2);\n\n var index = _ref2[0];\n var entry = _ref2[1];\n\n var name = entry[\"name\"];\n var value = entry[\"value\"];\n name = name == undefined ? name : name.trim();\n value = value == undefined ? value : value.trim();\n\n if (name == \"\" || value == \"\") {\n errors.catalogProperties.push(\"Property name and value cannot be empty\");\n error = true;\n } else if (entry[\"type\"] === \"files\") {\n (function () {\n var missedFiles = [];\n var files = value.toString().split(\",\");\n files.forEach(function (file, index, files) {\n var found = false;\n Array.from(state.catalogConfigProperties).map(function (config) {\n if (config != undefined && config != null && config.name == file) {\n found = true;\n }\n });\n if (found) {\n return;\n }\n Array.from(state.globalConfigProperties).map(function (config) {\n if (config != undefined && config != null && config.name == file) {\n found = true;\n }\n });\n if (!found) {\n missedFiles.push(file);\n }\n });\n if (missedFiles.length > 0) {\n error = true;\n errors.catalogProperties.push(\"Following files needs to be uploaded: [\" + missedFiles.toString() + \"]\");\n } else {\n errors.catalogProperties.push(\"\");\n }\n })();\n } else {\n errors.catalogProperties.push(\"\");\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n }\n if (state.catalogConfigProperties.length > 0) {\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n for (var _iterator2 = state.catalogConfigProperties.entries()[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n var _ref3 = _step2.value;\n\n var _ref4 = _slicedToArray(_ref3, 2);\n\n var _index = _ref4[0];\n var _entry = _ref4[1];\n\n if (_entry === undefined || _entry === null || _entry == {}) {\n errors.catalogConfigProperties.push(\"Specify catalog configuration file!!\");\n error = true;\n } else {\n errors.catalogConfigProperties.push(\"\");\n }\n }\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n }\n if (state.globalConfigProperties.length > 0) {\n var _iteratorNormalCompletion3 = true;\n var _didIteratorError3 = false;\n var _iteratorError3 = undefined;\n\n try {\n for (var _iterator3 = state.globalConfigProperties.entries()[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {\n var _ref5 = _step3.value;\n\n var _ref6 = _slicedToArray(_ref5, 2);\n\n var _index2 = _ref6[0];\n var _entry2 = _ref6[1];\n\n if (_entry2 === undefined || _entry2 === null || _entry2 == {}) {\n errors.globalConfigProperties.push(\"Specify Global configuration file!!\");\n error = true;\n } else {\n errors.globalConfigProperties.push(\"\");\n }\n }\n } catch (err) {\n _didIteratorError3 = true;\n _iteratorError3 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion3 && _iterator3.return) {\n _iterator3.return();\n }\n } finally {\n if (_didIteratorError3) {\n throw _iteratorError3;\n }\n }\n }\n }\n state.errors = errors;\n this.setState(state);\n return !error;\n }\n }, {\n key: \"handleChange\",\n value: function handleChange(e) {\n var newState = this.state;\n if ([\"catalogName\"].includes(e.target.name)) {\n newState.catalogName = e.target.value.toString().trim().toLowerCase();\n if (newState.catalogName != \"\" && newState.errors[\"catalogName\"] != \"\") {\n newState.errors.catalogName = \"\";\n }\n } else if ([\"connectorName\"].includes(e.target.name)) {\n newState.connectorName = e.target.value;\n newState.catalogProperties.splice(0, newState.catalogProperties.length);\n if (newState.connectorName != \"\" && newState.connectorName != \"placeholder\" && newState.errors[\"connectorName\"] != undefined && newState.errors[\"connectorName\"] != \"\") {\n newState.errors.connectorName = \"\";\n }\n var _iteratorNormalCompletion4 = true;\n var _didIteratorError4 = false;\n var _iteratorError4 = undefined;\n\n try {\n for (var _iterator4 = newState.supportedConnectors[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {\n var eachVal = _step4.value;\n\n if (eachVal.connectorWithProperties.connectorName === newState.connectorName) {\n newState.selectedConnector = eachVal;\n newState.errors.catalogProperties = [];\n if (eachVal.connectorWithProperties.propertiesEnabled) {\n var _iteratorNormalCompletion5 = true;\n var _didIteratorError5 = false;\n var _iteratorError5 = undefined;\n\n try {\n for (var _iterator5 = Object.entries(eachVal.connectorWithProperties.properties)[Symbol.iterator](), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) {\n var _ref7 = _step5.value;\n\n var _ref8 = _slicedToArray(_ref7, 2);\n\n var index = _ref8[0];\n var value = _ref8[1];\n\n newState.catalogProperties.push(value);\n newState.errors.catalogProperties.push(\"\");\n }\n } catch (err) {\n _didIteratorError5 = true;\n _iteratorError5 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion5 && _iterator5.return) {\n _iterator5.return();\n }\n } finally {\n if (_didIteratorError5) {\n throw _iteratorError5;\n }\n }\n }\n }\n }\n }\n } catch (err) {\n _didIteratorError4 = true;\n _iteratorError4 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion4 && _iterator4.return) {\n _iterator4.return();\n }\n } finally {\n if (_didIteratorError4) {\n throw _iteratorError4;\n }\n }\n }\n }\n this.setState(newState);\n }\n }, {\n key: \"addProperty\",\n value: function addProperty(e) {\n e.preventDefault();\n var newState = this.state;\n newState.catalogProperties.push({\n name: \"\",\n value: \"\"\n });\n newState.errors.catalogProperties.push(\"\");\n this.setState(newState);\n }\n }, {\n key: \"handlePropertyChange\",\n value: function handlePropertyChange(e) {\n if ([\"name\", \"value\"].includes(e.target.name)) {\n var newState = this.state;\n newState.catalogProperties[e.target.dataset.id][e.target.name] = e.target.value;\n if (e.target.name != \"\" && e.target.value != \"\" && newState.errors.catalogProperties[e.target.dataset.id] != undefined && newState.errors.catalogProperties[e.target.dataset.id] != \"\") {\n newState.errors.catalogProperties[e.target.dataset.id] = \"\";\n }\n this.setState(newState);\n }\n }\n }, {\n key: \"removeProperty\",\n value: function removeProperty(idx) {\n var newState = this.state;\n if (idx < newState.catalogProperties.length && idx > -1) {\n var removingProperty = newState.catalogProperties[idx];\n if (removingProperty[\"required\"]) {\n if (!confirm(\"'\" + removingProperty.name + \"' is a required property.\\n\" + \"Are you sure to remove?\")) {\n return;\n }\n }\n newState.catalogProperties.splice(idx, 1);\n newState.errors.catalogProperties.splice(idx, 1);\n }\n this.setState(newState);\n }\n }, {\n key: \"addConfiguration\",\n value: function addConfiguration(e) {\n e.preventDefault();\n var newState = this.state;\n newState.catalogConfigProperties.push(null);\n newState.errors.catalogConfigProperties.push(\"\");\n this.setState(newState);\n }\n }, {\n key: \"addGlobalConfiguration\",\n value: function addGlobalConfiguration(e) {\n e.preventDefault();\n var newState = this.state;\n newState.globalConfigProperties.push(null);\n newState.errors.globalConfigProperties.push(\"\");\n this.setState(newState);\n }\n }, {\n key: \"removeConfiguration\",\n value: function removeConfiguration(e) {\n var newState = this.state;\n newState.catalogConfigProperties.splice(e.target.dataset.id, 1);\n this.setState(newState);\n }\n }, {\n key: \"removeGlobalConfiguration\",\n value: function removeGlobalConfiguration(e) {\n var newState = this.state;\n newState.globalConfigProperties.splice(e.target.dataset.id, 1);\n this.setState(newState);\n }\n }, {\n key: \"handleConfigFileChange\",\n value: function handleConfigFileChange(e) {\n var newState = this.state;\n if ([\"configfile\"].includes(e.target.name)) {\n if (e.target.files.length > 0) {\n newState.catalogConfigProperties[e.target.dataset.id] = e.target.files[0];\n if (newState.errors.catalogConfigProperties[e.target.dataset.id] != undefined && newState.errors.catalogConfigProperties[e.target.dataset.id] != \"\") {\n newState.errors.catalogConfigProperties[e.target.dataset.id] = \"\";\n }\n } else {\n newState.catalogConfigProperties[e.target.dataset.id] = null;\n newState.errors.catalogConfigProperties[e.target.dataset.id] = \"\";\n }\n this.setState(newState);\n } else if ([\"global-configfile\"].includes(e.target.name)) {\n if (e.target.files.length > 0) {\n newState.globalConfigProperties[e.target.dataset.id] = e.target.files[0];\n if (newState.errors.globalConfigProperties[e.target.dataset.id] != undefined && newState.errors.globalConfigProperties[e.target.dataset.id] != \"\") {\n newState.errors.globalConfigProperties[e.target.dataset.id] = \"\";\n }\n } else {\n newState.globalConfigProperties[e.target.dataset.id] = null;\n newState.errors.globalConfigProperties[e.target.dataset.id] = \"\";\n }\n this.setState(newState);\n }\n }\n }, {\n key: \"handleSubmit\",\n value: function handleSubmit(e) {\n var _this2 = this;\n\n e.preventDefault();\n if (!this.handleValidation()) {\n return;\n }\n var formData = new FormData();\n\n var props = {};\n Array.from(this.state.catalogProperties).map(function (row) {\n props[row.name] = row.value;\n });\n formData.append(\"catalogInformation\", JSON.stringify({\n catalogName: this.state.catalogName,\n connectorName: this.state.connectorName,\n properties: props\n }));\n\n Array.from(this.state.catalogConfigProperties).map(function (entry) {\n if (entry != null) {\n formData.append(\"catalogConfigurationFiles\", entry, entry.name);\n }\n });\n Array.from(this.state.globalConfigProperties).map(function (entry) {\n if (entry != null) {\n formData.append(\"globalConfigurationFiles\", entry, entry.name);\n }\n });\n\n _CatalogActions2.default.addCatalog(formData).then(function (result) {\n var newState = _this2.state;\n if (!result.result) {\n newState.errors[\"submissionError\"] = \"Error while adding catalog: \" + result.message.split('\\n', 1)[0];\n _this2.setState(newState);\n } else {\n newState.errors[\"submissionSuccess\"] = \"Add catalog successful; Server message: \" + result.message;\n if (_this2.props.refreshCallback != undefined) {\n _this2.props.refreshCallback();\n }\n _this2.handleClose();\n }\n });\n }\n }, {\n key: \"handleReset\",\n value: function handleReset() {\n this.setState(this.getInitialState());\n }\n }, {\n key: \"handleClose\",\n value: function handleClose() {\n this.props.onClose && this.props.onClose();\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this3 = this;\n\n var catalogProperties = this.state.catalogProperties;\n var catalogConfigProperties = this.state.catalogConfigProperties;\n var globalConfigProperties = this.state.globalConfigProperties;\n\n return _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\n \"div\",\n { className: \"hetu-form-body\", style: { position: \"relative\", paddingLeft: \"20px\", paddingRight: \"20px\", overflowY: \"auto\" } },\n _react2.default.createElement(\n \"div\",\n { style: { paddingLeft: \"20px\", paddingRight: \"20px\", paddingBottom: \"10px\" } },\n _react2.default.createElement(\n \"span\",\n { className: \"hetu-form-submit-success\" },\n this.state.errors[\"submissionSuccess\"]\n ),\n _react2.default.createElement(\n \"span\",\n { className: \"hetu-form-submit-error\" },\n this.state.errors[\"submissionError\"]\n )\n ),\n _react2.default.createElement(\n _reactBootstrap.Form,\n null,\n _react2.default.createElement(\n _reactBootstrap.FormGroup,\n null,\n _react2.default.createElement(\n _Row2.default,\n null,\n _react2.default.createElement(\n _reactBootstrap.Col,\n { style: { display: \"flex\", alignItems: 'center' } },\n _react2.default.createElement(\n _reactBootstrap.FormLabel,\n { className: \"hetu-form-label\" },\n \"Data Source Type\"\n ),\n function () {\n if (_this3.state.selectedConnector == \"\") {\n return _react2.default.createElement(\"i\", { className: \"fa fa-info-circle fa-form-label\",\n title: \"Select a Data source type(Connector) and click here for more details of selected Data source type(Connector)\" });\n } else {\n return _react2.default.createElement(\n \"a\",\n { href: _this3.state.selectedConnector.docLink, className: \"alert-link\", target: \"_blank\" },\n _react2.default.createElement(\"i\", { className: \"fa fa-info-circle fa-form-label\",\n title: \"Click for more details of current connector\" })\n );\n }\n }()\n ),\n _react2.default.createElement(\n _reactBootstrap.Col,\n null,\n _react2.default.createElement(\n \"div\",\n { style: { display: \"block\" } },\n _react2.default.createElement(\n _reactBootstrap.Form.Control,\n { as: \"select\", size: \"lg\", name: \"connectorName\", defaultValue: \"placeholder\", onChange: this.handleChange },\n _react2.default.createElement(\n \"option\",\n { key: \"placeholder\", value: \"placeholder\", disabled: true },\n \"Select a data source type\"\n ),\n this.state.supportedConnectors.map(function (eachVal) {\n return _react2.default.createElement(\n \"option\",\n { key: eachVal.connectorWithProperties.connectorName,\n value: eachVal.connectorWithProperties.connectorName },\n eachVal.connectorWithProperties.connectorLabel\n );\n })\n ),\n _react2.default.createElement(\n \"span\",\n { className: \"hetu-form-error-span\" },\n this.state.errors[\"connectorName\"]\n )\n )\n )\n ),\n _react2.default.createElement(\n _Row2.default,\n null,\n _react2.default.createElement(\n _reactBootstrap.Col,\n { style: { display: \"flex\", alignItems: 'center' } },\n _react2.default.createElement(\n _reactBootstrap.FormLabel,\n { className: \"hetu-form-label\" },\n \"Catalog Name\"\n ),\n _react2.default.createElement(\"i\", { className: \"fa fa-info-circle fa-form-label\",\n title: \"1.Name is case insensitive\\n\" + \"2.Should be alphanumeric\\n\" + \"3.Can contain special character underscore.\\n\" + \"4.Max length: 100 characters\" })\n ),\n _react2.default.createElement(\n _reactBootstrap.Col,\n null,\n _react2.default.createElement(\n \"div\",\n { style: { display: \"block\" } },\n _react2.default.createElement(_reactBootstrap.FormControl, { name: \"catalogName\", type: \"text\", maxLength: 100, style: { flexDirection: \"column\" }, onChange: this.handleChange,\n placeholder: \"Catalog Name\", value: this.state.catalogName }),\n _react2.default.createElement(\n \"span\",\n { className: \"hetu-form-error-span\" },\n this.state.errors[\"catalogName\"]\n )\n )\n )\n ),\n function () {\n if (_this3.state.selectedConnector != \"\" && _this3.state.selectedConnector.connectorWithProperties.propertiesEnabled) {\n return _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\n _Row2.default,\n { style: { display: \"flex\", alignItems: 'center' } },\n _react2.default.createElement(\n _reactBootstrap.Col,\n { style: { flexDirection: \"column\" } },\n _react2.default.createElement(\n _reactBootstrap.FormLabel,\n { className: \"hetu-form-label\" },\n \"Catalog Properties\"\n ),\n _react2.default.createElement(\n \"a\",\n { href: _this3.state.selectedConnector.configLink, className: \"alert-link\", target: \"_blank\" },\n _react2.default.createElement(\"i\", { className: \"fa fa-info-circle fa-form-label\",\n title: \"Click for more details of \" + _this3.state.connectorName + \"'s configurations details\" })\n )\n ),\n _react2.default.createElement(\n _reactBootstrap.Col,\n { style: { flexDirection: \"column\" } },\n _react2.default.createElement(\n _reactBootstrap.Button,\n { className: \"hetu-form-label-plus\", onClick: _this3.addProperty },\n _react2.default.createElement(\n \"i\",\n { className: \"material-icons\", title: \"Add property\" },\n \"add\"\n )\n )\n )\n ),\n catalogProperties.map(function (key, idx) {\n var name = key[\"name\"];\n var value = key[\"value\"];\n var description = key[\"description\"];\n var readOnly = key[\"readOnly\"] != undefined && key[\"readOnly\"];\n var rowKey = \"row-\" + idx;\n return _react2.default.createElement(\n \"div\",\n { key: idx },\n _react2.default.createElement(\n _Row2.default,\n { style: { display: \"flex\", alignItems: 'center' }, key: rowKey },\n _react2.default.createElement(\n _reactBootstrap.Col,\n { style: { flexDirection: \"column\", marginRight: '10px', width: \"70%\" } },\n _react2.default.createElement(_reactBootstrap.FormControl, { name: \"name\", type: \"text\", \"data-id\": idx, placeholder: \"property name\",\n value: name,\n readOnly: readOnly,\n onChange: _this3.handlePropertyChange.bind(_this3) })\n ),\n _react2.default.createElement(\n _reactBootstrap.Col,\n { style: { flexDirection: \"column\", width: \"100%\" } },\n _react2.default.createElement(_reactBootstrap.FormControl, { name: \"value\", type: \"text\", \"data-id\": idx, placeholder: \"property value\",\n value: value,\n readOnly: readOnly,\n onChange: _this3.handlePropertyChange.bind(_this3) })\n ),\n function () {\n if (description != undefined && description != \"\") {\n return _react2.default.createElement(\n _reactBootstrap.Col,\n { style: { flexDirection: \"column\" } },\n _react2.default.createElement(\"i\", { className: \"fa fa-info-circle fa-form-label\",\n title: description })\n );\n } else {\n return _react2.default.createElement(\"div\", { style: { minWidth: \"27px\" } });\n }\n }(),\n _react2.default.createElement(\n _reactBootstrap.Col,\n { style: { flexDirection: \"column\" } },\n _react2.default.createElement(\n _reactBootstrap.Button,\n { className: \"hetu-form-label-minus\", \"data-id\": idx,\n onClick: _this3.removeProperty.bind(_this3, idx) },\n _react2.default.createElement(\n \"i\",\n { className: \"material-icons\", title: \"Remove property\" },\n \"remove\"\n )\n )\n )\n ),\n _this3.state.errors.catalogProperties[idx] != \"\" && _react2.default.createElement(\n \"span\",\n { className: \"hetu-form-error-span\" },\n _this3.state.errors.catalogProperties[idx]\n )\n );\n })\n );\n }\n return null;\n }(),\n function () {\n if (_this3.state.selectedConnector != \"\" && _this3.state.selectedConnector.connectorWithProperties.catalogConfigFilesEnabled) {\n return _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\n _Row2.default,\n { style: { display: \"flex\", alignItems: 'center' } },\n _react2.default.createElement(\n _reactBootstrap.Col,\n { style: { flexDirection: \"column\" } },\n _react2.default.createElement(\n _reactBootstrap.FormLabel,\n { className: \"hetu-form-label\" },\n \"Catalog Configuration Files\"\n ),\n _react2.default.createElement(\"i\", { className: \"fa fa-info-circle fa-form-label\",\n title: \"Catalog configuration files are private to catalog\" })\n ),\n _react2.default.createElement(\n _reactBootstrap.Col,\n { style: { flexDirection: \"column\" } },\n _react2.default.createElement(\n _reactBootstrap.Button,\n { name: \"add-catalogconf\", className: \"hetu-form-label-plus\", onClick: _this3.addConfiguration },\n _react2.default.createElement(\n \"i\",\n { className: \"material-icons\", title: \"Add catalog file\" },\n \"add\"\n )\n )\n )\n ),\n catalogConfigProperties.map(function (key, idx) {\n return _react2.default.createElement(\n \"div\",\n { key: idx },\n _react2.default.createElement(\n _Row2.default,\n { style: { display: \"flex\", alignItems: 'center' }, key: idx },\n _react2.default.createElement(\n _reactBootstrap.Col,\n { style: { flexDirection: \"column\" } },\n _react2.default.createElement(_FormFileInput2.default, { name: \"configfile\", key: \"{idx}\", \"data-id\": idx,\n onChange: _this3.handleConfigFileChange.bind(_this3) })\n ),\n _react2.default.createElement(\n _reactBootstrap.Col,\n { style: { flexDirection: \"column\" } },\n _react2.default.createElement(\n _reactBootstrap.Button,\n { name: \"remove-conf\",\n className: \"hetu-form-label-minus\", \"data-id\": idx,\n onClick: _this3.removeConfiguration.bind(_this3) },\n _react2.default.createElement(\n \"i\",\n { className: \"material-icons\", title: \"Remove file\" },\n \"remove\"\n )\n )\n )\n ),\n _this3.state.errors.catalogConfigProperties[idx] != \"\" && _react2.default.createElement(\n \"span\",\n { className: \"hetu-form-error-span\" },\n _this3.state.errors.catalogConfigProperties[idx]\n )\n );\n })\n );\n }\n return null;\n }(),\n function () {\n if (_this3.state.selectedConnector != \"\" && _this3.state.selectedConnector.connectorWithProperties.globalConfigFilesEnabled) {\n return _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\n _Row2.default,\n { style: { display: \"flex\", alignItems: 'center' } },\n _react2.default.createElement(\n _reactBootstrap.Col,\n { style: { flexDirection: \"column\" } },\n _react2.default.createElement(\n _reactBootstrap.FormLabel,\n { className: \"hetu-form-label\" },\n \"Global Configuration Files\"\n ),\n _react2.default.createElement(\"i\", { className: \"fa fa-info-circle fa-form-label\",\n title: \"Global configuration files are shared between other connectors and only need to upload once.\" })\n ),\n _react2.default.createElement(\n _reactBootstrap.Col,\n { style: { flexDirection: \"column\" } },\n _react2.default.createElement(\n _reactBootstrap.Button,\n { name: \"add-globalconf\", className: \"hetu-form-label-plus\", onClick: _this3.addGlobalConfiguration.bind(_this3) },\n _react2.default.createElement(\n \"i\",\n { className: \"material-icons\", title: \"Add global file\" },\n \"add\"\n )\n )\n )\n ),\n globalConfigProperties.map(function (key, idx) {\n return _react2.default.createElement(\n \"div\",\n { key: idx },\n _react2.default.createElement(\n _Row2.default,\n { style: { display: \"flex\", alignItems: 'center' }, key: idx },\n _react2.default.createElement(\n _reactBootstrap.Col,\n { style: { flexDirection: \"column\" } },\n _react2.default.createElement(_FormFileInput2.default, { name: \"global-configfile\", key: \"{idx}\", \"data-id\": idx,\n onChange: _this3.handleConfigFileChange.bind(_this3) })\n ),\n _react2.default.createElement(\n _reactBootstrap.Col,\n { style: { flexDirection: \"column\" } },\n _react2.default.createElement(\n _reactBootstrap.Button,\n { name: \"remove-globalconf\",\n className: \"hetu-form-label-minus\", \"data-id\": idx,\n onClick: _this3.removeGlobalConfiguration.bind(_this3) },\n _react2.default.createElement(\n \"i\",\n { className: \"material-icons\", title: \"Remove file\" },\n \"remove\"\n )\n )\n ),\n _react2.default.createElement(_reactBootstrap.Col, { style: { flexDirection: \"column\" } })\n ),\n _this3.state.errors.globalConfigProperties[idx] != \"\" && _react2.default.createElement(\n \"span\",\n { className: \"hetu-form-error-span\" },\n _this3.state.errors.globalConfigProperties[idx]\n )\n );\n })\n );\n }\n return null;\n }()\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: 'catalog-btn-part' },\n _react2.default.createElement(\n _reactBootstrap.Button,\n { onClick: this.handleSubmit, className: \"btn btn-success btn-lg active\" },\n \"Submit\"\n ),\n _react2.default.createElement(\n _reactBootstrap.Button,\n { onClick: this.handleClose, className: \"btn btn-lg\" },\n \"Close\"\n )\n )\n );\n }\n }]);\n\n return AddCatalog;\n}(_react2.default.Component);\n\nexports.default = AddCatalog;\n\n//# sourceURL=webpack:///./queryeditor/components/AddCatalog.jsx?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactBootstrap = __webpack_require__(/*! react-bootstrap */ \"./node_modules/react-bootstrap/esm/index.js\");\n\nvar _FormFileInput = __webpack_require__(/*! react-bootstrap/FormFileInput */ \"./node_modules/react-bootstrap/esm/FormFileInput.js\");\n\nvar _FormFileInput2 = _interopRequireDefault(_FormFileInput);\n\nvar _Row = __webpack_require__(/*! react-bootstrap/Row */ \"./node_modules/react-bootstrap/esm/Row.js\");\n\nvar _Row2 = _interopRequireDefault(_Row);\n\nvar _Alert = __webpack_require__(/*! react-bootstrap/Alert */ \"./node_modules/react-bootstrap/esm/Alert.js\");\n\nvar _CatalogActions = __webpack_require__(/*! ../actions/CatalogActions */ \"./queryeditor/actions/CatalogActions.js\");\n\nvar _CatalogActions2 = _interopRequireDefault(_CatalogActions);\n\nvar _ConnectorActions = __webpack_require__(/*! ../actions/ConnectorActions */ \"./queryeditor/actions/ConnectorActions.js\");\n\nvar _ConnectorActions2 = _interopRequireDefault(_ConnectorActions);\n\nvar _ConnectorStore = __webpack_require__(/*! ../stores/ConnectorStore */ \"./queryeditor/stores/ConnectorStore.js\");\n\nvar _ConnectorStore2 = _interopRequireDefault(_ConnectorStore);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nfunction getStateFromStore() {\n return {\n supportedConnectors: _ConnectorStore2.default.getCollection().all({\n sort: true\n })\n };\n}\n\nvar AddCatalog = function (_React$Component) {\n _inherits(AddCatalog, _React$Component);\n\n function AddCatalog(props) {\n _classCallCheck(this, AddCatalog);\n\n var _this = _possibleConstructorReturn(this, (AddCatalog.__proto__ || Object.getPrototypeOf(AddCatalog)).call(this, props));\n\n _this.state = _this.getInitialState();\n _this.handleSubmit = _this.handleSubmit.bind(_this);\n _this.handleClose = _this.handleClose.bind(_this);\n _this.handleChange = _this.handleChange.bind(_this);\n _this.addProperty = _this.addProperty.bind(_this);\n _this.addConfiguration = _this.addConfiguration.bind(_this);\n _this.handleValidation = _this.handleValidation.bind(_this);\n _this._fetchConnectors = _this._fetchConnectors.bind(_this);\n _this._onChange = _this._onChange.bind(_this);\n return _this;\n }\n\n _createClass(AddCatalog, [{\n key: \"getInitialErrors\",\n value: function getInitialErrors() {\n return {\n catalogProperties: [],\n catalogConfigProperties: [],\n globalConfigProperties: []\n };\n }\n }, {\n key: \"getInitialState\",\n value: function getInitialState() {\n return {\n supportedConnectors: _ConnectorStore2.default.getCollection().all({\n sort: true\n }),\n catalogName: \"\",\n connectorName: \"\",\n selectedConnector: \"\",\n catalogAreaProperties: \"\",\n catalogProperties: [],\n catalogConfigProperties: [],\n globalConfigProperties: [],\n errors: this.getInitialErrors()\n };\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n _ConnectorStore2.default.listen(this._onChange);\n this._fetchConnectors();\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n _ConnectorStore2.default.unlisten(this._onChange);\n }\n }, {\n key: \"_fetchConnectors\",\n value: function _fetchConnectors() {\n _ConnectorActions2.default.fetchSupportedConnectors();\n }\n }, {\n key: \"_onChange\",\n value: function _onChange() {\n this.setState(getStateFromStore());\n }\n }, {\n key: \"handleValidation\",\n value: function handleValidation() {\n var state = this.state;\n var errors = {\n catalogProperties: [],\n catalogConfigProperties: [],\n globalConfigProperties: []\n };\n var error = false;\n state.catalogName = state.catalogName.trim();\n if (state.catalogName == \"\") {\n errors.catalogName = \"Catalog Name cannot be empty\";\n error = true;\n } else if (!state.catalogName.match(\"^([A-Za-z]+)([A-Za-z0-9_]*)([A-Za-z0-9]+)$\")) {\n errors.catalogName = \"Catalog name must contain only alphanumeric and/or underscore(s). Must start with alphabet and end with alphanumeric character\";\n error = true;\n }\n\n if (state.connectorName.trim() == \"\" || state.connectorName == \"placeholder\") {\n errors.connectorName = \"Select a connector\";\n error = true;\n }\n\n if (state.catalogProperties.length > 0) {\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = state.catalogProperties.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var _ref = _step.value;\n\n var _ref2 = _slicedToArray(_ref, 2);\n\n var index = _ref2[0];\n var entry = _ref2[1];\n\n var name = entry[\"name\"];\n var value = entry[\"value\"];\n name = name == undefined ? name : name.trim();\n value = value == undefined ? value : value.trim();\n\n if (name == \"\" || value == \"\") {\n errors.catalogProperties.push(\"Property name and value cannot be empty\");\n error = true;\n } else if (entry[\"type\"] === \"files\") {\n (function () {\n var missedFiles = [];\n var files = value.toString().split(\",\");\n files.forEach(function (file, index, files) {\n var found = false;\n Array.from(state.catalogConfigProperties).map(function (config) {\n if (config != undefined && config != null && config.name == file) {\n found = true;\n }\n });\n if (found) {\n return;\n }\n Array.from(state.globalConfigProperties).map(function (config) {\n if (config != undefined && config != null && config.name == file) {\n found = true;\n }\n });\n if (!found) {\n missedFiles.push(file);\n }\n });\n if (missedFiles.length > 0) {\n error = true;\n errors.catalogProperties.push(\"Following files needs to be uploaded: [\" + missedFiles.toString() + \"]\");\n } else {\n errors.catalogProperties.push(\"\");\n }\n })();\n } else {\n errors.catalogProperties.push(\"\");\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n }\n if (state.catalogConfigProperties.length > 0) {\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n for (var _iterator2 = state.catalogConfigProperties.entries()[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n var _ref3 = _step2.value;\n\n var _ref4 = _slicedToArray(_ref3, 2);\n\n var _index = _ref4[0];\n var _entry = _ref4[1];\n\n if (_entry === undefined || _entry === null || _entry == {}) {\n errors.catalogConfigProperties.push(\"Specify catalog configuration file!!\");\n error = true;\n } else {\n errors.catalogConfigProperties.push(\"\");\n }\n }\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n }\n if (state.globalConfigProperties.length > 0) {\n var _iteratorNormalCompletion3 = true;\n var _didIteratorError3 = false;\n var _iteratorError3 = undefined;\n\n try {\n for (var _iterator3 = state.globalConfigProperties.entries()[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {\n var _ref5 = _step3.value;\n\n var _ref6 = _slicedToArray(_ref5, 2);\n\n var _index2 = _ref6[0];\n var _entry2 = _ref6[1];\n\n if (_entry2 === undefined || _entry2 === null || _entry2 == {}) {\n errors.globalConfigProperties.push(\"Specify Global configuration file!!\");\n error = true;\n } else {\n errors.globalConfigProperties.push(\"\");\n }\n }\n } catch (err) {\n _didIteratorError3 = true;\n _iteratorError3 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion3 && _iterator3.return) {\n _iterator3.return();\n }\n } finally {\n if (_didIteratorError3) {\n throw _iteratorError3;\n }\n }\n }\n }\n state.errors = errors;\n this.setState(state);\n return !error;\n }\n }, {\n key: \"handleChange\",\n value: function handleChange(e) {\n var newState = this.state;\n if ([\"catalogName\"].includes(e.target.name)) {\n newState.catalogName = e.target.value.toString().trim().toLowerCase();\n if (newState.catalogName != \"\" && newState.errors[\"catalogName\"] != \"\") {\n newState.errors.catalogName = \"\";\n }\n } else if ([\"connectorName\"].includes(e.target.name)) {\n newState.connectorName = e.target.value;\n newState.catalogProperties.splice(0, newState.catalogProperties.length);\n if (newState.connectorName != \"\" && newState.connectorName != \"placeholder\" && newState.errors[\"connectorName\"] != undefined && newState.errors[\"connectorName\"] != \"\") {\n newState.errors.connectorName = \"\";\n }\n var _iteratorNormalCompletion4 = true;\n var _didIteratorError4 = false;\n var _iteratorError4 = undefined;\n\n try {\n for (var _iterator4 = newState.supportedConnectors[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {\n var eachVal = _step4.value;\n\n if (eachVal.connectorWithProperties.connectorName === newState.connectorName) {\n newState.selectedConnector = eachVal;\n newState.errors.catalogProperties = [];\n if (eachVal.connectorWithProperties.propertiesEnabled) {\n var _iteratorNormalCompletion5 = true;\n var _didIteratorError5 = false;\n var _iteratorError5 = undefined;\n\n try {\n for (var _iterator5 = Object.entries(eachVal.connectorWithProperties.properties)[Symbol.iterator](), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) {\n var _ref7 = _step5.value;\n\n var _ref8 = _slicedToArray(_ref7, 2);\n\n var index = _ref8[0];\n var value = _ref8[1];\n\n newState.catalogProperties.push(value);\n newState.errors.catalogProperties.push(\"\");\n }\n } catch (err) {\n _didIteratorError5 = true;\n _iteratorError5 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion5 && _iterator5.return) {\n _iterator5.return();\n }\n } finally {\n if (_didIteratorError5) {\n throw _iteratorError5;\n }\n }\n }\n }\n }\n }\n } catch (err) {\n _didIteratorError4 = true;\n _iteratorError4 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion4 && _iterator4.return) {\n _iterator4.return();\n }\n } finally {\n if (_didIteratorError4) {\n throw _iteratorError4;\n }\n }\n }\n }\n this.setState(newState);\n }\n }, {\n key: \"addProperty\",\n value: function addProperty(e) {\n e.preventDefault();\n var newState = this.state;\n newState.catalogProperties.push({\n name: \"\",\n value: \"\"\n });\n newState.errors.catalogProperties.push(\"\");\n this.setState(newState);\n }\n }, {\n key: \"handlePropertyChange\",\n value: function handlePropertyChange(e) {\n if ([\"name\", \"value\"].includes(e.target.name)) {\n var newState = this.state;\n newState.catalogProperties[e.target.dataset.id][e.target.name] = e.target.value;\n if (e.target.name != \"\" && e.target.value != \"\" && newState.errors.catalogProperties[e.target.dataset.id] != undefined && newState.errors.catalogProperties[e.target.dataset.id] != \"\") {\n newState.errors.catalogProperties[e.target.dataset.id] = \"\";\n }\n this.setState(newState);\n }\n }\n }, {\n key: \"removeProperty\",\n value: function removeProperty(idx) {\n var newState = this.state;\n if (idx < newState.catalogProperties.length && idx > -1) {\n var removingProperty = newState.catalogProperties[idx];\n if (removingProperty[\"required\"]) {\n if (!confirm(\"'\" + removingProperty.name + \"' is a required property.\\n\" + \"Are you sure to remove?\")) {\n return;\n }\n }\n newState.catalogProperties.splice(idx, 1);\n newState.errors.catalogProperties.splice(idx, 1);\n }\n this.setState(newState);\n }\n }, {\n key: \"addConfiguration\",\n value: function addConfiguration(e) {\n e.preventDefault();\n var newState = this.state;\n newState.catalogConfigProperties.push(null);\n newState.errors.catalogConfigProperties.push(\"\");\n this.setState(newState);\n }\n }, {\n key: \"addGlobalConfiguration\",\n value: function addGlobalConfiguration(e) {\n e.preventDefault();\n var newState = this.state;\n newState.globalConfigProperties.push(null);\n newState.errors.globalConfigProperties.push(\"\");\n this.setState(newState);\n }\n }, {\n key: \"removeConfiguration\",\n value: function removeConfiguration(e) {\n var newState = this.state;\n newState.catalogConfigProperties.splice(e.target.dataset.id, 1);\n this.setState(newState);\n }\n }, {\n key: \"removeGlobalConfiguration\",\n value: function removeGlobalConfiguration(e) {\n var newState = this.state;\n newState.globalConfigProperties.splice(e.target.dataset.id, 1);\n this.setState(newState);\n }\n }, {\n key: \"handleConfigFileChange\",\n value: function handleConfigFileChange(e) {\n var newState = this.state;\n if ([\"configfile\"].includes(e.target.name)) {\n if (e.target.files.length > 0) {\n newState.catalogConfigProperties[e.target.dataset.id] = e.target.files[0];\n if (newState.errors.catalogConfigProperties[e.target.dataset.id] != undefined && newState.errors.catalogConfigProperties[e.target.dataset.id] != \"\") {\n newState.errors.catalogConfigProperties[e.target.dataset.id] = \"\";\n }\n } else {\n newState.catalogConfigProperties[e.target.dataset.id] = null;\n newState.errors.catalogConfigProperties[e.target.dataset.id] = \"\";\n }\n this.setState(newState);\n } else if ([\"global-configfile\"].includes(e.target.name)) {\n if (e.target.files.length > 0) {\n newState.globalConfigProperties[e.target.dataset.id] = e.target.files[0];\n if (newState.errors.globalConfigProperties[e.target.dataset.id] != undefined && newState.errors.globalConfigProperties[e.target.dataset.id] != \"\") {\n newState.errors.globalConfigProperties[e.target.dataset.id] = \"\";\n }\n } else {\n newState.globalConfigProperties[e.target.dataset.id] = null;\n newState.errors.globalConfigProperties[e.target.dataset.id] = \"\";\n }\n this.setState(newState);\n }\n }\n }, {\n key: \"handleSubmit\",\n value: function handleSubmit(e) {\n var _this2 = this;\n\n e.preventDefault();\n if (!this.handleValidation()) {\n return;\n }\n var formData = new FormData();\n\n var props = {};\n Array.from(this.state.catalogProperties).map(function (row) {\n props[row.name] = row.value;\n });\n formData.append(\"catalogInformation\", JSON.stringify({\n catalogName: this.state.catalogName,\n connectorName: this.state.connectorName,\n properties: props\n }));\n\n Array.from(this.state.catalogConfigProperties).map(function (entry) {\n if (entry != null) {\n formData.append(\"catalogConfigurationFiles\", entry, entry.name);\n }\n });\n Array.from(this.state.globalConfigProperties).map(function (entry) {\n if (entry != null) {\n formData.append(\"globalConfigurationFiles\", entry, entry.name);\n }\n });\n\n _CatalogActions2.default.addCatalog(formData).then(function (result) {\n var newState = _this2.state;\n if (!result.result) {\n if (result.message.indexOf('Not Found (code: 404)') !== -1) {\n newState.errors[\"submissionError\"] = \"Error while adding catalog: service is not available. probably because 'catalog.dynamic-enabled' in the config.properties is set to false.\";\n _this2.setState(newState);\n } else {\n newState.errors[\"submissionError\"] = \"Error while adding catalog: \" + result.message.split('\\n', 1)[0];\n _this2.setState(newState);\n }\n } else {\n newState.errors[\"submissionSuccess\"] = \"Add catalog successful; Server message: \" + result.message;\n if (_this2.props.refreshCallback != undefined) {\n _this2.props.refreshCallback();\n }\n _this2.handleClose();\n }\n });\n }\n }, {\n key: \"handleReset\",\n value: function handleReset() {\n this.setState(this.getInitialState());\n }\n }, {\n key: \"handleClose\",\n value: function handleClose() {\n this.props.onClose && this.props.onClose();\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this3 = this;\n\n var catalogProperties = this.state.catalogProperties;\n var catalogConfigProperties = this.state.catalogConfigProperties;\n var globalConfigProperties = this.state.globalConfigProperties;\n\n return _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\n \"div\",\n { className: \"hetu-form-body\", style: { position: \"relative\", paddingLeft: \"20px\", paddingRight: \"20px\", overflowY: \"auto\" } },\n _react2.default.createElement(\n \"div\",\n { style: { paddingLeft: \"20px\", paddingRight: \"20px\", paddingBottom: \"10px\" } },\n _react2.default.createElement(\n \"span\",\n { className: \"hetu-form-submit-success\" },\n this.state.errors[\"submissionSuccess\"]\n ),\n _react2.default.createElement(\n \"span\",\n { className: \"hetu-form-submit-error\" },\n this.state.errors[\"submissionError\"]\n )\n ),\n _react2.default.createElement(\n _reactBootstrap.Form,\n null,\n _react2.default.createElement(\n _reactBootstrap.FormGroup,\n null,\n _react2.default.createElement(\n _Row2.default,\n null,\n _react2.default.createElement(\n _reactBootstrap.Col,\n { style: { display: \"flex\", alignItems: 'center' } },\n _react2.default.createElement(\n _reactBootstrap.FormLabel,\n { className: \"hetu-form-label\" },\n \"Data Source Type\"\n ),\n function () {\n if (_this3.state.selectedConnector == \"\") {\n return _react2.default.createElement(\"i\", { className: \"fa fa-info-circle fa-form-label\",\n title: \"Select a Data source type(Connector) and click here for more details of selected Data source type(Connector)\" });\n } else {\n return _react2.default.createElement(\n \"a\",\n { href: _this3.state.selectedConnector.docLink, className: \"alert-link\", target: \"_blank\" },\n _react2.default.createElement(\"i\", { className: \"fa fa-info-circle fa-form-label\",\n title: \"Click for more details of current connector\" })\n );\n }\n }()\n ),\n _react2.default.createElement(\n _reactBootstrap.Col,\n null,\n _react2.default.createElement(\n \"div\",\n { style: { display: \"block\" } },\n _react2.default.createElement(\n _reactBootstrap.Form.Control,\n { as: \"select\", size: \"lg\", name: \"connectorName\", defaultValue: \"placeholder\", onChange: this.handleChange },\n _react2.default.createElement(\n \"option\",\n { key: \"placeholder\", value: \"placeholder\", disabled: true },\n \"Select a data source type\"\n ),\n this.state.supportedConnectors.map(function (eachVal) {\n return _react2.default.createElement(\n \"option\",\n { key: eachVal.connectorWithProperties.connectorName,\n value: eachVal.connectorWithProperties.connectorName },\n eachVal.connectorWithProperties.connectorLabel\n );\n })\n ),\n _react2.default.createElement(\n \"span\",\n { className: \"hetu-form-error-span\" },\n this.state.errors[\"connectorName\"]\n )\n )\n )\n ),\n _react2.default.createElement(\n _Row2.default,\n null,\n _react2.default.createElement(\n _reactBootstrap.Col,\n { style: { display: \"flex\", alignItems: 'center' } },\n _react2.default.createElement(\n _reactBootstrap.FormLabel,\n { className: \"hetu-form-label\" },\n \"Catalog Name\"\n ),\n _react2.default.createElement(\"i\", { className: \"fa fa-info-circle fa-form-label\",\n title: \"1.Name is case insensitive\\n\" + \"2.Should be alphanumeric\\n\" + \"3.Can contain special character underscore.\\n\" + \"4.Max length: 100 characters\" })\n ),\n _react2.default.createElement(\n _reactBootstrap.Col,\n null,\n _react2.default.createElement(\n \"div\",\n { style: { display: \"block\" } },\n _react2.default.createElement(_reactBootstrap.FormControl, { name: \"catalogName\", type: \"text\", maxLength: 100, style: { flexDirection: \"column\" }, onChange: this.handleChange,\n placeholder: \"Catalog Name\", value: this.state.catalogName }),\n _react2.default.createElement(\n \"span\",\n { className: \"hetu-form-error-span\" },\n this.state.errors[\"catalogName\"]\n )\n )\n )\n ),\n function () {\n if (_this3.state.selectedConnector != \"\" && _this3.state.selectedConnector.connectorWithProperties.propertiesEnabled) {\n return _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\n _Row2.default,\n { style: { display: \"flex\", alignItems: 'center' } },\n _react2.default.createElement(\n _reactBootstrap.Col,\n { style: { flexDirection: \"column\" } },\n _react2.default.createElement(\n _reactBootstrap.FormLabel,\n { className: \"hetu-form-label\" },\n \"Catalog Properties\"\n ),\n _react2.default.createElement(\n \"a\",\n { href: _this3.state.selectedConnector.configLink, className: \"alert-link\", target: \"_blank\" },\n _react2.default.createElement(\"i\", { className: \"fa fa-info-circle fa-form-label\",\n title: \"Click for more details of \" + _this3.state.connectorName + \"'s configurations details\" })\n )\n ),\n _react2.default.createElement(\n _reactBootstrap.Col,\n { style: { flexDirection: \"column\" } },\n _react2.default.createElement(\n _reactBootstrap.Button,\n { className: \"hetu-form-label-plus\", onClick: _this3.addProperty },\n _react2.default.createElement(\n \"i\",\n { className: \"material-icons\", title: \"Add property\" },\n \"add\"\n )\n )\n )\n ),\n catalogProperties.map(function (key, idx) {\n var name = key[\"name\"];\n var value = key[\"value\"];\n var description = key[\"description\"];\n var readOnly = key[\"readOnly\"] != undefined && key[\"readOnly\"];\n var rowKey = \"row-\" + idx;\n return _react2.default.createElement(\n \"div\",\n { key: idx },\n _react2.default.createElement(\n _Row2.default,\n { style: { display: \"flex\", alignItems: 'center' }, key: rowKey },\n _react2.default.createElement(\n _reactBootstrap.Col,\n { style: { flexDirection: \"column\", marginRight: '10px', width: \"70%\" } },\n _react2.default.createElement(_reactBootstrap.FormControl, { name: \"name\", type: \"text\", \"data-id\": idx, placeholder: \"property name\",\n value: name,\n readOnly: readOnly,\n onChange: _this3.handlePropertyChange.bind(_this3) })\n ),\n _react2.default.createElement(\n _reactBootstrap.Col,\n { style: { flexDirection: \"column\", width: \"100%\" } },\n _react2.default.createElement(_reactBootstrap.FormControl, { name: \"value\", type: \"text\", \"data-id\": idx, placeholder: \"property value\",\n value: value,\n readOnly: readOnly,\n onChange: _this3.handlePropertyChange.bind(_this3) })\n ),\n function () {\n if (description != undefined && description != \"\") {\n return _react2.default.createElement(\n _reactBootstrap.Col,\n { style: { flexDirection: \"column\" } },\n _react2.default.createElement(\"i\", { className: \"fa fa-info-circle fa-form-label\",\n title: description })\n );\n } else {\n return _react2.default.createElement(\"div\", { style: { minWidth: \"27px\" } });\n }\n }(),\n _react2.default.createElement(\n _reactBootstrap.Col,\n { style: { flexDirection: \"column\" } },\n _react2.default.createElement(\n _reactBootstrap.Button,\n { className: \"hetu-form-label-minus\", \"data-id\": idx,\n onClick: _this3.removeProperty.bind(_this3, idx) },\n _react2.default.createElement(\n \"i\",\n { className: \"material-icons\", title: \"Remove property\" },\n \"remove\"\n )\n )\n )\n ),\n _this3.state.errors.catalogProperties[idx] != \"\" && _react2.default.createElement(\n \"span\",\n { className: \"hetu-form-error-span\" },\n _this3.state.errors.catalogProperties[idx]\n )\n );\n })\n );\n }\n return null;\n }(),\n function () {\n if (_this3.state.selectedConnector != \"\" && _this3.state.selectedConnector.connectorWithProperties.catalogConfigFilesEnabled) {\n return _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\n _Row2.default,\n { style: { display: \"flex\", alignItems: 'center' } },\n _react2.default.createElement(\n _reactBootstrap.Col,\n { style: { flexDirection: \"column\" } },\n _react2.default.createElement(\n _reactBootstrap.FormLabel,\n { className: \"hetu-form-label\" },\n \"Catalog Configuration Files\"\n ),\n _react2.default.createElement(\"i\", { className: \"fa fa-info-circle fa-form-label\",\n title: \"Catalog configuration files are private to catalog\" })\n ),\n _react2.default.createElement(\n _reactBootstrap.Col,\n { style: { flexDirection: \"column\" } },\n _react2.default.createElement(\n _reactBootstrap.Button,\n { name: \"add-catalogconf\", className: \"hetu-form-label-plus\", onClick: _this3.addConfiguration },\n _react2.default.createElement(\n \"i\",\n { className: \"material-icons\", title: \"Add catalog file\" },\n \"add\"\n )\n )\n )\n ),\n catalogConfigProperties.map(function (key, idx) {\n return _react2.default.createElement(\n \"div\",\n { key: idx },\n _react2.default.createElement(\n _Row2.default,\n { style: { display: \"flex\", alignItems: 'center' }, key: idx },\n _react2.default.createElement(\n _reactBootstrap.Col,\n { style: { flexDirection: \"column\" } },\n _react2.default.createElement(_FormFileInput2.default, { name: \"configfile\", key: \"{idx}\", \"data-id\": idx,\n onChange: _this3.handleConfigFileChange.bind(_this3) })\n ),\n _react2.default.createElement(\n _reactBootstrap.Col,\n { style: { flexDirection: \"column\" } },\n _react2.default.createElement(\n _reactBootstrap.Button,\n { name: \"remove-conf\",\n className: \"hetu-form-label-minus\", \"data-id\": idx,\n onClick: _this3.removeConfiguration.bind(_this3) },\n _react2.default.createElement(\n \"i\",\n { className: \"material-icons\", title: \"Remove file\" },\n \"remove\"\n )\n )\n )\n ),\n _this3.state.errors.catalogConfigProperties[idx] != \"\" && _react2.default.createElement(\n \"span\",\n { className: \"hetu-form-error-span\" },\n _this3.state.errors.catalogConfigProperties[idx]\n )\n );\n })\n );\n }\n return null;\n }(),\n function () {\n if (_this3.state.selectedConnector != \"\" && _this3.state.selectedConnector.connectorWithProperties.globalConfigFilesEnabled) {\n return _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\n _Row2.default,\n { style: { display: \"flex\", alignItems: 'center' } },\n _react2.default.createElement(\n _reactBootstrap.Col,\n { style: { flexDirection: \"column\" } },\n _react2.default.createElement(\n _reactBootstrap.FormLabel,\n { className: \"hetu-form-label\" },\n \"Global Configuration Files\"\n ),\n _react2.default.createElement(\"i\", { className: \"fa fa-info-circle fa-form-label\",\n title: \"Global configuration files are shared between other connectors and only need to upload once.\" })\n ),\n _react2.default.createElement(\n _reactBootstrap.Col,\n { style: { flexDirection: \"column\" } },\n _react2.default.createElement(\n _reactBootstrap.Button,\n { name: \"add-globalconf\", className: \"hetu-form-label-plus\", onClick: _this3.addGlobalConfiguration.bind(_this3) },\n _react2.default.createElement(\n \"i\",\n { className: \"material-icons\", title: \"Add global file\" },\n \"add\"\n )\n )\n )\n ),\n globalConfigProperties.map(function (key, idx) {\n return _react2.default.createElement(\n \"div\",\n { key: idx },\n _react2.default.createElement(\n _Row2.default,\n { style: { display: \"flex\", alignItems: 'center' }, key: idx },\n _react2.default.createElement(\n _reactBootstrap.Col,\n { style: { flexDirection: \"column\" } },\n _react2.default.createElement(_FormFileInput2.default, { name: \"global-configfile\", key: \"{idx}\", \"data-id\": idx,\n onChange: _this3.handleConfigFileChange.bind(_this3) })\n ),\n _react2.default.createElement(\n _reactBootstrap.Col,\n { style: { flexDirection: \"column\" } },\n _react2.default.createElement(\n _reactBootstrap.Button,\n { name: \"remove-globalconf\",\n className: \"hetu-form-label-minus\", \"data-id\": idx,\n onClick: _this3.removeGlobalConfiguration.bind(_this3) },\n _react2.default.createElement(\n \"i\",\n { className: \"material-icons\", title: \"Remove file\" },\n \"remove\"\n )\n )\n ),\n _react2.default.createElement(_reactBootstrap.Col, { style: { flexDirection: \"column\" } })\n ),\n _this3.state.errors.globalConfigProperties[idx] != \"\" && _react2.default.createElement(\n \"span\",\n { className: \"hetu-form-error-span\" },\n _this3.state.errors.globalConfigProperties[idx]\n )\n );\n })\n );\n }\n return null;\n }()\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: 'catalog-btn-part' },\n _react2.default.createElement(\n _reactBootstrap.Button,\n { onClick: this.handleSubmit, className: \"btn btn-success btn-lg active\" },\n \"Submit\"\n ),\n _react2.default.createElement(\n _reactBootstrap.Button,\n { onClick: this.handleClose, className: \"btn btn-lg\" },\n \"Close\"\n )\n )\n );\n }\n }]);\n\n return AddCatalog;\n}(_react2.default.Component);\n\nexports.default = AddCatalog;\n\n//# sourceURL=webpack:///./queryeditor/components/AddCatalog.jsx?"); /***/ }), @@ -28583,7 +28583,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar Footer = function (_React$Component) {\n _inherits(Footer, _React$Component);\n\n function Footer() {\n _classCallCheck(this, Footer);\n\n return _possibleConstructorReturn(this, (Footer.__proto__ || Object.getPrototypeOf(Footer)).apply(this, arguments));\n }\n\n _createClass(Footer, [{\n key: 'componentDidMount',\n value: function componentDidMount() {}\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n { className: 'flex footer' },\n _react2.default.createElement(\n 'div',\n { className: 'flex flex-initial' },\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { href: 'mailto:contact@openlookeng.io' },\n 'contact@openlookeng.io'\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'flex justify-flex-end' },\n _react2.default.createElement(\n 'div',\n { className: 'flex flex-initial' },\n _react2.default.createElement(\n 'p',\n null,\n 'Copyright \\xA9 2020 ',\n _react2.default.createElement(\n 'a',\n { href: \"https://openlookeng.io\", target: '_blank' },\n 'openLooKeng'\n ),\n '. All rights reserved'\n )\n )\n )\n );\n }\n }]);\n\n return Footer;\n}(_react2.default.Component);\n\nexports.default = Footer;\n\n//# sourceURL=webpack:///./queryeditor/components/Footer.jsx?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar Footer = function (_React$Component) {\n _inherits(Footer, _React$Component);\n\n function Footer() {\n _classCallCheck(this, Footer);\n\n return _possibleConstructorReturn(this, (Footer.__proto__ || Object.getPrototypeOf(Footer)).apply(this, arguments));\n }\n\n _createClass(Footer, [{\n key: 'componentDidMount',\n value: function componentDidMount() {}\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n { className: 'flex footer' },\n _react2.default.createElement(\n 'div',\n { className: 'flex flex-initial' },\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { href: 'mailto:contact@openlookeng.io' },\n 'contact@openlookeng.io'\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'flex justify-flex-end' },\n _react2.default.createElement(\n 'div',\n { className: 'flex flex-initial' },\n _react2.default.createElement(\n 'p',\n null,\n 'Copyright \\xA9 2020 ',\n _react2.default.createElement(\n 'a',\n { href: \"https://openlookeng.io\", target: '_blank' },\n 'openLooKeng'\n ),\n '. All rights reserved'\n )\n )\n )\n );\n }\n }]);\n\n return Footer;\n}(_react2.default.Component);\n\nexports.default = Footer;\n\n//# sourceURL=webpack:///./queryeditor/components/Footer.jsx?"); /***/ }), @@ -28595,7 +28595,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n}); /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _UserActions = __webpack_require__(/*! ../actions/UserActions */ \"./queryeditor/actions/UserActions.js\");\n\nvar _UserActions2 = _interopRequireDefault(_UserActions);\n\nvar _UserStore = __webpack_require__(/*! ../stores/UserStore */ \"./queryeditor/stores/UserStore.js\");\n\nvar _UserStore2 = _interopRequireDefault(_UserStore);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n// State actions\nfunction getStateFromStore() {\n return {\n user: _UserStore2.default.getCurrentUser()\n };\n}\n\nvar Header = function (_React$Component) {\n _inherits(Header, _React$Component);\n\n function Header(props) {\n _classCallCheck(this, Header);\n\n var _this = _possibleConstructorReturn(this, (Header.__proto__ || Object.getPrototypeOf(Header)).call(this, props));\n\n _this.state = getStateFromStore();\n _this._onChange = _this._onChange.bind(_this);\n return _this;\n }\n\n _createClass(Header, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n _UserStore2.default.listen(this._onChange);\n _UserActions2.default.fetchCurrentUser();\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n _UserStore2.default.unlisten(this._onChange);\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'header',\n { className: 'flex flex-row' },\n _react2.default.createElement(\n 'div',\n { className: 'flex' },\n _react2.default.createElement(\n 'a',\n { className: \"hetu-header-brand-name\", href: \"/\", style: { fontFamily: \"roboto!important\" } },\n _react2.default.createElement('img', { src: \"assets/lk-logos.svg\", alt: \"openLooKeng logo\", className: \"hetu-header-brand-name\" })\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'flex justify-flex-end menu' },\n _react2.default.createElement(\n 'div',\n { className: 'flex flex-initial' },\n _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement('i', { className: 'glyphicon glyphicon-user' }),\n this.state.user.name\n ),\n this.state.user.secure ? _react2.default.createElement(\n 'div',\n { className: 'logout' },\n _react2.default.createElement(\n 'form',\n { method: 'post', action: '../ui/api/logout' },\n _react2.default.createElement(\n 'button',\n { type: 'submit', className: 'btn btn-sm' },\n _react2.default.createElement('i', { className: 'fa fa-sign-out' }),\n 'Logout'\n )\n )\n ) : null\n )\n )\n );\n }\n\n /* Store events */\n\n }, {\n key: '_onChange',\n value: function _onChange() {\n this.setState(getStateFromStore());\n }\n }]);\n\n return Header;\n}(_react2.default.Component);\n\nexports.default = Header;\n\n//# sourceURL=webpack:///./queryeditor/components/Header.jsx?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _UserActions = __webpack_require__(/*! ../actions/UserActions */ \"./queryeditor/actions/UserActions.js\");\n\nvar _UserActions2 = _interopRequireDefault(_UserActions);\n\nvar _UserStore = __webpack_require__(/*! ../stores/UserStore */ \"./queryeditor/stores/UserStore.js\");\n\nvar _UserStore2 = _interopRequireDefault(_UserStore);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n// State actions\nfunction getStateFromStore() {\n return {\n user: _UserStore2.default.getCurrentUser()\n };\n}\n\nvar Header = function (_React$Component) {\n _inherits(Header, _React$Component);\n\n function Header(props) {\n _classCallCheck(this, Header);\n\n var _this = _possibleConstructorReturn(this, (Header.__proto__ || Object.getPrototypeOf(Header)).call(this, props));\n\n _this.state = {\n user: _UserStore2.default.getCurrentUser(),\n noConnection: false,\n lightShown: false,\n info: null,\n lastSuccess: Date.now(),\n modalShown: false,\n errorText: null\n };\n _this._onChange = _this._onChange.bind(_this);\n return _this;\n }\n\n _createClass(Header, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n _UserStore2.default.listen(this._onChange);\n _UserActions2.default.fetchCurrentUser();\n this.refreshLoop.bind(this)();\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n _UserStore2.default.unlisten(this._onChange);\n }\n }, {\n key: 'refreshLoop',\n value: function refreshLoop() {\n var _this2 = this;\n\n clearTimeout(this.timeoutId);\n fetch(\"../v1/info\").then(function (response) {\n return response.json();\n }).then(function (info) {\n _this2.setState({\n info: info,\n noConnection: false,\n lastSuccess: Date.now(),\n modalShown: false\n });\n _this2.resetTimer();\n }).catch(function (error) {\n _this2.setState({\n noConnection: true,\n lightShown: !_this2.state.lightShown,\n errorText: error\n });\n _this2.resetTimer();\n });\n }\n }, {\n key: 'resetTimer',\n value: function resetTimer() {\n clearTimeout(this.timeoutId);\n this.timeoutId = setTimeout(this.refreshLoop.bind(this), 1000);\n }\n }, {\n key: 'renderStatusLight',\n value: function renderStatusLight() {\n if (this.state.noConnection) {\n if (this.state.lightShown) {\n return _react2.default.createElement('span', { className: 'status-light status-light-red', id: 'status-indicator' });\n } else {\n return _react2.default.createElement('span', { className: 'status-light', id: 'status-indicator' });\n }\n }\n return _react2.default.createElement('span', { className: 'status-light status-light-green', id: 'status-indicator' });\n }\n }, {\n key: 'render',\n value: function render() {\n var info = this.state.info;\n return _react2.default.createElement(\n 'header',\n { className: 'flex flex-row' },\n _react2.default.createElement(\n 'div',\n { className: 'flex' },\n _react2.default.createElement(\n 'a',\n { className: \"hetu-header-brand-name\", href: \"/\", style: { fontFamily: \"roboto!important\" } },\n _react2.default.createElement('img', { src: \"assets/lk-logos.svg\", alt: \"openLooKeng logo\", className: \"hetu-header-brand-name\" })\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'flex justify-flex-end menu' },\n _react2.default.createElement(\n 'div',\n { className: 'flex flex-initial version' },\n _react2.default.createElement(\n 'div',\n { className: 'version-inner' },\n 'Version :',\n _react2.default.createElement(\n 'span',\n { className: 'uppercase' },\n info ? info.nodeVersion.version : 'null'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'version-inner' },\n 'Environment :',\n _react2.default.createElement(\n 'span',\n { className: 'uppercase' },\n info ? info.environment : 'null'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'version-inner' },\n _react2.default.createElement(\n 'span',\n null,\n 'Uptime'\n ),\n _react2.default.createElement(\n 'span',\n { 'data-toggle': 'tooltip', 'data-placement': 'bottom', title: 'Connection status' },\n this.renderStatusLight()\n ),\n _react2.default.createElement(\n 'span',\n { className: 'uppercase' },\n ': ',\n info ? info.uptime : '0s'\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'flex flex-initial' },\n _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement('i', { className: 'glyphicon glyphicon-user' }),\n this.state.user.name\n ),\n this.state.user.secure ? _react2.default.createElement(\n 'div',\n { className: 'logout' },\n _react2.default.createElement(\n 'form',\n { method: 'post', action: '../ui/api/logout' },\n _react2.default.createElement(\n 'button',\n { type: 'submit', className: 'btn btn-sm' },\n _react2.default.createElement('i', { className: 'fa fa-sign-out' }),\n 'Logout'\n )\n )\n ) : null\n )\n )\n );\n }\n\n /* Store events */\n\n }, {\n key: '_onChange',\n value: function _onChange() {\n this.setState(getStateFromStore());\n }\n }]);\n\n return Header;\n}(_react2.default.Component);\n\nexports.default = Header;\n\n//# sourceURL=webpack:///./queryeditor/components/Header.jsx?"); /***/ }), @@ -28631,7 +28631,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n}); /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar ModalDialog = function (_React$Component) {\n _inherits(ModalDialog, _React$Component);\n\n function ModalDialog(props) {\n _classCallCheck(this, ModalDialog);\n\n var _this = _possibleConstructorReturn(this, (ModalDialog.__proto__ || Object.getPrototypeOf(ModalDialog)).call(this, props));\n\n _this.onClose = _this.onClose.bind(_this);\n return _this;\n }\n\n _createClass(ModalDialog, [{\n key: \"onClose\",\n value: function onClose(e) {\n this.props.onClose && this.props.onClose(e);\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n //Disable navogation using tab key.\n $(\":input, a\").removeAttr(\"tabindex\");\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {}\n }, {\n key: \"render\",\n value: function render() {\n if (!this.props.show) {\n return null;\n }\n return _react2.default.createElement(\n \"div\",\n { className: \"hetu-modal-dialog\" },\n _react2.default.createElement(\n \"div\",\n { className: \"hetu-modal-dialog-content\" },\n _react2.default.createElement(\n \"div\",\n { className: \"hetu-modal-dialog-header\" },\n _react2.default.createElement(\"span\", { className: \"hetu-modal-dialog-close glyphicon glyphicon-remove\", onClick: this.onClose }),\n _react2.default.createElement(\n \"h3\",\n null,\n this.props.header\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"hetu-modal-dialog-body\" },\n this.props.children\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"hetu-hetu-modal-dialog-footer\" },\n _react2.default.createElement(\n \"h3\",\n null,\n this.props.footer\n )\n )\n )\n );\n }\n }]);\n\n return ModalDialog;\n}(_react2.default.Component);\n\nexports.default = ModalDialog;\n\n//# sourceURL=webpack:///./queryeditor/components/ModalDialog.jsx?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar ModalDialog = function (_React$Component) {\n _inherits(ModalDialog, _React$Component);\n\n function ModalDialog(props) {\n _classCallCheck(this, ModalDialog);\n\n var _this = _possibleConstructorReturn(this, (ModalDialog.__proto__ || Object.getPrototypeOf(ModalDialog)).call(this, props));\n\n _this.onClose = _this.onClose.bind(_this);\n return _this;\n }\n\n _createClass(ModalDialog, [{\n key: \"onClose\",\n value: function onClose(e) {\n this.props.onClose && this.props.onClose(e);\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n //Disable navogation using tab key.\n $(\":input, a\").removeAttr(\"tabindex\");\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {}\n }, {\n key: \"render\",\n value: function render() {\n if (!this.props.show) {\n return null;\n }\n return _react2.default.createElement(\n \"div\",\n { className: \"hetu-modal-dialog\" },\n _react2.default.createElement(\n \"div\",\n { className: \"hetu-modal-dialog-content\" },\n _react2.default.createElement(\n \"div\",\n { className: \"hetu-modal-dialog-header\" },\n _react2.default.createElement(\"span\", { className: \"hetu-modal-dialog-close glyphicon glyphicon-remove\", onClick: this.onClose }),\n _react2.default.createElement(\n \"h3\",\n null,\n this.props.header\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"hetu-modal-dialog-body\" },\n this.props.children\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"hetu-hetu-modal-dialog-footer\" },\n _react2.default.createElement(\n \"h3\",\n null,\n this.props.footer\n )\n )\n )\n );\n }\n }]);\n\n return ModalDialog;\n}(_react2.default.Component);\n\nexports.default = ModalDialog;\n\n//# sourceURL=webpack:///./queryeditor/components/ModalDialog.jsx?"); /***/ }), @@ -28643,7 +28643,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n}); /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _QueryStore = __webpack_require__(/*! ../stores/QueryStore */ \"./queryeditor/stores/QueryStore.js\");\n\nvar _QueryStore2 = _interopRequireDefault(_QueryStore);\n\nvar _QueryActions = __webpack_require__(/*! ../actions/QueryActions */ \"./queryeditor/actions/QueryActions.js\");\n\nvar _QueryActions2 = _interopRequireDefault(_QueryActions);\n\nvar _RunActions = __webpack_require__(/*! ../actions/RunActions */ \"./queryeditor/actions/RunActions.js\");\n\nvar _RunActions2 = _interopRequireDefault(_RunActions);\n\nvar _reactBootstrap = __webpack_require__(/*! react-bootstrap */ \"./node_modules/react-bootstrap/esm/index.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nfunction getStateFromStore() {\n return {\n queries: _QueryStore2.default.getCollection().all({\n sort: true\n })\n };\n}\n\nvar MySavedQueries = function (_React$Component) {\n _inherits(MySavedQueries, _React$Component);\n\n function MySavedQueries(props) {\n _classCallCheck(this, MySavedQueries);\n\n var _this = _possibleConstructorReturn(this, (MySavedQueries.__proto__ || Object.getPrototypeOf(MySavedQueries)).call(this, props));\n\n _this.displayName = 'MySavedQueries';\n _this.state = _this.getInitialState();\n _this.maxNumOfQueryLines = _this.props.maxQueryLines === undefined ? 20 : _this.props.maxQueryLines;\n _this.renderChildren = _this.renderChildren.bind(_this);\n _this.renderEmptyMessage = _this.renderEmptyMessage.bind(_this);\n _this._onChange = _this._onChange.bind(_this);\n _this._fetchQueries = _this._fetchQueries.bind(_this);\n _this._runQuery = _this._runQuery.bind(_this);\n _this._deleteQuery = _this._deleteQuery.bind(_this);\n return _this;\n }\n\n _createClass(MySavedQueries, [{\n key: 'getInitialState',\n value: function getInitialState() {\n return getStateFromStore();\n }\n }, {\n key: 'componentDidMount',\n value: function componentDidMount() {\n _QueryStore2.default.listen(this._onChange);\n this._fetchQueries();\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n _QueryStore2.default.unlisten(this._onChange);\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n { className: 'panel-body' },\n _react2.default.createElement(\n 'div',\n null,\n this.renderChildren()\n )\n );\n }\n }, {\n key: 'renderChildren',\n value: function renderChildren() {\n var _this2 = this;\n\n if (this.state.queries.length === 0) {\n return this.renderEmptyMessage();\n } else {\n return this.state.queries.map(function (query) {\n var queryText = query.queryWithPlaceholders.query;\n var noOfLinesInQuery = (queryText.match(/\\n/g) || []).length;\n var linesToShow = noOfLinesInQuery > _this2.maxNumOfQueryLines ? _this2.maxNumOfQueryLines : noOfLinesInQuery;\n linesToShow = linesToShow <= 1 ? 2 : linesToShow;\n var lineHeight = 20;\n var height = linesToShow * lineHeight;\n return _react2.default.createElement(\n 'div',\n { key: query.uuid, className: 'saved-container' },\n _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'h4',\n null,\n query.name\n ),\n _react2.default.createElement(\n 'p',\n null,\n query.description\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'clearfix' },\n _react2.default.createElement(\n 'pre',\n { onClick: _this2._onSelectQuery.bind(null, queryText), style: { height: height } },\n _react2.default.createElement(\n 'code',\n null,\n queryText\n )\n ),\n _react2.default.createElement(\n _reactBootstrap.ButtonToolbar,\n { className: 'pull-right' },\n !query.featured && _react2.default.createElement(\n _reactBootstrap.Button,\n {\n size: \"sm\",\n onClick: _this2._deleteQuery.bind(null, query.uuid) },\n 'Delete'\n ),\n _react2.default.createElement(\n _reactBootstrap.Button,\n {\n className: \"btn btn-success active\",\n size: 'sm',\n variant: \"success\",\n onClick: _this2._runQuery.bind(null, queryText) },\n 'Run'\n )\n )\n )\n );\n });\n }\n }\n }, {\n key: 'renderEmptyMessage',\n value: function renderEmptyMessage() {\n return _react2.default.createElement(\n 'div',\n { className: 'row' },\n _react2.default.createElement(\n 'div',\n { className: 'col-md-12 text-center' },\n 'No saved queries'\n )\n );\n }\n }, {\n key: '_onChange',\n value: function _onChange() {\n this.setState(getStateFromStore());\n }\n }, {\n key: '_fetchQueries',\n value: function _fetchQueries() {\n _QueryActions2.default.fetchSavedQueries();\n }\n }, {\n key: '_onSelectQuery',\n value: function _onSelectQuery(query) {\n _QueryActions2.default.selectQuery({ query: query });\n }\n }, {\n key: '_runQuery',\n value: function _runQuery(queryText) {\n _QueryActions2.default.selectQuery({ query: queryText });\n _RunActions2.default.execute({\n query: queryText\n });\n }\n }, {\n key: '_deleteQuery',\n value: function _deleteQuery(uuid) {\n _QueryActions2.default.destroyQuery(uuid);\n }\n }]);\n\n return MySavedQueries;\n}(_react2.default.Component);\n\nfunction truncate(text, length) {\n var output = text || '';\n if (output.length > length) {\n output = output.slice(0, length) + '...';\n }\n return output;\n}\n\nexports.default = MySavedQueries;\n\n//# sourceURL=webpack:///./queryeditor/components/MySavedQueries.jsx?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _QueryStore = __webpack_require__(/*! ../stores/QueryStore */ \"./queryeditor/stores/QueryStore.js\");\n\nvar _QueryStore2 = _interopRequireDefault(_QueryStore);\n\nvar _QueryActions = __webpack_require__(/*! ../actions/QueryActions */ \"./queryeditor/actions/QueryActions.js\");\n\nvar _QueryActions2 = _interopRequireDefault(_QueryActions);\n\nvar _RunActions = __webpack_require__(/*! ../actions/RunActions */ \"./queryeditor/actions/RunActions.js\");\n\nvar _RunActions2 = _interopRequireDefault(_RunActions);\n\nvar _reactBootstrap = __webpack_require__(/*! react-bootstrap */ \"./node_modules/react-bootstrap/esm/index.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nfunction getStateFromStore() {\n return {\n queries: _QueryStore2.default.getCollection().all({\n sort: true\n })\n };\n}\n\nvar MySavedQueries = function (_React$Component) {\n _inherits(MySavedQueries, _React$Component);\n\n function MySavedQueries(props) {\n _classCallCheck(this, MySavedQueries);\n\n var _this = _possibleConstructorReturn(this, (MySavedQueries.__proto__ || Object.getPrototypeOf(MySavedQueries)).call(this, props));\n\n _this.displayName = 'MySavedQueries';\n _this.state = _this.getInitialState();\n _this.maxNumOfQueryLines = _this.props.maxQueryLines === undefined ? 20 : _this.props.maxQueryLines;\n _this.renderChildren = _this.renderChildren.bind(_this);\n _this.renderEmptyMessage = _this.renderEmptyMessage.bind(_this);\n _this._onChange = _this._onChange.bind(_this);\n _this._fetchQueries = _this._fetchQueries.bind(_this);\n _this._runQuery = _this._runQuery.bind(_this);\n _this._deleteQuery = _this._deleteQuery.bind(_this);\n return _this;\n }\n\n _createClass(MySavedQueries, [{\n key: 'getInitialState',\n value: function getInitialState() {\n return getStateFromStore();\n }\n }, {\n key: 'componentDidMount',\n value: function componentDidMount() {\n _QueryStore2.default.listen(this._onChange);\n this._fetchQueries();\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n _QueryStore2.default.unlisten(this._onChange);\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n { className: 'panel-body' },\n _react2.default.createElement(\n 'div',\n null,\n this.renderChildren()\n )\n );\n }\n }, {\n key: 'renderChildren',\n value: function renderChildren() {\n var _this2 = this;\n\n if (this.state.queries.length === 0) {\n return this.renderEmptyMessage();\n } else {\n return this.state.queries.map(function (query) {\n var queryText = query.queryWithPlaceholders.query;\n var noOfLinesInQuery = (queryText.match(/\\n/g) || []).length;\n var linesToShow = noOfLinesInQuery > _this2.maxNumOfQueryLines ? _this2.maxNumOfQueryLines : noOfLinesInQuery;\n linesToShow = linesToShow <= 1 ? 2 : linesToShow;\n var lineHeight = 20;\n var height = linesToShow * lineHeight;\n return _react2.default.createElement(\n 'div',\n { key: query.uuid, className: 'saved-container' },\n _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'h4',\n null,\n query.name\n ),\n _react2.default.createElement(\n 'p',\n null,\n query.description\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'clearfix' },\n _react2.default.createElement(\n 'pre',\n { onClick: _this2._onSelectQuery.bind(null, queryText), style: { height: height } },\n _react2.default.createElement(\n 'code',\n null,\n queryText\n )\n ),\n _react2.default.createElement(\n _reactBootstrap.ButtonToolbar,\n { className: 'pull-right' },\n !query.featured && _react2.default.createElement(\n _reactBootstrap.Button,\n {\n size: \"sm\",\n onClick: _this2._deleteQuery.bind(null, query.uuid) },\n 'Delete'\n ),\n _react2.default.createElement(\n _reactBootstrap.Button,\n {\n className: \"btn btn-success active\",\n size: 'sm',\n variant: \"success\",\n onClick: _this2._runQuery.bind(null, queryText) },\n 'Run'\n )\n )\n )\n );\n });\n }\n }\n }, {\n key: 'renderEmptyMessage',\n value: function renderEmptyMessage() {\n return _react2.default.createElement(\n 'div',\n { className: 'row' },\n _react2.default.createElement(\n 'div',\n { className: 'col-md-12 text-center' },\n 'No sample queries'\n )\n );\n }\n }, {\n key: '_onChange',\n value: function _onChange() {\n this.setState(getStateFromStore());\n }\n }, {\n key: '_fetchQueries',\n value: function _fetchQueries() {\n _QueryActions2.default.fetchSavedQueries();\n }\n }, {\n key: '_onSelectQuery',\n value: function _onSelectQuery(query) {\n _QueryActions2.default.selectQuery({ query: query });\n }\n }, {\n key: '_runQuery',\n value: function _runQuery(queryText) {\n _QueryActions2.default.selectQuery({ query: queryText });\n _RunActions2.default.execute({\n query: queryText\n });\n }\n }, {\n key: '_deleteQuery',\n value: function _deleteQuery(uuid) {\n _QueryActions2.default.destroyQuery(uuid);\n }\n }]);\n\n return MySavedQueries;\n}(_react2.default.Component);\n\nfunction truncate(text, length) {\n var output = text || '';\n if (output.length > length) {\n output = output.slice(0, length) + '...';\n }\n return output;\n}\n\nexports.default = MySavedQueries;\n\n//# sourceURL=webpack:///./queryeditor/components/MySavedQueries.jsx?"); /***/ }), @@ -28679,7 +28679,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _RunActions = __webpack_require__(/*! ../actions/RunActions */ \"./queryeditor/actions/RunActions.js\");\n\nvar _RunActions2 = _interopRequireDefault(_RunActions);\n\nvar _TabActions = __webpack_require__(/*! ../actions/TabActions */ \"./queryeditor/actions/TabActions.js\");\n\nvar _TabActions2 = _interopRequireDefault(_TabActions);\n\nvar _ResultsTable = __webpack_require__(/*! ./ResultsTable */ \"./queryeditor/components/ResultsTable.jsx\");\n\nvar _ResultsTable2 = _interopRequireDefault(_ResultsTable);\n\nvar _TableStore = __webpack_require__(/*! ../stores/TableStore */ \"./queryeditor/stores/TableStore.js\");\n\nvar _TableStore2 = _interopRequireDefault(_TableStore);\n\nvar _TabStore = __webpack_require__(/*! ../stores/TabStore */ \"./queryeditor/stores/TabStore.js\");\n\nvar _TabStore2 = _interopRequireDefault(_TabStore);\n\nvar _AllRunningQueries = __webpack_require__(/*! ./AllRunningQueries */ \"./queryeditor/components/AllRunningQueries.jsx\");\n\nvar _AllRunningQueries2 = _interopRequireDefault(_AllRunningQueries);\n\nvar _DataPreview = __webpack_require__(/*! ./DataPreview */ \"./queryeditor/components/DataPreview.jsx\");\n\nvar _DataPreview2 = _interopRequireDefault(_DataPreview);\n\nvar _TabConstants = __webpack_require__(/*! ../constants/TabConstants */ \"./queryeditor/constants/TabConstants.js\");\n\nvar _TabConstants2 = _interopRequireDefault(_TabConstants);\n\nvar _reactTabs = __webpack_require__(/*! react-tabs */ \"./node_modules/react-tabs/esm/index.js\");\n\nvar _MySavedQueries = __webpack_require__(/*! ./MySavedQueries */ \"./queryeditor/components/MySavedQueries.jsx\");\n\nvar _MySavedQueries2 = _interopRequireDefault(_MySavedQueries);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar QueryInformation = function (_React$Component) {\n _inherits(QueryInformation, _React$Component);\n\n function QueryInformation(props) {\n _classCallCheck(this, QueryInformation);\n\n var _this = _possibleConstructorReturn(this, (QueryInformation.__proto__ || Object.getPrototypeOf(QueryInformation)).call(this, props));\n\n _this.state = {\n tableWidth: 400,\n tableHeight: 400,\n dataPreview: _TableStore2.default.getActiveTable(),\n selectedTab: _TabStore2.default.getSelectedTab()\n };\n _this.QueryInformationRef = _react2.default.createRef();\n _this.update = _this.update.bind(_this);\n _this.onChange = _this.onChange.bind(_this);\n _this.onResize = _this.onResize.bind(_this);\n _this.onTabChange = _this.onTabChange.bind(_this);\n _this.onTabSelect = _this.onTabSelect.bind(_this);\n return _this;\n }\n\n _createClass(QueryInformation, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n _RunActions2.default.connect();\n _TableStore2.default.listen(this.onChange);\n _TabStore2.default.listen(this.onTabChange);\n\n this.update();\n var win = window;\n\n if (win.addEventListener) {\n win.addEventListener('resize', this.onResize, false);\n } else if (win.attachEvent) {\n win.attachEvent('onresize', this.onResize);\n } else {\n win.onresize = this.onResize;\n }\n\n $(window).on('resize', this.update);\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n _RunActions2.default.disconnect();\n _TableStore2.default.unlisten(this.onChange);\n _TabStore2.default.unlisten(this.onTabChange);\n }\n }, {\n key: 'update',\n value: function update() {\n var windowHeight = document.body.clientHeight;\n var windowWidth = document.documentElement.clientWidth;\n var newWidth = windowWidth - 75 - 270 - 10; //left side size\n newWidth = 400 > newWidth ? 400 : newWidth;\n var newHeight = windowHeight - (0.3 * (windowHeight + 50) + 40 + 57 + 46 + 6); // editor + header + tabs + footer+ extra 6(unknown) heights\n newHeight = 400 > newHeight ? 400 : newHeight;\n this.setState({\n tableWidth: newWidth,\n tableHeight: newHeight\n });\n }\n }, {\n key: 'onChange',\n value: function onChange() {\n var table = _TableStore2.default.getActiveTable();\n if (!table) return;\n if (this.state.dataPreview && table.name === this.state.dataPreview.name) return;\n\n this.setState({\n dataPreview: table\n });\n\n // TabActions.selectTab.defer(TabConstants.DATA_PREVIEW);\n }\n }, {\n key: 'onTabChange',\n value: function onTabChange() {\n var selectedTab = _TabStore2.default.getSelectedTab();\n\n this.setState({ selectedTab: selectedTab });\n }\n }, {\n key: 'onResize',\n value: function onResize() {\n this.update();\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n { ref: this.QueryInformationRef, className: 'flex flex-column query-information' },\n _react2.default.createElement(\n _reactTabs.Tabs,\n { className: 'flex', onSelect: this.onTabSelect, selectedIndex: this.state.selectedTab },\n _react2.default.createElement(\n _reactTabs.TabList,\n null,\n _react2.default.createElement(\n _reactTabs.Tab,\n null,\n 'My saved queries'\n ),\n _react2.default.createElement(\n _reactTabs.Tab,\n null,\n 'All queries'\n ),\n _react2.default.createElement(\n _reactTabs.Tab,\n null,\n 'Results'\n ),\n _react2.default.createElement(\n _reactTabs.Tab,\n null,\n 'Data Preview'\n )\n ),\n _react2.default.createElement(\n _reactTabs.TabPanel,\n { style: { height: \"calc(70vh - 200px)\", overflowY: 'auto' } },\n _react2.default.createElement(_MySavedQueries2.default, null)\n ),\n _react2.default.createElement(\n _reactTabs.TabPanel,\n { style: { overflowY: 'auto', height: \"calc(70vh - 200px)\" } },\n _react2.default.createElement(_AllRunningQueries2.default, {\n tableWidth: this.state.tableWidth,\n tableHeight: this.state.tableHeight })\n ),\n _react2.default.createElement(\n _reactTabs.TabPanel,\n { style: { overflowY: 'auto', height: \"calc(70vh - 200px)\" } },\n _react2.default.createElement(_ResultsTable2.default, {\n tableWidth: this.state.tableWidth,\n tableHeight: this.state.tableHeight })\n ),\n _react2.default.createElement(\n _reactTabs.TabPanel,\n { style: { overflowY: 'auto', height: \"calc(70vh - 200px)\" } },\n _react2.default.createElement(_DataPreview2.default, {\n tableWidth: this.state.tableWidth,\n tableHeight: this.state.tableHeight })\n )\n )\n );\n }\n }, {\n key: 'onTabSelect',\n value: function onTabSelect(selectedTab) {\n _TabActions2.default.selectTab(selectedTab);\n }\n }]);\n\n return QueryInformation;\n}(_react2.default.Component);\n\nexports.default = QueryInformation;\n\n//# sourceURL=webpack:///./queryeditor/components/QueryInformation.jsx?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _RunActions = __webpack_require__(/*! ../actions/RunActions */ \"./queryeditor/actions/RunActions.js\");\n\nvar _RunActions2 = _interopRequireDefault(_RunActions);\n\nvar _TabActions = __webpack_require__(/*! ../actions/TabActions */ \"./queryeditor/actions/TabActions.js\");\n\nvar _TabActions2 = _interopRequireDefault(_TabActions);\n\nvar _ResultsTable = __webpack_require__(/*! ./ResultsTable */ \"./queryeditor/components/ResultsTable.jsx\");\n\nvar _ResultsTable2 = _interopRequireDefault(_ResultsTable);\n\nvar _TableStore = __webpack_require__(/*! ../stores/TableStore */ \"./queryeditor/stores/TableStore.js\");\n\nvar _TableStore2 = _interopRequireDefault(_TableStore);\n\nvar _TabStore = __webpack_require__(/*! ../stores/TabStore */ \"./queryeditor/stores/TabStore.js\");\n\nvar _TabStore2 = _interopRequireDefault(_TabStore);\n\nvar _AllRunningQueries = __webpack_require__(/*! ./AllRunningQueries */ \"./queryeditor/components/AllRunningQueries.jsx\");\n\nvar _AllRunningQueries2 = _interopRequireDefault(_AllRunningQueries);\n\nvar _DataPreview = __webpack_require__(/*! ./DataPreview */ \"./queryeditor/components/DataPreview.jsx\");\n\nvar _DataPreview2 = _interopRequireDefault(_DataPreview);\n\nvar _TabConstants = __webpack_require__(/*! ../constants/TabConstants */ \"./queryeditor/constants/TabConstants.js\");\n\nvar _TabConstants2 = _interopRequireDefault(_TabConstants);\n\nvar _reactTabs = __webpack_require__(/*! react-tabs */ \"./node_modules/react-tabs/esm/index.js\");\n\nvar _MySavedQueries = __webpack_require__(/*! ./MySavedQueries */ \"./queryeditor/components/MySavedQueries.jsx\");\n\nvar _MySavedQueries2 = _interopRequireDefault(_MySavedQueries);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar QueryInformation = function (_React$Component) {\n _inherits(QueryInformation, _React$Component);\n\n function QueryInformation(props) {\n _classCallCheck(this, QueryInformation);\n\n var _this = _possibleConstructorReturn(this, (QueryInformation.__proto__ || Object.getPrototypeOf(QueryInformation)).call(this, props));\n\n _this.state = {\n tableWidth: 400,\n tableHeight: 400,\n dataPreview: _TableStore2.default.getActiveTable(),\n selectedTab: _TabStore2.default.getSelectedTab()\n };\n _this.QueryInformationRef = _react2.default.createRef();\n _this.update = _this.update.bind(_this);\n _this.onChange = _this.onChange.bind(_this);\n _this.onResize = _this.onResize.bind(_this);\n _this.onTabChange = _this.onTabChange.bind(_this);\n _this.onTabSelect = _this.onTabSelect.bind(_this);\n return _this;\n }\n\n _createClass(QueryInformation, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n _RunActions2.default.connect();\n _TableStore2.default.listen(this.onChange);\n _TabStore2.default.listen(this.onTabChange);\n\n this.update();\n var win = window;\n\n if (win.addEventListener) {\n win.addEventListener('resize', this.onResize, false);\n } else if (win.attachEvent) {\n win.attachEvent('onresize', this.onResize);\n } else {\n win.onresize = this.onResize;\n }\n\n $(window).on('resize', this.update);\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n _RunActions2.default.disconnect();\n _TableStore2.default.unlisten(this.onChange);\n _TabStore2.default.unlisten(this.onTabChange);\n }\n }, {\n key: 'update',\n value: function update() {\n var windowHeight = document.body.clientHeight;\n var windowWidth = document.documentElement.clientWidth;\n var newWidth = windowWidth - 75 - 270 - 10; //left side size\n newWidth = 400 > newWidth ? 400 : newWidth;\n var newHeight = windowHeight - (0.3 * (windowHeight + 50) + 40 + 57 + 46 + 6); // editor + header + tabs + footer+ extra 6(unknown) heights\n newHeight = 400 > newHeight ? 400 : newHeight;\n this.setState({\n tableWidth: newWidth,\n tableHeight: newHeight\n });\n }\n }, {\n key: 'onChange',\n value: function onChange() {\n var table = _TableStore2.default.getActiveTable();\n if (!table) return;\n if (this.state.dataPreview && table.name === this.state.dataPreview.name) return;\n\n this.setState({\n dataPreview: table\n });\n\n // TabActions.selectTab.defer(TabConstants.DATA_PREVIEW);\n }\n }, {\n key: 'onTabChange',\n value: function onTabChange() {\n var selectedTab = _TabStore2.default.getSelectedTab();\n\n this.setState({ selectedTab: selectedTab });\n }\n }, {\n key: 'onResize',\n value: function onResize() {\n this.update();\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n { ref: this.QueryInformationRef, className: 'flex flex-column query-information' },\n _react2.default.createElement(\n _reactTabs.Tabs,\n { className: 'flex', onSelect: this.onTabSelect, selectedIndex: this.state.selectedTab },\n _react2.default.createElement(\n _reactTabs.TabList,\n null,\n _react2.default.createElement(\n _reactTabs.Tab,\n null,\n 'Sample queries'\n ),\n _react2.default.createElement(\n _reactTabs.Tab,\n null,\n 'All queries'\n ),\n _react2.default.createElement(\n _reactTabs.Tab,\n null,\n 'Results'\n ),\n _react2.default.createElement(\n _reactTabs.Tab,\n null,\n 'Data Preview'\n )\n ),\n _react2.default.createElement(\n _reactTabs.TabPanel,\n { style: { height: \"calc(70vh - 200px)\", overflowY: 'auto' } },\n _react2.default.createElement(_MySavedQueries2.default, null)\n ),\n _react2.default.createElement(\n _reactTabs.TabPanel,\n { style: { overflowY: 'auto', height: \"calc(70vh - 200px)\" } },\n _react2.default.createElement(_AllRunningQueries2.default, {\n tableWidth: this.state.tableWidth,\n tableHeight: this.state.tableHeight })\n ),\n _react2.default.createElement(\n _reactTabs.TabPanel,\n { style: { overflowY: 'auto', height: \"calc(70vh - 200px)\" } },\n _react2.default.createElement(_ResultsTable2.default, {\n tableWidth: this.state.tableWidth,\n tableHeight: this.state.tableHeight })\n ),\n _react2.default.createElement(\n _reactTabs.TabPanel,\n { style: { overflowY: 'auto', height: \"calc(70vh - 200px)\" } },\n _react2.default.createElement(_DataPreview2.default, {\n tableWidth: this.state.tableWidth,\n tableHeight: this.state.tableHeight })\n )\n )\n );\n }\n }, {\n key: 'onTabSelect',\n value: function onTabSelect(selectedTab) {\n _TabActions2.default.selectTab(selectedTab);\n }\n }]);\n\n return QueryInformation;\n}(_react2.default.Component);\n\nexports.default = QueryInformation;\n\n//# sourceURL=webpack:///./queryeditor/components/QueryInformation.jsx?"); /***/ }), @@ -28715,7 +28715,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _react3 = __webpack_require__(/*! @bosket/react */ \"./node_modules/@bosket/react/index.js\");\n\nvar _tools = __webpack_require__(/*! @bosket/tools */ \"./node_modules/@bosket/tools/index.js\");\n\nvar _addcatalog = __webpack_require__(/*! ../../addcatalog */ \"./addcatalog.jsx\");\n\nvar _addcatalog2 = _interopRequireDefault(_addcatalog);\n\nvar _SchemaActions = __webpack_require__(/*! ../actions/SchemaActions */ \"./queryeditor/actions/SchemaActions.js\");\n\nvar _SchemaActions2 = _interopRequireDefault(_SchemaActions);\n\nvar _reactContextmenu = __webpack_require__(/*! react-contextmenu */ \"./node_modules/react-contextmenu/es6/index.js\");\n\nvar _TableActions = __webpack_require__(/*! ../actions/TableActions */ \"./queryeditor/actions/TableActions.js\");\n\nvar _TableActions2 = _interopRequireDefault(_TableActions);\n\nvar _TabActions = __webpack_require__(/*! ../actions/TabActions */ \"./queryeditor/actions/TabActions.js\");\n\nvar _TabActions2 = _interopRequireDefault(_TabActions);\n\nvar _TabConstants = __webpack_require__(/*! ../constants/TabConstants */ \"./queryeditor/constants/TabConstants.js\");\n\nvar _TabConstants2 = _interopRequireDefault(_TabConstants);\n\nvar _lodash = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n\nvar _lodash2 = _interopRequireDefault(_lodash);\n\nvar _QueryActions = __webpack_require__(/*! ../actions/QueryActions */ \"./queryeditor/actions/QueryActions.js\");\n\nvar _QueryActions2 = _interopRequireDefault(_QueryActions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nfunction getIcon(type) {\n switch (type) {\n case _SchemaActions.dataType.TABLE:\n {\n return _react2.default.createElement(\"i\", { className: \"icon fa fa-table valign-middle\" });\n // return (table_view);\n }\n case _SchemaActions.dataType.SCHEMA:\n {\n return _react2.default.createElement(\"i\", { className: \"icon fa fa-database valign-middle\" });\n // return (storage);\n }\n case _SchemaActions.dataType.CATALOG:\n {\n return _react2.default.createElement(\"i\", { className: \"icon fa fa-server valign-middle\" });\n // return (source);\n }\n default:\n {\n return _react2.default.createElement(\n \"i\",\n { className: \"material-icons\" },\n \"dashboard\"\n );\n }\n }\n}\n\nfunction renderItem(tree, item) {\n var style = item.children == undefined || item.children.length == 0 ? { marginLeft: \"14.5px\" } : {};\n var tableStyle = {};\n Object.assign(tableStyle, style, { cursor: \"pointer\" });\n var favorite = tree.isFavorite(item);\n if (item.type == _SchemaActions.dataType.TABLE) {\n if (item.fqn == tree.selectedTableName) {\n tableStyle.color = \"#0000ff\";\n }\n return _react2.default.createElement(\n \"a\",\n { style: tableStyle, id: item.fqn },\n _react2.default.createElement(\n _reactContextmenu.ContextMenuTrigger,\n { id: item.fqn },\n getIcon(item.type),\n _react2.default.createElement(\n \"span\",\n null,\n item.name\n ),\n favorite.found ? _react2.default.createElement(\"i\", { className: \"icon fa fa-star valign-middle schema-tree-icons favorite\" }) : null\n ),\n _react2.default.createElement(\n _reactContextmenu.ContextMenu,\n { id: item.fqn },\n favorite.found && favorite.self ? _react2.default.createElement(\n _reactContextmenu.MenuItem,\n { data: { item: item, tree: tree }, onClick: function onClick(e, data) {\n tree.removeFromFavorites(item);\n } },\n _react2.default.createElement(\"i\", { className: \"icon fa fa-minus-square-o valign-middle contextmenu-icons remove-favorite\" }),\n _react2.default.createElement(\n \"span\",\n null,\n \"Remove from Favorites\"\n )\n ) : _react2.default.createElement(\n _reactContextmenu.MenuItem,\n { data: { item: item, tree: tree }, onClick: function onClick(e, data) {\n tree.addToFavorites(item);\n } },\n _react2.default.createElement(\"i\", { className: \"icon fa fa-star valign-middle contextmenu-icons favorite\" }),\n _react2.default.createElement(\n \"span\",\n null,\n \"Add to Favorites\"\n )\n ),\n _react2.default.createElement(\n _reactContextmenu.MenuItem,\n { data: { item: item, tree: tree }, onClick: function onClick(e, data) {\n data.tree.selectTable(data.item.fqn);\n _TableActions2.default.addTable({\n name: data.item.fqn\n });\n _TableActions2.default.selectTable(data.item.fqn);\n _TabActions2.default.selectLeftPanelTab(_TabConstants2.default.LEFT_PANEL_COLUMNS);\n } },\n _react2.default.createElement(\"i\", { className: \"icon fa fa-columns valign-middle\" }),\n _react2.default.createElement(\n \"span\",\n null,\n \"Show columns\"\n )\n ),\n _react2.default.createElement(\n _reactContextmenu.MenuItem,\n { data: { item: item, tree: tree }, onClick: function onClick(e, data) {\n data.tree.selectTable(data.item.fqn);\n _TableActions2.default.addTable({\n name: data.item.fqn\n });\n _TableActions2.default.selectTable(data.item.fqn);\n _TabActions2.default.selectTab(_TabConstants2.default.DATA_PREVIEW);\n } },\n _react2.default.createElement(\"i\", { className: \"icon fa fa-list valign-middle\" }),\n _react2.default.createElement(\n \"span\",\n null,\n \"Preview data\"\n )\n )\n )\n );\n } else {\n return _react2.default.createElement(\n \"a\",\n { style: tableStyle, id: item.fqn },\n _react2.default.createElement(\n _reactContextmenu.ContextMenuTrigger,\n { id: item.fqn },\n getIcon(item.type),\n _react2.default.createElement(\n \"span\",\n null,\n item.name\n ),\n favorite.found ? _react2.default.createElement(\"i\", { className: favorite.self ? \"icon fa fa-star valign-middle schema-tree-icons favorite\" : \"icon fa fa-star valign-middle schema-tree-icons favoriteParent\" }) : null\n ),\n _react2.default.createElement(\n _reactContextmenu.ContextMenu,\n { id: item.fqn },\n favorite.found && favorite.self ? _react2.default.createElement(\n _reactContextmenu.MenuItem,\n { data: { item: item, tree: tree }, onClick: function onClick(e, data) {\n tree.removeFromFavorites(item);\n } },\n _react2.default.createElement(\"i\", { className: \"icon fa fa-minus-square-o valign-middle contextmenu-icons remove-favorite\" }),\n _react2.default.createElement(\n \"span\",\n null,\n \"Remove from Favorites\"\n )\n ) : _react2.default.createElement(\n _reactContextmenu.MenuItem,\n { data: { item: item, tree: tree }, onClick: function onClick(e, data) {\n tree.addToFavorites(item);\n } },\n _react2.default.createElement(\"i\", { className: \"icon fa fa-star valign-middle contextmenu-icons favorite\" }),\n _react2.default.createElement(\n \"span\",\n null,\n \"Add to Favorites\"\n )\n ),\n item.type == _SchemaActions.dataType.SCHEMA ? _react2.default.createElement(\n _reactContextmenu.MenuItem,\n { data: { item: item, tree: tree }, onClick: function onClick(e, data) {\n _QueryActions2.default.setSessionContext({\n catalog: item.catalog,\n schema: item.name\n });\n } },\n _react2.default.createElement(\"i\", { className: \"icon fa fa-database valign-middle\" }),\n _react2.default.createElement(\n \"span\",\n null,\n \"Use as default\"\n )\n ) : null\n )\n );\n }\n // return ({getIcon(item.type)}{item.name});\n}\n\nfunction sortItems(tree, item1, item2) {\n var isItem1Fav = tree.isFavorite(item1).found;\n var isItem2Fav = tree.isFavorite(item2).found;\n if (isItem1Fav && !isItem2Fav) {\n return -1;\n }\n if (isItem2Fav && !isItem1Fav) {\n return 1;\n }\n if (isItem1Fav && isItem2Fav || !isItem1Fav && !isItem2Fav) {\n return item1.name.localeCompare(item2.name);\n }\n}\n\nvar SchemaTree = function (_React$Component) {\n _inherits(SchemaTree, _React$Component);\n\n function SchemaTree(props) {\n _classCallCheck(this, SchemaTree);\n\n var _this = _possibleConstructorReturn(this, (SchemaTree.__proto__ || Object.getPrototypeOf(SchemaTree)).call(this, props));\n\n _this.state = {\n category: \"children\",\n selection: [],\n onSelect: function onSelect(_) {\n return _this.setState({ selection: _ });\n },\n search: function search(input) {\n return function (i) {\n return (0, _tools.string)(i.name).contains(input);\n };\n },\n display: renderItem.bind(null, _this),\n sort: sortItems.bind(null, _this),\n strategies: {\n selection: [],\n click: [],\n fold: [\"opener-control\"]\n },\n css: { TreeView: \"schema-tree\" },\n openerOpts: {\n position: \"left\"\n },\n height: 0,\n model: _this.getInitialModel(),\n name: \"name\"\n };\n _this.selectedTableName = \"\";\n _this.treeRef = _react2.default.createRef();\n _this.favourites = {\n catalogs: [],\n schemas: [],\n tables: []\n };\n _this.updateTree = _this.updateTree.bind(_this);\n _this.refresh = _this.refresh.bind(_this);\n _this.selectTable = _this.selectTable.bind(_this);\n _this.unselectTable = _this.unselectTable.bind(_this);\n _this.addToFavorites = _this.addToFavorites.bind(_this);\n _this.removeFromFavorites = _this.removeFromFavorites.bind(_this);\n _this.isFavorite = _this.isFavorite.bind(_this);\n _this.refreshItem = _this.refreshItem.bind(_this);\n return _this;\n }\n\n _createClass(SchemaTree, [{\n key: \"updateTree\",\n value: function updateTree() {\n var _this2 = this;\n\n var refresh = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n clearTimeout(this.timer);\n _SchemaActions2.default.fetchSchemas(this.state.model, refresh).then(function (catalogs) {\n return _SchemaActions2.default.fetchTables(catalogs);\n }).then(function (catalogs) {\n var state = _this2.state;\n if (refresh) {\n state.model = [];\n _this2.setState(state);\n state = _this2.state;\n }\n state.model = catalogs;\n _this2.setState(state);\n }).then(function () {\n _this2.timer = setTimeout(_this2.updateTree, 30000);\n });\n }\n }, {\n key: \"refresh\",\n value: function refresh() {\n this.updateTree(true);\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.updateTree();\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n clearTimeout(this.timer);\n }\n }, {\n key: \"getInitialModel\",\n value: function getInitialModel() {\n return [];\n }\n }, {\n key: \"selectTable\",\n value: function selectTable(tableName) {\n this.unselectTable();\n var element = document.getElementById(tableName);\n if (!_lodash2.default.isElement(element)) {\n return;\n }\n element.style.color = \"#0000ff\";\n this.selectedTableName = tableName;\n }\n }, {\n key: \"unselectTable\",\n value: function unselectTable() {\n if (this.selectedTableName == \"\") {\n return;\n }\n var element = document.getElementById(this.selectedTableName);\n this.selectedTableName = \"\";\n if (!_lodash2.default.isElement(element)) {\n return;\n }\n element.style.color = \"#222222\";\n }\n }, {\n key: \"addToFavorites\",\n value: function addToFavorites(item) {\n var catalog = { catalog: item.type == _SchemaActions.dataType.CATALOG ? item.name : item.catalog };\n item.favorite = true;\n if (item.type == _SchemaActions.dataType.CATALOG) {\n var favoriteCatalog = _lodash2.default.find(this.favourites.catalogs, catalog);\n if (_lodash2.default.isUndefined(favoriteCatalog)) {\n this.favourites.catalogs.push(catalog);\n this.refreshItem(item);\n }\n return;\n }\n var schema = { catalog: catalog.catalog, schema: item.type == _SchemaActions.dataType.SCHEMA ? item.name : item.schema };\n if (item.type == _SchemaActions.dataType.SCHEMA) {\n var favoriteSchema = _lodash2.default.find(this.favourites.schemas, schema);\n if (_lodash2.default.isUndefined(favoriteSchema)) {\n this.favourites.schemas.push(schema);\n this.refreshItem(item);\n }\n return;\n }\n var table = { catalog: catalog.catalog, schema: schema.schema, table: item.name };\n var favoriteTable = _lodash2.default.find(this.favourites.tables, table);\n if (_lodash2.default.isUndefined(favoriteTable)) {\n this.favourites.tables.push(table);\n this.refreshItem(item);\n }\n }\n }, {\n key: \"removeFromFavorites\",\n value: function removeFromFavorites(item) {\n item.favorite = false;\n if (item.type == _SchemaActions.dataType.CATALOG) {\n var catalog = { catalog: item.name };\n var index = _lodash2.default.findIndex(this.favourites.catalogs, catalog);\n if (index !== -1) {\n this.favourites.catalogs.splice(index, 1);\n }\n } else if (item.type == _SchemaActions.dataType.SCHEMA) {\n var schema = { catalog: item.catalog, schema: item.name };\n var _index = _lodash2.default.findIndex(this.favourites.schemas, schema);\n if (_index !== -1) {\n this.favourites.schemas.splice(_index, 1);\n }\n } else if (item.type == _SchemaActions.dataType.TABLE) {\n var table = { catalog: item.catalog, schema: item.schema, table: item.name };\n var _index2 = _lodash2.default.findIndex(this.favourites.tables, table);\n if (_index2 !== -1) {\n this.favourites.tables.splice(_index2, 1);\n }\n }\n this.refreshItem(item);\n }\n\n /**\n * Finds whether item is favorite as below.\n * 1. If item is catalog, searches all catalogs,schemas,tables\n * 2. If item is schema, searches in schemas and tables;\n * 3. If item is table, searches in tables;\n * @param item\n * @returns {boolean}\n */\n\n }, {\n key: \"isFavorite\",\n value: function isFavorite(item) {\n var predicate = void 0;\n if (item.type == _SchemaActions.dataType.CATALOG) {\n predicate = { catalog: item.name };\n }\n if (item.type == _SchemaActions.dataType.SCHEMA) {\n predicate = { catalog: item.catalog, schema: item.name };\n }\n if (item.type == _SchemaActions.dataType.TABLE) {\n predicate = { catalog: item.catalog, schema: item.schema, table: item.name };\n }\n if (item.type == _SchemaActions.dataType.CATALOG) {\n var _index3 = _lodash2.default.findIndex(this.favourites.catalogs, predicate);\n if (_index3 !== -1) {\n return { found: true, self: true };\n }\n }\n if (item.type == _SchemaActions.dataType.SCHEMA || item.type == _SchemaActions.dataType.CATALOG) {\n var _index4 = _lodash2.default.findIndex(this.favourites.schemas, predicate);\n if (_index4 !== -1) {\n return { found: true, self: item.type == _SchemaActions.dataType.SCHEMA };\n }\n }\n var index = _lodash2.default.findIndex(this.favourites.tables, predicate);\n if (index !== -1) {\n return { found: true, self: item.type == _SchemaActions.dataType.TABLE };;\n }\n return { found: false, self: false };\n }\n }, {\n key: \"refreshItem\",\n value: function refreshItem(item) {\n var _this3 = this;\n\n var model = this.state.model;\n this.state.model = [];\n this.setState(this.state);\n setTimeout(function () {\n _this3.state.model = model;\n _this3.setState(_this3.state);\n }.bind(model), 100);\n }\n }, {\n key: \"renderButtons\",\n value: function renderButtons() {\n return _react2.default.createElement(\n \"div\",\n { className: \"flex flex-row\", style: { justifyContent: 'space-between' } },\n _react2.default.createElement(_addcatalog2.default, { refreshCallback: this.refresh }),\n _react2.default.createElement(\n \"button\",\n { className: \"btn btn-default\",\n style: { margin: \"10px\" },\n onClick: this.refresh },\n _react2.default.createElement(\"i\", { className: \"fa fa-refresh\", style: { top: '3px', color: '#39b0d2', marginRight: '0' } })\n )\n );\n }\n }, {\n key: \"render\",\n value: function render() {\n if (this.state.model.length == 0) {\n return _react2.default.createElement(\n \"div\",\n { style: { height: this.state.height + 71, minHeight: this.state.height + 71 } },\n this.renderButtons()\n );\n }\n //total height - header - tab header - footer - statusbar - menu bar\n return _react2.default.createElement(\n \"div\",\n null,\n this.renderButtons(),\n _react2.default.createElement(\n \"div\",\n { style: { height: \"calc(100vh - 200px)\" } },\n _react2.default.createElement(_react3.TreeView, _extends({}, this.state, { ref: this.treeRef }))\n )\n );\n }\n }]);\n\n return SchemaTree;\n}(_react2.default.Component);\n\nexports.default = SchemaTree;\n\n//# sourceURL=webpack:///./queryeditor/components/SchemaTree.jsx?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _react3 = __webpack_require__(/*! @bosket/react */ \"./node_modules/@bosket/react/index.js\");\n\nvar _tools = __webpack_require__(/*! @bosket/tools */ \"./node_modules/@bosket/tools/index.js\");\n\nvar _addcatalog = __webpack_require__(/*! ../../addcatalog */ \"./addcatalog.jsx\");\n\nvar _addcatalog2 = _interopRequireDefault(_addcatalog);\n\nvar _SchemaActions = __webpack_require__(/*! ../actions/SchemaActions */ \"./queryeditor/actions/SchemaActions.js\");\n\nvar _SchemaActions2 = _interopRequireDefault(_SchemaActions);\n\nvar _reactContextmenu = __webpack_require__(/*! react-contextmenu */ \"./node_modules/react-contextmenu/es6/index.js\");\n\nvar _TableActions = __webpack_require__(/*! ../actions/TableActions */ \"./queryeditor/actions/TableActions.js\");\n\nvar _TableActions2 = _interopRequireDefault(_TableActions);\n\nvar _TabActions = __webpack_require__(/*! ../actions/TabActions */ \"./queryeditor/actions/TabActions.js\");\n\nvar _TabActions2 = _interopRequireDefault(_TabActions);\n\nvar _TabConstants = __webpack_require__(/*! ../constants/TabConstants */ \"./queryeditor/constants/TabConstants.js\");\n\nvar _TabConstants2 = _interopRequireDefault(_TabConstants);\n\nvar _lodash = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n\nvar _lodash2 = _interopRequireDefault(_lodash);\n\nvar _QueryActions = __webpack_require__(/*! ../actions/QueryActions */ \"./queryeditor/actions/QueryActions.js\");\n\nvar _QueryActions2 = _interopRequireDefault(_QueryActions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nfunction getIcon(type) {\n switch (type) {\n case _SchemaActions.dataType.TABLE:\n {\n return _react2.default.createElement(\"i\", { className: \"icon fa fa-table valign-middle\" });\n // return (table_view);\n }\n case _SchemaActions.dataType.SCHEMA:\n {\n return _react2.default.createElement(\"i\", { className: \"icon fa fa-database valign-middle\" });\n // return (storage);\n }\n case _SchemaActions.dataType.CATALOG:\n {\n return _react2.default.createElement(\"i\", { className: \"icon fa fa-server valign-middle\" });\n // return (source);\n }\n default:\n {\n return _react2.default.createElement(\n \"i\",\n { className: \"material-icons\" },\n \"dashboard\"\n );\n }\n }\n}\n\nfunction renderItem(tree, item) {\n var style = item.children == undefined || item.children.length == 0 ? { marginLeft: \"14.5px\" } : {};\n var tableStyle = {};\n Object.assign(tableStyle, style, { cursor: \"pointer\" });\n var favorite = tree.isFavorite(item);\n if (item.type == _SchemaActions.dataType.TABLE) {\n if (item.fqn == tree.selectedTableName) {\n tableStyle.color = \"#0000ff\";\n }\n return _react2.default.createElement(\n \"a\",\n { style: tableStyle, id: item.fqn },\n _react2.default.createElement(\n _reactContextmenu.ContextMenuTrigger,\n { id: item.fqn },\n getIcon(item.type),\n _react2.default.createElement(\n \"span\",\n null,\n item.name\n ),\n favorite.found ? _react2.default.createElement(\"i\", { className: \"icon fa fa-star valign-middle schema-tree-icons favorite\" }) : null\n ),\n _react2.default.createElement(\n _reactContextmenu.ContextMenu,\n { id: item.fqn },\n favorite.found && favorite.self ? _react2.default.createElement(\n _reactContextmenu.MenuItem,\n { data: { item: item, tree: tree }, onClick: function onClick(e, data) {\n tree.removeFromFavorites(item);\n } },\n _react2.default.createElement(\"i\", { className: \"icon fa fa-minus-square-o valign-middle contextmenu-icons remove-favorite\" }),\n _react2.default.createElement(\n \"span\",\n null,\n \"Remove from Favorites\"\n )\n ) : _react2.default.createElement(\n _reactContextmenu.MenuItem,\n { data: { item: item, tree: tree }, onClick: function onClick(e, data) {\n tree.addToFavorites(item);\n } },\n _react2.default.createElement(\"i\", { className: \"icon fa fa-star valign-middle contextmenu-icons favorite\" }),\n _react2.default.createElement(\n \"span\",\n null,\n \"Add to Favorites\"\n )\n ),\n _react2.default.createElement(\n _reactContextmenu.MenuItem,\n { data: { item: item, tree: tree }, onClick: function onClick(e, data) {\n data.tree.selectTable(data.item.fqn);\n _TableActions2.default.addTable({\n name: data.item.fqn\n });\n _TableActions2.default.selectTable(data.item.fqn);\n _TabActions2.default.selectLeftPanelTab(_TabConstants2.default.LEFT_PANEL_COLUMNS);\n } },\n _react2.default.createElement(\"i\", { className: \"icon fa fa-columns valign-middle\" }),\n _react2.default.createElement(\n \"span\",\n null,\n \"Show columns\"\n )\n ),\n _react2.default.createElement(\n _reactContextmenu.MenuItem,\n { data: { item: item, tree: tree }, onClick: function onClick(e, data) {\n data.tree.selectTable(data.item.fqn);\n _TableActions2.default.addTable({\n name: data.item.fqn\n });\n _TableActions2.default.selectTable(data.item.fqn);\n _TabActions2.default.selectTab(_TabConstants2.default.DATA_PREVIEW);\n } },\n _react2.default.createElement(\"i\", { className: \"icon fa fa-list valign-middle\" }),\n _react2.default.createElement(\n \"span\",\n null,\n \"Preview data\"\n )\n )\n )\n );\n } else {\n return _react2.default.createElement(\n \"a\",\n { style: tableStyle, id: item.fqn },\n _react2.default.createElement(\n _reactContextmenu.ContextMenuTrigger,\n { id: item.fqn },\n getIcon(item.type),\n _react2.default.createElement(\n \"span\",\n null,\n item.name\n ),\n favorite.found ? _react2.default.createElement(\"i\", { className: favorite.self ? \"icon fa fa-star valign-middle schema-tree-icons favorite\" : \"icon fa fa-star valign-middle schema-tree-icons favoriteParent\" }) : null\n ),\n _react2.default.createElement(\n _reactContextmenu.ContextMenu,\n { id: item.fqn },\n favorite.found && favorite.self ? _react2.default.createElement(\n _reactContextmenu.MenuItem,\n { data: { item: item, tree: tree }, onClick: function onClick(e, data) {\n tree.removeFromFavorites(item);\n } },\n _react2.default.createElement(\"i\", { className: \"icon fa fa-minus-square-o valign-middle contextmenu-icons remove-favorite\" }),\n _react2.default.createElement(\n \"span\",\n null,\n \"Remove from Favorites\"\n )\n ) : _react2.default.createElement(\n _reactContextmenu.MenuItem,\n { data: { item: item, tree: tree }, onClick: function onClick(e, data) {\n tree.addToFavorites(item);\n } },\n _react2.default.createElement(\"i\", { className: \"icon fa fa-star valign-middle contextmenu-icons favorite\" }),\n _react2.default.createElement(\n \"span\",\n null,\n \"Add to Favorites\"\n )\n ),\n item.type == _SchemaActions.dataType.CATALOG ? _react2.default.createElement(\n _reactContextmenu.MenuItem,\n { data: { item: item, tree: tree }, onClick: function onClick(e, data) {\n tree.deleteCatalog(item);\n } },\n _react2.default.createElement(\"i\", { className: \"icon fa fa-trash-o valign-middle contextmenu-icons remove-favorite\" }),\n _react2.default.createElement(\n \"span\",\n null,\n \"Delete Catalog\"\n )\n ) : null,\n item.type == _SchemaActions.dataType.SCHEMA ? _react2.default.createElement(\n _reactContextmenu.MenuItem,\n { data: { item: item, tree: tree }, onClick: function onClick(e, data) {\n _QueryActions2.default.setSessionContext({\n catalog: item.catalog,\n schema: item.name\n });\n } },\n _react2.default.createElement(\"i\", { className: \"icon fa fa-database valign-middle\" }),\n _react2.default.createElement(\n \"span\",\n null,\n \"Use as default\"\n )\n ) : null\n )\n );\n }\n // return ({getIcon(item.type)}{item.name});\n}\n\nfunction sortItems(tree, item1, item2) {\n var isItem1Fav = tree.isFavorite(item1).found;\n var isItem2Fav = tree.isFavorite(item2).found;\n if (isItem1Fav && !isItem2Fav) {\n return -1;\n }\n if (isItem2Fav && !isItem1Fav) {\n return 1;\n }\n if (isItem1Fav && isItem2Fav || !isItem1Fav && !isItem2Fav) {\n return item1.name.localeCompare(item2.name);\n }\n}\n\nvar SchemaTree = function (_React$Component) {\n _inherits(SchemaTree, _React$Component);\n\n function SchemaTree(props) {\n _classCallCheck(this, SchemaTree);\n\n var _this = _possibleConstructorReturn(this, (SchemaTree.__proto__ || Object.getPrototypeOf(SchemaTree)).call(this, props));\n\n _this.state = {\n category: \"children\",\n selection: [],\n onSelect: function onSelect(_) {\n return _this.setState({ selection: _ });\n },\n search: function search(input) {\n return function (i) {\n return (0, _tools.string)(i.name).contains(input);\n };\n },\n display: renderItem.bind(null, _this),\n sort: sortItems.bind(null, _this),\n strategies: {\n selection: [],\n click: [],\n fold: [\"opener-control\"]\n },\n css: { TreeView: \"schema-tree\" },\n openerOpts: {\n position: \"left\"\n },\n height: 0,\n model: _this.getInitialModel(),\n name: \"name\"\n };\n _this.selectedTableName = \"\";\n _this.treeRef = _react2.default.createRef();\n _this.favourites = {\n catalogs: [],\n schemas: [],\n tables: []\n };\n _this.updateTree = _this.updateTree.bind(_this);\n _this.refresh = _this.refresh.bind(_this);\n _this.selectTable = _this.selectTable.bind(_this);\n _this.unselectTable = _this.unselectTable.bind(_this);\n _this.addToFavorites = _this.addToFavorites.bind(_this);\n _this.removeFromFavorites = _this.removeFromFavorites.bind(_this);\n _this.isFavorite = _this.isFavorite.bind(_this);\n _this.refreshItem = _this.refreshItem.bind(_this);\n _this.deleteCatalog = _this.deleteCatalog.bind(_this);\n return _this;\n }\n\n _createClass(SchemaTree, [{\n key: \"updateTree\",\n value: function updateTree() {\n var _this2 = this;\n\n var refresh = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n clearTimeout(this.timer);\n _SchemaActions2.default.fetchSchemas(this.state.model, refresh).then(function (catalogs) {\n return _SchemaActions2.default.fetchTables(catalogs);\n }).then(function (catalogs) {\n var state = _this2.state;\n if (refresh) {\n state.model = [];\n _this2.setState(state);\n state = _this2.state;\n }\n state.model = catalogs;\n _this2.setState(state);\n }).then(function () {\n _this2.timer = setTimeout(_this2.updateTree, 30000);\n });\n }\n }, {\n key: \"refresh\",\n value: function refresh() {\n this.updateTree(true);\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.updateTree();\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n clearTimeout(this.timer);\n }\n }, {\n key: \"getInitialModel\",\n value: function getInitialModel() {\n return [];\n }\n }, {\n key: \"selectTable\",\n value: function selectTable(tableName) {\n this.unselectTable();\n var element = document.getElementById(tableName);\n if (!_lodash2.default.isElement(element)) {\n return;\n }\n element.style.color = \"#0000ff\";\n this.selectedTableName = tableName;\n }\n }, {\n key: \"unselectTable\",\n value: function unselectTable() {\n if (this.selectedTableName == \"\") {\n return;\n }\n var element = document.getElementById(this.selectedTableName);\n this.selectedTableName = \"\";\n if (!_lodash2.default.isElement(element)) {\n return;\n }\n element.style.color = \"#222222\";\n }\n }, {\n key: \"deleteCatalog\",\n value: function deleteCatalog(item) {\n var _this3 = this;\n\n if (confirm('Are you sure you want to deletet he catalog?')) {\n _SchemaActions2.default.deleteCatalog(item.name).then(function (res) {\n if (!res.result) {\n if (res.message.indexOf('Not Found (code: 404)') !== -1) {\n alert(\"Error while delete catalog: service is not available. Maybe the catalog is not manually added.\");\n } else {\n alert(\"Error while delete catalog:\" + res.message.split('\\n', 1)[0]);\n }\n } else {\n _this3.refresh();\n }\n });\n }\n }\n }, {\n key: \"addToFavorites\",\n value: function addToFavorites(item) {\n var catalog = { catalog: item.type == _SchemaActions.dataType.CATALOG ? item.name : item.catalog };\n item.favorite = true;\n if (item.type == _SchemaActions.dataType.CATALOG) {\n var favoriteCatalog = _lodash2.default.find(this.favourites.catalogs, catalog);\n if (_lodash2.default.isUndefined(favoriteCatalog)) {\n this.favourites.catalogs.push(catalog);\n this.refreshItem(item);\n }\n return;\n }\n var schema = { catalog: catalog.catalog, schema: item.type == _SchemaActions.dataType.SCHEMA ? item.name : item.schema };\n if (item.type == _SchemaActions.dataType.SCHEMA) {\n var favoriteSchema = _lodash2.default.find(this.favourites.schemas, schema);\n if (_lodash2.default.isUndefined(favoriteSchema)) {\n this.favourites.schemas.push(schema);\n this.refreshItem(item);\n }\n return;\n }\n var table = { catalog: catalog.catalog, schema: schema.schema, table: item.name };\n var favoriteTable = _lodash2.default.find(this.favourites.tables, table);\n if (_lodash2.default.isUndefined(favoriteTable)) {\n this.favourites.tables.push(table);\n this.refreshItem(item);\n }\n }\n }, {\n key: \"removeFromFavorites\",\n value: function removeFromFavorites(item) {\n item.favorite = false;\n if (item.type == _SchemaActions.dataType.CATALOG) {\n var catalog = { catalog: item.name };\n var index = _lodash2.default.findIndex(this.favourites.catalogs, catalog);\n if (index !== -1) {\n this.favourites.catalogs.splice(index, 1);\n }\n } else if (item.type == _SchemaActions.dataType.SCHEMA) {\n var schema = { catalog: item.catalog, schema: item.name };\n var _index = _lodash2.default.findIndex(this.favourites.schemas, schema);\n if (_index !== -1) {\n this.favourites.schemas.splice(_index, 1);\n }\n } else if (item.type == _SchemaActions.dataType.TABLE) {\n var table = { catalog: item.catalog, schema: item.schema, table: item.name };\n var _index2 = _lodash2.default.findIndex(this.favourites.tables, table);\n if (_index2 !== -1) {\n this.favourites.tables.splice(_index2, 1);\n }\n }\n this.refreshItem(item);\n }\n\n /**\n * Finds whether item is favorite as below.\n * 1. If item is catalog, searches all catalogs,schemas,tables\n * 2. If item is schema, searches in schemas and tables;\n * 3. If item is table, searches in tables;\n * @param item\n * @returns {boolean}\n */\n\n }, {\n key: \"isFavorite\",\n value: function isFavorite(item) {\n var predicate = void 0;\n if (item.type == _SchemaActions.dataType.CATALOG) {\n predicate = { catalog: item.name };\n }\n if (item.type == _SchemaActions.dataType.SCHEMA) {\n predicate = { catalog: item.catalog, schema: item.name };\n }\n if (item.type == _SchemaActions.dataType.TABLE) {\n predicate = { catalog: item.catalog, schema: item.schema, table: item.name };\n }\n if (item.type == _SchemaActions.dataType.CATALOG) {\n var _index3 = _lodash2.default.findIndex(this.favourites.catalogs, predicate);\n if (_index3 !== -1) {\n return { found: true, self: true };\n }\n }\n if (item.type == _SchemaActions.dataType.SCHEMA || item.type == _SchemaActions.dataType.CATALOG) {\n var _index4 = _lodash2.default.findIndex(this.favourites.schemas, predicate);\n if (_index4 !== -1) {\n return { found: true, self: item.type == _SchemaActions.dataType.SCHEMA };\n }\n }\n var index = _lodash2.default.findIndex(this.favourites.tables, predicate);\n if (index !== -1) {\n return { found: true, self: item.type == _SchemaActions.dataType.TABLE };;\n }\n return { found: false, self: false };\n }\n }, {\n key: \"refreshItem\",\n value: function refreshItem(item) {\n var _this4 = this;\n\n var model = this.state.model;\n this.state.model = [];\n this.setState(this.state);\n setTimeout(function () {\n _this4.state.model = model;\n _this4.setState(_this4.state);\n }.bind(model), 100);\n }\n }, {\n key: \"renderButtons\",\n value: function renderButtons() {\n return _react2.default.createElement(\n \"div\",\n { className: \"flex flex-row\", style: { justifyContent: 'space-between' } },\n _react2.default.createElement(_addcatalog2.default, { refreshCallback: this.refresh }),\n _react2.default.createElement(\n \"button\",\n { className: \"btn btn-default\",\n style: { margin: \"10px\" },\n onClick: this.refresh },\n _react2.default.createElement(\"i\", { className: \"fa fa-refresh\", style: { top: '3px', color: '#39b0d2', marginRight: '0' } })\n )\n );\n }\n }, {\n key: \"render\",\n value: function render() {\n if (this.state.model.length == 0) {\n return _react2.default.createElement(\n \"div\",\n { style: { height: this.state.height + 71, minHeight: this.state.height + 71 } },\n this.renderButtons()\n );\n }\n //total height - header - tab header - footer - statusbar - menu bar\n return _react2.default.createElement(\n \"div\",\n null,\n this.renderButtons(),\n _react2.default.createElement(\n \"div\",\n { style: { height: \"calc(100vh - 200px)\" } },\n _react2.default.createElement(_react3.TreeView, _extends({}, this.state, { ref: this.treeRef }))\n )\n );\n }\n }]);\n\n return SchemaTree;\n}(_react2.default.Component);\n\nexports.default = SchemaTree;\n\n//# sourceURL=webpack:///./queryeditor/components/SchemaTree.jsx?"); /***/ }), @@ -28727,7 +28727,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n}); /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _utils = __webpack_require__(/*! ../../utils */ \"./utils.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar SPARKLINE_PROPERTIES = {\n width: '4.5vw',\n height: '25px',\n fillColor: '',\n //fillOpacity: .8,\n lineColor: '#000',\n //spotColor: '#1EDCFF',\n tooltipClassname: 'sparkline-tooltip',\n disableHiddenCheck: true,\n spotColor: '',\n highlightSpotColor: '',\n highlightLineColor: '',\n minSpotColor: '',\n maxSpotColor: ''\n};\n\nvar StatusFooter = function (_React$Component) {\n _inherits(StatusFooter, _React$Component);\n\n function StatusFooter(props) {\n _classCallCheck(this, StatusFooter);\n\n var _this = _possibleConstructorReturn(this, (StatusFooter.__proto__ || Object.getPrototypeOf(StatusFooter)).call(this, props));\n\n _this.state = {\n runningQueries: [],\n queuedQueries: [],\n blockedQueries: [],\n activeWorkers: [],\n runningDrivers: [],\n reservedMemory: [],\n totalMemory: 0,\n cpuUsage: [],\n rowInputRate: [],\n byteInputRate: [],\n perWorkerCpuTimeRate: [],\n\n lastRender: null,\n lastRefresh: null,\n\n lastInputRows: null,\n lastInputBytes: null,\n lastCpuTime: null,\n\n initialized: false\n };\n\n _this.refreshLoop = _this.refreshLoop.bind(_this);\n return _this;\n }\n\n _createClass(StatusFooter, [{\n key: \"resetTimer\",\n value: function resetTimer() {\n clearTimeout(this.timeoutId);\n // stop refreshing when query finishes or fails\n if (this.state.query === null || !this.state.ended) {\n this.timeoutId = setTimeout(this.refreshLoop, 1000);\n }\n }\n }, {\n key: \"refreshLoop\",\n value: function refreshLoop() {\n clearTimeout(this.timeoutId); // to stop multiple series of refreshLoop from going on simultaneously\n $.get('../v1/cluster', function (clusterState) {\n\n var newPerWorkerCpuTimeRate = [];\n if (this.state.lastRefresh !== null) {\n var cpuTimeSinceRefresh = clusterState.totalCpuTimeSecs - this.state.lastCpuTime;\n var secsSinceRefresh = (Date.now() - this.state.lastRefresh) / 1000.0;\n\n newPerWorkerCpuTimeRate = (0, _utils.addExponentiallyWeightedToHistory)(cpuTimeSinceRefresh / clusterState.activeWorkers / secsSinceRefresh, this.state.perWorkerCpuTimeRate);\n }\n\n this.setState({\n // instantaneous stats\n runningQueries: (0, _utils.addToHistory)(clusterState.runningQueries, this.state.runningQueries),\n queuedQueries: (0, _utils.addToHistory)(clusterState.queuedQueries, this.state.queuedQueries),\n blockedQueries: (0, _utils.addToHistory)(clusterState.blockedQueries, this.state.blockedQueries),\n activeWorkers: (0, _utils.addToHistory)(clusterState.activeWorkers, this.state.activeWorkers),\n\n // moving averages\n runningDrivers: (0, _utils.addExponentiallyWeightedToHistory)(clusterState.runningDrivers, this.state.runningDrivers),\n reservedMemory: (0, _utils.addExponentiallyWeightedToHistory)(clusterState.reservedMemory, this.state.reservedMemory),\n cpuUsage: (0, _utils.addExponentiallyWeightedToHistory)(clusterState.systemCpuLoad * 100, this.state.cpuUsage),\n totalMemory: clusterState.totalMemory,\n perWorkerCpuTimeRate: newPerWorkerCpuTimeRate,\n lastCpuTime: clusterState.totalCpuTimeSecs,\n\n initialized: true,\n\n lastRefresh: Date.now()\n });\n this.resetTimer();\n }.bind(this)).error(function () {\n this.resetTimer();\n }.bind(this));\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.refreshLoop();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n // prevent multiple calls to componentDidUpdate (resulting from calls to setState or otherwise) within the refresh interval from re-rendering sparklines/charts\n if (this.state.lastRender === null || Date.now() - this.state.lastRender >= 1000) {\n var renderTimestamp = Date.now();\n $('#running-queries-sparkline').sparkline(this.state.runningQueries, $.extend({}, SPARKLINE_PROPERTIES, { chartRangeMin: 0 }));\n $('#blocked-queries-sparkline').sparkline(this.state.blockedQueries, $.extend({}, SPARKLINE_PROPERTIES, { chartRangeMin: 0 }));\n $('#queued-queries-sparkline').sparkline(this.state.queuedQueries, $.extend({}, SPARKLINE_PROPERTIES, { chartRangeMin: 0 }));\n\n $('#active-workers-sparkline').sparkline(this.state.activeWorkers, $.extend({}, SPARKLINE_PROPERTIES, { chartRangeMin: 0 }));\n $('#running-drivers-sparkline').sparkline(this.state.runningDrivers, $.extend({}, SPARKLINE_PROPERTIES, { numberFormatter: _utils.precisionRound }));\n $('#cpu-usage-sparkline').sparkline(this.state.cpuUsage, $.extend({}, SPARKLINE_PROPERTIES, { chartRangeMin: 0, chartRangeMax: 100, numberFormatter: _utils.precisionRound }));\n $('#reserved-memory-sparkline').sparkline(this.state.reservedMemory, $.extend({}, SPARKLINE_PROPERTIES, { numberFormatter: _utils.formatDataSizeBytes }));\n $('#cpu-time-rate-sparkline').sparkline(this.state.perWorkerCpuTimeRate, $.extend({}, SPARKLINE_PROPERTIES, { numberFormatter: _utils.precisionRound }));\n\n this.setState({\n lastRender: renderTimestamp\n });\n }\n $('[data-toggle=\"tooltip\"]').tooltip();\n }\n }, {\n key: \"render\",\n value: function render() {\n return _react2.default.createElement(\n \"div\",\n { className: \"flex\" },\n _react2.default.createElement(\n \"div\",\n { className: \"flex flex-initial\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverview\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIconSetContainer\", style: { minWidth: \"60px\" }, \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Active Workers\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIcon\" },\n _react2.default.createElement(\n \"svg\",\n { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 16\", className: \"bi bi-person-check-fill\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\" },\n _react2.default.createElement(\"path\", { fillRule: \"evenodd\", d: \"M1 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H1zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm9.854-2.854a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 0 1 .708-.708L12.5 7.793l2.646-2.647a.5.5 0 0 1 .708 0z\" })\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewContent\" },\n \" \",\n this.state.activeWorkers[this.state.activeWorkers.length - 1],\n \" \"\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIconSetContainer\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Avg Cluster Cpu Usage\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIcon\" },\n _react2.default.createElement(\n \"svg\",\n { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 16\", className: \"bi bi-cpu-fill cpuIco\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\" },\n _react2.default.createElement(\"path\", { fillRule: \"evenodd\", d: \"M5.5.5a.5.5 0 0 0-1 0V2A2.5 2.5 0 0 0 2 4.5H.5a.5.5 0 0 0 0 1H2v1H.5a.5.5 0 0 0 0 1H2v1H.5a.5.5 0 0 0 0 1H2v1H.5a.5.5 0 0 0 0 1H2A2.5 2.5 0 0 0 4.5 14v1.5a.5.5 0 0 0 1 0V14h1v1.5a.5.5 0 0 0 1 0V14h1v1.5a.5.5 0 0 0 1 0V14h1v1.5a.5.5 0 0 0 1 0V14a2.5 2.5 0 0 0 2.5-2.5h1.5a.5.5 0 0 0 0-1H14v-1h1.5a.5.5 0 0 0 0-1H14v-1h1.5a.5.5 0 0 0 0-1H14v-1h1.5a.5.5 0 0 0 0-1H14A2.5 2.5 0 0 0 11.5 2V.5a.5.5 0 0 0-1 0V2h-1V.5a.5.5 0 0 0-1 0V2h-1V.5a.5.5 0 0 0-1 0V2h-1V.5zm1 4.5A1.5 1.5 0 0 0 5 6.5v3A1.5 1.5 0 0 0 6.5 11h3A1.5 1.5 0 0 0 11 9.5v-3A1.5 1.5 0 0 0 9.5 5h-3zm0 1a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5h-3z\" })\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewContent\" },\n (0, _utils.formatCount)(this.state.cpuUsage[this.state.cpuUsage.length - 1]),\n \"%\"\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewGraph\" },\n _react2.default.createElement(\n \"span\",\n { className: \"sparkline\", id: \"cpu-usage-sparkline\" },\n _react2.default.createElement(\n \"div\",\n { className: \"loader\" },\n \"Loading ...\"\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIconSetContainer\", style: { minWidth: \"calc(10vw + 60px)\" }, \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Used Query Memory\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIcon\" },\n _react2.default.createElement(\n \"svg\",\n { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 16\", className: \"bi bi-grid-3x2-gap-fill ramIco\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\" },\n _react2.default.createElement(\"path\", { d: \"M1 4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V4zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1V4zM1 9a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V9zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V9zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1V9z\" })\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewContent\", style: { minWidth: \"100px\", textAlign: \"center\" } },\n (0, _utils.formatDataSizeBytes)(this.state.reservedMemory[this.state.reservedMemory.length - 1]),\n _react2.default.createElement(\n \"span\",\n { className: \"seprator\" },\n \"/\"\n ),\n (0, _utils.formatDataSizeBytes)(this.state.totalMemory)\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewGraph\" },\n _react2.default.createElement(\n \"span\",\n { className: \"sparkline\", id: \"reserved-memory-sparkline\" },\n _react2.default.createElement(\n \"div\",\n { className: \"loader\" },\n \"Loading ...\"\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIconSetContainer\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Running Queries\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIcon\" },\n _react2.default.createElement(\n \"svg\",\n { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 16\", className: \"bi bi-list-check\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\" },\n _react2.default.createElement(\"path\", { fillRule: \"evenodd\", d: \"M5 11.5a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5zM3.854 2.146a.5.5 0 0 1 0 .708l-1.5 1.5a.5.5 0 0 1-.708 0l-.5-.5a.5.5 0 1 1 .708-.708L2 3.293l1.146-1.147a.5.5 0 0 1 .708 0zm0 4a.5.5 0 0 1 0 .708l-1.5 1.5a.5.5 0 0 1-.708 0l-.5-.5a.5.5 0 1 1 .708-.708L2 7.293l1.146-1.147a.5.5 0 0 1 .708 0zm0 4a.5.5 0 0 1 0 .708l-1.5 1.5a.5.5 0 0 1-.708 0l-.5-.5a.5.5 0 0 1 .708-.708l.146.147 1.146-1.147a.5.5 0 0 1 .708 0z\" })\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewContent\" },\n \" \",\n this.state.runningQueries[this.state.runningQueries.length - 1],\n \" \"\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewGraph\" },\n _react2.default.createElement(\n \"span\",\n { className: \"sparkline\", id: \"running-queries-sparkline\" },\n _react2.default.createElement(\n \"div\",\n { className: \"loader\" },\n \"Loading ...\"\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIconSetContainer\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Queued Queries\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIcon\" },\n _react2.default.createElement(\n \"svg\",\n { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 16\", className: \"bi bi-person-lines-fill\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\" },\n _react2.default.createElement(\"path\", { fillRule: \"evenodd\", d: \"M1 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H1zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm7 1.5a.5.5 0 0 1 .5-.5h2a.5.5 0 0 1 0 1h-2a.5.5 0 0 1-.5-.5zm-2-3a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 1-.5-.5zm2 9a.5.5 0 0 1 .5-.5h2a.5.5 0 0 1 0 1h-2a.5.5 0 0 1-.5-.5z\" })\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewContent\" },\n \" \",\n this.state.queuedQueries[this.state.queuedQueries.length - 1],\n \" \"\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewGraph\" },\n _react2.default.createElement(\n \"span\",\n { className: \"sparkline\", id: \"queued-queries-sparkline\" },\n _react2.default.createElement(\n \"div\",\n { className: \"loader\" },\n \"Loading ...\"\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIconSetContainer\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Blocked Queries\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIcon\" },\n _react2.default.createElement(\n \"svg\",\n { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 16\", className: \"bi bi-slash-circle blockIco\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\" },\n _react2.default.createElement(\"path\", { fillRule: \"evenodd\", d: \"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z\" }),\n _react2.default.createElement(\"path\", { fillRule: \"evenodd\", d: \"M11.854 4.146a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708-.708l7-7a.5.5 0 0 1 .708 0z\" })\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewContent\" },\n \" \",\n this.state.blockedQueries[this.state.blockedQueries.length - 1],\n \" \"\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewGraph\" },\n _react2.default.createElement(\n \"span\",\n { className: \"sparkline\", id: \"blocked-queries-sparkline\" },\n _react2.default.createElement(\n \"div\",\n { className: \"loader\" },\n \"Loading ...\"\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIconSetContainer\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Avg Running Tasks\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIcon\" },\n _react2.default.createElement(\n \"svg\",\n { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 16\", className: \"bi bi-hdd-fill diskIco\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\" },\n _react2.default.createElement(\"path\", { fillRule: \"evenodd\", d: \"M0 10a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-1zm2.5 1a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1zm2 0a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1z\" }),\n _react2.default.createElement(\"path\", { d: \"M.91 7.204A2.993 2.993 0 0 1 2 7h12c.384 0 .752.072 1.09.204l-1.867-3.422A1.5 1.5 0 0 0 11.906 3H4.094a1.5 1.5 0 0 0-1.317.782L.91 7.204z\" })\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewContent\" },\n \" \",\n (0, _utils.formatCount)(this.state.runningDrivers[this.state.runningDrivers.length - 1]),\n \" \"\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewGraph\" },\n _react2.default.createElement(\n \"span\",\n { className: \"sparkline\", id: \"running-drivers-sparkline\" },\n _react2.default.createElement(\n \"div\",\n { className: \"loader\" },\n \"Loading ...\"\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIconSetContainer\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Avg CPU Cycles per Worker\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIcon\" },\n _react2.default.createElement(\n \"svg\",\n { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 16\", className: \"bi bi-list\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\" },\n _react2.default.createElement(\"path\", { fillRule: \"evenodd\", d: \"M2.5 11.5A.5.5 0 0 1 3 11h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4A.5.5 0 0 1 3 7h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4A.5.5 0 0 1 3 3h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5z\" })\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewContent\" },\n \" \",\n (0, _utils.formatCount)(this.state.perWorkerCpuTimeRate[this.state.perWorkerCpuTimeRate.length - 1]),\n \" \"\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewGraph\" },\n _react2.default.createElement(\n \"span\",\n { className: \"sparkline\", id: \"cpu-time-rate-sparkline\" },\n _react2.default.createElement(\n \"div\",\n { className: \"loader\" },\n \"Loading ...\"\n )\n )\n )\n )\n )\n )\n );\n }\n }]);\n\n return StatusFooter;\n}(_react2.default.Component);\n\nexports.default = StatusFooter;\n\n//# sourceURL=webpack:///./queryeditor/components/StatusFooter.jsx?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _utils = __webpack_require__(/*! ../../utils */ \"./utils.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar SPARKLINE_PROPERTIES = {\n width: '4.5vw',\n height: '25px',\n fillColor: '',\n //fillOpacity: .8,\n lineColor: '#000',\n //spotColor: '#1EDCFF',\n tooltipClassname: 'sparkline-tooltip',\n disableHiddenCheck: true,\n spotColor: '',\n highlightSpotColor: '',\n highlightLineColor: '',\n minSpotColor: '',\n maxSpotColor: ''\n};\n\nvar StatusFooter = function (_React$Component) {\n _inherits(StatusFooter, _React$Component);\n\n function StatusFooter(props) {\n _classCallCheck(this, StatusFooter);\n\n var _this = _possibleConstructorReturn(this, (StatusFooter.__proto__ || Object.getPrototypeOf(StatusFooter)).call(this, props));\n\n _this.state = {\n runningQueries: [],\n queuedQueries: [],\n blockedQueries: [],\n activeWorkers: [],\n runningDrivers: [],\n reservedMemory: [],\n totalMemory: 0,\n cpuUsage: [],\n rowInputRate: [],\n byteInputRate: [],\n perWorkerCpuTimeRate: [],\n\n lastRender: null,\n lastRefresh: null,\n\n lastInputRows: null,\n lastInputBytes: null,\n lastCpuTime: null,\n\n initialized: false\n };\n\n _this.refreshLoop = _this.refreshLoop.bind(_this);\n return _this;\n }\n\n _createClass(StatusFooter, [{\n key: \"resetTimer\",\n value: function resetTimer() {\n clearTimeout(this.timeoutId);\n // stop refreshing when query finishes or fails\n if (this.state.query === null || !this.state.ended) {\n this.timeoutId = setTimeout(this.refreshLoop, 1000);\n }\n }\n }, {\n key: \"refreshLoop\",\n value: function refreshLoop() {\n clearTimeout(this.timeoutId); // to stop multiple series of refreshLoop from going on simultaneously\n $.get('../v1/cluster', function (clusterState) {\n\n var newPerWorkerCpuTimeRate = [];\n if (this.state.lastRefresh !== null) {\n var cpuTimeSinceRefresh = clusterState.totalCpuTimeSecs - this.state.lastCpuTime;\n var secsSinceRefresh = (Date.now() - this.state.lastRefresh) / 1000.0;\n\n newPerWorkerCpuTimeRate = (0, _utils.addExponentiallyWeightedToHistory)(cpuTimeSinceRefresh / clusterState.activeWorkers / secsSinceRefresh, this.state.perWorkerCpuTimeRate);\n }\n\n this.setState({\n // instantaneous stats\n runningQueries: (0, _utils.addToHistory)(clusterState.runningQueries, this.state.runningQueries),\n queuedQueries: (0, _utils.addToHistory)(clusterState.queuedQueries, this.state.queuedQueries),\n blockedQueries: (0, _utils.addToHistory)(clusterState.blockedQueries, this.state.blockedQueries),\n activeWorkers: (0, _utils.addToHistory)(clusterState.activeWorkers, this.state.activeWorkers),\n\n // moving averages\n runningDrivers: (0, _utils.addExponentiallyWeightedToHistory)(clusterState.runningDrivers, this.state.runningDrivers),\n reservedMemory: (0, _utils.addExponentiallyWeightedToHistory)(clusterState.reservedMemory, this.state.reservedMemory),\n cpuUsage: (0, _utils.addExponentiallyWeightedToHistory)(clusterState.systemCpuLoad * 100, this.state.cpuUsage),\n totalMemory: clusterState.totalMemory,\n perWorkerCpuTimeRate: newPerWorkerCpuTimeRate,\n lastCpuTime: clusterState.totalCpuTimeSecs,\n\n initialized: true,\n\n lastRefresh: Date.now()\n });\n this.resetTimer();\n }.bind(this)).error(function () {\n this.resetTimer();\n }.bind(this));\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.refreshLoop();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n // prevent multiple calls to componentDidUpdate (resulting from calls to setState or otherwise) within the refresh interval from re-rendering sparklines/charts\n if (this.state.lastRender === null || Date.now() - this.state.lastRender >= 1000) {\n var renderTimestamp = Date.now();\n $('#running-queries-sparkline').sparkline(this.state.runningQueries, $.extend({}, SPARKLINE_PROPERTIES, { chartRangeMin: 0 }));\n $('#blocked-queries-sparkline').sparkline(this.state.blockedQueries, $.extend({}, SPARKLINE_PROPERTIES, { chartRangeMin: 0 }));\n $('#queued-queries-sparkline').sparkline(this.state.queuedQueries, $.extend({}, SPARKLINE_PROPERTIES, { chartRangeMin: 0 }));\n\n $('#active-workers-sparkline').sparkline(this.state.activeWorkers, $.extend({}, SPARKLINE_PROPERTIES, { chartRangeMin: 0 }));\n $('#running-drivers-sparkline').sparkline(this.state.runningDrivers, $.extend({}, SPARKLINE_PROPERTIES, { numberFormatter: _utils.precisionRound }));\n $('#cpu-usage-sparkline').sparkline(this.state.cpuUsage, $.extend({}, SPARKLINE_PROPERTIES, { chartRangeMin: 0, chartRangeMax: 100, numberFormatter: _utils.precisionRound }));\n $('#reserved-memory-sparkline').sparkline(this.state.reservedMemory, $.extend({}, SPARKLINE_PROPERTIES, { numberFormatter: _utils.formatDataSizeBytes }));\n $('#cpu-time-rate-sparkline').sparkline(this.state.perWorkerCpuTimeRate, $.extend({}, SPARKLINE_PROPERTIES, { numberFormatter: _utils.precisionRound }));\n\n this.setState({\n lastRender: renderTimestamp\n });\n }\n $('[data-toggle=\"tooltip\"]').tooltip();\n }\n }, {\n key: \"render\",\n value: function render() {\n return _react2.default.createElement(\n \"div\",\n { className: \"flex\" },\n _react2.default.createElement(\n \"div\",\n { className: \"flex flex-initial\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverview\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIconSetContainer\", style: { minWidth: \"60px\" }, \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Active Workers\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIcon\" },\n _react2.default.createElement(\n \"svg\",\n { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 16\", className: \"bi bi-person-check-fill\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\" },\n _react2.default.createElement(\"path\", { fillRule: \"evenodd\", d: \"M1 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H1zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm9.854-2.854a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 0 1 .708-.708L12.5 7.793l2.646-2.647a.5.5 0 0 1 .708 0z\" })\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewContent\" },\n \" \",\n this.state.activeWorkers[this.state.activeWorkers.length - 1],\n \" \"\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIconSetContainer\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Avg Cluster Cpu Usage\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIcon\" },\n _react2.default.createElement(\n \"svg\",\n { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 16\", className: \"bi bi-cpu-fill cpuIco\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\" },\n _react2.default.createElement(\"path\", { fillRule: \"evenodd\", d: \"M5.5.5a.5.5 0 0 0-1 0V2A2.5 2.5 0 0 0 2 4.5H.5a.5.5 0 0 0 0 1H2v1H.5a.5.5 0 0 0 0 1H2v1H.5a.5.5 0 0 0 0 1H2v1H.5a.5.5 0 0 0 0 1H2A2.5 2.5 0 0 0 4.5 14v1.5a.5.5 0 0 0 1 0V14h1v1.5a.5.5 0 0 0 1 0V14h1v1.5a.5.5 0 0 0 1 0V14h1v1.5a.5.5 0 0 0 1 0V14a2.5 2.5 0 0 0 2.5-2.5h1.5a.5.5 0 0 0 0-1H14v-1h1.5a.5.5 0 0 0 0-1H14v-1h1.5a.5.5 0 0 0 0-1H14v-1h1.5a.5.5 0 0 0 0-1H14A2.5 2.5 0 0 0 11.5 2V.5a.5.5 0 0 0-1 0V2h-1V.5a.5.5 0 0 0-1 0V2h-1V.5a.5.5 0 0 0-1 0V2h-1V.5zm1 4.5A1.5 1.5 0 0 0 5 6.5v3A1.5 1.5 0 0 0 6.5 11h3A1.5 1.5 0 0 0 11 9.5v-3A1.5 1.5 0 0 0 9.5 5h-3zm0 1a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5h-3z\" })\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewContent\" },\n (0, _utils.formatCount)(this.state.cpuUsage[this.state.cpuUsage.length - 1]),\n \"%\"\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewGraph\" },\n _react2.default.createElement(\n \"span\",\n { className: \"sparkline\", id: \"cpu-usage-sparkline\" },\n _react2.default.createElement(\n \"div\",\n { className: \"loader\" },\n \"Loading ...\"\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIconSetContainer\", style: { minWidth: \"calc(10vw + 60px)\" }, \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Used Query Memory\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIcon\" },\n _react2.default.createElement(\n \"svg\",\n { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 16\", className: \"bi bi-grid-3x2-gap-fill ramIco\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\" },\n _react2.default.createElement(\"path\", { d: \"M1 4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V4zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1V4zM1 9a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V9zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V9zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1V9z\" })\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewContent\", style: { minWidth: \"100px\", textAlign: \"center\" } },\n (0, _utils.formatDataSizeBytes)(this.state.reservedMemory[this.state.reservedMemory.length - 1]),\n _react2.default.createElement(\n \"span\",\n { className: \"seprator\" },\n \"/\"\n ),\n (0, _utils.formatDataSizeBytes)(this.state.totalMemory)\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewGraph\" },\n _react2.default.createElement(\n \"span\",\n { className: \"sparkline\", id: \"reserved-memory-sparkline\" },\n _react2.default.createElement(\n \"div\",\n { className: \"loader\" },\n \"Loading ...\"\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIconSetContainer\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Running Queries\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIcon\" },\n _react2.default.createElement(\n \"svg\",\n { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 16\", className: \"bi bi-list-check\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\" },\n _react2.default.createElement(\"path\", { fillRule: \"evenodd\", d: \"M5 11.5a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5zM3.854 2.146a.5.5 0 0 1 0 .708l-1.5 1.5a.5.5 0 0 1-.708 0l-.5-.5a.5.5 0 1 1 .708-.708L2 3.293l1.146-1.147a.5.5 0 0 1 .708 0zm0 4a.5.5 0 0 1 0 .708l-1.5 1.5a.5.5 0 0 1-.708 0l-.5-.5a.5.5 0 1 1 .708-.708L2 7.293l1.146-1.147a.5.5 0 0 1 .708 0zm0 4a.5.5 0 0 1 0 .708l-1.5 1.5a.5.5 0 0 1-.708 0l-.5-.5a.5.5 0 0 1 .708-.708l.146.147 1.146-1.147a.5.5 0 0 1 .708 0z\" })\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewContent\" },\n \" \",\n this.state.runningQueries[this.state.runningQueries.length - 1],\n \" \"\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewGraph\" },\n _react2.default.createElement(\n \"span\",\n { className: \"sparkline\", id: \"running-queries-sparkline\" },\n _react2.default.createElement(\n \"div\",\n { className: \"loader\" },\n \"Loading ...\"\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIconSetContainer\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Queued Queries\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIcon\" },\n _react2.default.createElement(\n \"svg\",\n { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 16\", className: \"bi bi-person-lines-fill\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\" },\n _react2.default.createElement(\"path\", { fillRule: \"evenodd\", d: \"M1 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H1zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm7 1.5a.5.5 0 0 1 .5-.5h2a.5.5 0 0 1 0 1h-2a.5.5 0 0 1-.5-.5zm-2-3a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 1-.5-.5zm2 9a.5.5 0 0 1 .5-.5h2a.5.5 0 0 1 0 1h-2a.5.5 0 0 1-.5-.5z\" })\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewContent\" },\n \" \",\n this.state.queuedQueries[this.state.queuedQueries.length - 1],\n \" \"\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewGraph\" },\n _react2.default.createElement(\n \"span\",\n { className: \"sparkline\", id: \"queued-queries-sparkline\" },\n _react2.default.createElement(\n \"div\",\n { className: \"loader\" },\n \"Loading ...\"\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIconSetContainer\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Blocked Queries\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIcon\" },\n _react2.default.createElement(\n \"svg\",\n { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 16\", className: \"bi bi-slash-circle blockIco\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\" },\n _react2.default.createElement(\"path\", { fillRule: \"evenodd\", d: \"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z\" }),\n _react2.default.createElement(\"path\", { fillRule: \"evenodd\", d: \"M11.854 4.146a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708-.708l7-7a.5.5 0 0 1 .708 0z\" })\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewContent\" },\n \" \",\n this.state.blockedQueries[this.state.blockedQueries.length - 1],\n \" \"\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewGraph\" },\n _react2.default.createElement(\n \"span\",\n { className: \"sparkline\", id: \"blocked-queries-sparkline\" },\n _react2.default.createElement(\n \"div\",\n { className: \"loader\" },\n \"Loading ...\"\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIconSetContainer\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Avg Running Tasks\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIcon\" },\n _react2.default.createElement(\n \"svg\",\n { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 16\", className: \"bi bi-hdd-fill diskIco\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\" },\n _react2.default.createElement(\"path\", { fillRule: \"evenodd\", d: \"M0 10a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-1zm2.5 1a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1zm2 0a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1z\" }),\n _react2.default.createElement(\"path\", { d: \"M.91 7.204A2.993 2.993 0 0 1 2 7h12c.384 0 .752.072 1.09.204l-1.867-3.422A1.5 1.5 0 0 0 11.906 3H4.094a1.5 1.5 0 0 0-1.317.782L.91 7.204z\" })\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewContent\" },\n \" \",\n (0, _utils.formatCount)(this.state.runningDrivers[this.state.runningDrivers.length - 1]),\n \" \"\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewGraph\" },\n _react2.default.createElement(\n \"span\",\n { className: \"sparkline\", id: \"running-drivers-sparkline\" },\n _react2.default.createElement(\n \"div\",\n { className: \"loader\" },\n \"Loading ...\"\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIconSetContainer\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Avg CPU Cycles per Worker\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIcon\" },\n _react2.default.createElement(\n \"svg\",\n { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 16\", className: \"bi bi-list\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\" },\n _react2.default.createElement(\"path\", { fillRule: \"evenodd\", d: \"M2.5 11.5A.5.5 0 0 1 3 11h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4A.5.5 0 0 1 3 7h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4A.5.5 0 0 1 3 3h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5z\" })\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewContent\" },\n \" \",\n (0, _utils.formatCount)(this.state.perWorkerCpuTimeRate[this.state.perWorkerCpuTimeRate.length - 1]),\n \" \"\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewGraph\" },\n _react2.default.createElement(\n \"span\",\n { className: \"sparkline\", id: \"cpu-time-rate-sparkline\" },\n _react2.default.createElement(\n \"div\",\n { className: \"loader\" },\n \"Loading ...\"\n )\n )\n )\n )\n )\n )\n );\n }\n }]);\n\n return StatusFooter;\n}(_react2.default.Component);\n\nexports.default = StatusFooter;\n\n//# sourceURL=webpack:///./queryeditor/components/StatusFooter.jsx?"); /***/ }), @@ -28775,7 +28775,7 @@ eval("/*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar _alt = __webpack_require__(/*! ../alt */ \"./queryeditor/alt.js\");\n\nvar _alt2 = _interopRequireDefault(_alt);\n\nvar _CnxnMonitorActions = __webpack_require__(/*! ../actions/CnxnMonitorActions */ \"./queryeditor/actions/CnxnMonitorActions.js\");\n\nvar _CnxnMonitorActions2 = _interopRequireDefault(_CnxnMonitorActions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar CnxnMonitorStore = function () {\n function CnxnMonitorStore() {\n _classCallCheck(this, CnxnMonitorStore);\n\n this.bindListeners({\n onSubmitSuccess: _CnxnMonitorActions2.default.SUBMIT_SUCCESS,\n onSubmitFailure: _CnxnMonitorActions2.default.SUBMIT_FAILED,\n onPollingFailure: _CnxnMonitorActions2.default.POLLING_FAILED,\n onClear: _CnxnMonitorActions2.default.CLEAR\n });\n this.lastSubmittedQuery = \"\";\n this.lastSubmissionResult = \"\";\n this.pollingFaiureCount = 0;\n this.lastPollingError = \"\";\n this.exportPublicMethods({\n getLastSubmissionResult: this.getLastSubmissionResult,\n getLastSubmittedQuery: this.getLastSubmittedQuery,\n getLastPollingError: this.getLastPollingError\n });\n }\n\n _createClass(CnxnMonitorStore, [{\n key: \"onSubmitSuccess\",\n value: function onSubmitSuccess(query) {\n this.lastSubmittedQuery = query;\n this.lastSubmissionResult = \"\";\n }\n }, {\n key: \"onSubmitFailure\",\n value: function onSubmitFailure(errorInfo) {\n this.lastSubmittedQuery = errorInfo.query;\n this.lastSubmissionResult = errorInfo.error;\n }\n }, {\n key: \"onPollingFailure\",\n value: function onPollingFailure(errorInfo) {\n this.pollingFaiureCount++;\n if (this.pollingFaiureCount < 5) {\n //dont raise the concern until 5 attempts = about 15 seconds when runningQueries present,\n // otherwise about 3min 10 seconds and next every to 5 minutes (if continued).\n return;\n }\n this.lastPollingError = errorInfo.error;\n }\n }, {\n key: \"getLastSubmissionResult\",\n value: function getLastSubmissionResult() {\n return this.getState().lastSubmissionResult;\n }\n }, {\n key: \"getLastSubmittedQuery\",\n value: function getLastSubmittedQuery() {\n return this.getState().lastSubmittedQuery;\n }\n }, {\n key: \"getLastPollingError\",\n value: function getLastPollingError() {\n return this.getState().lastPollingError;\n }\n }, {\n key: \"onClear\",\n value: function onClear() {\n this.pollingFaiureCount = 0;\n this.lastSubmissionResult = \"\";\n this.lastSubmittedQuery = \"\";\n this.lastPollingError = \"\";\n }\n }]);\n\n return CnxnMonitorStore;\n}();\n\nexports.default = _alt2.default.createStore(CnxnMonitorStore, 'CnxnMonitorStore');\n\n//# sourceURL=webpack:///./queryeditor/stores/CnxnMonitorStore.js?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar _alt = __webpack_require__(/*! ../alt */ \"./queryeditor/alt.js\");\n\nvar _alt2 = _interopRequireDefault(_alt);\n\nvar _CnxnMonitorActions = __webpack_require__(/*! ../actions/CnxnMonitorActions */ \"./queryeditor/actions/CnxnMonitorActions.js\");\n\nvar _CnxnMonitorActions2 = _interopRequireDefault(_CnxnMonitorActions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar CnxnMonitorStore = function () {\n function CnxnMonitorStore() {\n _classCallCheck(this, CnxnMonitorStore);\n\n this.bindListeners({\n onSubmitSuccess: _CnxnMonitorActions2.default.SUBMIT_SUCCESS,\n onSubmitFailure: _CnxnMonitorActions2.default.SUBMIT_FAILED,\n onPollingFailure: _CnxnMonitorActions2.default.POLLING_FAILED,\n onClear: _CnxnMonitorActions2.default.CLEAR\n });\n this.lastSubmittedQuery = \"\";\n this.lastSubmissionResult = \"\";\n this.pollingFaiureCount = 0;\n this.lastPollingError = \"\";\n this.exportPublicMethods({\n getLastSubmissionResult: this.getLastSubmissionResult,\n getLastSubmittedQuery: this.getLastSubmittedQuery,\n getLastPollingError: this.getLastPollingError\n });\n }\n\n _createClass(CnxnMonitorStore, [{\n key: \"onSubmitSuccess\",\n value: function onSubmitSuccess(query) {\n this.lastSubmittedQuery = query;\n this.lastSubmissionResult = \"\";\n }\n }, {\n key: \"onSubmitFailure\",\n value: function onSubmitFailure(errorInfo) {\n this.lastSubmittedQuery = errorInfo.query;\n this.lastSubmissionResult = errorInfo.error;\n }\n }, {\n key: \"onPollingFailure\",\n value: function onPollingFailure(errorInfo) {\n this.pollingFaiureCount++;\n if (this.pollingFaiureCount < 5) {\n //dont raise the concern until 5 attempts = about 15 seconds when runningQueries present,\n // otherwise about 3min 10 seconds and next every to 5 minutes (if continued).\n return;\n }\n this.lastPollingError = errorInfo.error;\n }\n }, {\n key: \"getLastSubmissionResult\",\n value: function getLastSubmissionResult() {\n return this.getState().lastSubmissionResult;\n }\n }, {\n key: \"getLastSubmittedQuery\",\n value: function getLastSubmittedQuery() {\n return this.getState().lastSubmittedQuery;\n }\n }, {\n key: \"getLastPollingError\",\n value: function getLastPollingError() {\n return this.getState().lastPollingError;\n }\n }, {\n key: \"onClear\",\n value: function onClear() {\n this.pollingFaiureCount = 0;\n this.lastSubmissionResult = \"\";\n this.lastSubmittedQuery = \"\";\n this.lastPollingError = \"\";\n }\n }]);\n\n return CnxnMonitorStore;\n}();\n\nexports.default = _alt2.default.createStore(CnxnMonitorStore, 'CnxnMonitorStore');\n\n//# sourceURL=webpack:///./queryeditor/stores/CnxnMonitorStore.js?"); /***/ }), @@ -28787,7 +28787,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n}); /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar _alt = __webpack_require__(/*! ../alt */ \"./queryeditor/alt.js\");\n\nvar _alt2 = _interopRequireDefault(_alt);\n\nvar _FluxCollection = __webpack_require__(/*! ../utils/FluxCollection */ \"./queryeditor/utils/FluxCollection.js\");\n\nvar _FluxCollection2 = _interopRequireDefault(_FluxCollection);\n\nvar _ConnectorActions = __webpack_require__(/*! ../actions/ConnectorActions */ \"./queryeditor/actions/ConnectorActions.js\");\n\nvar _ConnectorActions2 = _interopRequireDefault(_ConnectorActions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar ConnectorStore = function () {\n function ConnectorStore() {\n _classCallCheck(this, ConnectorStore);\n\n // handle store listeners\n this.bindListeners({\n onReceivedConnectors: _ConnectorActions2.default.RECEIVED_CONNECTORS,\n onReceivedConnector: _ConnectorActions2.default.RECEIVED_CONNECTOR\n });\n\n // export methods we can use\n this.exportPublicMethods({\n getCollection: this.getCollection\n });\n\n // state\n this.collection = new _FluxCollection2.default({\n comparator: function comparator(model, index) {\n return -1 * index;\n }\n });\n }\n\n _createClass(ConnectorStore, [{\n key: 'onReceivedConnector',\n value: function onReceivedConnector(connector) {\n this.collection.add(connector);\n }\n }, {\n key: 'onReceivedConnectors',\n value: function onReceivedConnectors(connectors) {\n this.collection.add(connectors);\n }\n }, {\n key: 'getCollection',\n value: function getCollection() {\n return this.getState().collection;\n }\n }]);\n\n return ConnectorStore;\n}();\n\nexports.default = _alt2.default.createStore(ConnectorStore, 'ConnectorStore');\n\n//# sourceURL=webpack:///./queryeditor/stores/ConnectorStore.js?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar _alt = __webpack_require__(/*! ../alt */ \"./queryeditor/alt.js\");\n\nvar _alt2 = _interopRequireDefault(_alt);\n\nvar _FluxCollection = __webpack_require__(/*! ../utils/FluxCollection */ \"./queryeditor/utils/FluxCollection.js\");\n\nvar _FluxCollection2 = _interopRequireDefault(_FluxCollection);\n\nvar _ConnectorActions = __webpack_require__(/*! ../actions/ConnectorActions */ \"./queryeditor/actions/ConnectorActions.js\");\n\nvar _ConnectorActions2 = _interopRequireDefault(_ConnectorActions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar ConnectorStore = function () {\n function ConnectorStore() {\n _classCallCheck(this, ConnectorStore);\n\n // handle store listeners\n this.bindListeners({\n onReceivedConnectors: _ConnectorActions2.default.RECEIVED_CONNECTORS,\n onReceivedConnector: _ConnectorActions2.default.RECEIVED_CONNECTOR\n });\n\n // export methods we can use\n this.exportPublicMethods({\n getCollection: this.getCollection\n });\n\n // state\n this.collection = new _FluxCollection2.default({\n comparator: function comparator(model, index) {\n return -1 * index;\n }\n });\n }\n\n _createClass(ConnectorStore, [{\n key: 'onReceivedConnector',\n value: function onReceivedConnector(connector) {\n this.collection.add(connector);\n }\n }, {\n key: 'onReceivedConnectors',\n value: function onReceivedConnectors(connectors) {\n this.collection.add(connectors);\n }\n }, {\n key: 'getCollection',\n value: function getCollection() {\n return this.getState().collection;\n }\n }]);\n\n return ConnectorStore;\n}();\n\nexports.default = _alt2.default.createStore(ConnectorStore, 'ConnectorStore');\n\n//# sourceURL=webpack:///./queryeditor/stores/ConnectorStore.js?"); /***/ }), @@ -28835,7 +28835,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar _alt = __webpack_require__(/*! ../alt */ \"./queryeditor/alt.js\");\n\nvar _alt2 = _interopRequireDefault(_alt);\n\nvar _SchemaActions = __webpack_require__(/*! ../actions/SchemaActions */ \"./queryeditor/actions/SchemaActions.js\");\n\nvar _SchemaActions2 = _interopRequireDefault(_SchemaActions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar SchemaStore = function () {\n function SchemaStore() {\n _classCallCheck(this, SchemaStore);\n\n this.bindListeners({\n onUpdateSchemas: _SchemaActions2.default.UPDATE_SCHEMAS,\n onUpdateTables: _SchemaActions2.default.UPDATE_TABLES\n });\n this.exportPublicMethods({\n getModel: this.getModel\n });\n this.model = [];\n }\n\n _createClass(SchemaStore, [{\n key: 'onUpdateSchemas',\n value: function onUpdateSchemas(model) {\n this.model = model;\n }\n }, {\n key: 'onUpdateTables',\n value: function onUpdateTables(model) {\n this.model = model;\n }\n }, {\n key: 'getModel',\n value: function getModel() {\n return this.getState().model;\n }\n }, {\n key: 'getLastSubmittedQuery',\n value: function getLastSubmittedQuery() {\n return this.getState().lastSubmittedQuery;\n }\n }, {\n key: 'getLastPollingError',\n value: function getLastPollingError() {\n return this.getState().lastPollingError;\n }\n }]);\n\n return SchemaStore;\n}();\n\nexports.default = _alt2.default.createStore(SchemaStore, 'SchemaStore');\n\n//# sourceURL=webpack:///./queryeditor/stores/SchemaStore.js?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar _alt = __webpack_require__(/*! ../alt */ \"./queryeditor/alt.js\");\n\nvar _alt2 = _interopRequireDefault(_alt);\n\nvar _SchemaActions = __webpack_require__(/*! ../actions/SchemaActions */ \"./queryeditor/actions/SchemaActions.js\");\n\nvar _SchemaActions2 = _interopRequireDefault(_SchemaActions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar SchemaStore = function () {\n function SchemaStore() {\n _classCallCheck(this, SchemaStore);\n\n this.bindListeners({\n onUpdateSchemas: _SchemaActions2.default.UPDATE_SCHEMAS,\n onUpdateTables: _SchemaActions2.default.UPDATE_TABLES\n });\n this.exportPublicMethods({\n getModel: this.getModel\n });\n this.model = [];\n }\n\n _createClass(SchemaStore, [{\n key: 'onUpdateSchemas',\n value: function onUpdateSchemas(model) {\n this.model = model;\n }\n }, {\n key: 'onUpdateTables',\n value: function onUpdateTables(model) {\n this.model = model;\n }\n }, {\n key: 'getModel',\n value: function getModel() {\n return this.getState().model;\n }\n }, {\n key: 'getLastSubmittedQuery',\n value: function getLastSubmittedQuery() {\n return this.getState().lastSubmittedQuery;\n }\n }, {\n key: 'getLastPollingError',\n value: function getLastPollingError() {\n return this.getState().lastPollingError;\n }\n }]);\n\n return SchemaStore;\n}();\n\nexports.default = _alt2.default.createStore(SchemaStore, 'SchemaStore');\n\n//# sourceURL=webpack:///./queryeditor/stores/SchemaStore.js?"); /***/ }), @@ -28859,7 +28859,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar _fqn = __webpack_require__(/*! ../utils/fqn */ \"./queryeditor/utils/fqn.js\");\n\nvar _fqn2 = _interopRequireDefault(_fqn);\n\nvar _TableActions = __webpack_require__(/*! ../actions/TableActions */ \"./queryeditor/actions/TableActions.js\");\n\nvar _TableActions2 = _interopRequireDefault(_TableActions);\n\nvar _lodash = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n\nvar _lodash2 = _interopRequireDefault(_lodash);\n\nvar _alt = __webpack_require__(/*! ../alt */ \"./queryeditor/alt.js\");\n\nvar _alt2 = _interopRequireDefault(_alt);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar TableStore = function () {\n function TableStore() {\n _classCallCheck(this, TableStore);\n\n this.bindListeners({\n onAddTable: _TableActions2.default.ADD_TABLE,\n onRemoveTable: _TableActions2.default.REMOVE_TABLE,\n onSelectTable: _TableActions2.default.SELECT_TABLE,\n onUnselectTable: _TableActions2.default.UNSELECT_TABLE,\n onSelectPartition: _TableActions2.default.SELECT_PARTITION,\n onUnselectPartition: _TableActions2.default.UNSELECT_PARTITION,\n onFetchTables: _TableActions2.default.FETCH_TABLES,\n onSetTableColumnWidth: _TableActions2.default.SET_TABLE_COLUMN_WIDTH,\n onReceivedTableData: _TableActions2.default.RECEIVED_TABLE_DATA,\n onReceivedPartitionData: _TableActions2.default.RECEIVED_PARTITION_DATA\n });\n\n this.exportPublicMethods({\n getActiveTable: this.getActiveTable,\n getAll: this.getAll,\n containsTable: this.containsTable\n });\n\n this.tables = [];\n this.activeTable = null;\n }\n\n _createClass(TableStore, [{\n key: 'getByName',\n value: function getByName(name) {\n if (_lodash2.default.isEmpty(this.tables)) {\n return undefined;\n }\n\n return _lodash2.default.find(this.tables, { name: name });\n }\n }, {\n key: 'getPartitionByValue',\n value: function getPartitionByValue(value) {\n var table = this.activeTable;\n\n if (_lodash2.default.isEmpty(table) || _lodash2.default.isEmpty(table.partitions)) {\n return undefined;\n }\n\n return _lodash2.default.find(table.partitions, { value: value });\n }\n }, {\n key: 'unmarkActiveTables',\n value: function unmarkActiveTables() {\n this.tables.forEach(function (table) {\n if (table.active) {\n // Change the active state of the table\n table.active = false;\n }\n });\n\n this.activeTable = null;\n }\n }, {\n key: 'unmarkActive',\n value: function unmarkActive(name) {\n var table = this.getByName(name);\n\n if (table === undefined) {\n return;\n }\n\n table.active = false;\n table.activePartition = null;\n\n this.activeTable = null;\n }\n }, {\n key: 'markActive',\n value: function markActive(name) {\n // Unmark the whole collection first\n this.unmarkActiveTables();\n\n // Mark the table as active\n var table = this.getByName(name);\n\n if (!table) {\n return;\n }\n\n table.active = true;\n this.activeTable = table;\n }\n }, {\n key: 'markActivePartition',\n value: function markActivePartition(tableName, partition) {\n var table = this.getByName(tableName);\n if (table && !!partition) {\n table.activePartition = partition;\n }\n }\n }, {\n key: 'unmarkActivePartition',\n value: function unmarkActivePartition(tableName, partition) {\n var table = this.getByName(tableName);\n if (table && table.activePartition == partition) {\n table.activePartition = null;\n table.data = table.defaultData;\n }\n }\n }, {\n key: 'onAddTable',\n value: function onAddTable(table) {\n if (this.getByName(table.name) !== undefined) {\n return;\n }\n\n // Unmark the whole collection\n this.unmarkActiveTables();\n\n // Enrich the table with some extra data (active status and url)\n table = _lodash2.default.extend(table, {\n active: true,\n url: '/api/table/' + _fqn2.default.schema(table.name) + '/' + _fqn2.default.table(table.name),\n partitions: []\n });\n\n this.tables = []; //for now clear everything else and keep only this\n // Add the table to the collection\n this.tables.push(table);\n\n _TableActions2.default.fetchTable(table);\n }\n }, {\n key: 'onRemoveTable',\n value: function onRemoveTable(name) {\n var table = this.getByName(name);\n\n if (table === undefined) {\n return;\n }\n\n if (table.activePartition) {\n table.activePartition = null;\n }\n\n this.unmarkActiveTables();\n\n // Remove the table from the collection\n this.tables = _lodash2.default.reject(this.tables, { name: name });\n\n // Check or we can make an other table active\n if (this.tables.length > 0) {\n table = _lodash2.default.first(this.tables);\n this.markActive(table.name);\n }\n }\n }, {\n key: 'onSelectTable',\n value: function onSelectTable(name) {\n this.markActive(name);\n }\n }, {\n key: 'onUnselectTable',\n value: function onUnselectTable(name) {\n this.unmarkActive(name);\n }\n }, {\n key: 'onSelectPartition',\n value: function onSelectPartition(data) {\n if (!data || !data.partition || !data.table) {\n return;\n }\n\n var partition = data.partition,\n tableName = data.table;\n\n var _partition$split = partition.split('='),\n _partition$split2 = _slicedToArray(_partition$split, 2),\n name = _partition$split2[0],\n value = _partition$split2[1];\n\n var table = this.getByName(tableName);\n\n if (!table) {\n return;\n }\n\n _TableActions2.default.fetchTablePreview(table, name, value);\n\n this.markActivePartition(tableName, partition);\n }\n }, {\n key: 'onUnselectPartition',\n value: function onUnselectPartition(data) {\n if (!data || !data.partition || !data.table) {\n return;\n }\n\n var partition = data.partition,\n table = data.table;\n\n var _partition$split3 = partition.split('='),\n _partition$split4 = _slicedToArray(_partition$split3, 2),\n name = _partition$split4[0],\n value = _partition$split4[1];\n\n this.unmarkActivePartition(table, partition);\n }\n }, {\n key: 'onReceivedTableData',\n value: function onReceivedTableData(_ref) {\n var refTable = _ref.table,\n columns = _ref.columns,\n data = _ref.data;\n\n // Get the right table first\n var table = this.getByName(refTable.name);\n\n if (table === undefined) {\n return;\n }\n\n // Add the changed data to the table\n table = _lodash2.default.extend(table, {\n columns: columns,\n data: data,\n columnWidths: columns.map(function () {\n return 120;\n }),\n defaultData: data\n });\n\n this.markMostRecentPartitionAsActive(table);\n }\n }, {\n key: 'markMostRecentPartitionAsActive',\n value: function markMostRecentPartitionAsActive(table) {\n // We special case common date partitions for usability.\n var datePartition = null;\n\n if (!table || !table.partitions || _lodash2.default.isEmpty(table.partitions)) {\n return;\n }\n\n _lodash2.default.first(table.partitions, function (partition) {\n if (partition.name === 'ds') {\n datePartition = 'ds';\n return true;\n } else if (partition.name === 'd') {\n datePartition = 'd';\n return true;\n }\n });\n\n if (datePartition != null) {\n var datePartitions = _lodash2.default.where(table.partitions, { name: datePartition });\n var recentPartitions = _lodash2.default.sortBy(datePartitions, function (partition) {\n return partition.value;\n });\n var recentPartition = _lodash2.default.last(recentPartitions);\n var recentPartitionStr = [recentPartition.name, recentPartition.value].join('=');\n\n table.activePartition = recentPartitionStr;\n\n this.onSelectPartition({\n table: table.name,\n partition: recentPartitionStr\n });\n }\n }\n }, {\n key: 'onFetchTables',\n value: function onFetchTables(tables) {\n this.tables = tables;\n }\n }, {\n key: 'onReceivedPartitionData',\n value: function onReceivedPartitionData(_ref2) {\n var refTable = _ref2.table,\n _ref2$partition = _ref2.partition,\n name = _ref2$partition.name,\n value = _ref2$partition.value,\n data = _ref2.data;\n\n var table = this.getByName(refTable.name);\n\n if (table === undefined || table.activePartition !== [name, value].join('=')) {\n return;\n }\n\n _lodash2.default.extend(table, {\n data: data\n });\n }\n }, {\n key: 'onSetTableColumnWidth',\n value: function onSetTableColumnWidth(_ref3) {\n var columnIdx = _ref3.columnIdx,\n width = _ref3.width;\n\n var table = this.activeTable;\n\n if (table === undefined) {\n return;\n }\n\n table.columnWidths[columnIdx] = width;\n }\n }, {\n key: 'getAll',\n value: function getAll() {\n return this.tables;\n }\n }, {\n key: 'getActiveTable',\n value: function getActiveTable() {\n return this.getState().activeTable;\n }\n }, {\n key: 'containsTable',\n value: function containsTable(name) {\n var _getState = this.getState(),\n tables = _getState.tables;\n\n return !!_lodash2.default.find(tables, { name: name });\n }\n }]);\n\n return TableStore;\n}();\n\nexports.default = _alt2.default.createStore(TableStore, 'TableStore');\n\n//# sourceURL=webpack:///./queryeditor/stores/TableStore.js?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar _fqn = __webpack_require__(/*! ../utils/fqn */ \"./queryeditor/utils/fqn.js\");\n\nvar _fqn2 = _interopRequireDefault(_fqn);\n\nvar _TableActions = __webpack_require__(/*! ../actions/TableActions */ \"./queryeditor/actions/TableActions.js\");\n\nvar _TableActions2 = _interopRequireDefault(_TableActions);\n\nvar _lodash = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n\nvar _lodash2 = _interopRequireDefault(_lodash);\n\nvar _alt = __webpack_require__(/*! ../alt */ \"./queryeditor/alt.js\");\n\nvar _alt2 = _interopRequireDefault(_alt);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar TableStore = function () {\n function TableStore() {\n _classCallCheck(this, TableStore);\n\n this.bindListeners({\n onAddTable: _TableActions2.default.ADD_TABLE,\n onRemoveTable: _TableActions2.default.REMOVE_TABLE,\n onSelectTable: _TableActions2.default.SELECT_TABLE,\n onUnselectTable: _TableActions2.default.UNSELECT_TABLE,\n onSelectPartition: _TableActions2.default.SELECT_PARTITION,\n onUnselectPartition: _TableActions2.default.UNSELECT_PARTITION,\n onFetchTables: _TableActions2.default.FETCH_TABLES,\n onSetTableColumnWidth: _TableActions2.default.SET_TABLE_COLUMN_WIDTH,\n onReceivedTableData: _TableActions2.default.RECEIVED_TABLE_DATA,\n onReceivedPartitionData: _TableActions2.default.RECEIVED_PARTITION_DATA\n });\n\n this.exportPublicMethods({\n getActiveTable: this.getActiveTable,\n getAll: this.getAll,\n containsTable: this.containsTable\n });\n\n this.tables = [];\n this.activeTable = null;\n }\n\n _createClass(TableStore, [{\n key: 'getByName',\n value: function getByName(name) {\n if (_lodash2.default.isEmpty(this.tables)) {\n return undefined;\n }\n\n return _lodash2.default.find(this.tables, { name: name });\n }\n }, {\n key: 'getPartitionByValue',\n value: function getPartitionByValue(value) {\n var table = this.activeTable;\n\n if (_lodash2.default.isEmpty(table) || _lodash2.default.isEmpty(table.partitions)) {\n return undefined;\n }\n\n return _lodash2.default.find(table.partitions, { value: value });\n }\n }, {\n key: 'unmarkActiveTables',\n value: function unmarkActiveTables() {\n this.tables.forEach(function (table) {\n if (table.active) {\n // Change the active state of the table\n table.active = false;\n }\n });\n\n this.activeTable = null;\n }\n }, {\n key: 'unmarkActive',\n value: function unmarkActive(name) {\n var table = this.getByName(name);\n\n if (table === undefined) {\n return;\n }\n\n table.active = false;\n table.activePartition = null;\n\n this.activeTable = null;\n }\n }, {\n key: 'markActive',\n value: function markActive(name) {\n // Unmark the whole collection first\n this.unmarkActiveTables();\n\n // Mark the table as active\n var table = this.getByName(name);\n\n if (!table) {\n return;\n }\n\n table.active = true;\n this.activeTable = table;\n }\n }, {\n key: 'markActivePartition',\n value: function markActivePartition(tableName, partition) {\n var table = this.getByName(tableName);\n if (table && !!partition) {\n table.activePartition = partition;\n }\n }\n }, {\n key: 'unmarkActivePartition',\n value: function unmarkActivePartition(tableName, partition) {\n var table = this.getByName(tableName);\n if (table && table.activePartition == partition) {\n table.activePartition = null;\n table.data = table.defaultData;\n }\n }\n }, {\n key: 'onAddTable',\n value: function onAddTable(table) {\n // Unmark the whole collection\n this.unmarkActiveTables();\n\n // Enrich the table with some extra data (active status and url)\n table = _lodash2.default.extend(table, {\n active: true,\n url: '/api/table/' + _fqn2.default.schema(table.name) + '/' + _fqn2.default.table(table.name),\n partitions: []\n });\n\n this.tables = []; //for now clear everything else and keep only this\n // Add the table to the collection\n this.tables.push(table);\n\n _TableActions2.default.fetchTable(table);\n }\n }, {\n key: 'onRemoveTable',\n value: function onRemoveTable(name) {\n var table = this.getByName(name);\n\n if (table === undefined) {\n return;\n }\n\n if (table.activePartition) {\n table.activePartition = null;\n }\n\n this.unmarkActiveTables();\n\n // Remove the table from the collection\n this.tables = _lodash2.default.reject(this.tables, { name: name });\n\n // Check or we can make an other table active\n if (this.tables.length > 0) {\n table = _lodash2.default.first(this.tables);\n this.markActive(table.name);\n }\n }\n }, {\n key: 'onSelectTable',\n value: function onSelectTable(name) {\n this.markActive(name);\n }\n }, {\n key: 'onUnselectTable',\n value: function onUnselectTable(name) {\n this.unmarkActive(name);\n }\n }, {\n key: 'onSelectPartition',\n value: function onSelectPartition(data) {\n if (!data || !data.partition || !data.table) {\n return;\n }\n\n var partition = data.partition,\n tableName = data.table;\n\n var _partition$split = partition.split('='),\n _partition$split2 = _slicedToArray(_partition$split, 2),\n name = _partition$split2[0],\n value = _partition$split2[1];\n\n var table = this.getByName(tableName);\n\n if (!table) {\n return;\n }\n\n _TableActions2.default.fetchTablePreview(table, name, value);\n\n this.markActivePartition(tableName, partition);\n }\n }, {\n key: 'onUnselectPartition',\n value: function onUnselectPartition(data) {\n if (!data || !data.partition || !data.table) {\n return;\n }\n\n var partition = data.partition,\n table = data.table;\n\n var _partition$split3 = partition.split('='),\n _partition$split4 = _slicedToArray(_partition$split3, 2),\n name = _partition$split4[0],\n value = _partition$split4[1];\n\n this.unmarkActivePartition(table, partition);\n }\n }, {\n key: 'onReceivedTableData',\n value: function onReceivedTableData(_ref) {\n var refTable = _ref.table,\n columns = _ref.columns,\n data = _ref.data;\n\n // Get the right table first\n var table = this.getByName(refTable.name);\n\n if (table === undefined) {\n return;\n }\n\n // Add the changed data to the table\n table = _lodash2.default.extend(table, {\n columns: columns,\n data: data,\n columnWidths: columns.map(function () {\n return 120;\n }),\n defaultData: data\n });\n\n this.markMostRecentPartitionAsActive(table);\n }\n }, {\n key: 'markMostRecentPartitionAsActive',\n value: function markMostRecentPartitionAsActive(table) {\n // We special case common date partitions for usability.\n var datePartition = null;\n\n if (!table || !table.partitions || _lodash2.default.isEmpty(table.partitions)) {\n return;\n }\n\n _lodash2.default.first(table.partitions, function (partition) {\n if (partition.name === 'ds') {\n datePartition = 'ds';\n return true;\n } else if (partition.name === 'd') {\n datePartition = 'd';\n return true;\n }\n });\n\n if (datePartition != null) {\n var datePartitions = _lodash2.default.where(table.partitions, { name: datePartition });\n var recentPartitions = _lodash2.default.sortBy(datePartitions, function (partition) {\n return partition.value;\n });\n var recentPartition = _lodash2.default.last(recentPartitions);\n var recentPartitionStr = [recentPartition.name, recentPartition.value].join('=');\n\n table.activePartition = recentPartitionStr;\n\n this.onSelectPartition({\n table: table.name,\n partition: recentPartitionStr\n });\n }\n }\n }, {\n key: 'onFetchTables',\n value: function onFetchTables(tables) {\n this.tables = tables;\n }\n }, {\n key: 'onReceivedPartitionData',\n value: function onReceivedPartitionData(_ref2) {\n var refTable = _ref2.table,\n _ref2$partition = _ref2.partition,\n name = _ref2$partition.name,\n value = _ref2$partition.value,\n data = _ref2.data;\n\n var table = this.getByName(refTable.name);\n\n if (table === undefined || table.activePartition !== [name, value].join('=')) {\n return;\n }\n\n _lodash2.default.extend(table, {\n data: data\n });\n }\n }, {\n key: 'onSetTableColumnWidth',\n value: function onSetTableColumnWidth(_ref3) {\n var columnIdx = _ref3.columnIdx,\n width = _ref3.width;\n\n var table = this.activeTable;\n\n if (table === undefined) {\n return;\n }\n\n table.columnWidths[columnIdx] = width;\n }\n }, {\n key: 'getAll',\n value: function getAll() {\n return this.tables;\n }\n }, {\n key: 'getActiveTable',\n value: function getActiveTable() {\n return this.getState().activeTable;\n }\n }, {\n key: 'containsTable',\n value: function containsTable(name) {\n var _getState = this.getState(),\n tables = _getState.tables;\n\n return !!_lodash2.default.find(tables, { name: name });\n }\n }]);\n\n return TableStore;\n}();\n\nexports.default = _alt2.default.createStore(TableStore, 'TableStore');\n\n//# sourceURL=webpack:///./queryeditor/stores/TableStore.js?"); /***/ }), @@ -28883,7 +28883,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _xhrform = __webpack_require__(/*! ./xhrform */ \"./queryeditor/utils/xhrform.js\");\n\nvar _xhrform2 = _interopRequireDefault(_xhrform);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = {\n addCatalog: function addCatalog(formData) {\n return (0, _xhrform2.default)('../v1/catalog', {\n headers: {\n \"X-Presto-User\": \"admin\",\n \"Accept\": \"application/json\"\n },\n method: 'post',\n body: formData\n });\n }\n}; /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n//# sourceURL=webpack:///./queryeditor/utils/CatalogApiUtils.js?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _xhrform = __webpack_require__(/*! ./xhrform */ \"./queryeditor/utils/xhrform.js\");\n\nvar _xhrform2 = _interopRequireDefault(_xhrform);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = {\n addCatalog: function addCatalog(formData) {\n return (0, _xhrform2.default)('../v1/catalog', {\n headers: {\n \"X-Presto-User\": \"admin\",\n \"Accept\": \"application/json\"\n },\n method: 'post',\n body: formData\n });\n }\n}; /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n//# sourceURL=webpack:///./queryeditor/utils/CatalogApiUtils.js?"); /***/ }), @@ -28895,7 +28895,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n}); /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _checkResults = __webpack_require__(/*! ./checkResults */ \"./queryeditor/utils/checkResults.js\");\n\nvar _checkResults2 = _interopRequireDefault(_checkResults);\n\nvar _xhr = __webpack_require__(/*! ./xhr */ \"./queryeditor/utils/xhr.js\");\n\nvar _xhr2 = _interopRequireDefault(_xhr);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar ConnectorApiUtils = {\n fetchSupportedConnectors: function fetchSupportedConnectors() {\n return (0, _xhr2.default)('../api/connectors').then(_checkResults2.default);\n }\n};\n\nexports.default = ConnectorApiUtils;\n\n//# sourceURL=webpack:///./queryeditor/utils/ConnectorApiUtils.js?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _checkResults = __webpack_require__(/*! ./checkResults */ \"./queryeditor/utils/checkResults.js\");\n\nvar _checkResults2 = _interopRequireDefault(_checkResults);\n\nvar _xhr = __webpack_require__(/*! ./xhr */ \"./queryeditor/utils/xhr.js\");\n\nvar _xhr2 = _interopRequireDefault(_xhr);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar ConnectorApiUtils = {\n fetchSupportedConnectors: function fetchSupportedConnectors() {\n return (0, _xhr2.default)('../api/connectors').then(_checkResults2.default);\n }\n};\n\nexports.default = ConnectorApiUtils;\n\n//# sourceURL=webpack:///./queryeditor/utils/ConnectorApiUtils.js?"); /***/ }), @@ -29027,7 +29027,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _xhrutil = __webpack_require__(/*! ./xhrutil */ \"./queryeditor/utils/xhrutil.js\");\n\nvar status = function status(response) {\n if (response.status >= 200 && response.status < 300) {\n return Promise.resolve(response);\n } else {\n var message = \"Error: \" + (0, _xhrutil.getStatusText)(response) + \" (code: \" + response.status + \");\";\n var content = response.headers.get(\"Content-length\");\n if (content != null && content > 0) {\n return response.text().then(function (msg) {\n return Promise.reject(new Error(message + \" \" + msg));\n });\n }\n return Promise.reject(new Error(message));\n }\n}; /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar json = function json(response) {\n var content = response.headers.get(\"Content-length\");\n if (response.status !== 204 && content != null && content > 0) {\n return response.json();\n } else {\n return {};\n }\n};\n\nvar xhrform = function xhrform(url) {\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n params = Object.assign({\n credentials: 'same-origin'\n }, params);\n\n return fetch(url, params).then(status).then(json);\n};\n\nexports.default = xhrform;\n\n//# sourceURL=webpack:///./queryeditor/utils/xhrform.js?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _xhrutil = __webpack_require__(/*! ./xhrutil */ \"./queryeditor/utils/xhrutil.js\");\n\nvar status = function status(response) {\n if (response.status >= 200 && response.status < 300) {\n return Promise.resolve(response);\n } else {\n var message = \"Error: \" + (0, _xhrutil.getStatusText)(response) + \" (code: \" + response.status + \");\";\n var content = response.headers.get(\"Content-length\");\n if (content != null && content > 0) {\n return response.text().then(function (msg) {\n return Promise.reject(new Error(message + \" \" + msg));\n });\n }\n return Promise.reject(new Error(message));\n }\n}; /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar json = function json(response) {\n var content = response.headers.get(\"Content-length\");\n if (response.status !== 204 && content != null && content > 0) {\n return response.json();\n } else {\n return {};\n }\n};\n\nvar xhrform = function xhrform(url) {\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n params = Object.assign({\n credentials: 'same-origin'\n }, params);\n\n return fetch(url, params).then(status).then(json);\n};\n\nexports.default = xhrform;\n\n//# sourceURL=webpack:///./queryeditor/utils/xhrform.js?"); /***/ }), @@ -29039,7 +29039,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar getStatusText = exports.getStatusText = function getStatusText(response) {\n if (response.statusText != \"\") {\n return response.statusText;\n }\n switch (response.status) {\n case 200:\n {\n return \"OK\";\n }\n case 201:\n {\n return \"Created\";\n }\n case 202:\n {\n return \"Accepted\";\n }\n case 204:\n {\n return \"No Content\";\n }\n case 205:\n {\n return \"Reset Content\";\n }\n case 206:\n {\n return \"Partial Content\";\n }\n case 301:\n {\n return \"Moved Permanently\";\n }\n case 302:\n {\n return \"Found\";\n }\n case 303:\n {\n return \"See Other\";\n }\n case 304:\n {\n return \"Not Modified\";\n }\n case 305:\n {\n return \"Use Proxy\";\n }\n case 307:\n {\n return \"Temporary Redirect\";\n }\n case 400:\n {\n return \"Bad Request\";\n }\n case 401:\n {\n return \"Unauthorized\";\n }\n case 402:\n {\n return \"Payment Required\";\n }\n case 403:\n {\n return \"Forbidden\";\n }\n case 404:\n {\n return \"Not Found\";\n }\n case 405:\n {\n return \"Method Not Allowed\";\n }\n case 406:\n {\n return \"Not Acceptable\";\n }\n case 407:\n {\n return \"Proxy Authentication Required\";\n }\n case 408:\n {\n return \"Request Timeout\";\n }\n case 409:\n {\n return \"Conflict\";\n }\n case 410:\n {\n return \"Gone\";\n }\n case 411:\n {\n return \"Length Required\";\n }\n case 412:\n {\n return \"Precondition Failed\";\n }\n case 413:\n {\n return \"Request Entity Too Large\";\n }\n case 414:\n {\n return \"Request-URI Too Long\";\n }\n case 415:\n {\n return \"Unsupported Media Type\";\n }\n case 416:\n {\n return \"Requested Range Not Satisfiable\";\n }\n case 417:\n {\n return \"Expectation Failed\";\n }\n case 428:\n {\n return \"Precondition Required\";\n }\n case 429:\n {\n return \"Too Many Requests\";\n }\n case 431:\n {\n return \"Request Header Fields Too Large\";\n }\n case 500:\n {\n return \"Internal Server Error\";\n }\n case 501:\n {\n return \"Not Implemented\";\n }\n case 502:\n {\n return \"Bad Gateway\";\n }\n case 503:\n {\n return \"Service Unavailable\";\n }\n case 504:\n {\n return \"Gateway Timeout\";\n }\n case 505:\n {\n return \"HTTP Version Not Supported\";\n }\n case 511:\n {\n return \"Network Authentication Required\";\n }\n }\n};\n\n//# sourceURL=webpack:///./queryeditor/utils/xhrutil.js?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar getStatusText = exports.getStatusText = function getStatusText(response) {\n if (response.statusText != \"\") {\n return response.statusText;\n }\n switch (response.status) {\n case 200:\n {\n return \"OK\";\n }\n case 201:\n {\n return \"Created\";\n }\n case 202:\n {\n return \"Accepted\";\n }\n case 204:\n {\n return \"No Content\";\n }\n case 205:\n {\n return \"Reset Content\";\n }\n case 206:\n {\n return \"Partial Content\";\n }\n case 301:\n {\n return \"Moved Permanently\";\n }\n case 302:\n {\n return \"Found\";\n }\n case 303:\n {\n return \"See Other\";\n }\n case 304:\n {\n return \"Not Modified\";\n }\n case 305:\n {\n return \"Use Proxy\";\n }\n case 307:\n {\n return \"Temporary Redirect\";\n }\n case 400:\n {\n return \"Bad Request\";\n }\n case 401:\n {\n return \"Unauthorized\";\n }\n case 402:\n {\n return \"Payment Required\";\n }\n case 403:\n {\n return \"Forbidden\";\n }\n case 404:\n {\n return \"Not Found\";\n }\n case 405:\n {\n return \"Method Not Allowed\";\n }\n case 406:\n {\n return \"Not Acceptable\";\n }\n case 407:\n {\n return \"Proxy Authentication Required\";\n }\n case 408:\n {\n return \"Request Timeout\";\n }\n case 409:\n {\n return \"Conflict\";\n }\n case 410:\n {\n return \"Gone\";\n }\n case 411:\n {\n return \"Length Required\";\n }\n case 412:\n {\n return \"Precondition Failed\";\n }\n case 413:\n {\n return \"Request Entity Too Large\";\n }\n case 414:\n {\n return \"Request-URI Too Long\";\n }\n case 415:\n {\n return \"Unsupported Media Type\";\n }\n case 416:\n {\n return \"Requested Range Not Satisfiable\";\n }\n case 417:\n {\n return \"Expectation Failed\";\n }\n case 428:\n {\n return \"Precondition Required\";\n }\n case 429:\n {\n return \"Too Many Requests\";\n }\n case 431:\n {\n return \"Request Header Fields Too Large\";\n }\n case 500:\n {\n return \"Internal Server Error\";\n }\n case 501:\n {\n return \"Not Implemented\";\n }\n case 502:\n {\n return \"Bad Gateway\";\n }\n case 503:\n {\n return \"Service Unavailable\";\n }\n case 504:\n {\n return \"Gateway Timeout\";\n }\n case 505:\n {\n return \"HTTP Version Not Supported\";\n }\n case 511:\n {\n return \"Network Authentication Required\";\n }\n }\n};\n\n//# sourceURL=webpack:///./queryeditor/utils/xhrutil.js?"); /***/ }), diff --git a/presto-main/src/main/resources/webapp/dist/index.js b/presto-main/src/main/resources/webapp/dist/index.js index 324fa5d9e..daf197c65 100644 --- a/presto-main/src/main/resources/webapp/dist/index.js +++ b/presto-main/src/main/resources/webapp/dist/index.js @@ -94,7 +94,7 @@ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar NavigationMenu = function (_React$Component) {\n _inherits(NavigationMenu, _React$Component);\n\n function NavigationMenu(args) {\n _classCallCheck(this, NavigationMenu);\n\n return _possibleConstructorReturn(this, (NavigationMenu.__proto__ || Object.getPrototypeOf(NavigationMenu)).call(this, args));\n }\n\n _createClass(NavigationMenu, [{\n key: \"render\",\n value: function render() {\n return _react2.default.createElement(\n \"div\",\n { className: \"menu-left\" },\n _react2.default.createElement(\n \"ul\",\n null,\n _react2.default.createElement(\n \"li\",\n { className: this.props.active === 'queryeditor' ? \"active\" : \"\" },\n _react2.default.createElement(\n \"a\",\n { href: this.props.active === 'queryeditor' ? \"#\" : \"./queryeditor.html\" },\n _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\"i\", { className: \"fa fa-home\" })\n ),\n _react2.default.createElement(\n \"div\",\n null,\n \"Home\"\n )\n )\n ),\n _react2.default.createElement(\n \"li\",\n { className: this.props.active === 'metrics' ? \"active\" : \"\" },\n _react2.default.createElement(\n \"a\",\n { href: this.props.active === 'metrics' ? \"#\" : \"./overview.html\" },\n _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\"i\", { className: \"fa fa-line-chart\" })\n ),\n _react2.default.createElement(\n \"div\",\n null,\n \"Metrics\"\n )\n )\n ),\n _react2.default.createElement(\n \"li\",\n { className: this.props.active === 'nodes' ? \"active\" : \"\" },\n _react2.default.createElement(\n \"a\",\n { href: this.props.active === 'nodes' ? \"#\" : \"./nodes.html\" },\n _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\"i\", { className: \"fa fa-server\" })\n ),\n _react2.default.createElement(\n \"div\",\n null,\n \"Nodes\"\n )\n )\n ),\n _react2.default.createElement(\n \"li\",\n { className: this.props.active === 'queryhistory' ? \"active\" : \"\" },\n _react2.default.createElement(\n \"a\",\n { href: this.props.active === 'queryhistory' ? \"#\" : \"./queryhistory.html\" },\n _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\"i\", { className: \"fa fa-history\" })\n ),\n _react2.default.createElement(\n \"div\",\n null,\n \"Query History\"\n )\n )\n )\n )\n );\n }\n }]);\n\n return NavigationMenu;\n}(_react2.default.Component);\n\nexports.default = NavigationMenu;\n\n//# sourceURL=webpack:///./NavigationMenu.jsx?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar NavigationMenu = function (_React$Component) {\n _inherits(NavigationMenu, _React$Component);\n\n function NavigationMenu(args) {\n _classCallCheck(this, NavigationMenu);\n\n return _possibleConstructorReturn(this, (NavigationMenu.__proto__ || Object.getPrototypeOf(NavigationMenu)).call(this, args));\n }\n\n _createClass(NavigationMenu, [{\n key: \"render\",\n value: function render() {\n return _react2.default.createElement(\n \"div\",\n { className: \"menu-left\" },\n _react2.default.createElement(\n \"ul\",\n null,\n _react2.default.createElement(\n \"li\",\n { className: this.props.active === 'queryeditor' ? \"active\" : \"\" },\n _react2.default.createElement(\n \"a\",\n { href: this.props.active === 'queryeditor' ? \"#\" : \"./queryeditor.html\" },\n _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\"i\", { className: \"fa fa-home\" })\n ),\n _react2.default.createElement(\n \"div\",\n null,\n \"Home\"\n )\n )\n ),\n _react2.default.createElement(\n \"li\",\n { className: this.props.active === 'metrics' ? \"active\" : \"\" },\n _react2.default.createElement(\n \"a\",\n { href: this.props.active === 'metrics' ? \"#\" : \"./overview.html\" },\n _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\"i\", { className: \"fa fa-line-chart\" })\n ),\n _react2.default.createElement(\n \"div\",\n null,\n \"Metrics\"\n )\n )\n ),\n _react2.default.createElement(\n \"li\",\n { className: this.props.active === 'nodes' ? \"active\" : \"\" },\n _react2.default.createElement(\n \"a\",\n { href: this.props.active === 'nodes' ? \"#\" : \"./nodes.html\" },\n _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\"i\", { className: \"fa fa-server\" })\n ),\n _react2.default.createElement(\n \"div\",\n null,\n \"Nodes\"\n )\n )\n ),\n _react2.default.createElement(\n \"li\",\n { className: this.props.active === 'queryhistory' ? \"active\" : \"\" },\n _react2.default.createElement(\n \"a\",\n { href: this.props.active === 'queryhistory' ? \"#\" : \"./queryhistory.html\" },\n _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\"i\", { className: \"fa fa-history\" })\n ),\n _react2.default.createElement(\n \"div\",\n null,\n \"Query History\"\n )\n )\n )\n )\n );\n }\n }]);\n\n return NavigationMenu;\n}(_react2.default.Component);\n\nexports.default = NavigationMenu;\n\n//# sourceURL=webpack:///./NavigationMenu.jsx?"); /***/ }), @@ -130,7 +130,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n}); /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.QueryList = exports.QueryListItem = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _utils = __webpack_require__(/*! ../utils */ \"./utils.js\");\n\nvar _Header = __webpack_require__(/*! ../queryeditor/components/Header */ \"./queryeditor/components/Header.jsx\");\n\nvar _Header2 = _interopRequireDefault(_Header);\n\nvar _Footer = __webpack_require__(/*! ../queryeditor/components/Footer */ \"./queryeditor/components/Footer.jsx\");\n\nvar _Footer2 = _interopRequireDefault(_Footer);\n\nvar _NavigationMenu = __webpack_require__(/*! ../NavigationMenu */ \"./NavigationMenu.jsx\");\n\nvar _NavigationMenu2 = _interopRequireDefault(_NavigationMenu);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar QueryListItem = exports.QueryListItem = function (_React$Component) {\n _inherits(QueryListItem, _React$Component);\n\n function QueryListItem() {\n _classCallCheck(this, QueryListItem);\n\n return _possibleConstructorReturn(this, (QueryListItem.__proto__ || Object.getPrototypeOf(QueryListItem)).apply(this, arguments));\n }\n\n _createClass(QueryListItem, [{\n key: \"render\",\n value: function render() {\n var query = this.props.query;\n var progressBarStyle = { width: (0, _utils.getProgressBarPercentage)(query) + \"%\", backgroundColor: (0, _utils.getQueryStateColor)(query) };\n\n var splitDetails = _react2.default.createElement(\n \"div\",\n { className: \"col-xs-12 tinystat-row\" },\n _react2.default.createElement(\n \"span\",\n { className: \"tinystat\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Completed splits\" },\n _react2.default.createElement(\"span\", { className: \"glyphicon glyphicon-ok\", style: _utils.GLYPHICON_HIGHLIGHT }),\n \"\\xA0\\xA0\",\n query.queryStats.completedDrivers\n ),\n _react2.default.createElement(\n \"span\",\n { className: \"tinystat\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Running splits\" },\n _react2.default.createElement(\"span\", { className: \"glyphicon glyphicon-play\", style: _utils.GLYPHICON_HIGHLIGHT }),\n \"\\xA0\\xA0\",\n query.state === \"FINISHED\" || query.state === \"FAILED\" ? 0 : query.queryStats.runningDrivers\n ),\n _react2.default.createElement(\n \"span\",\n { className: \"tinystat\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Queued splits\" },\n _react2.default.createElement(\"span\", { className: \"glyphicon glyphicon-pause\", style: _utils.GLYPHICON_HIGHLIGHT }),\n \"\\xA0\\xA0\",\n query.state === \"FINISHED\" || query.state === \"FAILED\" ? 0 : query.queryStats.queuedDrivers\n )\n );\n\n var timingDetails = _react2.default.createElement(\n \"div\",\n { className: \"col-xs-12 tinystat-row\" },\n _react2.default.createElement(\n \"span\",\n { className: \"tinystat\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Wall time spent executing the query (not including queued time)\" },\n _react2.default.createElement(\"span\", { className: \"glyphicon glyphicon-hourglass\", style: _utils.GLYPHICON_HIGHLIGHT }),\n \"\\xA0\\xA0\",\n query.queryStats.executionTime\n ),\n _react2.default.createElement(\n \"span\",\n { className: \"tinystat\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Total query wall time\" },\n _react2.default.createElement(\"span\", { className: \"glyphicon glyphicon-time\", style: _utils.GLYPHICON_HIGHLIGHT }),\n \"\\xA0\\xA0\",\n query.queryStats.elapsedTime\n ),\n _react2.default.createElement(\n \"span\",\n { className: \"tinystat\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"CPU time spent by this query\" },\n _react2.default.createElement(\"span\", { className: \"glyphicon glyphicon-dashboard\", style: _utils.GLYPHICON_HIGHLIGHT }),\n \"\\xA0\\xA0\",\n query.queryStats.totalCpuTime\n )\n );\n\n var memoryDetails = _react2.default.createElement(\n \"div\",\n { className: \"col-xs-12 tinystat-row\" },\n _react2.default.createElement(\n \"span\",\n { className: \"tinystat\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Current total reserved memory\" },\n _react2.default.createElement(\"span\", { className: \"glyphicon glyphicon-scale\", style: _utils.GLYPHICON_HIGHLIGHT }),\n \"\\xA0\\xA0\",\n query.queryStats.totalMemoryReservation\n ),\n _react2.default.createElement(\n \"span\",\n { className: \"tinystat\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Peak total memory\" },\n _react2.default.createElement(\"span\", { className: \"glyphicon glyphicon-fire\", style: _utils.GLYPHICON_HIGHLIGHT }),\n \"\\xA0\\xA0\",\n query.queryStats.peakTotalMemoryReservation\n ),\n _react2.default.createElement(\n \"span\",\n { className: \"tinystat\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Cumulative user memory\" },\n _react2.default.createElement(\"span\", { className: \"glyphicon glyphicon-equalizer\", style: _utils.GLYPHICON_HIGHLIGHT }),\n \"\\xA0\\xA0\",\n (0, _utils.formatDataSizeBytes)(query.queryStats.cumulativeUserMemory / 1000.0)\n )\n );\n\n var user = _react2.default.createElement(\n \"span\",\n null,\n query.session.user\n );\n if (query.session.principal) {\n user = _react2.default.createElement(\n \"span\",\n null,\n query.session.user,\n _react2.default.createElement(\"span\", { className: \"glyphicon glyphicon-lock-inverse\", style: _utils.GLYPHICON_DEFAULT })\n );\n }\n\n return _react2.default.createElement(\n \"div\",\n { className: \"query\" },\n _react2.default.createElement(\n \"div\",\n { className: \"row\" },\n _react2.default.createElement(\n \"div\",\n { className: \"col-xs-4\" },\n _react2.default.createElement(\n \"div\",\n { className: \"row stat-row query-header query-header-queryid\" },\n _react2.default.createElement(\n \"div\",\n { className: \"col-xs-9\", \"data-toggle\": \"tooltip\", \"data-placement\": \"bottom\", title: \"Query ID\" },\n _react2.default.createElement(\n \"a\",\n { href: \"\" + query.self.replace(/.*\\/v1\\/query\\//, \"query.html?\"), target: \"_blank\" },\n query.queryId\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"col-xs-3 query-header-timestamp\", \"data-toggle\": \"tooltip\", \"data-placement\": \"bottom\", title: \"Submit time\" },\n _react2.default.createElement(\n \"span\",\n null,\n (0, _utils.formatShortTime)(new Date(Date.parse(query.queryStats.createTime)))\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"row stat-row\" },\n _react2.default.createElement(\n \"div\",\n { className: \"col-xs-12\" },\n _react2.default.createElement(\n \"span\",\n { \"data-toggle\": \"tooltip\", \"data-placement\": \"right\", title: \"User\" },\n _react2.default.createElement(\"span\", { className: \"glyphicon glyphicon-user\", style: _utils.GLYPHICON_DEFAULT }),\n \"\\xA0\\xA0\",\n _react2.default.createElement(\n \"span\",\n null,\n (0, _utils.truncateString)(user, 35)\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"row stat-row\" },\n _react2.default.createElement(\n \"div\",\n { className: \"col-xs-12\" },\n _react2.default.createElement(\n \"span\",\n { \"data-toggle\": \"tooltip\", \"data-placement\": \"right\", title: \"Source\" },\n _react2.default.createElement(\"span\", { className: \"glyphicon glyphicon-log-in\", style: _utils.GLYPHICON_DEFAULT }),\n \"\\xA0\\xA0\",\n _react2.default.createElement(\n \"span\",\n null,\n (0, _utils.truncateString)(query.session.source, 35)\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"row stat-row\" },\n _react2.default.createElement(\n \"div\",\n { className: \"col-xs-12\" },\n _react2.default.createElement(\n \"span\",\n { \"data-toggle\": \"tooltip\", \"data-placement\": \"right\", title: \"Resource Group\" },\n _react2.default.createElement(\"span\", { className: \"glyphicon glyphicon-road\", style: _utils.GLYPHICON_DEFAULT }),\n \"\\xA0\\xA0\",\n _react2.default.createElement(\n \"span\",\n null,\n (0, _utils.truncateString)(query.resourceGroupId ? query.resourceGroupId.join(\".\") : \"n/a\", 35)\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"row stat-row\" },\n splitDetails\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"row stat-row\" },\n timingDetails\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"row stat-row\" },\n memoryDetails\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"col-xs-8\" },\n _react2.default.createElement(\n \"div\",\n { className: \"row query-header\" },\n _react2.default.createElement(\n \"div\",\n { className: \"col-xs-12 query-progress-container\" },\n _react2.default.createElement(\n \"div\",\n { className: \"progress\" },\n _react2.default.createElement(\n \"div\",\n { className: \"progress-bar progress-bar-info\", role: \"progressbar\", \"aria-valuenow\": (0, _utils.getProgressBarPercentage)(query), \"aria-valuemin\": \"0\",\n \"aria-valuemax\": \"100\", style: progressBarStyle },\n (0, _utils.getProgressBarTitle)(query)\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"row query-row-bottom\" },\n _react2.default.createElement(\n \"div\",\n { className: \"col-xs-12\" },\n _react2.default.createElement(\n \"pre\",\n { className: \"query-snippet\" },\n _react2.default.createElement(\n \"code\",\n { className: \"sql\" },\n QueryListItem.stripQueryTextWhitespace(query.query)\n )\n )\n )\n )\n )\n )\n );\n }\n }], [{\n key: \"stripQueryTextWhitespace\",\n value: function stripQueryTextWhitespace(queryText) {\n var lines = queryText.split(\"\\n\");\n var minLeadingWhitespace = -1;\n for (var i = 0; i < lines.length; i++) {\n if (minLeadingWhitespace === 0) {\n break;\n }\n\n if (lines[i].trim().length === 0) {\n continue;\n }\n\n var leadingWhitespace = lines[i].search(/\\S/);\n\n if (leadingWhitespace > -1 && (leadingWhitespace < minLeadingWhitespace || minLeadingWhitespace === -1)) {\n minLeadingWhitespace = leadingWhitespace;\n }\n }\n\n var formattedQueryText = \"\";\n\n for (var _i = 0; _i < lines.length; _i++) {\n var trimmedLine = lines[_i].substring(minLeadingWhitespace).replace(/\\s+$/g, '');\n\n if (trimmedLine.length > 0) {\n formattedQueryText += trimmedLine;\n\n if (_i < lines.length - 1) {\n formattedQueryText += \"\\n\";\n }\n }\n }\n\n return (0, _utils.truncateString)(formattedQueryText, 300);\n }\n }]);\n\n return QueryListItem;\n}(_react2.default.Component);\n\nvar DisplayedQueriesList = function (_React$Component2) {\n _inherits(DisplayedQueriesList, _React$Component2);\n\n function DisplayedQueriesList() {\n _classCallCheck(this, DisplayedQueriesList);\n\n return _possibleConstructorReturn(this, (DisplayedQueriesList.__proto__ || Object.getPrototypeOf(DisplayedQueriesList)).apply(this, arguments));\n }\n\n _createClass(DisplayedQueriesList, [{\n key: \"render\",\n value: function render() {\n var queryNodes = this.props.queries.map(function (query) {\n return _react2.default.createElement(QueryListItem, { key: query.queryId, query: query });\n }.bind(this));\n return _react2.default.createElement(\n \"div\",\n { className: \"queryListContainer\" },\n queryNodes\n );\n }\n }]);\n\n return DisplayedQueriesList;\n}(_react2.default.Component);\n\nvar FILTER_TYPE = {\n RUNNING: function RUNNING(query) {\n return !(query.state === \"QUEUED\" || query.state === \"FINISHED\" || query.state === \"FAILED\");\n },\n QUEUED: function QUEUED(query) {\n return query.state === \"QUEUED\";\n },\n FINISHED: function FINISHED(query) {\n return query.state === \"FINISHED\";\n }\n};\n\nvar SORT_TYPE = {\n CREATED: function CREATED(query) {\n return Date.parse(query.queryStats.createTime);\n },\n ELAPSED: function ELAPSED(query) {\n return (0, _utils.parseDuration)(query.queryStats.elapsedTime);\n },\n EXECUTION: function EXECUTION(query) {\n return (0, _utils.parseDuration)(query.queryStats.executionTime);\n },\n CPU: function CPU(query) {\n return (0, _utils.parseDuration)(query.queryStats.totalCpuTime);\n },\n CUMULATIVE_MEMORY: function CUMULATIVE_MEMORY(query) {\n return query.queryStats.cumulativeUserMemory;\n },\n CURRENT_MEMORY: function CURRENT_MEMORY(query) {\n return (0, _utils.parseDataSize)(query.queryStats.userMemoryReservation);\n }\n};\n\nvar ERROR_TYPE = {\n USER_ERROR: function USER_ERROR(query) {\n return query.state === \"FAILED\" && query.errorType === \"USER_ERROR\";\n },\n INTERNAL_ERROR: function INTERNAL_ERROR(query) {\n return query.state === \"FAILED\" && query.errorType === \"INTERNAL_ERROR\";\n },\n INSUFFICIENT_RESOURCES: function INSUFFICIENT_RESOURCES(query) {\n return query.state === \"FAILED\" && query.errorType === \"INSUFFICIENT_RESOURCES\";\n },\n EXTERNAL: function EXTERNAL(query) {\n return query.state === \"FAILED\" && query.errorType === \"EXTERNAL\";\n }\n};\n\nvar SORT_ORDER = {\n ASCENDING: function ASCENDING(value) {\n return value;\n },\n DESCENDING: function DESCENDING(value) {\n return -value;\n }\n};\n\nvar QueryList = exports.QueryList = function (_React$Component3) {\n _inherits(QueryList, _React$Component3);\n\n function QueryList(props) {\n _classCallCheck(this, QueryList);\n\n var _this3 = _possibleConstructorReturn(this, (QueryList.__proto__ || Object.getPrototypeOf(QueryList)).call(this, props));\n\n _this3.state = {\n allQueries: [],\n displayedQueries: [],\n reorderInterval: 5000,\n currentSortType: SORT_TYPE.CREATED,\n currentSortOrder: SORT_ORDER.DESCENDING,\n stateFilters: [FILTER_TYPE.RUNNING, FILTER_TYPE.QUEUED, FILTER_TYPE.FINISHED],\n errorTypeFilters: [ERROR_TYPE.INTERNAL_ERROR, ERROR_TYPE.INSUFFICIENT_RESOURCES, ERROR_TYPE.EXTERNAL],\n searchString: '',\n maxQueries: 100,\n lastRefresh: Date.now(),\n lastReorder: Date.now(),\n initialized: false\n };\n\n _this3.refreshLoop = _this3.refreshLoop.bind(_this3);\n _this3.handleSearchStringChange = _this3.handleSearchStringChange.bind(_this3);\n _this3.executeSearch = _this3.executeSearch.bind(_this3);\n _this3.handleSortClick = _this3.handleSortClick.bind(_this3);\n return _this3;\n }\n\n _createClass(QueryList, [{\n key: \"sortAndLimitQueries\",\n value: function sortAndLimitQueries(queries, sortType, sortOrder, maxQueries) {\n queries.sort(function (queryA, queryB) {\n return sortOrder(sortType(queryA) - sortType(queryB));\n }, this);\n\n if (maxQueries !== 0 && queries.length > maxQueries) {\n queries.splice(maxQueries, queries.length - maxQueries);\n }\n }\n }, {\n key: \"filterQueries\",\n value: function filterQueries(queries, stateFilters, errorTypeFilters, searchString) {\n var stateFilteredQueries = queries.filter(function (query) {\n for (var i = 0; i < stateFilters.length; i++) {\n if (stateFilters[i](query)) {\n return true;\n }\n }\n for (var _i2 = 0; _i2 < errorTypeFilters.length; _i2++) {\n if (errorTypeFilters[_i2](query)) {\n return true;\n }\n }\n return false;\n });\n\n if (searchString === '') {\n return stateFilteredQueries;\n } else {\n return stateFilteredQueries.filter(function (query) {\n var term = searchString.toLowerCase();\n if (query.queryId.toLowerCase().indexOf(term) !== -1 || (0, _utils.getHumanReadableState)(query).toLowerCase().indexOf(term) !== -1 || query.query.toLowerCase().indexOf(term) !== -1) {\n return true;\n }\n\n if (query.session.user && query.session.user.toLowerCase().indexOf(term) !== -1) {\n return true;\n }\n\n if (query.session.source && query.session.source.toLowerCase().indexOf(term) !== -1) {\n return true;\n }\n\n if (query.resourceGroupId && query.resourceGroupId.join(\".\").toLowerCase().indexOf(term) !== -1) {\n return true;\n }\n }, this);\n }\n }\n }, {\n key: \"resetTimer\",\n value: function resetTimer() {\n clearTimeout(this.timeoutId);\n // stop refreshing when query finishes or fails\n if (this.state.query === null || !this.state.ended) {\n this.timeoutId = setTimeout(this.refreshLoop, 1000);\n }\n }\n }, {\n key: \"refreshLoop\",\n value: function refreshLoop() {\n clearTimeout(this.timeoutId); // to stop multiple series of refreshLoop from going on simultaneously\n clearTimeout(this.searchTimeoutId);\n\n $.get('../v1/query', function (queryList) {\n var queryMap = queryList.reduce(function (map, query) {\n map[query.queryId] = query;\n return map;\n }, {});\n\n var updatedQueries = [];\n this.state.displayedQueries.forEach(function (oldQuery) {\n if (oldQuery.queryId in queryMap) {\n updatedQueries.push(queryMap[oldQuery.queryId]);\n queryMap[oldQuery.queryId] = false;\n }\n });\n\n var newQueries = [];\n for (var queryId in queryMap) {\n if (queryMap[queryId]) {\n newQueries.push(queryMap[queryId]);\n }\n }\n newQueries = this.filterQueries(newQueries, this.state.stateFilters, this.state.errorTypeFilters, this.state.searchString);\n\n var lastRefresh = Date.now();\n var lastReorder = this.state.lastReorder;\n\n if (this.state.reorderInterval !== 0 && lastRefresh - lastReorder >= this.state.reorderInterval) {\n updatedQueries = this.filterQueries(updatedQueries, this.state.stateFilters, this.state.errorTypeFilters, this.state.searchString);\n updatedQueries = updatedQueries.concat(newQueries);\n this.sortAndLimitQueries(updatedQueries, this.state.currentSortType, this.state.currentSortOrder, 0);\n lastReorder = Date.now();\n } else {\n this.sortAndLimitQueries(newQueries, this.state.currentSortType, this.state.currentSortOrder, 0);\n updatedQueries = updatedQueries.concat(newQueries);\n }\n\n if (this.state.maxQueries !== 0 && updatedQueries.length > this.state.maxQueries) {\n updatedQueries.splice(this.state.maxQueries, updatedQueries.length - this.state.maxQueries);\n }\n\n this.setState({\n allQueries: queryList,\n displayedQueries: updatedQueries,\n lastRefresh: lastRefresh,\n lastReorder: lastReorder,\n initialized: true\n });\n this.resetTimer();\n }.bind(this)).error(function () {\n this.setState({\n initialized: true\n });\n this.resetTimer();\n }.bind(this));\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.refreshLoop();\n }\n }, {\n key: \"handleSearchStringChange\",\n value: function handleSearchStringChange(event) {\n var newSearchString = event.target.value;\n clearTimeout(this.searchTimeoutId);\n\n this.setState({\n searchString: newSearchString\n });\n\n this.searchTimeoutId = setTimeout(this.executeSearch, 200);\n }\n }, {\n key: \"executeSearch\",\n value: function executeSearch() {\n clearTimeout(this.searchTimeoutId);\n\n var newDisplayedQueries = this.filterQueries(this.state.allQueries, this.state.stateFilters, this.state.errorTypeFilters, this.state.searchString);\n this.sortAndLimitQueries(newDisplayedQueries, this.state.currentSortType, this.state.currentSortOrder, this.state.maxQueries);\n\n this.setState({\n displayedQueries: newDisplayedQueries\n });\n }\n }, {\n key: \"renderMaxQueriesListItem\",\n value: function renderMaxQueriesListItem(maxQueries, maxQueriesText) {\n return _react2.default.createElement(\n \"li\",\n null,\n _react2.default.createElement(\n \"a\",\n { href: \"#\", className: this.state.maxQueries === maxQueries ? \"selected\" : \"\", onClick: this.handleMaxQueriesClick.bind(this, maxQueries) },\n maxQueriesText\n )\n );\n }\n }, {\n key: \"handleMaxQueriesClick\",\n value: function handleMaxQueriesClick(newMaxQueries) {\n var filteredQueries = this.filterQueries(this.state.allQueries, this.state.stateFilters, this.state.errorTypeFilters, this.state.searchString);\n this.sortAndLimitQueries(filteredQueries, this.state.currentSortType, this.state.currentSortOrder, newMaxQueries);\n\n this.setState({\n maxQueries: newMaxQueries,\n displayedQueries: filteredQueries\n });\n }\n }, {\n key: \"renderReorderListItem\",\n value: function renderReorderListItem(interval, intervalText) {\n return _react2.default.createElement(\n \"li\",\n null,\n _react2.default.createElement(\n \"a\",\n { href: \"#\", className: this.state.reorderInterval === interval ? \"selected\" : \"\", onClick: this.handleReorderClick.bind(this, interval) },\n intervalText\n )\n );\n }\n }, {\n key: \"handleReorderClick\",\n value: function handleReorderClick(interval) {\n if (this.state.reorderInterval !== interval) {\n this.setState({\n reorderInterval: interval\n });\n }\n }\n }, {\n key: \"renderSortListItem\",\n value: function renderSortListItem(sortType, sortText) {\n if (this.state.currentSortType === sortType) {\n var directionArrow = this.state.currentSortOrder === SORT_ORDER.ASCENDING ? _react2.default.createElement(\"span\", { className: \"glyphicon glyphicon-triangle-top\" }) : _react2.default.createElement(\"span\", { className: \"glyphicon glyphicon-triangle-bottom\" });\n return _react2.default.createElement(\n \"li\",\n null,\n _react2.default.createElement(\n \"a\",\n { href: \"#\", className: \"selected\", onClick: this.handleSortClick.bind(this, sortType) },\n sortText,\n \" \",\n directionArrow\n )\n );\n } else {\n return _react2.default.createElement(\n \"li\",\n null,\n _react2.default.createElement(\n \"a\",\n { href: \"#\", onClick: this.handleSortClick.bind(this, sortType) },\n sortText\n )\n );\n }\n }\n }, {\n key: \"handleSortClick\",\n value: function handleSortClick(sortType) {\n var newSortType = sortType;\n var newSortOrder = SORT_ORDER.DESCENDING;\n\n if (this.state.currentSortType === sortType && this.state.currentSortOrder === SORT_ORDER.DESCENDING) {\n newSortOrder = SORT_ORDER.ASCENDING;\n }\n\n var newDisplayedQueries = this.filterQueries(this.state.allQueries, this.state.stateFilters, this.state.errorTypeFilters, this.state.searchString);\n this.sortAndLimitQueries(newDisplayedQueries, newSortType, newSortOrder, this.state.maxQueries);\n\n this.setState({\n displayedQueries: newDisplayedQueries,\n currentSortType: newSortType,\n currentSortOrder: newSortOrder\n });\n }\n }, {\n key: \"renderFilterButton\",\n value: function renderFilterButton(filterType, filterText) {\n var checkmarkStyle = { color: '#57aac7' };\n var classNames = \"btn btn-sm btn-info style-check\";\n if (this.state.stateFilters.indexOf(filterType) > -1) {\n classNames += \" active\";\n checkmarkStyle = { color: '#ffffff' };\n }\n\n return _react2.default.createElement(\n \"button\",\n { type: \"button\", className: classNames, onClick: this.handleStateFilterClick.bind(this, filterType) },\n _react2.default.createElement(\"span\", { className: \"glyphicon glyphicon-ok\", style: checkmarkStyle }),\n \"\\xA0\",\n filterText\n );\n }\n }, {\n key: \"handleStateFilterClick\",\n value: function handleStateFilterClick(filter) {\n var newFilters = this.state.stateFilters.slice();\n if (this.state.stateFilters.indexOf(filter) > -1) {\n newFilters.splice(newFilters.indexOf(filter), 1);\n } else {\n newFilters.push(filter);\n }\n\n var filteredQueries = this.filterQueries(this.state.allQueries, newFilters, this.state.errorTypeFilters, this.state.searchString);\n this.sortAndLimitQueries(filteredQueries, this.state.currentSortType, this.state.currentSortOrder);\n\n this.setState({\n stateFilters: newFilters,\n displayedQueries: filteredQueries\n });\n }\n }, {\n key: \"renderErrorTypeListItem\",\n value: function renderErrorTypeListItem(errorType, errorTypeText) {\n var checkmarkStyle = { color: '#ffffff' };\n if (this.state.errorTypeFilters.indexOf(errorType) > -1) {\n checkmarkStyle = _utils.GLYPHICON_HIGHLIGHT;\n }\n return _react2.default.createElement(\n \"li\",\n null,\n _react2.default.createElement(\n \"a\",\n { href: \"#\", onClick: this.handleErrorTypeFilterClick.bind(this, errorType) },\n _react2.default.createElement(\"span\", { className: \"glyphicon glyphicon-ok\", style: checkmarkStyle }),\n \"\\xA0\",\n errorTypeText\n )\n );\n }\n }, {\n key: \"handleErrorTypeFilterClick\",\n value: function handleErrorTypeFilterClick(errorType) {\n var newFilters = this.state.errorTypeFilters.slice();\n if (this.state.errorTypeFilters.indexOf(errorType) > -1) {\n newFilters.splice(newFilters.indexOf(errorType), 1);\n } else {\n newFilters.push(errorType);\n }\n\n var filteredQueries = this.filterQueries(this.state.allQueries, this.state.stateFilters, newFilters, this.state.searchString);\n this.sortAndLimitQueries(filteredQueries, this.state.currentSortType, this.state.currentSortOrder);\n\n this.setState({\n errorTypeFilters: newFilters,\n displayedQueries: filteredQueries\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var queryList = _react2.default.createElement(DisplayedQueriesList, { queries: this.state.displayedQueries });\n if (this.state.displayedQueries === null || this.state.displayedQueries.length === 0) {\n var label = _react2.default.createElement(\n \"div\",\n { className: \"loader\" },\n \"Loading...\"\n );\n if (this.state.initialized) {\n if (this.state.allQueries === null || this.state.allQueries.length === 0) {\n label = \"No queries\";\n } else {\n label = \"No queries matched filters\";\n }\n }\n queryList = _react2.default.createElement(\n \"div\",\n { className: \"row error-message\" },\n _react2.default.createElement(\n \"div\",\n { className: \"col-xs-12\" },\n _react2.default.createElement(\n \"h4\",\n null,\n label\n )\n )\n );\n }\n\n return _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\n \"div\",\n { className: \"flex flex-row flex-initial header\" },\n _react2.default.createElement(_Header2.default, null)\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"flex flex-row content\" },\n _react2.default.createElement(_NavigationMenu2.default, { active: \"queryhistory\" }),\n _react2.default.createElement(\n \"div\",\n { className: \"container\" },\n _react2.default.createElement(\n \"div\",\n { className: \"row toolbar-row\" },\n _react2.default.createElement(\n \"div\",\n { className: \"col-xs-12 toolbar-col\" },\n _react2.default.createElement(\n \"div\",\n { className: \"input-group input-group-sm\" },\n _react2.default.createElement(\"input\", { type: \"text\", className: \"form-control form-control-small search-bar\", placeholder: \"User, source, query ID, resource group, or query text\",\n onChange: this.handleSearchStringChange, value: this.state.searchString }),\n _react2.default.createElement(\n \"span\",\n { className: \"input-group-addon filter-addon\" },\n \"State:\"\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"input-group-btn\" },\n this.renderFilterButton(FILTER_TYPE.RUNNING, \"Running\"),\n this.renderFilterButton(FILTER_TYPE.QUEUED, \"Queued\"),\n this.renderFilterButton(FILTER_TYPE.FINISHED, \"Finished\"),\n _react2.default.createElement(\n \"button\",\n { type: \"button\", id: \"error-type-dropdown\", className: \"btn btn-default dropdown-toggle\", \"data-toggle\": \"dropdown\", \"aria-haspopup\": \"true\", \"aria-expanded\": \"false\" },\n \"Failed \",\n _react2.default.createElement(\"span\", { className: \"caret\" })\n ),\n _react2.default.createElement(\n \"ul\",\n { className: \"dropdown-menu error-type-dropdown-menu\" },\n this.renderErrorTypeListItem(ERROR_TYPE.INTERNAL_ERROR, \"Internal Error\"),\n this.renderErrorTypeListItem(ERROR_TYPE.EXTERNAL, \"External Error\"),\n this.renderErrorTypeListItem(ERROR_TYPE.INSUFFICIENT_RESOURCES, \"Resources Error\"),\n this.renderErrorTypeListItem(ERROR_TYPE.USER_ERROR, \"User Error\")\n )\n ),\n \"\\xA0\",\n _react2.default.createElement(\n \"div\",\n { className: \"input-group-btn\" },\n _react2.default.createElement(\n \"button\",\n { type: \"button\", className: \"btn btn-default dropdown-toggle\", \"data-toggle\": \"dropdown\", \"aria-haspopup\": \"true\", \"aria-expanded\": \"false\" },\n \"Sort \",\n _react2.default.createElement(\"span\", { className: \"caret\" })\n ),\n _react2.default.createElement(\n \"ul\",\n { className: \"dropdown-menu\" },\n this.renderSortListItem(SORT_TYPE.CREATED, \"Creation Time\"),\n this.renderSortListItem(SORT_TYPE.ELAPSED, \"Elapsed Time\"),\n this.renderSortListItem(SORT_TYPE.CPU, \"CPU Time\"),\n this.renderSortListItem(SORT_TYPE.EXECUTION, \"Execution Time\"),\n this.renderSortListItem(SORT_TYPE.CURRENT_MEMORY, \"Current Memory\"),\n this.renderSortListItem(SORT_TYPE.CUMULATIVE_MEMORY, \"Cumulative User Memory\")\n )\n ),\n \"\\xA0\",\n _react2.default.createElement(\n \"div\",\n { className: \"input-group-btn\" },\n _react2.default.createElement(\n \"button\",\n { type: \"button\", className: \"btn btn-default dropdown-toggle\", \"data-toggle\": \"dropdown\", \"aria-haspopup\": \"true\", \"aria-expanded\": \"false\" },\n \"Reorder Interval \",\n _react2.default.createElement(\"span\", { className: \"caret\" })\n ),\n _react2.default.createElement(\n \"ul\",\n { className: \"dropdown-menu\" },\n this.renderReorderListItem(1000, \"1s\"),\n this.renderReorderListItem(5000, \"5s\"),\n this.renderReorderListItem(10000, \"10s\"),\n this.renderReorderListItem(30000, \"30s\"),\n _react2.default.createElement(\"li\", { role: \"separator\", className: \"divider\" }),\n this.renderReorderListItem(0, \"Off\")\n )\n ),\n \"\\xA0\",\n _react2.default.createElement(\n \"div\",\n { className: \"input-group-btn\" },\n _react2.default.createElement(\n \"button\",\n { type: \"button\", className: \"btn btn-default dropdown-toggle\", \"data-toggle\": \"dropdown\", \"aria-haspopup\": \"true\", \"aria-expanded\": \"false\" },\n \"Show \",\n _react2.default.createElement(\"span\", { className: \"caret\" })\n ),\n _react2.default.createElement(\n \"ul\",\n { className: \"dropdown-menu\" },\n this.renderMaxQueriesListItem(20, \"20 queries\"),\n this.renderMaxQueriesListItem(50, \"50 queries\"),\n this.renderMaxQueriesListItem(100, \"100 queries\"),\n _react2.default.createElement(\"li\", { role: \"separator\", className: \"divider\" }),\n this.renderMaxQueriesListItem(0, \"All queries\")\n )\n )\n )\n )\n ),\n queryList\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"flex flex-row flex-initial footer\" },\n _react2.default.createElement(_Footer2.default, null)\n )\n );\n }\n }]);\n\n return QueryList;\n}(_react2.default.Component);\n\n//# sourceURL=webpack:///./components/QueryList.jsx?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.QueryList = exports.QueryListItem = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _utils = __webpack_require__(/*! ../utils */ \"./utils.js\");\n\nvar _Header = __webpack_require__(/*! ../queryeditor/components/Header */ \"./queryeditor/components/Header.jsx\");\n\nvar _Header2 = _interopRequireDefault(_Header);\n\nvar _Footer = __webpack_require__(/*! ../queryeditor/components/Footer */ \"./queryeditor/components/Footer.jsx\");\n\nvar _Footer2 = _interopRequireDefault(_Footer);\n\nvar _StatusFooter = __webpack_require__(/*! ../queryeditor/components/StatusFooter */ \"./queryeditor/components/StatusFooter.jsx\");\n\nvar _StatusFooter2 = _interopRequireDefault(_StatusFooter);\n\nvar _NavigationMenu = __webpack_require__(/*! ../NavigationMenu */ \"./NavigationMenu.jsx\");\n\nvar _NavigationMenu2 = _interopRequireDefault(_NavigationMenu);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar QueryListItem = exports.QueryListItem = function (_React$Component) {\n _inherits(QueryListItem, _React$Component);\n\n function QueryListItem() {\n _classCallCheck(this, QueryListItem);\n\n return _possibleConstructorReturn(this, (QueryListItem.__proto__ || Object.getPrototypeOf(QueryListItem)).apply(this, arguments));\n }\n\n _createClass(QueryListItem, [{\n key: \"render\",\n value: function render() {\n var query = this.props.query;\n var progressBarStyle = { width: (0, _utils.getProgressBarPercentage)(query) + \"%\", backgroundColor: (0, _utils.getQueryStateColor)(query) };\n\n var splitDetails = _react2.default.createElement(\n \"div\",\n { className: \"col-xs-12 tinystat-row\" },\n _react2.default.createElement(\n \"span\",\n { className: \"tinystat\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Completed splits\" },\n _react2.default.createElement(\"span\", { className: \"glyphicon glyphicon-ok\", style: _utils.GLYPHICON_HIGHLIGHT }),\n \"\\xA0\\xA0\",\n query.queryStats.completedDrivers\n ),\n _react2.default.createElement(\n \"span\",\n { className: \"tinystat\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Running splits\" },\n _react2.default.createElement(\"span\", { className: \"glyphicon glyphicon-play\", style: _utils.GLYPHICON_HIGHLIGHT }),\n \"\\xA0\\xA0\",\n query.state === \"FINISHED\" || query.state === \"FAILED\" ? 0 : query.queryStats.runningDrivers\n ),\n _react2.default.createElement(\n \"span\",\n { className: \"tinystat\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Queued splits\" },\n _react2.default.createElement(\"span\", { className: \"glyphicon glyphicon-pause\", style: _utils.GLYPHICON_HIGHLIGHT }),\n \"\\xA0\\xA0\",\n query.state === \"FINISHED\" || query.state === \"FAILED\" ? 0 : query.queryStats.queuedDrivers\n )\n );\n\n var timingDetails = _react2.default.createElement(\n \"div\",\n { className: \"col-xs-12 tinystat-row\" },\n _react2.default.createElement(\n \"span\",\n { className: \"tinystat\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Wall time spent executing the query (not including queued time)\" },\n _react2.default.createElement(\"span\", { className: \"glyphicon glyphicon-hourglass\", style: _utils.GLYPHICON_HIGHLIGHT }),\n \"\\xA0\\xA0\",\n query.queryStats.executionTime\n ),\n _react2.default.createElement(\n \"span\",\n { className: \"tinystat\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Total query wall time\" },\n _react2.default.createElement(\"span\", { className: \"glyphicon glyphicon-time\", style: _utils.GLYPHICON_HIGHLIGHT }),\n \"\\xA0\\xA0\",\n query.queryStats.elapsedTime\n ),\n _react2.default.createElement(\n \"span\",\n { className: \"tinystat\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"CPU time spent by this query\" },\n _react2.default.createElement(\"span\", { className: \"glyphicon glyphicon-dashboard\", style: _utils.GLYPHICON_HIGHLIGHT }),\n \"\\xA0\\xA0\",\n query.queryStats.totalCpuTime\n )\n );\n\n var memoryDetails = _react2.default.createElement(\n \"div\",\n { className: \"col-xs-12 tinystat-row\" },\n _react2.default.createElement(\n \"span\",\n { className: \"tinystat\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Current total reserved memory\" },\n _react2.default.createElement(\"span\", { className: \"glyphicon glyphicon-scale\", style: _utils.GLYPHICON_HIGHLIGHT }),\n \"\\xA0\\xA0\",\n query.queryStats.totalMemoryReservation\n ),\n _react2.default.createElement(\n \"span\",\n { className: \"tinystat\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Peak total memory\" },\n _react2.default.createElement(\"span\", { className: \"glyphicon glyphicon-fire\", style: _utils.GLYPHICON_HIGHLIGHT }),\n \"\\xA0\\xA0\",\n query.queryStats.peakTotalMemoryReservation\n ),\n _react2.default.createElement(\n \"span\",\n { className: \"tinystat\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Cumulative user memory\" },\n _react2.default.createElement(\"span\", { className: \"glyphicon glyphicon-equalizer\", style: _utils.GLYPHICON_HIGHLIGHT }),\n \"\\xA0\\xA0\",\n (0, _utils.formatDataSizeBytes)(query.queryStats.cumulativeUserMemory / 1000.0)\n )\n );\n\n var user = _react2.default.createElement(\n \"span\",\n null,\n query.session.user\n );\n if (query.session.principal) {\n user = _react2.default.createElement(\n \"span\",\n null,\n query.session.user,\n _react2.default.createElement(\"span\", { className: \"glyphicon glyphicon-lock-inverse\", style: _utils.GLYPHICON_DEFAULT })\n );\n }\n\n return _react2.default.createElement(\n \"div\",\n { className: \"query\" },\n _react2.default.createElement(\n \"div\",\n { className: \"row\" },\n _react2.default.createElement(\n \"div\",\n { className: \"col-xs-4\" },\n _react2.default.createElement(\n \"div\",\n { className: \"row stat-row query-header query-header-queryid\" },\n _react2.default.createElement(\n \"div\",\n { className: \"col-xs-9\", \"data-toggle\": \"tooltip\", \"data-placement\": \"bottom\", title: \"Query ID\" },\n _react2.default.createElement(\n \"a\",\n { href: \"\" + query.self.replace(/.*\\/v1\\/query\\//, \"query.html?\"), target: \"_blank\" },\n query.queryId\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"col-xs-3 query-header-timestamp\", \"data-toggle\": \"tooltip\", \"data-placement\": \"bottom\", title: \"Submit time\" },\n _react2.default.createElement(\n \"span\",\n null,\n (0, _utils.formatShortTime)(new Date(Date.parse(query.queryStats.createTime)))\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"row stat-row\" },\n _react2.default.createElement(\n \"div\",\n { className: \"col-xs-12\" },\n _react2.default.createElement(\n \"span\",\n { \"data-toggle\": \"tooltip\", \"data-placement\": \"right\", title: \"User\" },\n _react2.default.createElement(\"span\", { className: \"glyphicon glyphicon-user\", style: _utils.GLYPHICON_DEFAULT }),\n \"\\xA0\\xA0\",\n _react2.default.createElement(\n \"span\",\n null,\n (0, _utils.truncateString)(user, 35)\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"row stat-row\" },\n _react2.default.createElement(\n \"div\",\n { className: \"col-xs-12\" },\n _react2.default.createElement(\n \"span\",\n { \"data-toggle\": \"tooltip\", \"data-placement\": \"right\", title: \"Source\" },\n _react2.default.createElement(\"span\", { className: \"glyphicon glyphicon-log-in\", style: _utils.GLYPHICON_DEFAULT }),\n \"\\xA0\\xA0\",\n _react2.default.createElement(\n \"span\",\n null,\n (0, _utils.truncateString)(query.session.source, 35)\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"row stat-row\" },\n _react2.default.createElement(\n \"div\",\n { className: \"col-xs-12\" },\n _react2.default.createElement(\n \"span\",\n { \"data-toggle\": \"tooltip\", \"data-placement\": \"right\", title: \"Resource Group\" },\n _react2.default.createElement(\"span\", { className: \"glyphicon glyphicon-road\", style: _utils.GLYPHICON_DEFAULT }),\n \"\\xA0\\xA0\",\n _react2.default.createElement(\n \"span\",\n null,\n (0, _utils.truncateString)(query.resourceGroupId ? query.resourceGroupId.join(\".\") : \"n/a\", 35)\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"row stat-row\" },\n splitDetails\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"row stat-row\" },\n timingDetails\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"row stat-row\" },\n memoryDetails\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"col-xs-8\" },\n _react2.default.createElement(\n \"div\",\n { className: \"row query-header\" },\n _react2.default.createElement(\n \"div\",\n { className: \"col-xs-12 query-progress-container\" },\n _react2.default.createElement(\n \"div\",\n { className: \"progress\" },\n _react2.default.createElement(\n \"div\",\n { className: \"progress-bar progress-bar-info\", role: \"progressbar\", \"aria-valuenow\": (0, _utils.getProgressBarPercentage)(query), \"aria-valuemin\": \"0\",\n \"aria-valuemax\": \"100\", style: progressBarStyle },\n (0, _utils.getProgressBarTitle)(query)\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"row query-row-bottom\" },\n _react2.default.createElement(\n \"div\",\n { className: \"col-xs-12\" },\n _react2.default.createElement(\n \"pre\",\n { className: \"query-snippet\" },\n _react2.default.createElement(\n \"code\",\n { className: \"sql\" },\n QueryListItem.stripQueryTextWhitespace(query.query)\n )\n )\n )\n )\n )\n )\n );\n }\n }], [{\n key: \"stripQueryTextWhitespace\",\n value: function stripQueryTextWhitespace(queryText) {\n var lines = queryText.split(\"\\n\");\n var minLeadingWhitespace = -1;\n for (var i = 0; i < lines.length; i++) {\n if (minLeadingWhitespace === 0) {\n break;\n }\n\n if (lines[i].trim().length === 0) {\n continue;\n }\n\n var leadingWhitespace = lines[i].search(/\\S/);\n\n if (leadingWhitespace > -1 && (leadingWhitespace < minLeadingWhitespace || minLeadingWhitespace === -1)) {\n minLeadingWhitespace = leadingWhitespace;\n }\n }\n\n var formattedQueryText = \"\";\n\n for (var _i = 0; _i < lines.length; _i++) {\n var trimmedLine = lines[_i].substring(minLeadingWhitespace).replace(/\\s+$/g, '');\n\n if (trimmedLine.length > 0) {\n formattedQueryText += trimmedLine;\n\n if (_i < lines.length - 1) {\n formattedQueryText += \"\\n\";\n }\n }\n }\n\n return (0, _utils.truncateString)(formattedQueryText, 300);\n }\n }]);\n\n return QueryListItem;\n}(_react2.default.Component);\n\nvar DisplayedQueriesList = function (_React$Component2) {\n _inherits(DisplayedQueriesList, _React$Component2);\n\n function DisplayedQueriesList() {\n _classCallCheck(this, DisplayedQueriesList);\n\n return _possibleConstructorReturn(this, (DisplayedQueriesList.__proto__ || Object.getPrototypeOf(DisplayedQueriesList)).apply(this, arguments));\n }\n\n _createClass(DisplayedQueriesList, [{\n key: \"render\",\n value: function render() {\n var queryNodes = this.props.queries.map(function (query) {\n return _react2.default.createElement(QueryListItem, { key: query.queryId, query: query });\n }.bind(this));\n return _react2.default.createElement(\n \"div\",\n { className: \"queryListContainer\" },\n queryNodes\n );\n }\n }]);\n\n return DisplayedQueriesList;\n}(_react2.default.Component);\n\nvar FILTER_TYPE = {\n RUNNING: function RUNNING(query) {\n return !(query.state === \"QUEUED\" || query.state === \"FINISHED\" || query.state === \"FAILED\");\n },\n QUEUED: function QUEUED(query) {\n return query.state === \"QUEUED\";\n },\n FINISHED: function FINISHED(query) {\n return query.state === \"FINISHED\";\n }\n};\n\nvar SORT_TYPE = {\n CREATED: function CREATED(query) {\n return Date.parse(query.queryStats.createTime);\n },\n ELAPSED: function ELAPSED(query) {\n return (0, _utils.parseDuration)(query.queryStats.elapsedTime);\n },\n EXECUTION: function EXECUTION(query) {\n return (0, _utils.parseDuration)(query.queryStats.executionTime);\n },\n CPU: function CPU(query) {\n return (0, _utils.parseDuration)(query.queryStats.totalCpuTime);\n },\n CUMULATIVE_MEMORY: function CUMULATIVE_MEMORY(query) {\n return query.queryStats.cumulativeUserMemory;\n },\n CURRENT_MEMORY: function CURRENT_MEMORY(query) {\n return (0, _utils.parseDataSize)(query.queryStats.userMemoryReservation);\n }\n};\n\nvar ERROR_TYPE = {\n USER_ERROR: function USER_ERROR(query) {\n return query.state === \"FAILED\" && query.errorType === \"USER_ERROR\";\n },\n INTERNAL_ERROR: function INTERNAL_ERROR(query) {\n return query.state === \"FAILED\" && query.errorType === \"INTERNAL_ERROR\";\n },\n INSUFFICIENT_RESOURCES: function INSUFFICIENT_RESOURCES(query) {\n return query.state === \"FAILED\" && query.errorType === \"INSUFFICIENT_RESOURCES\";\n },\n EXTERNAL: function EXTERNAL(query) {\n return query.state === \"FAILED\" && query.errorType === \"EXTERNAL\";\n }\n};\n\nvar SORT_ORDER = {\n ASCENDING: function ASCENDING(value) {\n return value;\n },\n DESCENDING: function DESCENDING(value) {\n return -value;\n }\n};\n\nvar QueryList = exports.QueryList = function (_React$Component3) {\n _inherits(QueryList, _React$Component3);\n\n function QueryList(props) {\n _classCallCheck(this, QueryList);\n\n var _this3 = _possibleConstructorReturn(this, (QueryList.__proto__ || Object.getPrototypeOf(QueryList)).call(this, props));\n\n _this3.state = {\n allQueries: [],\n displayedQueries: [],\n reorderInterval: 5000,\n currentSortType: SORT_TYPE.CREATED,\n currentSortOrder: SORT_ORDER.DESCENDING,\n stateFilters: [FILTER_TYPE.RUNNING, FILTER_TYPE.QUEUED, FILTER_TYPE.FINISHED],\n errorTypeFilters: [ERROR_TYPE.INTERNAL_ERROR, ERROR_TYPE.INSUFFICIENT_RESOURCES, ERROR_TYPE.EXTERNAL],\n searchString: '',\n maxQueries: 100,\n lastRefresh: Date.now(),\n lastReorder: Date.now(),\n initialized: false\n };\n\n _this3.refreshLoop = _this3.refreshLoop.bind(_this3);\n _this3.handleSearchStringChange = _this3.handleSearchStringChange.bind(_this3);\n _this3.executeSearch = _this3.executeSearch.bind(_this3);\n _this3.handleSortClick = _this3.handleSortClick.bind(_this3);\n return _this3;\n }\n\n _createClass(QueryList, [{\n key: \"sortAndLimitQueries\",\n value: function sortAndLimitQueries(queries, sortType, sortOrder, maxQueries) {\n queries.sort(function (queryA, queryB) {\n return sortOrder(sortType(queryA) - sortType(queryB));\n }, this);\n\n if (maxQueries !== 0 && queries.length > maxQueries) {\n queries.splice(maxQueries, queries.length - maxQueries);\n }\n }\n }, {\n key: \"filterQueries\",\n value: function filterQueries(queries, stateFilters, errorTypeFilters, searchString) {\n var stateFilteredQueries = queries.filter(function (query) {\n for (var i = 0; i < stateFilters.length; i++) {\n if (stateFilters[i](query)) {\n return true;\n }\n }\n for (var _i2 = 0; _i2 < errorTypeFilters.length; _i2++) {\n if (errorTypeFilters[_i2](query)) {\n return true;\n }\n }\n return false;\n });\n\n if (searchString === '') {\n return stateFilteredQueries;\n } else {\n return stateFilteredQueries.filter(function (query) {\n var term = searchString.toLowerCase();\n if (query.queryId.toLowerCase().indexOf(term) !== -1 || (0, _utils.getHumanReadableState)(query).toLowerCase().indexOf(term) !== -1 || query.query.toLowerCase().indexOf(term) !== -1) {\n return true;\n }\n\n if (query.session.user && query.session.user.toLowerCase().indexOf(term) !== -1) {\n return true;\n }\n\n if (query.session.source && query.session.source.toLowerCase().indexOf(term) !== -1) {\n return true;\n }\n\n if (query.resourceGroupId && query.resourceGroupId.join(\".\").toLowerCase().indexOf(term) !== -1) {\n return true;\n }\n }, this);\n }\n }\n }, {\n key: \"resetTimer\",\n value: function resetTimer() {\n clearTimeout(this.timeoutId);\n // stop refreshing when query finishes or fails\n if (this.state.query === null || !this.state.ended) {\n this.timeoutId = setTimeout(this.refreshLoop, 1000);\n }\n }\n }, {\n key: \"refreshLoop\",\n value: function refreshLoop() {\n clearTimeout(this.timeoutId); // to stop multiple series of refreshLoop from going on simultaneously\n clearTimeout(this.searchTimeoutId);\n\n $.get('../v1/query', function (queryList) {\n var queryMap = queryList.reduce(function (map, query) {\n map[query.queryId] = query;\n return map;\n }, {});\n\n var updatedQueries = [];\n this.state.displayedQueries.forEach(function (oldQuery) {\n if (oldQuery.queryId in queryMap) {\n updatedQueries.push(queryMap[oldQuery.queryId]);\n queryMap[oldQuery.queryId] = false;\n }\n });\n\n var newQueries = [];\n for (var queryId in queryMap) {\n if (queryMap[queryId]) {\n newQueries.push(queryMap[queryId]);\n }\n }\n newQueries = this.filterQueries(newQueries, this.state.stateFilters, this.state.errorTypeFilters, this.state.searchString);\n\n var lastRefresh = Date.now();\n var lastReorder = this.state.lastReorder;\n\n if (this.state.reorderInterval !== 0 && lastRefresh - lastReorder >= this.state.reorderInterval) {\n updatedQueries = this.filterQueries(updatedQueries, this.state.stateFilters, this.state.errorTypeFilters, this.state.searchString);\n updatedQueries = updatedQueries.concat(newQueries);\n this.sortAndLimitQueries(updatedQueries, this.state.currentSortType, this.state.currentSortOrder, 0);\n lastReorder = Date.now();\n } else {\n this.sortAndLimitQueries(newQueries, this.state.currentSortType, this.state.currentSortOrder, 0);\n updatedQueries = updatedQueries.concat(newQueries);\n }\n\n if (this.state.maxQueries !== 0 && updatedQueries.length > this.state.maxQueries) {\n updatedQueries.splice(this.state.maxQueries, updatedQueries.length - this.state.maxQueries);\n }\n\n this.setState({\n allQueries: queryList,\n displayedQueries: updatedQueries,\n lastRefresh: lastRefresh,\n lastReorder: lastReorder,\n initialized: true\n });\n this.resetTimer();\n }.bind(this)).error(function () {\n this.setState({\n initialized: true\n });\n this.resetTimer();\n }.bind(this));\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.refreshLoop();\n }\n }, {\n key: \"handleSearchStringChange\",\n value: function handleSearchStringChange(event) {\n var newSearchString = event.target.value;\n clearTimeout(this.searchTimeoutId);\n\n this.setState({\n searchString: newSearchString\n });\n\n this.searchTimeoutId = setTimeout(this.executeSearch, 200);\n }\n }, {\n key: \"executeSearch\",\n value: function executeSearch() {\n clearTimeout(this.searchTimeoutId);\n\n var newDisplayedQueries = this.filterQueries(this.state.allQueries, this.state.stateFilters, this.state.errorTypeFilters, this.state.searchString);\n this.sortAndLimitQueries(newDisplayedQueries, this.state.currentSortType, this.state.currentSortOrder, this.state.maxQueries);\n\n this.setState({\n displayedQueries: newDisplayedQueries\n });\n }\n }, {\n key: \"renderMaxQueriesListItem\",\n value: function renderMaxQueriesListItem(maxQueries, maxQueriesText) {\n return _react2.default.createElement(\n \"li\",\n null,\n _react2.default.createElement(\n \"a\",\n { href: \"#\", className: this.state.maxQueries === maxQueries ? \"selected\" : \"\", onClick: this.handleMaxQueriesClick.bind(this, maxQueries) },\n maxQueriesText\n )\n );\n }\n }, {\n key: \"handleMaxQueriesClick\",\n value: function handleMaxQueriesClick(newMaxQueries) {\n var filteredQueries = this.filterQueries(this.state.allQueries, this.state.stateFilters, this.state.errorTypeFilters, this.state.searchString);\n this.sortAndLimitQueries(filteredQueries, this.state.currentSortType, this.state.currentSortOrder, newMaxQueries);\n\n this.setState({\n maxQueries: newMaxQueries,\n displayedQueries: filteredQueries\n });\n }\n }, {\n key: \"renderReorderListItem\",\n value: function renderReorderListItem(interval, intervalText) {\n return _react2.default.createElement(\n \"li\",\n null,\n _react2.default.createElement(\n \"a\",\n { href: \"#\", className: this.state.reorderInterval === interval ? \"selected\" : \"\", onClick: this.handleReorderClick.bind(this, interval) },\n intervalText\n )\n );\n }\n }, {\n key: \"handleReorderClick\",\n value: function handleReorderClick(interval) {\n if (this.state.reorderInterval !== interval) {\n this.setState({\n reorderInterval: interval\n });\n }\n }\n }, {\n key: \"renderSortListItem\",\n value: function renderSortListItem(sortType, sortText) {\n if (this.state.currentSortType === sortType) {\n var directionArrow = this.state.currentSortOrder === SORT_ORDER.ASCENDING ? _react2.default.createElement(\"span\", { className: \"glyphicon glyphicon-triangle-top\" }) : _react2.default.createElement(\"span\", { className: \"glyphicon glyphicon-triangle-bottom\" });\n return _react2.default.createElement(\n \"li\",\n null,\n _react2.default.createElement(\n \"a\",\n { href: \"#\", className: \"selected\", onClick: this.handleSortClick.bind(this, sortType) },\n sortText,\n \" \",\n directionArrow\n )\n );\n } else {\n return _react2.default.createElement(\n \"li\",\n null,\n _react2.default.createElement(\n \"a\",\n { href: \"#\", onClick: this.handleSortClick.bind(this, sortType) },\n sortText\n )\n );\n }\n }\n }, {\n key: \"handleSortClick\",\n value: function handleSortClick(sortType) {\n var newSortType = sortType;\n var newSortOrder = SORT_ORDER.DESCENDING;\n\n if (this.state.currentSortType === sortType && this.state.currentSortOrder === SORT_ORDER.DESCENDING) {\n newSortOrder = SORT_ORDER.ASCENDING;\n }\n\n var newDisplayedQueries = this.filterQueries(this.state.allQueries, this.state.stateFilters, this.state.errorTypeFilters, this.state.searchString);\n this.sortAndLimitQueries(newDisplayedQueries, newSortType, newSortOrder, this.state.maxQueries);\n\n this.setState({\n displayedQueries: newDisplayedQueries,\n currentSortType: newSortType,\n currentSortOrder: newSortOrder\n });\n }\n }, {\n key: \"renderFilterButton\",\n value: function renderFilterButton(filterType, filterText) {\n var checkmarkStyle = { color: '#57aac7' };\n var classNames = \"btn btn-sm btn-info style-check\";\n if (this.state.stateFilters.indexOf(filterType) > -1) {\n classNames += \" active\";\n checkmarkStyle = { color: '#ffffff' };\n }\n\n return _react2.default.createElement(\n \"button\",\n { type: \"button\", className: classNames, onClick: this.handleStateFilterClick.bind(this, filterType) },\n _react2.default.createElement(\"span\", { className: \"glyphicon glyphicon-ok\", style: checkmarkStyle }),\n \"\\xA0\",\n filterText\n );\n }\n }, {\n key: \"handleStateFilterClick\",\n value: function handleStateFilterClick(filter) {\n var newFilters = this.state.stateFilters.slice();\n if (this.state.stateFilters.indexOf(filter) > -1) {\n newFilters.splice(newFilters.indexOf(filter), 1);\n } else {\n newFilters.push(filter);\n }\n\n var filteredQueries = this.filterQueries(this.state.allQueries, newFilters, this.state.errorTypeFilters, this.state.searchString);\n this.sortAndLimitQueries(filteredQueries, this.state.currentSortType, this.state.currentSortOrder);\n\n this.setState({\n stateFilters: newFilters,\n displayedQueries: filteredQueries\n });\n }\n }, {\n key: \"renderErrorTypeListItem\",\n value: function renderErrorTypeListItem(errorType, errorTypeText) {\n var checkmarkStyle = { color: '#ffffff' };\n if (this.state.errorTypeFilters.indexOf(errorType) > -1) {\n checkmarkStyle = _utils.GLYPHICON_HIGHLIGHT;\n }\n return _react2.default.createElement(\n \"li\",\n null,\n _react2.default.createElement(\n \"a\",\n { href: \"#\", onClick: this.handleErrorTypeFilterClick.bind(this, errorType) },\n _react2.default.createElement(\"span\", { className: \"glyphicon glyphicon-ok\", style: checkmarkStyle }),\n \"\\xA0\",\n errorTypeText\n )\n );\n }\n }, {\n key: \"handleErrorTypeFilterClick\",\n value: function handleErrorTypeFilterClick(errorType) {\n var newFilters = this.state.errorTypeFilters.slice();\n if (this.state.errorTypeFilters.indexOf(errorType) > -1) {\n newFilters.splice(newFilters.indexOf(errorType), 1);\n } else {\n newFilters.push(errorType);\n }\n\n var filteredQueries = this.filterQueries(this.state.allQueries, this.state.stateFilters, newFilters, this.state.searchString);\n this.sortAndLimitQueries(filteredQueries, this.state.currentSortType, this.state.currentSortOrder);\n\n this.setState({\n errorTypeFilters: newFilters,\n displayedQueries: filteredQueries\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var queryList = _react2.default.createElement(DisplayedQueriesList, { queries: this.state.displayedQueries });\n if (this.state.displayedQueries === null || this.state.displayedQueries.length === 0) {\n var label = _react2.default.createElement(\n \"div\",\n { className: \"loader\" },\n \"Loading...\"\n );\n if (this.state.initialized) {\n if (this.state.allQueries === null || this.state.allQueries.length === 0) {\n label = \"No queries\";\n } else {\n label = \"No queries matched filters\";\n }\n }\n queryList = _react2.default.createElement(\n \"div\",\n { className: \"row error-message\" },\n _react2.default.createElement(\n \"div\",\n { className: \"col-xs-12\" },\n _react2.default.createElement(\n \"h4\",\n null,\n label\n )\n )\n );\n }\n\n return _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\n \"div\",\n { className: \"flex flex-row flex-initial header\" },\n _react2.default.createElement(_Header2.default, null)\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"flex flex-row content\" },\n _react2.default.createElement(_NavigationMenu2.default, { active: \"queryhistory\" }),\n _react2.default.createElement(\n \"div\",\n { className: \"container\" },\n _react2.default.createElement(\n \"div\",\n { className: \"row toolbar-row\" },\n _react2.default.createElement(\n \"div\",\n { className: \"col-xs-12 toolbar-col\" },\n _react2.default.createElement(\n \"div\",\n { className: \"input-group input-group-sm\" },\n _react2.default.createElement(\"input\", { type: \"text\", className: \"form-control form-control-small search-bar\", placeholder: \"User, source, query ID, resource group, or query text\",\n onChange: this.handleSearchStringChange, value: this.state.searchString }),\n _react2.default.createElement(\n \"span\",\n { className: \"input-group-addon filter-addon\" },\n \"State:\"\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"input-group-btn\" },\n this.renderFilterButton(FILTER_TYPE.RUNNING, \"Running\"),\n this.renderFilterButton(FILTER_TYPE.QUEUED, \"Queued\"),\n this.renderFilterButton(FILTER_TYPE.FINISHED, \"Finished\"),\n _react2.default.createElement(\n \"button\",\n { type: \"button\", id: \"error-type-dropdown\", className: \"btn btn-default dropdown-toggle\", \"data-toggle\": \"dropdown\", \"aria-haspopup\": \"true\", \"aria-expanded\": \"false\" },\n \"Failed \",\n _react2.default.createElement(\"span\", { className: \"caret\" })\n ),\n _react2.default.createElement(\n \"ul\",\n { className: \"dropdown-menu error-type-dropdown-menu\" },\n this.renderErrorTypeListItem(ERROR_TYPE.INTERNAL_ERROR, \"Internal Error\"),\n this.renderErrorTypeListItem(ERROR_TYPE.EXTERNAL, \"External Error\"),\n this.renderErrorTypeListItem(ERROR_TYPE.INSUFFICIENT_RESOURCES, \"Resources Error\"),\n this.renderErrorTypeListItem(ERROR_TYPE.USER_ERROR, \"User Error\")\n )\n ),\n \"\\xA0\",\n _react2.default.createElement(\n \"div\",\n { className: \"input-group-btn\" },\n _react2.default.createElement(\n \"button\",\n { type: \"button\", className: \"btn btn-default dropdown-toggle\", \"data-toggle\": \"dropdown\", \"aria-haspopup\": \"true\", \"aria-expanded\": \"false\" },\n \"Sort \",\n _react2.default.createElement(\"span\", { className: \"caret\" })\n ),\n _react2.default.createElement(\n \"ul\",\n { className: \"dropdown-menu\" },\n this.renderSortListItem(SORT_TYPE.CREATED, \"Creation Time\"),\n this.renderSortListItem(SORT_TYPE.ELAPSED, \"Elapsed Time\"),\n this.renderSortListItem(SORT_TYPE.CPU, \"CPU Time\"),\n this.renderSortListItem(SORT_TYPE.EXECUTION, \"Execution Time\"),\n this.renderSortListItem(SORT_TYPE.CURRENT_MEMORY, \"Current Memory\"),\n this.renderSortListItem(SORT_TYPE.CUMULATIVE_MEMORY, \"Cumulative User Memory\")\n )\n ),\n \"\\xA0\",\n _react2.default.createElement(\n \"div\",\n { className: \"input-group-btn\" },\n _react2.default.createElement(\n \"button\",\n { type: \"button\", className: \"btn btn-default dropdown-toggle\", \"data-toggle\": \"dropdown\", \"aria-haspopup\": \"true\", \"aria-expanded\": \"false\" },\n \"Reorder Interval \",\n _react2.default.createElement(\"span\", { className: \"caret\" })\n ),\n _react2.default.createElement(\n \"ul\",\n { className: \"dropdown-menu\" },\n this.renderReorderListItem(1000, \"1s\"),\n this.renderReorderListItem(5000, \"5s\"),\n this.renderReorderListItem(10000, \"10s\"),\n this.renderReorderListItem(30000, \"30s\"),\n _react2.default.createElement(\"li\", { role: \"separator\", className: \"divider\" }),\n this.renderReorderListItem(0, \"Off\")\n )\n ),\n \"\\xA0\",\n _react2.default.createElement(\n \"div\",\n { className: \"input-group-btn\" },\n _react2.default.createElement(\n \"button\",\n { type: \"button\", className: \"btn btn-default dropdown-toggle\", \"data-toggle\": \"dropdown\", \"aria-haspopup\": \"true\", \"aria-expanded\": \"false\" },\n \"Show \",\n _react2.default.createElement(\"span\", { className: \"caret\" })\n ),\n _react2.default.createElement(\n \"ul\",\n { className: \"dropdown-menu\" },\n this.renderMaxQueriesListItem(20, \"20 queries\"),\n this.renderMaxQueriesListItem(50, \"50 queries\"),\n this.renderMaxQueriesListItem(100, \"100 queries\"),\n _react2.default.createElement(\"li\", { role: \"separator\", className: \"divider\" }),\n this.renderMaxQueriesListItem(0, \"All queries\")\n )\n )\n )\n )\n ),\n queryList\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"flex flex-row flex-initial statusFooter\" },\n _react2.default.createElement(_StatusFooter2.default, null)\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"flex flex-row flex-initial footer\" },\n _react2.default.createElement(_Footer2.default, null)\n )\n );\n }\n }]);\n\n return QueryList;\n}(_react2.default.Component);\n\n//# sourceURL=webpack:///./components/QueryList.jsx?"); /***/ }), @@ -20636,7 +20636,7 @@ eval("module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _alt = __webpack_require__(/*! ../alt */ \"./queryeditor/alt.js\");\n\nvar _alt2 = _interopRequireDefault(_alt);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar CnxnMonitorActions = function CnxnMonitorActions() {\n _classCallCheck(this, CnxnMonitorActions);\n\n this.generateActions('submitSuccess', 'submitFailed', 'pollingFailed', 'clear');\n};\n\nexports.default = _alt2.default.createActions(CnxnMonitorActions);\n\n//# sourceURL=webpack:///./queryeditor/actions/CnxnMonitorActions.js?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _alt = __webpack_require__(/*! ../alt */ \"./queryeditor/alt.js\");\n\nvar _alt2 = _interopRequireDefault(_alt);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } } /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar CnxnMonitorActions = function CnxnMonitorActions() {\n _classCallCheck(this, CnxnMonitorActions);\n\n this.generateActions('submitSuccess', 'submitFailed', 'pollingFailed', 'clear');\n};\n\nexports.default = _alt2.default.createActions(CnxnMonitorActions);\n\n//# sourceURL=webpack:///./queryeditor/actions/CnxnMonitorActions.js?"); /***/ }), @@ -20684,7 +20684,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar Footer = function (_React$Component) {\n _inherits(Footer, _React$Component);\n\n function Footer() {\n _classCallCheck(this, Footer);\n\n return _possibleConstructorReturn(this, (Footer.__proto__ || Object.getPrototypeOf(Footer)).apply(this, arguments));\n }\n\n _createClass(Footer, [{\n key: 'componentDidMount',\n value: function componentDidMount() {}\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n { className: 'flex footer' },\n _react2.default.createElement(\n 'div',\n { className: 'flex flex-initial' },\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { href: 'mailto:contact@openlookeng.io' },\n 'contact@openlookeng.io'\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'flex justify-flex-end' },\n _react2.default.createElement(\n 'div',\n { className: 'flex flex-initial' },\n _react2.default.createElement(\n 'p',\n null,\n 'Copyright \\xA9 2020 ',\n _react2.default.createElement(\n 'a',\n { href: \"https://openlookeng.io\", target: '_blank' },\n 'openLooKeng'\n ),\n '. All rights reserved'\n )\n )\n )\n );\n }\n }]);\n\n return Footer;\n}(_react2.default.Component);\n\nexports.default = Footer;\n\n//# sourceURL=webpack:///./queryeditor/components/Footer.jsx?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar Footer = function (_React$Component) {\n _inherits(Footer, _React$Component);\n\n function Footer() {\n _classCallCheck(this, Footer);\n\n return _possibleConstructorReturn(this, (Footer.__proto__ || Object.getPrototypeOf(Footer)).apply(this, arguments));\n }\n\n _createClass(Footer, [{\n key: 'componentDidMount',\n value: function componentDidMount() {}\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n { className: 'flex footer' },\n _react2.default.createElement(\n 'div',\n { className: 'flex flex-initial' },\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { href: 'mailto:contact@openlookeng.io' },\n 'contact@openlookeng.io'\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'flex justify-flex-end' },\n _react2.default.createElement(\n 'div',\n { className: 'flex flex-initial' },\n _react2.default.createElement(\n 'p',\n null,\n 'Copyright \\xA9 2020 ',\n _react2.default.createElement(\n 'a',\n { href: \"https://openlookeng.io\", target: '_blank' },\n 'openLooKeng'\n ),\n '. All rights reserved'\n )\n )\n )\n );\n }\n }]);\n\n return Footer;\n}(_react2.default.Component);\n\nexports.default = Footer;\n\n//# sourceURL=webpack:///./queryeditor/components/Footer.jsx?"); /***/ }), @@ -20696,7 +20696,19 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n}); /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _UserActions = __webpack_require__(/*! ../actions/UserActions */ \"./queryeditor/actions/UserActions.js\");\n\nvar _UserActions2 = _interopRequireDefault(_UserActions);\n\nvar _UserStore = __webpack_require__(/*! ../stores/UserStore */ \"./queryeditor/stores/UserStore.js\");\n\nvar _UserStore2 = _interopRequireDefault(_UserStore);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n// State actions\nfunction getStateFromStore() {\n return {\n user: _UserStore2.default.getCurrentUser()\n };\n}\n\nvar Header = function (_React$Component) {\n _inherits(Header, _React$Component);\n\n function Header(props) {\n _classCallCheck(this, Header);\n\n var _this = _possibleConstructorReturn(this, (Header.__proto__ || Object.getPrototypeOf(Header)).call(this, props));\n\n _this.state = getStateFromStore();\n _this._onChange = _this._onChange.bind(_this);\n return _this;\n }\n\n _createClass(Header, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n _UserStore2.default.listen(this._onChange);\n _UserActions2.default.fetchCurrentUser();\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n _UserStore2.default.unlisten(this._onChange);\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'header',\n { className: 'flex flex-row' },\n _react2.default.createElement(\n 'div',\n { className: 'flex' },\n _react2.default.createElement(\n 'a',\n { className: \"hetu-header-brand-name\", href: \"/\", style: { fontFamily: \"roboto!important\" } },\n _react2.default.createElement('img', { src: \"assets/lk-logos.svg\", alt: \"openLooKeng logo\", className: \"hetu-header-brand-name\" })\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'flex justify-flex-end menu' },\n _react2.default.createElement(\n 'div',\n { className: 'flex flex-initial' },\n _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement('i', { className: 'glyphicon glyphicon-user' }),\n this.state.user.name\n ),\n this.state.user.secure ? _react2.default.createElement(\n 'div',\n { className: 'logout' },\n _react2.default.createElement(\n 'form',\n { method: 'post', action: '../ui/api/logout' },\n _react2.default.createElement(\n 'button',\n { type: 'submit', className: 'btn btn-sm' },\n _react2.default.createElement('i', { className: 'fa fa-sign-out' }),\n 'Logout'\n )\n )\n ) : null\n )\n )\n );\n }\n\n /* Store events */\n\n }, {\n key: '_onChange',\n value: function _onChange() {\n this.setState(getStateFromStore());\n }\n }]);\n\n return Header;\n}(_react2.default.Component);\n\nexports.default = Header;\n\n//# sourceURL=webpack:///./queryeditor/components/Header.jsx?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _UserActions = __webpack_require__(/*! ../actions/UserActions */ \"./queryeditor/actions/UserActions.js\");\n\nvar _UserActions2 = _interopRequireDefault(_UserActions);\n\nvar _UserStore = __webpack_require__(/*! ../stores/UserStore */ \"./queryeditor/stores/UserStore.js\");\n\nvar _UserStore2 = _interopRequireDefault(_UserStore);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n// State actions\nfunction getStateFromStore() {\n return {\n user: _UserStore2.default.getCurrentUser()\n };\n}\n\nvar Header = function (_React$Component) {\n _inherits(Header, _React$Component);\n\n function Header(props) {\n _classCallCheck(this, Header);\n\n var _this = _possibleConstructorReturn(this, (Header.__proto__ || Object.getPrototypeOf(Header)).call(this, props));\n\n _this.state = {\n user: _UserStore2.default.getCurrentUser(),\n noConnection: false,\n lightShown: false,\n info: null,\n lastSuccess: Date.now(),\n modalShown: false,\n errorText: null\n };\n _this._onChange = _this._onChange.bind(_this);\n return _this;\n }\n\n _createClass(Header, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n _UserStore2.default.listen(this._onChange);\n _UserActions2.default.fetchCurrentUser();\n this.refreshLoop.bind(this)();\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n _UserStore2.default.unlisten(this._onChange);\n }\n }, {\n key: 'refreshLoop',\n value: function refreshLoop() {\n var _this2 = this;\n\n clearTimeout(this.timeoutId);\n fetch(\"../v1/info\").then(function (response) {\n return response.json();\n }).then(function (info) {\n _this2.setState({\n info: info,\n noConnection: false,\n lastSuccess: Date.now(),\n modalShown: false\n });\n _this2.resetTimer();\n }).catch(function (error) {\n _this2.setState({\n noConnection: true,\n lightShown: !_this2.state.lightShown,\n errorText: error\n });\n _this2.resetTimer();\n });\n }\n }, {\n key: 'resetTimer',\n value: function resetTimer() {\n clearTimeout(this.timeoutId);\n this.timeoutId = setTimeout(this.refreshLoop.bind(this), 1000);\n }\n }, {\n key: 'renderStatusLight',\n value: function renderStatusLight() {\n if (this.state.noConnection) {\n if (this.state.lightShown) {\n return _react2.default.createElement('span', { className: 'status-light status-light-red', id: 'status-indicator' });\n } else {\n return _react2.default.createElement('span', { className: 'status-light', id: 'status-indicator' });\n }\n }\n return _react2.default.createElement('span', { className: 'status-light status-light-green', id: 'status-indicator' });\n }\n }, {\n key: 'render',\n value: function render() {\n var info = this.state.info;\n return _react2.default.createElement(\n 'header',\n { className: 'flex flex-row' },\n _react2.default.createElement(\n 'div',\n { className: 'flex' },\n _react2.default.createElement(\n 'a',\n { className: \"hetu-header-brand-name\", href: \"/\", style: { fontFamily: \"roboto!important\" } },\n _react2.default.createElement('img', { src: \"assets/lk-logos.svg\", alt: \"openLooKeng logo\", className: \"hetu-header-brand-name\" })\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'flex justify-flex-end menu' },\n _react2.default.createElement(\n 'div',\n { className: 'flex flex-initial version' },\n _react2.default.createElement(\n 'div',\n { className: 'version-inner' },\n 'Version :',\n _react2.default.createElement(\n 'span',\n { className: 'uppercase' },\n info ? info.nodeVersion.version : 'null'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'version-inner' },\n 'Environment :',\n _react2.default.createElement(\n 'span',\n { className: 'uppercase' },\n info ? info.environment : 'null'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'version-inner' },\n _react2.default.createElement(\n 'span',\n null,\n 'Uptime'\n ),\n _react2.default.createElement(\n 'span',\n { 'data-toggle': 'tooltip', 'data-placement': 'bottom', title: 'Connection status' },\n this.renderStatusLight()\n ),\n _react2.default.createElement(\n 'span',\n { className: 'uppercase' },\n ': ',\n info ? info.uptime : '0s'\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'flex flex-initial' },\n _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement('i', { className: 'glyphicon glyphicon-user' }),\n this.state.user.name\n ),\n this.state.user.secure ? _react2.default.createElement(\n 'div',\n { className: 'logout' },\n _react2.default.createElement(\n 'form',\n { method: 'post', action: '../ui/api/logout' },\n _react2.default.createElement(\n 'button',\n { type: 'submit', className: 'btn btn-sm' },\n _react2.default.createElement('i', { className: 'fa fa-sign-out' }),\n 'Logout'\n )\n )\n ) : null\n )\n )\n );\n }\n\n /* Store events */\n\n }, {\n key: '_onChange',\n value: function _onChange() {\n this.setState(getStateFromStore());\n }\n }]);\n\n return Header;\n}(_react2.default.Component);\n\nexports.default = Header;\n\n//# sourceURL=webpack:///./queryeditor/components/Header.jsx?"); + +/***/ }), + +/***/ "./queryeditor/components/StatusFooter.jsx": +/*!*************************************************!*\ + !*** ./queryeditor/components/StatusFooter.jsx ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _utils = __webpack_require__(/*! ../../utils */ \"./utils.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar SPARKLINE_PROPERTIES = {\n width: '4.5vw',\n height: '25px',\n fillColor: '',\n //fillOpacity: .8,\n lineColor: '#000',\n //spotColor: '#1EDCFF',\n tooltipClassname: 'sparkline-tooltip',\n disableHiddenCheck: true,\n spotColor: '',\n highlightSpotColor: '',\n highlightLineColor: '',\n minSpotColor: '',\n maxSpotColor: ''\n};\n\nvar StatusFooter = function (_React$Component) {\n _inherits(StatusFooter, _React$Component);\n\n function StatusFooter(props) {\n _classCallCheck(this, StatusFooter);\n\n var _this = _possibleConstructorReturn(this, (StatusFooter.__proto__ || Object.getPrototypeOf(StatusFooter)).call(this, props));\n\n _this.state = {\n runningQueries: [],\n queuedQueries: [],\n blockedQueries: [],\n activeWorkers: [],\n runningDrivers: [],\n reservedMemory: [],\n totalMemory: 0,\n cpuUsage: [],\n rowInputRate: [],\n byteInputRate: [],\n perWorkerCpuTimeRate: [],\n\n lastRender: null,\n lastRefresh: null,\n\n lastInputRows: null,\n lastInputBytes: null,\n lastCpuTime: null,\n\n initialized: false\n };\n\n _this.refreshLoop = _this.refreshLoop.bind(_this);\n return _this;\n }\n\n _createClass(StatusFooter, [{\n key: \"resetTimer\",\n value: function resetTimer() {\n clearTimeout(this.timeoutId);\n // stop refreshing when query finishes or fails\n if (this.state.query === null || !this.state.ended) {\n this.timeoutId = setTimeout(this.refreshLoop, 1000);\n }\n }\n }, {\n key: \"refreshLoop\",\n value: function refreshLoop() {\n clearTimeout(this.timeoutId); // to stop multiple series of refreshLoop from going on simultaneously\n $.get('../v1/cluster', function (clusterState) {\n\n var newPerWorkerCpuTimeRate = [];\n if (this.state.lastRefresh !== null) {\n var cpuTimeSinceRefresh = clusterState.totalCpuTimeSecs - this.state.lastCpuTime;\n var secsSinceRefresh = (Date.now() - this.state.lastRefresh) / 1000.0;\n\n newPerWorkerCpuTimeRate = (0, _utils.addExponentiallyWeightedToHistory)(cpuTimeSinceRefresh / clusterState.activeWorkers / secsSinceRefresh, this.state.perWorkerCpuTimeRate);\n }\n\n this.setState({\n // instantaneous stats\n runningQueries: (0, _utils.addToHistory)(clusterState.runningQueries, this.state.runningQueries),\n queuedQueries: (0, _utils.addToHistory)(clusterState.queuedQueries, this.state.queuedQueries),\n blockedQueries: (0, _utils.addToHistory)(clusterState.blockedQueries, this.state.blockedQueries),\n activeWorkers: (0, _utils.addToHistory)(clusterState.activeWorkers, this.state.activeWorkers),\n\n // moving averages\n runningDrivers: (0, _utils.addExponentiallyWeightedToHistory)(clusterState.runningDrivers, this.state.runningDrivers),\n reservedMemory: (0, _utils.addExponentiallyWeightedToHistory)(clusterState.reservedMemory, this.state.reservedMemory),\n cpuUsage: (0, _utils.addExponentiallyWeightedToHistory)(clusterState.systemCpuLoad * 100, this.state.cpuUsage),\n totalMemory: clusterState.totalMemory,\n perWorkerCpuTimeRate: newPerWorkerCpuTimeRate,\n lastCpuTime: clusterState.totalCpuTimeSecs,\n\n initialized: true,\n\n lastRefresh: Date.now()\n });\n this.resetTimer();\n }.bind(this)).error(function () {\n this.resetTimer();\n }.bind(this));\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.refreshLoop();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n // prevent multiple calls to componentDidUpdate (resulting from calls to setState or otherwise) within the refresh interval from re-rendering sparklines/charts\n if (this.state.lastRender === null || Date.now() - this.state.lastRender >= 1000) {\n var renderTimestamp = Date.now();\n $('#running-queries-sparkline').sparkline(this.state.runningQueries, $.extend({}, SPARKLINE_PROPERTIES, { chartRangeMin: 0 }));\n $('#blocked-queries-sparkline').sparkline(this.state.blockedQueries, $.extend({}, SPARKLINE_PROPERTIES, { chartRangeMin: 0 }));\n $('#queued-queries-sparkline').sparkline(this.state.queuedQueries, $.extend({}, SPARKLINE_PROPERTIES, { chartRangeMin: 0 }));\n\n $('#active-workers-sparkline').sparkline(this.state.activeWorkers, $.extend({}, SPARKLINE_PROPERTIES, { chartRangeMin: 0 }));\n $('#running-drivers-sparkline').sparkline(this.state.runningDrivers, $.extend({}, SPARKLINE_PROPERTIES, { numberFormatter: _utils.precisionRound }));\n $('#cpu-usage-sparkline').sparkline(this.state.cpuUsage, $.extend({}, SPARKLINE_PROPERTIES, { chartRangeMin: 0, chartRangeMax: 100, numberFormatter: _utils.precisionRound }));\n $('#reserved-memory-sparkline').sparkline(this.state.reservedMemory, $.extend({}, SPARKLINE_PROPERTIES, { numberFormatter: _utils.formatDataSizeBytes }));\n $('#cpu-time-rate-sparkline').sparkline(this.state.perWorkerCpuTimeRate, $.extend({}, SPARKLINE_PROPERTIES, { numberFormatter: _utils.precisionRound }));\n\n this.setState({\n lastRender: renderTimestamp\n });\n }\n $('[data-toggle=\"tooltip\"]').tooltip();\n }\n }, {\n key: \"render\",\n value: function render() {\n return _react2.default.createElement(\n \"div\",\n { className: \"flex\" },\n _react2.default.createElement(\n \"div\",\n { className: \"flex flex-initial\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverview\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIconSetContainer\", style: { minWidth: \"60px\" }, \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Active Workers\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIcon\" },\n _react2.default.createElement(\n \"svg\",\n { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 16\", className: \"bi bi-person-check-fill\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\" },\n _react2.default.createElement(\"path\", { fillRule: \"evenodd\", d: \"M1 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H1zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm9.854-2.854a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 0 1 .708-.708L12.5 7.793l2.646-2.647a.5.5 0 0 1 .708 0z\" })\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewContent\" },\n \" \",\n this.state.activeWorkers[this.state.activeWorkers.length - 1],\n \" \"\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIconSetContainer\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Avg Cluster Cpu Usage\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIcon\" },\n _react2.default.createElement(\n \"svg\",\n { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 16\", className: \"bi bi-cpu-fill cpuIco\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\" },\n _react2.default.createElement(\"path\", { fillRule: \"evenodd\", d: \"M5.5.5a.5.5 0 0 0-1 0V2A2.5 2.5 0 0 0 2 4.5H.5a.5.5 0 0 0 0 1H2v1H.5a.5.5 0 0 0 0 1H2v1H.5a.5.5 0 0 0 0 1H2v1H.5a.5.5 0 0 0 0 1H2A2.5 2.5 0 0 0 4.5 14v1.5a.5.5 0 0 0 1 0V14h1v1.5a.5.5 0 0 0 1 0V14h1v1.5a.5.5 0 0 0 1 0V14h1v1.5a.5.5 0 0 0 1 0V14a2.5 2.5 0 0 0 2.5-2.5h1.5a.5.5 0 0 0 0-1H14v-1h1.5a.5.5 0 0 0 0-1H14v-1h1.5a.5.5 0 0 0 0-1H14v-1h1.5a.5.5 0 0 0 0-1H14A2.5 2.5 0 0 0 11.5 2V.5a.5.5 0 0 0-1 0V2h-1V.5a.5.5 0 0 0-1 0V2h-1V.5a.5.5 0 0 0-1 0V2h-1V.5zm1 4.5A1.5 1.5 0 0 0 5 6.5v3A1.5 1.5 0 0 0 6.5 11h3A1.5 1.5 0 0 0 11 9.5v-3A1.5 1.5 0 0 0 9.5 5h-3zm0 1a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5h-3z\" })\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewContent\" },\n (0, _utils.formatCount)(this.state.cpuUsage[this.state.cpuUsage.length - 1]),\n \"%\"\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewGraph\" },\n _react2.default.createElement(\n \"span\",\n { className: \"sparkline\", id: \"cpu-usage-sparkline\" },\n _react2.default.createElement(\n \"div\",\n { className: \"loader\" },\n \"Loading ...\"\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIconSetContainer\", style: { minWidth: \"calc(10vw + 60px)\" }, \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Used Query Memory\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIcon\" },\n _react2.default.createElement(\n \"svg\",\n { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 16\", className: \"bi bi-grid-3x2-gap-fill ramIco\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\" },\n _react2.default.createElement(\"path\", { d: \"M1 4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V4zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1V4zM1 9a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V9zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V9zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1V9z\" })\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewContent\", style: { minWidth: \"100px\", textAlign: \"center\" } },\n (0, _utils.formatDataSizeBytes)(this.state.reservedMemory[this.state.reservedMemory.length - 1]),\n _react2.default.createElement(\n \"span\",\n { className: \"seprator\" },\n \"/\"\n ),\n (0, _utils.formatDataSizeBytes)(this.state.totalMemory)\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewGraph\" },\n _react2.default.createElement(\n \"span\",\n { className: \"sparkline\", id: \"reserved-memory-sparkline\" },\n _react2.default.createElement(\n \"div\",\n { className: \"loader\" },\n \"Loading ...\"\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIconSetContainer\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Running Queries\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIcon\" },\n _react2.default.createElement(\n \"svg\",\n { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 16\", className: \"bi bi-list-check\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\" },\n _react2.default.createElement(\"path\", { fillRule: \"evenodd\", d: \"M5 11.5a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5zM3.854 2.146a.5.5 0 0 1 0 .708l-1.5 1.5a.5.5 0 0 1-.708 0l-.5-.5a.5.5 0 1 1 .708-.708L2 3.293l1.146-1.147a.5.5 0 0 1 .708 0zm0 4a.5.5 0 0 1 0 .708l-1.5 1.5a.5.5 0 0 1-.708 0l-.5-.5a.5.5 0 1 1 .708-.708L2 7.293l1.146-1.147a.5.5 0 0 1 .708 0zm0 4a.5.5 0 0 1 0 .708l-1.5 1.5a.5.5 0 0 1-.708 0l-.5-.5a.5.5 0 0 1 .708-.708l.146.147 1.146-1.147a.5.5 0 0 1 .708 0z\" })\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewContent\" },\n \" \",\n this.state.runningQueries[this.state.runningQueries.length - 1],\n \" \"\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewGraph\" },\n _react2.default.createElement(\n \"span\",\n { className: \"sparkline\", id: \"running-queries-sparkline\" },\n _react2.default.createElement(\n \"div\",\n { className: \"loader\" },\n \"Loading ...\"\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIconSetContainer\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Queued Queries\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIcon\" },\n _react2.default.createElement(\n \"svg\",\n { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 16\", className: \"bi bi-person-lines-fill\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\" },\n _react2.default.createElement(\"path\", { fillRule: \"evenodd\", d: \"M1 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H1zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm7 1.5a.5.5 0 0 1 .5-.5h2a.5.5 0 0 1 0 1h-2a.5.5 0 0 1-.5-.5zm-2-3a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 1-.5-.5zm2 9a.5.5 0 0 1 .5-.5h2a.5.5 0 0 1 0 1h-2a.5.5 0 0 1-.5-.5z\" })\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewContent\" },\n \" \",\n this.state.queuedQueries[this.state.queuedQueries.length - 1],\n \" \"\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewGraph\" },\n _react2.default.createElement(\n \"span\",\n { className: \"sparkline\", id: \"queued-queries-sparkline\" },\n _react2.default.createElement(\n \"div\",\n { className: \"loader\" },\n \"Loading ...\"\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIconSetContainer\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Blocked Queries\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIcon\" },\n _react2.default.createElement(\n \"svg\",\n { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 16\", className: \"bi bi-slash-circle blockIco\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\" },\n _react2.default.createElement(\"path\", { fillRule: \"evenodd\", d: \"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z\" }),\n _react2.default.createElement(\"path\", { fillRule: \"evenodd\", d: \"M11.854 4.146a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708-.708l7-7a.5.5 0 0 1 .708 0z\" })\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewContent\" },\n \" \",\n this.state.blockedQueries[this.state.blockedQueries.length - 1],\n \" \"\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewGraph\" },\n _react2.default.createElement(\n \"span\",\n { className: \"sparkline\", id: \"blocked-queries-sparkline\" },\n _react2.default.createElement(\n \"div\",\n { className: \"loader\" },\n \"Loading ...\"\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIconSetContainer\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Avg Running Tasks\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIcon\" },\n _react2.default.createElement(\n \"svg\",\n { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 16\", className: \"bi bi-hdd-fill diskIco\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\" },\n _react2.default.createElement(\"path\", { fillRule: \"evenodd\", d: \"M0 10a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-1zm2.5 1a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1zm2 0a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1z\" }),\n _react2.default.createElement(\"path\", { d: \"M.91 7.204A2.993 2.993 0 0 1 2 7h12c.384 0 .752.072 1.09.204l-1.867-3.422A1.5 1.5 0 0 0 11.906 3H4.094a1.5 1.5 0 0 0-1.317.782L.91 7.204z\" })\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewContent\" },\n \" \",\n (0, _utils.formatCount)(this.state.runningDrivers[this.state.runningDrivers.length - 1]),\n \" \"\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewGraph\" },\n _react2.default.createElement(\n \"span\",\n { className: \"sparkline\", id: \"running-drivers-sparkline\" },\n _react2.default.createElement(\n \"div\",\n { className: \"loader\" },\n \"Loading ...\"\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIconSetContainer\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Avg CPU Cycles per Worker\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIcon\" },\n _react2.default.createElement(\n \"svg\",\n { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 16\", className: \"bi bi-list\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\" },\n _react2.default.createElement(\"path\", { fillRule: \"evenodd\", d: \"M2.5 11.5A.5.5 0 0 1 3 11h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4A.5.5 0 0 1 3 7h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4A.5.5 0 0 1 3 3h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5z\" })\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewContent\" },\n \" \",\n (0, _utils.formatCount)(this.state.perWorkerCpuTimeRate[this.state.perWorkerCpuTimeRate.length - 1]),\n \" \"\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewGraph\" },\n _react2.default.createElement(\n \"span\",\n { className: \"sparkline\", id: \"cpu-time-rate-sparkline\" },\n _react2.default.createElement(\n \"div\",\n { className: \"loader\" },\n \"Loading ...\"\n )\n )\n )\n )\n )\n )\n );\n }\n }]);\n\n return StatusFooter;\n}(_react2.default.Component);\n\nexports.default = StatusFooter;\n\n//# sourceURL=webpack:///./queryeditor/components/StatusFooter.jsx?"); /***/ }), @@ -20780,7 +20792,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar getStatusText = exports.getStatusText = function getStatusText(response) {\n if (response.statusText != \"\") {\n return response.statusText;\n }\n switch (response.status) {\n case 200:\n {\n return \"OK\";\n }\n case 201:\n {\n return \"Created\";\n }\n case 202:\n {\n return \"Accepted\";\n }\n case 204:\n {\n return \"No Content\";\n }\n case 205:\n {\n return \"Reset Content\";\n }\n case 206:\n {\n return \"Partial Content\";\n }\n case 301:\n {\n return \"Moved Permanently\";\n }\n case 302:\n {\n return \"Found\";\n }\n case 303:\n {\n return \"See Other\";\n }\n case 304:\n {\n return \"Not Modified\";\n }\n case 305:\n {\n return \"Use Proxy\";\n }\n case 307:\n {\n return \"Temporary Redirect\";\n }\n case 400:\n {\n return \"Bad Request\";\n }\n case 401:\n {\n return \"Unauthorized\";\n }\n case 402:\n {\n return \"Payment Required\";\n }\n case 403:\n {\n return \"Forbidden\";\n }\n case 404:\n {\n return \"Not Found\";\n }\n case 405:\n {\n return \"Method Not Allowed\";\n }\n case 406:\n {\n return \"Not Acceptable\";\n }\n case 407:\n {\n return \"Proxy Authentication Required\";\n }\n case 408:\n {\n return \"Request Timeout\";\n }\n case 409:\n {\n return \"Conflict\";\n }\n case 410:\n {\n return \"Gone\";\n }\n case 411:\n {\n return \"Length Required\";\n }\n case 412:\n {\n return \"Precondition Failed\";\n }\n case 413:\n {\n return \"Request Entity Too Large\";\n }\n case 414:\n {\n return \"Request-URI Too Long\";\n }\n case 415:\n {\n return \"Unsupported Media Type\";\n }\n case 416:\n {\n return \"Requested Range Not Satisfiable\";\n }\n case 417:\n {\n return \"Expectation Failed\";\n }\n case 428:\n {\n return \"Precondition Required\";\n }\n case 429:\n {\n return \"Too Many Requests\";\n }\n case 431:\n {\n return \"Request Header Fields Too Large\";\n }\n case 500:\n {\n return \"Internal Server Error\";\n }\n case 501:\n {\n return \"Not Implemented\";\n }\n case 502:\n {\n return \"Bad Gateway\";\n }\n case 503:\n {\n return \"Service Unavailable\";\n }\n case 504:\n {\n return \"Gateway Timeout\";\n }\n case 505:\n {\n return \"HTTP Version Not Supported\";\n }\n case 511:\n {\n return \"Network Authentication Required\";\n }\n }\n};\n\n//# sourceURL=webpack:///./queryeditor/utils/xhrutil.js?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar getStatusText = exports.getStatusText = function getStatusText(response) {\n if (response.statusText != \"\") {\n return response.statusText;\n }\n switch (response.status) {\n case 200:\n {\n return \"OK\";\n }\n case 201:\n {\n return \"Created\";\n }\n case 202:\n {\n return \"Accepted\";\n }\n case 204:\n {\n return \"No Content\";\n }\n case 205:\n {\n return \"Reset Content\";\n }\n case 206:\n {\n return \"Partial Content\";\n }\n case 301:\n {\n return \"Moved Permanently\";\n }\n case 302:\n {\n return \"Found\";\n }\n case 303:\n {\n return \"See Other\";\n }\n case 304:\n {\n return \"Not Modified\";\n }\n case 305:\n {\n return \"Use Proxy\";\n }\n case 307:\n {\n return \"Temporary Redirect\";\n }\n case 400:\n {\n return \"Bad Request\";\n }\n case 401:\n {\n return \"Unauthorized\";\n }\n case 402:\n {\n return \"Payment Required\";\n }\n case 403:\n {\n return \"Forbidden\";\n }\n case 404:\n {\n return \"Not Found\";\n }\n case 405:\n {\n return \"Method Not Allowed\";\n }\n case 406:\n {\n return \"Not Acceptable\";\n }\n case 407:\n {\n return \"Proxy Authentication Required\";\n }\n case 408:\n {\n return \"Request Timeout\";\n }\n case 409:\n {\n return \"Conflict\";\n }\n case 410:\n {\n return \"Gone\";\n }\n case 411:\n {\n return \"Length Required\";\n }\n case 412:\n {\n return \"Precondition Failed\";\n }\n case 413:\n {\n return \"Request Entity Too Large\";\n }\n case 414:\n {\n return \"Request-URI Too Long\";\n }\n case 415:\n {\n return \"Unsupported Media Type\";\n }\n case 416:\n {\n return \"Requested Range Not Satisfiable\";\n }\n case 417:\n {\n return \"Expectation Failed\";\n }\n case 428:\n {\n return \"Precondition Required\";\n }\n case 429:\n {\n return \"Too Many Requests\";\n }\n case 431:\n {\n return \"Request Header Fields Too Large\";\n }\n case 500:\n {\n return \"Internal Server Error\";\n }\n case 501:\n {\n return \"Not Implemented\";\n }\n case 502:\n {\n return \"Bad Gateway\";\n }\n case 503:\n {\n return \"Service Unavailable\";\n }\n case 504:\n {\n return \"Gateway Timeout\";\n }\n case 505:\n {\n return \"HTTP Version Not Supported\";\n }\n case 511:\n {\n return \"Network Authentication Required\";\n }\n }\n};\n\n//# sourceURL=webpack:///./queryeditor/utils/xhrutil.js?"); /***/ }), diff --git a/presto-main/src/main/resources/webapp/dist/nodes.js b/presto-main/src/main/resources/webapp/dist/nodes.js index e58d35209..2613ad195 100644 --- a/presto-main/src/main/resources/webapp/dist/nodes.js +++ b/presto-main/src/main/resources/webapp/dist/nodes.js @@ -94,7 +94,7 @@ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar NavigationMenu = function (_React$Component) {\n _inherits(NavigationMenu, _React$Component);\n\n function NavigationMenu(args) {\n _classCallCheck(this, NavigationMenu);\n\n return _possibleConstructorReturn(this, (NavigationMenu.__proto__ || Object.getPrototypeOf(NavigationMenu)).call(this, args));\n }\n\n _createClass(NavigationMenu, [{\n key: \"render\",\n value: function render() {\n return _react2.default.createElement(\n \"div\",\n { className: \"menu-left\" },\n _react2.default.createElement(\n \"ul\",\n null,\n _react2.default.createElement(\n \"li\",\n { className: this.props.active === 'queryeditor' ? \"active\" : \"\" },\n _react2.default.createElement(\n \"a\",\n { href: this.props.active === 'queryeditor' ? \"#\" : \"./queryeditor.html\" },\n _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\"i\", { className: \"fa fa-home\" })\n ),\n _react2.default.createElement(\n \"div\",\n null,\n \"Home\"\n )\n )\n ),\n _react2.default.createElement(\n \"li\",\n { className: this.props.active === 'metrics' ? \"active\" : \"\" },\n _react2.default.createElement(\n \"a\",\n { href: this.props.active === 'metrics' ? \"#\" : \"./overview.html\" },\n _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\"i\", { className: \"fa fa-line-chart\" })\n ),\n _react2.default.createElement(\n \"div\",\n null,\n \"Metrics\"\n )\n )\n ),\n _react2.default.createElement(\n \"li\",\n { className: this.props.active === 'nodes' ? \"active\" : \"\" },\n _react2.default.createElement(\n \"a\",\n { href: this.props.active === 'nodes' ? \"#\" : \"./nodes.html\" },\n _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\"i\", { className: \"fa fa-server\" })\n ),\n _react2.default.createElement(\n \"div\",\n null,\n \"Nodes\"\n )\n )\n ),\n _react2.default.createElement(\n \"li\",\n { className: this.props.active === 'queryhistory' ? \"active\" : \"\" },\n _react2.default.createElement(\n \"a\",\n { href: this.props.active === 'queryhistory' ? \"#\" : \"./queryhistory.html\" },\n _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\"i\", { className: \"fa fa-history\" })\n ),\n _react2.default.createElement(\n \"div\",\n null,\n \"Query History\"\n )\n )\n )\n )\n );\n }\n }]);\n\n return NavigationMenu;\n}(_react2.default.Component);\n\nexports.default = NavigationMenu;\n\n//# sourceURL=webpack:///./NavigationMenu.jsx?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar NavigationMenu = function (_React$Component) {\n _inherits(NavigationMenu, _React$Component);\n\n function NavigationMenu(args) {\n _classCallCheck(this, NavigationMenu);\n\n return _possibleConstructorReturn(this, (NavigationMenu.__proto__ || Object.getPrototypeOf(NavigationMenu)).call(this, args));\n }\n\n _createClass(NavigationMenu, [{\n key: \"render\",\n value: function render() {\n return _react2.default.createElement(\n \"div\",\n { className: \"menu-left\" },\n _react2.default.createElement(\n \"ul\",\n null,\n _react2.default.createElement(\n \"li\",\n { className: this.props.active === 'queryeditor' ? \"active\" : \"\" },\n _react2.default.createElement(\n \"a\",\n { href: this.props.active === 'queryeditor' ? \"#\" : \"./queryeditor.html\" },\n _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\"i\", { className: \"fa fa-home\" })\n ),\n _react2.default.createElement(\n \"div\",\n null,\n \"Home\"\n )\n )\n ),\n _react2.default.createElement(\n \"li\",\n { className: this.props.active === 'metrics' ? \"active\" : \"\" },\n _react2.default.createElement(\n \"a\",\n { href: this.props.active === 'metrics' ? \"#\" : \"./overview.html\" },\n _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\"i\", { className: \"fa fa-line-chart\" })\n ),\n _react2.default.createElement(\n \"div\",\n null,\n \"Metrics\"\n )\n )\n ),\n _react2.default.createElement(\n \"li\",\n { className: this.props.active === 'nodes' ? \"active\" : \"\" },\n _react2.default.createElement(\n \"a\",\n { href: this.props.active === 'nodes' ? \"#\" : \"./nodes.html\" },\n _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\"i\", { className: \"fa fa-server\" })\n ),\n _react2.default.createElement(\n \"div\",\n null,\n \"Nodes\"\n )\n )\n ),\n _react2.default.createElement(\n \"li\",\n { className: this.props.active === 'queryhistory' ? \"active\" : \"\" },\n _react2.default.createElement(\n \"a\",\n { href: this.props.active === 'queryhistory' ? \"#\" : \"./queryhistory.html\" },\n _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\"i\", { className: \"fa fa-history\" })\n ),\n _react2.default.createElement(\n \"div\",\n null,\n \"Query History\"\n )\n )\n )\n )\n );\n }\n }]);\n\n return NavigationMenu;\n}(_react2.default.Component);\n\nexports.default = NavigationMenu;\n\n//# sourceURL=webpack:///./NavigationMenu.jsx?"); /***/ }), @@ -20588,7 +20588,7 @@ eval("module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactDom = __webpack_require__(/*! react-dom */ \"./node_modules/react-dom/index.js\");\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nvar _NodesMain = __webpack_require__(/*! ./overview/NodesMain */ \"./overview/NodesMain.jsx\");\n\nvar _NodesMain2 = _interopRequireDefault(_NodesMain);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n_reactDom2.default.render(_react2.default.createElement(_NodesMain2.default, null), document.getElementById(\"nodes\"));\n\n//# sourceURL=webpack:///./nodes.jsx?"); +eval("\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactDom = __webpack_require__(/*! react-dom */ \"./node_modules/react-dom/index.js\");\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nvar _NodesMain = __webpack_require__(/*! ./overview/NodesMain */ \"./overview/NodesMain.jsx\");\n\nvar _NodesMain2 = _interopRequireDefault(_NodesMain);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n_reactDom2.default.render(_react2.default.createElement(_NodesMain2.default, null), document.getElementById(\"nodes\")); /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n//# sourceURL=webpack:///./nodes.jsx?"); /***/ }), @@ -20600,7 +20600,7 @@ eval("\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/i /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _Header = __webpack_require__(/*! ../queryeditor/components/Header */ \"./queryeditor/components/Header.jsx\");\n\nvar _Header2 = _interopRequireDefault(_Header);\n\nvar _Footer = __webpack_require__(/*! ../queryeditor/components/Footer */ \"./queryeditor/components/Footer.jsx\");\n\nvar _Footer2 = _interopRequireDefault(_Footer);\n\nvar _utils = __webpack_require__(/*! ../utils */ \"./utils.js\");\n\nvar _NavigationMenu = __webpack_require__(/*! ../NavigationMenu */ \"./NavigationMenu.jsx\");\n\nvar _NavigationMenu2 = _interopRequireDefault(_NavigationMenu);\n\nvar _OverviewStore = __webpack_require__(/*! ../overview/OverviewStore */ \"./overview/OverviewStore.js\");\n\nvar _OverviewStore2 = _interopRequireDefault(_OverviewStore);\n\nvar _OverviewActions = __webpack_require__(/*! ./OverviewActions */ \"./overview/OverviewActions.js\");\n\nvar _OverviewActions2 = _interopRequireDefault(_OverviewActions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar NodesMain = function (_React$Component) {\n _inherits(NodesMain, _React$Component);\n\n function NodesMain(props) {\n _classCallCheck(this, NodesMain);\n\n var _this = _possibleConstructorReturn(this, (NodesMain.__proto__ || Object.getPrototypeOf(NodesMain)).call(this, props));\n\n _this.state = {\n tableData: []\n };\n _this._onChange = _this._onChange.bind(_this);\n _this.lineDatas = _this.lineDatas.bind(_this);\n return _this;\n }\n\n _createClass(NodesMain, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n _OverviewStore2.default.listen(this._onChange);\n this.lineDatas();\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n _OverviewStore2.default.unlisten(this._onChange);\n clearInterval(this.state.timer);\n }\n\n //obtained data per sec\n\n }, {\n key: \"lineDatas\",\n value: function lineDatas() {\n this.state.timer = setInterval(function () {\n _OverviewActions2.default.getData();\n _OverviewActions2.default.getMemoryData();\n }, 1000);\n }\n }, {\n key: \"_onChange\",\n value: function _onChange(data) {\n var table = [];\n if (data.memoryData) {\n Object.keys(data.memoryData).map(function (key) {\n var obj = {};\n obj.id = key.slice(0, key.indexOf(\" \"));\n obj.ip = key.slice(key.indexOf(\"[\") + 1, key.indexOf(\"]\"));\n obj.count = data.memoryData[key].availableProcessors;\n var totalMemory = data.memoryData[key].totalNodeMemory.slice(0, -1);\n obj.nodeMemory = totalMemory;\n obj.freeMemory = data.memoryData[key].pools.general.freeBytes + (data.memoryData[key].pools.reserved ? data.memoryData[key].pools.reserved.freeBytes : 0);\n obj.usedMemory = data.memoryData[key].pools.general.reservedBytes + (data.memoryData[key].pools.reserved ? data.memoryData[key].pools.reserved.reservedBytes : 0);\n table.push(obj);\n });\n }\n this.setState({\n tableData: table\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n return _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\n \"div\",\n { className: \"flex flex-row flex-initial header\" },\n _react2.default.createElement(_Header2.default, null)\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"nodes\" },\n _react2.default.createElement(_NavigationMenu2.default, { active: \"nodes\" }),\n _react2.default.createElement(\n \"div\",\n { className: \"line-right\" },\n _react2.default.createElement(\n \"div\",\n { className: \"line-show\" },\n _react2.default.createElement(\n \"div\",\n { className: \"summary-table\" },\n _react2.default.createElement(\n \"h3\",\n null,\n \"Cluster Nodes\"\n ),\n _react2.default.createElement(\n \"table\",\n { className: \"table\" },\n _react2.default.createElement(\n \"thead\",\n null,\n _react2.default.createElement(\n \"tr\",\n null,\n _react2.default.createElement(\n \"th\",\n null,\n \"ID\"\n ),\n _react2.default.createElement(\n \"th\",\n null,\n \"IP\"\n ),\n _react2.default.createElement(\n \"th\",\n null,\n \"CPU Count\"\n ),\n _react2.default.createElement(\n \"th\",\n null,\n \"Usable Node Memory\"\n ),\n _react2.default.createElement(\n \"th\",\n null,\n \"Used Memory\"\n ),\n _react2.default.createElement(\n \"th\",\n null,\n \"Free Memory\"\n )\n )\n ),\n _react2.default.createElement(\n \"tbody\",\n null,\n this.state.tableData.map(function (ele, index) {\n return _react2.default.createElement(\n \"tr\",\n { key: index },\n _react2.default.createElement(\n \"td\",\n null,\n ele.id\n ),\n _react2.default.createElement(\n \"td\",\n null,\n ele.ip\n ),\n _react2.default.createElement(\n \"td\",\n null,\n ele.count\n ),\n _react2.default.createElement(\n \"td\",\n null,\n (0, _utils.formatDataSizeBytes)(ele.nodeMemory)\n ),\n _react2.default.createElement(\n \"td\",\n null,\n (0, _utils.formatDataSizeBytes)(ele.usedMemory)\n ),\n _react2.default.createElement(\n \"td\",\n null,\n (0, _utils.formatDataSizeBytes)(ele.freeMemory)\n )\n );\n })\n )\n )\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"flex flex-row flex-initial footer\" },\n _react2.default.createElement(_Footer2.default, null)\n )\n );\n }\n }]);\n\n return NodesMain;\n}(_react2.default.Component);\n\nexports.default = NodesMain;\n\n//# sourceURL=webpack:///./overview/NodesMain.jsx?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _Header = __webpack_require__(/*! ../queryeditor/components/Header */ \"./queryeditor/components/Header.jsx\");\n\nvar _Header2 = _interopRequireDefault(_Header);\n\nvar _Footer = __webpack_require__(/*! ../queryeditor/components/Footer */ \"./queryeditor/components/Footer.jsx\");\n\nvar _Footer2 = _interopRequireDefault(_Footer);\n\nvar _StatusFooter = __webpack_require__(/*! ../queryeditor/components/StatusFooter */ \"./queryeditor/components/StatusFooter.jsx\");\n\nvar _StatusFooter2 = _interopRequireDefault(_StatusFooter);\n\nvar _utils = __webpack_require__(/*! ../utils */ \"./utils.js\");\n\nvar _NavigationMenu = __webpack_require__(/*! ../NavigationMenu */ \"./NavigationMenu.jsx\");\n\nvar _NavigationMenu2 = _interopRequireDefault(_NavigationMenu);\n\nvar _OverviewStore = __webpack_require__(/*! ../overview/OverviewStore */ \"./overview/OverviewStore.js\");\n\nvar _OverviewStore2 = _interopRequireDefault(_OverviewStore);\n\nvar _OverviewActions = __webpack_require__(/*! ./OverviewActions */ \"./overview/OverviewActions.js\");\n\nvar _OverviewActions2 = _interopRequireDefault(_OverviewActions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar NodesMain = function (_React$Component) {\n _inherits(NodesMain, _React$Component);\n\n function NodesMain(props) {\n _classCallCheck(this, NodesMain);\n\n var _this = _possibleConstructorReturn(this, (NodesMain.__proto__ || Object.getPrototypeOf(NodesMain)).call(this, props));\n\n _this.state = {\n tableData: []\n };\n _this._onChange = _this._onChange.bind(_this);\n _this.lineDatas = _this.lineDatas.bind(_this);\n return _this;\n }\n\n _createClass(NodesMain, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n _OverviewStore2.default.listen(this._onChange);\n this.lineDatas();\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n _OverviewStore2.default.unlisten(this._onChange);\n clearInterval(this.state.timer);\n }\n\n //obtained data per sec\n\n }, {\n key: \"lineDatas\",\n value: function lineDatas() {\n this.state.timer = setInterval(function () {\n _OverviewActions2.default.getData();\n _OverviewActions2.default.getMemoryData();\n }, 1000);\n }\n }, {\n key: \"_onChange\",\n value: function _onChange(data) {\n var table = [];\n if (data.memoryData) {\n Object.keys(data.memoryData).map(function (key) {\n var obj = {};\n obj.id = key.slice(0, key.indexOf(\" \"));\n obj.ip = key.slice(key.indexOf(\"[\") + 1, key.indexOf(\"]\"));\n obj.role = key.slice(key.indexOf(\"]\") + 2) == 'true' ? 'Coordinator' : 'Worker';\n obj.count = data.memoryData[key].availableProcessors;\n var totalMemory = data.memoryData[key].totalNodeMemory.slice(0, -1);\n obj.nodeMemory = totalMemory;\n obj.freeMemory = data.memoryData[key].pools.general.freeBytes + (data.memoryData[key].pools.reserved ? data.memoryData[key].pools.reserved.freeBytes : 0);\n obj.usedMemory = data.memoryData[key].pools.general.reservedBytes + (data.memoryData[key].pools.reserved ? data.memoryData[key].pools.reserved.reservedBytes : 0);\n table.push(obj);\n });\n }\n this.setState({\n tableData: table\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n return _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\n \"div\",\n { className: \"flex flex-row flex-initial header\" },\n _react2.default.createElement(_Header2.default, null)\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"nodes\" },\n _react2.default.createElement(_NavigationMenu2.default, { active: \"nodes\" }),\n _react2.default.createElement(\n \"div\",\n { className: \"line-right\" },\n _react2.default.createElement(\n \"div\",\n { className: \"line-show\" },\n _react2.default.createElement(\n \"div\",\n { className: \"summary-table\" },\n _react2.default.createElement(\n \"h3\",\n null,\n \"Cluster Nodes\"\n ),\n _react2.default.createElement(\n \"table\",\n { className: \"table\" },\n _react2.default.createElement(\n \"thead\",\n null,\n _react2.default.createElement(\n \"tr\",\n null,\n _react2.default.createElement(\n \"th\",\n null,\n \"ID\"\n ),\n _react2.default.createElement(\n \"th\",\n null,\n \"IP\"\n ),\n _react2.default.createElement(\n \"th\",\n null,\n \"Role\"\n ),\n _react2.default.createElement(\n \"th\",\n null,\n \"CPU Count\"\n ),\n _react2.default.createElement(\n \"th\",\n null,\n \"Usable Node Memory\"\n ),\n _react2.default.createElement(\n \"th\",\n null,\n \"Used Memory\"\n ),\n _react2.default.createElement(\n \"th\",\n null,\n \"Free Memory\"\n )\n )\n ),\n _react2.default.createElement(\n \"tbody\",\n null,\n this.state.tableData.map(function (ele, index) {\n return _react2.default.createElement(\n \"tr\",\n { key: index },\n _react2.default.createElement(\n \"td\",\n null,\n ele.id\n ),\n _react2.default.createElement(\n \"td\",\n null,\n ele.ip\n ),\n _react2.default.createElement(\n \"td\",\n null,\n ele.role\n ),\n _react2.default.createElement(\n \"td\",\n null,\n ele.count\n ),\n _react2.default.createElement(\n \"td\",\n null,\n (0, _utils.formatDataSizeBytes)(ele.nodeMemory)\n ),\n _react2.default.createElement(\n \"td\",\n null,\n (0, _utils.formatDataSizeBytes)(ele.usedMemory)\n ),\n _react2.default.createElement(\n \"td\",\n null,\n (0, _utils.formatDataSizeBytes)(ele.freeMemory)\n )\n );\n })\n )\n )\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"flex flex-row flex-initial statusFooter\" },\n _react2.default.createElement(_StatusFooter2.default, null)\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"flex flex-row flex-initial footer\" },\n _react2.default.createElement(_Footer2.default, null)\n )\n );\n }\n }]);\n\n return NodesMain;\n}(_react2.default.Component);\n\nexports.default = NodesMain;\n\n//# sourceURL=webpack:///./overview/NodesMain.jsx?"); /***/ }), @@ -20612,7 +20612,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n}); /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _alt = __webpack_require__(/*! ../queryeditor/alt */ \"./queryeditor/alt.js\");\n\nvar _alt2 = _interopRequireDefault(_alt);\n\nvar _OverviewApiUtils = __webpack_require__(/*! ./OverviewApiUtils */ \"./overview/OverviewApiUtils.js\");\n\nvar _OverviewApiUtils2 = _interopRequireDefault(_OverviewApiUtils);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar OverviewActions = function () {\n function OverviewActions() {\n _classCallCheck(this, OverviewActions);\n\n this.generateActions('receiveData', 'memoryData');\n }\n\n _createClass(OverviewActions, [{\n key: \"getData\",\n value: function getData() {\n var _this = this;\n\n _OverviewApiUtils2.default.getLineData().then(function (data) {\n _this.actions.receiveData(data);\n });\n }\n }, {\n key: \"getMemoryData\",\n value: function getMemoryData() {\n var _this2 = this;\n\n _OverviewApiUtils2.default.getWorkMemory().then(function (data) {\n _this2.actions.memoryData(data);\n });\n }\n }]);\n\n return OverviewActions;\n}();\n\nexports.default = _alt2.default.createActions(OverviewActions);\n\n//# sourceURL=webpack:///./overview/OverviewActions.js?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar _alt = __webpack_require__(/*! ../queryeditor/alt */ \"./queryeditor/alt.js\");\n\nvar _alt2 = _interopRequireDefault(_alt);\n\nvar _OverviewApiUtils = __webpack_require__(/*! ./OverviewApiUtils */ \"./overview/OverviewApiUtils.js\");\n\nvar _OverviewApiUtils2 = _interopRequireDefault(_OverviewApiUtils);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar OverviewActions = function () {\n function OverviewActions() {\n _classCallCheck(this, OverviewActions);\n\n this.generateActions('receiveData', 'memoryData');\n }\n\n _createClass(OverviewActions, [{\n key: \"getData\",\n value: function getData() {\n var _this = this;\n\n _OverviewApiUtils2.default.getLineData().then(function (data) {\n _this.actions.receiveData(data);\n });\n }\n }, {\n key: \"getMemoryData\",\n value: function getMemoryData() {\n var _this2 = this;\n\n _OverviewApiUtils2.default.getWorkMemory().then(function (data) {\n _this2.actions.memoryData(data);\n });\n }\n }]);\n\n return OverviewActions;\n}();\n\nexports.default = _alt2.default.createActions(OverviewActions);\n\n//# sourceURL=webpack:///./overview/OverviewActions.js?"); /***/ }), @@ -20624,7 +20624,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n}); /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _xhr = __webpack_require__(/*! ../queryeditor/utils/xhr */ \"./queryeditor/utils/xhr.js\");\n\nvar _xhr2 = _interopRequireDefault(_xhr);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = {\n getLineData: function getLineData() {\n return (0, _xhr2.default)('../v1/cluster');\n },\n getWorkMemory: function getWorkMemory() {\n return (0, _xhr2.default)('../v1/cluster/workerMemory');\n }\n};\n\n//# sourceURL=webpack:///./overview/OverviewApiUtils.js?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _xhr = __webpack_require__(/*! ../queryeditor/utils/xhr */ \"./queryeditor/utils/xhr.js\");\n\nvar _xhr2 = _interopRequireDefault(_xhr);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = {\n getLineData: function getLineData() {\n return (0, _xhr2.default)('../v1/cluster');\n },\n getWorkMemory: function getWorkMemory() {\n return (0, _xhr2.default)('../v1/cluster/workerMemory');\n }\n}; /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n//# sourceURL=webpack:///./overview/OverviewApiUtils.js?"); /***/ }), @@ -20636,7 +20636,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n}); /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _alt = __webpack_require__(/*! ../queryeditor/alt */ \"./queryeditor/alt.js\");\n\nvar _alt2 = _interopRequireDefault(_alt);\n\nvar _OverviewActions = __webpack_require__(/*! ./OverviewActions */ \"./overview/OverviewActions.js\");\n\nvar _OverviewActions2 = _interopRequireDefault(_OverviewActions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar OverviewStore = function () {\n function OverviewStore() {\n _classCallCheck(this, OverviewStore);\n\n this.lineData = null;\n this.memoryData = null;\n this.requestNum = 0;\n this.bindListeners({\n onReceiveData: _OverviewActions2.default.RECEIVE_DATA,\n onMemoryData: _OverviewActions2.default.MEMORY_DATA\n });\n }\n\n _createClass(OverviewStore, [{\n key: 'onReceiveData',\n value: function onReceiveData(data) {\n this.lineData = data;\n this.requestNum++;\n }\n }, {\n key: 'onMemoryData',\n value: function onMemoryData(data) {\n this.memoryData = data;\n this.requestNum++;\n }\n }]);\n\n return OverviewStore;\n}();\n\nexports.default = _alt2.default.createStore(OverviewStore, 'OverviewStore');\n\n//# sourceURL=webpack:///./overview/OverviewStore.js?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar _alt = __webpack_require__(/*! ../queryeditor/alt */ \"./queryeditor/alt.js\");\n\nvar _alt2 = _interopRequireDefault(_alt);\n\nvar _OverviewActions = __webpack_require__(/*! ./OverviewActions */ \"./overview/OverviewActions.js\");\n\nvar _OverviewActions2 = _interopRequireDefault(_OverviewActions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar OverviewStore = function () {\n function OverviewStore() {\n _classCallCheck(this, OverviewStore);\n\n this.lineData = null;\n this.memoryData = null;\n this.requestNum = 0;\n this.bindListeners({\n onReceiveData: _OverviewActions2.default.RECEIVE_DATA,\n onMemoryData: _OverviewActions2.default.MEMORY_DATA\n });\n }\n\n _createClass(OverviewStore, [{\n key: 'onReceiveData',\n value: function onReceiveData(data) {\n this.lineData = data;\n this.requestNum++;\n }\n }, {\n key: 'onMemoryData',\n value: function onMemoryData(data) {\n this.memoryData = data;\n this.requestNum++;\n }\n }]);\n\n return OverviewStore;\n}();\n\nexports.default = _alt2.default.createStore(OverviewStore, 'OverviewStore');\n\n//# sourceURL=webpack:///./overview/OverviewStore.js?"); /***/ }), @@ -20648,7 +20648,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n}); /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _alt = __webpack_require__(/*! ../alt */ \"./queryeditor/alt.js\");\n\nvar _alt2 = _interopRequireDefault(_alt);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar CnxnMonitorActions = function CnxnMonitorActions() {\n _classCallCheck(this, CnxnMonitorActions);\n\n this.generateActions('submitSuccess', 'submitFailed', 'pollingFailed', 'clear');\n};\n\nexports.default = _alt2.default.createActions(CnxnMonitorActions);\n\n//# sourceURL=webpack:///./queryeditor/actions/CnxnMonitorActions.js?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _alt = __webpack_require__(/*! ../alt */ \"./queryeditor/alt.js\");\n\nvar _alt2 = _interopRequireDefault(_alt);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } } /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar CnxnMonitorActions = function CnxnMonitorActions() {\n _classCallCheck(this, CnxnMonitorActions);\n\n this.generateActions('submitSuccess', 'submitFailed', 'pollingFailed', 'clear');\n};\n\nexports.default = _alt2.default.createActions(CnxnMonitorActions);\n\n//# sourceURL=webpack:///./queryeditor/actions/CnxnMonitorActions.js?"); /***/ }), @@ -20696,7 +20696,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar Footer = function (_React$Component) {\n _inherits(Footer, _React$Component);\n\n function Footer() {\n _classCallCheck(this, Footer);\n\n return _possibleConstructorReturn(this, (Footer.__proto__ || Object.getPrototypeOf(Footer)).apply(this, arguments));\n }\n\n _createClass(Footer, [{\n key: 'componentDidMount',\n value: function componentDidMount() {}\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n { className: 'flex footer' },\n _react2.default.createElement(\n 'div',\n { className: 'flex flex-initial' },\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { href: 'mailto:contact@openlookeng.io' },\n 'contact@openlookeng.io'\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'flex justify-flex-end' },\n _react2.default.createElement(\n 'div',\n { className: 'flex flex-initial' },\n _react2.default.createElement(\n 'p',\n null,\n 'Copyright \\xA9 2020 ',\n _react2.default.createElement(\n 'a',\n { href: \"https://openlookeng.io\", target: '_blank' },\n 'openLooKeng'\n ),\n '. All rights reserved'\n )\n )\n )\n );\n }\n }]);\n\n return Footer;\n}(_react2.default.Component);\n\nexports.default = Footer;\n\n//# sourceURL=webpack:///./queryeditor/components/Footer.jsx?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar Footer = function (_React$Component) {\n _inherits(Footer, _React$Component);\n\n function Footer() {\n _classCallCheck(this, Footer);\n\n return _possibleConstructorReturn(this, (Footer.__proto__ || Object.getPrototypeOf(Footer)).apply(this, arguments));\n }\n\n _createClass(Footer, [{\n key: 'componentDidMount',\n value: function componentDidMount() {}\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n { className: 'flex footer' },\n _react2.default.createElement(\n 'div',\n { className: 'flex flex-initial' },\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { href: 'mailto:contact@openlookeng.io' },\n 'contact@openlookeng.io'\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'flex justify-flex-end' },\n _react2.default.createElement(\n 'div',\n { className: 'flex flex-initial' },\n _react2.default.createElement(\n 'p',\n null,\n 'Copyright \\xA9 2020 ',\n _react2.default.createElement(\n 'a',\n { href: \"https://openlookeng.io\", target: '_blank' },\n 'openLooKeng'\n ),\n '. All rights reserved'\n )\n )\n )\n );\n }\n }]);\n\n return Footer;\n}(_react2.default.Component);\n\nexports.default = Footer;\n\n//# sourceURL=webpack:///./queryeditor/components/Footer.jsx?"); /***/ }), @@ -20708,7 +20708,19 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n}); /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _UserActions = __webpack_require__(/*! ../actions/UserActions */ \"./queryeditor/actions/UserActions.js\");\n\nvar _UserActions2 = _interopRequireDefault(_UserActions);\n\nvar _UserStore = __webpack_require__(/*! ../stores/UserStore */ \"./queryeditor/stores/UserStore.js\");\n\nvar _UserStore2 = _interopRequireDefault(_UserStore);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n// State actions\nfunction getStateFromStore() {\n return {\n user: _UserStore2.default.getCurrentUser()\n };\n}\n\nvar Header = function (_React$Component) {\n _inherits(Header, _React$Component);\n\n function Header(props) {\n _classCallCheck(this, Header);\n\n var _this = _possibleConstructorReturn(this, (Header.__proto__ || Object.getPrototypeOf(Header)).call(this, props));\n\n _this.state = getStateFromStore();\n _this._onChange = _this._onChange.bind(_this);\n return _this;\n }\n\n _createClass(Header, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n _UserStore2.default.listen(this._onChange);\n _UserActions2.default.fetchCurrentUser();\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n _UserStore2.default.unlisten(this._onChange);\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'header',\n { className: 'flex flex-row' },\n _react2.default.createElement(\n 'div',\n { className: 'flex' },\n _react2.default.createElement(\n 'a',\n { className: \"hetu-header-brand-name\", href: \"/\", style: { fontFamily: \"roboto!important\" } },\n _react2.default.createElement('img', { src: \"assets/lk-logos.svg\", alt: \"openLooKeng logo\", className: \"hetu-header-brand-name\" })\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'flex justify-flex-end menu' },\n _react2.default.createElement(\n 'div',\n { className: 'flex flex-initial' },\n _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement('i', { className: 'glyphicon glyphicon-user' }),\n this.state.user.name\n ),\n this.state.user.secure ? _react2.default.createElement(\n 'div',\n { className: 'logout' },\n _react2.default.createElement(\n 'form',\n { method: 'post', action: '../ui/api/logout' },\n _react2.default.createElement(\n 'button',\n { type: 'submit', className: 'btn btn-sm' },\n _react2.default.createElement('i', { className: 'fa fa-sign-out' }),\n 'Logout'\n )\n )\n ) : null\n )\n )\n );\n }\n\n /* Store events */\n\n }, {\n key: '_onChange',\n value: function _onChange() {\n this.setState(getStateFromStore());\n }\n }]);\n\n return Header;\n}(_react2.default.Component);\n\nexports.default = Header;\n\n//# sourceURL=webpack:///./queryeditor/components/Header.jsx?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _UserActions = __webpack_require__(/*! ../actions/UserActions */ \"./queryeditor/actions/UserActions.js\");\n\nvar _UserActions2 = _interopRequireDefault(_UserActions);\n\nvar _UserStore = __webpack_require__(/*! ../stores/UserStore */ \"./queryeditor/stores/UserStore.js\");\n\nvar _UserStore2 = _interopRequireDefault(_UserStore);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n// State actions\nfunction getStateFromStore() {\n return {\n user: _UserStore2.default.getCurrentUser()\n };\n}\n\nvar Header = function (_React$Component) {\n _inherits(Header, _React$Component);\n\n function Header(props) {\n _classCallCheck(this, Header);\n\n var _this = _possibleConstructorReturn(this, (Header.__proto__ || Object.getPrototypeOf(Header)).call(this, props));\n\n _this.state = {\n user: _UserStore2.default.getCurrentUser(),\n noConnection: false,\n lightShown: false,\n info: null,\n lastSuccess: Date.now(),\n modalShown: false,\n errorText: null\n };\n _this._onChange = _this._onChange.bind(_this);\n return _this;\n }\n\n _createClass(Header, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n _UserStore2.default.listen(this._onChange);\n _UserActions2.default.fetchCurrentUser();\n this.refreshLoop.bind(this)();\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n _UserStore2.default.unlisten(this._onChange);\n }\n }, {\n key: 'refreshLoop',\n value: function refreshLoop() {\n var _this2 = this;\n\n clearTimeout(this.timeoutId);\n fetch(\"../v1/info\").then(function (response) {\n return response.json();\n }).then(function (info) {\n _this2.setState({\n info: info,\n noConnection: false,\n lastSuccess: Date.now(),\n modalShown: false\n });\n _this2.resetTimer();\n }).catch(function (error) {\n _this2.setState({\n noConnection: true,\n lightShown: !_this2.state.lightShown,\n errorText: error\n });\n _this2.resetTimer();\n });\n }\n }, {\n key: 'resetTimer',\n value: function resetTimer() {\n clearTimeout(this.timeoutId);\n this.timeoutId = setTimeout(this.refreshLoop.bind(this), 1000);\n }\n }, {\n key: 'renderStatusLight',\n value: function renderStatusLight() {\n if (this.state.noConnection) {\n if (this.state.lightShown) {\n return _react2.default.createElement('span', { className: 'status-light status-light-red', id: 'status-indicator' });\n } else {\n return _react2.default.createElement('span', { className: 'status-light', id: 'status-indicator' });\n }\n }\n return _react2.default.createElement('span', { className: 'status-light status-light-green', id: 'status-indicator' });\n }\n }, {\n key: 'render',\n value: function render() {\n var info = this.state.info;\n return _react2.default.createElement(\n 'header',\n { className: 'flex flex-row' },\n _react2.default.createElement(\n 'div',\n { className: 'flex' },\n _react2.default.createElement(\n 'a',\n { className: \"hetu-header-brand-name\", href: \"/\", style: { fontFamily: \"roboto!important\" } },\n _react2.default.createElement('img', { src: \"assets/lk-logos.svg\", alt: \"openLooKeng logo\", className: \"hetu-header-brand-name\" })\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'flex justify-flex-end menu' },\n _react2.default.createElement(\n 'div',\n { className: 'flex flex-initial version' },\n _react2.default.createElement(\n 'div',\n { className: 'version-inner' },\n 'Version :',\n _react2.default.createElement(\n 'span',\n { className: 'uppercase' },\n info ? info.nodeVersion.version : 'null'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'version-inner' },\n 'Environment :',\n _react2.default.createElement(\n 'span',\n { className: 'uppercase' },\n info ? info.environment : 'null'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'version-inner' },\n _react2.default.createElement(\n 'span',\n null,\n 'Uptime'\n ),\n _react2.default.createElement(\n 'span',\n { 'data-toggle': 'tooltip', 'data-placement': 'bottom', title: 'Connection status' },\n this.renderStatusLight()\n ),\n _react2.default.createElement(\n 'span',\n { className: 'uppercase' },\n ': ',\n info ? info.uptime : '0s'\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'flex flex-initial' },\n _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement('i', { className: 'glyphicon glyphicon-user' }),\n this.state.user.name\n ),\n this.state.user.secure ? _react2.default.createElement(\n 'div',\n { className: 'logout' },\n _react2.default.createElement(\n 'form',\n { method: 'post', action: '../ui/api/logout' },\n _react2.default.createElement(\n 'button',\n { type: 'submit', className: 'btn btn-sm' },\n _react2.default.createElement('i', { className: 'fa fa-sign-out' }),\n 'Logout'\n )\n )\n ) : null\n )\n )\n );\n }\n\n /* Store events */\n\n }, {\n key: '_onChange',\n value: function _onChange() {\n this.setState(getStateFromStore());\n }\n }]);\n\n return Header;\n}(_react2.default.Component);\n\nexports.default = Header;\n\n//# sourceURL=webpack:///./queryeditor/components/Header.jsx?"); + +/***/ }), + +/***/ "./queryeditor/components/StatusFooter.jsx": +/*!*************************************************!*\ + !*** ./queryeditor/components/StatusFooter.jsx ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _utils = __webpack_require__(/*! ../../utils */ \"./utils.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar SPARKLINE_PROPERTIES = {\n width: '4.5vw',\n height: '25px',\n fillColor: '',\n //fillOpacity: .8,\n lineColor: '#000',\n //spotColor: '#1EDCFF',\n tooltipClassname: 'sparkline-tooltip',\n disableHiddenCheck: true,\n spotColor: '',\n highlightSpotColor: '',\n highlightLineColor: '',\n minSpotColor: '',\n maxSpotColor: ''\n};\n\nvar StatusFooter = function (_React$Component) {\n _inherits(StatusFooter, _React$Component);\n\n function StatusFooter(props) {\n _classCallCheck(this, StatusFooter);\n\n var _this = _possibleConstructorReturn(this, (StatusFooter.__proto__ || Object.getPrototypeOf(StatusFooter)).call(this, props));\n\n _this.state = {\n runningQueries: [],\n queuedQueries: [],\n blockedQueries: [],\n activeWorkers: [],\n runningDrivers: [],\n reservedMemory: [],\n totalMemory: 0,\n cpuUsage: [],\n rowInputRate: [],\n byteInputRate: [],\n perWorkerCpuTimeRate: [],\n\n lastRender: null,\n lastRefresh: null,\n\n lastInputRows: null,\n lastInputBytes: null,\n lastCpuTime: null,\n\n initialized: false\n };\n\n _this.refreshLoop = _this.refreshLoop.bind(_this);\n return _this;\n }\n\n _createClass(StatusFooter, [{\n key: \"resetTimer\",\n value: function resetTimer() {\n clearTimeout(this.timeoutId);\n // stop refreshing when query finishes or fails\n if (this.state.query === null || !this.state.ended) {\n this.timeoutId = setTimeout(this.refreshLoop, 1000);\n }\n }\n }, {\n key: \"refreshLoop\",\n value: function refreshLoop() {\n clearTimeout(this.timeoutId); // to stop multiple series of refreshLoop from going on simultaneously\n $.get('../v1/cluster', function (clusterState) {\n\n var newPerWorkerCpuTimeRate = [];\n if (this.state.lastRefresh !== null) {\n var cpuTimeSinceRefresh = clusterState.totalCpuTimeSecs - this.state.lastCpuTime;\n var secsSinceRefresh = (Date.now() - this.state.lastRefresh) / 1000.0;\n\n newPerWorkerCpuTimeRate = (0, _utils.addExponentiallyWeightedToHistory)(cpuTimeSinceRefresh / clusterState.activeWorkers / secsSinceRefresh, this.state.perWorkerCpuTimeRate);\n }\n\n this.setState({\n // instantaneous stats\n runningQueries: (0, _utils.addToHistory)(clusterState.runningQueries, this.state.runningQueries),\n queuedQueries: (0, _utils.addToHistory)(clusterState.queuedQueries, this.state.queuedQueries),\n blockedQueries: (0, _utils.addToHistory)(clusterState.blockedQueries, this.state.blockedQueries),\n activeWorkers: (0, _utils.addToHistory)(clusterState.activeWorkers, this.state.activeWorkers),\n\n // moving averages\n runningDrivers: (0, _utils.addExponentiallyWeightedToHistory)(clusterState.runningDrivers, this.state.runningDrivers),\n reservedMemory: (0, _utils.addExponentiallyWeightedToHistory)(clusterState.reservedMemory, this.state.reservedMemory),\n cpuUsage: (0, _utils.addExponentiallyWeightedToHistory)(clusterState.systemCpuLoad * 100, this.state.cpuUsage),\n totalMemory: clusterState.totalMemory,\n perWorkerCpuTimeRate: newPerWorkerCpuTimeRate,\n lastCpuTime: clusterState.totalCpuTimeSecs,\n\n initialized: true,\n\n lastRefresh: Date.now()\n });\n this.resetTimer();\n }.bind(this)).error(function () {\n this.resetTimer();\n }.bind(this));\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.refreshLoop();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n // prevent multiple calls to componentDidUpdate (resulting from calls to setState or otherwise) within the refresh interval from re-rendering sparklines/charts\n if (this.state.lastRender === null || Date.now() - this.state.lastRender >= 1000) {\n var renderTimestamp = Date.now();\n $('#running-queries-sparkline').sparkline(this.state.runningQueries, $.extend({}, SPARKLINE_PROPERTIES, { chartRangeMin: 0 }));\n $('#blocked-queries-sparkline').sparkline(this.state.blockedQueries, $.extend({}, SPARKLINE_PROPERTIES, { chartRangeMin: 0 }));\n $('#queued-queries-sparkline').sparkline(this.state.queuedQueries, $.extend({}, SPARKLINE_PROPERTIES, { chartRangeMin: 0 }));\n\n $('#active-workers-sparkline').sparkline(this.state.activeWorkers, $.extend({}, SPARKLINE_PROPERTIES, { chartRangeMin: 0 }));\n $('#running-drivers-sparkline').sparkline(this.state.runningDrivers, $.extend({}, SPARKLINE_PROPERTIES, { numberFormatter: _utils.precisionRound }));\n $('#cpu-usage-sparkline').sparkline(this.state.cpuUsage, $.extend({}, SPARKLINE_PROPERTIES, { chartRangeMin: 0, chartRangeMax: 100, numberFormatter: _utils.precisionRound }));\n $('#reserved-memory-sparkline').sparkline(this.state.reservedMemory, $.extend({}, SPARKLINE_PROPERTIES, { numberFormatter: _utils.formatDataSizeBytes }));\n $('#cpu-time-rate-sparkline').sparkline(this.state.perWorkerCpuTimeRate, $.extend({}, SPARKLINE_PROPERTIES, { numberFormatter: _utils.precisionRound }));\n\n this.setState({\n lastRender: renderTimestamp\n });\n }\n $('[data-toggle=\"tooltip\"]').tooltip();\n }\n }, {\n key: \"render\",\n value: function render() {\n return _react2.default.createElement(\n \"div\",\n { className: \"flex\" },\n _react2.default.createElement(\n \"div\",\n { className: \"flex flex-initial\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverview\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIconSetContainer\", style: { minWidth: \"60px\" }, \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Active Workers\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIcon\" },\n _react2.default.createElement(\n \"svg\",\n { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 16\", className: \"bi bi-person-check-fill\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\" },\n _react2.default.createElement(\"path\", { fillRule: \"evenodd\", d: \"M1 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H1zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm9.854-2.854a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 0 1 .708-.708L12.5 7.793l2.646-2.647a.5.5 0 0 1 .708 0z\" })\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewContent\" },\n \" \",\n this.state.activeWorkers[this.state.activeWorkers.length - 1],\n \" \"\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIconSetContainer\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Avg Cluster Cpu Usage\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIcon\" },\n _react2.default.createElement(\n \"svg\",\n { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 16\", className: \"bi bi-cpu-fill cpuIco\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\" },\n _react2.default.createElement(\"path\", { fillRule: \"evenodd\", d: \"M5.5.5a.5.5 0 0 0-1 0V2A2.5 2.5 0 0 0 2 4.5H.5a.5.5 0 0 0 0 1H2v1H.5a.5.5 0 0 0 0 1H2v1H.5a.5.5 0 0 0 0 1H2v1H.5a.5.5 0 0 0 0 1H2A2.5 2.5 0 0 0 4.5 14v1.5a.5.5 0 0 0 1 0V14h1v1.5a.5.5 0 0 0 1 0V14h1v1.5a.5.5 0 0 0 1 0V14h1v1.5a.5.5 0 0 0 1 0V14a2.5 2.5 0 0 0 2.5-2.5h1.5a.5.5 0 0 0 0-1H14v-1h1.5a.5.5 0 0 0 0-1H14v-1h1.5a.5.5 0 0 0 0-1H14v-1h1.5a.5.5 0 0 0 0-1H14A2.5 2.5 0 0 0 11.5 2V.5a.5.5 0 0 0-1 0V2h-1V.5a.5.5 0 0 0-1 0V2h-1V.5a.5.5 0 0 0-1 0V2h-1V.5zm1 4.5A1.5 1.5 0 0 0 5 6.5v3A1.5 1.5 0 0 0 6.5 11h3A1.5 1.5 0 0 0 11 9.5v-3A1.5 1.5 0 0 0 9.5 5h-3zm0 1a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5h-3z\" })\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewContent\" },\n (0, _utils.formatCount)(this.state.cpuUsage[this.state.cpuUsage.length - 1]),\n \"%\"\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewGraph\" },\n _react2.default.createElement(\n \"span\",\n { className: \"sparkline\", id: \"cpu-usage-sparkline\" },\n _react2.default.createElement(\n \"div\",\n { className: \"loader\" },\n \"Loading ...\"\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIconSetContainer\", style: { minWidth: \"calc(10vw + 60px)\" }, \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Used Query Memory\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIcon\" },\n _react2.default.createElement(\n \"svg\",\n { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 16\", className: \"bi bi-grid-3x2-gap-fill ramIco\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\" },\n _react2.default.createElement(\"path\", { d: \"M1 4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V4zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V4zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1V4zM1 9a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V9zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V9zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1V9z\" })\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewContent\", style: { minWidth: \"100px\", textAlign: \"center\" } },\n (0, _utils.formatDataSizeBytes)(this.state.reservedMemory[this.state.reservedMemory.length - 1]),\n _react2.default.createElement(\n \"span\",\n { className: \"seprator\" },\n \"/\"\n ),\n (0, _utils.formatDataSizeBytes)(this.state.totalMemory)\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewGraph\" },\n _react2.default.createElement(\n \"span\",\n { className: \"sparkline\", id: \"reserved-memory-sparkline\" },\n _react2.default.createElement(\n \"div\",\n { className: \"loader\" },\n \"Loading ...\"\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIconSetContainer\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Running Queries\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIcon\" },\n _react2.default.createElement(\n \"svg\",\n { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 16\", className: \"bi bi-list-check\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\" },\n _react2.default.createElement(\"path\", { fillRule: \"evenodd\", d: \"M5 11.5a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5zM3.854 2.146a.5.5 0 0 1 0 .708l-1.5 1.5a.5.5 0 0 1-.708 0l-.5-.5a.5.5 0 1 1 .708-.708L2 3.293l1.146-1.147a.5.5 0 0 1 .708 0zm0 4a.5.5 0 0 1 0 .708l-1.5 1.5a.5.5 0 0 1-.708 0l-.5-.5a.5.5 0 1 1 .708-.708L2 7.293l1.146-1.147a.5.5 0 0 1 .708 0zm0 4a.5.5 0 0 1 0 .708l-1.5 1.5a.5.5 0 0 1-.708 0l-.5-.5a.5.5 0 0 1 .708-.708l.146.147 1.146-1.147a.5.5 0 0 1 .708 0z\" })\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewContent\" },\n \" \",\n this.state.runningQueries[this.state.runningQueries.length - 1],\n \" \"\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewGraph\" },\n _react2.default.createElement(\n \"span\",\n { className: \"sparkline\", id: \"running-queries-sparkline\" },\n _react2.default.createElement(\n \"div\",\n { className: \"loader\" },\n \"Loading ...\"\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIconSetContainer\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Queued Queries\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIcon\" },\n _react2.default.createElement(\n \"svg\",\n { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 16\", className: \"bi bi-person-lines-fill\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\" },\n _react2.default.createElement(\"path\", { fillRule: \"evenodd\", d: \"M1 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H1zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm7 1.5a.5.5 0 0 1 .5-.5h2a.5.5 0 0 1 0 1h-2a.5.5 0 0 1-.5-.5zm-2-3a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 1-.5-.5zm0-3a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 1-.5-.5zm2 9a.5.5 0 0 1 .5-.5h2a.5.5 0 0 1 0 1h-2a.5.5 0 0 1-.5-.5z\" })\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewContent\" },\n \" \",\n this.state.queuedQueries[this.state.queuedQueries.length - 1],\n \" \"\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewGraph\" },\n _react2.default.createElement(\n \"span\",\n { className: \"sparkline\", id: \"queued-queries-sparkline\" },\n _react2.default.createElement(\n \"div\",\n { className: \"loader\" },\n \"Loading ...\"\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIconSetContainer\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Blocked Queries\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIcon\" },\n _react2.default.createElement(\n \"svg\",\n { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 16\", className: \"bi bi-slash-circle blockIco\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\" },\n _react2.default.createElement(\"path\", { fillRule: \"evenodd\", d: \"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z\" }),\n _react2.default.createElement(\"path\", { fillRule: \"evenodd\", d: \"M11.854 4.146a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708-.708l7-7a.5.5 0 0 1 .708 0z\" })\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewContent\" },\n \" \",\n this.state.blockedQueries[this.state.blockedQueries.length - 1],\n \" \"\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewGraph\" },\n _react2.default.createElement(\n \"span\",\n { className: \"sparkline\", id: \"blocked-queries-sparkline\" },\n _react2.default.createElement(\n \"div\",\n { className: \"loader\" },\n \"Loading ...\"\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIconSetContainer\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Avg Running Tasks\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIcon\" },\n _react2.default.createElement(\n \"svg\",\n { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 16\", className: \"bi bi-hdd-fill diskIco\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\" },\n _react2.default.createElement(\"path\", { fillRule: \"evenodd\", d: \"M0 10a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-1zm2.5 1a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1zm2 0a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1z\" }),\n _react2.default.createElement(\"path\", { d: \"M.91 7.204A2.993 2.993 0 0 1 2 7h12c.384 0 .752.072 1.09.204l-1.867-3.422A1.5 1.5 0 0 0 11.906 3H4.094a1.5 1.5 0 0 0-1.317.782L.91 7.204z\" })\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewContent\" },\n \" \",\n (0, _utils.formatCount)(this.state.runningDrivers[this.state.runningDrivers.length - 1]),\n \" \"\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewGraph\" },\n _react2.default.createElement(\n \"span\",\n { className: \"sparkline\", id: \"running-drivers-sparkline\" },\n _react2.default.createElement(\n \"div\",\n { className: \"loader\" },\n \"Loading ...\"\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIconSetContainer\", \"data-toggle\": \"tooltip\", \"data-placement\": \"top\", title: \"Avg CPU Cycles per Worker\" },\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewIcon\" },\n _react2.default.createElement(\n \"svg\",\n { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 16\", className: \"bi bi-list\", fill: \"currentColor\", xmlns: \"http://www.w3.org/2000/svg\" },\n _react2.default.createElement(\"path\", { fillRule: \"evenodd\", d: \"M2.5 11.5A.5.5 0 0 1 3 11h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4A.5.5 0 0 1 3 7h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4A.5.5 0 0 1 3 3h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5z\" })\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewContent\" },\n \" \",\n (0, _utils.formatCount)(this.state.perWorkerCpuTimeRate[this.state.perWorkerCpuTimeRate.length - 1]),\n \" \"\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"clusterOverviewGraph\" },\n _react2.default.createElement(\n \"span\",\n { className: \"sparkline\", id: \"cpu-time-rate-sparkline\" },\n _react2.default.createElement(\n \"div\",\n { className: \"loader\" },\n \"Loading ...\"\n )\n )\n )\n )\n )\n )\n );\n }\n }]);\n\n return StatusFooter;\n}(_react2.default.Component);\n\nexports.default = StatusFooter;\n\n//# sourceURL=webpack:///./queryeditor/components/StatusFooter.jsx?"); /***/ }), @@ -20792,7 +20804,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar getStatusText = exports.getStatusText = function getStatusText(response) {\n if (response.statusText != \"\") {\n return response.statusText;\n }\n switch (response.status) {\n case 200:\n {\n return \"OK\";\n }\n case 201:\n {\n return \"Created\";\n }\n case 202:\n {\n return \"Accepted\";\n }\n case 204:\n {\n return \"No Content\";\n }\n case 205:\n {\n return \"Reset Content\";\n }\n case 206:\n {\n return \"Partial Content\";\n }\n case 301:\n {\n return \"Moved Permanently\";\n }\n case 302:\n {\n return \"Found\";\n }\n case 303:\n {\n return \"See Other\";\n }\n case 304:\n {\n return \"Not Modified\";\n }\n case 305:\n {\n return \"Use Proxy\";\n }\n case 307:\n {\n return \"Temporary Redirect\";\n }\n case 400:\n {\n return \"Bad Request\";\n }\n case 401:\n {\n return \"Unauthorized\";\n }\n case 402:\n {\n return \"Payment Required\";\n }\n case 403:\n {\n return \"Forbidden\";\n }\n case 404:\n {\n return \"Not Found\";\n }\n case 405:\n {\n return \"Method Not Allowed\";\n }\n case 406:\n {\n return \"Not Acceptable\";\n }\n case 407:\n {\n return \"Proxy Authentication Required\";\n }\n case 408:\n {\n return \"Request Timeout\";\n }\n case 409:\n {\n return \"Conflict\";\n }\n case 410:\n {\n return \"Gone\";\n }\n case 411:\n {\n return \"Length Required\";\n }\n case 412:\n {\n return \"Precondition Failed\";\n }\n case 413:\n {\n return \"Request Entity Too Large\";\n }\n case 414:\n {\n return \"Request-URI Too Long\";\n }\n case 415:\n {\n return \"Unsupported Media Type\";\n }\n case 416:\n {\n return \"Requested Range Not Satisfiable\";\n }\n case 417:\n {\n return \"Expectation Failed\";\n }\n case 428:\n {\n return \"Precondition Required\";\n }\n case 429:\n {\n return \"Too Many Requests\";\n }\n case 431:\n {\n return \"Request Header Fields Too Large\";\n }\n case 500:\n {\n return \"Internal Server Error\";\n }\n case 501:\n {\n return \"Not Implemented\";\n }\n case 502:\n {\n return \"Bad Gateway\";\n }\n case 503:\n {\n return \"Service Unavailable\";\n }\n case 504:\n {\n return \"Gateway Timeout\";\n }\n case 505:\n {\n return \"HTTP Version Not Supported\";\n }\n case 511:\n {\n return \"Network Authentication Required\";\n }\n }\n};\n\n//# sourceURL=webpack:///./queryeditor/utils/xhrutil.js?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar getStatusText = exports.getStatusText = function getStatusText(response) {\n if (response.statusText != \"\") {\n return response.statusText;\n }\n switch (response.status) {\n case 200:\n {\n return \"OK\";\n }\n case 201:\n {\n return \"Created\";\n }\n case 202:\n {\n return \"Accepted\";\n }\n case 204:\n {\n return \"No Content\";\n }\n case 205:\n {\n return \"Reset Content\";\n }\n case 206:\n {\n return \"Partial Content\";\n }\n case 301:\n {\n return \"Moved Permanently\";\n }\n case 302:\n {\n return \"Found\";\n }\n case 303:\n {\n return \"See Other\";\n }\n case 304:\n {\n return \"Not Modified\";\n }\n case 305:\n {\n return \"Use Proxy\";\n }\n case 307:\n {\n return \"Temporary Redirect\";\n }\n case 400:\n {\n return \"Bad Request\";\n }\n case 401:\n {\n return \"Unauthorized\";\n }\n case 402:\n {\n return \"Payment Required\";\n }\n case 403:\n {\n return \"Forbidden\";\n }\n case 404:\n {\n return \"Not Found\";\n }\n case 405:\n {\n return \"Method Not Allowed\";\n }\n case 406:\n {\n return \"Not Acceptable\";\n }\n case 407:\n {\n return \"Proxy Authentication Required\";\n }\n case 408:\n {\n return \"Request Timeout\";\n }\n case 409:\n {\n return \"Conflict\";\n }\n case 410:\n {\n return \"Gone\";\n }\n case 411:\n {\n return \"Length Required\";\n }\n case 412:\n {\n return \"Precondition Failed\";\n }\n case 413:\n {\n return \"Request Entity Too Large\";\n }\n case 414:\n {\n return \"Request-URI Too Long\";\n }\n case 415:\n {\n return \"Unsupported Media Type\";\n }\n case 416:\n {\n return \"Requested Range Not Satisfiable\";\n }\n case 417:\n {\n return \"Expectation Failed\";\n }\n case 428:\n {\n return \"Precondition Required\";\n }\n case 429:\n {\n return \"Too Many Requests\";\n }\n case 431:\n {\n return \"Request Header Fields Too Large\";\n }\n case 500:\n {\n return \"Internal Server Error\";\n }\n case 501:\n {\n return \"Not Implemented\";\n }\n case 502:\n {\n return \"Bad Gateway\";\n }\n case 503:\n {\n return \"Service Unavailable\";\n }\n case 504:\n {\n return \"Gateway Timeout\";\n }\n case 505:\n {\n return \"HTTP Version Not Supported\";\n }\n case 511:\n {\n return \"Network Authentication Required\";\n }\n }\n};\n\n//# sourceURL=webpack:///./queryeditor/utils/xhrutil.js?"); /***/ }), diff --git a/presto-main/src/main/resources/webapp/dist/overview.js b/presto-main/src/main/resources/webapp/dist/overview.js index 38972f74c..098261ab3 100644 --- a/presto-main/src/main/resources/webapp/dist/overview.js +++ b/presto-main/src/main/resources/webapp/dist/overview.js @@ -94,7 +94,7 @@ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar NavigationMenu = function (_React$Component) {\n _inherits(NavigationMenu, _React$Component);\n\n function NavigationMenu(args) {\n _classCallCheck(this, NavigationMenu);\n\n return _possibleConstructorReturn(this, (NavigationMenu.__proto__ || Object.getPrototypeOf(NavigationMenu)).call(this, args));\n }\n\n _createClass(NavigationMenu, [{\n key: \"render\",\n value: function render() {\n return _react2.default.createElement(\n \"div\",\n { className: \"menu-left\" },\n _react2.default.createElement(\n \"ul\",\n null,\n _react2.default.createElement(\n \"li\",\n { className: this.props.active === 'queryeditor' ? \"active\" : \"\" },\n _react2.default.createElement(\n \"a\",\n { href: this.props.active === 'queryeditor' ? \"#\" : \"./queryeditor.html\" },\n _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\"i\", { className: \"fa fa-home\" })\n ),\n _react2.default.createElement(\n \"div\",\n null,\n \"Home\"\n )\n )\n ),\n _react2.default.createElement(\n \"li\",\n { className: this.props.active === 'metrics' ? \"active\" : \"\" },\n _react2.default.createElement(\n \"a\",\n { href: this.props.active === 'metrics' ? \"#\" : \"./overview.html\" },\n _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\"i\", { className: \"fa fa-line-chart\" })\n ),\n _react2.default.createElement(\n \"div\",\n null,\n \"Metrics\"\n )\n )\n ),\n _react2.default.createElement(\n \"li\",\n { className: this.props.active === 'nodes' ? \"active\" : \"\" },\n _react2.default.createElement(\n \"a\",\n { href: this.props.active === 'nodes' ? \"#\" : \"./nodes.html\" },\n _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\"i\", { className: \"fa fa-server\" })\n ),\n _react2.default.createElement(\n \"div\",\n null,\n \"Nodes\"\n )\n )\n ),\n _react2.default.createElement(\n \"li\",\n { className: this.props.active === 'queryhistory' ? \"active\" : \"\" },\n _react2.default.createElement(\n \"a\",\n { href: this.props.active === 'queryhistory' ? \"#\" : \"./queryhistory.html\" },\n _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\"i\", { className: \"fa fa-history\" })\n ),\n _react2.default.createElement(\n \"div\",\n null,\n \"Query History\"\n )\n )\n )\n )\n );\n }\n }]);\n\n return NavigationMenu;\n}(_react2.default.Component);\n\nexports.default = NavigationMenu;\n\n//# sourceURL=webpack:///./NavigationMenu.jsx?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar NavigationMenu = function (_React$Component) {\n _inherits(NavigationMenu, _React$Component);\n\n function NavigationMenu(args) {\n _classCallCheck(this, NavigationMenu);\n\n return _possibleConstructorReturn(this, (NavigationMenu.__proto__ || Object.getPrototypeOf(NavigationMenu)).call(this, args));\n }\n\n _createClass(NavigationMenu, [{\n key: \"render\",\n value: function render() {\n return _react2.default.createElement(\n \"div\",\n { className: \"menu-left\" },\n _react2.default.createElement(\n \"ul\",\n null,\n _react2.default.createElement(\n \"li\",\n { className: this.props.active === 'queryeditor' ? \"active\" : \"\" },\n _react2.default.createElement(\n \"a\",\n { href: this.props.active === 'queryeditor' ? \"#\" : \"./queryeditor.html\" },\n _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\"i\", { className: \"fa fa-home\" })\n ),\n _react2.default.createElement(\n \"div\",\n null,\n \"Home\"\n )\n )\n ),\n _react2.default.createElement(\n \"li\",\n { className: this.props.active === 'metrics' ? \"active\" : \"\" },\n _react2.default.createElement(\n \"a\",\n { href: this.props.active === 'metrics' ? \"#\" : \"./overview.html\" },\n _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\"i\", { className: \"fa fa-line-chart\" })\n ),\n _react2.default.createElement(\n \"div\",\n null,\n \"Metrics\"\n )\n )\n ),\n _react2.default.createElement(\n \"li\",\n { className: this.props.active === 'nodes' ? \"active\" : \"\" },\n _react2.default.createElement(\n \"a\",\n { href: this.props.active === 'nodes' ? \"#\" : \"./nodes.html\" },\n _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\"i\", { className: \"fa fa-server\" })\n ),\n _react2.default.createElement(\n \"div\",\n null,\n \"Nodes\"\n )\n )\n ),\n _react2.default.createElement(\n \"li\",\n { className: this.props.active === 'queryhistory' ? \"active\" : \"\" },\n _react2.default.createElement(\n \"a\",\n { href: this.props.active === 'queryhistory' ? \"#\" : \"./queryhistory.html\" },\n _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\"i\", { className: \"fa fa-history\" })\n ),\n _react2.default.createElement(\n \"div\",\n null,\n \"Query History\"\n )\n )\n )\n )\n );\n }\n }]);\n\n return NavigationMenu;\n}(_react2.default.Component);\n\nexports.default = NavigationMenu;\n\n//# sourceURL=webpack:///./NavigationMenu.jsx?"); /***/ }), @@ -26310,7 +26310,7 @@ eval("\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/i /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _echarts = __webpack_require__(/*! echarts/lib/echarts */ \"./node_modules/echarts/lib/echarts.js\");\n\nvar _echarts2 = _interopRequireDefault(_echarts);\n\n__webpack_require__(/*! echarts/lib/chart/line */ \"./node_modules/echarts/lib/chart/line.js\");\n\n__webpack_require__(/*! echarts/lib/chart/treemap */ \"./node_modules/echarts/lib/chart/treemap.js\");\n\n__webpack_require__(/*! echarts/theme/royal */ \"./node_modules/echarts/theme/royal.js\");\n\n__webpack_require__(/*! echarts/lib/component/tooltip */ \"./node_modules/echarts/lib/component/tooltip.js\");\n\n__webpack_require__(/*! echarts/lib/component/title */ \"./node_modules/echarts/lib/component/title.js\");\n\nvar _OverviewActions = __webpack_require__(/*! ./OverviewActions */ \"./overview/OverviewActions.js\");\n\nvar _OverviewActions2 = _interopRequireDefault(_OverviewActions);\n\nvar _OverviewStore = __webpack_require__(/*! ./OverviewStore */ \"./overview/OverviewStore.js\");\n\nvar _OverviewStore2 = _interopRequireDefault(_OverviewStore);\n\nvar _reactSimpleMultiSelect = __webpack_require__(/*! react-simple-multi-select */ \"./node_modules/react-simple-multi-select/build/components/MultiSelect.js\");\n\nvar _reactSimpleMultiSelect2 = _interopRequireDefault(_reactSimpleMultiSelect);\n\nvar _utils = __webpack_require__(/*! ../utils */ \"./utils.js\");\n\nvar _lodash = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n\nvar _lodash2 = _interopRequireDefault(_lodash);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar EchartPart = function (_React$Component) {\n _inherits(EchartPart, _React$Component);\n\n function EchartPart(props) {\n _classCallCheck(this, EchartPart);\n\n var _this = _possibleConstructorReturn(this, (EchartPart.__proto__ || Object.getPrototypeOf(EchartPart)).call(this, props));\n\n _this.state = {\n checkStatus: {\n checkOne: true,\n checkTwo: true,\n checkThree: true,\n checkFour: true,\n checkFive: true,\n checkSix: true,\n checkSeven: true,\n heatMapChart: true,\n cpuLoad: true,\n heatMapMemoryChart: true\n },\n itemList: [{ key: \"Cluster CPU Usage\", value: \"heatMapChart\" }, { key: \"Cluster Free Memory\", value: \"heatMapMemoryChart\" }, { key: \"Avg Cluster CPU Usage\", value: \"cpuLoad\" }, { key: \"Used Query Memory\", value: \"checkOne\" }, { key: \"Running Queries\", value: \"checkTwo\" }, { key: \"Queued Queries\", value: \"checkThree\" }, { key: \"Blocked Queries\", value: \"checkFour\" }, { key: \"Active Workers\", value: \"checkFive\" }, { key: \"Avg Running Tasks\", value: \"checkSix\" }, { key: \"Avg CPU cycles per worker\", value: \"checkSeven\" }],\n selectedItemList: [{ key: \"Cluster CPU Usage\", value: \"heatMapChart\" }, { key: \"Cluster Free Memory\", value: \"heatMapMemoryChart\" }, { key: \"Avg Cluster CPU Usage\", value: \"cpuLoad\" }, { key: \"Used Query Memory\", value: \"checkOne\" }, { key: \"Running Queries\", value: \"checkTwo\" }, { key: \"Queued Queries\", value: \"checkThree\" }, { key: \"Blocked Queries\", value: \"checkFour\" }, { key: \"Active Workers\", value: \"checkFive\" }, { key: \"Avg Running Tasks\", value: \"checkSix\" }, { key: \"Avg CPU cycles per worker\", value: \"checkSeven\" }],\n chartName: ['Used Query Memory', 'Running Queries', 'Queued Queries', 'Blocked Queries', 'Active Workers', 'Avg Running Tasks', 'Avg CPU cycles per worker'],\n step: 10,\n timer: null,\n chartCpu: [],\n heatMapChart: [],\n heatMapMemoryChart: [],\n chart1: [],\n chart2: [],\n chart3: [],\n chart4: [],\n chart5: [],\n chart6: [],\n chart7: [],\n chartRef: null,\n lastRow: null,\n lastByte: null,\n lastWorker: null,\n memoryInit: false,\n unitArr: ['bytes', 'quantity', 'quantity', 'quantity', 'quantity', 'quantity', 'quantity'],\n lastRefresh: null\n };\n _this.state.chartRef = Object.keys(_this.state.checkStatus), _this._onChange = _this._onChange.bind(_this);\n _this.changeList = _this.changeList.bind(_this);\n _this.resize = _this.resize.bind(_this);\n return _this;\n }\n\n _createClass(EchartPart, [{\n key: \"resize\",\n value: function resize() {\n for (var i = 0; i < this.state.chartRef.length; i++) {\n var ref = this.refs[this.state.chartRef[i]];\n if (!ref.className) {\n var chart = _echarts2.default.init(ref);\n chart.resize({ silent: true });\n }\n }\n }\n }, {\n key: \"changeList\",\n value: function changeList(selectedItemList) {\n var _this2 = this;\n\n this.state.itemList.map(function (item) {\n _this2.state.checkStatus[item.value] = false;\n });\n selectedItemList.map(function (item) {\n _this2.state.checkStatus[item.value] = true;\n });\n var state = this.state;\n state.selectedItemList = selectedItemList;\n this.setState(state);\n }\n }, {\n key: \"changeState\",\n value: function changeState(name) {\n var state = this.state;\n state.checkStatus[name] = !state.checkStatus[name];\n this.setState(state);\n }\n\n //echarts\n\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.setXAxis();\n _OverviewActions2.default.getData();\n _OverviewActions2.default.getMemoryData();\n _OverviewStore2.default.listen(this._onChange);\n this.lineDatas();\n\n var win = window;\n if (win.addEventListener) {\n win.addEventListener('resize', this.resize, false);\n } else if (win.attachEvent) {\n win.attachEvent('onresize', this.resize);\n } else {\n win.onresize = this.resize;\n }\n $(window).on('resize', this.resize);\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n _OverviewStore2.default.unlisten(this._onChange);\n clearInterval(this.state.timer);\n }\n\n //obtained data per sec\n\n }, {\n key: \"lineDatas\",\n value: function lineDatas() {\n this.state.timer = setInterval(function () {\n _OverviewActions2.default.getData();\n _OverviewActions2.default.getMemoryData();\n }, 1000);\n }\n //refresh line\n\n }, {\n key: \"_onChange\",\n value: function _onChange(data) {\n if (data.requestNum % 2 === 0) {\n if (!this.state.memoryInit && data.memoryData) {\n // let cpuChart=echarts.init(this.refs.cpuLoad);\n // let option=cpuChart.getOption();\n // let memoryInitData=[];\n // let cpuSeries={};\n // let index = 0;\n // Object.keys(data.memoryData).map(key=>{\n // let op = Object.assign({}, option.series[index]);\n // index++;\n // op.name = key.slice(0, key.indexOf(\" \"));\n // let currentCpuData = [...this.delete(this.state.chartCpu), [new Date().format('yyyy-MM-dd hh:mm:ss'), (data.memoryData[key].processCpuLoad * 100).toFixed(2)]];\n // op.data = this.state.step === 10 ? currentCpuData.slice(1200) : this.state.step === 20 ? currentCpuData.slice(600) : currentCpuData;\n // op.areaStyle = {\n // shadowBlur: 10,\n // opacity: 0.1\n // };\n // op.type = 'line';\n // op.showSymbol = false;\n // memoryInitData.push(op);\n // cpuSeries[key]= currentCpuData;\n // })\n // option.series=memoryInitData;\n // option.yAxis = {max: 100, min: 0, type: \"value\"};\n // cpuChart.setOption(option);\n\n var _heatMapChart = _echarts2.default.init(this.refs.heatMapChart, \"royal\");\n _heatMapChart.setOption({\n animation: false,\n title: {\n text: 'Cluster CPU Usage',\n left: 'center',\n textStyle: {\n color: \"#767676\",\n fontSize: 16\n }\n },\n tooltip: {\n trigger: 'item',\n formatter: function formatter(params, t, cb) {\n return params.name + \" : \" + params.value + \"%\";\n }\n },\n series: [{\n type: 'treemap',\n data: this.state.heatMapChart\n }]\n });\n var _heatMapMemoryChart = _echarts2.default.init(this.refs.heatMapMemoryChart, \"royal\");\n _heatMapMemoryChart.setOption({\n animation: false,\n title: {\n text: 'Cluster Free Memory ',\n left: 'center',\n textStyle: {\n color: \"#767676\",\n fontSize: 16\n }\n },\n tooltip: {\n trigger: 'item',\n formatter: function formatter(params, t, cb) {\n return params.name + \" : \" + (0, _utils.formatDataSizeBytes)(params.value);\n }\n },\n series: [{\n type: 'treemap',\n data: this.state.heatMapMemoryChart\n }]\n });\n\n this.setState({\n memoryInit: true\n });\n }\n // else{\n // let dataCpu=this.state.chartCpu;\n // let mychart1=echarts.init(this.refs.cpuLoad);\n // let option=mychart1.getOption();\n // let memoryInitData=option.series;\n // Object.keys(data.memoryData).map(key=>{\n // let dataCpuElement = dataCpu[key];\n // if (_.isUndefined(dataCpuElement)) {\n // let op = Object.assign({}, option.series[index]);\n // op.name = key.slice(0, key.indexOf(\" \"));\n // op.areaStyle = {\n // shadowBlur: 10,\n // opacity: 0.1\n // };\n // op.type = 'line';\n // dataCpu[key] = [...this.delete(dataCpuElement), [new Date().format('yyyy-MM-dd hh:mm:ss'), (data.memoryData[key].processCpuLoad * 100).toFixed(2)]];\n // op.data = dataCpu[key];\n // memoryInitData.push(op);\n // }\n // else {\n // dataCpu[key] = [...this.delete(dataCpuElement), [new Date().format('yyyy-MM-dd hh:mm:ss'), (data.memoryData[key].processCpuLoad * 100).toFixed(2)]];\n // }\n // for(let i=0,len=memoryInitData.length;i= 600) {\n dataset = dataset.splice(600 - 1, dataset.length - 600 - 1);\n }\n dataset = [].concat(_toConsumableArray(dataset), [newDataPoint]);\n entry.dataset = dataset;\n var sum = 0;\n for (var i = 0; i < dataset.length; i++) {\n sum += dataset[i];\n }\n entry.value = Number((sum / dataset.length).toFixed(2));\n }\n });\n this.state.heatMapChart = heatMapData;\n var heatMapChart = _echarts2.default.init(this.refs.heatMapChart, \"royal\");\n var heatMapChartOption = heatMapChart.getOption();\n heatMapChartOption.series = [{\n type: \"treemap\",\n data: heatMapData,\n breadcrumb: {\n show: false\n }\n }];\n heatMapChart.setOption(heatMapChartOption);\n\n //heatMap memory data\n var heatMapMemoryData = this.state.heatMapMemoryChart;\n Object.keys(data.memoryData).map(function (key) {\n var id = key.slice(0, key.indexOf(\" \"));\n var name = key.slice(key.indexOf(\"[\") + 1, key.indexOf(\"]\"));\n var index = _lodash2.default.findIndex(heatMapMemoryData, { id: id });\n var newDataPoint = data.memoryData[key].pools.general.freeBytes + (data.memoryData[key].pools.reserved ? data.memoryData[key].pools.reserved.freeBytes : 0);\n newDataPoint = Number(newDataPoint);\n if (index == -1) {\n var newData = {};\n newData.id = id;\n newData.name = name;\n newData.value = newDataPoint;\n newData.dataset = [newDataPoint];\n newData.children = [];\n heatMapMemoryData.push(newData);\n } else {\n var entry = heatMapMemoryData[index];\n var dataset = entry.dataset;\n if (dataset.length >= 600) {\n dataset = dataset.splice(600 - 1, dataset.length - 600 - 1);\n }\n dataset = [].concat(_toConsumableArray(dataset), [newDataPoint]);\n entry.dataset = dataset;\n var sum = 0;\n for (var i = 0; i < dataset.length; i++) {\n sum += dataset[i];\n }\n entry.value = Number((sum / dataset.length).toFixed(2));\n }\n });\n this.state.heatMapMemoryChart = heatMapMemoryData;\n var heatMapMemoryChart = _echarts2.default.init(this.refs.heatMapMemoryChart, \"royal\");\n var heatMapMemoryChartOption = heatMapMemoryChart.getOption();\n heatMapMemoryChartOption.series = [{\n type: \"treemap\",\n data: heatMapMemoryData,\n breadcrumb: {\n show: false\n }\n }];\n heatMapMemoryChart.setOption(heatMapMemoryChartOption);\n\n var now = Date.now();\n var secondsSinceLastRefresh = this.state.lastRefresh ? (now - this.state.lastRefresh) / 1000.0 : 1;\n secondsSinceLastRefresh = secondsSinceLastRefresh < 1 ? 1 : secondsSinceLastRefresh;\n var lastWorker = this.state.lastWorker ? (data.lineData.totalCpuTimeSecs - this.state.lastWorker) / data.lineData.activeWorkers / secondsSinceLastRefresh : 0;\n this.setState({\n chartCpu: [].concat(_toConsumableArray(this.delete(this.state.chartCpu)), [[new Date().format('yyyy-MM-dd hh:mm:ss'), (data.lineData.systemCpuLoad * 100).toFixed(4)]]),\n chart1: [].concat(_toConsumableArray(this.delete(this.state.chart1)), [[new Date().format('yyyy-MM-dd hh:mm:ss'), data.lineData.reservedMemory]]),\n chart2: [].concat(_toConsumableArray(this.delete(this.state.chart2)), [[new Date().format('yyyy-MM-dd hh:mm:ss'), data.lineData.runningQueries]]),\n chart3: [].concat(_toConsumableArray(this.delete(this.state.chart3)), [[new Date().format('yyyy-MM-dd hh:mm:ss'), data.lineData.queuedQueries]]),\n chart4: [].concat(_toConsumableArray(this.delete(this.state.chart4)), [[new Date().format('yyyy-MM-dd hh:mm:ss'), data.lineData.blockedQueries]]),\n chart5: [].concat(_toConsumableArray(this.delete(this.state.chart5)), [[new Date().format('yyyy-MM-dd hh:mm:ss'), data.lineData.activeWorkers]]),\n chart6: [].concat(_toConsumableArray(this.delete(this.state.chart6)), [[new Date().format('yyyy-MM-dd hh:mm:ss'), data.lineData.runningDrivers]]),\n chart7: [].concat(_toConsumableArray(this.delete(this.state.chart7)), [[new Date().format('yyyy-MM-dd hh:mm:ss'), lastWorker]]),\n lastWorker: data.lineData.totalCpuTimeSecs,\n heatMapChart: this.state.heatMapChart,\n heatMapMemoryChart: this.state.heatMapMemoryChart,\n lastRefresh: now\n });\n if (!this.refs.cpuLoad.className) {\n var mychart = _echarts2.default.init(this.refs.cpuLoad);\n var option = mychart.getOption();\n option.series[0].data = this.state.step === 10 ? this.state.chartCpu.slice(1200) : this.state.step === 20 ? this.state.chartCpu.slice(600) : this.state.chartCpu;\n option.series[0].areaStyle = {\n color: \"#41BB04\",\n shadowBlur: 10,\n opacity: 0.1\n };\n option.series[0].lineStyle = { color: \"#137113\" };\n option.series[0].itemStyle = { color: \"#137113\" };\n option.yAxis = { max: 100, min: 0, type: \"value\" };\n mychart.setOption(option);\n }\n for (var i = 0; i < this.state.chartName.length; i++) {\n if (!this.refs[this.state.chartRef[i]].className) {\n var _mychart = _echarts2.default.init(this.refs[this.state.chartRef[i]]);\n var _option = _mychart.getOption();\n _option.series[0].data = this.state.step === 10 ? this.state['chart' + parseInt(i + 1)].slice(1200) : this.state.step === 20 ? this.state['chart' + parseInt(i + 1)].slice(600) : this.state['chart' + parseInt(i + 1)];\n _option.series[0].areaStyle = {\n color: \"#c3c683\",\n shadowBlur: 10,\n opacity: 0.1\n };\n _option.series[0].lineStyle = { color: \"#b6a019\" };\n _option.series[0].itemStyle = { color: \"#b6a019\" };\n _mychart.setOption(_option);\n }\n }\n }\n }\n\n // delete first data\n\n }, {\n key: \"delete\",\n value: function _delete(arr) {\n if (_lodash2.default.isUndefined(arr)) {\n return [];\n }\n arr.splice(0, 1);\n return arr;\n }\n //according to step to set XAxis data\n\n }, {\n key: \"setXAxis\",\n value: function setXAxis() {\n var arr = [];\n for (var i = 0, len = 30 * 60; i < len; i++) {\n arr[i] = [new Date(new Date().getTime() - 1000 * i).format('yyyy-MM-dd hh:mm:ss'), 0];\n }\n arr = arr.reverse();\n this.setState({\n chartCpu: [].concat(_toConsumableArray(arr)),\n chart1: [].concat(_toConsumableArray(arr)),\n chart2: [].concat(_toConsumableArray(arr)),\n chart3: [].concat(_toConsumableArray(arr)),\n chart4: [].concat(_toConsumableArray(arr)),\n chart5: [].concat(_toConsumableArray(arr)),\n chart6: [].concat(_toConsumableArray(arr)),\n chart7: [].concat(_toConsumableArray(arr))\n });\n var mychart1 = _echarts2.default.init(this.refs.cpuLoad);\n mychart1.setOption({\n animation: false,\n title: { text: 'Average Cluster CPU Usage',\n left: 'center',\n textStyle: {\n color: \"#767676\",\n fontSize: 16\n }\n },\n tooltip: {\n trigger: 'axis'\n },\n xAxis: {\n type: 'time',\n name: 'time',\n interval: 60 * 1000 * this.state.step / 10,\n boundaryGap: false,\n axisLabel: {\n formatter: function formatter(value, index) {\n if (index % 2 == 1) {\n return \"\";\n }\n var date = new Date(value).format(\"yyyy-MM-dd hh:mm:ss\");\n return date.slice(11, 16);\n }\n }\n },\n yAxis: {\n name: 'usage(%)',\n axisTick: {\n show: false\n },\n axisLabel: {\n formatter: function formatter(value, index) {\n if (index % 2 == 1) {\n return \"\";\n }\n return value;\n }\n }\n },\n series: [{\n type: 'line',\n symbol: 'none',\n data: []\n }]\n });\n for (var _i = 0; _i < this.state.chartName.length; _i++) {\n if (!this.refs[this.state.chartRef[_i]].className) {\n var mychart = _echarts2.default.init(this.refs[this.state.chartRef[_i]]);\n mychart.setOption({\n animation: false,\n title: {\n text: this.state.chartName[_i],\n left: 'center',\n textStyle: {\n color: \"#767676\",\n fontSize: 16\n }\n },\n tooltip: {\n trigger: 'axis'\n },\n xAxis: {\n type: 'time',\n name: 'time',\n interval: 60 * 1000 * this.state.step / 10,\n boundaryGap: false,\n axisLabel: {\n formatter: function formatter(value, index) {\n if (index % 2 == 1) {\n return \"\";\n }\n var date = new Date(value).format(\"yyyy-MM-dd hh:mm:ss\");\n return date.slice(11, 16);\n }\n }\n },\n yAxis: {\n name: this.state.unitArr[_i],\n axisTick: {\n show: false\n },\n axisLabel: {\n formatter: function (name, value, index) {\n if (index % 2 == 1) {\n return \"\";\n }\n if (name === 'quantity') {\n return (0, _utils.formatCount)(value);\n } else if (name === 'bytes') {\n return (0, _utils.formatDataSizeBytes)(value);\n } else {\n return value;\n }\n }.bind(null, this.state.unitArr[_i])\n }\n },\n series: [{\n type: 'line',\n symbol: 'none',\n data: this.state.step === 10 ? this.state['chart' + parseInt(_i + 1)].slice(1200) : this.state.step === 20 ? this.state['chart' + parseInt(_i + 1)].slice(600) : this.state['chart' + parseInt(_i + 1)]\n }]\n });\n }\n }\n }\n }, {\n key: \"selected\",\n value: function selected(e) {\n clearInterval(this.state.timer);\n e.preventDefault();\n var val = e.target.selectedIndex === 0 ? 10 : e.target.selectedIndex === 1 ? 20 : 30;\n var state = this.state;\n state.step = val;\n this.setState(state);\n for (var i = 0; i < this.state.chartName.length; i++) {\n if (!this.refs[this.state.chartRef[i]].className) {\n var mychart = _echarts2.default.init(this.refs[this.state.chartRef[i]]);\n var _option2 = mychart.getOption();\n _option2.xAxis[0].interval = 60 * 1000 * this.state.step / 10;\n // option.series[0].data=[];\n mychart.setOption(_option2);\n }\n }\n var mychart1 = _echarts2.default.init(this.refs.cpuLoad);\n var option = mychart1.getOption();\n option.xAxis[0].interval = 60 * 1000 * this.state.step / 10;\n mychart1.setOption(option);\n _OverviewActions2.default.getData();\n this.lineDatas();\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this3 = this;\n\n var style = { height: \"30vh\", width: \"calc(40vw - 80px)\", left: \"center\", top: \"center\" };\n return _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\n \"div\",\n { className: \"selectItemContainer\" },\n _react2.default.createElement(\n \"div\",\n { className: \"selectChart multiSelect\" },\n _react2.default.createElement(_reactSimpleMultiSelect2.default, {\n title: \"Select Chart\",\n itemList: this.state.itemList,\n selectedItemList: this.state.selectedItemList,\n changeList: this.changeList,\n isObjectArray: true\n })\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"select-part\" },\n _react2.default.createElement(\n \"select\",\n { onChange: this.selected.bind(this), value: this.state.step },\n _react2.default.createElement(\n \"option\",\n { value: \"10\" },\n \"Last 10 minutes\"\n ),\n _react2.default.createElement(\n \"option\",\n { value: \"20\" },\n \"Last 20 minutes\"\n ),\n _react2.default.createElement(\n \"option\",\n { value: \"30\" },\n \"Last 30 minutes\"\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"overviewGraphContainerParent\" },\n _react2.default.createElement(\n \"div\",\n { className: \"overviewGraphContainer\" },\n _react2.default.createElement(\n \"div\",\n { className: this.state.checkStatus[\"heatMapChart\"] ? 'overviewChart' : 'display-none' },\n _react2.default.createElement(\"div\", { ref: \"heatMapChart\", style: style })\n ),\n _react2.default.createElement(\n \"div\",\n { className: this.state.checkStatus[\"heatMapMemoryChart\"] ? 'overviewChart' : 'display-none' },\n _react2.default.createElement(\"div\", { ref: \"heatMapMemoryChart\", style: style })\n ),\n _react2.default.createElement(\n \"div\",\n { className: this.state.checkStatus[\"cpuLoad\"] ? 'overviewChart' : 'display-none' },\n _react2.default.createElement(\"div\", { ref: \"cpuLoad\", style: style })\n ),\n Object.keys(this.state.checkStatus).map(function (key, index) {\n if (key == 'cpuLoad' || key == 'heatMapChart' || key == 'heatMapMemoryChart') {\n return null;\n }\n return _react2.default.createElement(\n \"div\",\n { className: _this3.state.checkStatus[key] ? 'overviewChart' : 'display-none', key: index },\n _react2.default.createElement(\"div\", { ref: key, style: style })\n );\n })\n )\n )\n );\n }\n }]);\n\n return EchartPart;\n}(_react2.default.Component);\n\nexports.default = EchartPart;\n\n//# sourceURL=webpack:///./overview/EchartPart.jsx?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _echarts = __webpack_require__(/*! echarts/lib/echarts */ \"./node_modules/echarts/lib/echarts.js\");\n\nvar _echarts2 = _interopRequireDefault(_echarts);\n\n__webpack_require__(/*! echarts/lib/chart/line */ \"./node_modules/echarts/lib/chart/line.js\");\n\n__webpack_require__(/*! echarts/lib/chart/treemap */ \"./node_modules/echarts/lib/chart/treemap.js\");\n\n__webpack_require__(/*! echarts/theme/royal */ \"./node_modules/echarts/theme/royal.js\");\n\n__webpack_require__(/*! echarts/lib/component/tooltip */ \"./node_modules/echarts/lib/component/tooltip.js\");\n\n__webpack_require__(/*! echarts/lib/component/title */ \"./node_modules/echarts/lib/component/title.js\");\n\nvar _OverviewActions = __webpack_require__(/*! ./OverviewActions */ \"./overview/OverviewActions.js\");\n\nvar _OverviewActions2 = _interopRequireDefault(_OverviewActions);\n\nvar _OverviewStore = __webpack_require__(/*! ./OverviewStore */ \"./overview/OverviewStore.js\");\n\nvar _OverviewStore2 = _interopRequireDefault(_OverviewStore);\n\nvar _reactSimpleMultiSelect = __webpack_require__(/*! react-simple-multi-select */ \"./node_modules/react-simple-multi-select/build/components/MultiSelect.js\");\n\nvar _reactSimpleMultiSelect2 = _interopRequireDefault(_reactSimpleMultiSelect);\n\nvar _utils = __webpack_require__(/*! ../utils */ \"./utils.js\");\n\nvar _lodash = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n\nvar _lodash2 = _interopRequireDefault(_lodash);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar EchartPart = function (_React$Component) {\n _inherits(EchartPart, _React$Component);\n\n function EchartPart(props) {\n _classCallCheck(this, EchartPart);\n\n var _this = _possibleConstructorReturn(this, (EchartPart.__proto__ || Object.getPrototypeOf(EchartPart)).call(this, props));\n\n _this.state = {\n checkStatus: {\n checkOne: true,\n checkTwo: true,\n checkThree: true,\n checkFour: true,\n checkFive: true,\n checkSix: true,\n checkSeven: true,\n heatMapChart: true,\n cpuLoad: true,\n heatMapMemoryChart: true\n },\n itemList: [{ key: \"Cluster CPU Usage\", value: \"heatMapChart\" }, { key: \"Cluster Free Memory\", value: \"heatMapMemoryChart\" }, { key: \"Avg Cluster CPU Usage\", value: \"cpuLoad\" }, { key: \"Used Query Memory\", value: \"checkOne\" }, { key: \"Running Queries\", value: \"checkTwo\" }, { key: \"Queued Queries\", value: \"checkThree\" }, { key: \"Blocked Queries\", value: \"checkFour\" }, { key: \"Active Workers\", value: \"checkFive\" }, { key: \"Avg Running Tasks\", value: \"checkSix\" }, { key: \"Avg CPU cycles per worker\", value: \"checkSeven\" }],\n selectedItemList: [{ key: \"Cluster CPU Usage\", value: \"heatMapChart\" }, { key: \"Cluster Free Memory\", value: \"heatMapMemoryChart\" }, { key: \"Avg Cluster CPU Usage\", value: \"cpuLoad\" }, { key: \"Used Query Memory\", value: \"checkOne\" }, { key: \"Running Queries\", value: \"checkTwo\" }, { key: \"Queued Queries\", value: \"checkThree\" }, { key: \"Blocked Queries\", value: \"checkFour\" }, { key: \"Active Workers\", value: \"checkFive\" }, { key: \"Avg Running Tasks\", value: \"checkSix\" }, { key: \"Avg CPU cycles per worker\", value: \"checkSeven\" }],\n chartName: ['Used Query Memory', 'Running Queries', 'Queued Queries', 'Blocked Queries', 'Active Workers', 'Avg Running Tasks', 'Avg CPU cycles per worker'],\n step: 10,\n timer: null,\n chartCpu: [],\n heatMapChart: [],\n heatMapMemoryChart: [],\n chart1: [],\n chart2: [],\n chart3: [],\n chart4: [],\n chart5: [],\n chart6: [],\n chart7: [],\n chartRef: null,\n lastRow: null,\n lastByte: null,\n lastWorker: null,\n memoryInit: false,\n unitArr: ['bytes', 'quantity', 'quantity', 'quantity', 'quantity', 'quantity', 'quantity'],\n lastRefresh: null\n };\n _this.state.chartRef = Object.keys(_this.state.checkStatus), _this._onChange = _this._onChange.bind(_this);\n _this.changeList = _this.changeList.bind(_this);\n _this.resize = _this.resize.bind(_this);\n return _this;\n }\n\n _createClass(EchartPart, [{\n key: \"resize\",\n value: function resize() {\n for (var i = 0; i < this.state.chartRef.length; i++) {\n var ref = this.refs[this.state.chartRef[i]];\n if (!ref.className) {\n var chart = _echarts2.default.init(ref);\n chart.resize({ silent: true });\n }\n }\n }\n }, {\n key: \"changeList\",\n value: function changeList(selectedItemList) {\n var _this2 = this;\n\n this.state.itemList.map(function (item) {\n _this2.state.checkStatus[item.value] = false;\n });\n selectedItemList.map(function (item) {\n _this2.state.checkStatus[item.value] = true;\n });\n var state = this.state;\n state.selectedItemList = selectedItemList;\n this.setState(state);\n }\n }, {\n key: \"changeState\",\n value: function changeState(name) {\n var state = this.state;\n state.checkStatus[name] = !state.checkStatus[name];\n this.setState(state);\n }\n\n //echarts\n\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.setXAxis();\n _OverviewActions2.default.getData();\n _OverviewActions2.default.getMemoryData();\n _OverviewStore2.default.listen(this._onChange);\n this.lineDatas();\n\n var win = window;\n if (win.addEventListener) {\n win.addEventListener('resize', this.resize, false);\n } else if (win.attachEvent) {\n win.attachEvent('onresize', this.resize);\n } else {\n win.onresize = this.resize;\n }\n $(window).on('resize', this.resize);\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n _OverviewStore2.default.unlisten(this._onChange);\n clearInterval(this.state.timer);\n }\n\n //obtained data per sec\n\n }, {\n key: \"lineDatas\",\n value: function lineDatas() {\n this.state.timer = setInterval(function () {\n _OverviewActions2.default.getData();\n _OverviewActions2.default.getMemoryData();\n }, 1000);\n }\n //refresh line\n\n }, {\n key: \"_onChange\",\n value: function _onChange(data) {\n if (data.requestNum % 2 === 0) {\n if (!this.state.memoryInit && data.memoryData) {\n // let cpuChart=echarts.init(this.refs.cpuLoad);\n // let option=cpuChart.getOption();\n // let memoryInitData=[];\n // let cpuSeries={};\n // let index = 0;\n // Object.keys(data.memoryData).map(key=>{\n // let op = Object.assign({}, option.series[index]);\n // index++;\n // op.name = key.slice(0, key.indexOf(\" \"));\n // let currentCpuData = [...this.delete(this.state.chartCpu), [new Date().format('yyyy-MM-dd hh:mm:ss'), (data.memoryData[key].processCpuLoad * 100).toFixed(2)]];\n // op.data = this.state.step === 10 ? currentCpuData.slice(1200) : this.state.step === 20 ? currentCpuData.slice(600) : currentCpuData;\n // op.areaStyle = {\n // shadowBlur: 10,\n // opacity: 0.1\n // };\n // op.type = 'line';\n // op.showSymbol = false;\n // memoryInitData.push(op);\n // cpuSeries[key]= currentCpuData;\n // })\n // option.series=memoryInitData;\n // option.yAxis = {max: 100, min: 0, type: \"value\"};\n // cpuChart.setOption(option);\n\n var _heatMapChart = _echarts2.default.init(this.refs.heatMapChart, \"royal\");\n _heatMapChart.setOption({\n animation: false,\n title: {\n text: 'Cluster CPU Usage',\n left: 'center',\n textStyle: {\n color: \"#767676\",\n fontSize: 16\n }\n },\n tooltip: {\n trigger: 'item',\n formatter: function formatter(params, t, cb) {\n return params.name + \" : \" + params.value + \"%\";\n }\n },\n series: [{\n type: 'treemap',\n data: this.state.heatMapChart\n }]\n });\n var _heatMapMemoryChart = _echarts2.default.init(this.refs.heatMapMemoryChart, \"royal\");\n _heatMapMemoryChart.setOption({\n animation: false,\n title: {\n text: 'Cluster Free Memory ',\n left: 'center',\n textStyle: {\n color: \"#767676\",\n fontSize: 16\n }\n },\n tooltip: {\n trigger: 'item',\n formatter: function formatter(params, t, cb) {\n return params.name + \" : \" + (0, _utils.formatDataSizeBytes)(params.value);\n }\n },\n series: [{\n type: 'treemap',\n data: this.state.heatMapMemoryChart\n }]\n });\n\n this.setState({\n memoryInit: true\n });\n }\n // else{\n // let dataCpu=this.state.chartCpu;\n // let mychart1=echarts.init(this.refs.cpuLoad);\n // let option=mychart1.getOption();\n // let memoryInitData=option.series;\n // Object.keys(data.memoryData).map(key=>{\n // let dataCpuElement = dataCpu[key];\n // if (_.isUndefined(dataCpuElement)) {\n // let op = Object.assign({}, option.series[index]);\n // op.name = key.slice(0, key.indexOf(\" \"));\n // op.areaStyle = {\n // shadowBlur: 10,\n // opacity: 0.1\n // };\n // op.type = 'line';\n // dataCpu[key] = [...this.delete(dataCpuElement), [new Date().format('yyyy-MM-dd hh:mm:ss'), (data.memoryData[key].processCpuLoad * 100).toFixed(2)]];\n // op.data = dataCpu[key];\n // memoryInitData.push(op);\n // }\n // else {\n // dataCpu[key] = [...this.delete(dataCpuElement), [new Date().format('yyyy-MM-dd hh:mm:ss'), (data.memoryData[key].processCpuLoad * 100).toFixed(2)]];\n // }\n // for(let i=0,len=memoryInitData.length;i= 600) {\n dataset = dataset.splice(600 - 1, dataset.length - 600 - 1);\n }\n dataset = [].concat(_toConsumableArray(dataset), [newDataPoint]);\n entry.dataset = dataset;\n var sum = 0;\n for (var i = 0; i < dataset.length; i++) {\n sum += dataset[i];\n }\n entry.value = Number((sum / dataset.length).toFixed(2));\n }\n });\n this.state.heatMapChart = heatMapData;\n var heatMapChart = _echarts2.default.init(this.refs.heatMapChart, \"royal\");\n var heatMapChartOption = heatMapChart.getOption();\n heatMapChartOption.series = [{\n type: \"treemap\",\n data: heatMapData,\n breadcrumb: {\n show: false\n }\n }];\n heatMapChart.setOption(heatMapChartOption);\n\n //heatMap memory data\n var heatMapMemoryData = this.state.heatMapMemoryChart;\n Object.keys(data.memoryData).map(function (key) {\n var id = key.slice(0, key.indexOf(\" \"));\n var name = key.slice(key.indexOf(\"[\") + 1, key.indexOf(\"]\"));\n var index = _lodash2.default.findIndex(heatMapMemoryData, { id: id });\n var newDataPoint = data.memoryData[key].pools.general.freeBytes + (data.memoryData[key].pools.reserved ? data.memoryData[key].pools.reserved.freeBytes : 0);\n newDataPoint = Number(newDataPoint);\n if (index == -1) {\n var newData = {};\n newData.id = id;\n newData.name = name;\n newData.value = newDataPoint;\n newData.dataset = [newDataPoint];\n newData.children = [];\n heatMapMemoryData.push(newData);\n } else {\n var entry = heatMapMemoryData[index];\n var dataset = entry.dataset;\n if (dataset.length >= 600) {\n dataset = dataset.splice(600 - 1, dataset.length - 600 - 1);\n }\n dataset = [].concat(_toConsumableArray(dataset), [newDataPoint]);\n entry.dataset = dataset;\n var sum = 0;\n for (var i = 0; i < dataset.length; i++) {\n sum += dataset[i];\n }\n entry.value = Number((sum / dataset.length).toFixed(2));\n }\n });\n this.state.heatMapMemoryChart = heatMapMemoryData;\n var heatMapMemoryChart = _echarts2.default.init(this.refs.heatMapMemoryChart, \"royal\");\n var heatMapMemoryChartOption = heatMapMemoryChart.getOption();\n heatMapMemoryChartOption.series = [{\n type: \"treemap\",\n data: heatMapMemoryData,\n breadcrumb: {\n show: false\n }\n }];\n heatMapMemoryChart.setOption(heatMapMemoryChartOption);\n\n var now = Date.now();\n var secondsSinceLastRefresh = this.state.lastRefresh ? (now - this.state.lastRefresh) / 1000.0 : 1;\n secondsSinceLastRefresh = secondsSinceLastRefresh < 1 ? 1 : secondsSinceLastRefresh;\n var lastWorker = this.state.lastWorker ? (data.lineData.totalCpuTimeSecs - this.state.lastWorker) / data.lineData.activeWorkers / secondsSinceLastRefresh : 0;\n this.setState({\n chartCpu: [].concat(_toConsumableArray(this.delete(this.state.chartCpu)), [[new Date().format('yyyy-MM-dd hh:mm:ss'), (data.lineData.systemCpuLoad * 100).toFixed(4)]]),\n chart1: [].concat(_toConsumableArray(this.delete(this.state.chart1)), [[new Date().format('yyyy-MM-dd hh:mm:ss'), data.lineData.reservedMemory]]),\n chart2: [].concat(_toConsumableArray(this.delete(this.state.chart2)), [[new Date().format('yyyy-MM-dd hh:mm:ss'), data.lineData.runningQueries]]),\n chart3: [].concat(_toConsumableArray(this.delete(this.state.chart3)), [[new Date().format('yyyy-MM-dd hh:mm:ss'), data.lineData.queuedQueries]]),\n chart4: [].concat(_toConsumableArray(this.delete(this.state.chart4)), [[new Date().format('yyyy-MM-dd hh:mm:ss'), data.lineData.blockedQueries]]),\n chart5: [].concat(_toConsumableArray(this.delete(this.state.chart5)), [[new Date().format('yyyy-MM-dd hh:mm:ss'), data.lineData.activeWorkers]]),\n chart6: [].concat(_toConsumableArray(this.delete(this.state.chart6)), [[new Date().format('yyyy-MM-dd hh:mm:ss'), data.lineData.runningDrivers]]),\n chart7: [].concat(_toConsumableArray(this.delete(this.state.chart7)), [[new Date().format('yyyy-MM-dd hh:mm:ss'), lastWorker]]),\n lastWorker: data.lineData.totalCpuTimeSecs,\n heatMapChart: this.state.heatMapChart,\n heatMapMemoryChart: this.state.heatMapMemoryChart,\n lastRefresh: now\n });\n if (!this.refs.cpuLoad.className) {\n var mychart = _echarts2.default.init(this.refs.cpuLoad);\n var option = mychart.getOption();\n option.series[0].data = this.state.step === 10 ? this.state.chartCpu.slice(1200) : this.state.step === 20 ? this.state.chartCpu.slice(600) : this.state.chartCpu;\n option.series[0].areaStyle = {\n color: \"#41BB04\",\n shadowBlur: 10,\n opacity: 0.1\n };\n option.series[0].lineStyle = { color: \"#137113\" };\n option.series[0].itemStyle = { color: \"#137113\" };\n option.yAxis = { max: 100, min: 0, type: \"value\" };\n mychart.setOption(option);\n }\n for (var i = 0; i < this.state.chartName.length; i++) {\n if (!this.refs[this.state.chartRef[i]].className) {\n var _mychart = _echarts2.default.init(this.refs[this.state.chartRef[i]]);\n var _option = _mychart.getOption();\n _option.series[0].data = this.state.step === 10 ? this.state['chart' + parseInt(i + 1)].slice(1200) : this.state.step === 20 ? this.state['chart' + parseInt(i + 1)].slice(600) : this.state['chart' + parseInt(i + 1)];\n _option.series[0].areaStyle = {\n color: \"#c3c683\",\n shadowBlur: 10,\n opacity: 0.1\n };\n _option.series[0].lineStyle = { color: \"#b6a019\" };\n _option.series[0].itemStyle = { color: \"#b6a019\" };\n _mychart.setOption(_option);\n }\n }\n }\n }\n\n // delete first data\n\n }, {\n key: \"delete\",\n value: function _delete(arr) {\n if (_lodash2.default.isUndefined(arr)) {\n return [];\n }\n arr.splice(0, 1);\n return arr;\n }\n //according to step to set XAxis data\n\n }, {\n key: \"setXAxis\",\n value: function setXAxis() {\n var arr = [];\n for (var i = 0, len = 30 * 60; i < len; i++) {\n arr[i] = [new Date(new Date().getTime() - 1000 * i).format('yyyy-MM-dd hh:mm:ss'), 0];\n }\n arr = arr.reverse();\n this.setState({\n chartCpu: [].concat(_toConsumableArray(arr)),\n chart1: [].concat(_toConsumableArray(arr)),\n chart2: [].concat(_toConsumableArray(arr)),\n chart3: [].concat(_toConsumableArray(arr)),\n chart4: [].concat(_toConsumableArray(arr)),\n chart5: [].concat(_toConsumableArray(arr)),\n chart6: [].concat(_toConsumableArray(arr)),\n chart7: [].concat(_toConsumableArray(arr))\n });\n var mychart1 = _echarts2.default.init(this.refs.cpuLoad);\n mychart1.setOption({\n animation: false,\n title: { text: 'Average Cluster CPU Usage',\n left: 'center',\n textStyle: {\n color: \"#767676\",\n fontSize: 16\n }\n },\n tooltip: {\n trigger: 'axis'\n },\n xAxis: {\n type: 'time',\n name: 'time',\n interval: 60 * 1000 * this.state.step / 10,\n boundaryGap: false,\n axisLabel: {\n formatter: function formatter(value, index) {\n if (index % 2 == 1) {\n return \"\";\n }\n var date = new Date(value).format(\"yyyy-MM-dd hh:mm:ss\");\n return date.slice(11, 16);\n }\n }\n },\n yAxis: {\n name: 'usage(%)',\n axisTick: {\n show: false\n },\n axisLabel: {\n formatter: function formatter(value, index) {\n if (index % 2 == 1) {\n return \"\";\n }\n return value;\n }\n }\n },\n series: [{\n type: 'line',\n symbol: 'none',\n data: []\n }]\n });\n for (var _i = 0; _i < this.state.chartName.length; _i++) {\n if (!this.refs[this.state.chartRef[_i]].className) {\n var mychart = _echarts2.default.init(this.refs[this.state.chartRef[_i]]);\n mychart.setOption({\n animation: false,\n title: {\n text: this.state.chartName[_i],\n left: 'center',\n textStyle: {\n color: \"#767676\",\n fontSize: 16\n }\n },\n tooltip: {\n trigger: 'axis'\n },\n xAxis: {\n type: 'time',\n name: 'time',\n interval: 60 * 1000 * this.state.step / 10,\n boundaryGap: false,\n axisLabel: {\n formatter: function formatter(value, index) {\n if (index % 2 == 1) {\n return \"\";\n }\n var date = new Date(value).format(\"yyyy-MM-dd hh:mm:ss\");\n return date.slice(11, 16);\n }\n }\n },\n yAxis: {\n name: this.state.unitArr[_i],\n axisTick: {\n show: false\n },\n axisLabel: {\n formatter: function (name, value, index) {\n if (index % 2 == 1) {\n return \"\";\n }\n if (name === 'quantity') {\n return (0, _utils.formatCount)(value);\n } else if (name === 'bytes') {\n return (0, _utils.formatDataSizeBytes)(value);\n } else {\n return value;\n }\n }.bind(null, this.state.unitArr[_i])\n }\n },\n series: [{\n type: 'line',\n symbol: 'none',\n data: this.state.step === 10 ? this.state['chart' + parseInt(_i + 1)].slice(1200) : this.state.step === 20 ? this.state['chart' + parseInt(_i + 1)].slice(600) : this.state['chart' + parseInt(_i + 1)]\n }]\n });\n }\n }\n }\n }, {\n key: \"selected\",\n value: function selected(e) {\n clearInterval(this.state.timer);\n e.preventDefault();\n var val = e.target.selectedIndex === 0 ? 10 : e.target.selectedIndex === 1 ? 20 : 30;\n var state = this.state;\n state.step = val;\n this.setState(state);\n for (var i = 0; i < this.state.chartName.length; i++) {\n if (!this.refs[this.state.chartRef[i]].className) {\n var mychart = _echarts2.default.init(this.refs[this.state.chartRef[i]]);\n var _option2 = mychart.getOption();\n _option2.xAxis[0].interval = 60 * 1000 * this.state.step / 10;\n // option.series[0].data=[];\n mychart.setOption(_option2);\n }\n }\n var mychart1 = _echarts2.default.init(this.refs.cpuLoad);\n var option = mychart1.getOption();\n option.xAxis[0].interval = 60 * 1000 * this.state.step / 10;\n mychart1.setOption(option);\n _OverviewActions2.default.getData();\n this.lineDatas();\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this3 = this;\n\n var style = { height: \"30vh\", width: \"calc(40vw - 80px)\", left: \"center\", top: \"center\" };\n return _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\n \"div\",\n { className: \"selectItemContainer\" },\n _react2.default.createElement(\n \"div\",\n { className: \"selectChart multiSelect\" },\n _react2.default.createElement(_reactSimpleMultiSelect2.default, {\n title: \"Select Chart\",\n itemList: this.state.itemList,\n selectedItemList: this.state.selectedItemList,\n changeList: this.changeList,\n isObjectArray: true\n })\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"select-part\" },\n _react2.default.createElement(\n \"select\",\n { onChange: this.selected.bind(this), value: this.state.step },\n _react2.default.createElement(\n \"option\",\n { value: \"10\" },\n \"Last 10 minutes\"\n ),\n _react2.default.createElement(\n \"option\",\n { value: \"20\" },\n \"Last 20 minutes\"\n ),\n _react2.default.createElement(\n \"option\",\n { value: \"30\" },\n \"Last 30 minutes\"\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"overviewGraphContainerParent\" },\n _react2.default.createElement(\n \"div\",\n { className: \"overviewGraphContainer\" },\n _react2.default.createElement(\n \"div\",\n { className: this.state.checkStatus[\"heatMapChart\"] ? 'overviewChart' : 'display-none' },\n _react2.default.createElement(\"div\", { ref: \"heatMapChart\", style: style })\n ),\n _react2.default.createElement(\n \"div\",\n { className: this.state.checkStatus[\"heatMapMemoryChart\"] ? 'overviewChart' : 'display-none' },\n _react2.default.createElement(\"div\", { ref: \"heatMapMemoryChart\", style: style })\n ),\n _react2.default.createElement(\n \"div\",\n { className: this.state.checkStatus[\"cpuLoad\"] ? 'overviewChart' : 'display-none' },\n _react2.default.createElement(\"div\", { ref: \"cpuLoad\", style: style })\n ),\n Object.keys(this.state.checkStatus).map(function (key, index) {\n if (key == 'cpuLoad' || key == 'heatMapChart' || key == 'heatMapMemoryChart') {\n return null;\n }\n return _react2.default.createElement(\n \"div\",\n { className: _this3.state.checkStatus[key] ? 'overviewChart' : 'display-none', key: index },\n _react2.default.createElement(\"div\", { ref: key, style: style })\n );\n })\n )\n )\n );\n }\n }]);\n\n return EchartPart;\n}(_react2.default.Component);\n\nexports.default = EchartPart;\n\n//# sourceURL=webpack:///./overview/EchartPart.jsx?"); /***/ }), @@ -26322,7 +26322,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n}); /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _alt = __webpack_require__(/*! ../queryeditor/alt */ \"./queryeditor/alt.js\");\n\nvar _alt2 = _interopRequireDefault(_alt);\n\nvar _OverviewApiUtils = __webpack_require__(/*! ./OverviewApiUtils */ \"./overview/OverviewApiUtils.js\");\n\nvar _OverviewApiUtils2 = _interopRequireDefault(_OverviewApiUtils);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar OverviewActions = function () {\n function OverviewActions() {\n _classCallCheck(this, OverviewActions);\n\n this.generateActions('receiveData', 'memoryData');\n }\n\n _createClass(OverviewActions, [{\n key: \"getData\",\n value: function getData() {\n var _this = this;\n\n _OverviewApiUtils2.default.getLineData().then(function (data) {\n _this.actions.receiveData(data);\n });\n }\n }, {\n key: \"getMemoryData\",\n value: function getMemoryData() {\n var _this2 = this;\n\n _OverviewApiUtils2.default.getWorkMemory().then(function (data) {\n _this2.actions.memoryData(data);\n });\n }\n }]);\n\n return OverviewActions;\n}();\n\nexports.default = _alt2.default.createActions(OverviewActions);\n\n//# sourceURL=webpack:///./overview/OverviewActions.js?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar _alt = __webpack_require__(/*! ../queryeditor/alt */ \"./queryeditor/alt.js\");\n\nvar _alt2 = _interopRequireDefault(_alt);\n\nvar _OverviewApiUtils = __webpack_require__(/*! ./OverviewApiUtils */ \"./overview/OverviewApiUtils.js\");\n\nvar _OverviewApiUtils2 = _interopRequireDefault(_OverviewApiUtils);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar OverviewActions = function () {\n function OverviewActions() {\n _classCallCheck(this, OverviewActions);\n\n this.generateActions('receiveData', 'memoryData');\n }\n\n _createClass(OverviewActions, [{\n key: \"getData\",\n value: function getData() {\n var _this = this;\n\n _OverviewApiUtils2.default.getLineData().then(function (data) {\n _this.actions.receiveData(data);\n });\n }\n }, {\n key: \"getMemoryData\",\n value: function getMemoryData() {\n var _this2 = this;\n\n _OverviewApiUtils2.default.getWorkMemory().then(function (data) {\n _this2.actions.memoryData(data);\n });\n }\n }]);\n\n return OverviewActions;\n}();\n\nexports.default = _alt2.default.createActions(OverviewActions);\n\n//# sourceURL=webpack:///./overview/OverviewActions.js?"); /***/ }), @@ -26334,7 +26334,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n}); /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _xhr = __webpack_require__(/*! ../queryeditor/utils/xhr */ \"./queryeditor/utils/xhr.js\");\n\nvar _xhr2 = _interopRequireDefault(_xhr);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = {\n getLineData: function getLineData() {\n return (0, _xhr2.default)('../v1/cluster');\n },\n getWorkMemory: function getWorkMemory() {\n return (0, _xhr2.default)('../v1/cluster/workerMemory');\n }\n};\n\n//# sourceURL=webpack:///./overview/OverviewApiUtils.js?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _xhr = __webpack_require__(/*! ../queryeditor/utils/xhr */ \"./queryeditor/utils/xhr.js\");\n\nvar _xhr2 = _interopRequireDefault(_xhr);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = {\n getLineData: function getLineData() {\n return (0, _xhr2.default)('../v1/cluster');\n },\n getWorkMemory: function getWorkMemory() {\n return (0, _xhr2.default)('../v1/cluster/workerMemory');\n }\n}; /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n//# sourceURL=webpack:///./overview/OverviewApiUtils.js?"); /***/ }), @@ -26346,7 +26346,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n}); /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _EchartPart = __webpack_require__(/*! ./EchartPart */ \"./overview/EchartPart.jsx\");\n\nvar _EchartPart2 = _interopRequireDefault(_EchartPart);\n\nvar _Header = __webpack_require__(/*! ../queryeditor/components/Header */ \"./queryeditor/components/Header.jsx\");\n\nvar _Header2 = _interopRequireDefault(_Header);\n\nvar _Footer = __webpack_require__(/*! ../queryeditor/components/Footer */ \"./queryeditor/components/Footer.jsx\");\n\nvar _Footer2 = _interopRequireDefault(_Footer);\n\nvar _OverviewStore = __webpack_require__(/*! ./OverviewStore */ \"./overview/OverviewStore.js\");\n\nvar _OverviewStore2 = _interopRequireDefault(_OverviewStore);\n\nvar _utils = __webpack_require__(/*! ../utils */ \"./utils.js\");\n\nvar _NavigationMenu = __webpack_require__(/*! ../NavigationMenu */ \"./NavigationMenu.jsx\");\n\nvar _NavigationMenu2 = _interopRequireDefault(_NavigationMenu);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar OverviewMain = function (_React$Component) {\n _inherits(OverviewMain, _React$Component);\n\n function OverviewMain(props) {\n _classCallCheck(this, OverviewMain);\n\n var _this = _possibleConstructorReturn(this, (OverviewMain.__proto__ || Object.getPrototypeOf(OverviewMain)).call(this, props));\n\n _this.state = {\n totalNodes: 0,\n totalMemory: 0,\n memoryUsed: 0,\n processCpuLoad: 0,\n systemCpuLoad: 0,\n tableData: []\n };\n _this._onChange = _this._onChange.bind(_this);\n return _this;\n }\n\n _createClass(OverviewMain, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n _OverviewStore2.default.listen(this._onChange);\n }\n }, {\n key: \"_onChange\",\n value: function _onChange(data) {\n var table = [];\n if (data.memoryData) {\n Object.keys(data.memoryData).map(function (key) {\n var obj = {};\n obj.id = key.slice(0, key.indexOf(\" \"));\n obj.ip = key.slice(key.indexOf(\"[\") + 1, key.indexOf(\"]\"));\n obj.count = data.memoryData[key].availableProcessors;\n var totalMemory = data.memoryData[key].totalNodeMemory.slice(0, -1);\n obj.nodeMemory = totalMemory;\n obj.freeMemory = data.memoryData[key].pools.general.freeBytes + (data.memoryData[key].pools.reserved ? data.memoryData[key].pools.reserved.freeBytes : 0);\n table.push(obj);\n });\n }\n this.setState({\n totalNodes: data.memoryData ? Object.keys(data.memoryData).length : '',\n totalMemory: data.lineData.totalMemory,\n memoryUsed: data.lineData.reservedMemory,\n processCpuLoad: (data.lineData.processCpuLoad * 100).toFixed(2) + '%',\n systemCpuLoad: (data.lineData.systemCpuLoad * 100).toFixed(2) + '%',\n tableData: table\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n return _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\n \"div\",\n { className: \"flex flex-row flex-initial header\" },\n _react2.default.createElement(_Header2.default, null)\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"overview\" },\n _react2.default.createElement(_NavigationMenu2.default, { active: \"metrics\" }),\n _react2.default.createElement(\n \"div\",\n { className: \"line-right\" },\n _react2.default.createElement(\n \"h2\",\n null,\n \"Overview Dashboard\"\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"line-show\" },\n _react2.default.createElement(\n \"div\",\n { className: \"line-part\" },\n _react2.default.createElement(_EchartPart2.default, null)\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"summary-info\" },\n _react2.default.createElement(\n \"div\",\n { className: \"summary-detail\" },\n _react2.default.createElement(\n \"h3\",\n null,\n \"Summary Info\"\n ),\n _react2.default.createElement(\n \"table\",\n { style: { width: \"100%\", marginTop: \"20px\" } },\n _react2.default.createElement(\n \"tbody\",\n null,\n _react2.default.createElement(\n \"tr\",\n { className: \"border-bottom\" },\n _react2.default.createElement(\n \"td\",\n null,\n _react2.default.createElement(\n \"p\",\n { className: \"font-18\" },\n \"Total Nodes \",\n _react2.default.createElement(\n \"a\",\n { href: \"./nodes.html\" },\n \"(view list)\"\n )\n )\n ),\n _react2.default.createElement(\n \"td\",\n null,\n _react2.default.createElement(\n \"span\",\n { className: \"float-right color-2b610a\" },\n this.state.totalNodes\n )\n )\n ),\n _react2.default.createElement(\n \"tr\",\n { className: \"border-bottom\" },\n _react2.default.createElement(\n \"td\",\n null,\n _react2.default.createElement(\n \"p\",\n { className: \"font-18 padding-top-10\" },\n \"Total Usable Memory\"\n )\n ),\n _react2.default.createElement(\n \"td\",\n null,\n _react2.default.createElement(\n \"span\",\n { className: \"float-right color-2b610a\" },\n (0, _utils.formatDataSizeBytes)(this.state.totalMemory)\n )\n )\n ),\n _react2.default.createElement(\n \"tr\",\n { className: \"border-bottom\" },\n _react2.default.createElement(\n \"td\",\n null,\n _react2.default.createElement(\n \"p\",\n { className: \"font-18 padding-top-10\" },\n \"Memory Used\"\n )\n ),\n _react2.default.createElement(\n \"td\",\n null,\n _react2.default.createElement(\n \"span\",\n { className: \"float-right color-2b610a\" },\n (0, _utils.formatDataSizeBytes)(this.state.memoryUsed)\n )\n )\n ),\n _react2.default.createElement(\n \"tr\",\n { className: \"border-bottom\" },\n _react2.default.createElement(\n \"td\",\n null,\n _react2.default.createElement(\n \"p\",\n { className: \"font-18 padding-top-10\" },\n \"Process CPU Load\"\n )\n ),\n _react2.default.createElement(\n \"td\",\n null,\n _react2.default.createElement(\n \"span\",\n { className: \"float-right color-2b610a\" },\n this.state.processCpuLoad\n )\n )\n ),\n _react2.default.createElement(\n \"tr\",\n null,\n _react2.default.createElement(\n \"td\",\n null,\n _react2.default.createElement(\n \"p\",\n { className: \"font-18 padding-top-10\" },\n \"System CPU Load \"\n )\n ),\n _react2.default.createElement(\n \"td\",\n null,\n _react2.default.createElement(\n \"span\",\n { className: \"float-right color-2b610a\" },\n this.state.systemCpuLoad\n )\n )\n )\n )\n )\n )\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"flex flex-row flex-initial footer\" },\n _react2.default.createElement(_Footer2.default, null)\n )\n );\n }\n }]);\n\n return OverviewMain;\n}(_react2.default.Component);\n\nexports.default = OverviewMain;\n\n//# sourceURL=webpack:///./overview/OverviewMain.jsx?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _EchartPart = __webpack_require__(/*! ./EchartPart */ \"./overview/EchartPart.jsx\");\n\nvar _EchartPart2 = _interopRequireDefault(_EchartPart);\n\nvar _Header = __webpack_require__(/*! ../queryeditor/components/Header */ \"./queryeditor/components/Header.jsx\");\n\nvar _Header2 = _interopRequireDefault(_Header);\n\nvar _Footer = __webpack_require__(/*! ../queryeditor/components/Footer */ \"./queryeditor/components/Footer.jsx\");\n\nvar _Footer2 = _interopRequireDefault(_Footer);\n\nvar _OverviewStore = __webpack_require__(/*! ./OverviewStore */ \"./overview/OverviewStore.js\");\n\nvar _OverviewStore2 = _interopRequireDefault(_OverviewStore);\n\nvar _utils = __webpack_require__(/*! ../utils */ \"./utils.js\");\n\nvar _NavigationMenu = __webpack_require__(/*! ../NavigationMenu */ \"./NavigationMenu.jsx\");\n\nvar _NavigationMenu2 = _interopRequireDefault(_NavigationMenu);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar OverviewMain = function (_React$Component) {\n _inherits(OverviewMain, _React$Component);\n\n function OverviewMain(props) {\n _classCallCheck(this, OverviewMain);\n\n var _this = _possibleConstructorReturn(this, (OverviewMain.__proto__ || Object.getPrototypeOf(OverviewMain)).call(this, props));\n\n _this.state = {\n totalNodes: 0,\n totalMemory: 0,\n memoryUsed: 0,\n processCpuLoad: 0,\n systemCpuLoad: 0,\n tableData: []\n };\n _this._onChange = _this._onChange.bind(_this);\n return _this;\n }\n\n _createClass(OverviewMain, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n _OverviewStore2.default.listen(this._onChange);\n }\n }, {\n key: \"_onChange\",\n value: function _onChange(data) {\n var table = [];\n if (data.memoryData) {\n Object.keys(data.memoryData).map(function (key) {\n var obj = {};\n obj.id = key.slice(0, key.indexOf(\" \"));\n obj.ip = key.slice(key.indexOf(\"[\") + 1, key.indexOf(\"]\"));\n obj.count = data.memoryData[key].availableProcessors;\n var totalMemory = data.memoryData[key].totalNodeMemory.slice(0, -1);\n obj.nodeMemory = totalMemory;\n obj.freeMemory = data.memoryData[key].pools.general.freeBytes + (data.memoryData[key].pools.reserved ? data.memoryData[key].pools.reserved.freeBytes : 0);\n table.push(obj);\n });\n }\n this.setState({\n totalNodes: data.memoryData ? Object.keys(data.memoryData).length : '',\n totalMemory: data.lineData.totalMemory,\n memoryUsed: data.lineData.reservedMemory,\n processCpuLoad: (data.lineData.processCpuLoad * 100).toFixed(2) + '%',\n systemCpuLoad: (data.lineData.systemCpuLoad * 100).toFixed(2) + '%',\n tableData: table\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n return _react2.default.createElement(\n \"div\",\n null,\n _react2.default.createElement(\n \"div\",\n { className: \"flex flex-row flex-initial header\" },\n _react2.default.createElement(_Header2.default, null)\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"overview\" },\n _react2.default.createElement(_NavigationMenu2.default, { active: \"metrics\" }),\n _react2.default.createElement(\n \"div\",\n { className: \"line-right\" },\n _react2.default.createElement(\n \"h2\",\n null,\n \"Overview Dashboard\"\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"line-show\" },\n _react2.default.createElement(\n \"div\",\n { className: \"line-part\" },\n _react2.default.createElement(_EchartPart2.default, null)\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"summary-info\" },\n _react2.default.createElement(\n \"div\",\n { className: \"summary-detail\" },\n _react2.default.createElement(\n \"h3\",\n null,\n \"Summary Info\"\n ),\n _react2.default.createElement(\n \"table\",\n { style: { width: \"100%\", marginTop: \"20px\" } },\n _react2.default.createElement(\n \"tbody\",\n null,\n _react2.default.createElement(\n \"tr\",\n { className: \"border-bottom\" },\n _react2.default.createElement(\n \"td\",\n null,\n _react2.default.createElement(\n \"p\",\n { className: \"font-18\" },\n \"Total Nodes \",\n _react2.default.createElement(\n \"a\",\n { href: \"./nodes.html\" },\n \"(view list)\"\n )\n )\n ),\n _react2.default.createElement(\n \"td\",\n null,\n _react2.default.createElement(\n \"span\",\n { className: \"float-right color-2b610a\" },\n this.state.totalNodes\n )\n )\n ),\n _react2.default.createElement(\n \"tr\",\n { className: \"border-bottom\" },\n _react2.default.createElement(\n \"td\",\n null,\n _react2.default.createElement(\n \"p\",\n { className: \"font-18 padding-top-10\" },\n \"Total Usable Memory\"\n )\n ),\n _react2.default.createElement(\n \"td\",\n null,\n _react2.default.createElement(\n \"span\",\n { className: \"float-right color-2b610a\" },\n (0, _utils.formatDataSizeBytes)(this.state.totalMemory)\n )\n )\n ),\n _react2.default.createElement(\n \"tr\",\n { className: \"border-bottom\" },\n _react2.default.createElement(\n \"td\",\n null,\n _react2.default.createElement(\n \"p\",\n { className: \"font-18 padding-top-10\" },\n \"Memory Used\"\n )\n ),\n _react2.default.createElement(\n \"td\",\n null,\n _react2.default.createElement(\n \"span\",\n { className: \"float-right color-2b610a\" },\n (0, _utils.formatDataSizeBytes)(this.state.memoryUsed)\n )\n )\n ),\n _react2.default.createElement(\n \"tr\",\n { className: \"border-bottom\" },\n _react2.default.createElement(\n \"td\",\n null,\n _react2.default.createElement(\n \"p\",\n { className: \"font-18 padding-top-10\" },\n \"Process CPU Load\"\n )\n ),\n _react2.default.createElement(\n \"td\",\n null,\n _react2.default.createElement(\n \"span\",\n { className: \"float-right color-2b610a\" },\n this.state.processCpuLoad\n )\n )\n ),\n _react2.default.createElement(\n \"tr\",\n null,\n _react2.default.createElement(\n \"td\",\n null,\n _react2.default.createElement(\n \"p\",\n { className: \"font-18 padding-top-10\" },\n \"System CPU Load \"\n )\n ),\n _react2.default.createElement(\n \"td\",\n null,\n _react2.default.createElement(\n \"span\",\n { className: \"float-right color-2b610a\" },\n this.state.systemCpuLoad\n )\n )\n )\n )\n )\n )\n )\n )\n )\n ),\n _react2.default.createElement(\n \"div\",\n { className: \"flex flex-row flex-initial footer\" },\n _react2.default.createElement(_Footer2.default, null)\n )\n );\n }\n }]);\n\n return OverviewMain;\n}(_react2.default.Component);\n\nexports.default = OverviewMain;\n\n//# sourceURL=webpack:///./overview/OverviewMain.jsx?"); /***/ }), @@ -26358,7 +26358,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n}); /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _alt = __webpack_require__(/*! ../queryeditor/alt */ \"./queryeditor/alt.js\");\n\nvar _alt2 = _interopRequireDefault(_alt);\n\nvar _OverviewActions = __webpack_require__(/*! ./OverviewActions */ \"./overview/OverviewActions.js\");\n\nvar _OverviewActions2 = _interopRequireDefault(_OverviewActions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar OverviewStore = function () {\n function OverviewStore() {\n _classCallCheck(this, OverviewStore);\n\n this.lineData = null;\n this.memoryData = null;\n this.requestNum = 0;\n this.bindListeners({\n onReceiveData: _OverviewActions2.default.RECEIVE_DATA,\n onMemoryData: _OverviewActions2.default.MEMORY_DATA\n });\n }\n\n _createClass(OverviewStore, [{\n key: 'onReceiveData',\n value: function onReceiveData(data) {\n this.lineData = data;\n this.requestNum++;\n }\n }, {\n key: 'onMemoryData',\n value: function onMemoryData(data) {\n this.memoryData = data;\n this.requestNum++;\n }\n }]);\n\n return OverviewStore;\n}();\n\nexports.default = _alt2.default.createStore(OverviewStore, 'OverviewStore');\n\n//# sourceURL=webpack:///./overview/OverviewStore.js?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar _alt = __webpack_require__(/*! ../queryeditor/alt */ \"./queryeditor/alt.js\");\n\nvar _alt2 = _interopRequireDefault(_alt);\n\nvar _OverviewActions = __webpack_require__(/*! ./OverviewActions */ \"./overview/OverviewActions.js\");\n\nvar _OverviewActions2 = _interopRequireDefault(_OverviewActions);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar OverviewStore = function () {\n function OverviewStore() {\n _classCallCheck(this, OverviewStore);\n\n this.lineData = null;\n this.memoryData = null;\n this.requestNum = 0;\n this.bindListeners({\n onReceiveData: _OverviewActions2.default.RECEIVE_DATA,\n onMemoryData: _OverviewActions2.default.MEMORY_DATA\n });\n }\n\n _createClass(OverviewStore, [{\n key: 'onReceiveData',\n value: function onReceiveData(data) {\n this.lineData = data;\n this.requestNum++;\n }\n }, {\n key: 'onMemoryData',\n value: function onMemoryData(data) {\n this.memoryData = data;\n this.requestNum++;\n }\n }]);\n\n return OverviewStore;\n}();\n\nexports.default = _alt2.default.createStore(OverviewStore, 'OverviewStore');\n\n//# sourceURL=webpack:///./overview/OverviewStore.js?"); /***/ }), @@ -26370,7 +26370,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n}); /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _alt = __webpack_require__(/*! ../alt */ \"./queryeditor/alt.js\");\n\nvar _alt2 = _interopRequireDefault(_alt);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar CnxnMonitorActions = function CnxnMonitorActions() {\n _classCallCheck(this, CnxnMonitorActions);\n\n this.generateActions('submitSuccess', 'submitFailed', 'pollingFailed', 'clear');\n};\n\nexports.default = _alt2.default.createActions(CnxnMonitorActions);\n\n//# sourceURL=webpack:///./queryeditor/actions/CnxnMonitorActions.js?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _alt = __webpack_require__(/*! ../alt */ \"./queryeditor/alt.js\");\n\nvar _alt2 = _interopRequireDefault(_alt);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } } /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar CnxnMonitorActions = function CnxnMonitorActions() {\n _classCallCheck(this, CnxnMonitorActions);\n\n this.generateActions('submitSuccess', 'submitFailed', 'pollingFailed', 'clear');\n};\n\nexports.default = _alt2.default.createActions(CnxnMonitorActions);\n\n//# sourceURL=webpack:///./queryeditor/actions/CnxnMonitorActions.js?"); /***/ }), @@ -26418,7 +26418,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar Footer = function (_React$Component) {\n _inherits(Footer, _React$Component);\n\n function Footer() {\n _classCallCheck(this, Footer);\n\n return _possibleConstructorReturn(this, (Footer.__proto__ || Object.getPrototypeOf(Footer)).apply(this, arguments));\n }\n\n _createClass(Footer, [{\n key: 'componentDidMount',\n value: function componentDidMount() {}\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n { className: 'flex footer' },\n _react2.default.createElement(\n 'div',\n { className: 'flex flex-initial' },\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { href: 'mailto:contact@openlookeng.io' },\n 'contact@openlookeng.io'\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'flex justify-flex-end' },\n _react2.default.createElement(\n 'div',\n { className: 'flex flex-initial' },\n _react2.default.createElement(\n 'p',\n null,\n 'Copyright \\xA9 2020 ',\n _react2.default.createElement(\n 'a',\n { href: \"https://openlookeng.io\", target: '_blank' },\n 'openLooKeng'\n ),\n '. All rights reserved'\n )\n )\n )\n );\n }\n }]);\n\n return Footer;\n}(_react2.default.Component);\n\nexports.default = Footer;\n\n//# sourceURL=webpack:///./queryeditor/components/Footer.jsx?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar Footer = function (_React$Component) {\n _inherits(Footer, _React$Component);\n\n function Footer() {\n _classCallCheck(this, Footer);\n\n return _possibleConstructorReturn(this, (Footer.__proto__ || Object.getPrototypeOf(Footer)).apply(this, arguments));\n }\n\n _createClass(Footer, [{\n key: 'componentDidMount',\n value: function componentDidMount() {}\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'div',\n { className: 'flex footer' },\n _react2.default.createElement(\n 'div',\n { className: 'flex flex-initial' },\n _react2.default.createElement(\n 'p',\n null,\n _react2.default.createElement(\n 'a',\n { href: 'mailto:contact@openlookeng.io' },\n 'contact@openlookeng.io'\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'flex justify-flex-end' },\n _react2.default.createElement(\n 'div',\n { className: 'flex flex-initial' },\n _react2.default.createElement(\n 'p',\n null,\n 'Copyright \\xA9 2020 ',\n _react2.default.createElement(\n 'a',\n { href: \"https://openlookeng.io\", target: '_blank' },\n 'openLooKeng'\n ),\n '. All rights reserved'\n )\n )\n )\n );\n }\n }]);\n\n return Footer;\n}(_react2.default.Component);\n\nexports.default = Footer;\n\n//# sourceURL=webpack:///./queryeditor/components/Footer.jsx?"); /***/ }), @@ -26430,7 +26430,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n}); /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _UserActions = __webpack_require__(/*! ../actions/UserActions */ \"./queryeditor/actions/UserActions.js\");\n\nvar _UserActions2 = _interopRequireDefault(_UserActions);\n\nvar _UserStore = __webpack_require__(/*! ../stores/UserStore */ \"./queryeditor/stores/UserStore.js\");\n\nvar _UserStore2 = _interopRequireDefault(_UserStore);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n// State actions\nfunction getStateFromStore() {\n return {\n user: _UserStore2.default.getCurrentUser()\n };\n}\n\nvar Header = function (_React$Component) {\n _inherits(Header, _React$Component);\n\n function Header(props) {\n _classCallCheck(this, Header);\n\n var _this = _possibleConstructorReturn(this, (Header.__proto__ || Object.getPrototypeOf(Header)).call(this, props));\n\n _this.state = getStateFromStore();\n _this._onChange = _this._onChange.bind(_this);\n return _this;\n }\n\n _createClass(Header, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n _UserStore2.default.listen(this._onChange);\n _UserActions2.default.fetchCurrentUser();\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n _UserStore2.default.unlisten(this._onChange);\n }\n }, {\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n 'header',\n { className: 'flex flex-row' },\n _react2.default.createElement(\n 'div',\n { className: 'flex' },\n _react2.default.createElement(\n 'a',\n { className: \"hetu-header-brand-name\", href: \"/\", style: { fontFamily: \"roboto!important\" } },\n _react2.default.createElement('img', { src: \"assets/lk-logos.svg\", alt: \"openLooKeng logo\", className: \"hetu-header-brand-name\" })\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'flex justify-flex-end menu' },\n _react2.default.createElement(\n 'div',\n { className: 'flex flex-initial' },\n _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement('i', { className: 'glyphicon glyphicon-user' }),\n this.state.user.name\n ),\n this.state.user.secure ? _react2.default.createElement(\n 'div',\n { className: 'logout' },\n _react2.default.createElement(\n 'form',\n { method: 'post', action: '../ui/api/logout' },\n _react2.default.createElement(\n 'button',\n { type: 'submit', className: 'btn btn-sm' },\n _react2.default.createElement('i', { className: 'fa fa-sign-out' }),\n 'Logout'\n )\n )\n ) : null\n )\n )\n );\n }\n\n /* Store events */\n\n }, {\n key: '_onChange',\n value: function _onChange() {\n this.setState(getStateFromStore());\n }\n }]);\n\n return Header;\n}(_react2.default.Component);\n\nexports.default = Header;\n\n//# sourceURL=webpack:///./queryeditor/components/Header.jsx?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _UserActions = __webpack_require__(/*! ../actions/UserActions */ \"./queryeditor/actions/UserActions.js\");\n\nvar _UserActions2 = _interopRequireDefault(_UserActions);\n\nvar _UserStore = __webpack_require__(/*! ../stores/UserStore */ \"./queryeditor/stores/UserStore.js\");\n\nvar _UserStore2 = _interopRequireDefault(_UserStore);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n// State actions\nfunction getStateFromStore() {\n return {\n user: _UserStore2.default.getCurrentUser()\n };\n}\n\nvar Header = function (_React$Component) {\n _inherits(Header, _React$Component);\n\n function Header(props) {\n _classCallCheck(this, Header);\n\n var _this = _possibleConstructorReturn(this, (Header.__proto__ || Object.getPrototypeOf(Header)).call(this, props));\n\n _this.state = {\n user: _UserStore2.default.getCurrentUser(),\n noConnection: false,\n lightShown: false,\n info: null,\n lastSuccess: Date.now(),\n modalShown: false,\n errorText: null\n };\n _this._onChange = _this._onChange.bind(_this);\n return _this;\n }\n\n _createClass(Header, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n _UserStore2.default.listen(this._onChange);\n _UserActions2.default.fetchCurrentUser();\n this.refreshLoop.bind(this)();\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n _UserStore2.default.unlisten(this._onChange);\n }\n }, {\n key: 'refreshLoop',\n value: function refreshLoop() {\n var _this2 = this;\n\n clearTimeout(this.timeoutId);\n fetch(\"../v1/info\").then(function (response) {\n return response.json();\n }).then(function (info) {\n _this2.setState({\n info: info,\n noConnection: false,\n lastSuccess: Date.now(),\n modalShown: false\n });\n _this2.resetTimer();\n }).catch(function (error) {\n _this2.setState({\n noConnection: true,\n lightShown: !_this2.state.lightShown,\n errorText: error\n });\n _this2.resetTimer();\n });\n }\n }, {\n key: 'resetTimer',\n value: function resetTimer() {\n clearTimeout(this.timeoutId);\n this.timeoutId = setTimeout(this.refreshLoop.bind(this), 1000);\n }\n }, {\n key: 'renderStatusLight',\n value: function renderStatusLight() {\n if (this.state.noConnection) {\n if (this.state.lightShown) {\n return _react2.default.createElement('span', { className: 'status-light status-light-red', id: 'status-indicator' });\n } else {\n return _react2.default.createElement('span', { className: 'status-light', id: 'status-indicator' });\n }\n }\n return _react2.default.createElement('span', { className: 'status-light status-light-green', id: 'status-indicator' });\n }\n }, {\n key: 'render',\n value: function render() {\n var info = this.state.info;\n return _react2.default.createElement(\n 'header',\n { className: 'flex flex-row' },\n _react2.default.createElement(\n 'div',\n { className: 'flex' },\n _react2.default.createElement(\n 'a',\n { className: \"hetu-header-brand-name\", href: \"/\", style: { fontFamily: \"roboto!important\" } },\n _react2.default.createElement('img', { src: \"assets/lk-logos.svg\", alt: \"openLooKeng logo\", className: \"hetu-header-brand-name\" })\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'flex justify-flex-end menu' },\n _react2.default.createElement(\n 'div',\n { className: 'flex flex-initial version' },\n _react2.default.createElement(\n 'div',\n { className: 'version-inner' },\n 'Version :',\n _react2.default.createElement(\n 'span',\n { className: 'uppercase' },\n info ? info.nodeVersion.version : 'null'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'version-inner' },\n 'Environment :',\n _react2.default.createElement(\n 'span',\n { className: 'uppercase' },\n info ? info.environment : 'null'\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'version-inner' },\n _react2.default.createElement(\n 'span',\n null,\n 'Uptime'\n ),\n _react2.default.createElement(\n 'span',\n { 'data-toggle': 'tooltip', 'data-placement': 'bottom', title: 'Connection status' },\n this.renderStatusLight()\n ),\n _react2.default.createElement(\n 'span',\n { className: 'uppercase' },\n ': ',\n info ? info.uptime : '0s'\n )\n )\n ),\n _react2.default.createElement(\n 'div',\n { className: 'flex flex-initial' },\n _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement('i', { className: 'glyphicon glyphicon-user' }),\n this.state.user.name\n ),\n this.state.user.secure ? _react2.default.createElement(\n 'div',\n { className: 'logout' },\n _react2.default.createElement(\n 'form',\n { method: 'post', action: '../ui/api/logout' },\n _react2.default.createElement(\n 'button',\n { type: 'submit', className: 'btn btn-sm' },\n _react2.default.createElement('i', { className: 'fa fa-sign-out' }),\n 'Logout'\n )\n )\n ) : null\n )\n )\n );\n }\n\n /* Store events */\n\n }, {\n key: '_onChange',\n value: function _onChange() {\n this.setState(getStateFromStore());\n }\n }]);\n\n return Header;\n}(_react2.default.Component);\n\nexports.default = Header;\n\n//# sourceURL=webpack:///./queryeditor/components/Header.jsx?"); /***/ }), @@ -26514,7 +26514,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar getStatusText = exports.getStatusText = function getStatusText(response) {\n if (response.statusText != \"\") {\n return response.statusText;\n }\n switch (response.status) {\n case 200:\n {\n return \"OK\";\n }\n case 201:\n {\n return \"Created\";\n }\n case 202:\n {\n return \"Accepted\";\n }\n case 204:\n {\n return \"No Content\";\n }\n case 205:\n {\n return \"Reset Content\";\n }\n case 206:\n {\n return \"Partial Content\";\n }\n case 301:\n {\n return \"Moved Permanently\";\n }\n case 302:\n {\n return \"Found\";\n }\n case 303:\n {\n return \"See Other\";\n }\n case 304:\n {\n return \"Not Modified\";\n }\n case 305:\n {\n return \"Use Proxy\";\n }\n case 307:\n {\n return \"Temporary Redirect\";\n }\n case 400:\n {\n return \"Bad Request\";\n }\n case 401:\n {\n return \"Unauthorized\";\n }\n case 402:\n {\n return \"Payment Required\";\n }\n case 403:\n {\n return \"Forbidden\";\n }\n case 404:\n {\n return \"Not Found\";\n }\n case 405:\n {\n return \"Method Not Allowed\";\n }\n case 406:\n {\n return \"Not Acceptable\";\n }\n case 407:\n {\n return \"Proxy Authentication Required\";\n }\n case 408:\n {\n return \"Request Timeout\";\n }\n case 409:\n {\n return \"Conflict\";\n }\n case 410:\n {\n return \"Gone\";\n }\n case 411:\n {\n return \"Length Required\";\n }\n case 412:\n {\n return \"Precondition Failed\";\n }\n case 413:\n {\n return \"Request Entity Too Large\";\n }\n case 414:\n {\n return \"Request-URI Too Long\";\n }\n case 415:\n {\n return \"Unsupported Media Type\";\n }\n case 416:\n {\n return \"Requested Range Not Satisfiable\";\n }\n case 417:\n {\n return \"Expectation Failed\";\n }\n case 428:\n {\n return \"Precondition Required\";\n }\n case 429:\n {\n return \"Too Many Requests\";\n }\n case 431:\n {\n return \"Request Header Fields Too Large\";\n }\n case 500:\n {\n return \"Internal Server Error\";\n }\n case 501:\n {\n return \"Not Implemented\";\n }\n case 502:\n {\n return \"Bad Gateway\";\n }\n case 503:\n {\n return \"Service Unavailable\";\n }\n case 504:\n {\n return \"Gateway Timeout\";\n }\n case 505:\n {\n return \"HTTP Version Not Supported\";\n }\n case 511:\n {\n return \"Network Authentication Required\";\n }\n }\n};\n\n//# sourceURL=webpack:///./queryeditor/utils/xhrutil.js?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/*\n * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar getStatusText = exports.getStatusText = function getStatusText(response) {\n if (response.statusText != \"\") {\n return response.statusText;\n }\n switch (response.status) {\n case 200:\n {\n return \"OK\";\n }\n case 201:\n {\n return \"Created\";\n }\n case 202:\n {\n return \"Accepted\";\n }\n case 204:\n {\n return \"No Content\";\n }\n case 205:\n {\n return \"Reset Content\";\n }\n case 206:\n {\n return \"Partial Content\";\n }\n case 301:\n {\n return \"Moved Permanently\";\n }\n case 302:\n {\n return \"Found\";\n }\n case 303:\n {\n return \"See Other\";\n }\n case 304:\n {\n return \"Not Modified\";\n }\n case 305:\n {\n return \"Use Proxy\";\n }\n case 307:\n {\n return \"Temporary Redirect\";\n }\n case 400:\n {\n return \"Bad Request\";\n }\n case 401:\n {\n return \"Unauthorized\";\n }\n case 402:\n {\n return \"Payment Required\";\n }\n case 403:\n {\n return \"Forbidden\";\n }\n case 404:\n {\n return \"Not Found\";\n }\n case 405:\n {\n return \"Method Not Allowed\";\n }\n case 406:\n {\n return \"Not Acceptable\";\n }\n case 407:\n {\n return \"Proxy Authentication Required\";\n }\n case 408:\n {\n return \"Request Timeout\";\n }\n case 409:\n {\n return \"Conflict\";\n }\n case 410:\n {\n return \"Gone\";\n }\n case 411:\n {\n return \"Length Required\";\n }\n case 412:\n {\n return \"Precondition Failed\";\n }\n case 413:\n {\n return \"Request Entity Too Large\";\n }\n case 414:\n {\n return \"Request-URI Too Long\";\n }\n case 415:\n {\n return \"Unsupported Media Type\";\n }\n case 416:\n {\n return \"Requested Range Not Satisfiable\";\n }\n case 417:\n {\n return \"Expectation Failed\";\n }\n case 428:\n {\n return \"Precondition Required\";\n }\n case 429:\n {\n return \"Too Many Requests\";\n }\n case 431:\n {\n return \"Request Header Fields Too Large\";\n }\n case 500:\n {\n return \"Internal Server Error\";\n }\n case 501:\n {\n return \"Not Implemented\";\n }\n case 502:\n {\n return \"Bad Gateway\";\n }\n case 503:\n {\n return \"Service Unavailable\";\n }\n case 504:\n {\n return \"Gateway Timeout\";\n }\n case 505:\n {\n return \"HTTP Version Not Supported\";\n }\n case 511:\n {\n return \"Network Authentication Required\";\n }\n }\n};\n\n//# sourceURL=webpack:///./queryeditor/utils/xhrutil.js?"); /***/ }), diff --git a/presto-main/src/main/resources/webapp/nodes.html b/presto-main/src/main/resources/webapp/nodes.html index 8e2acd05b..c30111880 100644 --- a/presto-main/src/main/resources/webapp/nodes.html +++ b/presto-main/src/main/resources/webapp/nodes.html @@ -1,3 +1,17 @@ + diff --git a/presto-main/src/main/resources/webapp/src/HeaderFooter.jsx b/presto-main/src/main/resources/webapp/src/HeaderFooter.jsx index 27ade192f..ebabfa1f9 100644 --- a/presto-main/src/main/resources/webapp/src/HeaderFooter.jsx +++ b/presto-main/src/main/resources/webapp/src/HeaderFooter.jsx @@ -1,3 +1,17 @@ +/* + * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ import React from "react"; import ReactDOM from "react-dom"; import Header from "./queryeditor/components/Header"; diff --git a/presto-main/src/main/resources/webapp/src/NavigationMenu.jsx b/presto-main/src/main/resources/webapp/src/NavigationMenu.jsx index 13b4daed1..548c98d5e 100644 --- a/presto-main/src/main/resources/webapp/src/NavigationMenu.jsx +++ b/presto-main/src/main/resources/webapp/src/NavigationMenu.jsx @@ -1,4 +1,5 @@ /* + * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/presto-main/src/main/resources/webapp/src/addcatalog.jsx b/presto-main/src/main/resources/webapp/src/addcatalog.jsx index b4850618b..e5bd4f567 100644 --- a/presto-main/src/main/resources/webapp/src/addcatalog.jsx +++ b/presto-main/src/main/resources/webapp/src/addcatalog.jsx @@ -1,4 +1,5 @@ /* + * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/presto-main/src/main/resources/webapp/src/nodes.jsx b/presto-main/src/main/resources/webapp/src/nodes.jsx index 9621d8450..36c60069b 100644 --- a/presto-main/src/main/resources/webapp/src/nodes.jsx +++ b/presto-main/src/main/resources/webapp/src/nodes.jsx @@ -1,3 +1,17 @@ +/* + * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ import React from "react"; import ReactDom from "react-dom"; import NodesMain from "./overview/NodesMain"; diff --git a/presto-main/src/main/resources/webapp/src/overview/EchartPart.jsx b/presto-main/src/main/resources/webapp/src/overview/EchartPart.jsx index f56402bec..a46a8b2e0 100644 --- a/presto-main/src/main/resources/webapp/src/overview/EchartPart.jsx +++ b/presto-main/src/main/resources/webapp/src/overview/EchartPart.jsx @@ -1,3 +1,17 @@ +/* + * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ import React from "react"; import echarts from 'echarts/lib/echarts'; import "echarts/lib/chart/line"; diff --git a/presto-main/src/main/resources/webapp/src/overview/NodesMain.jsx b/presto-main/src/main/resources/webapp/src/overview/NodesMain.jsx index 51bd7e8b5..a81185ecc 100644 --- a/presto-main/src/main/resources/webapp/src/overview/NodesMain.jsx +++ b/presto-main/src/main/resources/webapp/src/overview/NodesMain.jsx @@ -55,6 +55,7 @@ class NodesMain extends React.Component { let obj = {}; obj.id = key.slice(0, key.indexOf(" ")); obj.ip = key.slice(key.indexOf("[") + 1, key.indexOf("]")) + obj.role = key.slice(key.indexOf("]") + 2) == 'true' ? 'Coordinator' : 'Worker' obj.count = data.memoryData[key].availableProcessors; let totalMemory = data.memoryData[key].totalNodeMemory.slice(0, -1); obj.nodeMemory = totalMemory; @@ -85,6 +86,7 @@ class NodesMain extends React.Component { ID IP + Role CPU Count Usable Node Memory Used Memory @@ -96,6 +98,7 @@ class NodesMain extends React.Component { {ele.id} {ele.ip} + {ele.role} {ele.count} {formatDataSizeBytes(ele.nodeMemory)} {formatDataSizeBytes(ele.usedMemory)} diff --git a/presto-main/src/main/resources/webapp/src/overview/OverviewActions.js b/presto-main/src/main/resources/webapp/src/overview/OverviewActions.js index 8fabf289a..ef2ce8b45 100644 --- a/presto-main/src/main/resources/webapp/src/overview/OverviewActions.js +++ b/presto-main/src/main/resources/webapp/src/overview/OverviewActions.js @@ -1,3 +1,17 @@ +/* + * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ import alt from "../queryeditor/alt"; import OverviewApiUtils from "./OverviewApiUtils"; class OverviewActions { diff --git a/presto-main/src/main/resources/webapp/src/overview/OverviewApiUtils.js b/presto-main/src/main/resources/webapp/src/overview/OverviewApiUtils.js index e91346ba8..1ca669587 100644 --- a/presto-main/src/main/resources/webapp/src/overview/OverviewApiUtils.js +++ b/presto-main/src/main/resources/webapp/src/overview/OverviewApiUtils.js @@ -1,3 +1,17 @@ +/* + * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ import xhr from "../queryeditor/utils/xhr"; export default { getLineData(){ diff --git a/presto-main/src/main/resources/webapp/src/overview/OverviewStore.js b/presto-main/src/main/resources/webapp/src/overview/OverviewStore.js index 2fda5cf94..3fe744c9a 100644 --- a/presto-main/src/main/resources/webapp/src/overview/OverviewStore.js +++ b/presto-main/src/main/resources/webapp/src/overview/OverviewStore.js @@ -1,3 +1,17 @@ +/* + * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ import alt from '../queryeditor/alt'; import OverviewActions from './OverviewActions'; class OverviewStore { diff --git a/presto-main/src/main/resources/webapp/src/queryeditor/actions/CatalogActions.js b/presto-main/src/main/resources/webapp/src/queryeditor/actions/CatalogActions.js index 6079724fd..f76784761 100644 --- a/presto-main/src/main/resources/webapp/src/queryeditor/actions/CatalogActions.js +++ b/presto-main/src/main/resources/webapp/src/queryeditor/actions/CatalogActions.js @@ -1,4 +1,5 @@ /* + * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/presto-main/src/main/resources/webapp/src/queryeditor/actions/CnxnMonitorActions.js b/presto-main/src/main/resources/webapp/src/queryeditor/actions/CnxnMonitorActions.js index 34260cdc8..e94eef4bc 100644 --- a/presto-main/src/main/resources/webapp/src/queryeditor/actions/CnxnMonitorActions.js +++ b/presto-main/src/main/resources/webapp/src/queryeditor/actions/CnxnMonitorActions.js @@ -1,4 +1,5 @@ /* + * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/presto-main/src/main/resources/webapp/src/queryeditor/actions/ConnectorActions.js b/presto-main/src/main/resources/webapp/src/queryeditor/actions/ConnectorActions.js index fca030c5b..8e3ed364d 100644 --- a/presto-main/src/main/resources/webapp/src/queryeditor/actions/ConnectorActions.js +++ b/presto-main/src/main/resources/webapp/src/queryeditor/actions/ConnectorActions.js @@ -1,4 +1,5 @@ /* + * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/presto-main/src/main/resources/webapp/src/queryeditor/actions/SchemaActions.js b/presto-main/src/main/resources/webapp/src/queryeditor/actions/SchemaActions.js index f0a280f54..2f64e8782 100644 --- a/presto-main/src/main/resources/webapp/src/queryeditor/actions/SchemaActions.js +++ b/presto-main/src/main/resources/webapp/src/queryeditor/actions/SchemaActions.js @@ -1,4 +1,5 @@ /* + * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/presto-main/src/main/resources/webapp/src/queryeditor/components/AddCatalog.jsx b/presto-main/src/main/resources/webapp/src/queryeditor/components/AddCatalog.jsx index ed7a80a5e..82c4fc75b 100644 --- a/presto-main/src/main/resources/webapp/src/queryeditor/components/AddCatalog.jsx +++ b/presto-main/src/main/resources/webapp/src/queryeditor/components/AddCatalog.jsx @@ -1,4 +1,5 @@ /* + * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/presto-main/src/main/resources/webapp/src/queryeditor/components/Footer.jsx b/presto-main/src/main/resources/webapp/src/queryeditor/components/Footer.jsx index c61dd87e4..42990a4e7 100644 --- a/presto-main/src/main/resources/webapp/src/queryeditor/components/Footer.jsx +++ b/presto-main/src/main/resources/webapp/src/queryeditor/components/Footer.jsx @@ -1,4 +1,5 @@ /* + * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/presto-main/src/main/resources/webapp/src/queryeditor/components/ModalDialog.jsx b/presto-main/src/main/resources/webapp/src/queryeditor/components/ModalDialog.jsx index 18c094c59..c16103a0c 100644 --- a/presto-main/src/main/resources/webapp/src/queryeditor/components/ModalDialog.jsx +++ b/presto-main/src/main/resources/webapp/src/queryeditor/components/ModalDialog.jsx @@ -1,4 +1,5 @@ /* + * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/presto-main/src/main/resources/webapp/src/queryeditor/components/SchemaTree.jsx b/presto-main/src/main/resources/webapp/src/queryeditor/components/SchemaTree.jsx index bb623d72d..e9f46cf18 100644 --- a/presto-main/src/main/resources/webapp/src/queryeditor/components/SchemaTree.jsx +++ b/presto-main/src/main/resources/webapp/src/queryeditor/components/SchemaTree.jsx @@ -1,4 +1,5 @@ /* + * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/presto-main/src/main/resources/webapp/src/queryeditor/components/StatusFooter.jsx b/presto-main/src/main/resources/webapp/src/queryeditor/components/StatusFooter.jsx index 3bb5630e5..25d6ee3c2 100644 --- a/presto-main/src/main/resources/webapp/src/queryeditor/components/StatusFooter.jsx +++ b/presto-main/src/main/resources/webapp/src/queryeditor/components/StatusFooter.jsx @@ -1,4 +1,5 @@ /* + * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/presto-main/src/main/resources/webapp/src/queryeditor/stores/CnxnMonitorStore.js b/presto-main/src/main/resources/webapp/src/queryeditor/stores/CnxnMonitorStore.js index ccedf1cea..f0780e3c2 100644 --- a/presto-main/src/main/resources/webapp/src/queryeditor/stores/CnxnMonitorStore.js +++ b/presto-main/src/main/resources/webapp/src/queryeditor/stores/CnxnMonitorStore.js @@ -1,4 +1,5 @@ /* + * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/presto-main/src/main/resources/webapp/src/queryeditor/stores/ConnectorStore.js b/presto-main/src/main/resources/webapp/src/queryeditor/stores/ConnectorStore.js index 3b2f4b955..b9edd1598 100644 --- a/presto-main/src/main/resources/webapp/src/queryeditor/stores/ConnectorStore.js +++ b/presto-main/src/main/resources/webapp/src/queryeditor/stores/ConnectorStore.js @@ -1,4 +1,5 @@ /* + * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/presto-main/src/main/resources/webapp/src/queryeditor/stores/SchemaStore.js b/presto-main/src/main/resources/webapp/src/queryeditor/stores/SchemaStore.js index c752fe662..47a27e91d 100644 --- a/presto-main/src/main/resources/webapp/src/queryeditor/stores/SchemaStore.js +++ b/presto-main/src/main/resources/webapp/src/queryeditor/stores/SchemaStore.js @@ -1,4 +1,5 @@ /* + * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/presto-main/src/main/resources/webapp/src/queryeditor/stores/TableStore.js b/presto-main/src/main/resources/webapp/src/queryeditor/stores/TableStore.js index 8299755c7..bd60f102b 100644 --- a/presto-main/src/main/resources/webapp/src/queryeditor/stores/TableStore.js +++ b/presto-main/src/main/resources/webapp/src/queryeditor/stores/TableStore.js @@ -114,10 +114,6 @@ class TableStore { } onAddTable(table) { - if (this.getByName(table.name) !== undefined) { - return; - } - // Unmark the whole collection this.unmarkActiveTables(); diff --git a/presto-main/src/main/resources/webapp/src/queryeditor/utils/CatalogApiUtils.js b/presto-main/src/main/resources/webapp/src/queryeditor/utils/CatalogApiUtils.js index 40ca3ec50..e35e353ee 100644 --- a/presto-main/src/main/resources/webapp/src/queryeditor/utils/CatalogApiUtils.js +++ b/presto-main/src/main/resources/webapp/src/queryeditor/utils/CatalogApiUtils.js @@ -1,4 +1,5 @@ /* + * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/presto-main/src/main/resources/webapp/src/queryeditor/utils/ConnectorApiUtils.js b/presto-main/src/main/resources/webapp/src/queryeditor/utils/ConnectorApiUtils.js index 43f36abec..7be9c5a5e 100644 --- a/presto-main/src/main/resources/webapp/src/queryeditor/utils/ConnectorApiUtils.js +++ b/presto-main/src/main/resources/webapp/src/queryeditor/utils/ConnectorApiUtils.js @@ -1,4 +1,5 @@ /* + * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/presto-main/src/main/resources/webapp/src/queryeditor/utils/xhrform.js b/presto-main/src/main/resources/webapp/src/queryeditor/utils/xhrform.js index 1380c8ffa..da185e4d7 100644 --- a/presto-main/src/main/resources/webapp/src/queryeditor/utils/xhrform.js +++ b/presto-main/src/main/resources/webapp/src/queryeditor/utils/xhrform.js @@ -1,4 +1,5 @@ /* + * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/presto-main/src/main/resources/webapp/src/queryeditor/utils/xhrutil.js b/presto-main/src/main/resources/webapp/src/queryeditor/utils/xhrutil.js index 5560cf6a8..24b53f9d1 100644 --- a/presto-main/src/main/resources/webapp/src/queryeditor/utils/xhrutil.js +++ b/presto-main/src/main/resources/webapp/src/queryeditor/utils/xhrutil.js @@ -1,4 +1,5 @@ /* + * Copyright (C) 2018-2020. Huawei Technologies Co., Ltd. All rights reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at