console license page improvements and fixes (#647)

- fixed issue when deploying tenant with tls disabled
- applied new design for tenant details and license screens
- added license refresh job to operator console
- added new refresh license endpoint
- console operator not longer store CONSOLE_ACCESS_KEY and
  CONSOLE_SECRET_KEY values in the tenant-console-secret

Co-authored-by: Daniel Valdivia <hola@danielvaldivia.com>
This commit is contained in:
Lenin Alevski
2021-03-22 11:08:31 -07:00
committed by GitHub
parent 2a704d3d59
commit 7ce36bac42
29 changed files with 1382 additions and 135 deletions

View File

@@ -307,6 +307,9 @@ func NewConsoleAPI(spec *loads.Document) *ConsoleAPI {
AdminAPISubscriptionInfoHandler: admin_api.SubscriptionInfoHandlerFunc(func(params admin_api.SubscriptionInfoParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.SubscriptionInfo has not yet been implemented")
}),
AdminAPISubscriptionRefreshHandler: admin_api.SubscriptionRefreshHandlerFunc(func(params admin_api.SubscriptionRefreshParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.SubscriptionRefresh has not yet been implemented")
}),
AdminAPISubscriptionValidateHandler: admin_api.SubscriptionValidateHandlerFunc(func(params admin_api.SubscriptionValidateParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation admin_api.SubscriptionValidate has not yet been implemented")
}),
@@ -551,6 +554,8 @@ type ConsoleAPI struct {
AdminAPISubscriptionActivateHandler admin_api.SubscriptionActivateHandler
// AdminAPISubscriptionInfoHandler sets the operation handler for the subscription info operation
AdminAPISubscriptionInfoHandler admin_api.SubscriptionInfoHandler
// AdminAPISubscriptionRefreshHandler sets the operation handler for the subscription refresh operation
AdminAPISubscriptionRefreshHandler admin_api.SubscriptionRefreshHandler
// AdminAPISubscriptionValidateHandler sets the operation handler for the subscription validate operation
AdminAPISubscriptionValidateHandler admin_api.SubscriptionValidateHandler
// AdminAPITenantAddPoolHandler sets the operation handler for the tenant add pool operation
@@ -890,6 +895,9 @@ func (o *ConsoleAPI) Validate() error {
if o.AdminAPISubscriptionInfoHandler == nil {
unregistered = append(unregistered, "admin_api.SubscriptionInfoHandler")
}
if o.AdminAPISubscriptionRefreshHandler == nil {
unregistered = append(unregistered, "admin_api.SubscriptionRefreshHandler")
}
if o.AdminAPISubscriptionValidateHandler == nil {
unregistered = append(unregistered, "admin_api.SubscriptionValidateHandler")
}
@@ -1349,6 +1357,10 @@ func (o *ConsoleAPI) initHandlerCache() {
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/subscription/refresh"] = admin_api.NewSubscriptionRefresh(o.context, o.AdminAPISubscriptionRefreshHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/subscription/validate"] = admin_api.NewSubscriptionValidate(o.context, o.AdminAPISubscriptionValidateHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)