Skip to content

Commit d6558d9

Browse files
committed
ui: cleanup and name changes
Drop the name Primate Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
1 parent b07816b commit d6558d9

23 files changed

Lines changed: 85 additions & 1203 deletions

pom.xml

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,33 +1005,7 @@
10051005
<exclude>tools/ngui/static/bootstrap/*</exclude>
10061006
<exclude>tools/ngui/static/js/lib/*</exclude>
10071007
<exclude>tools/transifex/.tx/config</exclude>
1008-
<exclude>ui/legacy/css/src/scss/components/token-input-facebook.scss</exclude>
1009-
<exclude>ui/l10n/*</exclude>
1010-
<exclude>ui/legacy/lib/flot/jquery.colorhelpers.js</exclude>
1011-
<exclude>ui/legacy/lib/flot/jquery.flot.crosshair.js</exclude>
1012-
<exclude>ui/legacy/lib/flot/jquery.flot.fillbetween.js</exclude>
1013-
<exclude>ui/legacy/lib/flot/jquery.flot.image.js</exclude>
1014-
<exclude>ui/legacy/lib/flot/jquery.flot.js</exclude>
1015-
<exclude>ui/legacy/lib/flot/jquery.flot.navigate.js</exclude>
1016-
<exclude>ui/legacy/lib/flot/jquery.flot.pie.js</exclude>
1017-
<exclude>ui/legacy/lib/flot/jquery.flot.resize.js</exclude>
1018-
<exclude>ui/legacy/lib/flot/jquery.flot.selection.js</exclude>
1019-
<exclude>ui/legacy/lib/flot/jquery.flot.stack.js</exclude>
1020-
<exclude>ui/legacy/lib/flot/jquery.flot.symbol.js</exclude>
1021-
<exclude>ui/legacy/lib/flot/jquery.flot.threshold.js</exclude>
1022-
<exclude>ui/legacy/lib/jquery-ui/css/jquery-ui.css</exclude>
1023-
<exclude>ui/legacy/lib/jquery-ui/index.html</exclude>
1024-
<exclude>ui/legacy/lib/jquery-ui/js/jquery-ui.js</exclude>
1025-
<exclude>ui/legacy/lib/jquery.cookies.js</exclude>
1026-
<exclude>ui/legacy/lib/jquery.easing.js</exclude>
1027-
<exclude>ui/legacy/lib/jquery.js</exclude>
1028-
<exclude>ui/legacy/lib/jquery.md5.js</exclude>
1029-
<exclude>ui/legacy/lib/jquery.validate.js</exclude>
1030-
<exclude>ui/legacy/lib/jquery.tokeninput.js</exclude>
1031-
<exclude>ui/legacy/lib/qunit/qunit.css</exclude>
1032-
<exclude>ui/legacy/lib/qunit/qunit.js</exclude>
1033-
<exclude>ui/legacy/lib/reset.css</exclude>
1034-
<exclude>ui/legacy/lib/require.js</exclude>
1008+
<exclude>ui/*</exclude>
10351009
<exclude>utils/testsmallfileinactive</exclude>
10361010
</excludes>
10371011
</configuration>

ui/.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
118
.DS_Store
219
node_modules
20+
coverage
321
/dist
422

523
# local env files

ui/CONTRIBUTING.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Contributing to Primate
1+
# Contributing to CloudStack UI
22

33
## Summary
44

5-
This document covers how to contribute to the Primate project. Primate uses Github PRs to manage code contributions.
5+
This document covers how to contribute to the UI project. It uses Github PRs to manage code contributions.
66
These instructions assume you have a GitHub.com account, so if you don't have one you will have to create one.
7-
Your proposed code changes will be published to your own fork of the Primate project and you will submit a Pull Request for your changes to be added.
7+
Your proposed code changes will be published to your own fork of the project and you will submit a Pull Request for your changes to be added.
88

99
Please refer to project [docs](docs) for reference on standard way of component
1010
configuration, development, usage, extension and testing.
@@ -27,18 +27,18 @@ No back porting / cherry-picking features to existing branches!
2727

2828
## Forking
2929

30-
In your browser, navigate to: [https://github.com/apache/cloudstack-primate](https://github.com/apache/cloudstack-primate)
30+
In your browser, navigate to: [https://github.com/apache/cloudstack](https://github.com/apache/cloudstack)
3131

3232
Fork the repository by clicking on the 'Fork' button on the top right hand side.
3333
The fork will happen and you will be taken to your own fork of the repository.
3434
Copy the Git repository URL by clicking on the clipboard next to the URL on the right hand side of the page under '**HTTPS** clone URL'. You will paste this URL when doing the following `git clone` command.
3535

36-
On your workstation, follow these steps to setup a local repository for working on Primate:
36+
On your workstation, follow these steps to setup a local repository for working on UI:
3737

3838
``` bash
39-
$ git clone https://github.com/YOUR_ACCOUNT/primate.git
40-
$ cd primate
41-
$ git remote add upstream https://github.com/apache/cloudstack-primate.git
39+
$ git clone https://github.com/YOUR_ACCOUNT/cloudstack.git
40+
$ cd cloudstack/ui
41+
$ git remote add upstream https://github.com/apache/cloudstack.git
4242
$ git checkout master
4343
$ git fetch upstream
4444
$ git rebase upstream/master
@@ -48,7 +48,7 @@ $ git rebase upstream/master
4848

4949

5050
It is important that you create a new branch to make changes on and that you do not change the `master` branch (other than to rebase in changes from `upstream/master`). In this example I will assume you will be making your changes to a branch called `feature_x`.
51-
This `feature_x` branch will be created on your local repository and will be pushed to your forked repository on GitHub. Once this branch is on your fork you will create a Pull Request for the changes to be added to the Primate project.
51+
This `feature_x` branch will be created on your local repository and will be pushed to your forked repository on GitHub. Once this branch is on your fork you will create a Pull Request for the changes to be added to the UI project.
5252

5353
It is best practice to create a new branch each time you want to contribute to the project and only track the changes for that pull request in this branch.
5454

@@ -101,7 +101,7 @@ Now that the `feature_x` branch has been pushed to your GitHub repository, you c
101101

102102
To initiate the pull request, do the following:
103103

104-
1. In your browser, navigate to your forked repository: [https://github.com/YOUR_ACCOUNT/primate](https://github.com/YOUR_ACCOUNT/primate)
104+
1. In your browser, navigate to your forked repository: [https://github.com/YOUR_ACCOUNT/cloudstack](https://github.com/YOUR_ACCOUNT/cloudstack)
105105
2. Click the new button called '**Compare & pull request**' that showed up just above the main area in your forked repository
106106
3. Validate the pull request will be into the upstream `master` and will be from your `feature_x` branch
107107
4. Enter a detailed description of the work you have done and then click '**Send pull request**'

ui/Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
# Build example: docker build -t apache/cloudstack-primate:latest .
18+
# Build example: docker build -t <name> .
1919

2020
FROM node:lts-stretch AS build
2121

2222
MAINTAINER "Apache CloudStack" <dev@cloudstack.apache.org>
23-
LABEL Description="Apache CloudStack Primate; Modern role-base progressive UI for Apache CloudStack"
23+
LABEL Description="Apache CloudStack UI; Modern role-base progressive UI for Apache CloudStack"
2424
LABEL Vendor="Apache.org"
2525
LABEL License=ApacheV2
2626
LABEL Version=0.5.0
@@ -35,12 +35,12 @@ RUN npm run build
3535

3636
FROM nginx:alpine AS runtime
3737

38-
LABEL org.opencontainers.image.title="Apache CloudStack Primate" \
38+
LABEL org.opencontainers.image.title="Apache CloudStack UI" \
3939
org.opencontainers.image.description="A modern role-based progressive CloudStack UI" \
4040
org.opencontainers.image.authors="Apache CloudStack Contributors" \
41-
org.opencontainers.image.url="https://github.com/apache/cloudstack-primate" \
42-
org.opencontainers.image.documentation="https://github.com/apache/cloudstack-primate/README.md" \
43-
org.opencontainers.image.source="https://github.com/apache/cloudstack-primate" \
41+
org.opencontainers.image.url="https://github.com/apache/cloudstack" \
42+
org.opencontainers.image.documentation="https://github.com/apache/cloudstack/blob/master/ui/README.md" \
43+
org.opencontainers.image.source="https://github.com/apache/cloudstack" \
4444
org.opencontainers.image.vendor="The Apache Software Foundation" \
4545
org.opencontainers.image.licenses="Apache-2.0" \
4646
org.opencontainers.image.ref.name="latest"

ui/README.md

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# CloudStack Primate [![Build Status](https://travis-ci.org/apache/cloudstack-primate.svg?branch=master)](https://travis-ci.org/apache/cloudstack-primate)
1+
# CloudStack UI
22

33
A modern role-based progressive CloudStack UI based on VueJS and Ant Design.
44

5-
![Primate Screenshot](docs/screenshot-dashboard.png)
5+
![Screenshot](ui/docs/screenshot-dashboard.png)
66

77
## Getting Started
88

@@ -25,8 +25,8 @@ Optionally, you may also install system-wide dev tools:
2525

2626
Clone the repository:
2727

28-
git clone https://github.com/apache/cloudstack-primate.git
29-
cd cloudstack-primate
28+
git clone https://github.com/apache/cloudstack.git
29+
cd cloudstack/ui
3030
npm install
3131

3232
Override the default `CS_URL` to a running CloudStack management server:
@@ -68,32 +68,32 @@ Fetch dependencies and build:
6868
This creates a static webpack application in `dist/`, which can then be served
6969
from any web server or CloudStack management server (jetty).
7070

71-
To use CloudStack management server (jetty), you may copy the built Primate build
72-
to a new/existing webapp directory on the management server host. For example:
71+
To use CloudStack management server (jetty), you may copy the built UI to the
72+
webapp directory on the management server host. For example:
7373

7474
npm install
7575
npm run build
7676
cd dist
77-
mkdir -p /usr/share/cloudstack-management/webapp/primate
78-
cp -vr . /usr/share/cloudstack-management/webapp/primate/
79-
# Use Primate at {management-server}:8080/client/primate in browser
77+
mkdir -p /usr/share/cloudstack-management/webapp/
78+
cp -vr . /usr/share/cloudstack-management/webapp/
79+
# Access UI at {management-server}:8080/client in browser
8080

8181
If the webapp directory is changed, please change the `webapp.dir` in the
8282
`/etc/cloudstack/management/server.properties` and restart the management server host.
8383

8484
To use a separate webserver, note that the API server is accessed through the path
8585
`/client`, which needs be forwarded to an actual CloudStack instance.
8686

87-
For example, a simple way to serve Primate with nginx can be implemented with the
87+
For example, a simple way to serve UI with nginx can be implemented with the
8888
following nginx configuration (to be put into /etc/nginx/conf.d/default.conf or similar):
8989

9090
```nginx
9191
server {
9292
listen 80;
9393
server_name localhost;
9494
location / {
95-
# /src/primate/dist contains the built Primate webpack
96-
root /src/primate/dist;
95+
# /src/ui/dist contains the built UI webpack
96+
root /src/ui/dist;
9797
index index.html;
9898
}
9999
location /client/ {
@@ -107,18 +107,17 @@ server {
107107
### Docker
108108

109109
A production-ready Docker container can also be built with the provided
110-
Dockerfile and build script. Official builds are available here:
111-
https://hub.docker.com/r/apache/cloudstack-primate
110+
Dockerfile and build script.
112111

113112
Make sure Docker is installed, then run:
114113

115-
bash tools/docker.sh
114+
bash docker.sh
116115

117116
Change the example configuration in `nginx/default.conf` according to your needs.
118117

119-
Run Primate:
118+
Run UI:
120119

121-
docker run -ti --rm -p 8080:80 -v $(pwd)/nginx:/etc/nginx/conf.d:ro cloudstack-primate:latest
120+
docker run -ti --rm -p 8080:80 -v $(pwd)/nginx:/etc/nginx/conf.d:ro cloudstack-ui:latest
122121

123122
### Packaging
124123

@@ -138,13 +137,13 @@ docker container:
138137

139138
- VueJS Guide: https://vuejs.org/v2/guide/
140139
- Vue Ant Design: https://www.antdv.com/docs/vue/introduce/
141-
- Primate Developer [Docs](docs)
140+
- UI Developer [Docs](docs)
142141
- JavaScript ES6 Reference: https://www.tutorialspoint.com/es6/
143142
- Introduction to ES6: https://scrimba.com/g/gintrotoes6
144143

145144
## Attributions
146145

147-
Primate uses the following:
146+
The UI uses the following:
148147

149148
- [VueJS](https://vuejs.org/)
150149
- [Ant Design Spec](https://ant.design/docs/spec/introduce)
@@ -156,13 +155,16 @@ Primate uses the following:
156155

157156
## History
158157

159-
The project was created by [Rohit Yadav](https://rohityadav.cloud) over several
160-
weekends during late 2018 and early 2019. During ApacheCon CCCUS19, on 9th
161-
September 2019, Primate was introduced and demoed as part of the talk [Modern UI
158+
The modern UI, originally called Primate, was created by [Rohit
159+
Yadav](https://rohityadav.cloud) over several weekends during late 2018 and
160+
early 2019. During ApacheCon CCCUS19, on 9th September 2019, Primate was
161+
introduced and demoed as part of the talk [Modern UI
162162
for CloudStack](https://rohityadav.cloud/files/talks/cccna19-primate.pdf)
163163
([video](https://www.youtube.com/watch?v=F2KwZhechzs)).
164164
[Primate](https://markmail.org/message/vxnskmwhfaagnm4r) was accepted by the
165-
Apache CloudStack project on 21 Oct 2019.
165+
Apache CloudStack project on 21 Oct 2019. The original repo was [merged with the
166+
main apache/cloudstack](https://markmail.org/message/bgnn4xkjnlzseeuv) repo on
167+
20 Jan 2021.
166168

167169
## License
168170

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ LABEL_DATE="--label \"org.opencontainers.image.created=${DATE}\""
3030
GIT_REV="$(git rev-parse HEAD)"
3131
LABEL_GIT_REV="--label \"org.opencontainers.image.revision=${GIT_REV}\""
3232

33-
docker build -t cloudstack-primate ${LABEL_DATE} ${LABEL_GIT_REV} ${LABEL_GIT_TAG} ..
33+
docker build -t cloudstack-ui ${LABEL_DATE} ${LABEL_GIT_REV} ${LABEL_GIT_TAG} .

ui/docs/development.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Primate Development
1+
# UI Development
22

3-
Primate is a modern role-based progressive CloudStack UI based on VueJS and Ant Design..
3+
The modern CloudStack UI is role-based progressive app that uses VueJS and Ant Design.
44

55
Javascript, VueJS references:
66
- https://www.w3schools.com/js/
@@ -29,8 +29,8 @@ The following tree shows the basic UI codebase filesystem:
2929
Clone the repository:
3030

3131
```
32-
git clone https://github.com/apache/cloudstack-primate.git
33-
cd cloudstack-primate
32+
git clone https://github.com/apache/cloudstack.git
33+
cd cloudstack/ui
3434
npm install
3535
```
3636
Override the default `CS_URL` to a running CloudStack management server:
@@ -200,7 +200,7 @@ For example:
200200
## Resource Detail View Customization
201201

202202
From the List View of the resources, on can navigate to the individual
203-
resource's detail view, which in CloudStack Primate we refer to as the
203+
resource's detail view, which in CloudStack UI we refer to as the
204204
*Resource View* by click on the specific resource.
205205
The Resource View has 2 sections:
206206
- InfoCard to the left that has basic / minimal details of that resource along
@@ -229,4 +229,4 @@ For example,
229229
]
230230
```
231231

232-
Additional tabs can be defined by adding on to the tabs section.
232+
Additional tabs can be defined by adding on to the tabs section.

ui/packaging/debian/cloudstack-primate.install renamed to ui/nginx.conf

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,16 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
/usr/share/cloudstack-management/webapp/primate/*
18+
server {
19+
listen 80;
20+
server_name localhost;
21+
location / {
22+
root /usr/share/nginx/html;
23+
index index.html;
24+
}
25+
location /client/ {
26+
# http://127.0.0.1:8080 should be replaced your CloudStack management
27+
# Server's actual URI
28+
proxy_pass http://127.0.0.1:8080;
29+
}
30+
}

ui/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ui/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"name": "primate",
2+
"name": "cloudstack-ui",
33
"description": "Modern role-based Apache CloudStack UI",
44
"version": "1.0.0",
55
"homepage": "https://cloudstack.apache.org/",
66
"repository": {
77
"type": "git",
8-
"url": "https://github.com/apache/cloudstack-primate.git"
8+
"url": "https://github.com/apache/cloudstack.git"
99
},
1010
"author": {
1111
"name": "Apache CloudStack Developers",
@@ -21,7 +21,7 @@
2121
],
2222
"bugs": {
2323
"mail": "dev@cloudstack.apache.org",
24-
"url": "https://github.com/apache/cloudstack-primate/issues"
24+
"url": "https://github.com/apache/cloudstack/issues"
2525
},
2626
"scripts": {
2727
"start": "vue-cli-service lint --no-fix && vue-cli-service serve",

0 commit comments

Comments
 (0)