Add get healthInfo api using websockets (#543)

Integrate also HealthInfo API with Console UI
This commit is contained in:
Cesar N
2021-01-13 14:43:34 -06:00
committed by GitHub
parent 1c109769df
commit d6aceb5430
32 changed files with 1814 additions and 399 deletions

View File

@@ -43,6 +43,7 @@ var (
heal = "/heal"
trace = "/trace"
logs = "/logs"
healthInfo = "/health-info"
)
type ConfigurationActionSet struct {
@@ -231,6 +232,16 @@ var traceActionSet = ConfigurationActionSet{
),
}
// healthInfoActionSet contains the list of admin actions required for this endpoint to work
var healthInfoActionSet = ConfigurationActionSet{
actionTypes: iampolicy.NewActionSet(
iampolicy.AllAdminActions,
),
actions: iampolicy.NewActionSet(
iampolicy.HealthInfoAdminAction,
),
}
// endpointRules contains the mapping between endpoints and ActionSets, additional rules can be added here
var endpointRules = map[string]ConfigurationActionSet{
configuration: configurationActionSet,
@@ -252,6 +263,7 @@ var endpointRules = map[string]ConfigurationActionSet{
heal: healActionSet,
trace: traceActionSet,
logs: logsActionSet,
healthInfo: healthInfoActionSet,
}
// operatorRules contains the mapping between endpoints and ActionSets for operator only mode

View File

@@ -72,7 +72,7 @@ func TestGetAuthorizedEndpoints(t *testing.T) {
"admin:*",
},
},
want: 17,
want: 18,
},
{
name: "all s3 endpoints",
@@ -91,7 +91,7 @@ func TestGetAuthorizedEndpoints(t *testing.T) {
"s3:*",
},
},
want: 19,
want: 20,
},
{
name: "Console User - default endpoints",