-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6e8920c
commit f82d4e0
Showing
46 changed files
with
40,206 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
java-components/management-console/src/main/webui/.editorconfig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Editor configuration, see http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.snap] | ||
max_line_length = off | ||
trim_trailing_whitespace = false | ||
|
||
[*.md] | ||
max_line_length = off | ||
trim_trailing_whitespace = false |
76 changes: 76 additions & 0 deletions
76
java-components/management-console/src/main/webui/.eslintrc.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
module.exports = { | ||
// tells eslint to use the TypeScript parser | ||
"parser": "@typescript-eslint/parser", | ||
// tell the TypeScript parser that we want to use JSX syntax | ||
"parserOptions": { | ||
"tsx": true, | ||
"jsx": true, | ||
"js": true, | ||
"useJSXTextNode": true, | ||
"project": "./tsconfig.json", | ||
"tsconfigRootDir": "." | ||
}, | ||
// we want to use the recommended rules provided from the typescript plugin | ||
"extends": [ | ||
"@redhat-cloud-services/eslint-config-redhat-cloud-services", | ||
"eslint:recommended", | ||
"plugin:react/recommended", | ||
"plugin:@typescript-eslint/recommended" | ||
], | ||
"globals": { | ||
"window": "readonly", | ||
"describe": "readonly", | ||
"test": "readonly", | ||
"expect": "readonly", | ||
"it": "readonly", | ||
"process": "readonly", | ||
"document": "readonly", | ||
"insights": "readonly", | ||
"shallow": "readonly", | ||
"render": "readonly", | ||
"mount": "readonly" | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": ["src/**/*.ts", "src/**/*.tsx"], | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": ["@typescript-eslint"], | ||
"extends": ["plugin:@typescript-eslint/recommended"], | ||
"rules": { | ||
"react/prop-types": "off", | ||
"@typescript-eslint/no-unused-vars": "error" | ||
}, | ||
}, | ||
], | ||
"settings": { | ||
"react": { | ||
"version": "^16.11.0" | ||
} | ||
}, | ||
// includes the typescript specific rules found here: https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#supported-rules | ||
"plugins": [ | ||
"@typescript-eslint", | ||
"react-hooks", | ||
"eslint-plugin-react-hooks" | ||
], | ||
"rules": { | ||
"sort-imports": [ | ||
"error", | ||
{ | ||
"ignoreDeclarationSort": true | ||
} | ||
], | ||
"@typescript-eslint/explicit-function-return-type": "off", | ||
"react-hooks/rules-of-hooks": "error", | ||
"react-hooks/exhaustive-deps": "warn", | ||
"@typescript-eslint/interface-name-prefix": "off", | ||
"prettier/prettier": "off", | ||
"import/no-unresolved": "off", | ||
"import/extensions": "off", | ||
"react/prop-types": "off" | ||
}, | ||
"env": { | ||
"browser": true, | ||
"node": true | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
...mponents/management-console/src/main/webui/.github/ISSUE_TEMPLATE/bug_report.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve the react seed | ||
title: '' | ||
labels: needs triage | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
51 changes: 51 additions & 0 deletions
51
java-components/management-console/src/main/webui/.github/workflows/ci.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: CI | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
- release* | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: lts/* | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Run eslint | ||
run: npm run lint | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: lts/* | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Run tests | ||
run: npm run test | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: lts/* | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Attempt a build | ||
run: npm run build |
10 changes: 10 additions & 0 deletions
10
java-components/management-console/src/main/webui/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
**/node_modules | ||
dist | ||
yarn-error.log | ||
yarn.lock | ||
stats.json | ||
coverage | ||
storybook-static | ||
.DS_Store | ||
.idea | ||
.env |
1 change: 1 addition & 0 deletions
1
java-components/management-console/src/main/webui/.prettierignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package.json |
4 changes: 4 additions & 0 deletions
4
java-components/management-console/src/main/webui/.prettierrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"singleQuote": true, | ||
"printWidth": 120 | ||
} |
16 changes: 16 additions & 0 deletions
16
java-components/management-console/src/main/webui/.storybook/main.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// https://storybook.js.org/blog/storybook-for-webpack-5/ | ||
module.exports = { | ||
// https://gist.github.com/shilman/8856ea1786dcd247139b47b270912324#upgrade | ||
core: { | ||
builder: "webpack5", | ||
}, | ||
stories: ['../stories/*.stories.tsx'], | ||
addons: [ | ||
'@storybook/addon-knobs', | ||
], | ||
typescript: { | ||
check: false, | ||
checkOptions: {}, | ||
reactDocgen: 'react-docgen-typescript' | ||
}, | ||
}; |
1 change: 1 addition & 0 deletions
1
java-components/management-console/src/main/webui/.storybook/preview.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import '@patternfly/react-core/dist/styles/base.css'; |
3 changes: 3 additions & 0 deletions
3
java-components/management-console/src/main/webui/.storybook/tsconfig.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "../tsconfig.json" | ||
} |
31 changes: 31 additions & 0 deletions
31
java-components/management-console/src/main/webui/.storybook/webpack.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
const path = require('path'); | ||
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin'); | ||
const appConfig = require('../webpack.common'); | ||
const { stylePaths } = require("../stylePaths"); | ||
|
||
module.exports = ({ config, mode }) => { | ||
config.module.rules = []; | ||
config.module.rules.push(...appConfig(mode).module.rules); | ||
config.module.rules.push({ | ||
test: /\.css$/, | ||
include: [ | ||
path.resolve(__dirname, '../node_modules/@storybook'), | ||
...stylePaths | ||
], | ||
use: ["style-loader", "css-loader"] | ||
}); | ||
config.module.rules.push({ | ||
test: /\.tsx?$/, | ||
include: path.resolve(__dirname, '../src'), | ||
use: [ | ||
require.resolve('react-docgen-typescript-loader'), | ||
], | ||
}) | ||
config.resolve.plugins = [ | ||
new TsconfigPathsPlugin({ | ||
configFile: path.resolve(__dirname, "../tsconfig.json") | ||
}) | ||
]; | ||
config.resolve.extensions.push('.ts', '.tsx'); | ||
return config; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2018 Red Hat | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Oops, something went wrong.