diff options
Diffstat (limited to 'portal-FE-os/src')
4 files changed, 18 insertions, 3 deletions
diff --git a/portal-FE-os/src/app/pages/application-onboarding/application-details-dialog/application-details-dialog.component.html b/portal-FE-os/src/app/pages/application-onboarding/application-details-dialog/application-details-dialog.component.html index 6d0c5446..f68d8798 100644 --- a/portal-FE-os/src/app/pages/application-onboarding/application-details-dialog/application-details-dialog.component.html +++ b/portal-FE-os/src/app/pages/application-onboarding/application-details-dialog/application-details-dialog.component.html @@ -252,10 +252,10 @@ <span style="flex: 9">Upload Image</span> <app-information-tooltip style="flex: 1;" - [textMessage]="'Image file must be smaller than 1MB'"> + [textMessage]="'Image file(.png or.jpg or.jpeg with dimension 200X200 pixel) must be smaller than 1MB.'"> </app-information-tooltip> </div> - <input type="file" id="input-app-image-upload" + <input #inputAppImageUpload type="file" id="input-app-image-upload" class="input-file-field input-app-image-upload-ht" accept="image/*" [(ngModel)]="applicationObj.originalImage" name="appImage" image-upload="applicationObj.originalImage" image-upload-resize-max-height="300" @@ -284,7 +284,10 @@ <div class="property" *ngIf="!(applicationObj.applicationType == '3')"> <div class="property-label preview"> <span class="left-label">Preview</span> - <span class="remove" (click)="removeImage()">Remove</span> + <span *ngIf="(applicationObj.imageLink && applicationObj.imageLink.indexOf('default_app_image.gif') == -1 + ||applicationObj.thumbnail && applicationObj.thumbnail.indexOf('default_app_image.gif') == -1 + ||emptyImgForPreview && emptyImgForPreview.indexOf('default_app_image.gif') == -1)" + class="remove" (click)="removeImage()">Remove</span> </div> <img id="image-app-preview" class="image-preview" src="{{applicationObj.imageLink || applicationObj.thumbnail || emptyImgForPreview}}" /> diff --git a/portal-FE-os/src/app/pages/application-onboarding/application-details-dialog/application-details-dialog.component.ts b/portal-FE-os/src/app/pages/application-onboarding/application-details-dialog/application-details-dialog.component.ts index 1b15f801..852e9706 100644 --- a/portal-FE-os/src/app/pages/application-onboarding/application-details-dialog/application-details-dialog.component.ts +++ b/portal-FE-os/src/app/pages/application-onboarding/application-details-dialog/application-details-dialog.component.ts @@ -75,6 +75,7 @@ export class ApplicationDetailsDialogComponent implements OnInit { @Input() action: any; @Output() passEntry: EventEmitter<any> = new EventEmitter(); @ViewChild('applicationName') applicationNameElement: ElementRef; + @ViewChild('inputAppImageUpload') inputAppImageUpload: ElementRef; newAppModel = { 'id': null, @@ -200,6 +201,7 @@ export class ApplicationDetailsDialogComponent implements OnInit { this.applicationObj.imageUrl = null; this.applicationObj.imageLink = null; this.emptyImgForPreview = '../../../assets/images/default_app_image.gif'; + this.inputAppImageUpload.nativeElement.value = ""; } }, (resut) => { return; diff --git a/portal-FE-os/src/app/pages/application-onboarding/application-onboarding.component.html b/portal-FE-os/src/app/pages/application-onboarding/application-onboarding.component.html index 19f5d8ae..47722471 100644 --- a/portal-FE-os/src/app/pages/application-onboarding/application-onboarding.component.html +++ b/portal-FE-os/src/app/pages/application-onboarding/application-onboarding.component.html @@ -51,6 +51,7 @@ </button> <div class="apps-table"> + <span class="ecomp-spinner" *ngIf="showEcompSpinner"></span> <!-- Applications Table goes here--> <table mat-table [dataSource]="dataSource" matSort> <!-- Thumbnail Column --> diff --git a/portal-FE-os/src/app/pages/application-onboarding/application-onboarding.component.ts b/portal-FE-os/src/app/pages/application-onboarding/application-onboarding.component.ts index 5903d654..83cbfa0e 100644 --- a/portal-FE-os/src/app/pages/application-onboarding/application-onboarding.component.ts +++ b/portal-FE-os/src/app/pages/application-onboarding/application-onboarding.component.ts @@ -66,6 +66,7 @@ export class ApplicationOnboardingComponent implements OnInit { dataSource = new MatTableDataSource(this.appsList); @ViewChild(MatSort) sort: MatSort; @ViewChild(MatPaginator) paginator: MatPaginator; + showEcompSpinner:boolean = false; constructor(public applicationsService: ApplicationsService, public ngbModal: NgbModal) { } @@ -77,11 +78,13 @@ export class ApplicationOnboardingComponent implements OnInit { getOnboardingApps(){ //console.log("getOnboardingApps called"); + this.showEcompSpinner = true; this.applicationsService.getOnboardingApps() .subscribe(_data => { this.result = _data; if (this.result == null || this.result == 'undefined') { console.log('WidgetOnboardingService::getOnboardingWidgets Failed: Result or result.data is null'); + this.showEcompSpinner = false; }else { this.appsList = _data; for (var i = 0; i < this.appsList.length; i++) { @@ -94,11 +97,14 @@ export class ApplicationOnboardingComponent implements OnInit { } } this.populateTableData(this.appsList); + this.showEcompSpinner = false; } }, error =>{ console.log(error); + this.showEcompSpinner = false; this.openConfirmationModal('Error', error.message); }); + this.showEcompSpinner = false; } applyFilter(filterValue: string) { @@ -143,13 +149,16 @@ export class ApplicationOnboardingComponent implements OnInit { console.log('ApplicationOnboardingCtrl::deleteApplication: No apllication or ID... cannot delete'); return; } + this.showEcompSpinner = true; this.appsList.splice(this.appsList.indexOf(application), 1); this.applicationsService.deleteOnboardingApp(application.id) .subscribe( data => { this.result = data; this.getOnboardingApps(); + this.showEcompSpinner = false; }, error => { console.log(error); + this.showEcompSpinner = false; if(error && error.status == 405){ this.openConfirmationModal('', 'Application : ' + application.appName+ ' can not be deleted as it is associsted with one of the Microservices.'); }else{ |