Commit 9a4f846 1 parent 73eacec commit 9a4f846 Copy full SHA for 9a4f846
File tree 3 files changed +3
-28
lines changed
3 files changed +3
-28
lines changed Original file line number Diff line number Diff line change @@ -132,9 +132,6 @@ type Config struct {
132
132
// parameters necessary to derive tokens.
133
133
Vault * config.VaultConfig `hcl:"vault"`
134
134
135
- // UI is used to configure the web UI
136
- UI * config.UIConfig `hcl:"ui"`
137
-
138
135
// NomadConfig is used to override the default config.
139
136
// This is largely used for testing purposes.
140
137
NomadConfig * nomad.Config `hcl:"-" json:"-"`
@@ -929,7 +926,6 @@ func DefaultConfig() *Config {
929
926
AdvertiseAddrs : & AdvertiseAddrs {},
930
927
Consul : config .DefaultConsulConfig (),
931
928
Vault : config .DefaultVaultConfig (),
932
- UI : config .DefaultUIConfig (),
933
929
Client : & ClientConfig {
934
930
Enabled : false ,
935
931
MaxKillTimeout : "30s" ,
@@ -1168,14 +1164,6 @@ func (c *Config) Merge(b *Config) *Config {
1168
1164
result .Vault = result .Vault .Merge (b .Vault )
1169
1165
}
1170
1166
1171
- // Apply the UI Configuration
1172
- if result .UI == nil && b .UI != nil {
1173
- uiConfig := * b .UI
1174
- result .UI = & uiConfig
1175
- } else if b .UI != nil {
1176
- result .UI = result .UI .Merge (b .UI )
1177
- }
1178
-
1179
1167
// Apply the sentinel config
1180
1168
if result .Sentinel == nil && b .Sentinel != nil {
1181
1169
server := * b .Sentinel
Original file line number Diff line number Diff line change 47
47
// Set to false by stub_asset if the ui build tag isn't enabled
48
48
uiEnabled = true
49
49
50
- // Displayed when ui is disabled, but overridden if the ui build
51
- // tag isn't enabled
52
- stubHTML = "<html><p>Nomad UI is disabled</p></html>"
50
+ // Overridden if the ui build tag isn't enabled
51
+ stubHTML = ""
53
52
54
53
// allowCORS sets permissive CORS headers for a handler
55
54
allowCORS = cors .New (cors.Options {
@@ -337,21 +336,13 @@ func (s *HTTPServer) registerHandlers(enableDebug bool) {
337
336
s .mux .HandleFunc ("/v1/namespace" , s .wrap (s .NamespaceCreateRequest ))
338
337
s .mux .HandleFunc ("/v1/namespace/" , s .wrap (s .NamespaceSpecificRequest ))
339
338
340
- uiConfigEnabled := s .agent .config .UI != nil && s .agent .config .UI .Enabled
341
-
342
- if uiEnabled && uiConfigEnabled {
339
+ if uiEnabled {
343
340
s .mux .Handle ("/ui/" , http .StripPrefix ("/ui/" , s .handleUI (http .FileServer (& UIAssetWrapper {FileSystem : assetFS ()}))))
344
- s .logger .Debug ("UI is enabled" )
345
341
} else {
346
342
// Write the stubHTML
347
343
s .mux .HandleFunc ("/ui/" , func (w http.ResponseWriter , r * http.Request ) {
348
344
w .Write ([]byte (stubHTML ))
349
345
})
350
- if uiEnabled && ! uiConfigEnabled {
351
- s .logger .Warn ("UI is disabled" )
352
- } else {
353
- s .logger .Debug ("UI is disabled in this build" )
354
- }
355
346
}
356
347
s .mux .Handle ("/" , s .handleRootFallthrough ())
357
348
Original file line number Diff line number Diff line change 200
200
"title" : " tls" ,
201
201
"path" : " configuration/tls"
202
202
},
203
- {
204
- "title" : " ui" ,
205
- "path" : " configuration/ui"
206
- },
207
203
{
208
204
"title" : " vault" ,
209
205
"path" : " configuration/vault"
You can’t perform that action at this time.
0 commit comments