Skip to content
This repository has been archived by the owner on Mar 25, 2023. It is now read-only.

Commit

Permalink
#49 update to master
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladimir Shakhov committed Jul 12, 2017
2 parents 20de78c + 070bce2 commit 4d99903
Show file tree
Hide file tree
Showing 341 changed files with 9,559 additions and 3,483 deletions.
59 changes: 59 additions & 0 deletions .angular-cli.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"project": {
"name": "cloudstack-ui"
},
"apps": [
{
"root": "src",
"outDir": "dist",
"assets": [
"config",
"i18n",
"css",
"img"
],
"index": "index.html",
"main": "main.ts",
"polyfills": "polyfills.ts",
"test": "test.ts",
"tsconfig": "tsconfig.app.json",
"testTsconfig": "tsconfig.spec.json",
"prefix": "cs",
"styles": [
"style/app.scss"
],
"scripts": [],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
}
],
"e2e": {
"protractor": {
"config": "./protractor.conf.js"
}
},
"lint": [
{
"project": "src/tsconfig.app.json"
},
{
"project": "src/tsconfig.spec.json"
},
{
"project": "e2e/tsconfig.e2e.json"
}
],
"test": {
"karma": {
"config": "./karma.conf.js"
}
},
"defaults": {
"styleExt": "scss",
"component": {}
}
}
3 changes: 2 additions & 1 deletion .build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ VOLUME /config/

COPY .build/nginx.conf /etc/nginx/conf.d/default.conf
COPY .build/startup.sh /etc/nginx/startup.sh
COPY dist /var/www/dist
COPY dist /static
RUN chmod 777 /etc/nginx/startup.sh
RUN apk add --update curl

CMD ["/bin/sh", "-e", "/etc/nginx/startup.sh"]
6 changes: 3 additions & 3 deletions .build/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ server {
expires -1;
add_header Pragma "no-cache";
add_header Cache-Control "no-store, no-cache, must-revalidate, post-check=0 pre-check=0";
root /var/www/dist;
root /static;
try_files $uri $uri/ /index.html =404;
}

location /client/api {
proxy_pass API_BACKEND_URL/client/api;
proxy_pass API_BACKEND_URL;
}

location /client/console {
proxy_pass API_BACKEND_URL/client/console;
proxy_pass CONSOLE_BACKEND_URL;
}

gzip on;
Expand Down
6 changes: 4 additions & 2 deletions .build/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@ if [ -z "$DEPLOY_PORT" ]; then
fi

if [ -n "$CONFIG_PATH" ]; then
export CONFIG_MOUNT="-v ${CONFIG_PATH}:/config";
export CONFIG_MOUNT="-v ${CONFIG_PATH}:/static/config/config.json";
else
export CONFIG_MOUNT="";
fi

