diff --git a/x-pack/plugins/osquery/public/components/manage_integration_link.tsx b/x-pack/plugins/osquery/public/components/manage_integration_link.tsx
index db201611baed..8419003f5771 100644
--- a/x-pack/plugins/osquery/public/components/manage_integration_link.tsx
+++ b/x-pack/plugins/osquery/public/components/manage_integration_link.tsx
@@ -16,13 +16,7 @@ import { useOsqueryIntegration } from '../common/hooks';
const ManageIntegrationLinkComponent = () => {
const {
- application: {
- getUrlForApp,
- navigateToApp,
- capabilities: {
- osquery: { save: hasSaveUICapabilities },
- },
- },
+ application: { getUrlForApp, navigateToApp },
} = useKibana().services;
const { data: osqueryIntegration } = useOsqueryIntegration();
@@ -56,7 +50,7 @@ const ManageIntegrationLinkComponent = () => {
[navigateToApp, osqueryIntegration]
);
- return hasSaveUICapabilities && integrationHref ? (
+ return integrationHref ? (
{
// eslint-disable-next-line @elastic/eui/href-or-on-click
diff --git a/x-pack/plugins/osquery/public/routes/live_queries/list/index.tsx b/x-pack/plugins/osquery/public/routes/live_queries/list/index.tsx
index f5d2863b9e99..90ac7b5cc17a 100644
--- a/x-pack/plugins/osquery/public/routes/live_queries/list/index.tsx
+++ b/x-pack/plugins/osquery/public/routes/live_queries/list/index.tsx
@@ -9,14 +9,13 @@ import { EuiButton, EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import React, { useMemo } from 'react';
-import { useKibana, useRouterNavigate } from '../../../common/lib/kibana';
+import { useRouterNavigate } from '../../../common/lib/kibana';
import { ActionsTable } from '../../../actions/actions_table';
import { WithHeaderLayout } from '../../../components/layouts';
import { useBreadcrumbs } from '../../../common/hooks/use_breadcrumbs';
import { BetaBadge, BetaBadgeRowWrapper } from '../../../components/beta_badge';
const LiveQueriesPageComponent = () => {
- const hasSaveUICapabilities = useKibana().services.application.capabilities.osquery.save;
useBreadcrumbs('live_queries');
const newQueryLinkProps = useRouterNavigate('live_queries/new');
@@ -52,11 +51,7 @@ const LiveQueriesPageComponent = () => {
);
return (
-
+
);
diff --git a/x-pack/plugins/osquery/public/routes/scheduled_query_groups/details/index.tsx b/x-pack/plugins/osquery/public/routes/scheduled_query_groups/details/index.tsx
index abd81697fb02..d27dcfe19436 100644
--- a/x-pack/plugins/osquery/public/routes/scheduled_query_groups/details/index.tsx
+++ b/x-pack/plugins/osquery/public/routes/scheduled_query_groups/details/index.tsx
@@ -19,7 +19,7 @@ import React, { useMemo } from 'react';
import { useParams } from 'react-router-dom';
import styled from 'styled-components';
-import { useKibana, useRouterNavigate } from '../../../common/lib/kibana';
+import { useRouterNavigate } from '../../../common/lib/kibana';
import { WithHeaderLayout } from '../../../components/layouts';
import { useScheduledQueryGroup } from '../../../scheduled_query_groups/use_scheduled_query_group';
import { ScheduledQueryGroupQueriesTable } from '../../../scheduled_query_groups/scheduled_query_group_queries_table';
@@ -34,7 +34,6 @@ const Divider = styled.div`
`;
const ScheduledQueryGroupDetailsPageComponent = () => {
- const hasSaveUICapabilities = useKibana().services.application.capabilities.osquery.save;
const { scheduledQueryGroupId } = useParams<{ scheduledQueryGroupId: string }>();
const scheduledQueryGroupsListProps = useRouterNavigate('scheduled_query_groups');
const editQueryLinkProps = useRouterNavigate(
@@ -98,24 +97,20 @@ const ScheduledQueryGroupDetailsPageComponent = () => {
- {hasSaveUICapabilities ? (
- <>
-
-
-
-
-
-
-
-
- >
- ) : undefined}
+
+
+
+
+
+
+
+
),
- [data?.policy_id, editQueryLinkProps, hasSaveUICapabilities]
+ [data?.policy_id, editQueryLinkProps]
);
return (
diff --git a/x-pack/plugins/osquery/public/routes/scheduled_query_groups/list/index.tsx b/x-pack/plugins/osquery/public/routes/scheduled_query_groups/list/index.tsx
index 9c5ebfdb79f9..b02ef95498b5 100644
--- a/x-pack/plugins/osquery/public/routes/scheduled_query_groups/list/index.tsx
+++ b/x-pack/plugins/osquery/public/routes/scheduled_query_groups/list/index.tsx
@@ -9,13 +9,12 @@ import { EuiButton, EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import React, { useMemo } from 'react';
-import { useKibana, useRouterNavigate } from '../../../common/lib/kibana';
+import { useRouterNavigate } from '../../../common/lib/kibana';
import { WithHeaderLayout } from '../../../components/layouts';
import { ScheduledQueryGroupsTable } from '../../../scheduled_query_groups/scheduled_query_groups_table';
import { BetaBadge, BetaBadgeRowWrapper } from '../../../components/beta_badge';
const ScheduledQueryGroupsPageComponent = () => {
- const hasSaveUICapabilities = useKibana().services.application.capabilities.osquery.save;
const newQueryLinkProps = useRouterNavigate('scheduled_query_groups/add');
const LeftColumn = useMemo(
@@ -50,11 +49,7 @@ const ScheduledQueryGroupsPageComponent = () => {
);
return (
-
+
);
diff --git a/x-pack/plugins/osquery/public/scheduled_query_groups/active_state_switch.tsx b/x-pack/plugins/osquery/public/scheduled_query_groups/active_state_switch.tsx
index 1e06c1efd2c6..578cd4654e6b 100644
--- a/x-pack/plugins/osquery/public/scheduled_query_groups/active_state_switch.tsx
+++ b/x-pack/plugins/osquery/public/scheduled_query_groups/active_state_switch.tsx
@@ -35,11 +35,6 @@ const ActiveStateSwitchComponent: React.FC = ({ item })
const {
http,
notifications: { toasts },
- application: {
- capabilities: {
- osquery: { save: hasSaveUICapabilities },
- },
- },
} = useKibana().services;
const [confirmationModal, setConfirmationModal] = useState(false);
@@ -124,7 +119,7 @@ const ActiveStateSwitchComponent: React.FC = ({ item })
{isLoading && }
= ({ onCh
if (
inputFiles.length &&
- ((!!inputFiles[0].type.length && !SUPPORTED_PACK_EXTENSIONS.includes(inputFiles[0].type)) ||
+ ((!!inputFiles[0].type.length && !SUPPORTED_PACK_EXTENSIONS.includes(inputFiles[0].type)) ??
!inputFiles[0].name.endsWith('.conf'))
) {
packName.current = '';