From af56b68e030085aa523152e83811705636ead79c Mon Sep 17 00:00:00 2001 From: asgar Date: Fri, 8 Mar 2019 19:52:33 +0530 Subject: added ansible server functionality multiple ansible server for CDT Issue-ID: APPC-1510 Change-Id: I383bc63705418654efb596c617309821ebbeb9b4 Signed-off-by: Mohamed Asgar Samiulla --- src/app/about-us/aboutus.component.css | 4 +-- src/app/about-us/aboutus.component.html | 21 ++++++++++-- src/app/about-us/aboutus.component.ts | 57 +++++++++++---------------------- 3 files changed, 39 insertions(+), 43 deletions(-) (limited to 'src/app/about-us') diff --git a/src/app/about-us/aboutus.component.css b/src/app/about-us/aboutus.component.css index 93ac11c..2bad3ee 100644 --- a/src/app/about-us/aboutus.component.css +++ b/src/app/about-us/aboutus.component.css @@ -17,11 +17,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -ECOMP is a trademark and service mark of AT&T Intellectual Property. ============LICENSE_END============================================ */ - .textarea { - width: 800px; + width: 100%; height: 200px } \ No newline at end of file diff --git a/src/app/about-us/aboutus.component.html b/src/app/about-us/aboutus.component.html index d7460f3..0d641b9 100644 --- a/src/app/about-us/aboutus.component.html +++ b/src/app/about-us/aboutus.component.html @@ -30,7 +30,8 @@ limitations under the License.      @@ -61,7 +62,7 @@ limitations under the License. @@ -70,3 +71,19 @@ limitations under the License. + + + + + + + + + + + + + + diff --git a/src/app/about-us/aboutus.component.ts b/src/app/about-us/aboutus.component.ts index 04eee0d..53b8a94 100644 --- a/src/app/about-us/aboutus.component.ts +++ b/src/app/about-us/aboutus.component.ts @@ -21,16 +21,13 @@ limitations under the License. ============LICENSE_END============================================ */ - -import { Component, OnInit, OnDestroy } from '@angular/core'; +import { Component, OnInit } from '@angular/core'; import { Http } from '@angular/http'; import { Subscription } from 'rxjs/Subscription'; import { Observable } from 'rxjs/Observable'; import { NotificationsService } from 'angular2-notifications'; import { saveAs } from 'file-saver'; -import { DialogService } from 'ng2-bootstrap-modal'; -import { ConfirmComponent } from '../shared/confirmModal/confirm.component'; -import { appConstants } from '../../constants/app-constants'; +import { ModalDismissReasons, NgbModal } from '@ng-bootstrap/ng-bootstrap'; import {UtilityService} from '../shared/services/utilityService/utility.service'; @Component({ @@ -38,11 +35,13 @@ import {UtilityService} from '../shared/services/utilityService/utility.service' templateUrl: './aboutus.component.html', styleUrls: ['./aboutus.component.css'] }) -export class AboutUsComponent implements OnInit, OnDestroy { +export class AboutUsComponent implements OnInit { + clName= "AboutUsComponent"; public releaseName: any; public versionNo: any; public contactUsMail: any; + public data: any; closeResult: string; versionLogSubscription: Subscription; @@ -55,48 +54,30 @@ export class AboutUsComponent implements OnInit, OnDestroy { }; constructor( - private http: Http, private dialogService: DialogService, private notificationsService: NotificationsService, + private http: Http, private modalService: NgbModal, private utilSvc: UtilityService ) { } ngOnInit() { this.versionNo = require('./appVersion.json').versionNo; this.releaseName = require('./appVersion.json').releaseName; - this.contactUsMail = require('../cdt.application.properties.json').CONTACT_US; - } - - ngOnDestroy() { - if (this.versionLogSubscription) { - this.versionLogSubscription.unsubscribe(); - } + this.contactUsMail = require('../../cdt.application.properties.json').CONTACT_US; } - versionLogFile(): Observable { - return this.http.get('app/about-us/versionLog.txt'); + versionLogFile() { + this.http.get('app/about-us/versionLog.txt') + .subscribe(res => this.data = res.text()); } - open(content) { - this.versionLogSubscription = this.versionLogFile() - .subscribe((res) => { - this.data = res.text(); - this.dialogService.addDialog(ConfirmComponent, { - title: 'VERSION CHANGE LOG', - message: this.data, - cancelButtonText: 'CLOSE', - confirmButtonText: 'DOWNLOAD' - }).subscribe(isConfirmed => { - if (isConfirmed) { - this.downloadLogFile() - } else { - // do nothing - } - }); - - }, - (error)=>{ - this.notificationsService.error(appConstants.errors.error, 'unable to fetch change log details'); - }); - } + // open(content) { + // this.modalService.open(content).result.then((result) => { + // console.log('result', result) + // this.closeResult = `Closed with: ${ result }`; + // }, (reason) => { + // console.log('reson', reason) + // this.closeResult = `Dismissed ${ this.getDismissReason(reason) }`; + // }); + // } downloadLogFile() { var blob = new Blob([this.data], { -- cgit 1.2.3-korg