1717 < fieldset >
1818 < div class ="fields ">
1919 < h3 > Token Generation</ h3 >
20- < label *ngIf ="tssStatusMessageLevel === 'info' " style ="color: green; "> {{tssStatusMessage}}</ label >
21- < label *ngIf ="tssStatusMessageLevel === 'warning' "
22- style ="color: chocolate; "> {{tssStatusMessage}}</ label >
23- < label *ngIf ="tssStatusMessageLevel === 'error' " style ="color: red; "> {{tssStatusMessage}}</ label >
20+ @if (tssStatusMessageLevel === 'info') {
21+ < label style ="color: green; "> {{tssStatusMessage}}</ label >
22+ }
23+ @if (tssStatusMessageLevel === 'warning') {
24+ < label style ="color: chocolate; "> {{tssStatusMessage}}</ label >
25+ }
26+ @if (tssStatusMessageLevel === 'error') {
27+ < label style ="color: red; "> {{tssStatusMessage}}</ label >
28+ }
2429 < label class ="icon-label "> < mat-icon class ="reduce-icon-size "> info</ mat-icon > Token Generation enables
2530 integration and API invocations by using the
2631 token as an authorization bearer token. Copy the JWT token from the resulting text area and protect
2732 it
2833 securely from others as this token represents your identity and is active until expired.</ label >
2934 < label class ="icon-label "> < mat-icon class ="reduce-icon-size "> info</ mat-icon > Configured maximum
30- lifetime: {{tssStatus.maximumLifetimeText}} < mat-icon class ="reduce-icon-size "
31- *ngIf ="'Unlimited lifetime' === tssStatus.maximumLifetimeText "> priority_high</ mat-icon > </ label >
32- < div *ngIf ="tssStatus.lifespanInputEnabled ">
35+ lifetime: {{tssStatus.maximumLifetimeText}} @if ('Unlimited lifetime' ===
36+ tssStatus.maximumLifetimeText) {
37+ < mat-icon class ="reduce-icon-size "> priority_high</ mat-icon >
38+ }</ label >
39+ @if (tssStatus.lifespanInputEnabled) {
40+ < div >
3341 < mat-form-field class ="pe-1 " style ="width: 6% ">
3442 < mat-label > Lifetime Days</ mat-label >
3543 < input matInput type ="number " formControlName ="lifespanDays " type ="number " step ="1 " min ="0 "
@@ -45,33 +53,42 @@ <h3>Token Generation</h3>
4553 < input matInput type ="number " formControlName ="lifespanMins " type ="number " step ="1 " min ="0 "
4654 max ="59 " value ="0 ">
4755 </ mat-form-field >
48-
49- < label class =" icon-label "
50- *ngIf =" lifespanDays.invalid || lifespanHours.invalid || lifespanMins.invalid || tokenGenFrom.errors?.allZero "
51- style =" color: red; " > < mat-icon class ="reduce-icon-size "> warning</ mat-icon > Invalid
56+ @if (lifespanDays.invalid || lifespanHours.invalid || lifespanMins.invalid ||
57+ tokenGenFrom.errors?.allZero) {
58+ < label class =" icon-label " style =" color: red; " > < mat-icon
59+ class ="reduce-icon-size "> warning</ mat-icon > Invalid
5260 lifetime!</ label >
61+ }
5362 </ div >
63+ }
5464 < mat-form-field style ="width: 18%; ">
5565 < mat-label class ="icon-label "> < mat-icon > mode_comment</ mat-icon > Comment</ mat-label >
5666 < input matInput placeholder ="Comment " (keydown.enter) ="generateToken() " formControlName ="comment ">
5767 </ mat-form-field >
58- < label class ="icon-label " *ngIf ="comment.invalid " style ="color: red; "> < mat-icon
68+ @if (comment.invalid) {
69+ < label class ="icon-label " style ="color: red; "> < mat-icon
5970 class ="reduce-icon-size "> warning</ mat-icon > Invalid comment!</ label >
71+ }
6072
61- < div *ngIf ="tssStatus.impersonationEnabled ">
73+ @if (tssStatus.impersonationEnabled) {
74+ < div >
6275 < mat-form-field style ="width: 18%; ">
63- < mat-label class ="icon-label "> < mat-icon > person</ mat-icon > Generating token for (impersonation):</ mat-label >
76+ < mat-label class ="icon-label "> < mat-icon > person</ mat-icon > Generating token for
77+ (impersonation):</ mat-label >
6478 < input matInput formControlName ="impersonation ">
6579 </ mat-form-field >
66- < label class ="icon-label " *ngIf ="impersonation.invalid " style ="color: red; "> < i
67- class ="icon-warning "> </ i > Invalid doAs!</ label >
80+ @if (impersonation.invalid) {
81+ < label class ="icon-label " style ="color: red; "> < i class ="icon-warning "> </ i > Invalid doAs!</ label >
82+ }
6883 </ div >
84+ }
6985 </ div >
7086
71- < span *ngIf =" requestErrorMessage " class =" help-inline " style =" color: red; " > < span
72- class ="errorMsg "> {{requestErrorMessage}}</ span >
87+ @if ( requestErrorMessage) {
88+ < span class =" help-inline " style =" color: red; " > < span class ="errorMsg "> {{requestErrorMessage}}</ span >
7389 < mat-icon class ="reduce-icon-size " style ="color: #ae2817; "> warning</ mat-icon >
7490 </ span >
91+ }
7592
7693 < div >
7794 < button mat-stroked-button (click) ="generateToken() "
@@ -85,38 +102,37 @@ <h3>Token Generation</h3>
85102</ div >
86103< hr >
87104< div style ="margin-left: 1.75%; margin-right: 1.75%; margin-top: 10px ">
88- < span *ngIf ="hasResult " style ="color:black; margin-left: 1.75%; margin-right: 1.75%; ">
105+ @if (hasResult) {
106+ < span style ="color:black; margin-left: 1.75%; margin-right: 1.75%; ">
89107 < label class ="icon-label " (click) ="copyTextToClipboard('accessToken') "> < mat-icon
90108 class ="reduce-icon-size "> content_copy</ mat-icon > JWT Token:</ label >
91109 < div class ="tokenResultDisplay ">
92110 < span id ="accessToken " style ="word-wrap: break-word "> {{tokenResultData.accessToken}}</ span >
93111 </ div >
94-
95112 < label class ="icon-label " (click) ="copyTextToClipboard('accessPasscode') "> < mat-icon
96113 class ="reduce-icon-size "> content_copy</ mat-icon > Passcode Token:</ label >
97- < div *ngIf ="tokenResultData.accessPasscode " class ="tokenResultDisplay ">
114+ @if (tokenResultData.accessPasscode) {
115+ < div class ="tokenResultDisplay ">
98116 < span id ="accessPasscode "> {{tokenResultData.accessPasscode}}</ span >
99117 </ div >
100-
118+ }
101119 < label class ="icon-label "> < mat-icon class ="reduce-icon-size "> info</ mat-icon > Expiration:</ label >
102120 < div class ="tokenResultDisplay ">
103121 < span > {{tokenResultData.expiry}}</ span >
104122 </ div >
105-
106123 < label class ="icon-label "> < mat-icon class ="reduce-icon-size "> info</ mat-icon > User:</ label >
107124 < div class ="tokenResultDisplay ">
108125 < span > {{tokenResultData.user}}</ span >
109126 </ div >
110-
111127 < label class ="icon-label " (click) ="copyTextToClipboard('target_url') "> < mat-icon
112128 class ="reduce-icon-size "> content_copy</ mat-icon > Target Base URL:</ label >
113129 < div class ="tokenResultDisplay ">
114130 < span id ="target_url "> {{tokenResultData.targetURL}}</ span >
115131 </ div >
116-
117132 < label class ="icon-label "> < mat-icon class ="reduce-icon-size "> link</ mat-icon > Homepage:</ label >
118133 < div class ="tokenResultDisplay ">
119134 < a [href] ="tokenResultData.homepageURL "> Homepage URL</ a >
120135 </ div >
121136 </ span >
137+ }
122138</ div >
0 commit comments