Add feature hide-menu for embedded screens on Operator UI (#1604)

* Add feature hide-menu for embedded screens on Operator UI

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
This commit is contained in:
Daniel Valdivia
2022-02-21 21:42:18 -08:00
committed by GitHub
parent 28dcd19dd9
commit 56c4311a6b
27 changed files with 381 additions and 166 deletions

View File

@@ -2605,6 +2605,14 @@ func init() {
"accessKey": {
"type": "string"
},
"features": {
"type": "object",
"properties": {
"hide_menu": {
"type": "boolean"
}
}
},
"secretKey": {
"type": "string"
}
@@ -5812,6 +5820,14 @@ func init() {
}
}
},
"LoginRequestFeatures": {
"type": "object",
"properties": {
"hide_menu": {
"type": "boolean"
}
}
},
"NodeSelectorTermMatchExpressionsItems0": {
"description": "A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.",
"type": "object",
@@ -7043,6 +7059,14 @@ func init() {
"accessKey": {
"type": "string"
},
"features": {
"type": "object",
"properties": {
"hide_menu": {
"type": "boolean"
}
}
},
"secretKey": {
"type": "string"
}

View File

@@ -83,7 +83,7 @@ func login(credentials restapi.ConsoleCredentialsI) (*string, error) {
return nil, err
}
// if we made it here, the consoleCredentials work, generate a jwt with claims
token, err := auth.NewEncryptedTokenForClient(&tokens, credentials.GetAccountAccessKey())
token, err := auth.NewEncryptedTokenForClient(&tokens, credentials.GetAccountAccessKey(), nil)
if err != nil {
LogError("error authenticating user: %v", err)
return nil, errInvalidCredentials

View File

@@ -123,9 +123,12 @@ func serveProxy(responseWriter http.ResponseWriter, req *http.Request) {
return
}
data := map[string]string{
"accessKey": string(tenantConfiguration["accesskey"]),
"secretKey": string(tenantConfiguration["secretkey"]),
data := map[string]interface{}{
"accessKey": tenantConfiguration["accesskey"],
"secretKey": tenantConfiguration["secretkey"],
"features": map[string]bool{
"hide_menu": true,
},
}
payload, _ := json.Marshal(data)