Added speedtest page & updated diagnostic page (#1099)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net> Co-authored-by: Benjamin Perez <benjamin@bexsoft.net> Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
This commit is contained in:
@@ -74,6 +74,7 @@ var (
|
||||
tools = "/tools"
|
||||
logs = "/tools/logs"
|
||||
auditLogs = "/tools/audit-logs"
|
||||
speedtest = "/tools/speedtest"
|
||||
healthInfo = "/tools/diagnostics"
|
||||
)
|
||||
|
||||
@@ -294,6 +295,16 @@ var healthInfoActionSet = ConfigurationActionSet{
|
||||
),
|
||||
}
|
||||
|
||||
// logsActionSet contains the list of admin actions required for this endpoint to work
|
||||
var speedtestActionSet = ConfigurationActionSet{
|
||||
actionTypes: iampolicy.NewActionSet(
|
||||
iampolicy.AllAdminActions,
|
||||
),
|
||||
actions: iampolicy.NewActionSet(
|
||||
iampolicy.HealthInfoAdminAction,
|
||||
),
|
||||
}
|
||||
|
||||
var displayRules = map[string]func() bool{
|
||||
// disable users page if LDAP is enabled
|
||||
users: func() bool {
|
||||
@@ -344,6 +355,7 @@ var endpointRules = map[string]ConfigurationActionSet{
|
||||
auditLogs: logsActionSet,
|
||||
tools: toolsActionSet,
|
||||
healthInfo: healthInfoActionSet,
|
||||
speedtest: speedtestActionSet,
|
||||
}
|
||||
|
||||
// operatorRules contains the mapping between endpoints and ActionSets for operator only mode
|
||||
|
||||
@@ -70,7 +70,7 @@ func TestGetAuthorizedEndpoints(t *testing.T) {
|
||||
"admin:*",
|
||||
},
|
||||
},
|
||||
want: 33,
|
||||
want: 34,
|
||||
},
|
||||
{
|
||||
name: "all s3 endpoints",
|
||||
@@ -89,7 +89,7 @@ func TestGetAuthorizedEndpoints(t *testing.T) {
|
||||
"s3:*",
|
||||
},
|
||||
},
|
||||
want: 35,
|
||||
want: 36,
|
||||
},
|
||||
{
|
||||
name: "Console User - default endpoints",
|
||||
|
||||
Reference in New Issue
Block a user