Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

small changes #182

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ <h4>{{'UPDATE_CONFIG_MODAL.HEADER' | translate}}</h4>

<nmaas-modal styleModal="info" #showConfig>
<div class="nmaas-modal-header">
<h4 style="text-align: center">{{'APP_INSTANCE.CONFIGURATION.HEADER' | translate}}</h4>
<h4 style="text-align: center">{{'APP_INSTANCE.CONFIGURATION.PREVIEW' | translate}}</h4>
</div>
<div class="nmaas-modal-body">
<div class="col-xs-12">
Expand All @@ -275,13 +275,14 @@ <h4 style="text-align: center">{{'APP_INSTANCE.CONFIGURATION.HEADER' | translate
[options]='{"alerts": {"submitMessage": "Configuration applied"}, "errors": {"message": "Invalid configuration"}}'
[refresh]="refreshForm"
(formLoad)="changeForm()"
[readOnly]="true">
[readOnly]="true"
[submission]="submissionData">
</formio>
</div>
</div>
<div class="nmaas-modal-footer">
<button type="button" class="btn btn-primary"
(click)="this.applyConfig.hide()">{{'UNDEPLOY_MODAL.CANCEL_BUTTON' | translate}}</button>
(click)="this.applyConfig.hide()">{{'UNDEPLOY_MODAL.CLOSE' | translate}}</button>
</div>
</nmaas-modal>

Expand Down
10 changes: 10 additions & 0 deletions src/app/appmarket/appinstance/appinstance/appinstance.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ export class AppInstanceComponent implements OnInit, OnDestroy {

private deployParametersSubject = new BehaviorSubject<Map<string, string>>(new Map<string, string>());
public deployParameters$ = this.deployParametersSubject.asObservable();
public submissionData = '';

constructor(private appsService: AppsService,
public appImagesService: AppImagesService,
Expand Down Expand Up @@ -629,6 +630,15 @@ export class AppInstanceComponent implements OnInit, OnDestroy {
}

public openShowConfigModal() {
let string = '{"data": {'
this.deployParameters$.subscribe(entry => {
entry.forEach( (value, key) => {
string += `"${key}": "${value}",`
})
})
string += "} }"
console.warn(string)
this.submissionData = string;
this.showConfig.show()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,13 @@ <h3>{{ 'DOMAINS.LIST.GROUP' | translate }}</h3>
</tr>
<ng-template ngFor let-user [ngForOf]="domainGroup.managers" let-i="index">
<tr class="table-row">
<td>{{user.username}}</td>
<td>{{user.firstname}} {{user.lastname}}</td>
<td style="width: 20%">
<button *roles="['ROLE_SYSTEM_ADMIN']" type="button" class="btn btn-danger" (click)="deleteUserAccess(user)">{{'DOMAINS.GROUP.DELETE_USER' | translate}}</button>
<td style="width: 40%" >{{user.username}}</td>
<td style="width: 40%" >{{user.firstname}} {{user.lastname}}</td>
<td style="" class="flex justify-content-end">
<div class="flex">
<button *roles="['ROLE_SYSTEM_ADMIN']" type="button" class="btn btn-danger" (click)="deleteUserAccess(user)">{{'DOMAINS.GROUP.DELETE_USER' | translate}}</button>
</div>

</td>
</tr>
</ng-template>
Expand Down Expand Up @@ -90,9 +93,9 @@ <h3>{{ 'DOMAINS.LIST.GROUP' | translate }}</h3>
</tr>
<ng-template ngFor let-domain [ngForOf]="domainGroup.domains" let-i="index">
<tr class="table-row">
<td>{{domain.name}}</td>
<td>{{domain.codename}}</td>
<td style="width: 20%">
<td style="width: 40%" >{{domain.name}}</td>
<td style="width: 40%" >{{domain.codename}}</td>
<td class="flex justify-content-end">
<button type="button" class="btn btn-danger" (click)="deleteDomainFromGroup(domain)">{{'DOMAINS.LIST.DELETE' | translate}}</button>
</td>
</tr>
Expand Down Expand Up @@ -217,7 +220,7 @@ <h3>{{ 'DOMAINS.LIST.GROUP' | translate }}</h3>
<div class="nmaas-modal-body" style="height: 300px">
<div style="height: 100px">
<p>{{'DOMAINS.GROUP.ADD_INFO' | translate}} {{domainGroup.name}}</p>
<input pInputText name="searchTexUser" id="searchTextUser" placeholder="{{'USERS.SEARCH' | translate}}" type="text" (keyup)="searchUsers($event.target.value)">
<input pInputText name="searchTexUser" id="searchTextUser" placeholder="{{'USERS.SEARCH' | translate}}" style="width: 270px" type="text" [(ngModel)]="searchUser" (keyup)="searchUsers($event.target.value)">
</div>
<table class="table table-hover table-condensed" aria-describedby="Users found by mail">
<thead>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ export class DomainGroupViewComponent extends BaseComponent implements OnInit {
public usersToAdd = [];
public usersFound = [];

public searchUser = '';

@ViewChild(ModalComponent, {static: true})
public readonly modal: ModalComponent;

Expand Down Expand Up @@ -179,6 +181,7 @@ export class DomainGroupViewComponent extends BaseComponent implements OnInit {
}

public addUser(user: User) {
this.searchUser = ''
user.roles = [];
user.hasSshKeys = null;
this.usersToAdd.push({username: user.username, id: user.id, firstname: user.firstname, lastname: user.lastname});
Expand Down