fix(iam): ensure access key status is persisted and defaulted to Active (#8341)
* Fix master leader election startup issue Fixes #error-log-leader-not-selected-yet * not useful test * fix(iam): ensure access key status is persisted and defaulted to Active * make pb * update tests * using constants
This commit is contained in:
@@ -126,7 +126,7 @@ templ ServiceAccounts(data dash.ServiceAccountsData) {
|
||||
<code class="text-muted">{sa.AccessKeyId}</code>
|
||||
</td>
|
||||
<td>
|
||||
if sa.Status == "Active" {
|
||||
if sa.Status == dash.StatusActive {
|
||||
<span class="badge bg-success">Active</span>
|
||||
} else {
|
||||
<span class="badge bg-secondary">Inactive</span>
|
||||
@@ -141,7 +141,7 @@ templ ServiceAccounts(data dash.ServiceAccountsData) {
|
||||
</button>
|
||||
<button type="button" class="btn btn-outline-primary"
|
||||
data-action="toggle-sa-status" data-sa-id={ sa.ID } data-current-status={ sa.Status }>
|
||||
if sa.Status == "Active" {
|
||||
if sa.Status == dash.StatusActive {
|
||||
<i class="fas fa-pause"></i>
|
||||
} else {
|
||||
<i class="fas fa-play"></i>
|
||||
|
||||
@@ -121,7 +121,7 @@ func ServiceAccounts(data dash.ServiceAccountsData) templ.Component {
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
if sa.Status == "Active" {
|
||||
if sa.Status == dash.StatusActive {
|
||||
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "<span class=\"badge bg-success\">Active</span>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
@@ -188,7 +188,7 @@ func ServiceAccounts(data dash.ServiceAccountsData) templ.Component {
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
if sa.Status == "Active" {
|
||||
if sa.Status == dash.StatusActive {
|
||||
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "<i class=\"fas fa-pause\"></i>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
|
||||
Reference in New Issue
Block a user