diff --git a/src/app/appmarket/appinstance/appinstance/appinstance.component.html b/src/app/appmarket/appinstance/appinstance/appinstance.component.html index dae5bdb3129447e7c0b42026df44635231b470d3..9ad4da9d993d742d8c3d061ce577ee84d3739b34 100644 --- a/src/app/appmarket/appinstance/appinstance/appinstance.component.html +++ b/src/app/appmarket/appinstance/appinstance/appinstance.component.html @@ -275,10 +275,10 @@ </div> </div> <div class="nmaas-modal-footer"> - <button type="button" class="btn btn-danger" - (click)="this.undeploy()">{{'UNDEPLOY_MODAL.YES_BUTTON' | translate}}</button> <button type="button" class="btn btn-primary" (click)="this.undeployModal.hide()">{{'UNDEPLOY_MODAL.CANCEL_BUTTON' | translate}}</button> + <button type="button" class="btn btn-danger" + (click)="this.undeploy()">{{'UNDEPLOY_MODAL.YES_BUTTON' | translate}}</button> </div> </nmaas-modal> @@ -302,11 +302,11 @@ </div> </div> <div class="nmaas-modal-footer"> + <button type="button" class="btn btn-secondary" + (click)="this.manualUpdateModal.hide()">{{'UNDEPLOY_MODAL.CANCEL_BUTTON' | translate}}</button> <button type="button" class="btn btn-primary " [disabled]="appVersions.length === 0 || selectedVersion === ''" (click)="this.manualUpdateVersion()">{{'APP_INSTANCES.MANUAL_UPDATE.YES_BUTTON' | translate}}</button> - <button type="button" class="btn btn-secondary" - (click)="this.manualUpdateModal.hide()">{{'UNDEPLOY_MODAL.CANCEL_BUTTON' | translate}}</button> </div> </nmaas-modal> @@ -402,10 +402,11 @@ {{'REDEPLOY_MODAL.BODY' | translate}} </div> <div class="nmaas-modal-footer"> - <button type="button" class="btn btn-primary" - (click)="redeploy(); redeployConfirm.hide()">{{'REDEPLOY_MODAL.OK_BUTTON' | translate}}</button> <button type="button" class="btn btn-secondary" (click)="redeployConfirm.hide()">{{'REDEPLOY_MODAL.CANCEL_BUTTON' | translate}}</button> + <button type="button" class="btn btn-primary" + (click)="redeploy(); redeployConfirm.hide()">{{'REDEPLOY_MODAL.OK_BUTTON' | translate}}</button> + </div> </nmaas-modal> @@ -418,10 +419,10 @@ {{'REMOVE_MODAL.BODY' | translate}} </div> <div class="nmaas-modal-footer"> - <button type="button" class="btn btn-primary" - (click)="removalFailedInstance(); removeConfirm.hide()">{{'REMOVE_MODAL.OK_BUTTON' | translate}}</button> <button type="button" class="btn btn-secondary" (click)="removeConfirm.hide()">{{'REMOVE_MODAL.CANCEL_BUTTON' | translate}}</button> + <button type="button" class="btn btn-primary" + (click)="removalFailedInstance(); removeConfirm.hide()">{{'REMOVE_MODAL.OK_BUTTON' | translate}}</button> </div> </nmaas-modal> @@ -434,10 +435,10 @@ <div [innerHTML]="'ENABLE_AUTO_UPGRADES_MODAL.BODY' | translate"></div> </div> <div class="nmaas-modal-footer"> - <button type="button" class="btn btn-primary" - (click)="enableAutoUpgrades(); enableAutoUpgradesConfirm.hide()">{{'ENABLE_AUTO_UPGRADES_MODAL.OK_BUTTON' | translate}}</button> <button type="button" class="btn btn-secondary" (click)="enableAutoUpgradesConfirm.hide()">{{'ENABLE_AUTO_UPGRADES_MODAL.CANCEL_BUTTON' | translate}}</button> + <button type="button" class="btn btn-primary" + (click)="enableAutoUpgrades(); enableAutoUpgradesConfirm.hide()">{{'ENABLE_AUTO_UPGRADES_MODAL.OK_BUTTON' | translate}}</button> </div> </nmaas-modal> @@ -450,10 +451,10 @@ <div [innerHTML]="'DISABLE_AUTO_UPGRADES_MODAL.BODY' | translate"></div> </div> <div class="nmaas-modal-footer"> - <button type="button" class="btn btn-primary" - (click)="disableAutoUpgrades(); disableAutoUpgradesConfirm.hide()">{{'DISABLE_AUTO_UPGRADES_MODAL.OK_BUTTON' | translate}}</button> <button type="button" class="btn btn-secondary" (click)="disableAutoUpgradesConfirm.hide()">{{'DISABLE_AUTO_UPGRADES_MODAL.CANCEL_BUTTON' | translate}}</button> + <button type="button" class="btn btn-primary" + (click)="disableAutoUpgrades(); disableAutoUpgradesConfirm.hide()">{{'DISABLE_AUTO_UPGRADES_MODAL.OK_BUTTON' | translate}}</button> </div> </nmaas-modal> diff --git a/src/app/appmarket/appinstance/appinstancelist/appinstancelist.component.html b/src/app/appmarket/appinstance/appinstancelist/appinstancelist.component.html index c49146f7a9b849236499157af455e499196403d9..7af02f7f4a03f7036cea696cf1beb791583dcfca 100644 --- a/src/app/appmarket/appinstance/appinstancelist/appinstancelist.component.html +++ b/src/app/appmarket/appinstance/appinstancelist/appinstancelist.component.html @@ -1,17 +1,12 @@ <div style="display: flex; align-items: flex-start; justify-content: space-between; margin-top:20px"> <div style="display:flex; align-items: center;"> - <input pInputText name="search" id="search" placeholder="Search" type="text" [(ngModel)]="searchValue"> - <div class="" style="display: inline-flex; align-items: center; margin-right:20px"> - <label class="mr-3" for="selectionType">{{ 'APP_INSTANCES.SHOW' | translate }}: </label> - <p-selectButton - id="selectionType" - [options]="selectionOptions" - [(ngModel)]="listSelection" - [ngModelOptions]="{standalone: true}" - (ngModelChange)="onSelectionChange($event)" - optionLabel="label" - optionValue="value" - ngDefaultControl/> + <span class="p-input-icon-right"> + <i class="pi pi-search" style="font-size: 13px; top: 16px; margin-right: 5px;"></i> + <input pInputText class="form-control" name="search" id="search" placeholder="Search" type="text" [(ngModel)]="searchValue"> + </span> + <div style="display: flex; margin: 0 20px"> + <p-checkbox id="show_my" inputId="show_my" binary="true" [(ngModel)]="showAll" (onChange)="onSelectionChange()" [ngModelOptions]="{standalone: true}" ngDefaultControl></p-checkbox> + <label for="show_my" style="text-wrap: nowrap">Show all instances</label> </div> <div style="display: flex"> <p-checkbox *domainRoles="['ROLE_DOMAIN_ADMIN', 'ROLE_SYSTEM_ADMIN', 'ROLE_OPERATOR'];domainId:domainId" diff --git a/src/app/appmarket/appinstance/appinstancelist/appinstancelist.component.ts b/src/app/appmarket/appinstance/appinstancelist/appinstancelist.component.ts index 34c19ec8c7a6fbd77cccceb90684018e19fe31c6..6c09b32f86857764f1631aa41a5580bd094e2449 100644 --- a/src/app/appmarket/appinstance/appinstancelist/appinstancelist.component.ts +++ b/src/app/appmarket/appinstance/appinstancelist/appinstancelist.component.ts @@ -23,6 +23,7 @@ export enum AppInstanceListSelection { export class AppInstanceListComponent implements OnInit { public undeployedVisible = false; + public showAll = false; private readonly item_number_key: string = 'item_number_per_page'; private readonly list_selection_key: string = 'list_selection'; @@ -60,10 +61,6 @@ export class AppInstanceListComponent implements OnInit { public selectedOption = 'list'; public searchValue = ''; - public selectionOptions = [ - { label: this.translateEnum(AppInstanceListSelection.ALL), value: AppInstanceListSelection.ALL }, - { label: this.translateEnum(AppInstanceListSelection.MY), value: AppInstanceListSelection.MY }, - ]; constructor(private appInstanceService: AppInstanceService, @@ -88,6 +85,7 @@ export class AppInstanceListComponent implements OnInit { const ls = AppInstanceListSelection[sessionStorage.getItem(this.list_selection_key)]; if (ls !== undefined) { this.listSelection = ls; + this.showAll = ls === AppInstanceListSelection.ALL; } console.log(this.listSelection); this.userDataService.selectedDomainId.subscribe(domainId => { @@ -100,31 +98,6 @@ export class AppInstanceListComponent implements OnInit { this.update(domainId) }); - forkJoin({ - all: this.translateService.get('ENUM.ALL'), - my: this.translateService.get('ENUM.MY') - }).subscribe(translations => { - this.selectionOptions = [ - { label: translations.all, value: AppInstanceListSelection.ALL }, - { label: translations.my, value: AppInstanceListSelection.MY }, - ]; - }); - } - - - public translateEnum(value: AppInstanceListSelection): string { - let outValue = ''; - if (value.toString() === 'ALL') { - this.translateService.get('ENUM.ALL').subscribe((res: string) => { - outValue = res; - }) - } - if (value.toString() === 'MY') { - this.translateService.get('ENUM.MY').subscribe((res: string) => { - outValue = res; - }) - } - return outValue; } public update(domainId: number): void { @@ -150,7 +123,11 @@ export class AppInstanceListComponent implements OnInit { || this.authService.hasDomainRole(app.domainId, 'ROLE_USER'); } - public onSelectionChange(event) { + public onSelectionChange() { + this.listSelection = this.showAll + ? AppInstanceListSelection.ALL + : AppInstanceListSelection.MY; + sessionStorage.setItem(this.list_selection_key, AppInstanceListSelection[this.listSelection]); this.update(this.domainId); } diff --git a/src/app/appmarket/bulkDeployment/bulk-list/bulk-list.component.html b/src/app/appmarket/bulkDeployment/bulk-list/bulk-list.component.html index 29bef44c53d82bf456ebf0f4e54b20f0ffcc145c..77fa7865ee58f68e0d6d01784560d9c485f3aa1a 100644 --- a/src/app/appmarket/bulkDeployment/bulk-list/bulk-list.component.html +++ b/src/app/appmarket/bulkDeployment/bulk-list/bulk-list.component.html @@ -3,7 +3,7 @@ <div style="margin-right:20px"> <span class="p-input-icon-right" style="width: 100%"> <i class="pi pi-search" style="font-size: 13px; top: 16px; margin-right: 5px;"></i> - <input pInputText class="flex" name="search" id="search" placeholder="Search" type="text" + <input pInputText class="flex form-control" name="search" id="search" placeholder="Search" type="text" style="height: 34px" [(ngModel)]="searchValue"> </span> </div> diff --git a/src/app/appmarket/domains/domain-groups/domain-groups.component.html b/src/app/appmarket/domains/domain-groups/domain-groups.component.html index c3834f6720d71b648f8871e43118615242b9decd..0e054bd69320aa30d884104e74f13f0865f7923e 100644 --- a/src/app/appmarket/domains/domain-groups/domain-groups.component.html +++ b/src/app/appmarket/domains/domain-groups/domain-groups.component.html @@ -2,7 +2,7 @@ <div style="margin-right:20px"> <span class="p-input-icon-right" style="width: 100%"> <i class="pi pi-search" style="font-size: 13px; top: 16px; margin-right: 5px;"></i> - <input pInputText class="flex" name="search" id="search" placeholder="Search" type="text" style="height: 34px" [(ngModel)]="searchValue"> + <input pInputText class="flex form-control" name="search" id="search" placeholder="Search" type="text" style="height: 34px" [(ngModel)]="searchValue"> </span> </div> <div class="flex" style="margin-right:20px"> diff --git a/src/app/shared/modal/modal-notification-send/modal-notification-send.component.html b/src/app/shared/modal/modal-notification-send/modal-notification-send.component.html index 435992b9e9b3e71156a5ded7e6ca4008a93fd501..4b2cbdcdab4c8f136b1224cc865065dc43c96642 100644 --- a/src/app/shared/modal/modal-notification-send/modal-notification-send.component.html +++ b/src/app/shared/modal/modal-notification-send/modal-notification-send.component.html @@ -13,7 +13,7 @@ </form> </div> <div class="nmaas-modal-footer"> + <button type="button" (click)="modal.hide()" class="btn btn-secondary text-center">{{'MESSAGE_MODAL.DISMISS' | translate}}</button> <button type="submit" class="btn btn-primary text-center" [disabled]="!f.valid" form="notification-form">{{'MESSAGE_MODAL.CONFIRM' | translate}}</button> - <button type="button" (click)="modal.hide()" class="btn btn-secondary text-center">{{'MESSAGE_MODAL.DISMISS' | translate}}</button> </div> </nmaas-modal>