mirror of
https://github.com/openziti/zrok.git
synced 2025-06-22 18:51:33 +02:00
more slickness tweaks for demonstration purposes
This commit is contained in:
parent
f12868c116
commit
362b8c2b84
@ -70,9 +70,13 @@ func (self *inviteHandler) Handle(params account.InviteParams) middleware.Respon
|
|||||||
return account.NewInviteInternalServerError()
|
return account.NewInviteInternalServerError()
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := sendVerificationEmail(params.Body.Email, token); err != nil {
|
if cfg.Email != nil && cfg.Registration != nil {
|
||||||
logrus.Errorf("error sending verification email for '%v': %v", params.Body.Email, err)
|
if err := sendVerificationEmail(params.Body.Email, token); err != nil {
|
||||||
return account.NewInviteInternalServerError()
|
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)
|
logrus.Infof("account request for '%v' has registration token '%v'", params.Body.Email, ar.Token)
|
||||||
|
@ -39,11 +39,16 @@ func overviewHandler(_ metadata.OverviewParams, principal *rest_model_zrok.Princ
|
|||||||
ZID: env.ZId,
|
ZID: env.ZId,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
sparkData, err := sparkDataForServices(svcs)
|
|
||||||
if err != nil {
|
var sparkData map[string][]int64
|
||||||
logrus.Errorf("error querying spark data for services: %v", err)
|
if cfg.Influx != nil {
|
||||||
return metadata.NewOverviewInternalServerError()
|
sparkData, err = sparkDataForServices(svcs)
|
||||||
|
if err != nil {
|
||||||
|
logrus.Errorf("error querying spark data for services: %v", err)
|
||||||
|
return metadata.NewOverviewInternalServerError()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, svc := range svcs {
|
for _, svc := range svcs {
|
||||||
feEndpoint := ""
|
feEndpoint := ""
|
||||||
if svc.FrontendEndpoint != nil {
|
if svc.FrontendEndpoint != nil {
|
||||||
|
@ -12,7 +12,7 @@ create table services (
|
|||||||
id integer primary key,
|
id integer primary key,
|
||||||
environment_id integer constraint fk_environments_services references environments on delete cascade,
|
environment_id integer constraint fk_environments_services references environments on delete cascade,
|
||||||
z_id string not null unique,
|
z_id string not null unique,
|
||||||
token string not null unique,
|
token string not null unique,
|
||||||
share_mode string not null,
|
share_mode string not null,
|
||||||
backend_mode string not null,
|
backend_mode string not null,
|
||||||
frontend_selection string,
|
frontend_selection string,
|
||||||
|
@ -7,7 +7,6 @@ import * as environment from './api/environment';
|
|||||||
const Environments = (props) => {
|
const Environments = (props) => {
|
||||||
const humanizeDuration = require("humanize-duration")
|
const humanizeDuration = require("humanize-duration")
|
||||||
const disableEnvironment = (envId) => {
|
const disableEnvironment = (envId) => {
|
||||||
console.log(envId)
|
|
||||||
if(window.confirm('really disable environment "' + envId +'"?')) {
|
if(window.confirm('really disable environment "' + envId +'"?')) {
|
||||||
environment.disable({body: {identity: envId}}).then(resp => {
|
environment.disable({body: {identity: envId}}).then(resp => {
|
||||||
console.log(resp);
|
console.log(resp);
|
||||||
|
@ -8,7 +8,7 @@ const Services = (props) => {
|
|||||||
const humanizeDuration = require("humanize-duration")
|
const humanizeDuration = require("humanize-duration")
|
||||||
const unshareService = (envId, svcToken) => {
|
const unshareService = (envId, svcToken) => {
|
||||||
if(window.confirm('really disable service "' + 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)
|
console.log(resp)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -28,7 +28,7 @@ const Services = (props) => {
|
|||||||
{
|
{
|
||||||
name: 'Actions',
|
name: 'Actions',
|
||||||
selector: row => <>
|
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}/>
|
<Icon path={mdiCloseOutline} size={0.7}/>
|
||||||
</button>
|
</button>
|
||||||
</>
|
</>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user