mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -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 |
|
| `internationalization` | Enables internationalization | Yes |
|
||||||
| `accessTokenExpirationCheck` | Enable OAuth access_token expiration check and token refresh using the refresh_token | |
|
| `accessTokenExpirationCheck` | Enable OAuth access_token expiration check and token refresh using the refresh_token | |
|
||||||
| `disablePrometheusExemplarSampling` | Disable Prometheus examplar sampling | |
|
| `disablePrometheusExemplarSampling` | Disable Prometheus examplar sampling | |
|
||||||
|
| `logsSampleInExplore` | Enables access to the logs sample feature in Explore | Yes |
|
||||||
|
|
||||||
## Beta feature toggles
|
## Beta feature toggles
|
||||||
|
|
||||||
|
@ -92,5 +92,6 @@ export interface FeatureToggles {
|
|||||||
alertingNoNormalState?: boolean;
|
alertingNoNormalState?: boolean;
|
||||||
azureMultipleResourcePicker?: boolean;
|
azureMultipleResourcePicker?: boolean;
|
||||||
topNavCommandPalette?: boolean;
|
topNavCommandPalette?: boolean;
|
||||||
|
logsSampleInExplore?: boolean;
|
||||||
logsContextDatasourceUi?: boolean;
|
logsContextDatasourceUi?: boolean;
|
||||||
}
|
}
|
||||||
|
@ -426,6 +426,14 @@ var (
|
|||||||
State: FeatureStateBeta,
|
State: FeatureStateBeta,
|
||||||
FrontendOnly: true,
|
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",
|
Name: "logsContextDatasourceUi",
|
||||||
Description: "Allow datasource to provide custom UI for context view",
|
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
|
// Launch the Command Palette from the top navigation search box
|
||||||
FlagTopNavCommandPalette = "topNavCommandPalette"
|
FlagTopNavCommandPalette = "topNavCommandPalette"
|
||||||
|
|
||||||
|
// FlagLogsSampleInExplore
|
||||||
|
// Enables access to the logs sample feature in Explore
|
||||||
|
FlagLogsSampleInExplore = "logsSampleInExplore"
|
||||||
|
|
||||||
// FlagLogsContextDatasourceUi
|
// FlagLogsContextDatasourceUi
|
||||||
// Allow datasource to provide custom UI for context view
|
// Allow datasource to provide custom UI for context view
|
||||||
FlagLogsContextDatasourceUi = "logsContextDatasourceUi"
|
FlagLogsContextDatasourceUi = "logsContextDatasourceUi"
|
||||||
|
@ -514,7 +514,9 @@ export class Explore extends React.PureComponent<Props, ExploreState> {
|
|||||||
<ErrorBoundaryAlert>{this.renderFlameGraphPanel()}</ErrorBoundaryAlert>
|
<ErrorBoundaryAlert>{this.renderFlameGraphPanel()}</ErrorBoundaryAlert>
|
||||||
)}
|
)}
|
||||||
{showTrace && <ErrorBoundaryAlert>{this.renderTraceViewPanel()}</ErrorBoundaryAlert>}
|
{showTrace && <ErrorBoundaryAlert>{this.renderTraceViewPanel()}</ErrorBoundaryAlert>}
|
||||||
{showLogsSample && <ErrorBoundaryAlert>{this.renderLogsSamplePanel()}</ErrorBoundaryAlert>}
|
{config.featureToggles.logsSampleInExplore && showLogsSample && (
|
||||||
|
<ErrorBoundaryAlert>{this.renderLogsSamplePanel()}</ErrorBoundaryAlert>
|
||||||
|
)}
|
||||||
{showNoData && <ErrorBoundaryAlert>{this.renderNoData()}</ErrorBoundaryAlert>}
|
{showNoData && <ErrorBoundaryAlert>{this.renderNoData()}</ErrorBoundaryAlert>}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
Loading…
Reference in New Issue
Block a user