forked from x/icebergs
opt island
This commit is contained in:
parent
1f0a904767
commit
e67d59d310
@ -8,6 +8,7 @@ import (
|
|||||||
"mime/multipart"
|
"mime/multipart"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
@ -295,6 +296,7 @@ func init() {
|
|||||||
conf := mdb.Confm(m, cli.RUNTIME, cli.CONF)
|
conf := mdb.Confm(m, cli.RUNTIME, cli.CONF)
|
||||||
m.Cmd("", mdb.CREATE, ice.SHY, kit.Select("https://shylinux.com", conf[cli.CTX_SHY]))
|
m.Cmd("", mdb.CREATE, ice.SHY, kit.Select("https://shylinux.com", conf[cli.CTX_SHY]))
|
||||||
m.Cmd("", mdb.CREATE, ice.DEV, kit.Select("https://2021.shylinux.com", ice.Info.Make.Domain, conf[cli.CTX_DEV]))
|
m.Cmd("", mdb.CREATE, ice.DEV, kit.Select("https://2021.shylinux.com", ice.Info.Make.Domain, conf[cli.CTX_DEV]))
|
||||||
|
m.Cmd("", mdb.CREATE, "dev_ip", kit.Select("https://2021.shylinux.com", os.Getenv("ctx_dev_ip")))
|
||||||
m.Cmd("", mdb.CREATE, ice.OPS, kit.Select("http://localhost:9020", conf[cli.CTX_OPS]))
|
m.Cmd("", mdb.CREATE, ice.OPS, kit.Select("http://localhost:9020", conf[cli.CTX_OPS]))
|
||||||
m.Cmd("", mdb.CREATE, ice.DEMO, kit.Select("http://localhost:20000", conf[cli.CTX_DEMO]))
|
m.Cmd("", mdb.CREATE, ice.DEMO, kit.Select("http://localhost:20000", conf[cli.CTX_DEMO]))
|
||||||
m.Cmd("", mdb.CREATE, ice.MAIL, kit.Select("https://mail.shylinux.com", conf[cli.CTX_MAIL]))
|
m.Cmd("", mdb.CREATE, ice.MAIL, kit.Select("https://mail.shylinux.com", conf[cli.CTX_MAIL]))
|
||||||
|
@ -21,7 +21,7 @@ func _action_exec(m *ice.Message, river, storm, index string, arg ...string) {
|
|||||||
}).Length() == 0, ice.ErrNotRight, index, arg) {
|
}).Length() == 0, ice.ErrNotRight, index, arg) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
kit.If(index == "web.chat.island.portal", func() { m.Option(ice.MSG_USERROLE, aaa.VOID) })
|
// kit.If(index == "web.chat.island.portal", func() { m.Option(ice.MSG_USERROLE, aaa.VOID) })
|
||||||
kit.If(!ctx.PodCmd(m, index, arg), func() { m.Cmdy(index, arg) })
|
kit.If(!ctx.PodCmd(m, index, arg), func() { m.Cmdy(index, arg) })
|
||||||
}
|
}
|
||||||
func _action_auth(m *ice.Message, share string) *ice.Message {
|
func _action_auth(m *ice.Message, share string) *ice.Message {
|
||||||
|
@ -48,6 +48,7 @@ func _publish_contexts(m *ice.Message, arg ...string) {
|
|||||||
for _, k := range kit.Default(arg, ice.MISC) {
|
for _, k := range kit.Default(arg, ice.MISC) {
|
||||||
m.OptionDefault(web.DOMAIN, web.UserHost(m))
|
m.OptionDefault(web.DOMAIN, web.UserHost(m))
|
||||||
m.Options(cli.CTX_ENV, kit.Select("", lex.SP+kit.JoinKV(mdb.EQ, lex.SP, cli.CTX_POD, m.Option(ice.MSG_USERPOD)), m.Option(ice.MSG_USERPOD) != ""))
|
m.Options(cli.CTX_ENV, kit.Select("", lex.SP+kit.JoinKV(mdb.EQ, lex.SP, cli.CTX_POD, m.Option(ice.MSG_USERPOD)), m.Option(ice.MSG_USERPOD) != ""))
|
||||||
|
kit.If(m.Option("ctx_dev_ip"), func(p string) { m.Option(cli.CTX_ENV, m.Option(cli.CTX_DEV)+" "+"ctx_dev_ip="+p) })
|
||||||
m.Option(ice.TCP_DOMAIN, kit.ParseURL(web.UserHost(m)).Hostname())
|
m.Option(ice.TCP_DOMAIN, kit.ParseURL(web.UserHost(m)).Hostname())
|
||||||
switch k {
|
switch k {
|
||||||
case INSTALL:
|
case INSTALL:
|
||||||
|
1
misc.go
1
misc.go
@ -80,6 +80,7 @@ func (m *Message) PushDetail(value Any, arg ...string) *Message {
|
|||||||
case string:
|
case string:
|
||||||
value = kit.UnMarshal(v)
|
value = kit.UnMarshal(v)
|
||||||
}
|
}
|
||||||
|
m.Option(MSG_FIELDS, FIELDS_DETAIL)
|
||||||
return m.Push(FIELDS_DETAIL, value, kit.Split(kit.Join(arg)))
|
return m.Push(FIELDS_DETAIL, value, kit.Split(kit.Join(arg)))
|
||||||
}
|
}
|
||||||
func (m *Message) RenameOption(from, to string) *Message {
|
func (m *Message) RenameOption(from, to string) *Message {
|
||||||
|
@ -521,7 +521,7 @@ func init() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
defer web.ToastProcess(m)()
|
defer web.ToastProcess(m)()
|
||||||
for _, dev := range []string{ice.DEV, ice.SHY} {
|
for _, dev := range []string{"dev_ip", ice.DEV, ice.SHY} {
|
||||||
p := m.Option(ORIGIN)
|
p := m.Option(ORIGIN)
|
||||||
kit.If(!kit.HasPrefix(p, nfs.PS, web.HTTP), func() { p = m.Cmdv(web.SPIDE, dev, web.CLIENT_ORIGIN) + web.X(p) })
|
kit.If(!kit.HasPrefix(p, nfs.PS, web.HTTP), func() { p = m.Cmdv(web.SPIDE, dev, web.CLIENT_ORIGIN) + web.X(p) })
|
||||||
m.Info("clone %s", p)
|
m.Info("clone %s", p)
|
||||||
@ -641,8 +641,10 @@ func init() {
|
|||||||
}
|
}
|
||||||
}},
|
}},
|
||||||
web.SERVE_START: {Hand: func(m *ice.Message, arg ...string) {
|
web.SERVE_START: {Hand: func(m *ice.Message, arg ...string) {
|
||||||
m.Cmd("", CLONE, ORIGIN, "node_modules", mdb.NAME, "", nfs.PATH, "")
|
m.Go(func() {
|
||||||
m.Cmd("", CLONE, ORIGIN, "icons", mdb.NAME, "", nfs.PATH, "")
|
m.Cmd("", CLONE, ORIGIN, "node_modules", mdb.NAME, "", nfs.PATH, "")
|
||||||
|
m.Cmd("", CLONE, ORIGIN, "icons", mdb.NAME, "", nfs.PATH, "")
|
||||||
|
})
|
||||||
}},
|
}},
|
||||||
web.STATS_TABLES: {Hand: func(m *ice.Message, _ ...string) {
|
web.STATS_TABLES: {Hand: func(m *ice.Message, _ ...string) {
|
||||||
if ice.Info.NodeType == web.SERVER {
|
if ice.Info.NodeType == web.SERVER {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user