Skip to content

Commit

Permalink
Enable status indicator if no config value has been set (#4923)
Browse files Browse the repository at this point in the history
This fixes #4914 and also removes the default value from the
`dev/site-config.json` so that a dev setup makes use of the computed
value.
  • Loading branch information
mrnugget committed Jul 17, 2019
1 parent 0568188 commit a5e8889
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 1 addition & 2 deletions dev/site-config.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// The Sourcegraph site configuration for development servers.
{
"experimentalFeatures": {
"discussions": "enabled",
"statusIndicator": "enabled"
"discussions": "enabled"
},
"disablePublicRepoRedirects": true,
"repoListUpdateInterval": 1
Expand Down
6 changes: 5 additions & 1 deletion pkg/conf/computed.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,5 +280,9 @@ func Branding() *schema.Branding {
}

func ShowStatusIndicator() bool {
return Get().ExperimentalFeatures.StatusIndicator == "enabled"
val := Get().ExperimentalFeatures.StatusIndicator
if val == "" {
return true
}
return val == "enabled"
}

0 comments on commit a5e8889

Please sign in to comment.