Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: thediveo <[email protected]>
  • Loading branch information
thediveo committed Jan 10, 2024
1 parent c311229 commit 0ffcf06
Show file tree
Hide file tree
Showing 91 changed files with 22,282 additions and 13,998 deletions.
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,13 @@ lsallnifs: ## list all network interfaces with their configuration in all networ

vuln: ## run go vulnerabilities check
@scripts/vuln.sh

yarnsetup: ## set up yarn v4 correctly
cd webui && \
rm -f .yarnrc.yml && \
rm -rf .yarn/ && \
rm -rf node_modules && \
yarn set version berry && \
yarn config set nodeLinker node-modules && \
yarn install && \
yarn eslint --init
1 change: 1 addition & 0 deletions webui/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_REACT_APP_GIT_VERSION=$REACT_APP_GIT_VERSION
41 changes: 41 additions & 0 deletions webui/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
module.exports = {
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
],
"settings": {
"react": {
"version": "detect",
},
},
"overrides": [
{
"env": {
"node": true
},
"files": [
".eslintrc.{js,cjs}"
],
"parserOptions": {
"sourceType": "script"
}
}
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
"react"
],
"rules": {
}
}
40 changes: 40 additions & 0 deletions webui/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Copyright 2023 Harald Albrecht.
//
// 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 type { StorybookConfig } from '@storybook/react-vite'

const config: StorybookConfig = {
framework: {
name: '@storybook/react-vite',
options: {},
},
stories: [
'../src/**/*.stories.@(js|jsx|ts|tsx)',
'../src/**/*.sb.mdx',
],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
],
docs: {
autodocs: 'tag',
},
core: {
disableTelemetry: true,
disableWhatsNewNotifications: true,
},
}

export default config
63 changes: 63 additions & 0 deletions webui/.storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
// Copyright 2023 Harald Albrecht.
//
// 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, { ReactNode } from 'react'
import { BrowserRouter } from 'react-router-dom'

import type { Preview } from '@storybook/react'

import '@fontsource/roboto/300.css'
import '@fontsource/roboto/400.css'
import '@fontsource/roboto/500.css'
import '@fontsource/roboto/700.css'
import '@fontsource/roboto-mono/400.css'

import { lxknsLightTheme } from 'app/appstyles'
import { createTheme, ScopedCssBaseline, StyledEngineProvider, ThemeProvider } from '@mui/material'


const lightTheme = createTheme(
{
components: {
MuiSelect: {
defaultProps: {
variant: 'standard', // MUI v4 default.
},
},
},
palette: {
mode: 'light',
},
},
lxknsLightTheme,
)


const preview: Preview = {
decorators: [
(Story, context) => (
<BrowserRouter basename=''>
<StyledEngineProvider injectFirst>
<ThemeProvider theme={lightTheme} >
<ScopedCssBaseline>
<Story />
</ScopedCssBaseline>
</ThemeProvider>
</StyledEngineProvider>
</BrowserRouter>
),
],
}

export default preview
Binary file added webui/.yarn/install-state.gz
Binary file not shown.
893 changes: 893 additions & 0 deletions webui/.yarn/releases/yarn-4.0.2.cjs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions webui/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.0.2.cjs
48 changes: 0 additions & 48 deletions webui/craco.config.js

This file was deleted.

15 changes: 0 additions & 15 deletions webui/cypress.config.ts

This file was deleted.

5 changes: 0 additions & 5 deletions webui/cypress/.babelrc

This file was deleted.

39 changes: 0 additions & 39 deletions webui/cypress/integration/ghostwire.spec.ts

This file was deleted.

12 changes: 0 additions & 12 deletions webui/cypress/plugins/index.js

This file was deleted.

14 changes: 0 additions & 14 deletions webui/cypress/support/commands.ts

This file was deleted.

18 changes: 0 additions & 18 deletions webui/cypress/support/index.d.ts

This file was deleted.

20 changes: 0 additions & 20 deletions webui/cypress/support/index.ts

This file was deleted.

20 changes: 0 additions & 20 deletions webui/cypress/tsconfig.json

This file was deleted.

Binary file removed webui/favicon.ico
Binary file not shown.
Loading

0 comments on commit 0ffcf06

Please sign in to comment.