diff options
author | 2019-03-06 12:11:34 -0800 | |
---|---|---|
committer | 2019-03-06 12:12:36 -0800 | |
commit | eedac3e312c66499ca5ff9d72388c31b25813225 (patch) | |
tree | 4cc2f22a0a36ba97823b70fe27ed667383173f0a /src/app/about-us | |
parent | 611c9da62c2e266f9facd97dc9f340ce311060a3 (diff) |
Revert "multiple asible servers support"
Some functionality was accidentally removed
This reverts commit 611c9da62c2e266f9facd97dc9f340ce311060a3.
Change-Id: I1aefbbc0ede8cdda59acc8bdf7b047e506aad813
Signed-off-by: Patrick Brady <patrick.brady@att.com>
Issue-ID: APPC-1510
Diffstat (limited to 'src/app/about-us')
-rw-r--r-- | src/app/about-us/aboutus.component.css | 3 | ||||
-rw-r--r-- | src/app/about-us/aboutus.component.html | 21 | ||||
-rw-r--r-- | src/app/about-us/aboutus.component.ts | 57 |
3 files changed, 42 insertions, 39 deletions
diff --git a/src/app/about-us/aboutus.component.css b/src/app/about-us/aboutus.component.css index 225877c..93ac11c 100644 --- a/src/app/about-us/aboutus.component.css +++ b/src/app/about-us/aboutus.component.css @@ -20,7 +20,8 @@ limitations under the License. ECOMP is a trademark and service mark of AT&T Intellectual Property. ============LICENSE_END============================================ */ + .textarea { - width: 100%; + width: 800px; 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 0d641b9..d7460f3 100644 --- a/src/app/about-us/aboutus.component.html +++ b/src/app/about-us/aboutus.component.html @@ -30,8 +30,7 @@ limitations under the License. <div class="mdl-card__title"> <div class="text-center"> Contact us @: - <a href="mailto:{{contactUsMail.CONTACT_US_EMAIL}}?Subject={{contactUsMail.CONTACT_US_SUBJECT}}"> - CDT DEVELOPMENT TEAM </a> + <a href="mailto:{{contactUsMail.CONTACT_US_EMAIL}}?Subject={{contactUsMail.CONTACT_US_SUBJECT}}">APPC DEVELOPMENT TEAM</a> </div> </div> </div>     @@ -62,7 +61,7 @@ limitations under the License. </div> <div class="text-right"> <div class="mdl-dialog__content"> - <a class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary" (click)="versionLogFile(); versionLog.open();">VIEW CHANGE LOG</a> + <a class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary" (click)="open(content)">VIEW CHANGE LOG</a> </div> </div> @@ -71,19 +70,3 @@ limitations under the License. </div> </div> </div> - -<!-- Modal for version Log and download file --> -<modal #versionLog id="versionLog"> - <modal-header [show-close]="true"> - <h4 class="modal-title">VERSION CHANGE LOG</h4> - </modal-header> - <modal-body> - <textarea class="textarea">{{this.data}}</textarea> - </modal-body> - <modal-footer [show-default-buttons]="false"> - <button type="button" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent" (click)="downloadLogFile()"> - Download - </button> - <button class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary" data-dismiss="modal">cancel</button> - </modal-footer> -</modal> diff --git a/src/app/about-us/aboutus.component.ts b/src/app/about-us/aboutus.component.ts index 53b8a94..04eee0d 100644 --- a/src/app/about-us/aboutus.component.ts +++ b/src/app/about-us/aboutus.component.ts @@ -21,13 +21,16 @@ limitations under the License. ============LICENSE_END============================================ */ -import { Component, OnInit } from '@angular/core'; + +import { Component, OnInit, OnDestroy } 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 { ModalDismissReasons, NgbModal } from '@ng-bootstrap/ng-bootstrap'; +import { DialogService } from 'ng2-bootstrap-modal'; +import { ConfirmComponent } from '../shared/confirmModal/confirm.component'; +import { appConstants } from '../../constants/app-constants'; import {UtilityService} from '../shared/services/utilityService/utility.service'; @Component({ @@ -35,13 +38,11 @@ import {UtilityService} from '../shared/services/utilityService/utility.service' templateUrl: './aboutus.component.html', styleUrls: ['./aboutus.component.css'] }) -export class AboutUsComponent implements OnInit { - +export class AboutUsComponent implements OnInit, OnDestroy { clName= "AboutUsComponent"; public releaseName: any; public versionNo: any; public contactUsMail: any; - public data: any; closeResult: string; versionLogSubscription: Subscription; @@ -54,30 +55,48 @@ export class AboutUsComponent implements OnInit { }; constructor( - private http: Http, private modalService: NgbModal, + private http: Http, private dialogService: DialogService, private notificationsService: NotificationsService, 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; + this.contactUsMail = require('../cdt.application.properties.json').CONTACT_US; + } + + ngOnDestroy() { + if (this.versionLogSubscription) { + this.versionLogSubscription.unsubscribe(); + } } - versionLogFile() { - this.http.get('app/about-us/versionLog.txt') - .subscribe(res => this.data = res.text()); + versionLogFile(): Observable<any> { + return this.http.get('app/about-us/versionLog.txt'); } - // 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) }`; - // }); - // } + 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'); + }); + } downloadLogFile() { var blob = new Blob([this.data], { |