Skip to content

Commit

Permalink
Merge pull request #1383 from ersonp/update/dmsgpty
Browse files Browse the repository at this point in the history
Add param customCommand for PtyUI.Handler
  • Loading branch information
mrpalide authored Oct 7, 2022
2 parents 9824aba + eb5409d commit 90a0b2f
Show file tree
Hide file tree
Showing 13 changed files with 46 additions and 46 deletions.
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ require (
github.com/james-barrow/golang-ipc v0.0.0-20210227130457-95e7cc81f5e2
github.com/jaypipes/ghw v0.9.0
github.com/lib/pq v1.10.7
github.com/skycoin/dmsg v0.0.0-20220904231115-c313c992c788
github.com/skycoin/dmsg v0.0.0-20221007110410-643ca4fc9f82
github.com/skycoin/skywire-utilities v0.0.0-20220712142443-abafa30105ce
github.com/skycoin/systray v1.10.1-0.20220630135132-48d2a1fb85d8
github.com/spf13/pflag v1.0.5
Expand Down Expand Up @@ -84,6 +84,7 @@ require (
github.com/tklauser/numcpus v0.2.1 // indirect
github.com/valyala/fastrand v1.1.0 // indirect
github.com/valyala/histogram v1.2.0 // indirect
github.com/xtaci/lossyconn v0.0.0-20200209145036-adba10fffc37 // indirect
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect
golang.org/x/mod v0.5.0 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
Expand Down
7 changes: 2 additions & 5 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -489,15 +489,12 @@ github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMB
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/skycoin/dmsg v0.0.0-20220704102949-fece1bd9c40c/go.mod h1:7ixxeJVjbe3lxDkI4Yizj/TWoafYxs8cPJfxjlDeG+w=
github.com/skycoin/dmsg v0.0.0-20220904231115-c313c992c788 h1:64kDxF9LISKQiXZRvyzc+YBXrS0zW/xsBZkEsuylMHM=
github.com/skycoin/dmsg v0.0.0-20220904231115-c313c992c788/go.mod h1:bscsMvIj9ZeHynfrvnWrTtab94xzdtyz5cOlA6y2Ccc=
github.com/skycoin/dmsg v0.0.0-20221007110410-643ca4fc9f82 h1:AOjOMys6Ew+IkUHf0lIuaoW42cxQ7JUuq8J5A0mbloI=
github.com/skycoin/dmsg v0.0.0-20221007110410-643ca4fc9f82/go.mod h1:ykPIRMpkSLssjwNKJpD/DF+F2NVTA/7Ja59gfOSDoh0=
github.com/skycoin/noise v0.0.0-20180327030543-2492fe189ae6 h1:1Nc5EBY6pjfw1kwW0duwyG+7WliWz5u9kgk1h5MnLuA=
github.com/skycoin/noise v0.0.0-20180327030543-2492fe189ae6/go.mod h1:UXghlricA7J3aRD/k7p/zBObQfmBawwCxIVPVjz2Q3o=
github.com/skycoin/skycoin v0.27.1 h1:HatxsRwVSPaV4qxH6290xPBmkH/HgiuAoY2qC+e8C9I=
github.com/skycoin/skycoin v0.27.1/go.mod h1:78nHjQzd8KG0jJJVL/j0xMmrihXi70ti63fh8vXScJw=
github.com/skycoin/skywire v1.1.1-0.20220904173023-147ebb63e34f/go.mod h1:0msKd6lrV0i7Tzav74brusk52dJ/hcg42H0k5c0y7pw=
github.com/skycoin/skywire-utilities v0.0.0-20220617085111-5c8c8d3ced14/go.mod h1:B63p56igl38Ha+zjqi26d2om6XEe9jozwB6kzAWMnm0=
github.com/skycoin/skywire-utilities v0.0.0-20220712142443-abafa30105ce h1:+AkZeazhMXpzdPhAG2tn71ubVSPwUECMXYK/LIIVQSU=
github.com/skycoin/skywire-utilities v0.0.0-20220712142443-abafa30105ce/go.mod h1:B63p56igl38Ha+zjqi26d2om6XEe9jozwB6kzAWMnm0=
github.com/skycoin/systray v1.10.1-0.20220630135132-48d2a1fb85d8 h1:2IA2Iw6rgNpbd/rogzBbmNpfGLPhf9zYE68RY8CmU4k=
Expand Down
4 changes: 3 additions & 1 deletion pkg/visor/hypervisor.go
Original file line number Diff line number Diff line change
Expand Up @@ -1514,6 +1514,8 @@ func setupDmsgPtyUI(dmsgC *dmsg.Client, visorPK cipher.PubKey) *dmsgPtyUI {

func (hv *Hypervisor) getPty() http.HandlerFunc {
return hv.withCtx(hv.visorCtx, func(w http.ResponseWriter, r *http.Request, ctx *httpCtx) {
ctx.PtyUI.PtyUI.Handler()(w, r)
customCommand := make(map[string][]string)
customCommand["update"] = skyenv.UpdateCommand()
ctx.PtyUI.PtyUI.Handler(customCommand)(w, r)
})
}
4 changes: 2 additions & 2 deletions vendor/github.com/skycoin/dmsg/pkg/dmsg/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions vendor/github.com/skycoin/dmsg/pkg/dmsg/entity_common.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/skycoin/dmsg/pkg/dmsg/server.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions vendor/github.com/skycoin/dmsg/pkg/dmsghttp/http.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions vendor/github.com/skycoin/dmsg/pkg/dmsgpty/const.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions vendor/github.com/skycoin/dmsg/pkg/dmsgpty/const_unix.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions vendor/github.com/skycoin/dmsg/pkg/dmsgpty/const_windows.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions vendor/github.com/skycoin/dmsg/pkg/dmsgpty/host.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions vendor/github.com/skycoin/dmsg/pkg/dmsgpty/ui.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ github.com/shirou/gopsutil/v3/process
## explicit; go 1.13
github.com/sirupsen/logrus
github.com/sirupsen/logrus/hooks/syslog
# github.com/skycoin/dmsg v0.0.0-20220904231115-c313c992c788
# github.com/skycoin/dmsg v0.0.0-20221007110410-643ca4fc9f82
## explicit; go 1.16
github.com/skycoin/dmsg/internal/servermetrics
github.com/skycoin/dmsg/pkg/direct
Expand Down Expand Up @@ -271,6 +271,8 @@ github.com/valyala/histogram
# github.com/xtaci/kcp-go v5.4.20+incompatible
## explicit
github.com/xtaci/kcp-go
# github.com/xtaci/lossyconn v0.0.0-20200209145036-adba10fffc37
## explicit; go 1.13
# go.etcd.io/bbolt v1.3.6
## explicit; go 1.12
go.etcd.io/bbolt
Expand Down

0 comments on commit 90a0b2f

Please sign in to comment.