From 7ac8f98c71af27d22a13806e4d1eb3ad7a5f520d Mon Sep 17 00:00:00 2001 From: Venjy <54059831+Venjy@users.noreply.github.com> Date: Sun, 21 Jan 2024 23:45:49 +0800 Subject: [PATCH] Setup the frontend framework (#143) Co-authored-by: datavisorwenjiejiang --- webui/.eslintrc.json | 25 ++++++++++++++++++ webui/.gitignore | 54 ++++++++++++++++++++++++++++++++++++++ webui/README.md | 53 +++++++++++++++++++++++++++++++++++++ webui/next.config.mjs | 23 ++++++++++++++++ webui/package.json | 30 +++++++++++++++++++++ webui/postcss.config.js | 25 ++++++++++++++++++ webui/src/app/favicon.ico | Bin 0 -> 169742 bytes webui/src/app/globals.css | 49 ++++++++++++++++++++++++++++++++++ webui/src/app/layout.tsx | 41 +++++++++++++++++++++++++++++ webui/src/app/page.tsx | 33 +++++++++++++++++++++++ webui/tailwind.config.ts | 39 +++++++++++++++++++++++++++ webui/tsconfig.json | 45 +++++++++++++++++++++++++++++++ 12 files changed, 417 insertions(+) create mode 100644 webui/.eslintrc.json create mode 100644 webui/.gitignore create mode 100644 webui/README.md create mode 100644 webui/next.config.mjs create mode 100644 webui/package.json create mode 100644 webui/postcss.config.js create mode 100644 webui/src/app/favicon.ico create mode 100644 webui/src/app/globals.css create mode 100644 webui/src/app/layout.tsx create mode 100644 webui/src/app/page.tsx create mode 100644 webui/tailwind.config.ts create mode 100644 webui/tsconfig.json diff --git a/webui/.eslintrc.json b/webui/.eslintrc.json new file mode 100644 index 00000000..11f49f7f --- /dev/null +++ b/webui/.eslintrc.json @@ -0,0 +1,25 @@ +/* + * 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. + */ + +{ + "extends": "next/core-web-vitals", + "rules": { + "indent": ["warn", 4] + } +} diff --git a/webui/.gitignore b/webui/.gitignore new file mode 100644 index 00000000..875fe8b1 --- /dev/null +++ b/webui/.gitignore @@ -0,0 +1,54 @@ +# 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. +# + +# dependencies +/node_modules +/.pnp +.pnp.js +.yarn/install-state.gz + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# local env files +.env*.local + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts + +package-lock.json \ No newline at end of file diff --git a/webui/README.md b/webui/README.md new file mode 100644 index 00000000..60e725b4 --- /dev/null +++ b/webui/README.md @@ -0,0 +1,53 @@ + + +## Requirements + +- Nodejs >= 18.17 + +## Getting Started + +First install the deployments: + +```bash +npm install +``` + +Run the development server: + +```bash +npm run dev +``` + +Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. + +You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. + +This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. + +## Learn More + +This is a [Next.js](https://nextjs.org/) project. + +To learn more about Next.js, take a look at the following resources: + +- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. +- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. + +You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! diff --git a/webui/next.config.mjs b/webui/next.config.mjs new file mode 100644 index 00000000..d3b5b416 --- /dev/null +++ b/webui/next.config.mjs @@ -0,0 +1,23 @@ +/* + * 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. + */ + +/** @type {import('next').NextConfig} */ +const nextConfig = {}; + +export default nextConfig; diff --git a/webui/package.json b/webui/package.json new file mode 100644 index 00000000..f7f2418d --- /dev/null +++ b/webui/package.json @@ -0,0 +1,30 @@ +{ + "name": "kvrocks-controller-ui", + "version": "0.1.0", + "private": true, + "scripts": { + "dev": "next dev", + "build": "next build", + "start": "next start", + "lint": "next lint" + }, + "dependencies": { + "@emotion/react": "^11.11.3", + "@emotion/styled": "^11.11.0", + "@mui/material": "^5.15.5", + "next": "14.1.0", + "react": "^18", + "react-dom": "^18" + }, + "devDependencies": { + "@types/node": "^20", + "@types/react": "^18", + "@types/react-dom": "^18", + "autoprefixer": "^10.0.1", + "eslint": "^8", + "eslint-config-next": "14.1.0", + "postcss": "^8", + "tailwindcss": "^3.3.0", + "typescript": "^5" + } +} diff --git a/webui/postcss.config.js b/webui/postcss.config.js new file mode 100644 index 00000000..2def2553 --- /dev/null +++ b/webui/postcss.config.js @@ -0,0 +1,25 @@ +/* + * 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. + */ + +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +}; diff --git a/webui/src/app/favicon.ico b/webui/src/app/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..1fa1f7d8a042c090372da5386aead5095636457f GIT binary patch literal 169742 zcmeHQ2fP*4nICn3NldayHgz}a8e_7nChI0^`f9`m(wj=}pi)$%h=>JHB%l%tilP$i z2qFqduYw>Qr1uUYq!3(-!XiEf$( zHat*<-!`C)LF~6erUwM(-`&dnl^s&Ksk7A9NO>D zg5qmGuSrIUjEhBQ22ezZ%>G1o%iTg~=Q5vO7cIo?Mzn(k{ z9u6|LOq|TrIMMnfPk4YiOxDXJVpDlJmUh>qJfV@6``It|(=|uTm0#^MUWRL&Xnm5W zJg^7jy2K~Eu(mT@IM?^lw9W(%EC!F$cJg9lIURF7&ew5a&A*x8-*n&e?4b-%ry#6Fg7>UayxVUf$L?(Q=}|c!06wA0>#F>IFulOvo{P&+OEnBND*M*KzD- zjTNm^3X}(Ei(QN6*OHufJ(3s&wglmC0ZLYlu> zAzeQZ-82ncdEl;5A~jyA5aY3OG1{a>=QoLim7YQ4diqG4%lgh-%-+DT(y2^FFHedz`Xo&OTMBGHBJ%UULDvLlJJxW( zO2feJc~7~l+G9Ih{iCKpN)$L#D$14*hKOBJ;M0 zy!5F^@A2pT&4JTI#;g$80hyn!?bKP=WAtPE*DqWf=F%9v{1AWhS$^N|cQ<^pWVc^< z)UQ0w%jWfZ)azchY`>nDF(h(KX}QR#Wg_%BJ^2c~%ca-HBD9r)-j?qMUV`!Yd&OX- za}YQoJrABto=S=I$;({|?Rs8l;^i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;b6RN~Qdl}9a=s6Ow}0saPAq(V4cD5W@uKxh zp78*E`9GmqeD2pLpP&3Z&uA4XU-b9F(k;c{2Wzg~)F@o_po zZ^M0$YP@K9kpn#N8v4ju$8_Q&_Fly4>>Qv~Hp@HRx8U?KW5Ty*7$cFGVGgDRny!fn zZq7BH5~D5aOcw{PCf3&J-8HxSk zjkRZt*zF?xy3;W5@7&m3hS4{)ucGoU<7c6Ll`m-+Uk~lWg)40rg!av?v z%c!FE*>%M*zN_}xb%mYTiSZq?z2-$~ANJd97pQ%6ZT8?NwXdK3zP>xL-(g=B?z2D5 z_!;)u56@8h${f!7F3xk>_jT+$<8U7L*^|XEE^^s-0rug4+s$nsPnv6c7Jf{2UmL^d zhtqAhHc9Tg%=T*Lk3sBnxt-pnDWEB!DWEB!DWEB!DWEB!DWEB!DWEB!DUkORxXfjQ zarX6dIu++R?rY<|Z?566;XKEEJKgtTxBZ44_}_M8jKwK#l`k5K{r*3?r~^p= literal 0 HcmV?d00001 diff --git a/webui/src/app/globals.css b/webui/src/app/globals.css new file mode 100644 index 00000000..bd5c251f --- /dev/null +++ b/webui/src/app/globals.css @@ -0,0 +1,49 @@ +/* + * 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. + */ + +@tailwind base; +@tailwind components; +@tailwind utilities; + +:root { + --foreground-rgb: 0, 0, 0; + --background-start-rgb: 214, 219, 220; + --background-end-rgb: 255, 255, 255; +} + +@media (prefers-color-scheme: dark) { + :root { + --foreground-rgb: 255, 255, 255; + --background-start-rgb: 0, 0, 0; + --background-end-rgb: 0, 0, 0; + } +} + +body { + color: rgb(var(--foreground-rgb)); + background: linear-gradient(to bottom, + transparent, + rgb(var(--background-end-rgb))) rgb(var(--background-start-rgb)); +} + +@layer utilities { + .text-balance { + text-wrap: balance; + } +} \ No newline at end of file diff --git a/webui/src/app/layout.tsx b/webui/src/app/layout.tsx new file mode 100644 index 00000000..ec5e29da --- /dev/null +++ b/webui/src/app/layout.tsx @@ -0,0 +1,41 @@ +/* + * 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 type { Metadata } from "next"; +import { Inter } from "next/font/google"; +import "./globals.css"; + +const inter = Inter({ subsets: ["latin"] }); + +export const metadata: Metadata = { + title: "Kvrocks Controller", + description: "Kvrocks Controller", +}; + +export default function RootLayout({ + children, +}: Readonly<{ + children: React.ReactNode; +}>) { + return ( + + {children} + + ); +} diff --git a/webui/src/app/page.tsx b/webui/src/app/page.tsx new file mode 100644 index 00000000..23a1068c --- /dev/null +++ b/webui/src/app/page.tsx @@ -0,0 +1,33 @@ +/* + * 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 { Button } from "@mui/material"; +import Image from "next/image"; + +export default function Home() { + return ( +
+

Kvrocks Controler UI

+

Work in progress...

+ +
+ ); +} diff --git a/webui/tailwind.config.ts b/webui/tailwind.config.ts new file mode 100644 index 00000000..0305e162 --- /dev/null +++ b/webui/tailwind.config.ts @@ -0,0 +1,39 @@ +/* + * 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 type { Config } from "tailwindcss"; + +const config: Config = { + content: [ + "./src/pages/**/*.{js,ts,jsx,tsx,mdx}", + "./src/components/**/*.{js,ts,jsx,tsx,mdx}", + "./src/app/**/*.{js,ts,jsx,tsx,mdx}", + ], + theme: { + extend: { + backgroundImage: { + "gradient-radial": "radial-gradient(var(--tw-gradient-stops))", + "gradient-conic": + "conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))", + }, + }, + }, + plugins: [], +}; +export default config; diff --git a/webui/tsconfig.json b/webui/tsconfig.json new file mode 100644 index 00000000..0fd515fb --- /dev/null +++ b/webui/tsconfig.json @@ -0,0 +1,45 @@ +/* + * 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. + */ + + { + "compilerOptions": { + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "bundler", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true, + "plugins": [ + { + "name": "next" + } + ], + "paths": { + "@/*": ["./src/*"] + } + }, + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "exclude": ["node_modules"] +}