mirror of
https://github.com/grafana/grafana.git
synced 2024-12-30 10:47:30 -06:00
Explore: Implement feature toggle for logs sample (#62291)
* Explore: Implement feature toggle for logs sample * Run pkg/services/featuremgmt/toggles_gen_test.go * Remove boolean * Update copy
This commit is contained in:
parent
1ef7cfda3f
commit
d5294eb8fa
@ -30,6 +30,7 @@ Some stable features are enabled by default. You can disable a stable feature by
|
||||
| `internationalization` | Enables internationalization | Yes |
|
||||
| `accessTokenExpirationCheck` | Enable OAuth access_token expiration check and token refresh using the refresh_token | |
|
||||
| `disablePrometheusExemplarSampling` | Disable Prometheus examplar sampling | |
|
||||
| `logsSampleInExplore` | Enables access to the logs sample feature in Explore | Yes |
|
||||
|
||||
## Beta feature toggles
|
||||
|
||||
|
@ -92,5 +92,6 @@ export interface FeatureToggles {
|
||||
alertingNoNormalState?: boolean;
|
||||
azureMultipleResourcePicker?: boolean;
|
||||
topNavCommandPalette?: boolean;
|
||||
logsSampleInExplore?: boolean;
|
||||
logsContextDatasourceUi?: boolean;
|
||||
}
|
||||
|
@ -426,6 +426,14 @@ var (
|
||||
State: FeatureStateBeta,
|
||||
FrontendOnly: true,
|
||||
},
|
||||
{
|
||||
|
||||
Name: "logsSampleInExplore",
|
||||
Description: "Enables access to the logs sample feature in Explore",
|
||||
State: FeatureStateStable,
|
||||
Expression: "true", //turned on by default
|
||||
FrontendOnly: true,
|
||||
},
|
||||
{
|
||||
Name: "logsContextDatasourceUi",
|
||||
Description: "Allow datasource to provide custom UI for context view",
|
||||
|
@ -311,6 +311,10 @@ const (
|
||||
// Launch the Command Palette from the top navigation search box
|
||||
FlagTopNavCommandPalette = "topNavCommandPalette"
|
||||
|
||||
// FlagLogsSampleInExplore
|
||||
// Enables access to the logs sample feature in Explore
|
||||
FlagLogsSampleInExplore = "logsSampleInExplore"
|
||||
|
||||
// FlagLogsContextDatasourceUi
|
||||
// Allow datasource to provide custom UI for context view
|
||||
FlagLogsContextDatasourceUi = "logsContextDatasourceUi"
|
||||
|
@ -514,7 +514,9 @@ export class Explore extends React.PureComponent<Props, ExploreState> {
|
||||
<ErrorBoundaryAlert>{this.renderFlameGraphPanel()}</ErrorBoundaryAlert>
|
||||
)}
|
||||
{showTrace && <ErrorBoundaryAlert>{this.renderTraceViewPanel()}</ErrorBoundaryAlert>}
|
||||
{showLogsSample && <ErrorBoundaryAlert>{this.renderLogsSamplePanel()}</ErrorBoundaryAlert>}
|
||||
{config.featureToggles.logsSampleInExplore && showLogsSample && (
|
||||
<ErrorBoundaryAlert>{this.renderLogsSamplePanel()}</ErrorBoundaryAlert>
|
||||
)}
|
||||
{showNoData && <ErrorBoundaryAlert>{this.renderNoData()}</ErrorBoundaryAlert>}
|
||||
</>
|
||||
)}
|
||||
|
Loading…
Reference in New Issue
Block a user