Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration of Development branch to Master branch for RC2. Release tag will be v0.7.0-Daito-RC2 #243

Merged
merged 56 commits into from
Dec 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
8fdc013
PUT/GET/DELETE lifecycle configurations
Nov 13, 2019
c3b68f1
Fixes #206. Added changes to create profile as per refactored API
anvithks Nov 15, 2019
3f4c559
[FEATURE] Fixes #199 and #201. Added SSE and Versioning feature.
anvithks Nov 16, 2019
179ca0e
Fixed Build error. Added missing setEncryption function.
anvithks Nov 16, 2019
8dee04f
Added selected Encryption value to be updated dynamically.
anvithks Nov 18, 2019
672f874
Fixes #209. Added Host attach and Detach to Volume.
anvithks Nov 19, 2019
0c8df9f
Fixed modal title for detach host.
anvithks Nov 19, 2019
67a9928
Made some fixes after integration testing with live backend.
anvithks Nov 20, 2019
7369be9
Addressed review comments. Changed some fields to not required. Chang…
anvithks Nov 21, 2019
423fbad
Minor change in label width.
anvithks Nov 21, 2019
6ef4971
Updated the PR with encryption changes. Removed Version code.
anvithks Nov 22, 2019
8b7dda6
Removed the version control from create bucket dialog
anvithks Nov 22, 2019
8b763a3
Added Host list in volume details. Fixed some issues in Attach and De…
anvithks Nov 22, 2019
79785d6
Fixed error reporting issue.
anvithks Nov 22, 2019
0afed07
[FEATURE] Fixes #205. Added Host management feature. (#210)
anvithks Nov 22, 2019
66c9ce1
Merge branch 'development' into vol-attachment
anvithks Nov 22, 2019
6c62027
Update keyID.json
anvithks Nov 22, 2019
8f6c1bd
Merge pull request #212 from anvithks/vol-attachment
kumarashit Nov 22, 2019
9f6e538
Removed commented code.
anvithks Nov 23, 2019
e2c7683
removed unused code. removed version related code.
anvithks Nov 23, 2019
f8a25ff
Removed version related code.
anvithks Nov 23, 2019
6dcb160
Added missing booleans for encryptions type
anvithks Nov 23, 2019
985b313
Fixed broken build due to missing versioning variables.
anvithks Nov 23, 2019
a893547
Fixed build errors.
anvithks Nov 23, 2019
58e9ad1
Merge pull request #211 from anvithks/multicloud-version-sse
kumarashit Nov 23, 2019
105f70d
Fixes #201. Added versioning at bucket level.
anvithks Nov 24, 2019
5d72a70
Added missing code for suspendVersioning to service file
anvithks Nov 24, 2019
6e3fe38
Updated the ReadMe with development setup steps
anvithks Nov 25, 2019
ee6c53e
Removed sudo from the npm install command
anvithks Nov 25, 2019
4cdfc89
Merge pull request #217 from anvithks/versioning
skdwriting Nov 26, 2019
b7dcca5
Merge pull request #208 from anvithks/hotpot-refactored
kumarashit Nov 27, 2019
5ff22ac
Merge pull request #207 from yuejuSDS/new_dev
kumarashit Nov 28, 2019
a36a347
Fixes #214. User can select the host from available list in volume pr…
anvithks Nov 28, 2019
a584fea
Fixed incorrect accessProtocol values in create Profile. Uppercase va…
anvithks Dec 2, 2019
09cae18
Fixed Object listing page to match changed Backend response
anvithks Dec 3, 2019
4a14daa
Merge pull request #223 from anvithks/development
kumarashit Dec 3, 2019
c6adc4c
Fixes #225. Fix Display host details.
anvithks Dec 4, 2019
b23f015
Fixes #227. Fixed host dropdown in volume provision service.
anvithks Dec 4, 2019
c8e8370
Added date pipes to created and modified time. Fixed some display and…
anvithks Dec 4, 2019
4611968
Fixes #229. Added Missing Label in Attach host and other style issues.
anvithks Dec 4, 2019
d3ad5b2
Merge pull request #226 from anvithks/host-details225
kumarashit Dec 4, 2019
7bb8daf
Merge pull request #228 from anvithks/orch-dropdown
kumarashit Dec 4, 2019
808fe5d
Merge pull request #230 from anvithks/fix229-attach-host
wisererik Dec 5, 2019
e235f9a
Added ESXi OS type and added Host to Main Menu description
anvithks Dec 6, 2019
04656ac
[FEATURE] Fixes #213. Added modify feature for user-added host.
anvithks Dec 7, 2019
2b3313e
Merge pull request #231 from anvithks/development
kumarashit Dec 8, 2019
d92e1f9
Merge pull request #218 from opensds/anvithks-updated-readme
kumarashit Dec 8, 2019
b635712
Merge pull request #234 from anvithks/modifyHost
wisererik Dec 9, 2019
b570666
Fixes #235. Fixed the Create Replication Dialog layout issue.
anvithks Dec 9, 2019
501c350
Fixes #236. Fixed the null value sent in description field in Create …
anvithks Dec 9, 2019
d7a263e
Fixed the create and modify volume group form reset
anvithks Dec 9, 2019
28eb870
Fixed a bug in modify volume group.
anvithks Dec 9, 2019
d34f5af
Fixes #240. Fixed Delete bucket and object to match changed backend r…
anvithks Dec 12, 2019
e7bf40a
Merge pull request #241 from anvithks/fixes240
kumarashit Dec 12, 2019
863eecd
Merge pull request #238 from anvithks/fix236
kumarashit Dec 12, 2019
4a95cdf
Merge pull request #237 from anvithks/fix235
kumarashit Dec 12, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 89 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,129 @@
# Summary
OpenSDS dashboard uses the front-end development framework Angular5 (https://angular.io/)
and relies on PrimeNG UI Components (https://www.primefaces.org/primeng/). Regardless of
deployment or two development, prepare the corresponding environment.
and relies on PrimeNG UI Components (https://www.primefaces.org/primeng/).

# Prerequisite

### 1. Ubuntu
## 1. Ubuntu
* Version information
```shell
root@proxy:~# cat /etc/issue
Ubuntu 16.04.2 LTS \n \l
```

### 2. Nginx installation
```shell
sudo apt-get install -y nginx
```

### 3. NodeJS installation, NPM will be installed with nodejs.
## 2. NodeJS installation, NPM will be installed with nodejs.
```shell
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
```

### 4. Angular CLI installation
## 3. Angular CLI installation
Specify the version[1.7.4] of angular5 suitable for installation.
```shell
sudo npm install -g @angular/cli@1.7.4
```
## 4. Nginx installation (Optional)
To be used for testing the build using `ng build`. For development a local npm server is enough (explained below)
```shell
sudo apt-get install -y nginx
```


# Build & Start
### 1. Git clone dashboard code.
## 1. Git clone dashboard code.
```shell
git clone https://github.com/opensds/opensds-dashboard.git
```
Switch to appropriate branch or release tag. (`master`, `development` or the release tag)

## 2. Build opensds dashboard.
### 2.1 **For local development** a local npm server can be started. This will allow to run a local server and make changes to the code and use the live reload feature to see code changes on the fly.

#### Configure local proxy
Open the `proxy.conf.json ` file located in the document root and update the IP addresses with the appropriate endpoints where the OpenSDS components are installed (usually machine IP or VM IP)
```shell
cd opensds-dashboard
nano proxy.conf.json
```
The contents of the proxy.conf.json files are :
```
{
"/v1beta": {
"target": "http://139.159.150.240:50040",
"secure": false
},
"/v1": {
"target": "http://139.159.150.240:8089",
"secure": false
},
"/v3": {
"target": "http://139.159.150.240/identity",
"secure": false
}
}
```

To enable debug mode and to check log messages replace the content with the following. The `/orch` block is needed to test Orchestration services if orchestration is enabled in the setup.
```
{
"/v1beta": {
"target": "http://192.168.56.123:50040",
"secure": false,
"logLevel" : "debug"
},
"/orch" : {
"target": "http://192.168.56.123:5000",
"secure": false,
"logLevel" : "debug",
"changeOrigin" : true,
"pathRewrite" : {
"^/orch/" : "/v1beta/"
}
},
"/v1": {
"target": "http://192.168.56.123:8089",
"secure": false,
"logLevel" : "debug"
},
"/v3": {
"target": "http://192.168.56.123/identity",
"secure": false,
"logLevel" : "debug"
}
}
```

#### Start the live development server
```shell
npm install
npm start
```
This will start a NG Live development server and can be accessed at http://localhost:4200/

Make any changes in the code and the server will live reload. If this fails then run the below commands.
```shell
sudo sysctl fs.inotify.max_user_watches=524288
systemd-sysusers # (1)
```

### 2.2 **Alternatively the dashboard code can be built and deployed.**

### 2. Build opensds dashboard.
After the build work finished, the files in the `dist` folder should be copied to the folder ` /var/www/html/`.
Use the commands below to build the dashboard code.
```shell
cd opensds-dashboard
sudo npm install
sudo ng build --prod
```
After the build is successful, the files in the `dist` folder should be copied to the folder ` /var/www/html/`.

```shell
cp -R opensds-dashboard/dist/* /var/www/html/
```

### 3. Set nginx default config.
## 3. Set nginx default config. (optional)
```shell
vi /etc/nginx/sites-available/default
```
Configure proxy, points to the resource server, multi-cloud server and the authentication server respectively.
Configure proxy, points to the resource server, multi-cloud server and the authentication server respectively. (replace 1.1.1.0 with the appropriate endpoints)
Parameter 'client_max_body_size' configuration supports uploaded file size.
Such as:
* Keystone server `http://1.1.1.0/identity`
Expand All @@ -73,12 +144,12 @@ location /v1/ {
}
```

### 4. Restart nginx
## 4. Restart nginx (optional)
```shell
service nginx restart
```

### 5. Access dashboard in browser.
## 5. Access dashboard in browser. (optional)
```shell
http://localhost/
```
16 changes: 15 additions & 1 deletion src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { HostsResolver } from './business/block/modify-host/host-resolver.service';
import { AzResolver } from './business/block/modify-host/az-resolver.service';

const routes: Routes = [
{path: '', redirectTo: '/home', pathMatch: 'full'},
{path: 'home', loadChildren: './business/home/home.module#HomeModule'},
{path: 'block', loadChildren: './business/block/block.module#BlockModule'},
{path: 'createVolume', loadChildren: './business/block/create-volume/create-volume.module#CreateVolumeModule'},
{path: 'volumeDetails/:volumeId', loadChildren: './business/block/volume-detail/volume-detail.module#VolumeDetailModule'},
{path: 'createHost', loadChildren: './business/block/create-host/create-host.module#CreateHostModule'},
{path: 'modifyHost/:hostId', loadChildren: './business/block/modify-host/modify-host.module#ModifyHostModule',
resolve: {
host: HostsResolver,
az: AzResolver
}
},
{path: 'hostDetails/:hostId', loadChildren: './business/block/host-detail/host-detail.module#HostDetailModule'},
{path: 'cloud', loadChildren: './business/cloud/cloud.module#CloudModule'},
{path: 'profile', loadChildren: './business/profile/profile.module#ProfileModule'},
{path: 'createProfile', loadChildren: './business/profile/createProfile/createProfile.module#CreateProfileModule'},
Expand All @@ -26,6 +36,10 @@ const routes: Routes = [

@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
exports: [RouterModule],
providers: [
HostsResolver,
AzResolver
]
})
export class AppRoutingModule {}
4 changes: 2 additions & 2 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export class AppComponent implements OnInit, AfterViewInit {
},
{
"title": "Resource",
"description": "Volumes / Buckets / File Share",
"description": "Volumes / Buckets / File Share / Hosts",
"routerLink": "/block"
},
{
Expand Down Expand Up @@ -111,7 +111,7 @@ export class AppComponent implements OnInit, AfterViewInit {
},
{
"title": "Resource",
"description": "Volumes / Buckets / File Share",
"description": "Volumes / Buckets / File Share / Hosts",
"routerLink": "/block"
},
{
Expand Down
42 changes: 42 additions & 0 deletions src/app/business/block/attach.service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { Injectable } from '@angular/core';
import { I18NService, HttpService, ParamStorService } from '../../shared/api';
import { Observable } from 'rxjs';

@Injectable()
export class AttachService {
constructor(
private http: HttpService,
private paramStor: ParamStorService
) { }

url = 'v1beta/{project_id}/block/attachments';


//Fetch all Attachments
getAttachments(): Observable<any> {
return this.http.get(this.url);
}

//Fetch Attachment by ID
getAttachmentById(id): Observable<any> {
let attachIdUrl = this.url + '/' + id
return this.http.get(attachIdUrl);
}
//Create Attachment
createAttachment(param) {
return this.http.post(this.url, param);
}

//Update Attachment
modifyAttachments(id,param) {
let modifyUrl = this.url + '/' + id
return this.http.put(modifyUrl, param);
}

//Delete Attachment
deleteAttachment(id): Observable<any> {
let deleteUrl = this.url + '/' + id
return this.http.delete(deleteUrl);
}

}
2 changes: 2 additions & 0 deletions src/app/business/block/block.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export class BlockComponent implements OnInit{
showDropDown:boolean = false;
fromVolume:boolean = false;
fromFileShare:boolean = false;
fromHosts: boolean = false;
countItems = [];
constructor(
public I18N: I18NService,
Expand All @@ -54,6 +55,7 @@ export class BlockComponent implements OnInit{
this.fromBuckets = params.fromRoute === "fromBuckets";
this.fromVolume = params.fromRoute === "fromVolume";
this.fromFileShare = params.fromRoute === "fromFileShare";
this.fromHosts = params.fromRoute === "fromHosts";
}
);
}
Expand Down
6 changes: 6 additions & 0 deletions src/app/business/block/block.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,11 @@
</div>
<app-file-share></app-file-share>
</p-tabPanel>
<p-tabPanel header="Hosts" [selected]="fromHosts">
<div class="content-header">
<p>{{I18N.keyID['sds_block_hosts_descrip']}}</p>
</div>
<app-hosts></app-hosts>
</p-tabPanel>

</p-tabView>
2 changes: 2 additions & 0 deletions src/app/business/block/block.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { VolumeListModule } from './volumeList.module';
import { VolumeGroupModule } from './volumeGroup.module';
import { BucketsModule } from './buckets.module';
import { FileShareModule } from './fileShare.module';
import { HostsModule } from './hosts.module';
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
import { CommonModule } from '@angular/common';

Expand All @@ -26,6 +27,7 @@ let routers = [{
ButtonModule,
BucketsModule,
FileShareModule,
HostsModule,
ReactiveFormsModule,
FormsModule,
CommonModule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</div>
<p-dataTable [value]="allDir" [globalFilter]="searchByName" [(selection)]="selectedDir" [showHeaderCheckbox]="true" resizableColumns="true" [rows]="10" [paginator]="true" [pageLinks]="3" [rowsPerPageOptions]="[10,20,50,100]">
<p-column selectionMode="multiple" [style]="{'width': '60px'}"></p-column>
<p-column field="ObjectKey" header="{{I18N.keyID['sds_block_volume_name']}}" [style]="{'width': '170px'}" >
<p-column field="Key" header="{{I18N.keyID['sds_block_volume_name']}}" [style]="{'width': '170px'}" >
<ng-template pTemplate="body" let-file="rowData" let-i="rowIndex">
<a *ngIf="file.newFolder" title="{{file.objectName}}" (click)="folderLink(file)">
<img style="vertical-align: middle;" src="assets/business/images/volume/icon_folder.png">
Expand All @@ -35,7 +35,7 @@
</ng-template>
</p-column>
<p-column field="size" header="Size" [style]="{'width': '120px'}"></p-column>
<p-column field="Backend" header="Location" [style]="{'width': '120px'}" ></p-column>
<p-column field="Location" header="Location" [style]="{'width': '120px'}" ></p-column>
<p-column field="Tier" header="Tier" ></p-column>
<p-column field="lastModified" header="Last Modified"></p-column>
<p-column header="{{I18N.keyID['sds_block_volume_operation']}}" [style]="{'width': '180px'}">
Expand Down
Loading