Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow using custom assets for the UI. #68

Merged
merged 2 commits into from
Jan 6, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions common/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ var (
FlagTLSServerName = "tls-server-name"
FlagType = "type"
FlagUIIP = "ui-ip"
FlagUIAssetPath = "ui-asset-path"
FlagUICodecEndpoint = "ui-codec-endpoint"
FlagUIPort = "ui-port"
FlagUnpause = "unpause"
Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,5 @@ require (
)

replace github.com/grpc-ecosystem/grpc-gateway => github.com/temporalio/grpc-gateway v1.17.0

replace github.com/temporalio/ui-server/v2 v2.9.1 => github.com/temporalio/ui-server/v2 v2.9.2-0.20230105175408-7b947c15ce48
robholland marked this conversation as resolved.
Show resolved Hide resolved
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -764,8 +764,8 @@ github.com/temporalio/tchannel-go v1.22.1-0.20220818200552-1be8d8cffa5b h1:Fs3Ld
github.com/temporalio/tchannel-go v1.22.1-0.20220818200552-1be8d8cffa5b/go.mod h1:c+V9Z/ZgkzAdyGvHrvC5AsXgN+M9Qwey04cBdKYzV7U=
github.com/temporalio/tctl-kit v0.0.0-20221128225502-a682971cf481 h1:zaikUeNmdLQEsUXTyUAy65P2IzKFlt7EAEflQQF2ZUA=
github.com/temporalio/tctl-kit v0.0.0-20221128225502-a682971cf481/go.mod h1:VSiXCSr9dY+0TSRondg2YF5HhQhrMDN63jaRaBHy1+k=
github.com/temporalio/ui-server/v2 v2.9.1 h1:my6I0ow1hG69nbRqSLN2QySi3iw/n9kBQNvlRy640j8=
github.com/temporalio/ui-server/v2 v2.9.1/go.mod h1:Fd68+cECpTXc7oZh2oHUA5DQ1tIPa87mg9PPlJ8hPaA=
github.com/temporalio/ui-server/v2 v2.9.2-0.20230105175408-7b947c15ce48 h1:gZV/uAqsyGkjCXysBokalSN2xOQUCqE3wH/U6jCUU3s=
github.com/temporalio/ui-server/v2 v2.9.2-0.20230105175408-7b947c15ce48/go.mod h1:Fd68+cECpTXc7oZh2oHUA5DQ1tIPa87mg9PPlJ8hPaA=
github.com/twmb/murmur3 v1.1.5/go.mod h1:Qq/R7NUyOfr65zD+6Q5IHKsJLwP7exErjN6lyyq3OSQ=
github.com/twmb/murmur3 v1.1.6 h1:mqrRot1BRxm+Yct+vavLMou2/iJt0tNVTTC0QoIjaZg=
github.com/twmb/murmur3 v1.1.6/go.mod h1:Qq/R7NUyOfr65zD+6Q5IHKsJLwP7exErjN6lyyq3OSQ=
Expand Down
11 changes: 11 additions & 0 deletions server/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ func NewServerCommands(defaultCfg *sconfig.Config) []*cli.Command {
Usage: `IPv4 address to bind the web UI to instead of localhost`,
DefaultText: "same as --ip (eg. 127.0.0.1)",
},
&cli.StringFlag{
Name: common.FlagUIAssetPath,
Usage: `UI Custom Assets path`,
EnvVars: nil,
},
&cli.StringFlag{
Name: common.FlagUICodecEndpoint,
Usage: `UI Remote data converter HTTP endpoint`,
Expand Down Expand Up @@ -178,6 +183,7 @@ func NewServerCommands(defaultCfg *sconfig.Config) []*cli.Command {
uiPort = serverPort + 1000
uiIP = ip
uiCodecEndpoint = ""
uiAssetPath = ""
)

if c.IsSet(common.FlagUIPort) {
Expand All @@ -188,6 +194,10 @@ func NewServerCommands(defaultCfg *sconfig.Config) []*cli.Command {
uiIP = c.String(common.FlagUIIP)
}

if c.IsSet(common.FlagUIAssetPath) {
uiAssetPath = c.String(common.FlagUIAssetPath)
}

if c.IsSet(common.FlagUICodecEndpoint) {
uiCodecEndpoint = c.String(common.FlagUICodecEndpoint)
}
Expand Down Expand Up @@ -246,6 +256,7 @@ func NewServerCommands(defaultCfg *sconfig.Config) []*cli.Command {
Port: uiPort,
TemporalGRPCAddress: frontendAddr,
EnableUI: true,
UIAssetPath: uiAssetPath,
Codec: uiconfig.Codec{
Endpoint: uiCodecEndpoint,
},
Expand Down