diff --git a/smp-angular/src/app/common/search-table/search-table.component.ts b/smp-angular/src/app/common/search-table/search-table.component.ts index 4d15e94edfd4696b9506e9798675be647d50f287..b444941cf392a53b25e42f740e3e26077b304fa3 100644 --- a/smp-angular/src/app/common/search-table/search-table.component.ts +++ b/smp-angular/src/app/common/search-table/search-table.component.ts @@ -1,4 +1,4 @@ -import {AfterViewInit, Component, Input, OnInit, TemplateRef, ViewChild} from '@angular/core'; +import {AfterContentInit, AfterViewInit, Component, Input, OnInit, TemplateRef, ViewChild} from '@angular/core'; import {SearchTableResult} from './search-table-result.model'; import {Observable} from 'rxjs'; import {AlertMessageService} from '../alert-message/alert-message.service'; @@ -25,7 +25,7 @@ import ObjectUtils from "../utils/object-utils"; templateUrl: './search-table.component.html', styleUrls: ['./search-table.component.css'] }) -export class SearchTableComponent implements AfterViewInit { +export class SearchTableComponent implements OnInit { @ViewChild('searchTable', {static: true}) searchTable: any; @ViewChild('rowActions', {static: true}) rowActions: TemplateRef<any>; @ViewChild('rowExpand', {static: true}) rowExpand: TemplateRef<any>; @@ -80,7 +80,7 @@ export class SearchTableComponent implements AfterViewInit { private router: Router, private authenticatedGuard: AuthenticatedGuard) { } - ngAfterViewInit(): void { + ngOnInit(): void { this.columnIndex = { cellTemplate: this.rowIndex, name: 'Index', @@ -106,15 +106,18 @@ export class SearchTableComponent implements AfterViewInit { }; } + tableColumnInit(){ // Add actions to last column if (this.columnPicker) { // prepend columns if (!!this.tableRowDetailContainer) { + console.log("show table row details!") this.columnPicker.allColumns.unshift(this.columnExpandDetails); this.columnPicker.selectedColumns.unshift(this.columnExpandDetails); } if (this.showIndexColumn) { + console.log("show table index!") this.columnPicker.allColumns.unshift(this.columnIndex); this.columnPicker.selectedColumns.unshift(this.columnIndex); } diff --git a/smp-angular/src/app/domain/domain.component.ts b/smp-angular/src/app/domain/domain.component.ts index 814de92b0ec8d20d19abcac0baa361662ea4d863..380e27e9403c6b5aca4f592cf79f0a5d8e1aaef4 100644 --- a/smp-angular/src/app/domain/domain.component.ts +++ b/smp-angular/src/app/domain/domain.component.ts @@ -63,6 +63,7 @@ export class DomainComponent implements AfterViewInit { name: 'Domain code', title: "Unique domain code.", prop: 'domainCode', + showInitially: true, cellTemplate: this.domainCodeColumnTemplate, width: 250 @@ -71,12 +72,13 @@ export class DomainComponent implements AfterViewInit { name: 'SML Domain', title: "Informative: SML domain name.", prop: 'smlSubdomain', - + showInitially: true, }, { name: 'Signature CertAlias', title: "Certificate for signing REST responses", prop: 'signatureKeyAlias', + showInitially: true, cellTemplate: this.certificateAliasColumn, width: 150 }, @@ -85,29 +87,31 @@ export class DomainComponent implements AfterViewInit { name: 'SML SMP Id', title: "SMP identifier for SML integration", prop: 'smlSmpId', + showInitially: true, width: 150 }, { name: 'SML ClientCert Alias', prop: 'smlClientKeyAlias', + showInitially: true, cellTemplate: this.certificateAliasColumn, width: 150 }, { name: 'Is SML Registered', prop: 'smlRegistered', + showInitially: true, width: 120 }, { name: 'SML BueCoat Auth.', prop: 'smlBlueCoatAuth', + showInitially: true, width: 130 }, ]; - - this.columnPicker.selectedColumns = this.columnPicker.allColumns.filter(col => { - return ['Domain code', 'SML Domain', 'Signature CertAlias', 'SML SMP Id', 'SML ClientCert Alias', 'Is SML Registered', 'SML BueCoat Auth.'].indexOf(col.name) != -1 - }); + this.searchTable.tableColumnInit(); + this.columnPicker.selectedColumns = this.columnPicker.allColumns.filter(col => col.showInitially); } certificateAliasExists(alias: string): boolean { diff --git a/smp-angular/src/app/login/login.component.html b/smp-angular/src/app/login/login.component.html index c886e43444908cac7ebf3cd3579a60e1783dc177..ea31d2bda56502f75ddd718468c66f06490c35f8 100644 --- a/smp-angular/src/app/login/login.component.html +++ b/smp-angular/src/app/login/login.component.html @@ -34,7 +34,7 @@ <tr> <td> <button mat-raised-button color="primary" [disabled]="!loginForm.form.valid" id="loginbutton_id" - [style]="'width=150px'"> + [style]="'width:150px'"> <mat-icon>input</mat-icon> <span> Login</span> </button> diff --git a/smp-angular/src/app/service-group-edit/service-group-edit.component.html b/smp-angular/src/app/service-group-edit/service-group-edit.component.html index 246e483e570fcc6d10ea94a932b04598f6620de4..b812350441715ac663f152748652c58bf6854837 100644 --- a/smp-angular/src/app/service-group-edit/service-group-edit.component.html +++ b/smp-angular/src/app/service-group-edit/service-group-edit.component.html @@ -12,19 +12,9 @@ [allowNewItems]="securityService.isCurrentUserSMPAdmin()" [allowDeleteItems]="securityService.isCurrentUserSMPAdmin()" > - - <ng-template #rowMetadataAction let-row="row" let-value="value" ngx-datatable-cell-template> - <button mat-button color="primary" - (click)="metadataRowButtonAction(row)" id="metadataRowButtonAction{{row.$$index}}_id" - matTooltip="Show metadata list" > - <mat-icon>view_list</mat-icon> - <span>Metadata</span> - </button> - </ng-template> - <ng-template #rowSMPUrlLinkAction let-row="row" let-value="value" ngx-datatable-cell-template > - <a target="_blank" matTooltip="Open metadata as XML data" + <a target="_blank" matTooltip="Open metadata as XML data" href="{{contextPath}}{{createServiceGroupURL(row)}}">Open URL</a> </ng-template> @@ -66,7 +56,7 @@ <div *ngIf="row.serviceMetadata.length !== 0" > <ngx-datatable class='inner-table material striped' - [loadingIndicator]="loading" + [loadingIndicator]="false" [rows]='row.serviceMetadata' [columnMode]='"force"' [headerHeight]='50' diff --git a/smp-angular/src/app/service-group-edit/service-group-edit.component.ts b/smp-angular/src/app/service-group-edit/service-group-edit.component.ts index 80d98c9dd6e35e7406b60f0360a3a994c9464b76..d3c5adeacc203312e070b44eb19bb851263e6b77 100644 --- a/smp-angular/src/app/service-group-edit/service-group-edit.component.ts +++ b/smp-angular/src/app/service-group-edit/service-group-edit.component.ts @@ -1,4 +1,4 @@ -import {ChangeDetectorRef, Component, OnInit, TemplateRef, ViewChild} from '@angular/core'; +import {AfterViewInit, ChangeDetectorRef, Component, OnInit, TemplateRef, ViewChild} from '@angular/core'; import {ColumnPicker} from '../common/column-picker/column-picker.model'; import {MatDialog, MatDialogRef} from '@angular/material/dialog'; import {AlertMessageService} from '../common/alert-message/alert-message.service'; @@ -15,12 +15,12 @@ import {SecurityService} from "../security/security.service"; templateUrl: './service-group-edit.component.html', styleUrls: ['./service-group-edit.component.css'] }) -export class ServiceGroupEditComponent implements OnInit { +export class ServiceGroupEditComponent implements OnInit, AfterViewInit { - @ViewChild('rowMetadataAction' , { static: true }) rowMetadataAction: TemplateRef<any> - @ViewChild('rowActions' , { static: true }) rowActions: TemplateRef<any>; - @ViewChild('rowSMPUrlLinkAction', { static: true }) rowSMPUrlLinkAction: TemplateRef<any>; - @ViewChild('searchTable', { static: true }) searchTable: SearchTableComponent; + @ViewChild('rowMetadataAction', {static: true}) rowMetadataAction: TemplateRef<any> + @ViewChild('rowActions', {static: true}) rowActions: TemplateRef<any>; + @ViewChild('rowSMPUrlLinkAction', {static: true}) rowSMPUrlLinkAction: TemplateRef<any>; + @ViewChild('searchTable', {static: true}) searchTable: SearchTableComponent; columnPicker: ColumnPicker = new ColumnPicker(); serviceGroupEditController: ServiceGroupEditController; @@ -43,20 +43,22 @@ export class ServiceGroupEditComponent implements OnInit { this.baseUrl = SmpConstants.REST_PUBLIC_SERVICE_GROUP; } - ngOnInit() { + ngOnInit(): void { this.serviceGroupEditController = new ServiceGroupEditController(this.dialog); this.columnPicker.allColumns = [ { name: 'Metadata size', prop: 'serviceMetadata.length', + showInitially: true, width: 120, maxWidth: 120, - resizable: "false" + resizable: "false", }, { name: 'Owners size', prop: 'users.length', + showInitially: true, width: 120, maxWidth: 120, resizable: "false" @@ -64,6 +66,7 @@ export class ServiceGroupEditComponent implements OnInit { { name: 'Participant scheme', prop: 'participantScheme', + showInitially: true, width: 300, maxWidth: 300, resizable: "false" @@ -71,21 +74,23 @@ export class ServiceGroupEditComponent implements OnInit { { name: 'Participant identifier', prop: 'participantIdentifier', + showInitially: true, }, { cellTemplate: this.rowSMPUrlLinkAction, name: 'OASIS ServiceGroup URL', + showInitially: true, width: 250, maxWidth: 250, resizable: "false", sortable: false }, - ]; + } - this.columnPicker.selectedColumns = this.columnPicker.allColumns.filter(col => { - return ["Metadata size", 'Owners size', "Participant scheme", "Participant identifier", "OASIS ServiceGroup URL"].indexOf(col.name) != -1 - }); + ngAfterViewInit(): void { + this.columnPicker.selectedColumns = this.columnPicker.allColumns.filter(col => col.showInitially); + this.searchTable.tableColumnInit(); } details(row: any) { @@ -121,7 +126,7 @@ export class ServiceGroupEditComponent implements OnInit { }; } - onEditMetadataRow(serviceGroupRow: any,metaDataRow: any) { + onEditMetadataRow(serviceGroupRow: any, metaDataRow: any) { let metadataRowNumber = serviceGroupRow.serviceMetadata.indexOf(metaDataRow); const formRef: MatDialogRef<any> = this.serviceGroupEditController.newMetadataDialog({ @@ -131,21 +136,21 @@ export class ServiceGroupEditComponent implements OnInit { if (result) { // method isServiceMetaDataChanged must be called before getCurrent! - let isChanged=formRef.componentInstance.isServiceMetaDataChanged(); - if (!isChanged ){ + let isChanged = formRef.componentInstance.isServiceMetaDataChanged(); + if (!isChanged) { // nothing to save return; } - let statusMetadata =metaDataRow.status === SearchTableEntityStatus.PERSISTED + let statusMetadata = metaDataRow.status === SearchTableEntityStatus.PERSISTED ? SearchTableEntityStatus.UPDATED : metaDataRow; metaDataRow.status = statusMetadata; - metaDataRow = {...formRef.componentInstance.getCurrent()}; + metaDataRow = {...formRef.componentInstance.getCurrent()}; - serviceGroupRow.serviceMetadata [metadataRowNumber] = {...metaDataRow }; + serviceGroupRow.serviceMetadata [metadataRowNumber] = {...metaDataRow}; // change reference to fire table update serviceGroupRow.serviceMetadata = [...serviceGroupRow.serviceMetadata] @@ -182,18 +187,17 @@ export class ServiceGroupEditComponent implements OnInit { } - // for dirty guard... - isDirty (): boolean { + isDirty(): boolean { return this.searchTable.isDirty(); } - createServiceGroupURL(row: any){ - return encodeURIComponent((!row.participantScheme? '' : row.participantScheme)+'::'+row.participantIdentifier); + createServiceGroupURL(row: any) { + return encodeURIComponent((!row.participantScheme ? '' : row.participantScheme) + '::' + row.participantIdentifier); } - createServiceMetadataURL(serviceGroupRow: any, rowSMD: any){ - return encodeURIComponent((!serviceGroupRow.participantScheme? '': serviceGroupRow.participantScheme)+'::'+serviceGroupRow.participantIdentifier)+'/services/'+ encodeURIComponent((!rowSMD.documentIdentifierScheme?'':rowSMD.documentIdentifierScheme)+'::'+rowSMD.documentIdentifier); + createServiceMetadataURL(serviceGroupRow: any, rowSMD: any) { + return encodeURIComponent((!serviceGroupRow.participantScheme ? '' : serviceGroupRow.participantScheme) + '::' + serviceGroupRow.participantIdentifier) + '/services/' + encodeURIComponent((!rowSMD.documentIdentifierScheme ? '' : rowSMD.documentIdentifierScheme) + '::' + rowSMD.documentIdentifier); } onActivateServiceMetadata(serviceGroupRow: any, event) { diff --git a/smp-angular/src/app/service-group-edit/service-metadata-wizard-dialog/service-metadata-wizard-dialog.component.ts b/smp-angular/src/app/service-group-edit/service-metadata-wizard-dialog/service-metadata-wizard-dialog.component.ts index 5229d190987ec3abd31d9d0e8320d5fe5d3d6814..147b7f4409c919189a6341fc42270d8e153d68bc 100644 --- a/smp-angular/src/app/service-group-edit/service-metadata-wizard-dialog/service-metadata-wizard-dialog.component.ts +++ b/smp-angular/src/app/service-group-edit/service-metadata-wizard-dialog/service-metadata-wizard-dialog.component.ts @@ -73,7 +73,7 @@ export class ServiceMetadataWizardDialogComponent { uploadCertificate(event) { const file = event.target.files[0]; - this.certificateService.uploadCertificate$(file).subscribe((res: CertificateRo) => { + this.certificateService.validateCertificate(file).subscribe((res: CertificateRo) => { if (res && res.certificateId) { this.dialogForm.patchValue({ @@ -96,7 +96,7 @@ export class ServiceMetadataWizardDialogComponent { onUpload() { // this.http is the injected HttpClient - this.certificateService.uploadCertificate$(this.selectedFile) + this.certificateService.validateCertificate(this.selectedFile) .subscribe(event => { console.log(event); // handle event here }); diff --git a/smp-angular/src/app/service-group-search/service-group-search.component.html b/smp-angular/src/app/service-group-search/service-group-search.component.html index ffbb6dfbd6dcddc2d912076b1abd8dd635690f7a..6c9152ba7bfa1b7ed7932c1a95fd014dc866c2d9 100644 --- a/smp-angular/src/app/service-group-search/service-group-search.component.html +++ b/smp-angular/src/app/service-group-search/service-group-search.component.html @@ -1,4 +1,4 @@ -<smp-search-table +<smp-search-table #searchTable page_id='search_id' [title]="'Search'" [columnPicker]="columnPicker" @@ -7,20 +7,10 @@ [searchPanel]="searchPanel" [filter]="filter" [searchTableController]="serviceGroupSearchController" - [tableRowDetailContainer]="serviceGroupSearchRowDetailContainer" + [tableRowDetailContainer]="tableRowDetailContainer" [showActionButtons]="false" [showIndexColumn]="true" > - <ng-template #rowExtensionAction let-row="row" let-value="value" ngx-datatable-cell-template> - - <button mat-button color="primary" - (click)="extensionRowButtonAction(row)" id="extensionRowButtonAction{{row.$$index}}_id" tooltip="Extension"> - <mat-icon>code</mat-icon> - <span>Extension</span> - </button> - - </ng-template> - <ng-template #rowSMPUrlLinkAction let-row="row" let-value="value" ngx-datatable-cell-template> <a target="_blank" href="{{contextPath}}{{createServiceGroupURL(row)}}">Open URL</a> @@ -50,7 +40,7 @@ <ng-template #additionalToolButtons> </ng-template> - <ng-template #serviceGroupSearchRowDetailContainer let-row="row"> + <ng-template #tableRowDetailContainer let-row="row"> <div *ngIf="row.serviceMetadata.length===0" style="padding-left:20px;"> No service metadata @@ -58,7 +48,7 @@ <div *ngIf="row.serviceMetadata.length !== 0"> <ngx-datatable class='inner-table material striped' - [loadingIndicator]="'Loading ...'" + [loadingIndicator]="false" [rows]='row.serviceMetadata' [columnMode]='"force"' [headerHeight]='50' diff --git a/smp-angular/src/app/service-group-search/service-group-search.component.ts b/smp-angular/src/app/service-group-search/service-group-search.component.ts index ec3b9067a6990f45f7a6868b1d07bed6035e107e..add526d7748b9b7a2f820032b403a46e1a64c4ae 100644 --- a/smp-angular/src/app/service-group-search/service-group-search.component.ts +++ b/smp-angular/src/app/service-group-search/service-group-search.component.ts @@ -1,5 +1,5 @@ ///<reference path="../smp.constants.ts"/> -import {Component, OnInit, TemplateRef, ViewChild} from '@angular/core'; +import {AfterViewInit, Component, OnInit, TemplateRef, ViewChild} from '@angular/core'; import {ColumnPicker} from '../common/column-picker/column-picker.model'; import {MatDialog} from '@angular/material/dialog'; import {AlertMessageService} from '../common/alert-message/alert-message.service'; @@ -7,49 +7,58 @@ import {ServiceGroupSearchController} from './service-group-search-controller'; import {HttpClient} from '@angular/common/http'; import {SmpConstants} from "../smp.constants"; import {GlobalLookups} from "../common/global-lookups"; +import {SearchTableComponent} from "../common/search-table/search-table.component"; +import {ServiceGroupEditController} from "../service-group-edit/service-group-edit-controller"; @Component({ moduleId: module.id, templateUrl: './service-group-search.component.html', styleUrls: ['./service-group-search.component.css'] }) -export class ServiceGroupSearchComponent implements OnInit { +export class ServiceGroupSearchComponent implements OnInit, AfterViewInit { - @ViewChild('rowExtensionAction' , { static: true }) rowExtensionAction: TemplateRef<any> @ViewChild('rowSMPUrlLinkAction', { static: true }) rowSMPUrlLinkAction: TemplateRef<any> @ViewChild('rowActions', { static: true }) rowActions: TemplateRef<any>; + @ViewChild('searchTable', {static: true}) searchTable: SearchTableComponent; columnPicker: ColumnPicker = new ColumnPicker(); serviceGroupSearchController: ServiceGroupSearchController; filter: any = {}; contextPath: string = location.pathname.substring(0, location.pathname.length - 3); // remove /ui s - baseUrl: string = SmpConstants.REST_PUBLIC_SEARCH_SERVICE_GROUP; + baseUrl: string; - constructor(protected lookups: GlobalLookups, protected http: HttpClient, protected alertService: AlertMessageService, public dialog: MatDialog) { + constructor(protected lookups: GlobalLookups, + protected http: HttpClient, + protected alertService: + AlertMessageService, + public dialog: MatDialog) { + this.baseUrl = SmpConstants.REST_PUBLIC_SEARCH_SERVICE_GROUP; } ngOnDestroy() { } - ngOnInit() { - + ngOnInit(): void { this.serviceGroupSearchController = new ServiceGroupSearchController(this.dialog); this.columnPicker.allColumns = [ { name: 'Metadata size', prop: 'serviceMetadata.length', - width: 80, - maxWidth: 120, showInitially: true, + width: 120, + maxWidth: 120, + resizable: "false", }, { name: 'Participant scheme', prop: 'participantScheme', - maxWidth: 300, showInitially: true, + width: 300, + maxWidth: 300, + resizable: "false" }, { name: 'Participant identifier', @@ -59,17 +68,18 @@ export class ServiceGroupSearchComponent implements OnInit { { cellTemplate: this.rowSMPUrlLinkAction, name: 'OASIS ServiceGroup URL', - width: 150, - maxWidth: 250, - sortable: false, showInitially: true, + width: 250, + maxWidth: 250, + resizable: "false", + sortable: false }, ]; + } + ngAfterViewInit(): void { this.columnPicker.selectedColumns = this.columnPicker.allColumns.filter(col => col.showInitially); - this.columnPicker.selectedColumns = this.columnPicker.allColumns.filter(col => { - return ["Metadata size", "Participant scheme", "Participant identifier", "OASIS ServiceGroup URL"].indexOf(col.name) != -1 - }); + this.searchTable.tableColumnInit(); } createServiceGroupURL(row: any){ diff --git a/smp-angular/src/app/smp.constants.ts b/smp-angular/src/app/smp.constants.ts index abe18b79a1f8caee819cef501f8aff70999da237..921547f22330c96f49db65544c3671bf198f72fb 100644 --- a/smp-angular/src/app/smp.constants.ts +++ b/smp-angular/src/app/smp.constants.ts @@ -13,9 +13,11 @@ export class SmpConstants { // user public services public static readonly REST_PUBLIC_USER = SmpConstants.REST_PUBLIC + 'user'; public static readonly REST_PUBLIC_USER_UPDATE = SmpConstants.REST_PUBLIC_USER + "/" + SmpConstants.PATH_PARAM_ENC_USER_ID + "/"; - public static readonly REST_PUBLIC_USER_CERT_VALIDATE = SmpConstants.REST_PUBLIC_USER_UPDATE + 'validate-certificate'; public static readonly REST_PUBLIC_USER_GENERATE_ACCESS_TOKEN = SmpConstants.REST_PUBLIC_USER_UPDATE + 'generate-access-token'; public static readonly REST_PUBLIC_USER_CHANGE_PASSWORD = SmpConstants.REST_PUBLIC_USER_UPDATE + 'change-password'; + // truststore public services + public static readonly REST_PUBLIC_TRUSTSTORE = SmpConstants.REST_PUBLIC +"truststore/"+ "/" + SmpConstants.PATH_PARAM_ENC_USER_ID + "/"; + public static readonly REST_PUBLIC_TRUSTSTORE_CERT_VALIDATE = SmpConstants.REST_PUBLIC_TRUSTSTORE + 'validate-certificate'; // public authentication services public static readonly REST_PUBLIC_SECURITY = SmpConstants.REST_PUBLIC + 'security/'; diff --git a/smp-angular/src/app/user/certificate.service.ts b/smp-angular/src/app/user/certificate.service.ts index 3823d1ad269c6205b6a5506ee409599f7ee731b6..01d157f61c8730367b05c68c918afc238da03889 100644 --- a/smp-angular/src/app/user/certificate.service.ts +++ b/smp-angular/src/app/user/certificate.service.ts @@ -14,19 +14,6 @@ export class CertificateService { private securityService: SecurityService, ) { } - uploadCertificate$(payload): Observable<CertificateRo> { - // The user identifier below belongs to the currently logged in user and it may or may not be the same as the - // identifier of the user being modified (e.g. a normal user editing his own details vs. a system administrator - // adding or editing another user) - - // upload file as binary file - const headers = new HttpHeaders() - .set("Content-Type", "application/octet-stream"); - - const currentUser: User = this.securityService.getCurrentUser(); - return this.http.post<CertificateRo>(SmpConstants.REST_PUBLIC_USER_CERT_VALIDATE.replace('{user-id}', currentUser.userId), payload, {headers}); - } - validateCertificate(payload): Observable<CertificateRo> { // The user identifier below belongs to the currently logged in user and it may or may not be the same as the // identifier of the user being modified (e.g. a normal user editing his own details vs. a system administrator @@ -37,6 +24,7 @@ export class CertificateService { .set("Content-Type", "application/octet-stream"); const currentUser: User = this.securityService.getCurrentUser(); - return this.http.post<CertificateRo>(SmpConstants.REST_PUBLIC_USER_CERT_VALIDATE.replace('{user-id}', currentUser.userId), payload, {headers}); + return this.http.post<CertificateRo>(SmpConstants.REST_PUBLIC_TRUSTSTORE_CERT_VALIDATE + .replace(SmpConstants.PATH_PARAM_ENC_USER_ID, currentUser.userId), payload, {headers}); } } diff --git a/smp-angular/src/app/user/user.component.ts b/smp-angular/src/app/user/user.component.ts index c97f398b1c1fdf96cd83a642e611a61d1098e2b8..4fb2d65e3dfbc95a07f006bf9c11a9d01b8e9010 100644 --- a/smp-angular/src/app/user/user.component.ts +++ b/smp-angular/src/app/user/user.component.ts @@ -42,24 +42,25 @@ export class UserComponent implements AfterViewInit { { name: 'Username', prop: 'username', + showInitially: true, canAutoResize: true }, { name: 'Certificate', prop: 'certificate', + showInitially: true, cellTemplate: this.certificateTemplate, canAutoResize: true }, { name: 'Role', prop: 'role', + showInitially: true, canAutoResize: true }, ]; - - this.columnPicker.selectedColumns = this.columnPicker.allColumns.filter(col => { - return ['Username', 'Certificate', 'Role'].indexOf(col.name) != -1 - }); + this.searchTable.tableColumnInit(); + this.columnPicker.selectedColumns = this.columnPicker.allColumns.filter(col => col.showInitially); // if system admin refresh trust certificate list! if (this.securityService.isCurrentUserSystemAdmin()) {