Skip to content

Commit b72fd5b

Browse files
committed
primate: initial UI v0.1
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
1 parent c9a1d30 commit b72fd5b

134 files changed

Lines changed: 34721 additions & 0 deletions

File tree

Some content is hidden

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

ui/.editorconfig

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
[*]
2+
charset=utf-8
3+
end_of_line=crlf
4+
insert_final_newline=false
5+
indent_style=space
6+
indent_size=2
7+
8+
[{*.ng,*.sht,*.html,*.shtm,*.shtml,*.htm}]
9+
indent_style=space
10+
indent_size=2
11+
12+
[{*.jhm,*.xslt,*.xul,*.rng,*.xsl,*.xsd,*.ant,*.tld,*.fxml,*.jrxml,*.xml,*.jnlp,*.wsdl}]
13+
indent_style=space
14+
indent_size=2
15+
16+
[{.babelrc,.stylelintrc,jest.config,.eslintrc,.prettierrc,*.json,*.jsb3,*.jsb2,*.bowerrc}]
17+
indent_style=space
18+
indent_size=2
19+
20+
[*.svg]
21+
indent_style=space
22+
indent_size=2
23+
24+
[*.js.map]
25+
indent_style=space
26+
indent_size=2
27+
28+
[*.less]
29+
indent_style=space
30+
indent_size=2
31+
32+
[*.vue]
33+
indent_style=space
34+
indent_size=2
35+
36+
[{.analysis_options,*.yml,*.yaml}]
37+
indent_style=space
38+
indent_size=2

