From: Chris Lott Date: Thu, 27 Jun 2019 15:28:14 +0000 (+0000) Subject: Merge "Revise the notification services" X-Git-Tag: R2~70 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=1be4d77f0cd2d00da3ed33e21805f3c1abcac272;hp=1ddf7dedd6f254a9d31af409a860f8a6573d26c6;p=portal%2Fric-dashboard.git Merge "Revise the notification services" --- diff --git a/docs/release-notes.rst b/docs/release-notes.rst index 67a407ac..0bcc39e7 100644 --- a/docs/release-notes.rst +++ b/docs/release-notes.rst @@ -20,7 +20,7 @@ RIC Dashboard Release Notes =========================== -Version 1.0.4, 21 June 2019 +Version 1.0.4, 27 June 2019 --------------------------- * Add AC xApp neighbor control screen * Add ANR xApp neighbor cell relation table @@ -42,6 +42,7 @@ Version 1.0.4, 21 June 2019 * Rework admin table * Update the notification service * Remove the RAN connection invocation link from left menu and move it to control screen +* Repair deploy-app feature and use icon instead of text button Version 1.0.3, 28 May 2019 -------------------------- diff --git a/webapp-frontend/src/app/app.module.ts b/webapp-frontend/src/app/app.module.ts index 647f25e6..9f2522d8 100644 --- a/webapp-frontend/src/app/app.module.ts +++ b/webapp-frontend/src/app/app.module.ts @@ -26,15 +26,14 @@ import {MatButtonModule, MatButtonToggleModule, MatCardModule, MatCheckboxModule MatSlideToggleModule, MatSnackBarModule, MatSortModule, MatTableModule, MatTabsModule} from '@angular/material'; import { BrowserAnimationsModule} from '@angular/platform-browser/animations'; +import { HttpClientModule } from '@angular/common/http'; import { NgModule } from '@angular/core'; import { MatRadioModule } from '@angular/material/radio'; +import { MatTooltipModule } from '@angular/material/tooltip'; import { ChartsModule } from 'ng2-charts'; import { MDBBootstrapModule } from 'angular-bootstrap-md'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -// RETIRE THIS -import { Ng2SmartTableModule } from 'ng2-smart-table'; - import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; import { LoginComponent } from './login/login.component'; @@ -65,8 +64,6 @@ import { AcXappComponent } from './ac-xapp/ac-xapp.component'; import { AddDashboardUserDialogComponent } from './admin/add-dashboard-user-dialog/add-dashboard-user-dialog.component'; import { EditDashboardUserDialogComponent } from './admin/edit-dashboard-user-dialog/edit-dashboard-user-dialog.component'; - - @NgModule({ declarations: [ AcXappComponent, @@ -99,6 +96,7 @@ import { EditDashboardUserDialogComponent } from './admin/edit-dashboard-user-di BrowserAnimationsModule, ChartsModule, FormsModule, + HttpClientModule, MatButtonModule, MatButtonToggleModule, MatCardModule, @@ -121,7 +119,7 @@ import { EditDashboardUserDialogComponent } from './admin/edit-dashboard-user-di MatSortModule, MatTableModule, MatTabsModule, - Ng2SmartTableModule, + MatTooltipModule, ReactiveFormsModule, MDBBootstrapModule.forRoot(), ], diff --git a/webapp-frontend/src/app/catalog/catalog.component.html b/webapp-frontend/src/app/catalog/catalog.component.html index db27f2c1..6f2e06d9 100644 --- a/webapp-frontend/src/app/catalog/catalog.component.html +++ b/webapp-frontend/src/app/catalog/catalog.component.html @@ -38,13 +38,11 @@ Action
- -
diff --git a/webapp-frontend/src/app/catalog/catalog.component.ts b/webapp-frontend/src/app/catalog/catalog.component.ts index a2e3cd1d..2c1aa85a 100644 --- a/webapp-frontend/src/app/catalog/catalog.component.ts +++ b/webapp-frontend/src/app/catalog/catalog.component.ts @@ -18,6 +18,7 @@ * ========================LICENSE_END=================================== */ import { Component, OnInit, ViewChild } from '@angular/core'; +import { HttpErrorResponse, HttpResponse } from '@angular/common/http'; import { MatSort } from '@angular/material/sort'; import { ErrorDialogService } from '../services/ui/error-dialog.service'; import { AppMgrService } from '../services/app-mgr/app-mgr.service'; @@ -47,28 +48,26 @@ export class CatalogComponent implements OnInit { this.dataSource.loadTable(); } - onConfigurexApp(name: string): void { + onConfigureApp(name: string): void { const aboutError = 'Configure not implemented (yet)'; this.errorService.displayError(aboutError); } - onDeployxApp(name: string): void { + onDeployApp(name: string): void { this.confirmDialogService.openConfirmDialog('Deploy application ' + name + '?') - .afterClosed().subscribe(res => { + .afterClosed().subscribe( (res: any) => { if (res) { this.appMgrSvc.deployXapp(name).subscribe( - response => { - switch (response.status) { - case 200: - this.notification.success('Deploy succeeded!'); - break; - default: - this.notification.warn('Deploy failed.'); - } + (response: HttpResponse) => { + this.notification.success('Deploy succeeded!'); + }, + (error: HttpErrorResponse) => { + this.notification.warn('Deploy failed: ' + error.message); } ); } - }); - + } + ); } + } diff --git a/webapp-frontend/src/app/interfaces/app-mgr.types.ts b/webapp-frontend/src/app/interfaces/app-mgr.types.ts index 5acaf047..11eb220b 100644 --- a/webapp-frontend/src/app/interfaces/app-mgr.types.ts +++ b/webapp-frontend/src/app/interfaces/app-mgr.types.ts @@ -28,8 +28,16 @@ export interface XMSubscription { targetUrl: string; } +/** + * Name is the only required field + */ export interface XMXappInfo { - xAppName: string; + name: string; + configName?: string; + namespace?: string; + serviceName?: string; + imageRepo?: string; + hostname?: string; } export interface XMXappInstance { diff --git a/webapp-frontend/src/app/services/app-mgr/app-mgr.service.ts b/webapp-frontend/src/app/services/app-mgr/app-mgr.service.ts index 428bbe3e..10683aef 100644 --- a/webapp-frontend/src/app/services/app-mgr/app-mgr.service.ts +++ b/webapp-frontend/src/app/services/app-mgr/app-mgr.service.ts @@ -40,7 +40,7 @@ export class AppMgrService { } deployXapp(name: string) { - const xappInfo: XMXappInfo = { xAppName: name }; + const xappInfo: XMXappInfo = { name: name }; return this.httpClient.post(this.basePath, xappInfo, { observe: 'response' }); }