Masking the server configuration for external services
This commit is contained in:
committed by
Jose Alberto Hernandez
parent
da10c42bf0
commit
c3c74faa4d
@@ -16,7 +16,7 @@
|
||||
|
||||
<ng-container matColumnDef="value">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{'labels.inputs.Value' | translate}} </th>
|
||||
<td mat-cell *matCellDef="let configuration"> {{ configuration.value }} </td>
|
||||
<td mat-cell *matCellDef="let configuration"> {{ getConfigurationValue(configuration) }} </td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
|
||||
@@ -49,4 +49,12 @@ export class NotificationComponent implements OnInit {
|
||||
this.dataSource.sort = this.sort;
|
||||
}
|
||||
|
||||
getConfigurationValue(configuration: any): string {
|
||||
const value = configuration.value;
|
||||
if (configuration.name === 'server_key') {
|
||||
return value.replace(value.substr(1, value.length - 3), value.substr(1, value.length - 3).replace(/./g, '*'));
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user