ui/.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
public/* linguist-vendored

ui/.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.DS_Store
2+
node_modules
3+
/dist
4+
5+
# local env files
6+
.env.local
7+
.env.*.local
8+
9+
# Log files
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
14+
# Editor directories and files
15+
.idea
16+
.vscode
17+
*.suo
18+
*.ntvs*
19+
*.njsproj
20+
*.sln
21+
*.sw*

ui/.prettierrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"printWidth": 120,
3+
"semi": false,
4+
"singleQuote": true
5+
}

ui/.travis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
language: node_js
2+
node_js:
3+
- 10.15.0
4+
cache: yarn
5+
script:
6+
- yarn
7+
- yarn run lint --no-fix && yarn run build

ui/README.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# CloudStack Primate
2+
3+
A progressive modern CloudStack Admin UI based on VueJS and Ant Design.
4+
5+
Install tools and dependencies:
6+
7+
sudo apt-get install npm
8+
sudo npm i -g npm@next
9+
sudo npm i -g npm-check-updates
10+
ncu -u # optional: upgrade dependencies
11+
npm install
12+
13+
Build and run:
14+
15+
npm run serve
16+
17+
Production Build:
18+
19+
npm run build
20+
21+
Upgrade dependencies:
22+
23+
24+
Run Tests:
25+
26+
npm run test
27+
npm run lint
28+
npm run test:unit
29+
30+
Fix issues and vulnerabilities:
31+
32+
npm audit
33+
34+
## History
35+
36+
The project was created by Rohit Yadav over several weekends during late 2018.
37+
The base app layout was referenced from [Ant Design Pro
38+
Vue](https://github.com/sendya/ant-design-pro-vue).
39+
40+
### Env and dependencies
41+
42+
- node
43+
- webpack
44+
- eslint
45+
- @vue/cli ~3
46+
- [ant-design-vue](https://github.com/vueComponent/ant-design-vue) - Ant Design Of Vue
47+
- [vue-cropper](https://github.com/xyxiao001/vue-cropper) - Picture edit
48+
- [@antv/g2](https://antv.alipay.com/zh-cn/index.html) - AntV G2
49+
- [Viser-vue](https://viserjs.github.io/docs.html#/viser/guide/installation) - Antv/G2 of Vue
50+
51+
### Other
52+
53+
- [Vue-cli3](https://cli.vuejs.org/guide/) used by the project.
54+
- Disable Eslint (not recommended): remove `eslintConfig` field in `package.json`
55+
56+
- Easy-Mock used by project,[easy-mock](https://www.easy-mock.com/) Project API Data [DO NOT CHANGE THE INTERFACE](https://www.easy-mock.com/project/5b7bce071f130e5b7fe8cd7d),If you want to modify, please fork [ANTD-PRO-Easy-Mock-API.zip](https://github.com/sendya/ant-design-pro-vue/files/2682711/ANTD-PRO-Easy-Mock-API.zip) and running to your server.
57+
58+
- Load on Demand: modify `/src/main.js` L7, append `import './core/lazy_use'` code.
59+
60+
- Customize Theme: `vue.config.js`
61+
eg:
62+
```ecmascript 6
63+
css: {
64+
loaderOptions: {
65+
less: {
66+
modifyVars: {
67+
/* Less variables, required modifyVars*/
68+
69+
'primary-color': '#F5222D',
70+
'link-color': '#F5222D',
71+
'border-radius-base': '4px',
72+
},
73+
javascriptEnabled: true,
74+
}
75+
}
76+
}
77+
```
78+
79+
### Docs
80+
81+
- [Router and Menu](https://github.com/sendya/ant-design-pro-vue/blob/master/src/router/README.md)
82+
- [Table](https://github.com/sendya/ant-design-pro-vue/blob/master/src/components/table/README.md) [@Saraka](https://github.com/saraka-tsukai)
83+
- [ANTD DefaultConfig](https://github.com/sendya/ant-design-pro-vue/blob/master/src/defaultSettings.js)
84+
- [Frist page loading animate](https://github.com/sendya/ant-design-pro-vue/blob/master/docs/add-page-loading-animate.md)
85+
- [Multi-Tabs feature/multi-tabs](https://github.com/sendya/ant-design-pro-vue/tree/feature/multi-tabs) [How to remove](https://github.com/sendya/ant-design-pro-vue/blob/master/docs/multi-tabs.md)
86+
- [LoadOnDemand Demo feature/demand_load](https://github.com/sendya/ant-design-pro-vue/tree/feature/demand_load)
87+
- [LoadOnDemand Docs](https://github.com/sendya/ant-design-pro-vue/blob/master/docs/load-on-demand.md)
88+
- [i18n feature/lang](https://github.com/sendya/ant-design-pro-vue/tree/feature/lang) Creator [@musnow](https://github.com/musnow)
89+
- [Dependency analysis tool: analyzer](https://github.com/sendya/ant-design-pro-vue/blob/master/docs/webpack-bundle-analyzer.md)
90+
- ANTD PRO Components:
91+
- Trend [Trend.md](https://github.com/sendya/ant-design-pro-vue/blob/master/src/components/Trend/index.md)
92+
- AvatarList [AvatarList.md](https://github.com/sendya/ant-design-pro-vue/blob/master/src/components/AvatarList/index.md)
93+
- CountDown [CountDown.md](https://github.com/sendya/ant-design-pro-vue/blob/master/src/components/CountDown/index.md)
94+
- Ellipsis [Ellipsis.md](https://github.com/sendya/ant-design-pro-vue/blob/master/src/components/Ellipsis/index.md)
95+
- NumberInfo [NumberInfo.md](https://github.com/sendya/ant-design-pro-vue/blob/master/src/components/NumberInfo/index.md)
96+
- FooterToolbar [FooterToolbar.md](https://github.com/sendya/ant-design-pro-vue/blob/master/src/components/FooterToolbar/index.md)
97+
- IconSelector [IconSelector.md](https://github.com/sendya/ant-design-pro-vue/blob/master/src/components/IconSelector/README.md) Creator: [@Saraka](https://github.com/saraka-tsukai)

ui/babel.config.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports = {
2+
presets: [
3+
'@vue/app'
4+
]
5+
// if your use import on Demand, Use this code
6+
// ,
7+
// plugins: [
8+
// [ 'import', {
9+
// 'libraryName': 'ant-design-vue',
10+
// 'libraryDirectory': 'es',
11+
// 'style': true
12+
// } ]
13+
// ]
14+
}

ui/jest.config.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
module.exports = {
2+
moduleFileExtensions: [
3+
'js',
4+
'jsx',
5+
'json',
6+
'vue'
7+
],
8+
transform: {
9+
'^.+\\.vue$': 'vue-jest',
10+
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
11+
'^.+\\.jsx?$': 'babel-jest'
12+
},
13+
moduleNameMapper: {
14+
'^@/(.*)$': '<rootDir>/src/$1'
15+
},
16+
snapshotSerializers: [
17+
'jest-serializer-vue'
18+
],
19+
testMatch: [
20+
'**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)'
21+
],
22+
testURL: 'http://localhost/'
23+
}

ui/jsconfig.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"compilerOptions": {
3+
"target": "es6",
4+
"baseUrl": ".",
5+
"paths": {
6+
"@/*": ["src/*"]
7+
}
8+
},
9+
"exclude": ["node_modules", "dist"],
10+
"include": ["src/**/*"]
11+
}

0 commit comments

Comments
 (0)