Skip to content

Commit a48d0fc

Browse files
committed
First import
0 parents  commit a48d0fc

File tree

306 files changed

+42993
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

306 files changed

+42993
-0
lines changed

.babelrc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"presets": [
3+
"@babel/preset-env",
4+
"@babel/preset-react"
5+
],
6+
"compact": false,
7+
"plugins": [
8+
"@babel/plugin-transform-runtime",
9+
"@babel/plugin-transform-block-scoping",
10+
"@babel/plugin-proposal-class-properties",
11+
"@babel/plugin-proposal-export-namespace-from",
12+
"@babel/plugin-proposal-export-default-from"
13+
]
14+
}

.editorconfig

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# http://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
end_of_line = lf
8+
insert_final_newline = true
9+
10+
[*.{yml,yaml,json,js,jsx,css,scss,sass,html}]
11+
indent_style = space
12+
indent_size = 2
13+
14+
[.{eslint,babel,postcss}rc]
15+
indent_style = space
16+
indent_size = 2
17+
language = json
18+
19+
[Makefile]
20+
indent_style = tab
21+
22+
[Jenkinsfile]
23+
indent_style = space
24+
indent_size = 2
25+
language = groovy

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
NODE_ENV=development
2+
HUSKAR_API_URL=http://127.0.0.1:5000

.eslintrc

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"parser": "babel-eslint",
3+
"extends": "airbnb",
4+
"rules": {
5+
"no-bitwise": "off",
6+
"object-curly-newline": ["error", {
7+
"consistent": true
8+
}],
9+
"react/destructuring-assignment": "off",
10+
"react/jsx-one-expression-per-line": "off",
11+
"jsx-a11y/label-has-for": "off"
12+
},
13+
"env": {
14+
"browser": true,
15+
"jest": true
16+
},
17+
"plugins": [
18+
"babel"
19+
],
20+
"settings": {
21+
"import/extensions": [".js", ".jsx"],
22+
"import/resolver": {
23+
"webpack": {
24+
"config": "webpack.config.babel.js"
25+
}
26+
}
27+
}
28+
}

.github/CONTRIBUTING.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## Contributing Guide
2+
3+
1. Keep your branch up-to-date
4+
- `git fetch upstream`
5+
- `git rebase upstream/master`
6+
2. Squash or reword commits for clear history
7+
- `git rebase -i --autosquash upstream/master`
8+
3. Create a pull request
9+
- Edit the description
10+
- Invite one or multiple reviewers
11+
- Assign someone who can merge pull requests
12+
- Choose labels and milestone
13+
- If there is a topic-related Trello card, attach this pull request on it

.github/ISSUE_TEMPLATE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
### Description
2+
3+
<!-- If this is a bug, provide as much information as you can to help reproduce the issue. -->
4+
5+
### Enviroment Info
6+
7+
8+
### Reference Link
9+
10+
<!-- It's better if you give a link that can reproduce the bug. -->
11+
12+
### Screenshot
13+
14+
<!-- Screenshot, if any (drag an image here). -->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
### Description
2+
3+
<!-- Your description here. -->
4+
5+
### Reference
6+
7+
8+
### Todo
9+
10+
<!--
11+
Remove this section at will, if your pull request is not WIP.
12+
13+
- [ ] Step 1
14+
- [ ] Step 2
15+
-->
16+
17+
18+
### Preview
19+
20+
<!-- UI interface changes, prefer a image of screenshot to show it. -->

