Skip to content
Snippets Groups Projects
Commit 27b9ca8c authored by kbeyro's avatar kbeyro
Browse files

Merge branch 'develop' into 294-add-domain-to-cluster

parents bc3212ce eb2d086d
Branches
No related tags found
2 merge requests!184Develop,!183294 add domain to cluster
Showing with 82 additions and 95 deletions
......@@ -3363,9 +3363,9 @@
}
},
"node_modules/@formio/bootstrap": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@formio/bootstrap/-/bootstrap-3.0.0.tgz",
"integrity": "sha512-9a2JMY/qU/UUQ3BvlxrZfAjy/v5unwkXXBdy98+MiUbmQVaLi8ITIsA/YeYkRKFQW8V6BSbOoTlJhmVvxdvPnA=="
"version": "3.0.2-rc.1",
"resolved": "https://registry.npmjs.org/@formio/bootstrap/-/bootstrap-3.0.2-rc.1.tgz",
"integrity": "sha512-CfwnU04l8yMc0kr1j2Y7mj193Z5BfqoNiCGBsTz1bDIr/tnaQkfEOZ21zJ15KVpCXVGc6SjW7QQ1JY8UVsE0lQ=="
},
"node_modules/@formio/bootstrap3": {
"version": "2.12.4-rc.1",
......@@ -3387,9 +3387,9 @@
}
},
"node_modules/@formio/core": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@formio/core/-/core-2.3.0.tgz",
"integrity": "sha512-jAlNm0vaSZQ9RSxt79PqeHdXYv/1i+zNfasVWbH1xRJSicJK0JcdodrBaDw8kKnEh0UmflW6RyIiaMyDbww4Ug==",
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/@formio/core/-/core-2.3.3.tgz",
"integrity": "sha512-Tgv5FEwEf9xQtl/cqviaWyBCFcwGCb1pVXwTjIH7KxtWMwsyXtbxGotjfFyZY9unOw6Snk2ik/sln80yQe5y9A==",
"dependencies": {
"@types/json-logic-js": "^2.0.7",
"browser-cookies": "^1.2.0",
......@@ -3411,14 +3411,14 @@
"integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA=="
},
"node_modules/@formio/js": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/@formio/js/-/js-5.0.0.tgz",
"integrity": "sha512-Ly3f7q2wo5oFjlECKFtkIMy+Ah9HyAkf6ob70OrF/6MooSPF3hEu9euXouEWOoNdI+Tokr690/GdM2sDZtYzww==",
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/@formio/js/-/js-5.0.2.tgz",
"integrity": "sha512-zAuCUuxBPCJ7Nmt8+xPE5XyLkVg550a//I9ke8bhI7EGlRkN6xF1Ve7Nomsi8ruohiw2BVcMH+5SS3LXWUm0uQ==",
"dependencies": {
"@formio/bootstrap": "3.0.0",
"@formio/bootstrap": "3.0.2-rc.1",
"@formio/choices.js": "^10.2.1",
"@formio/core": "2.3.0",
"@formio/text-mask-addons": "^3.8.0-formio.3",
"@formio/core": "2.3.3",
"@formio/text-mask-addons": "3.8.0-formio.4",
"@formio/vanilla-text-mask": "^5.1.1-formio.1",
"abortcontroller-polyfill": "^1.7.5",
"autocompleter": "^8.0.4",
......@@ -3458,9 +3458,9 @@
"integrity": "sha512-q334YswwucSBphN5djVkEt3beVhHotrCtPGNIXmyilw9UnXV9Cb+gNAZ2yhZSfiBSzP6rxHLLT2gpr57xgbcwQ=="
},
"node_modules/@formio/js/node_modules/bootstrap": {
"version": "5.3.3",
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.3.tgz",
"integrity": "sha512-8HLCdWgyoMguSO9o+aH+iuZ+aht+mzW0u3HIMzVu7Srrpv7EBBxTnrFlSCskwdY1+EOFQSm7uMJhNQHkdPcmjg==",
"version": "5.3.5",
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.5.tgz",
"integrity": "sha512-ct1CHKtiobRimyGzmsSldEtM03E8fcEX4Tb3dGXz1V8faRwM50+vfHwTzOxB3IlKO7m+9vTH3s/3C6T2EAPeTA==",
"funding": [
{
"type": "github",
......@@ -17767,9 +17767,9 @@
}
},
"@formio/bootstrap": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@formio/bootstrap/-/bootstrap-3.0.0.tgz",
"integrity": "sha512-9a2JMY/qU/UUQ3BvlxrZfAjy/v5unwkXXBdy98+MiUbmQVaLi8ITIsA/YeYkRKFQW8V6BSbOoTlJhmVvxdvPnA=="
"version": "3.0.2-rc.1",
"resolved": "https://registry.npmjs.org/@formio/bootstrap/-/bootstrap-3.0.2-rc.1.tgz",
"integrity": "sha512-CfwnU04l8yMc0kr1j2Y7mj193Z5BfqoNiCGBsTz1bDIr/tnaQkfEOZ21zJ15KVpCXVGc6SjW7QQ1JY8UVsE0lQ=="
},
"@formio/bootstrap3": {
"version": "2.12.4-rc.1",
......@@ -17791,9 +17791,9 @@
}
},
"@formio/core": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@formio/core/-/core-2.3.0.tgz",
"integrity": "sha512-jAlNm0vaSZQ9RSxt79PqeHdXYv/1i+zNfasVWbH1xRJSicJK0JcdodrBaDw8kKnEh0UmflW6RyIiaMyDbww4Ug==",
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/@formio/core/-/core-2.3.3.tgz",
"integrity": "sha512-Tgv5FEwEf9xQtl/cqviaWyBCFcwGCb1pVXwTjIH7KxtWMwsyXtbxGotjfFyZY9unOw6Snk2ik/sln80yQe5y9A==",
"requires": {
"@types/json-logic-js": "^2.0.7",
"browser-cookies": "^1.2.0",
......@@ -17817,14 +17817,14 @@
}
},
"@formio/js": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/@formio/js/-/js-5.0.0.tgz",
"integrity": "sha512-Ly3f7q2wo5oFjlECKFtkIMy+Ah9HyAkf6ob70OrF/6MooSPF3hEu9euXouEWOoNdI+Tokr690/GdM2sDZtYzww==",
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/@formio/js/-/js-5.0.2.tgz",
"integrity": "sha512-zAuCUuxBPCJ7Nmt8+xPE5XyLkVg550a//I9ke8bhI7EGlRkN6xF1Ve7Nomsi8ruohiw2BVcMH+5SS3LXWUm0uQ==",
"requires": {
"@formio/bootstrap": "3.0.0",
"@formio/bootstrap": "3.0.2-rc.1",
"@formio/choices.js": "^10.2.1",
"@formio/core": "2.3.0",
"@formio/text-mask-addons": "^3.8.0-formio.3",
"@formio/core": "2.3.3",
"@formio/text-mask-addons": "3.8.0-formio.4",
"@formio/vanilla-text-mask": "^5.1.1-formio.1",
"abortcontroller-polyfill": "^1.7.5",
"autocompleter": "^8.0.4",
......@@ -17864,9 +17864,9 @@
"integrity": "sha512-q334YswwucSBphN5djVkEt3beVhHotrCtPGNIXmyilw9UnXV9Cb+gNAZ2yhZSfiBSzP6rxHLLT2gpr57xgbcwQ=="
},
"bootstrap": {
"version": "5.3.3",
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.3.tgz",
"integrity": "sha512-8HLCdWgyoMguSO9o+aH+iuZ+aht+mzW0u3HIMzVu7Srrpv7EBBxTnrFlSCskwdY1+EOFQSm7uMJhNQHkdPcmjg==",
"version": "5.3.5",
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.5.tgz",
"integrity": "sha512-ct1CHKtiobRimyGzmsSldEtM03E8fcEX4Tb3dGXz1V8faRwM50+vfHwTzOxB3IlKO7m+9vTH3s/3C6T2EAPeTA==",
"requires": {}
},
"compare-versions": {
......@@ -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>
......
<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"
......
......@@ -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);
}
......
......@@ -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>
......
......@@ -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">
......
......@@ -15,5 +15,6 @@ export class ClusterManager {
public externalNetworks: ClusterExtNetwork[]
public domainNames: string[];
public state : string;
public currentStateSince: Date;
public contactEmail: string;
}
\ No newline at end of file
......@@ -19,12 +19,15 @@ export class DomainService extends GenericDataService {
protected url: string;
protected urlGroups: string;
private updateRequiredFlag: boolean;
constructor(http: HttpClient, appConfig: AppConfigService) {
super(http, appConfig);
this.updateRequiredFlag = false;
this.url = this.appConfig.getApiUrl() + '/domains';
this.urlGroups = this.appConfig.getApiUrl() + '/groups';
}
public getGlobalDomainId(): number {
......@@ -93,35 +96,35 @@ export class DomainService extends GenericDataService {
// GROUPS
public getAllDomainGroups(): Observable<DomainGroup[]> {
return this.get<DomainGroup[]>(this.url + '/group');
return this.get<DomainGroup[]>(this.urlGroups);
}
public getDomainGroup(domainGroupId: number): Observable<DomainGroup> {
return this.get<DomainGroup>(this.url + '/group/' + domainGroupId);
return this.get<DomainGroup>(this.urlGroups + '/' + domainGroupId);
}
public deleteDomainGroup(domainGroupId: number): Observable<void> {
return this.delete<void>(this.url + '/group/' + domainGroupId);
return this.delete<void>(this.urlGroups + '/' + domainGroupId);
}
public addDomainsToGroup(groupCodeName: string, domainIds: number[]): Observable<DomainGroup> {
return this.post(this.url + '/group/' + groupCodeName, domainIds);
return this.post(this.urlGroups + '/' + groupCodeName, domainIds);
}
public deleteDomainFromGroup(groupId: number, domainId: number): Observable<DomainGroup> {
return this.patch(this.url + '/group/' + groupId, domainId);
return this.patch(this.urlGroups + '/' + groupId, domainId);
}
public createDomainGroup(domainGroup: DomainGroup): Observable<Id> {
return this.post(this.url + '/group', domainGroup);
return this.post(this.urlGroups , domainGroup);
}
public updateDomainGroup(domainGroup: DomainGroup, id: number): Observable<Id> {
return this.put(this.url + '/group/' + id, domainGroup);
return this.put(this.urlGroups+ "/" + id, domainGroup);
}
public updateDomainGroupManagers(managers: User[], id: number): Observable<DomainGroup> {
return this.put(this.url + '/group/members/' + id, managers);
return this.put(this.urlGroups + '/' + id + "/members", managers);
}
public getAnnotations(): Observable<DomainAnnotation[]> {
......
......@@ -70,6 +70,16 @@
</div>
</div>
<div class="form-group">
<label for="state" class="col-sm-2 control-label">{{ 'CLUSTERS.STATE_SINCE' | translate }}</label>
<div class="col-sm-10">
<div class="col-sm-10">
<input type="text" class="form-control" id="state" name="state"
[ngModel]="formatDate(cluster.currentStateSince)" [disabled]="true">
</div>
</div>
</div>
<div class="form-group">
<label for="clusterCreationDate" class="col-sm-2 control-label">{{ 'CLUSTERS.CREATION_DATE' | translate }}</label>
......
......@@ -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>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment