pan3793 commented on code in PR #2840:
URL: https://github.com/apache/incubator-kyuubi/pull/2840#discussion_r898778818


##########
kyuubi-server/web-ui/README.md:
##########
@@ -0,0 +1,95 @@
+<!--
+ - 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.
+ -->
+
+# Apache Kyuubi(incubating) Web UI
+
+The web ui listens at `http://localhost:10009`.
+
+The web ui is work in progress. Kyuubi server starts an HTTP server (by 
default at port 10009)
+that serves the new web pages and additional background requests.
+
+## Server Backend
+
+The server side of the ui is implemented using 
[Jetty](https://www.eclipse.org/jetty/) 
+for REST paths.
+The framework has very lightweight dependencies.
+
+## UI Frontend 
+
+The web ui is implemented using *Angular*. The ui build infrastructure uses 
*node.js*.
+
+### Preparing the Build Environment
+
+Depending on your version of Linux, Windows or MacOS, you may need to manually 
install *node.js*
+
+#### Ubuntu Linux
+
+Install *node.js* by following [these 
instructions](https://nodejs.org/en/download/).
+
+Verify that the installed version is at least *10.9.0*, via `node --version`.
+
+#### MacOS
+
+First install *brew* by following [these instructions](http://brew.sh/).
+
+Install *node.js* via:
+
+```
+brew install node
+```
+
+### Building
+
+The build process downloads all requires libraries via the *node.js* package 
management tool (*npm*)
+The final build tool is *@angular/cli*.
+
+```
+cd kyuubi-server/web-ui
+npm install
+npm run build
+```
+
+The ui code is under `/src`. The result of the build process is under `/web`.
+
+### Developing
+
+When developing the ui, every change needs to recompile the files and update 
the server:
+
+```
+cd kyuubi-server/web-ui
+npm run build

Review Comment:
   Failed to compile
   ```
   ➜  web-ui git:(PR_2840) npm run start
   
   > [email protected] start
   > ng serve
   
   ✔ Browser application bundle generation complete.
   
   Initial Chunk Files                          | Names                         
 |  Raw Size
   vendor.js                                    | vendor                        
 |   4.80 MB |
   polyfills.js                                 | polyfills                     
 | 340.45 kB |
   styles.js                                    | styles                        
 | 217.49 kB |
   main.js                                      | main                          
 |  59.02 kB |
   runtime.js                                   | runtime                       
 |  12.78 kB |
   
                                                | Initial Total                 
 |   5.41 MB
   
   Lazy Chunk Files                             | Names                         
 |  Raw Size
   src_app_pages_overview_overview_module_ts.js | 
pages-overview-overview-module | 844.21 kB |
   
   Build at: 2022-06-16T07:25:13.384Z - Hash: 5463c84eeaa792c6 - Time: 7948ms
   
   
./src/styles/index.less.webpack[javascript/auto]!=!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[8].rules[0].oneOf[0].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[8].rules[0].oneOf[0].use[2]!./node_modules/less-loader/dist/cjs.js??ruleSet[1].rules[8].rules[1].use[0]!./src/styles/index.less
 - Error: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
   Error: Failed to find 
'../../node_modules/d3-flame-graph/dist/d3-flamegraph.css'
     in [
       /Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/src/styles
     ]
       at 
/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/postcss-import/lib/resolve-id.js:35:13
       at async Promise.all (index 0)
       at async LazyResult.runAsync 
(/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/@angular-devkit/build-angular/node_modules/postcss/lib/lazy-result.js:396:11)
       at async Object.loader 
(/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/postcss-loader/dist/index.js:97:14)
   
   ./src/styles/index.less - Error: Module build failed (from 
./node_modules/mini-css-extract-plugin/dist/loader.js):
   HookWebpackError: Module build failed (from 
./node_modules/postcss-loader/dist/cjs.js):
   Error: Failed to find 
'../../node_modules/d3-flame-graph/dist/d3-flamegraph.css'
     in [
       /Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/src/styles
     ]
       at 
/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/postcss-import/lib/resolve-id.js:35:13
       at async Promise.all (index 0)
       at async LazyResult.runAsync 
(/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/@angular-devkit/build-angular/node_modules/postcss/lib/lazy-result.js:396:11)
       at async Object.loader 
(/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/postcss-loader/dist/index.js:97:14)
       at tryRunOrWebpackError 
(/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/webpack/lib/HookWebpackError.js:88:9)
       at __webpack_require_module__ 
(/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/webpack/lib/Compilation.js:4979:12)
       at __webpack_require__ 
(/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/webpack/lib/Compilation.js:4936:18)
       at 
/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/webpack/lib/Compilation.js:5007:20
       at symbolIterator 
(/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/neo-async/async.js:3485:9)
       at done 
(/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/neo-async/async.js:3527:9)
       at Hook.eval [as callAsync] (eval at create 
(/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/tapable/lib/HookCodeFactory.js:33:10),
 <anonymous>:15:1)
       at Hook.CALL_ASYNC_DELEGATE [as _callAsync] 
(/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/tapable/lib/Hook.js:18:14)
       at 
/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/webpack/lib/Compilation.js:4914:43
       at symbolIterator 
(/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/neo-async/async.js:3482:9)
   -- inner error --
   Error: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
   Error: Failed to find 
'../../node_modules/d3-flame-graph/dist/d3-flamegraph.css'
     in [
       /Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/src/styles
     ]
       at 
/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/postcss-import/lib/resolve-id.js:35:13
       at async Promise.all (index 0)
       at async LazyResult.runAsync 
(/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/@angular-devkit/build-angular/node_modules/postcss/lib/lazy-result.js:396:11)
       at async Object.loader 
(/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/postcss-loader/dist/index.js:97:14)
       at Object.<anonymous> 
(/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[8].rules[0].oneOf[0].use[1]!/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[8].rules[0].oneOf[0].use[2]!/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/less-loader/dist/cjs.js??ruleSet[1].rules[8].rules[1].use[0]!/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/src/styles/index.less:1:7)
       at 
/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/webpack/lib/javascript/JavascriptModulesPlugin.js:432:11
       at Hook.eval [as call] (eval at create 
(/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/tapable/lib/HookCodeFactory.js:19:10),
 <anonymous>:7:1)
       at Hook.CALL_DELEGATE [as _call] 
(/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/tapable/lib/Hook.js:14:14)
       at 
/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/webpack/lib/Compilation.js:4981:39
       at tryRunOrWebpackError 
(/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/webpack/lib/HookWebpackError.js:83:7)
       at __webpack_require_module__ 
(/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/webpack/lib/Compilation.js:4979:12)
       at __webpack_require__ 
(/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/webpack/lib/Compilation.js:4936:18)
       at 
/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/webpack/lib/Compilation.js:5007:20
       at symbolIterator 
(/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/neo-async/async.js:3485:9)
   
   Generated code for 
/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[8].rules[0].oneOf[0].use[1]!/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[8].rules[0].oneOf[0].use[2]!/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/less-loader/dist/cjs.js??ruleSet[1].rules[8].rules[1].use[0]!/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/src/styles/index.less
   1 | throw new Error("Module build failed (from 
./node_modules/postcss-loader/dist/cjs.js):\nError: Failed to find 
'../../node_modules/d3-flame-graph/dist/d3-flamegraph.css'\n  in [\n    
/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/src/styles\n  ]\n   
 at 
/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/postcss-import/lib/resolve-id.js:35:13\n
    at async Promise.all (index 0)\n    at async LazyResult.runAsync 
(/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/@angular-devkit/build-angular/node_modules/postcss/lib/lazy-result.js:396:11)\n
    at async Object.loader 
(/Users/chengpan/Projects/apache-kyuubi/kyuubi-server/web-ui/node_modules/postcss-loader/dist/index.js:97:14)");
   
   
   
   ** Angular Live Development Server is listening on localhost:4200, open your 
browser on http://localhost:4200/ **
   
   
   ✖ Failed to compile.
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to