toggleLabelsInLogsUI: remove flag

This commit is contained in:
Matias Chomicki
2023-10-27 11:54:01 +02:00
parent 5d706705ea
commit 4b7479bd8e
7 changed files with 9 additions and 33 deletions
@@ -48,7 +48,6 @@ Some features are enabled by default. You can disable these feature by setting t
| `cloudWatchLogsMonacoEditor` | Enables the Monaco editor for CloudWatch Logs queries | Yes |
| `recordedQueriesMulti` | Enables writing multiple items from a single query within Recorded Queries | Yes |
| `transformationsRedesign` | Enables the transformations redesign | Yes |
| `toggleLabelsInLogsUI` | Enable toggleable filters in log details view | Yes |
| `azureMonitorDataplane` | Adds dataplane compliant frame metadata in the Azure Monitor datasource | Yes |
| `prometheusConfigOverhaulAuth` | Update the Prometheus configuration page with the new auth component | Yes |
| `dashgpt` | Enable AI powered features in dashboards | Yes |
@@ -103,7 +103,6 @@ export interface FeatureToggles {
logsExploreTableVisualisation?: boolean;
awsDatasourcesTempCredentials?: boolean;
transformationsRedesign?: boolean;
toggleLabelsInLogsUI?: boolean;
mlExpressions?: boolean;
traceQLStreaming?: boolean;
metricsSummary?: boolean;
-8
View File
@@ -589,14 +589,6 @@ var (
Expression: "true", // enabled by default
Owner: grafanaObservabilityMetricsSquad,
},
{
Name: "toggleLabelsInLogsUI",
Description: "Enable toggleable filters in log details view",
Stage: FeatureStageGeneralAvailability,
FrontendOnly: true,
Expression: "true", // enabled by default
Owner: grafanaObservabilityLogsSquad,
},
{
Name: "mlExpressions",
Description: "Enable support for Machine Learning in server-side expressions",
-1
View File
@@ -84,7 +84,6 @@ prometheusIncrementalQueryInstrumentation,experimental,@grafana/observability-me
logsExploreTableVisualisation,experimental,@grafana/observability-logs,false,false,false,true
awsDatasourcesTempCredentials,experimental,@grafana/aws-datasources,false,false,false,false
transformationsRedesign,GA,@grafana/observability-metrics,false,false,false,true
toggleLabelsInLogsUI,GA,@grafana/observability-logs,false,false,false,true
mlExpressions,experimental,@grafana/alerting-squad,false,false,false,false
traceQLStreaming,experimental,@grafana/observability-traces-and-profiling,false,false,false,true
metricsSummary,experimental,@grafana/observability-traces-and-profiling,false,false,false,true
1 Name Stage Owner requiresDevMode RequiresLicense RequiresRestart FrontendOnly
84 logsExploreTableVisualisation experimental @grafana/observability-logs false false false true
85 awsDatasourcesTempCredentials experimental @grafana/aws-datasources false false false false
86 transformationsRedesign GA @grafana/observability-metrics false false false true
toggleLabelsInLogsUI GA @grafana/observability-logs false false false true
87 mlExpressions experimental @grafana/alerting-squad false false false false
88 traceQLStreaming experimental @grafana/observability-traces-and-profiling false false false true
89 metricsSummary experimental @grafana/observability-traces-and-profiling false false false true
-4
View File
@@ -347,10 +347,6 @@ const (
// Enables the transformations redesign
FlagTransformationsRedesign = "transformationsRedesign"
// FlagToggleLabelsInLogsUI
// Enable toggleable filters in log details view
FlagToggleLabelsInLogsUI = "toggleLabelsInLogsUI"
// FlagMlExpressions
// Enable support for Machine Learning in server-side expressions
FlagMlExpressions = "mlExpressions"
+2 -5
View File
@@ -205,10 +205,7 @@ export class Explore extends React.PureComponent<Props, ExploreState> {
* TODO: In the future, we would like to return active filters based the query that produced the log line.
* @alpha
*/
isFilterLabelActive = async (key: string, value: string, refId?: string) => {
if (!config.featureToggles.toggleLabelsInLogsUI) {
return false;
}
isFilterLabelActive = async (key: string, value: string, refId: string) => {
const query = this.props.queries.find((q) => q.refId === refId);
if (!query) {
return false;
@@ -254,7 +251,7 @@ export class Explore extends React.PureComponent<Props, ExploreState> {
return query;
}
const ds = await getDataSourceSrv().get(datasource);
if (hasToggleableQueryFiltersSupport(ds) && config.featureToggles.toggleLabelsInLogsUI) {
if (hasToggleableQueryFiltersSupport(ds)) {
return ds.toggleQueryFilter(query, {
type: modification.type === 'ADD_FILTER' ? 'FILTER_FOR' : 'FILTER_OUT',
options: modification.options ?? {},
@@ -257,8 +257,7 @@ class UnThemedLogDetailsRow extends PureComponent<Props, State> {
const singleKey = parsedKeys == null ? false : parsedKeys.length === 1;
const singleVal = parsedValues == null ? false : parsedValues.length === 1;
const hasFilteringFunctionality = !disableActions && onClickFilterLabel && onClickFilterOutLabel;
const refIdTooltip =
config.featureToggles.toggleLabelsInLogsUI && row.dataFrame?.refId ? ` in query ${row.dataFrame?.refId}` : '';
const refIdTooltip = ` in query ${row.dataFrame?.refId}`;
const isMultiParsedValueWithNoContent =
!singleVal && parsedValues != null && !parsedValues.every((val) => val === '');
@@ -277,17 +276,12 @@ class UnThemedLogDetailsRow extends PureComponent<Props, State> {
<div className={styles.buttonRow}>
{hasFilteringFunctionality && (
<>
{config.featureToggles.toggleLabelsInLogsUI ? (
// If we are using the new label toggling, we want to use the async icon button
<AsyncIconButton
name="search-plus"
onClick={this.filterLabel}
isActive={this.isFilterLabelActive}
tooltipSuffix={refIdTooltip}
/>
) : (
<IconButton name="search-plus" onClick={this.filterLabel} tooltip="Filter for value" />
)}
<AsyncIconButton
name="search-plus"
onClick={this.filterLabel}
isActive={this.isFilterLabelActive}
tooltipSuffix={refIdTooltip}
/>
<IconButton
name="search-minus"
tooltip={`Filter out value${refIdTooltip}`}