-
{Object.keys(LogsDedupStrategy).map((dedupType: string, i) => (
{
dedupStrategy={dedupStrategy}
getRowContext={this.props.getRowContext}
highlighterExpressions={highlighterExpressions}
- onClickLabel={onClickLabel}
+ onClickFilterLabel={onClickFilterLabel}
+ onClickFilterOutLabel={onClickFilterOutLabel}
rowLimit={data ? data.rows.length : undefined}
- showLabels={showLabels}
showTime={showTime}
timeZone={timeZone}
/>
diff --git a/public/app/features/explore/LogsContainer.tsx b/public/app/features/explore/LogsContainer.tsx
index 5aba50a1e8b..6c41b14fbfd 100644
--- a/public/app/features/explore/LogsContainer.tsx
+++ b/public/app/features/explore/LogsContainer.tsx
@@ -35,7 +35,8 @@ interface LogsContainerProps {
logsHighlighterExpressions?: string[];
logsResult?: LogsModel;
dedupedResult?: LogsModel;
- onClickLabel: (key: string, value: string) => void;
+ onClickFilterLabel?: (key: string, value: string) => void;
+ onClickFilterOutLabel?: (key: string, value: string) => void;
onStartScanning: () => void;
onStopScanning: () => void;
timeZone: TimeZone;
@@ -87,7 +88,8 @@ export class LogsContainer extends PureComponent {
logsHighlighterExpressions,
logsResult,
dedupedResult,
- onClickLabel,
+ onClickFilterLabel,
+ onClickFilterOutLabel,
onStartScanning,
onStopScanning,
absoluteRange,
@@ -126,7 +128,8 @@ export class LogsContainer extends PureComponent {
highlighterExpressions={logsHighlighterExpressions}
loading={loading}
onChangeTime={this.onChangeTime}
- onClickLabel={onClickLabel}
+ onClickFilterLabel={onClickFilterLabel}
+ onClickFilterOutLabel={onClickFilterOutLabel}
onStartScanning={onStartScanning}
onStopScanning={onStopScanning}
onDedupStrategyChange={this.handleDedupStrategyChange}
diff --git a/public/app/plugins/datasource/loki/datasource.ts b/public/app/plugins/datasource/loki/datasource.ts
index de65c148038..bbffe4b5615 100644
--- a/public/app/plugins/datasource/loki/datasource.ts
+++ b/public/app/plugins/datasource/loki/datasource.ts
@@ -262,6 +262,10 @@ export class LokiDatasource extends DataSourceApi {
selector = addLabelToSelector(selector, action.key, action.value);
break;
}
+ case 'ADD_FILTER_OUT': {
+ selector = addLabelToSelector(selector, action.key, action.value, '!=');
+ break;
+ }
default:
break;
}
diff --git a/public/app/plugins/panel/logs/LogsPanel.tsx b/public/app/plugins/panel/logs/LogsPanel.tsx
index c926fef69ed..a4f0527077f 100644
--- a/public/app/plugins/panel/logs/LogsPanel.tsx
+++ b/public/app/plugins/panel/logs/LogsPanel.tsx
@@ -31,8 +31,8 @@ export const LogsPanel: React.FunctionComponent = ({
dedupStrategy={LogsDedupStrategy.none}
highlighterExpressions={[]}
showTime={showTime}
- showLabels={false}
timeZone={timeZone}
+ isLogsPanel={true}
/>
);