more slickness tweaks for demonstration purposes

This commit is contained in:
Michael Quigley 2022-12-07 12:24:00 -05:00
parent f12868c116
commit 362b8c2b84
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62
5 changed files with 19 additions and 11 deletions

View File

@ -70,9 +70,13 @@ func (self *inviteHandler) Handle(params account.InviteParams) middleware.Respon
return account.NewInviteInternalServerError()
}
if err := sendVerificationEmail(params.Body.Email, token); err != nil {
logrus.Errorf("error sending verification email for '%v': %v", params.Body.Email, err)
return account.NewInviteInternalServerError()
if cfg.Email != nil && cfg.Registration != nil {
if err := sendVerificationEmail(params.Body.Email, token); err != nil {
logrus.Errorf("error sending verification email for '%v': %v", params.Body.Email, err)
return account.NewInviteInternalServerError()
}
} else {
logrus.Errorf("'email' and 'registration' configuration missing; skipping registration email")
}
logrus.Infof("account request for '%v' has registration token '%v'", params.Body.Email, ar.Token)

View File

@ -39,11 +39,16 @@ func overviewHandler(_ metadata.OverviewParams, principal *rest_model_zrok.Princ
ZID: env.ZId,
},
}
sparkData, err := sparkDataForServices(svcs)
if err != nil {
logrus.Errorf("error querying spark data for services: %v", err)
return metadata.NewOverviewInternalServerError()
var sparkData map[string][]int64
if cfg.Influx != nil {
sparkData, err = sparkDataForServices(svcs)
if err != nil {
logrus.Errorf("error querying spark data for services: %v", err)
return metadata.NewOverviewInternalServerError()
}
}
for _, svc := range svcs {
feEndpoint := ""
if svc.FrontendEndpoint != nil {

View File

@ -12,7 +12,7 @@ create table services (
id integer primary key,
environment_id integer constraint fk_environments_services references environments on delete cascade,
z_id string not null unique,
token string not null unique,
token string not null unique,
share_mode string not null,
backend_mode string not null,
frontend_selection string,

View File

@ -7,7 +7,6 @@ import * as environment from './api/environment';
const Environments = (props) => {
const humanizeDuration = require("humanize-duration")
const disableEnvironment = (envId) => {
console.log(envId)
if(window.confirm('really disable environment "' + envId +'"?')) {
environment.disable({body: {identity: envId}}).then(resp => {
console.log(resp);

View File

@ -8,7 +8,7 @@ const Services = (props) => {
const humanizeDuration = require("humanize-duration")
const unshareService = (envId, svcToken) => {
if(window.confirm('really disable service "' + svcToken +'"?')) {
service.unshare({body: {zId: envId, svcToken: svcToken}}).then(resp => {
service.unshare({body: {envZId: envId, svcToken: svcToken}}).then(resp => {
console.log(resp)
})
}
@ -28,7 +28,7 @@ const Services = (props) => {
{
name: 'Actions',
selector: row => <>
<button data-value={row.name} onClick={e => unshareService(props.envId, row.name)} title={"Un-share Service '"+row.name+"'"}>
<button data-value={row.name} onClick={e => unshareService(props.envId, row.token)} title={"Un-share Service '"+row.token+"'"}>
<Icon path={mdiCloseOutline} size={0.7}/>
</button>
</>