Skip to content

Commit

Permalink
Merge pull request #415 from anapolg/master
Browse files Browse the repository at this point in the history
Release tag, manage packages and OSM elements, slices management, test plans, dashboard fix
  • Loading branch information
anapolg committed Sep 5, 2019
2 parents 105a762 + d3b5e22 commit 60d5446
Show file tree
Hide file tree
Showing 47 changed files with 713 additions and 456 deletions.
111 changes: 68 additions & 43 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
pipeline {
agent any
stages {
agent any

stages {
stage('Setup npm') {
steps {
sh 'npm i'
}
}
stage('Test') {
stage('Test') {
steps {
sh 'npm run lint';
sh 'npm run scss-lint';
}
}
stage('Documentation') {
stage('Documentation') {
when {
branch 'master'
}
Expand All @@ -30,43 +30,68 @@ pipeline {
])
}
}
stage('Build Docker image') {
steps {
echo 'Test styles and building docker image...'
sh 'docker build --no-cache -f ./Dockerfile -t registry.sonata-nfv.eu:5000/tng-portal .'
}
}
stage('Publishing') {
steps {
echo 'Publishing docker image....'
sh 'docker push registry.sonata-nfv.eu:5000/tng-portal'
}
}
stage('Deploying in pre-int') {
steps {
echo 'Deploying in pre-integration....'
sh 'rm -rf tng-devops || true'
sh 'git clone https://github.com/sonata-nfv/tng-devops.git'
dir(path: 'tng-devops') {
sh 'ansible-playbook roles/sp.yml -i environments -e "target=pre-int-sp component=portal"'
sh 'ansible-playbook roles/vnv.yml -i environments -e "target=pre-int-vnv component=portal"'
}
}
}
stage('Deployment in Integration') {
when {
branch 'master'
}
steps {
sh 'docker tag registry.sonata-nfv.eu:5000/tng-portal:latest registry.sonata-nfv.eu:5000/tng-portal:int'
sh 'docker push registry.sonata-nfv.eu:5000/tng-portal:int'
sh 'rm -rf tng-devops || true'
sh 'git clone https://github.com/sonata-nfv/tng-devops.git'
dir(path: 'tng-devops') {
sh 'ansible-playbook roles/sp.yml -i environments -e "target=int-sp component=portal"'
stage('Build Docker image') {
steps {
echo 'Test styles and building docker image...'
sh 'docker build --no-cache -f ./Dockerfile -t registry.sonata-nfv.eu:5000/tng-portal .'
}
}
stage('Publishing') {
steps {
echo 'Publishing docker image....'
sh 'docker push registry.sonata-nfv.eu:5000/tng-portal'
}
}
stage('Deploying in pre-int') {
steps {
echo 'Deploying in pre-integration....'
sh 'rm -rf tng-devops || true'
sh 'git clone https://github.com/sonata-nfv/tng-devops.git'
dir(path: 'tng-devops') {
sh 'ansible-playbook roles/sp.yml -i environments -e "target=pre-int-sp component=portal"'
sh 'ansible-playbook roles/vnv.yml -i environments -e "target=pre-int-vnv component=portal"'
}
}
}
stage('Deployment in Integration') {
when {
branch 'master'
}
steps {
sh 'docker tag registry.sonata-nfv.eu:5000/tng-portal:latest registry.sonata-nfv.eu:5000/tng-portal:int'
sh 'docker push registry.sonata-nfv.eu:5000/tng-portal:int'
sh 'rm -rf tng-devops || true'
sh 'git clone https://github.com/sonata-nfv/tng-devops.git'
dir(path: 'tng-devops') {
sh 'ansible-playbook roles/sp.yml -i environments -e "target=int-sp component=portal"'
sh 'ansible-playbook roles/vnv.yml -i environments -e "target=int-vnv component=portal"'
}
}
}
}
}
}
}
stage('Promoting release v5.0') {
when {
branch 'v5.0'
}
stages {
stage('Generating release') {
steps {
sh 'docker tag registry.sonata-nfv.eu:5000/tng-portal:latest registry.sonata-nfv.eu:5000/tng-portal:v5.0'
sh 'docker tag registry.sonata-nfv.eu:5000/tng-portal:latest sonatanfv/tng-portal:v5.0'
sh 'docker push registry.sonata-nfv.eu:5000/tng-portal:v5.0'
sh 'docker push sonatanfv/tng-portal:v5.0'
}
}
stage('Deploying in v5.0 servers') {
steps {
sh 'rm -rf tng-devops || true'
sh 'git clone https://github.com/sonata-nfv/tng-devops.git'
dir(path: 'tng-devops') {
sh 'ansible-playbook roles/sp.yml -i environments -e "target=sta-sp-v5-0 component=portal"'
sh 'ansible-playbook roles/vnv.yml -i environments -e "target=sta-vnv-v5-0 component=portal"'
}
}
}
}
}
}
}
34 changes: 12 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,15 @@ There is also a version of the Portal for using the 5GTANGO Service Development

