mirror of
https://github.com/openziti/zrok.git
synced 2025-03-02 17:12:10 +01: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()
|
||||
}
|
||||
|
||||
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)
|
||||
|
@ -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 {
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
|
@ -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>
|
||||
</>
|
||||
|
Loading…
Reference in New Issue
Block a user