if [ $# -eq 0 ]; then
export API=$API_BACKEND_URL;
export CONSOLE=$CONSOLE_BACKEND_URL;
else
export API=$1;
export CONSOLE=$2;
fi

# Generate container name unique for port
Expand All @@ -30,4 +32,4 @@ fi

# Starting server
echo ******Starting Nginx******
docker run -e "API_BACKEND_URL=$API" -d -p $DEPLOY_PORT:80 --name $CONTAINER_NAME $CONFIG_MOUNT bwsw/cloudstack-ui;
docker run -e "API_BACKEND_URL=$API" -e "CONSOLE_BACKEND_URL=$CONSOLE" -d -p $DEPLOY_PORT:80 --name $CONTAINER_NAME $CONFIG_MOUNT bwsw/cloudstack-ui;
27 changes: 24 additions & 3 deletions .build/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,28 @@

# replace placeholders
sed -i -e 's#API_BACKEND_URL#'"$API_BACKEND_URL"'#g' /etc/nginx/conf.d/default.conf
if [ -e '/config/config.json' ]; then
mkdir -p /var/www/dist/config && cp /config/config.json /var/www/dist/config
sed -i -e 's#CONSOLE_BACKEND_URL#'"$CONSOLE_BACKEND_URL"'#g' /etc/nginx/conf.d/default.conf

# add base href
if [ -n "$BASE_HREF" ]; then
sed -i -e 's#"/"#'"$BASE_HREF"'#g' /static/index.html
fi

# check if API is available
if [ -z $API_BACKEND_URL ]; then
echo "No API backend address specified"
exit 1
fi

if [ -z $CONSOLE_BACKEND_URL ]; then
echo "No console backend address specified"
exit 1
fi

API_STATUS=$(curl -s -o /dev/null -w "%{http_code}" --connect-timeout 10 $API_BACKEND_URL)
CONSOLE_STATUS=$(curl -s -o /dev/null -w "%{http_code}" --connect-timeout 10 $CONSOLE_BACKEND_URL)
if [ $API_STATUS -ne "404" ] && [ $CONSOLE_STATUS -ne "404" ] && [ $API_STATUS -ne "000" ] && [ $CONSOLE_STATUS -ne "000" ] ; then
nginx -g 'daemon off;'
else
echo "Backend server is not available"
fi
nginx -g 'daemon off;'
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<a name="1.0.5"></a>
## 1.0.5 (2017-07-12)

Features, Enhancements

|#ticket|What was done|
|---|---|
|[#246](https://github.com/bwsw/cloudstack-ui/issues/246)|Warning message appears in case of VM start fail|
|[#230](https://github.com/bwsw/cloudstack-ui/issues/230)|Reload icon for VM statistics pane in a sidebar is implemented|
|[#224](https://github.com/bwsw/cloudstack-ui/issues/224)|VM Group change dialog is upgraded|
|[#225](https://github.com/bwsw/cloudstack-ui/issues/225)|Affinity Group change dialog is upgraded|
|[#197](https://github.com/bwsw/cloudstack-ui/issues/197)|A contrast circle around state bullet is added|
|[#116](https://github.com/bwsw/cloudstack-ui/issues/116)|SSH keys (re)setting in VM detailed sidebar is implemented|
|[#20](https://github.com/bwsw/cloudstack-ui/issues/20)|Parameters are configurable in json config|

Bugs fixed

|#ticket|What was done|
|---|---|
|[#254](https://github.com/bwsw/cloudstack-ui/issues/254)|Empty event list problem is fixed|
|[#232](https://github.com/bwsw/cloudstack-ui/issues/232)|Incorrect Activity Log Date bug is fixed|
|[#231](https://github.com/bwsw/cloudstack-ui/issues/231)|A tooltip is added for Regenerate keys action icon in Settings|
|[#228](https://github.com/bwsw/cloudstack-ui/issues/228)|Configured logout timeout bug is fixed|
|[#223](https://github.com/bwsw/cloudstack-ui/issues/223)|VM color picker bug is fixed|

---

<a name="1.0.4"></a>
## 1.0.4 (2017-06-27)



46 changes: 46 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at info@bw-sw.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ COPY .build/nginx.conf /etc/nginx/conf.d/default.conf
COPY .build/startup.sh /etc/nginx/startup.sh
COPY . /tmp/cloudstackui
RUN apk update && \
apk add --update nodejs python make g++ && \
apk add --update nodejs python make g++ curl && \
cd /tmp/cloudstackui && \
npm i && npm run build:aot && \
mkdir -p /var/www/dist && cp -R dist /var/www/ && chmod 777 /etc/nginx/startup.sh \
mkdir -p /static && cp -R dist/. /static/ && \
chmod 777 /etc/nginx/startup.sh && chmod 755 /static \
&& rm -rf /tmp/cloudstackui \
&& apk del nodejs python make g++

Expand Down
60 changes: 37 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Table of Contents
=================

* [Cloudstack UI](#cloudstack-ui)
* [CloudStack-UI](#cloudstack-ui)
* [Project Story](#project-story)
* [Implementation Details](#implementation-details)
* [Features Supported](#features-supported)
Expand All @@ -27,36 +27,39 @@ Table of Contents
* [How to Contribute](#how-to-contribute)
* [License](#license)

# Cloudstack UI
# CloudStack-UI

Cloudstack UI is a project whose purpose is to develop an easy-to-use, light, and user friendly frontend interface for the [Apache Cloudstack](http://cloudstack.apache.org/) virtualization management system. Apache Cloudstack itself is a great product which is used very widely, but its frontend is developed for administrators (from our point of view), not for end cloud users. Some of the interactions are not straightforward and unnatural to an average user and require quite a long time to adapt. Other reasons to develop are connected with a lack of functions like virtual machine statistics & charting, sophisticated resource accounting, and application management. These are in our long-term TODO list.
CloudStack-UI is a project whose purpose is to develop an easy-to-use, light, and user friendly frontend interface for the [Apache CloudStack](http://cloudstack.apache.org/) virtualization management system. Apache CloudStack itself is a great product which is used very widely, but its frontend is developed for administrators (from our point of view), not for end cloud users. Some of the interactions are not straightforward and unnatural to an average user and require quite a long time to adapt. Other reasons to develop are connected with a lack of functions like virtual machine statistics & charting, sophisticated resource accounting, and application management. These are in our long-term TODO list.

## Project Story

At [Bitworks Software](https://bitworks.software/), we run an ACS public cloud for 3 years (actually we still run CS 4.3 cloud in production) and we found that average users who are familiar with Digital Ocean, Amazon AWS, and other VPS management systems feel uncomfortable with original Cloudstack UI and make a lot of operational mistakes. That’s why we decided to implement a convenient and neat end-user facing UI covering regular activities, which are important for day-to-day VM management.
At [Bitworks Software](https://bitworks.software/), we run an ACS public cloud for 3 years (actually we still run CS 4.3 cloud in production) and we found that average users who are familiar with Digital Ocean, Amazon AWS, and other VPS management systems feel uncomfortable with original CloudStack UI and make a lot of operational mistakes. That’s why we decided to implement a convenient and neat end-user facing UI covering regular activities, which are important for day-to-day VM management.

The project is developed by Bitworks Software Frontend Division within the educational marathon, which has the purpose to incorporate our new team members and show them our standard frontend development instrument.

## Implementation Details

* Designed compatible with [Apache Cloudstack](http://cloudstack.apache.org/) 4.9 and hasn't tested for the previous versions of CS
* Designed compatible with [Apache CloudStack](http://cloudstack.apache.org/) 4.9 and hasn't tested for the previous versions of CS
* Powered by [Angular 2](https://angular.io/) and [Google Material Design Lite](https://getmdl.io/)
* Tested and works fine in next modern browsers
* Google Chrome 56.0.2924.76
* Chromium 53.0.2785.143

## Features Supported

Actual Changelog can be found in GitHub's [wiki](https://github.com/bwsw/cloudstack-ui/wiki/Changelog).

Since we designed the product from the perspective of well-known use cases, which are common to our public cloud deployment, we implemented only ones which are 100% required and cover most of use cases. Other deployments may imply other requirements, which is why it’s an open source product.

So, what is supported:

* Basic Cloudstack zones with virtual router
* Basic CloudStack zones with virtual router
* Security groups
* KVM Hypervisor
* Security group templates
* Multiple zones
* Virtual machine standard operations supported by Apache Cloudstack
* CloudStackAccount Domains
* Virtual machine standard operations supported by Apache CloudStack
* Root and Data disks management
* Ad-hoc snapshots for disks
* Affinity groups management
Expand All @@ -66,20 +69,19 @@ So, what is supported:
* Custom and Fixed service and disk offerings
* Password management
* SSH keys management
* API keys management
* A lot of small improvements which affect user experience greatly

## Features Yet Unsupported

We intensively use features like projects in our own Cloudstack cloud to manage resources dedicated to project groups, etc. but generic users don’t need them, so we don’t support the following features yet:
We intensively use features like projects in our own CloudStackcloud to manage resources dedicated to project groups, etc. but generic users don’t need them, so we don’t support the following features yet:

* Advanced Zones
* Hypervisors other than KVM have not been tested

## Current To Dos

* Projects
* Responsive interface for smart devices
* API keys management
* A lot of small improvements which affect user experience greatly

## Long Term To Dos

Expand All @@ -98,7 +100,7 @@ We intensively use features like projects in our own Cloudstack cloud to manage

#### Login view

Just a simple login screen. Nothing really new. But it has a nice preloader which can be used to brand it for specific company. By default it shows Apache Cloudstack banner.
Just a simple login screen. Nothing really new. But it has a nice preloader which can be used to brand it for specific company. By default it shows Apache CloudStack banner.

<a href="https://raw.githubusercontent.com/bwsw/cloudstack-ui/master/screens/loginView.png" target="_blank">![Login screen](./screens/loginView_mini.png)</a>

Expand Down Expand Up @@ -159,27 +161,33 @@ It’s a simplified view for account activities. It lets you choose the date and

### Main UI container

To run docker container with default configuration options use:
To run docker container use:

```
docker run -d -p 80:80 --name cloudstack-ui \
-e API_BACKEND_URL=http://link_to_api_endpoint/ \
-e API_BACKEND_URL=http://link/to/api/endpoint \
-e CONSOLE_BACKEND_URL=http://link/to/console/endpoint \
-e BASE_HREF=base_href \
-v /path/to/config.json:/static/config/config.json \
bwsw/cloudstack-ui
```

If you want to override default options use:
`http://link/to/api/endpoint` - URL of CloudStackAPI endpoint (e.g. http://host:8080/client/api)

```
docker run -d -p 80:80 --name cloudstack-ui \
-e API_BACKEND_URL=http://link_to_api_endpoint/ \
-v /my/config/path:/config \
bwsw/cloudstack-ui
```
`http://link/to/console/endpoint` - URL of CloudStackconsole endpoint (e.g. http://host:8080/client/console)

`http://link_to_api_endpoint` - url of ACS API
`base_href` - custom base URL (optional, defaults to "/")

`/my/config/path` - path to a directory with a custom configuration file named config.json.
`/path/to/config.json` - path to a custom configuration file named config.json (optional)

Additionally, you can change favicon and Cloudstack logo on login screen and in sidebar:
```
-v /path/to/favicon.ico:/static/img/favicon.ico \
-v /path/to/cloudstack_logo.png:/static/img/cloudstack_logo.png \
-v /path/to/cloudstack_logo_light.png:/static/img/cloudstack_logo_light.png \
-v /path/to/cloudstack_logo_dark.png:/static/img/cloudstack_logo_dark.png
```
where the `favicon.ico` is the favicon, `cloudstack_logo.png` is the logo displayed on login screen and `cloudstack_logo_light.png` and `cloudstack_logo_dark.png` are Cloudstack logos displayed in sidebar with dark and light theme respectively.
### Assisting object cleanup container

Some operations implemented in the UI require "delayed" activities, so we use additional cleaner container that cleans objects marked for the removal.
Expand All @@ -190,6 +198,12 @@ Download and start [bwsw/cloudstack-ui-cleaner](https://hub.docker.com/r/bwsw/cl

You can customize the application by providing your own configuration file (example link).

### Default domain URL

Domain URL used to fill the 'Domain' field in the login form

"defaultDomain": "domain"

### securityGroupTemplates:

Predefined templates for security groups. You can define your own security groups that will be available for all users by default. Format:
Expand Down
4 changes: 2 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
theme: jekyll-theme-cayman
title: Cloudstack-UI
description: Modern and lightweight management panel for Apache Cloudstack
title: CloudStack-UI
description: Modern and lightweight management panel for Apache CloudStack
Loading

0 comments on commit 4d99903

Please sign in to comment.