You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@knox.apache.org by sm...@apache.org on 2024/03/12 09:20:44 UTC
(knox) branch master updated: KNOX-3017 - Avoid showing lifetime adjustment popup when TTL is set to -1 (#877)
This is an automated email from the ASF dual-hosted git repository.
smolnar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/knox.git
The following commit(s) were added to refs/heads/master by this push:
new 0ec2ea8c1 KNOX-3017 - Avoid showing lifetime adjustment popup when TTL is set to -1 (#877)
0ec2ea8c1 is described below
commit 0ec2ea8c1f17112c0ed9831933b1f4f85637bb5d
Author: Sandor Molnar <sm...@apache.org>
AuthorDate: Tue Mar 12 10:20:40 2024 +0100
KNOX-3017 - Avoid showing lifetime adjustment popup when TTL is set to -1 (#877)
---
.../token-generation/app/token-generation.component.html | 2 +-
.../token-generation/app/token-generation.service.ts | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/knox-token-generation-ui/token-generation/app/token-generation.component.html b/knox-token-generation-ui/token-generation/app/token-generation.component.html
index d02989a5c..16e9afeb5 100644
--- a/knox-token-generation-ui/token-generation/app/token-generation.component.html
+++ b/knox-token-generation-ui/token-generation/app/token-generation.component.html
@@ -29,7 +29,7 @@
<label *ngIf="comment.invalid" style="color: red;"><i class="icon-warning"></i>Invalid comment!</label>
<label><i class="icon-info"></i> Configured maximum lifetime: </label>
- <label>{{tssStatus.maximumLifetimeText}}</label>
+ <label>{{tssStatus.maximumLifetimeText}} <i class="icon-exclamation" *ngIf="'Unlimited lifetime' === tssStatus.maximumLifetimeText"></i></label>
<div *ngIf="tssStatus.lifespanInputEnabled">
<label><i class="icon-time"></i> Lifetime (days, hours, mins):</label>
<table>
diff --git a/knox-token-generation-ui/token-generation/app/token-generation.service.ts b/knox-token-generation-ui/token-generation/app/token-generation.service.ts
index 19c651b18..4c74cab68 100644
--- a/knox-token-generation-ui/token-generation/app/token-generation.service.ts
+++ b/knox-token-generation-ui/token-generation/app/token-generation.service.ts
@@ -53,7 +53,8 @@ export class TokenGenService {
return {
tokenManagementEnabled: responseData.tokenManagementEnabled === 'true',
maximumLifetimeText: responseData.maximumLifetimeText,
- maximumLifetimeSeconds: responseData.maximumLifetimeSeconds,
+ // the '+' character at the beginning converts the incoming string to a number
+ maximumLifetimeSeconds: +responseData.maximumLifetimeSeconds,
lifespanInputEnabled: responseData.lifespanInputEnabled === 'true',
impersonationEnabled: responseData.impersonationEnabled === 'true',
configuredTssBackend: responseData.configuredTssBackend,