.gitignore

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Created by https://www.gitignore.io/api/node
2+
3+
### Node ###
4+
# Logs
5+
logs
6+
*.log
7+
npm-debug.log*
8+
9+
# Runtime data
10+
pids
11+
*.pid
12+
*.seed
13+
*.pid.lock
14+
15+
# PyCharm
16+
.idea/
17+
.python-version
18+
19+
# Directory for instrumented libs generated by jscoverage/JSCover
20+
lib-cov
21+
22+
# Coverage directory used by tools like istanbul
23+
coverage
24+
25+
# nyc test coverage
26+
.nyc_output
27+
28+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
29+
.grunt
30+
31+
# node-waf configuration
32+
.lock-wscript
33+
34+
# Compiled binary addons (http://nodejs.org/api/addons.html)
35+
build/Release
36+
37+
# Dependency directories
38+
node_modules
39+
jspm_packages
40+
41+
# Optional npm cache directory
42+
.npm
43+
44+
# Optional REPL history
45+
.node_repl_history
46+
47+
# Vim cache
48+
*.swp
49+
50+
# Custom
51+
/dist
52+
/.env
53+
/test-report.xml

.postcssrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"plugins": {
3+
"autoprefixer": {}
4+
}
5+
}

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Changlog
2+
=========
3+
4+
0.174.2 (2019-11-18)
5+
----------------------
6+
7+
* First import.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) <2019> <Eleme Inc.>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Huskar Front-End
2+
3+
The web console of [Huskar](https://github.com/huskar-org/huskar).
4+
5+
## Getting Start
6+
7+
You should create a `.env` file (from `.env.example`) for development in local.
8+
9+
Example:
10+
11+
```
12+
$ cat .env
13+
NODE_ENV=development
14+
HUSKAR_API_URL=http://huskar-api.example.com
15+
```
16+
17+
Then you could use the presented npm scripts:
18+
19+
```
20+
$ npm install # install dependencies
21+
$ npm run clean # clean dist directory
22+
$ npm run build # build only
23+
$ npm start # start the development server
24+
$ npm test # run tests
25+
```
26+
27+
## Delopyment
28+
29+
30+
There is a series of configuration items as environment variables:
31+
32+
| Name | Context | Required | Default |
33+
| ---------------------------------- | ------------ | -------- | ------------------------------------- |
34+
| `NODE_ENV` | Compile time | Required | development |
35+
| `HUSKAR_SENTRY_DSN` | Runtime | Optional | |
36+
| `HUSKAR_MONITOR_URL` | Runtime | Optional | https://monitor.example.com |
37+
| `HUSKAR_AMQP_DASHBOARD_URL` | Runtime | Optional | |
38+
| `HUSKAR_ES_DASHBOARD_URL` | Runtime | Optional | |
39+
| `HUSKAR_FEATURE_LIST` | Runtime | Optional | stateswitch |
40+
| `HUSKAR_EZONE_LIST` | Runtime | Optional | global,alta1,altb1 |
41+
| `HUSKAR_CLUSTER_SPEC_URL` | Runtime | Optional | |
42+
| `HUSKAR_DEFAULT_CLUSTER` | Runtime | Optional | |
43+
| `HUSKAR_ROUTE_ADMIN_ONLY_EZONE` | Runtime | Optional | |
44+
45+
Available feature flags:
46+
47+
* `signup`
48+
* `createapp`
49+
* `stateswitch`
50+
* `delaybutton`
51+
* `infrarawurl`
52+
53+
## Development Knowledge
54+
55+
### Languages
56+
57+
- [ES6 Features](http://es6-features.org)
58+
- [SASS](http://sass-lang.com)
59+
60+
### Toolchains
61+
62+
- [webpack v3](https://webpack.js.org)
63+
- [babel](https://babeljs.io)
64+
65+
### Frameworks and Libraries
66+
67+
- [Redux](http://redux.js.org)
68+
- [React](https://facebook.github.io/react/)
69+
- [React-Router](https://github.com/ReactTraining/react-router)
70+
- [Immutable.js](https://facebook.github.io/immutable-js/)
71+
- [apisdk.js](https://github.com/YanagiEiichi/apisdk)
72+
- [axios](https://github.com/mzabriskie/axios)
73+
74+
### Apps
75+
76+
The [devdocs](http://devdocs.io) is useful for looking up API of those stuff.
77+
78+
### Best Practices
79+
80+
- Pass all eslint rules
81+
- Write pure and micro components instead of stateful and huge components
82+
- Use GA to track new features

0 commit comments

Comments
 (0)