Refine group, editor, and admin workflows
This commit is contained in:
@@ -494,6 +494,12 @@ func (u *ui) apiTokenDetailPanel(gtx layout.Context) layout.Dimensions {
|
||||
return lbl.Layout(gtx)
|
||||
},
|
||||
layout.Spacer{Height: unit.Dp(8)}.Layout,
|
||||
func(gtx layout.Context) layout.Dimensions {
|
||||
lbl := material.Label(u.theme, unit.Sp(12), "Identity")
|
||||
lbl.Color = mutedColor
|
||||
return lbl.Layout(gtx)
|
||||
},
|
||||
layout.Spacer{Height: unit.Dp(4)}.Layout,
|
||||
labeledEditor(u.theme, "Name", &u.apiTokenName, false),
|
||||
layout.Spacer{Height: unit.Dp(6)}.Layout,
|
||||
labeledEditor(u.theme, "Client Name", &u.apiTokenClientName, false),
|
||||
@@ -546,6 +552,12 @@ func (u *ui) apiTokenDetailPanel(gtx layout.Context) layout.Dimensions {
|
||||
}
|
||||
rows = append(rows,
|
||||
layout.Spacer{Height: unit.Dp(10)}.Layout,
|
||||
func(gtx layout.Context) layout.Dimensions {
|
||||
lbl := material.Label(u.theme, unit.Sp(12), "Token actions")
|
||||
lbl.Color = mutedColor
|
||||
return lbl.Layout(gtx)
|
||||
},
|
||||
layout.Spacer{Height: unit.Dp(6)}.Layout,
|
||||
func(gtx layout.Context) layout.Dimensions {
|
||||
return layout.Flex{Axis: layout.Vertical}.Layout(gtx,
|
||||
layout.Rigid(func(gtx layout.Context) layout.Dimensions {
|
||||
@@ -632,6 +644,12 @@ func (u *ui) apiTokenDetailPanel(gtx layout.Context) layout.Dimensions {
|
||||
}
|
||||
rows = append(rows,
|
||||
layout.Spacer{Height: unit.Dp(10)}.Layout,
|
||||
func(gtx layout.Context) layout.Dimensions {
|
||||
lbl := material.Label(u.theme, unit.Sp(12), "New rule")
|
||||
lbl.Color = mutedColor
|
||||
return lbl.Layout(gtx)
|
||||
},
|
||||
layout.Spacer{Height: unit.Dp(6)}.Layout,
|
||||
func(gtx layout.Context) layout.Dimensions {
|
||||
return material.CheckBox(u.theme, &u.apiPolicyAllow, "Allow rule (unchecked means deny rule)").Layout(gtx)
|
||||
},
|
||||
@@ -678,16 +696,22 @@ func (u *ui) apiAuditDetailPanel(gtx layout.Context) layout.Dimensions {
|
||||
event := events[u.selectedAuditIndex]
|
||||
rows = append(rows,
|
||||
layout.Spacer{Height: unit.Dp(12)}.Layout,
|
||||
detailLine(u.theme, "Type", string(event.Type)),
|
||||
layout.Spacer{Height: unit.Dp(6)}.Layout,
|
||||
func(gtx layout.Context) layout.Dimensions {
|
||||
return compactCard(gtx, func(gtx layout.Context) layout.Dimensions {
|
||||
return layout.Flex{Axis: layout.Vertical}.Layout(gtx,
|
||||
layout.Rigid(detailLine(u.theme, "Type", string(event.Type))),
|
||||
layout.Rigid(layout.Spacer{Height: unit.Dp(6)}.Layout),
|
||||
layout.Rigid(detailLine(u.theme, "Operation", string(event.Operation))),
|
||||
)
|
||||
})
|
||||
},
|
||||
layout.Spacer{Height: unit.Dp(8)}.Layout,
|
||||
detailLine(u.theme, "When", event.At.Local().Format(time.RFC3339)),
|
||||
layout.Spacer{Height: unit.Dp(6)}.Layout,
|
||||
detailLine(u.theme, "Token", event.TokenName),
|
||||
layout.Spacer{Height: unit.Dp(6)}.Layout,
|
||||
detailLine(u.theme, "Client", event.ClientName),
|
||||
layout.Spacer{Height: unit.Dp(6)}.Layout,
|
||||
detailLine(u.theme, "Operation", string(event.Operation)),
|
||||
layout.Spacer{Height: unit.Dp(6)}.Layout,
|
||||
detailLine(u.theme, "Resource", formatAuditResource(event.Resource)),
|
||||
layout.Spacer{Height: unit.Dp(6)}.Layout,
|
||||
detailLine(u.theme, "Message", event.Message),
|
||||
|
||||
Reference in New Issue
Block a user