Skip to content

Commit

Permalink
Cluster Manager UI & Query Console UI revamp (#5684)
Browse files Browse the repository at this point in the history
* Cluster Manager & Query Console UI revamp

* removed testQuery since we no longer have a static query page to test with

* fixed sql editor cursor issue & added licenses of all dependencies & dev-dependencies

* fixed showing both dimensionFieldSpecs & metricFieldSpecs in column list

* adding dateTimeFieldSpecs to show in column list

* Adding table details page and fixed breadcrumb to be dynamic

* added missing apache license in newly added file

* hiding cluster manager from UI and fixing typo
  • Loading branch information
shahsank3t authored Jul 17, 2020
1 parent ff7af4a commit ffbc8c3
Show file tree
Hide file tree
Showing 139 changed files with 2,995 additions and 57,810 deletions.
71 changes: 60 additions & 11 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -208,18 +208,67 @@ of these licenses.

MIT License
-----------
pinot-controller/src/main/resources/*/js/lib/codemirror/*
pinot-controller/src/main/resources/*/js/lib/foundation/*
pinot-controller/src/main/resources/*/js/lib/angular*
pinot-controller/src/main/resources/*/js/lib/underscore*
pinot-controller/src/main/resources/*/js/lib/jquery-2.1.3.min.js
pinot-controller/src/main/resources/*/js/lib/beautify.js
pinot-controller/src/main/resources/*/js/lib/handlebars.js
pinot-controller/src/main/resources/*/css/lib/codemirror*
pinot-controller/src/main/resources/*/css/lib/foundation*
pinot-controller/src/main/resources/*/css/lib/normalize.css
@fortawesome/free-solid-svg-icons (https://github.com/FortAwesome/Font-Awesome)
@fortawesome/fontawesome-svg-core (https://github.com/FortAwesome/Font-Awesome)
@fortawesome/react-fontawesome (https://github.com/FortAwesome/react-fontawesome)
@material-ui/core (https://github.com/mui-org/material-ui)
@material-ui/icons (https://github.com/mui-org/material-ui)
@material-ui/lab (https://github.com/mui-org/material-ui)
@types/react (https://github.com/DefinitelyTyped/DefinitelyTyped)
@types/react-dom (https://github.com/DefinitelyTyped/DefinitelyTyped)
@types/react-router-dom (https://github.com/DefinitelyTyped/DefinitelyTyped)
@typescript-eslint/eslint-plugin (https://github.com/typescript-eslint/typescript-eslint)
axios (https://github.com/axios/axios)
clean-webpack-plugin (https://github.com/johnagan/clean-webpack-plugin)
codemirror (https://github.com/codemirror/CodeMirror)
cross-fetch (https://github.com/lquixada/cross-fetch)
css-loader (https://github.com/webpack-contrib/css-loader)
eslint (https://github.com/eslint/eslint)
eslint-config-airbnb (https://github.com/airbnb/javascript)
eslint-config-airbnb-typescript (https://github.com/iamturns/eslint-config-airbnb-typescript)
eslint-config-prettier (https://github.com/prettier/eslint-config-prettier)
eslint-config-react-app (https://github.com/facebook/create-react-app)
eslint-loader (https://github.com/webpack-contrib/eslint-loader)
eslint-plugin-import (https://github.com/benmosher/eslint-plugin-import)
eslint-plugin-jsx-a11y (https://github.com/evcohen/eslint-plugin-jsx-a11y)
eslint-plugin-prettier (https://github.com/prettier/eslint-plugin-prettier)
eslint-plugin-react (https://github.com/yannickcr/eslint-plugin-react)
eslint-plugin-react-hooks (https://github.com/facebook/react)
export-from-json (https://github.com/zheeeng/export-from-json)
file-loader (https://github.com/webpack-contrib/file-loader)
html-loader (https://github.com/webpack-contrib/html-loader)
html-webpack-plugin (https://github.com/jantimon/html-webpack-plugin)
lodash (https://github.com/lodash/lodash)
npm-run-all (https://github.com/mysticatea/npm-run-all)
prettier (https://github.com/prettier/prettier)
prettier-eslint (https://github.com/prettier/prettier-eslint)
prettier-eslint-cli (https://github.com/prettier/prettier-eslint-cli)
prop-types (https://github.com/facebook/prop-types)
react (https://github.com/facebook/react)
react-codemirror2 (https://github.com/scniro/react-codemirror2)
react-dom (https://github.com/facebook/react)
react-router-dom (https://github.com/ReactTraining/react-router)
source-map-loader (https://github.com/webpack-contrib/source-map-loader)
style-loader (https://github.com/webpack-contrib/style-loader)
ts-loader (https://github.com/TypeStrong/ts-loader)
url-loader (https://github.com/webpack-contrib/url-loader)
webpack (https://github.com/webpack/webpack)
webpack-cli (https://github.com/webpack/webpack-cli)
webpack-dev-server (https://github.com/webpack/webpack-dev-server)

BSD 3-Clause
------------
pinot-controller/src/main/resources/*/js/lib/jquery.dataTables.min.js
eslint-plugin-flowtype (https://github.com/gajus/eslint-plugin-flowtype)

BSD 2-Clause
------------
@typescript-eslint/parser (https://github.com/typescript-eslint/typescript-eslint)

Apache-2.0
------------
typescript (https://github.com/Microsoft/TypeScript)

ISC
------------
eslint-import-resolver-typescript (https://github.com/alexgorbatchev/eslint-import-resolver-typescript)

2 changes: 1 addition & 1 deletion docker/images/pinot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,4 @@ Below is the script to ingest airplane stats data to Kafka
docker run --network=pinot_default apachepinot/pinot:0.3.0-SNAPSHOT StreamAvroIntoKafka -avroFile examples/stream/airlineStats/sample_data/airlineStats_data.avro -kafkaTopic flights-realtime -kafkaBrokerList kafka:9092 -zkAddress zookeeper:2181
```

In order to query pinot, try to open `localhost:9000/query` from your browser.
In order to query pinot, try to open `localhost:9000` from your browser.
2 changes: 1 addition & 1 deletion docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Trying out Batch quickstart demo
To run the demo with compiled code:
``bin/quick-start-batch.sh``

Once the Pinot cluster is running, you can query it by going to http://localhost:9000/query/
Once the Pinot cluster is running, you can query it by going to http://localhost:9000

You can also use the REST API to query Pinot, as well as the Java client. As this is outside of the scope of this
introduction, the reference documentation to use the Pinot client APIs is in the :doc:`client_api` section.
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/helm/pinot/query-pinot-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if [[ $(nc -z localhost 9000) != 0 ]]; then
kubectl port-forward service/pinot-controller 9000:9000 -n pinot-quickstart > /dev/null &
fi
sleep 2
open http://localhost:9000/query
open http://localhost:9000
# Just for blocking
tail -f /dev/null
pkill -f "kubectl port-forward service/pinot-controller 9000:9000 -n pinot-quickstart"
2 changes: 1 addition & 1 deletion kubernetes/skaffold/gke/query-pinot-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if [[ $(nc -z localhost 9000) != 0 ]]; then
kubectl port-forward service/pinot-controller 9000:9000 -n pinot-quickstart > /dev/null &
fi
sleep 2
open http://localhost:9000/query
open http://localhost:9000
# Just for blocking
tail -f /dev/null
pkill -f "kubectl port-forward service/pinot-controller 9000:9000 -n pinot-quickstart"
54 changes: 54 additions & 0 deletions pinot-controller/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,11 @@
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/resources/dist</directory>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
Expand All @@ -215,6 +220,55 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
</plugin>

<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.1</version>

<!-- optional -->
<configuration>
<workingDirectory>src/main/resources/</workingDirectory>
<installDirectory>target</installDirectory>
</configuration>

<executions>
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<configuration>
<nodeVersion>v10.16.1</nodeVersion>
<npmVersion>6.10.0</npmVersion>
</configuration>
</execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<arguments>install</arguments>
</configuration>
</execution>
<execution>
<id>npm run-script build</id>
<goals>
<goal>npm</goal>
</goals>
<!-- optional: the default phase is "generate-resources" -->
<phase>generate-resources</phase>
<configuration>
<!-- optional: if not specified, it will run gulp's default task
(and you can remove this whole <configuration> section.) -->
<arguments>run-script build</arguments>
<!--arguments>build</arguments-->
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,8 @@ public void start(List<ListenerConfig> listenerConfigs, boolean advertiseHttps)
// So, we setup specific handlers for static resource directory. index.html is served directly
// by a jersey handler

_httpServer.getServerConfiguration()
.addHttpHandler(new CLStaticHttpHandler(classLoader, "/static/query/"), "/query/");
_httpServer.getServerConfiguration().addHttpHandler(new CLStaticHttpHandler(classLoader, "/static/css/"), "/css/");
_httpServer.getServerConfiguration().addHttpHandler(new CLStaticHttpHandler(classLoader, "/static/js/"), "/js/");
// without this explicit request to /index.html will not work
_httpServer.getServerConfiguration().addHttpHandler(new CLStaticHttpHandler(classLoader, "/static/"), "/index.html");
_httpServer.getServerConfiguration().addHttpHandler(new CLStaticHttpHandler(classLoader, "/webapp/"), "/index.html");
_httpServer.getServerConfiguration().addHttpHandler(new CLStaticHttpHandler(classLoader, "/webapp/js/"), "/js/");

LOGGER.info("Admin API started on ports: {}", listenerConfigs.stream().map(ListenerConfig::getPort)
.map(port -> port.toString()).collect(Collectors.joining(",")));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
public class LandingPageHandler {
private static final Logger LOGGER = LoggerFactory.getLogger(LandingPageHandler.class);

// We configure this static resource as jersey handler because all our APIs are at "/"
// We configure this webapp resource as jersey handler because all our APIs are at "/"
// So, the framework does not serve base index.html page correctly. See ControllerAdminApiApplication
// for more details.
@GET
@Produces(MediaType.TEXT_HTML)
public InputStream getIndexPage() {
return getClass().getClassLoader().getResourceAsStream("static/index.html");
return getClass().getClassLoader().getResourceAsStream("webapp/index.html");
}
}
12 changes: 12 additions & 0 deletions pinot-controller/src/main/resources/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"presets": [
"@babel/preset-env",
"@babel/preset-typescript",
"@babel/preset-react"
],
"plugins": [
"@babel/proposal-class-properties",
"@babel/proposal-object-rest-spread",
"transform-es2015-modules-commonjs"
]
}
71 changes: 71 additions & 0 deletions pinot-controller/src/main/resources/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"plugins": ["prettier", "@typescript-eslint"],
"extends": ["airbnb-typescript", "react-app", "prettier"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
},
"settings": {
"import/resolver": {
"typescript": {
"alwaysTryTypes": true
}
}
},
"rules": {
"object-curly-spacing": ["warn", "always"],
"no-unused-vars": [
"warn",
{
"vars": "all",
"args": "none"
}
],
"@typescript-eslint/no-unused-vars": [
"warn",
{
"vars": "all",
"args": "none"
}
],
"max-len": [
"warn",
{
"code": 120,
"ignoreStrings": true,
"ignoreTemplateLiterals": true,
"ignoreComments": true
}
],
"no-plusplus": [
"error",
{
"allowForLoopAfterthoughts": true
}
],
"func-names": "off",
"no-param-reassign": "off",
"react/no-array-index-key": "off",
"react/jsx-key": "error",
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": [
"**/*.test.js",
"**/*.test.jsx",
"**/*.test.ts",
"**/*.test.tsx",
"src/tests/**/*"
]
}
],
"react/jsx-props-no-spreading": "off",
"import/prefer-default-export": "off",
"react/jsx-boolean-value": "off",
"react/prop-types": "off",
"react/no-unescaped-entities": "off",
"react/jsx-one-expression-per-line": "off",
"react/jsx-wrap-multilines": "off",
"react/destructuring-assignment": "off"
}
}
2 changes: 2 additions & 0 deletions pinot-controller/src/main/resources/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
6 changes: 6 additions & 0 deletions pinot-controller/src/main/resources/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"printWidth": 80,
"singleQuote": true,
"trailingComma": "es5",
"tabWidth": 2
}
53 changes: 53 additions & 0 deletions pinot-controller/src/main/resources/app/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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 * as React from 'react';
import * as ReactDOM from 'react-dom';
import { MuiThemeProvider } from '@material-ui/core';
import { Switch, Route, HashRouter as Router } from 'react-router-dom';
import theme from './theme';
import Layout from './components/Layout';
import RouterData from './router';

const App = () => (
<MuiThemeProvider theme={theme}>
<Router>
<Switch>
{RouterData.map(({ path, Component }, key) => (
<Route
exact
path={path}
key={key}
render={props => {
return (
<div className="p-8">
<Layout {...props}>
<Component {...props} />
</Layout>
</div>
);
}}
/>
))}
</Switch>
</Router>
</MuiThemeProvider>
);

ReactDOM.render(<App />, document.getElementById('app'));
Loading

0 comments on commit ffbc8c3

Please sign in to comment.