Skip to content

Commit d3670c9

Browse files
committed
NVSHAS-9971: NV UI about 'Get Bootstrap Password'
1 parent fa68122 commit d3670c9

File tree

4 files changed

+16
-1
lines changed

4 files changed

+16
-1
lines changed

admin/webapp/websrc/app/routes/pages/login/alert/alert.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ <h4>{{ 'login.RBAC_ALERT.TITLE_GET_BOOTSTRAP_PASSWORD' | translate }}</h4>
1212
</div>
1313

1414
<!-- Second Section: RBAC Alerts -->
15-
<div>
15+
<div *ngI="k8s_rbac_alert_message">
1616
<h4>{{ 'login.RBAC_ALERT.TITLE_RBAC_ERROR' | translate }}</h4>
1717
<p>{{ 'login.RBAC_ALERT.CONTENT_RBAC_ERROR' | translate }}</p>
1818
<p class="alert-message">{{ k8s_rbac_alert_message }}</p>

admin/webapp/websrc/app/routes/pages/login/login.component.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,16 @@
206206
}}</a>
207207
</div>
208208
</div>
209+
<div
210+
class="text-center clearfix"
211+
[ngClass]="{ 'mt-3': servers && servers.length === 2 }"
212+
style="padding: 0 10px; clear: both">
213+
<div *ngIf="!rbacAlertMessage && bootstrapPasswordCommand">
214+
<a (click)="showAlertDetails()">{{
215+
'login.RBAC_ALERT.RETRIVE_BOOTSTRAP_PASSWORD' | translate
216+
}}</a>
217+
</div>
218+
</div>
209219
<div *ngIf="!isEulaAccepted">
210220
<app-eula (eulaStatus)="getEulaStatus($event)"></app-eula>
211221
</div>

admin/webapp/websrc/app/routes/pages/login/login.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,8 +422,12 @@ export class LoginComponent implements OnInit, OnDestroy {
422422
let eula = eulaInfo.eula;
423423
if (eulaInfo.k8s_rbac_alert_message) {
424424
this.rbacAlertMessage = eulaInfo.k8s_rbac_alert_message;
425+
}
426+
427+
if(eulaInfo.bootstrap_password_command) {
425428
this.bootstrapPasswordCommand = eulaInfo.bootstrap_password_command;
426429
}
430+
427431
if (eula && eula.accepted) {
428432
this.isEulaAccepted = true;
429433
} else {

admin/webapp/websrc/assets/i18n/en-common.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@
239239
"CVE_DB_OLD": "CVE Database has not been updated for {{day}} days",
240240
"UPGRADE_AVAILABLE": "NeuVector is running {{currentVersion}} and can be upgraded to {{newVersion}}",
241241
"RBAC_ALERT": {
242+
"RETRIVE_BOOTSTRAP_PASSWORD": "To retrieve the bootstrap password from Kubernetes Secret.",
242243
"PASSWORD_RETRIEVAL_ERROR": "Unable to get password from K8s Secret ",
243244
"ROLEBINDING_DETAILS_LINK": "(role/rolebinding error)",
244245
"TITLE_GET_BOOTSTRAP_PASSWORD": "Get Bootstrap Password",

0 commit comments

Comments
 (0)