Skip to content

Commit

Permalink
Merge branch 'feature/multitenancy' of github.com:JulianQuispel/dashb…
Browse files Browse the repository at this point in the history
…oards-observability into feature/multitenancy
  • Loading branch information
JulianQuispel committed Feb 2, 2024
2 parents 882b2b6 + e2ec3fd commit bee7ee9
Show file tree
Hide file tree
Showing 43 changed files with 479 additions and 130 deletions.
1 change: 1 addition & 0 deletions common/constants/query_assist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

const QUERY_ASSIST_API_PREFIX = '/api/observability/query_assist';
export const QUERY_ASSIST_API = {
CONFIGURED: `${QUERY_ASSIST_API_PREFIX}/configured`,
GENERATE_PPL: `${QUERY_ASSIST_API_PREFIX}/generate_ppl`,
SUMMARIZE: `${QUERY_ASSIST_API_PREFIX}/summarize`,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export function DocViewer(props: IDocViewerProps) {
setTracesLink(
<EuiLink
className="trace-link"
href={`${observabilityTracesID}#/${traceId}`}
href={`${observabilityTracesID}#/traces/${traceId}`}
target="_blank"
external
/>
Expand Down
22 changes: 20 additions & 2 deletions public/components/event_analytics/explorer/explorer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ import {
TAB_EVENT_TITLE,
TIME_INTERVAL_OPTIONS,
} from '../../../../common/constants/explorer';
import { QUERY_ASSIST_API } from '../../../../common/constants/query_assist';
import {
LIVE_END_TIME,
LIVE_OPTIONS,
Expand Down Expand Up @@ -101,8 +102,8 @@ import { selectSearchMetaData } from '../../event_analytics/redux/slices/search_
import { getVizContainerProps } from '../../visualizations/charts/helpers';
import { TabContext, useFetchEvents, useFetchPatterns, useFetchVisualizations } from '../hooks';
import {
selectCountDistribution,
render as updateCountDistribution,
selectCountDistribution,
} from '../redux/slices/count_distribution_slice';
import { selectFields, updateFields } from '../redux/slices/field_slice';
import { selectQueryResult } from '../redux/slices/query_result_slice';
Expand All @@ -112,8 +113,8 @@ import { selectExplorerVisualization } from '../redux/slices/visualization_slice
import {
change as changeVisualizationConfig,
change as changeVizConfig,
selectVisualizationConfig,
change as updateVizConfig,
selectVisualizationConfig,
} from '../redux/slices/viualization_config_slice';
import { getDefaultVisConfig } from '../utils';
import { formatError, getContentTabTitle, getDateRange } from '../utils/utils';
Expand Down Expand Up @@ -217,6 +218,7 @@ export const Explorer = ({
const [subType, setSubType] = useState('visualization');
const [_metricMeasure, setMetricMeasure] = useState('');
const [_metricChecked, setMetricChecked] = useState(false);
const [_refresh, setRefresh] = useState({});
const queryRef = useRef();
const appBasedRef = useRef('');
appBasedRef.current = appBaseQuery;
Expand Down Expand Up @@ -272,6 +274,22 @@ export const Explorer = ({
};
}, []);

useEffect(() => {
// query assist UI should only be enabled when the feature is enabled and configured.
if (coreRefs.queryAssistEnabled) {
http
.get<{ configured: boolean; error?: string }>(QUERY_ASSIST_API.CONFIGURED)
.catch(() => {
console.warn('Failed to check if query assist is configured');
return { configured: false };
})
.then((response) => {
coreRefs.queryAssistEnabled = response.configured;
setRefresh({});
});
}
}, []);

const getErrorHandler = (title: string) => {
return (error: any) => {
if (coreRefs.summarizeEnabled) return;
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit bee7ee9

Please sign in to comment.