Skip to content

Commit

Permalink
post merge fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kfirpeled committed Nov 21, 2024
1 parent b0f73b9 commit c7fb622
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import type { Maybe } from '@kbn/timelines-plugin/common/search_strategy/common'
import { useKibana } from '../../../../common/lib/kibana';
import { DocumentDetailsLeftPanelKey, DocumentDetailsRightPanelKey } from '../constants/panel_keys';
import { GRAPH_VISUALIZATION_ID } from '../../left/components/graph_visualization';
import { DocumentEventTypes } from '../../../../common/lib/telemetry';

export interface UseNavigateToGraphVisualizationParams {
/**
Expand Down Expand Up @@ -83,7 +84,7 @@ export const useNavigateToGraphVisualization = ({
const navigateToGraphVisualization = useCallback(() => {
if (isFlyoutOpen) {
openLeftPanel(left);
telemetry.reportDetailsFlyoutTabClicked({
telemetry.reportEvent(DocumentEventTypes.DetailsFlyoutTabClicked, {
location: scopeId,
panel: 'left',
tabId: 'visualize',
Expand All @@ -93,7 +94,7 @@ export const useNavigateToGraphVisualization = ({
right,
left,
});
telemetry.reportDetailsFlyoutOpened({
telemetry.reportEvent(DocumentEventTypes.DetailsFlyoutOpened, {
location: scopeId,
panel: 'left',
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ export default function (providerContext: FtrProviderContext) {
const supertest = getService('supertest');

const postGraph = (agent: Agent, body: GraphRequest, auth?: { user: string; pass: string }) => {
const req = agent
let req = agent
.post('/internal/cloud_security_posture/graph')
.set(ELASTIC_HTTP_VERSION_HEADER, '1')
.set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana')
.set('kbn-xsrf', 'xxxx');

if (auth) {
req.auth(auth.user, auth.pass);
req = req.auth(auth.user, auth.pass);
}

return req.send(body);
Expand Down
4 changes: 2 additions & 2 deletions x-pack/test/cloud_security_posture_api/routes/graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ export default function (providerContext: FtrProviderContext) {
const cspSecurity = CspSecurityCommonProvider(providerContext);

const postGraph = (agent: Agent, body: GraphRequest, auth?: { user: string; pass: string }) => {
const req = agent
let req = agent
.post('/internal/cloud_security_posture/graph')
.set(ELASTIC_HTTP_VERSION_HEADER, '1')
.set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana')
.set('kbn-xsrf', 'xxxx');

if (auth) {
req.auth(auth.user, auth.pass);
req = req.auth(auth.user, auth.pass);
}

return req.send(body);
Expand Down

0 comments on commit c7fb622

Please sign in to comment.