<p align="center"><img src="https://github.com/sonata-nfv/tng-portal/blob/master/src/assets/images/5GTANGO.gif" /></p>

## Dependencies
## Installation

Make sure that you have all the dependencies installed. Then, run the following command to install all the required modules.

```
npm install
```

### Dependencies

- Node.js >= v8.9

Expand All @@ -29,19 +37,9 @@ There is also a version of the Portal for using the 5GTANGO Service Development
[sudo] npm install -g @angular/cli
```

### Running dependencies

Requests made from the Portal in the development mode need the VPN in order to receive a response.
- Athens VPN credentials: requests made from the Portal in the development mode need the VPN in order to receive a response.

- Athens VPN credentials

## Installation

Make sure that you have all the dependencies installed. Then, run the following command to install all the required modules.

```
npm install
```
- Make sure you have installed [Docker](https://docs.docker.com/install/) >= 18.06.0-ce if you are going to deploy the Portal like this.

## Developing

Expand All @@ -62,15 +60,7 @@ If you want to launch a container locally, place yourself in the Dockerfile fold

The container should be up and running in http://0.0.0.0:80.

#### Exposed port in docker container

The port where the app will run when using the Docker container can be set in `./Dockerfile`. By default, 4200 is set.

#### Docker dependencies

Make sure you have installed Docker >= 18.06.0-ce

- [https://docs.docker.com/install/](https://docs.docker.com/install/)
*Note: The port where the app will run when using the Docker container can be set in `./Dockerfile`. By default, 4200 is set.*

## Configuration
Portal allows two different configurations: the base URL of the deployment and the displayed sections of the menu.
Expand Down
9 changes: 8 additions & 1 deletion src/app/app.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -719,4 +719,11 @@ ul.unordered-list .mat-input-element:disabled {
margin-left: 10px;
color: $secondary-font-color;
}
}
}

//////////////////////////////////////
// Generic styles
//////////////////////////////////////
.opening-item {
cursor: pointer;
}
4 changes: 2 additions & 2 deletions src/app/dashboard/dashboard.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ <h3 class="title3" i18n="@@availablePlatforms">Available platforms</h3>
<h3 class="title3" i18n="@@testsStatus">Tests status</h3>

<div class="text-box big">
<span class="title" i18n="@@executed">Executed</span>
<span class="number">{{ dashboardData['testsExecuted'] }}</span>
<span class="title" i18n="@@completed">Completed</span>
<span class="number">{{ dashboardData['testsCompleted'] }}</span>
</div>

<div class="text-box big">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ <h1 class="title1 title-section-name">{{ detail.name }}</h1>
<i class="wui wui-copy-alt"></i>
</button>
</mat-form-field>
<mat-form-field *ngIf="detail['serviceVersion']" class="right-column">
<input matInput placeholder="Service version" value="{{ detail['serviceVersion'] }}" [disabled]="true"
<mat-form-field *ngIf="detail['serviceVersion']" class="right-column" (click)="openService()">
<input matInput class="opening-item" placeholder="Service version" value="{{ detail['serviceVersion'] }}" [disabled]="true"
i18n-placeholder="@@serviceVersionPlaceholder" />
</mat-form-field>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ export class NsInstanceDetailComponent implements OnInit {
this.utilsService.copyToClipboard(value);
}

openService() {
this.router.navigate([ `service-management/network-services/services/${ this.detail[ 'serviceID' ] }` ]);
}

close() {
this.router.navigate([ '../' ], { relativeTo: this.route });
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ <h1 class="title1 title-section-name">{{ detail['name'] }}</h1>
</div>

<div class="same-row">
<mat-form-field *ngIf="detail['serviceName']" class="left-column">
<input matInput placeholder="Service Name" value="{{ detail['serviceName'] }}" disabled i18n="@@serviceNamePlaceholder" />
<mat-form-field *ngIf="detail['serviceName']" class="left-column" (click)="openService()">
<input matInput class="opening-item" placeholder="Service Name" value="{{ detail['serviceName'] }}" disabled
i18n="@@serviceNamePlaceholder" />
</mat-form-field>

<mat-form-field *ngIf="detail['serviceVersion']" class="right-column">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ export class RequestDetailComponent implements OnInit {
this.utilsService.copyToClipboard(value);
}

openService() {
this.router.navigate([ `service-management/network-services/services/${ this.detail[ 'serviceUUID' ] }` ]);
}

close() {
this.router.navigate([ '../' ], { relativeTo: this.route });
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ <h1 class="title1 title-section-name">{{ detail['name'] }}</h1>
</mat-form-field>

<div class="same-row">
<mat-form-field *ngIf="detail['nstName']" class="left-column">
<input matInput placeholder="Template name" value="{{ detail['nstName'] }}" disabled
<mat-form-field *ngIf="detail['nstName']" class="left-column" (click)="openTemplate()">
<input matInput class="opening-item" placeholder="Template name" value="{{ detail['nstName'] }}" disabled
i18n-placeholder="@@templateNamePlaceholder" />
</mat-form-field>
<mat-form-field *ngIf="detail['vendor']">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ export class SliceInstanceDetailComponent implements OnInit {
return this.detail[ 'uuid' ] && this.detail[ 'status' ].toUpperCase() === 'INSTANTIATED';
}

openTemplate() {
this.router.navigate([ `service-management/slices/slice-templates/${ this.detail[ 'nstRef' ] }` ]);
}

close() {
this.router.navigate([ '../' ], { relativeTo: this.route });
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ <h1 class="title1 title-section-name" i18n="@@availableNS">Available network ser
</ng-container>

<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns" (click)="openNetworkService(row.serviceId)"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns" (click)="openNetworkService(row.uuid)"></tr>
</table>

<div *ngIf="(!networkServices || !networkServices.length) && !loading" class="no-results-container">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class SmNetworkServicesComponent implements OnInit {

instantiate(row) {
this.instantiateDialog.open(NsInstantiateDialogComponent, {
data: { serviceUUID: row.serviceId, name: row.name }
data: { serviceUUID: row.uuid, name: row.name }
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ <h2 *ngIf="detail['services']" class="title2" i18n="@@networkServices">Network s
</ng-container>

<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns" (click)="openRow(row)"></tr>
</table>

<div *ngIf="(detail['services'] && !detail['services'].length) && !loading" class="no-results-container">
Expand All @@ -113,7 +113,7 @@ <h2 *ngIf="detail['services']" class="title2" i18n="@@networkServices">Network s

<h2 *ngIf="detail['sliceVirtualLinks']" class="title2" i18n="@@sliceVirtualLinks">Slice virtual links</h2>

<table *ngIf="detail['sliceVirtualLinks']" mat-table [dataSource]="detail['sliceVirtualLinks']">
<table *ngIf="detail['sliceVirtualLinks']" class="no-opening-table" mat-table [dataSource]="detail['sliceVirtualLinks']">
<ng-container matColumnDef="networkName">
<th mat-header-cell *matHeaderCellDef i18n="@@networkName">Network Name</th>
<td mat-cell *matCellDef="let element">{{ element.networkName }}</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,29 +35,29 @@ app-sm-slice-template-detail {
table {
width: 55vw;
margin-bottom: 50px;
}

tr.mat-row {
background-image: linear-gradient(
to right,
$basic-background-color 0%,
$table-underline-color 0%,
$table-underline-color 99%,
$basic-background-color 99%,
$basic-background-color 100%
);
}

td.mat-cell {
cursor: auto;
}
tr.mat-row {
background-image: linear-gradient(
to right,
$basic-background-color 0%,
$table-underline-color 0%,
$table-underline-color 99%,
$basic-background-color 99%,
$basic-background-color 100%
);
}
&.no-opening-table td.mat-cell {
cursor: auto;
}

.mat-cell:nth-child(6),
.mat-header-cell:nth-child(6) {
width: 16%;
padding-right: 0;
.mat-cell:nth-child(6),
.mat-header-cell:nth-child(6) {
width: 16%;
padding-right: 0;
}
}

// Styles for no instances message
.no-results-container {
align-self: center;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ export class SmSliceTemplateDetailComponent implements OnInit {
this.utilsService.copyToClipboard(value);
}

openRow(row) {
this.router.navigate([ `service-management/network-services/services/${ row.nsdRef }` ]);
}

close() {
this.router.navigate([ '../' ], { relativeTo: this.route });
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ <h1 class="title1 title-section-name">{{ detail['name'] }}</h1>
</div>

<div class="same-row">
<mat-form-field *ngIf="detail['nsName']" class="left-column">
<input matInput placeholder="Service Name" value="{{ detail['nsName'] }}" disabled
<mat-form-field *ngIf="detail['nsName']" class="left-column" (click)="openService()">
<input matInput class="opening-item" placeholder="Service Name" value="{{ detail['nsName'] }}" disabled
i18n-placeholder="@@serviceNamePlaceholder" />
</mat-form-field>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ export class RuntimePolicyDetailComponent implements OnInit {
this.utilsService.copyToClipboard(value);
}

openService() {
this.router.navigate([ `service-platform/network-services/${ this.detail[ 'nsUUID' ] }` ]);
}

close() {
this.router.navigate([ 'service-platform/policies/runtime-policies' ]);
}
Expand Down
Loading

0 comments on commit 60d5446

Please sign in to comment.