From a4973c697684b38f8a5ab4cedef6ebcd67e7c6d0 Mon Sep 17 00:00:00 2001 From: yangjing99 <1320695795@qq.com> Date: Mon, 21 Dec 2020 17:45:24 +0800 Subject: [PATCH] !481 Capitalize the first latter of each word on the home page * modify the word of the home page --- presto-main/src/main/resources/webapp/dist/hetuqueryeditor.js | 2 +- .../webapp/src/queryeditor/components/QueryInformation.jsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/presto-main/src/main/resources/webapp/dist/hetuqueryeditor.js b/presto-main/src/main/resources/webapp/dist/hetuqueryeditor.js index d6589610f..15c87ae70 100644 --- a/presto-main/src/main/resources/webapp/dist/hetuqueryeditor.js +++ b/presto-main/src/main/resources/webapp/dist/hetuqueryeditor.js @@ -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 '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?"); +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?"); /***/ }), diff --git a/presto-main/src/main/resources/webapp/src/queryeditor/components/QueryInformation.jsx b/presto-main/src/main/resources/webapp/src/queryeditor/components/QueryInformation.jsx index 5776d4209..6922b269b 100644 --- a/presto-main/src/main/resources/webapp/src/queryeditor/components/QueryInformation.jsx +++ b/presto-main/src/main/resources/webapp/src/queryeditor/components/QueryInformation.jsx @@ -110,8 +110,8 @@ class QueryInformation