Skip to content
This repository was archived by the owner on Apr 18, 2024. It is now read-only.

Commit a35af33

Browse files
authored
Merge pull request #22 from flanksource/feat/add-konfig-manager-ui
Feat/add konfig manager UI
2 parents 7eb4f66 + ef39220 commit a35af33

21 files changed

+11393
-2
lines changed

.github/workflows/lint.yml

+28-1
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,19 @@ on:
33
push:
44
branches:
55
- master
6+
- main
67
pull_request:
78
paths:
89
- '**.go'
910
- 'Makefile'
11+
- '**.jsx?'
12+
- '**.tsx?'
13+
- '**/.babelrc'
14+
- '**/.eslint*'
15+
- '**/package.json'
16+
- '**.md'
17+
- '**/.markdownlint.*'
18+
- '**/github/workflows/lint.yml'
1019
jobs:
1120
golangci:
1221
name: lint
@@ -15,4 +24,22 @@ jobs:
1524
- uses: actions/checkout@v2
1625
- uses: actions/setup-go@v2
1726
- name: golangci-lint
18-
uses: golangci/golangci-lint-action@v2
27+
uses: golangci/golangci-lint-action@v2
28+
eslint:
29+
runs-on: ubuntu-latest
30+
container:
31+
image: node:15.14-alpine
32+
steps:
33+
- uses: actions/checkout@master
34+
- run: npm ci
35+
working-directory: ./ui
36+
- run: npm run lint:eslint
37+
working-directory: ./ui
38+
markdown:
39+
runs-on: ubuntu-latest
40+
container:
41+
image: node:15.14-alpine
42+
steps:
43+
- uses: actions/checkout@master
44+
- run: apk upgrade && apk add --no-cache make bash
45+
- run: make lint-markdown

.github/workflows/test.yml

+12
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,19 @@ on:
44
- v*
55
branches:
66
- master
7+
- main
78
pull_request:
9+
paths:
10+
- '**.jsx?'
11+
- '**.tsx?'
12+
- '**/.babelrc'
13+
- '**/jest*'
14+
- '**/package.json'
15+
- '**/github/workflows/**/test.yml'
16+
- '**.go'
17+
- 'go.mod'
18+
- 'go.sum'
19+
- 'Makefile'
820
name: Test
921
jobs:
1022
test:

.gitignore

+34
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,40 @@ bin/
2424

2525
testbin
2626
test/output/
27+
28+
node_modules
29+
ui/.pnp
30+
.pnp.js
31+
32+
# testing
33+
coverage
34+
/coverage
35+
36+
# next.js
37+
ui/.next/
38+
ui/out/
39+
40+
# production
41+
ui/build
42+
43+
# misc
44+
.DS_Store
45+
*.pem
46+
47+
# debug
48+
npm-debug.log*
49+
yarn-debug.log*
50+
yarn-error.log*
51+
52+
# local env files
53+
.env.local
54+
.env.development.local
55+
.env.test.local
56+
.env.production.local
57+
58+
# vercel
59+
.vercel
60+
2761
node_modules
2862
.bin
2963
.next

.markdownlint.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"default": true,
3+
"MD013": false,
4+
"MD024": { "siblings_only": true },
5+
"MD046": "consistent"
6+
}

Makefile

+10
Original file line numberDiff line numberDiff line change
@@ -158,3 +158,13 @@ GOBIN=$(PROJECT_DIR)/bin go get $(2) ;\
158158
rm -rf $$TMP_DIR ;\
159159
}
160160
endef
161+
162+
.PHONY: lint-markdown
163+
lint-markdown:
164+
npm install [email protected]
165+
npx markdownlint '**/*.md' --ignore 'node_modules' --ignore 'ui/node_modules' -c .markdownlint.json
166+
167+
.PHONY: fix-markdown
168+
fix-markdown:
169+
npm install [email protected]
170+
npx markdownlint '**/*.md' --fix --ignore 'node_modules' --ignore 'ui/node_modules' -c .markdownlint.json

README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
# konfig-manager
2-
konfig-manager is tool for managing configuration for services with many differnt environments.
2+
3+
konfig-manager is tool for managing configuration for services with many different environments.
4+
5+
## Tools
6+
7+
- [Linting](https://github.com/flanksource/style-guide)

ui/.babelrc

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"presets": [
3+
[
4+
"next/babel",
5+
{
6+
"preset-react": {
7+
"runtime": "automatic",
8+
"importSource": "@emotion/react"
9+
}
10+
}
11+
]
12+
],
13+
"plugins": ["@emotion/babel-plugin"]
14+
}

ui/.eslintrc.json

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"jest/globals": true
5+
},
6+
"settings": {
7+
"import/resolver": {
8+
"webpack": {}
9+
},
10+
"jest": {
11+
"version": "27"
12+
}
13+
},
14+
"parserOptions": {
15+
"jsx": true,
16+
"ecmaVersion": 12,
17+
"sourceType": "module",
18+
"ecmaFeatures": {
19+
"impliedStrict": true
20+
},
21+
"allowImportExportEverywhere": false
22+
},
23+
"extends": [
24+
"eslint:recommended",
25+
"plugin:jsx-a11y/recommended",
26+
"plugin:jest/recommended",
27+
"plugin:react/recommended",
28+
"plugin:react-hooks/recommended",
29+
"airbnb",
30+
"prettier"
31+
],
32+
"plugins": [
33+
"react-hooks",
34+
"prettier"
35+
],
36+
"rules": {
37+
"prettier/prettier": [
38+
"error"
39+
],
40+
"react/jsx-uses-react": "off",
41+
"react/react-in-jsx-scope": "off",
42+
"react/prop-types": "off",
43+
"react/jsx-props-no-spreading": 0,
44+
"no-use-before-define": ["error", { "functions": false, "classes": true }],
45+
"no-shadow": "off",
46+
"no-param-reassign": "off"
47+
}
48+
}

ui/README.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# konfig-manager-ui
2+
3+
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
4+
5+
## Getting Started
6+
7+
First, run the development server:
8+
9+
```bash
10+
npm run dev
11+
# or
12+
yarn dev
13+
```
14+
15+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
16+
17+
You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.
18+
19+
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`.
20+
21+
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
22+
23+
## Learn More
24+
25+
To learn more about Next.js, take a look at the following resources:
26+
27+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
29+
30+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
31+
32+
## Deploy on Vercel
33+
34+
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
35+
36+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.

0 commit comments

Comments
 (0)