From 1a1a572ee725fe46cd7fb9faef97c7c05d463f07 Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Wed, 8 Mar 2023 13:13:34 -0500 Subject: [PATCH 001/190] intial commit for UI framework for integrations Signed-off-by: Derek Ho --- public/components/app.tsx | 1 + public/components/common/side_nav.tsx | 150 ++++++ .../placeholder/components/app_table.tsx | 292 ++++++++++++ .../placeholder/components/integration.tsx | 146 ++++++ .../components/integration_card.tsx | 74 +++ public/components/placeholder/home.tsx | 434 ++++++++++++++++++ server/common/metrics/constants.ts | 1 + 7 files changed, 1098 insertions(+) create mode 100644 public/components/common/side_nav.tsx create mode 100644 public/components/placeholder/components/app_table.tsx create mode 100644 public/components/placeholder/components/integration.tsx create mode 100644 public/components/placeholder/components/integration_card.tsx create mode 100644 public/components/placeholder/home.tsx diff --git a/public/components/app.tsx b/public/components/app.tsx index 18066f3281..ad4fef745a 100644 --- a/public/components/app.tsx +++ b/public/components/app.tsx @@ -12,6 +12,7 @@ import { observabilityID, observabilityTitle } from '../../common/constants/shar import { store } from '../framework/redux/store'; import { AppPluginStartDependencies } from '../types'; import { Home as ApplicationAnalyticsHome } from './application_analytics/home'; +import { Home as PlaceholderHome } from './placeholder/home'; import { MetricsListener } from './common/metrics_listener'; import { Home as CustomPanelsHome } from './custom_panels/home'; import { EventAnalytics } from './event_analytics'; diff --git a/public/components/common/side_nav.tsx b/public/components/common/side_nav.tsx new file mode 100644 index 0000000000..6c54fb9dd3 --- /dev/null +++ b/public/components/common/side_nav.tsx @@ -0,0 +1,150 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { + EuiButton, + EuiFlexGroup, + EuiFlexItem, + EuiPage, + EuiPageBody, + EuiPageSideBar, + EuiSideNav, + EuiSideNavItemType, + EuiSwitch, +} from '@elastic/eui'; +import React from 'react'; +import { useState } from 'react'; +import { toMountPoint } from '../../../../../src/plugins/opensearch_dashboards_react/public'; +import { uiSettingsService } from '../../../common/utils'; + +export function ObservabilitySideBar(props: { children: React.ReactNode }) { + // set items.isSelected based on location.hash passed in + // tries to find an item where href is a prefix of the hash + // if none will try to find an item where the hash is a prefix of href + function setIsSelected( + items: Array>, + hash: string, + initial = true, + reverse = false + ): boolean { + // Default page is Events Analytics + // But it is kept as second option in side nav + if (hash === '#/') { + items[0].items[2].isSelected = true; + return true; + } + for (let i = 0; i < items.length; i++) { + const item = items[i]; + if (item.href && ((reverse && item.href.startsWith(hash)) || hash.startsWith(item.href))) { + item.isSelected = true; + return true; + } + if (item.items?.length && setIsSelected(item.items, hash, false, reverse)) return true; + } + return initial && setIsSelected(items, hash, false, !reverse); + } + + const items = [ + { + name: 'Observability', + id: 0, + items: [ + { + name: 'Application analytics', + id: 1, + href: '#/application_analytics', + }, + { + name: 'Trace analytics', + id: 2, + href: '#/trace_analytics/home', + items: [ + { + name: 'Traces', + id: 2.1, + href: '#/trace_analytics/traces', + }, + { + name: 'Services', + id: 2.2, + href: '#/trace_analytics/services', + }, + ], + }, + { + name: 'Event analytics', + id: 3, + href: '#/event_analytics', + }, + { + name: 'Metrics analytics', + id: 4, + href: '#/metrics_analytics/', + }, + { + name: 'Operational panels', + id: 5, + href: '#/operational_panels/', + }, + { + name: 'Notebooks', + id: 6, + href: '#/notebooks', + }, + { + name: 'Placeholder', + id: 7, + href: '#/placeholder', + }, + ], + }, + ]; + setIsSelected(items, location.hash); + const [isDarkMode, setIsDarkMode] = useState(uiSettingsService.get('theme:darkMode')); + + return ( + + + + + + + + { + uiSettingsService.set('theme:darkMode', !isDarkMode).then((resp) => { + setIsDarkMode(!isDarkMode); + uiSettingsService.addToast({ + title: 'Theme setting changes require you to reload the page to take effect.', + text: toMountPoint( + <> + + + window.location.reload()}> + Reload page + + + + + ), + color: 'success', + }); + }); + }} + /> + + + + {props.children} + + ); +} diff --git a/public/components/placeholder/components/app_table.tsx b/public/components/placeholder/components/app_table.tsx new file mode 100644 index 0000000000..59eb7ce523 --- /dev/null +++ b/public/components/placeholder/components/app_table.tsx @@ -0,0 +1,292 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ +/* eslint-disable react-hooks/exhaustive-deps */ + +import { + EuiBadge, + EuiButton, + EuiContextMenuItem, + EuiContextMenuPanel, + EuiFlexGroup, + EuiFlexItem, + EuiHorizontalRule, + EuiInMemoryTable, + EuiLink, + EuiLoadingSpinner, + EuiOverlayMask, + EuiPage, + EuiPageBody, + EuiPageContent, + EuiPageContentHeader, + EuiPageContentHeaderSection, + EuiPageHeader, + EuiPageHeaderSection, + EuiPopover, + EuiSpacer, + EuiTableFieldDataColumnType, + EuiText, + EuiTitle, + EuiToolTip, +} from '@elastic/eui'; +import _ from 'lodash'; +import React, { ReactElement, useEffect, useState } from 'react'; +import moment from 'moment'; +import { useNavigate } from 'react-router-dom'; +import { DeleteModal } from '../../common/helpers/delete_modal'; +import { AppAnalyticsComponentDeps } from '../home'; +import { getCustomModal } from '../../custom_panels/helpers/modal_containers'; +import { pageStyles, UI_DATE_FORMAT } from '../../../../common/constants/shared'; +import { ApplicationType, AvailabilityType } from '../../../../common/types/application_analytics'; +import { Synopsis } from './integration_card'; +import { navigateToDefaultApp } from '../../../../../../src/plugins/url_forwarding/public/navigate_to_default_app'; + +interface AppTableProps extends AppAnalyticsComponentDeps { + loading: boolean; + applications: ApplicationType[]; + fetchApplications: () => void; + renameApplication: (newAppName: string, appId: string) => void; + deleteApplication: (appList: string[], panelIdList: string[], toastMessage?: string) => void; + clearStorage: () => void; + moveToApp: (id: string, type: string) => void; +} + +export function AppTable(props: AppTableProps) { + const { + chrome, + applications, + parentBreadcrumbs, + fetchApplications, + renameApplication, + deleteApplication, + setFilters, + clearStorage, + moveToApp, + } = props; + const [isModalVisible, setIsModalVisible] = useState(false); + const [isActionsPopoverOpen, setIsActionsPopoverOpen] = useState(false); + const [modalLayout, setModalLayout] = useState(); + const [selectedApplications, setSelectedApplications] = useState([]); + const createButtonText = 'Create application'; + + useEffect(() => { + chrome.setBreadcrumbs([ + ...parentBreadcrumbs, + { + text: 'Placeholder', + href: '#/placeholder', + }, + ]); + clear(); + fetchApplications(); + }, []); + + const clear = () => { + setFilters([]); + clearStorage(); + }; + + const closeModal = () => { + setIsModalVisible(false); + }; + + const showModal = () => { + setIsModalVisible(true); + }; + + const onRename = async (newApplicationName: string) => { + renameApplication(newApplicationName, selectedApplications[0].id); + closeModal(); + }; + + const onDelete = async () => { + closeModal(); + const toastMessage = `Application${ + selectedApplications.length > 1 ? 's' : ' "' + selectedApplications[0].name + '"' + } successfully deleted!`; + await deleteApplication( + selectedApplications.map((app) => app.id), + selectedApplications.map((app) => app.panelId), + toastMessage + ); + }; + + const renameApp = () => { + setModalLayout( + getCustomModal( + onRename, + closeModal, + 'Name', + 'Rename application', + 'Cancel', + 'Rename', + selectedApplications[0].name + ) + ); + showModal(); + }; + + const deleteApp = () => { + const applicationString = `application${selectedApplications.length > 1 ? 's' : ''}`; + setModalLayout( + + ); + showModal(); + }; + + const popoverButton = ( + setIsActionsPopoverOpen(!isActionsPopoverOpen)} + > + Actions + + ); + + const popoverItems: ReactElement[] = [ + { + setIsActionsPopoverOpen(false); + renameApp(); + }} + > + Rename + , + // + // Duplicate + // , + { + setIsActionsPopoverOpen(false); + deleteApp(); + }} + > + Delete + , + // Add sample application, + ]; + + const renderAvailability = (value: AvailabilityType, record: ApplicationType) => { + if (value.color === 'loading') { + return ; + } else if (value.name) { + return ( + + {value.name} + + ); + } else if (value.color === 'undefined') { + return No match; + } else if (value.color === 'null') { + return -; + } else { + return ( + moveToApp(record.id, 'createSetAvailability')} + > + Set Availability + + ); + } + }; + + const tableColumns = [ + { + field: 'name', + name: 'Name', + sortable: true, + truncateText: true, + render: (value, record) => ( + + {_.truncate(record.name, { length: 100 })} + + ), + }, + { + field: 'composition', + name: 'Composition', + sortable: false, + truncateText: true, + render: (value, record) => ( + + + {record.servicesEntities.concat(record.traceGroups).join(', ')} + + + ), + }, + { + field: 'availability', + name: 'Current Availability', + sortable: true, + render: renderAvailability, + }, + { + field: 'dateModified', + name: 'Date Modified', + sortable: true, + render: (value) => {moment(value).format(UI_DATE_FORMAT)}, + }, + ] as Array>; + + const features = ['nginx', 'fluentbit']; + + return ( +
+ + + +

Integrations (2)

+
+
+
+ + + + + {features.map((feature) => ( + + { + window.location.assign(`#/placeholder/${feature}`); + }} + /> + + ))} + +
+ ); +} diff --git a/public/components/placeholder/components/integration.tsx b/public/components/placeholder/components/integration.tsx new file mode 100644 index 0000000000..282623cf15 --- /dev/null +++ b/public/components/placeholder/components/integration.tsx @@ -0,0 +1,146 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ +/* eslint-disable react-hooks/exhaustive-deps */ + +import { + EuiHorizontalRule, + EuiPage, + EuiPageBody, + EuiPageHeader, + EuiPageHeaderSection, + EuiPanel, + EuiSelectOption, + EuiSpacer, + EuiTabbedContent, + EuiTabbedContentTab, + EuiText, + EuiTitle, +} from '@elastic/eui'; +import DSLService from 'public/services/requests/dsl'; +import PPLService from 'public/services/requests/ppl'; +import SavedObjects from 'public/services/saved_objects/event_analytics/saved_objects'; +import TimestampUtils from 'public/services/timestamp/timestamp'; +import React, { ReactChild, useEffect, useState } from 'react'; +import { useHistory } from 'react-router-dom'; +import { useDispatch } from 'react-redux'; +import { last } from 'lodash'; +import { VisualizationType } from 'common/types/custom_panels'; +import { TracesContent } from '../../trace_analytics/components/traces/traces_content'; +import { DashboardContent } from '../../trace_analytics/components/dashboard/dashboard_content'; +import { ServicesContent } from '../../trace_analytics/components/services/services_content'; +import { filtersToDsl, PanelTitle } from '../../trace_analytics/components/common/helper_functions'; +import { SpanDetailTable } from '../../trace_analytics/components/traces/span_detail_table'; +import { Explorer } from '../../event_analytics/explorer/explorer'; +// import { Configuration } from './configuration'; +import { + TAB_CONFIG_ID, + TAB_CONFIG_TITLE, + TAB_LOG_ID, + TAB_LOG_TITLE, + TAB_OVERVIEW_ID, + TAB_OVERVIEW_TITLE, + TAB_PANEL_ID, + TAB_PANEL_TITLE, + TAB_SERVICE_ID, + TAB_SERVICE_TITLE, + TAB_TRACE_ID, + TAB_TRACE_TITLE, +} from '../../../../common/constants/application_analytics'; +import { TAB_EVENT_ID, TAB_CHART_ID, NEW_TAB } from '../../../../common/constants/explorer'; +import { IQueryTab } from '../../../../common/types/explorer'; +import { NotificationsStart } from '../../../../../../src/core/public'; +import { AppAnalyticsComponentDeps } from '../home'; +import { CustomPanelView } from '../../custom_panels/custom_panel_view'; +import { + ApplicationRequestType, + ApplicationType, +} from '../../../../common/types/application_analytics'; +import { CUSTOM_PANELS_API_PREFIX } from '../../../../common/constants/custom_panels'; +import { ServiceDetailFlyout } from './flyout_components/service_detail_flyout'; +import { SpanDetailFlyout } from '../../trace_analytics/components/traces/span_detail_flyout'; +import { TraceDetailFlyout } from './flyout_components/trace_detail_flyout'; +import { fetchAppById, initializeTabData } from '../helpers/utils'; +import { QueryManager } from '../../../../common/query_manager/ppl_query_manager'; + +const searchBarConfigs = { + [TAB_EVENT_ID]: { + showSaveButton: false, + showSavePanelOptionsList: false, + }, + [TAB_CHART_ID]: { + showSaveButton: true, + showSavePanelOptionsList: false, + }, +}; + +interface AppDetailProps extends AppAnalyticsComponentDeps { + disabled?: boolean; + appId: string; + pplService: PPLService; + dslService: DSLService; + savedObjects: SavedObjects; + timestampUtils: TimestampUtils; + notifications: NotificationsStart; + queryManager: QueryManager; + updateApp: (appId: string, updateAppData: Partial, type: string) => void; + setToasts: (title: string, color?: string, text?: ReactChild) => void; + callback: (childfunction: () => void) => void; +} + +export function Application(props: AppDetailProps) { + const { + pplService, + dslService, + timestampUtils, + savedObjects, + http, + notifications, + appId, + chrome, + parentBreadcrumbs, + query, + filters, + appConfigs, + updateApp, + setAppConfigs, + setToasts, + setFilters, + callback, + queryManager, + mode, + } = props; + const [application, setApplication] = useState({ + id: '', + dateCreated: '', + dateModified: '', + name: '', + description: '', + baseQuery: '', + servicesEntities: [], + traceGroups: [], + panelId: '', + availability: { name: '', color: '', availabilityVisId: '' }, + }); + + useEffect(() => { + chrome.setBreadcrumbs([ + ...parentBreadcrumbs, + { + text: 'Placeholder', + href: '#/placeholder', + }, + { + text: appId, + href: `${last(parentBreadcrumbs)!.href}placeholder/${appId}`, + }, + ]); + }, [appId]); + + return ( + +

{appId}

+
+ ); +} diff --git a/public/components/placeholder/components/integration_card.tsx b/public/components/placeholder/components/integration_card.tsx new file mode 100644 index 0000000000..9208b94e40 --- /dev/null +++ b/public/components/placeholder/components/integration_card.tsx @@ -0,0 +1,74 @@ +import { + EuiCard, + EuiHorizontalRule, + EuiIcon, + EuiPage, + EuiPageBody, + EuiPageHeader, + EuiPageHeaderSection, + EuiPanel, + EuiSelectOption, + EuiSpacer, + EuiTabbedContent, + EuiTabbedContentTab, + EuiText, + EuiTitle, +} from '@elastic/eui'; +import DSLService from 'public/services/requests/dsl'; +import PPLService from 'public/services/requests/ppl'; +import SavedObjects from 'public/services/saved_objects/event_analytics/saved_objects'; +import TimestampUtils from 'public/services/timestamp/timestamp'; +import React, { ReactChild, useEffect, useState } from 'react'; + +export function Synopsis({ + id, + description, + iconUrl, + iconType, + title, + url, + wrapInPanel, + onClick, + isBeta, +}) { + let optionalImg; + if (iconUrl) { + optionalImg = ; + } else if (iconType) { + optionalImg = ; + } + + // const classes = classNames('homSynopsis__card', { + // 'homSynopsis__card--noPanel': !wrapInPanel, + // }); + + return ( + + ); +} + +// Synopsis.propTypes = { +// description: PropTypes.string.isRequired, +// iconUrl: PropTypes.string, +// iconType: PropTypes.string, +// title: PropTypes.string.isRequired, +// url: PropTypes.string, +// onClick: PropTypes.func, +// isBeta: PropTypes.bool, +// }; + +// Synopsis.defaultProps = { +// isBeta: false, +// }; diff --git a/public/components/placeholder/home.tsx b/public/components/placeholder/home.tsx new file mode 100644 index 0000000000..ffee0913f9 --- /dev/null +++ b/public/components/placeholder/home.tsx @@ -0,0 +1,434 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ +/* eslint-disable react-hooks/exhaustive-deps */ +/* eslint-disable no-console */ + +import React, { ReactChild, useEffect, useState } from 'react'; +import { Route, RouteComponentProps, Switch } from 'react-router-dom'; +import DSLService from 'public/services/requests/dsl'; +import PPLService from 'public/services/requests/ppl'; +import SavedObjects from 'public/services/saved_objects/event_analytics/saved_objects'; +import TimestampUtils from 'public/services/timestamp/timestamp'; +import { EuiGlobalToastList, EuiLink } from '@elastic/eui'; +import { Toast } from '@elastic/eui/src/components/toast/global_toast_list'; +import { isEmpty, last } from 'lodash'; +import { useDispatch } from 'react-redux'; +import { AppTable } from './components/app_table'; +import { Application } from './components/integration'; +import { CreateApp } from './components/create'; +import { TraceAnalyticsComponentDeps, TraceAnalyticsCoreDeps } from '../trace_analytics/home'; +import { FilterType } from '../trace_analytics/components/common/filters/filters'; +import { handleDataPrepperIndicesExistRequest } from '../trace_analytics/requests/request_handler'; +import { ObservabilitySideBar } from '../common/side_nav'; +import { NotificationsStart } from '../../../../../src/core/public'; +import { APP_ANALYTICS_API_PREFIX } from '../../../common/constants/application_analytics'; +import { + ApplicationRequestType, + ApplicationType, +} from '../../../common/types/application_analytics'; +import { + calculateAvailability, + fetchPanelsVizIdList, + isNameValid, + removeTabData, +} from './helpers/utils'; +import { + CUSTOM_PANELS_API_PREFIX, + CUSTOM_PANELS_DOCUMENTATION_URL, +} from '../../../common/constants/custom_panels'; +import { QueryManager } from '../../../common/query_manager/ppl_query_manager'; + +export type AppAnalyticsCoreDeps = TraceAnalyticsCoreDeps; + +interface HomeProps extends RouteComponentProps, AppAnalyticsCoreDeps { + pplService: PPLService; + dslService: DSLService; + savedObjects: SavedObjects; + timestampUtils: TimestampUtils; + notifications: NotificationsStart; + queryManager: QueryManager; +} + +export interface AppAnalyticsComponentDeps extends TraceAnalyticsComponentDeps { + name: string; + description: string; + setNameWithStorage: (newName: string) => void; + setDescriptionWithStorage: (newDescription: string) => void; + setQueryWithStorage: (newQuery: string) => void; + setFiltersWithStorage: (newFilters: FilterType[]) => void; + setAppConfigs: (newAppConfigs: FilterType[]) => void; +} + +export const Home = (props: HomeProps) => { + const { + pplService, + dslService, + timestampUtils, + savedObjects, + parentBreadcrumbs, + http, + chrome, + notifications, + queryManager, + } = props; + const [triggerSwitchToEvent, setTriggerSwitchToEvent] = useState(0); + const dispatch = useDispatch(); + const [applicationList, setApplicationList] = useState([]); + const [toasts, setToasts] = useState([]); + const [indicesExist, setIndicesExist] = useState(true); + const [appConfigs, setAppConfigs] = useState([]); + const storedFilters = sessionStorage.getItem('AppAnalyticsFilters'); + const [filters, setFilters] = useState( + storedFilters ? JSON.parse(storedFilters) : [] + ); + const [name, setName] = useState(sessionStorage.getItem('AppAnalyticsName') || ''); + const [description, setDescription] = useState( + sessionStorage.getItem('AppAnalyticsDescription') || '' + ); + const [query, setQuery] = useState(sessionStorage.getItem('AppAnalyticsQuery') || ''); + const [startTime, setStartTime] = useState( + sessionStorage.getItem('AppAnalyticsStartTime') || 'now-24h' + ); + const [endTime, setEndTime] = useState( + sessionStorage.getItem('AppAnalyticsEndTime') || 'now' + ); + + // Setting state with storage to save input when user refreshes page + const setFiltersWithStorage = (newFilters: FilterType[]) => { + setFilters(newFilters); + sessionStorage.setItem('AppAnalyticsFilters', JSON.stringify(newFilters)); + }; + const setNameWithStorage = (newName: string) => { + setName(newName); + sessionStorage.setItem('AppAnalyticsName', newName); + }; + const setDescriptionWithStorage = (newDescription: string) => { + setDescription(newDescription); + sessionStorage.setItem('AppAnalyticsDescription', newDescription); + }; + const setQueryWithStorage = (newQuery: string) => { + setQuery(newQuery); + sessionStorage.setItem('AppAnalyticsQuery', newQuery); + }; + + useEffect(() => { + handleDataPrepperIndicesExistRequest(http, setIndicesExist); + }, []); + + const commonProps: AppAnalyticsComponentDeps = { + parentBreadcrumbs, + http, + chrome, + name, + setNameWithStorage, + description, + setDescriptionWithStorage, + query, + setQuery, + setQueryWithStorage, + appConfigs, + setAppConfigs, + filters, + setFilters, + setFiltersWithStorage, + startTime, + setStartTime, + endTime, + setEndTime, + mode: 'data_prepper', + dataPrepperIndicesExist: indicesExist, + }; + + const setToast = (title: string, color = 'success', text?: ReactChild) => { + if (!text) text = ''; + setToasts([...toasts, { id: new Date().toISOString(), title, text, color } as Toast]); + }; + + const clearStorage = () => { + setNameWithStorage(''); + setDescriptionWithStorage(''); + setFiltersWithStorage([]); + setQueryWithStorage(''); + }; + + const moveToApp = (id: string, type: string) => { + window.location.assign(`${last(parentBreadcrumbs)!.href}application_analytics/${id}`); + if (type === 'createSetAvailability') { + setTriggerSwitchToEvent(2); + } + }; + + const createPanelForApp = (applicationId: string, appName: string, type: string) => { + return http + .post(`${CUSTOM_PANELS_API_PREFIX}/panels`, { + body: JSON.stringify({ + panelName: `${appName}'s Panel`, + applicationId, + }), + }) + .then((res) => { + updateApp(applicationId, { panelId: res.newPanelId }, type); + }) + .catch((err) => { + setToast( + 'Please ask your administrator to enable Operational Panels for you.', + 'danger', + + Documentation + + ); + console.error(err); + }); + }; + + const deletePanelForApp = (appPanelId: string) => { + const concatList = [appPanelId].toString(); + return http.delete(`${CUSTOM_PANELS_API_PREFIX}/panelList/` + concatList).catch((err) => { + setToast( + 'Error occurred while deleting Operational Panels, please make sure you have the correct permission.', + 'danger' + ); + console.error(err.body.message); + }); + }; + + const deleteSavedVisualizationsForPanel = async (appPanelId: string) => { + const savedVizIdsToDelete = await fetchPanelsVizIdList(http, appPanelId); + if (!isEmpty(savedVizIdsToDelete)) { + savedObjects + .deleteSavedObjectsList({ objectIdList: savedVizIdsToDelete }) + .then((res) => { + deletePanelForApp(appPanelId); + }) + .catch((err) => { + setToast('Error occurred while deleting Saved Visualizations', 'danger'); + console.error(err); + }); + } + }; + + // Fetches all existing applications + const fetchApps = () => { + return http + .get(`${APP_ANALYTICS_API_PREFIX}/`) + .then(async (res) => { + // Want to calculate availability going down the table + const availabilityVisIdStore: Record = {}; + for (let i = 0; i < res.data.length; i++) { + availabilityVisIdStore[res.data[i].id] = res.data[i].availability.availabilityVisId; + res.data[i].availability = { name: '', color: 'loading', availabilityVisId: '' }; + } + setApplicationList(res.data); + for (let i = res.data.length - 1; i > -1; i--) { + res.data[i].availability = await calculateAvailability( + http, + pplService, + res.data[i], + availabilityVisIdStore[res.data[i].id], + () => {} + ); + // Need to set state with new object to trigger re-render + setApplicationList([ + ...res.data.filter((app: ApplicationType) => app.id !== res.data[i].id), + res.data[i], + ]); + } + }) + .catch((err) => { + setToast('Error occurred while fetching applications', 'danger'); + console.error(err); + }); + }; + + // Create a new application + const createApp = (application: ApplicationRequestType, type: string) => { + const toast = isNameValid( + application.name, + applicationList.map((obj) => obj.name) + ); + if (toast.length > 0) { + setToast(toast.join(', '), 'danger'); + return; + } + + const requestBody = { + name: application.name, + description: application.description || '', + baseQuery: application.baseQuery, + servicesEntities: application.servicesEntities, + traceGroups: application.traceGroups, + availabilityVisId: '', + }; + + return http + .post(`${APP_ANALYTICS_API_PREFIX}/`, { + body: JSON.stringify(requestBody), + }) + .then(async (res) => { + createPanelForApp(res.newAppId, application.name, type); + setToast(`Application "${application.name}" successfully created!`); + clearStorage(); + }) + .catch((err) => { + setToast(`Error occurred while creating new application "${application.name}"`, 'danger'); + console.error(err); + }); + }; + + // Rename an existing application + const renameApp = (newAppName: string, appId: string) => { + const toast = isNameValid( + newAppName, + applicationList.map((obj) => obj.name) + ); + if (toast.length > 0) { + setToast(toast.join(', '), 'danger'); + return; + } + + const requestBody = { + appId, + name: newAppName, + }; + + return http + .put(`${APP_ANALYTICS_API_PREFIX}/rename`, { + body: JSON.stringify(requestBody), + }) + .then((res) => { + setApplicationList((prevApplicationList) => { + const newApplicationData = [...prevApplicationList]; + const renamedApplication = newApplicationData.find( + (application) => application.id === appId + ); + if (renamedApplication) renamedApplication.name = newAppName; + return newApplicationData; + }); + setToast(`Application successfully renamed to "${newAppName}"`); + }) + .catch((err) => { + setToast('Error occurred while renaming application', 'danger'); + console.error(err); + }); + }; + + // Update existing application + const updateApp = ( + appId: string, + updateAppData: Partial, + type: string + ) => { + const requestBody = { + appId, + updateBody: updateAppData, + }; + + return http + .put(`${APP_ANALYTICS_API_PREFIX}/`, { + body: JSON.stringify(requestBody), + }) + .then((res) => { + if (type === 'update') { + setToast('Application successfully updated.'); + clearStorage(); + moveToApp(res.updatedAppId, type); + } + if (type.startsWith('create')) { + moveToApp(res.updatedAppId, type); + } + }) + .catch((err) => { + setToast('Error occurred while updating application', 'danger'); + console.error(err); + }); + }; + + // Delete existing applications + const deleteApp = (appList: string[], panelList: string[], toastMessage?: string) => { + return http + .delete(`${APP_ANALYTICS_API_PREFIX}/${appList.join(',')}`) + .then((res) => { + setApplicationList((prevApplicationList) => { + return prevApplicationList.filter((app) => !appList.includes(app.id)); + }); + + for (let i = 0; i < appList.length; i++) { + removeTabData(dispatch, appList[i], ''); + } + + for (let i = 0; i < panelList.length; i++) { + deleteSavedVisualizationsForPanel(panelList[i]); + } + + const message = + toastMessage || `Application${appList.length > 1 ? 's' : ''} successfully deleted!`; + setToast(message); + return res; + }) + .catch((err: any) => { + setToast('Error occured while deleting application', 'danger'); + console.error(err); + }); + }; + + const callback = (childFunc: () => void) => { + if (childFunc && triggerSwitchToEvent > 0) { + childFunc(); + setTriggerSwitchToEvent(triggerSwitchToEvent - 1); + } + }; + + return ( +
+ { + setToasts(toasts.filter((toast) => toast.id !== removedToast.id)); + }} + toastLifeTimeMs={6000} + /> + + ( + + + + )} + /> + ( + + )} + /> + +
+ ); +}; diff --git a/server/common/metrics/constants.ts b/server/common/metrics/constants.ts index d67a385709..4e7eaf6460 100644 --- a/server/common/metrics/constants.ts +++ b/server/common/metrics/constants.ts @@ -17,6 +17,7 @@ export const COMPONENTS = [ 'notebooks', 'trace_analytics', 'metrics_analytics', + 'placeholder', ] as const; export const REQUESTS = ['create', 'get', 'update', 'delete'] as const; From e44158939fcf7c71e4a925b94344e6d01a0f0c26 Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Thu, 9 Mar 2023 10:56:22 -0500 Subject: [PATCH 002/190] make organized Signed-off-by: Derek Ho --- .../placeholder/components/app_table.tsx | 292 ------------------ .../components/integration_header.tsx | 57 ++++ .../components/integration_overview_page.tsx | 46 +++ .../components/integration_table.tsx | 200 ++++++++++++ public/components/placeholder/home.tsx | 12 +- 5 files changed, 306 insertions(+), 301 deletions(-) delete mode 100644 public/components/placeholder/components/app_table.tsx create mode 100644 public/components/placeholder/components/integration_header.tsx create mode 100644 public/components/placeholder/components/integration_overview_page.tsx create mode 100644 public/components/placeholder/components/integration_table.tsx diff --git a/public/components/placeholder/components/app_table.tsx b/public/components/placeholder/components/app_table.tsx deleted file mode 100644 index 59eb7ce523..0000000000 --- a/public/components/placeholder/components/app_table.tsx +++ /dev/null @@ -1,292 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ -/* eslint-disable react-hooks/exhaustive-deps */ - -import { - EuiBadge, - EuiButton, - EuiContextMenuItem, - EuiContextMenuPanel, - EuiFlexGroup, - EuiFlexItem, - EuiHorizontalRule, - EuiInMemoryTable, - EuiLink, - EuiLoadingSpinner, - EuiOverlayMask, - EuiPage, - EuiPageBody, - EuiPageContent, - EuiPageContentHeader, - EuiPageContentHeaderSection, - EuiPageHeader, - EuiPageHeaderSection, - EuiPopover, - EuiSpacer, - EuiTableFieldDataColumnType, - EuiText, - EuiTitle, - EuiToolTip, -} from '@elastic/eui'; -import _ from 'lodash'; -import React, { ReactElement, useEffect, useState } from 'react'; -import moment from 'moment'; -import { useNavigate } from 'react-router-dom'; -import { DeleteModal } from '../../common/helpers/delete_modal'; -import { AppAnalyticsComponentDeps } from '../home'; -import { getCustomModal } from '../../custom_panels/helpers/modal_containers'; -import { pageStyles, UI_DATE_FORMAT } from '../../../../common/constants/shared'; -import { ApplicationType, AvailabilityType } from '../../../../common/types/application_analytics'; -import { Synopsis } from './integration_card'; -import { navigateToDefaultApp } from '../../../../../../src/plugins/url_forwarding/public/navigate_to_default_app'; - -interface AppTableProps extends AppAnalyticsComponentDeps { - loading: boolean; - applications: ApplicationType[]; - fetchApplications: () => void; - renameApplication: (newAppName: string, appId: string) => void; - deleteApplication: (appList: string[], panelIdList: string[], toastMessage?: string) => void; - clearStorage: () => void; - moveToApp: (id: string, type: string) => void; -} - -export function AppTable(props: AppTableProps) { - const { - chrome, - applications, - parentBreadcrumbs, - fetchApplications, - renameApplication, - deleteApplication, - setFilters, - clearStorage, - moveToApp, - } = props; - const [isModalVisible, setIsModalVisible] = useState(false); - const [isActionsPopoverOpen, setIsActionsPopoverOpen] = useState(false); - const [modalLayout, setModalLayout] = useState(); - const [selectedApplications, setSelectedApplications] = useState([]); - const createButtonText = 'Create application'; - - useEffect(() => { - chrome.setBreadcrumbs([ - ...parentBreadcrumbs, - { - text: 'Placeholder', - href: '#/placeholder', - }, - ]); - clear(); - fetchApplications(); - }, []); - - const clear = () => { - setFilters([]); - clearStorage(); - }; - - const closeModal = () => { - setIsModalVisible(false); - }; - - const showModal = () => { - setIsModalVisible(true); - }; - - const onRename = async (newApplicationName: string) => { - renameApplication(newApplicationName, selectedApplications[0].id); - closeModal(); - }; - - const onDelete = async () => { - closeModal(); - const toastMessage = `Application${ - selectedApplications.length > 1 ? 's' : ' "' + selectedApplications[0].name + '"' - } successfully deleted!`; - await deleteApplication( - selectedApplications.map((app) => app.id), - selectedApplications.map((app) => app.panelId), - toastMessage - ); - }; - - const renameApp = () => { - setModalLayout( - getCustomModal( - onRename, - closeModal, - 'Name', - 'Rename application', - 'Cancel', - 'Rename', - selectedApplications[0].name - ) - ); - showModal(); - }; - - const deleteApp = () => { - const applicationString = `application${selectedApplications.length > 1 ? 's' : ''}`; - setModalLayout( - - ); - showModal(); - }; - - const popoverButton = ( - setIsActionsPopoverOpen(!isActionsPopoverOpen)} - > - Actions - - ); - - const popoverItems: ReactElement[] = [ - { - setIsActionsPopoverOpen(false); - renameApp(); - }} - > - Rename - , - // - // Duplicate - // , - { - setIsActionsPopoverOpen(false); - deleteApp(); - }} - > - Delete - , - // Add sample application, - ]; - - const renderAvailability = (value: AvailabilityType, record: ApplicationType) => { - if (value.color === 'loading') { - return ; - } else if (value.name) { - return ( - - {value.name} - - ); - } else if (value.color === 'undefined') { - return No match; - } else if (value.color === 'null') { - return -; - } else { - return ( - moveToApp(record.id, 'createSetAvailability')} - > - Set Availability - - ); - } - }; - - const tableColumns = [ - { - field: 'name', - name: 'Name', - sortable: true, - truncateText: true, - render: (value, record) => ( - - {_.truncate(record.name, { length: 100 })} - - ), - }, - { - field: 'composition', - name: 'Composition', - sortable: false, - truncateText: true, - render: (value, record) => ( - - - {record.servicesEntities.concat(record.traceGroups).join(', ')} - - - ), - }, - { - field: 'availability', - name: 'Current Availability', - sortable: true, - render: renderAvailability, - }, - { - field: 'dateModified', - name: 'Date Modified', - sortable: true, - render: (value) => {moment(value).format(UI_DATE_FORMAT)}, - }, - ] as Array>; - - const features = ['nginx', 'fluentbit']; - - return ( -
- - - -

Integrations (2)

-
-
-
- - - - - {features.map((feature) => ( - - { - window.location.assign(`#/placeholder/${feature}`); - }} - /> - - ))} - -
- ); -} diff --git a/public/components/placeholder/components/integration_header.tsx b/public/components/placeholder/components/integration_header.tsx new file mode 100644 index 0000000000..76910335de --- /dev/null +++ b/public/components/placeholder/components/integration_header.tsx @@ -0,0 +1,57 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { + EuiBadge, + EuiButton, + EuiContextMenuItem, + EuiContextMenuPanel, + EuiFlexGroup, + EuiFlexItem, + EuiHorizontalRule, + EuiInMemoryTable, + EuiLink, + EuiLoadingSpinner, + EuiOverlayMask, + EuiPage, + EuiPageBody, + EuiPageContent, + EuiPageContentHeader, + EuiPageContentHeaderSection, + EuiPageHeader, + EuiPageHeaderSection, + EuiPopover, + EuiSpacer, + EuiTableFieldDataColumnType, + EuiText, + EuiTitle, + EuiToolTip, +} from '@elastic/eui'; +import _ from 'lodash'; +import React, { ReactElement, useEffect, useState } from 'react'; +import { CUSTOM_PANELS_DOCUMENTATION_URL } from '../../../../common/constants/custom_panels'; + +export function IntegrationHeader() { + return ( +
+ + + +

Integrations

+
+
+
+ + + View or add available integrations to use pre-canned assets immediately in your OpenSearch + setup.{' '} + + Learn more + + + +
+ ); +} diff --git a/public/components/placeholder/components/integration_overview_page.tsx b/public/components/placeholder/components/integration_overview_page.tsx new file mode 100644 index 0000000000..759726df7c --- /dev/null +++ b/public/components/placeholder/components/integration_overview_page.tsx @@ -0,0 +1,46 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ +/* eslint-disable react-hooks/exhaustive-deps */ + +import { EuiPage, EuiPageBody } from '@elastic/eui'; +import _ from 'lodash'; +import React, { ReactElement, useEffect, useState } from 'react'; +import { AppAnalyticsComponentDeps } from '../home'; +import { ApplicationType } from '../../../../common/types/application_analytics'; +import { IntegrationHeader } from './integration_header'; +import { AvailableIntegrationsTable } from './integration_table'; + +interface AppTableProps extends AppAnalyticsComponentDeps { + loading: boolean; + applications: ApplicationType[]; + fetchApplications: () => void; + renameApplication: (newAppName: string, appId: string) => void; + deleteApplication: (appList: string[], panelIdList: string[], toastMessage?: string) => void; + clearStorage: () => void; + moveToApp: (id: string, type: string) => void; +} + +export function IntegrationOverviewPage(props: AppTableProps) { + const { chrome, parentBreadcrumbs } = props; + + useEffect(() => { + chrome.setBreadcrumbs([ + ...parentBreadcrumbs, + { + text: 'Placeholder', + href: '#/placeholder', + }, + ]); + }, []); + + return ( + + + {IntegrationHeader()} + {AvailableIntegrationsTable({ loading: false, chrome, parentBreadcrumbs })} + + + ); +} diff --git a/public/components/placeholder/components/integration_table.tsx b/public/components/placeholder/components/integration_table.tsx new file mode 100644 index 0000000000..5e5ff613f4 --- /dev/null +++ b/public/components/placeholder/components/integration_table.tsx @@ -0,0 +1,200 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ +/* eslint-disable react-hooks/exhaustive-deps */ + +import { + EuiInMemoryTable, + EuiLink, + EuiPageContent, + EuiPageContentHeaderSection, + EuiSpacer, + EuiTableFieldDataColumnType, + EuiText, + EuiTitle, +} from '@elastic/eui'; +import _ from 'lodash'; +import React, { ReactElement, useEffect, useState } from 'react'; + +interface AvailableIntegrationsTableProps { + loading: boolean; + chrome: any; + parentBreadcrumbs: any; +} + +export function AvailableIntegrationsTable(props: AvailableIntegrationsTableProps) { + const { chrome, parentBreadcrumbs } = props; + + useEffect(() => { + chrome.setBreadcrumbs([ + ...parentBreadcrumbs, + { + text: 'Placeholder', + href: '#/placeholder', + }, + ]); + }, []); + + const integrations = [ + { + name: 'nginx', + description: + 'Open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server', + status: 'Available', + }, + ]; + + const tableColumns = [ + { + field: 'name', + name: 'Name', + sortable: true, + truncateText: true, + render: (value, record) => ( + + {_.truncate(record.name, { length: 100 })} + + ), + }, + { + field: 'description', + name: 'Description', + sortable: true, + truncateText: true, + render: (value, record) => ( + + {_.truncate(record.description, { length: 100 })} + + ), + }, + { + field: 'status', + name: 'Status', + sortable: true, + truncateText: true, + render: (value, record) => ( + + {_.truncate(record.status, { length: 100 })} + + ), + }, + { + field: 'actions', + name: 'Actions', + sortable: true, + truncateText: true, + render: (value, record) => ( + {}} + > + Add + + ), + }, + ] as Array>; + + const FILTER_OPTIONS = ['Visualization', 'Query', 'Metric']; + + const search = { + box: { + incremental: true, + }, + filters: [ + { + type: 'field_value_selection', + field: 'type', + name: 'Type', + multiSelect: false, + options: FILTER_OPTIONS.map((i) => ({ + value: i, + name: i, + view: i, + })), + }, + ], + }; + + // return ( + //
+ // + // + // + //

Integrations (2)

+ //
+ //
+ //
+ + // + + // + // {features.map((feature) => ( + // + // { + // window.location.assign(`#/placeholder/${feature}`); + // }} + // /> + // + // ))} + // + //
+ // ); + return ( + + + +

Availble Integrations

+
+
+ + {integrations.length > 0 ? ( + setSelectedApplications(items), + // }} + /> + ) : ( + <> + + +

No Integrations Available

+
+ + + )} +
+ ); +} diff --git a/public/components/placeholder/home.tsx b/public/components/placeholder/home.tsx index ffee0913f9..07b310eb19 100644 --- a/public/components/placeholder/home.tsx +++ b/public/components/placeholder/home.tsx @@ -15,9 +15,8 @@ import { EuiGlobalToastList, EuiLink } from '@elastic/eui'; import { Toast } from '@elastic/eui/src/components/toast/global_toast_list'; import { isEmpty, last } from 'lodash'; import { useDispatch } from 'react-redux'; -import { AppTable } from './components/app_table'; +import { AppTable } from './components/integration_table'; import { Application } from './components/integration'; -import { CreateApp } from './components/create'; import { TraceAnalyticsComponentDeps, TraceAnalyticsCoreDeps } from '../trace_analytics/home'; import { FilterType } from '../trace_analytics/components/common/filters/filters'; import { handleDataPrepperIndicesExistRequest } from '../trace_analytics/requests/request_handler'; @@ -28,17 +27,12 @@ import { ApplicationRequestType, ApplicationType, } from '../../../common/types/application_analytics'; -import { - calculateAvailability, - fetchPanelsVizIdList, - isNameValid, - removeTabData, -} from './helpers/utils'; import { CUSTOM_PANELS_API_PREFIX, CUSTOM_PANELS_DOCUMENTATION_URL, } from '../../../common/constants/custom_panels'; import { QueryManager } from '../../../common/query_manager/ppl_query_manager'; +import { IntegrationOverviewPage } from './components/integration_overview_page'; export type AppAnalyticsCoreDeps = TraceAnalyticsCoreDeps; @@ -395,7 +389,7 @@ export const Home = (props: HomeProps) => { path={'/placeholder'} render={() => ( - Date: Thu, 9 Mar 2023 13:29:36 -0500 Subject: [PATCH 003/190] clean up and add left nav Signed-off-by: Derek Ho --- ...sx => added_integration_overview_page.tsx} | 9 +- .../components/added_integration_table.tsx | 159 ++++++++++++++++++ .../available_integration_overview_page.tsx | 47 ++++++ ...le.tsx => available_integration_table.tsx} | 14 -- .../components/integration_header.tsx | 20 +-- .../components/integration_side_nav.tsx | 83 +++++++++ public/components/placeholder/home.tsx | 33 +++- 7 files changed, 322 insertions(+), 43 deletions(-) rename public/components/placeholder/components/{integration_overview_page.tsx => added_integration_overview_page.tsx} (77%) create mode 100644 public/components/placeholder/components/added_integration_table.tsx create mode 100644 public/components/placeholder/components/available_integration_overview_page.tsx rename public/components/placeholder/components/{integration_table.tsx => available_integration_table.tsx} (93%) create mode 100644 public/components/placeholder/components/integration_side_nav.tsx diff --git a/public/components/placeholder/components/integration_overview_page.tsx b/public/components/placeholder/components/added_integration_overview_page.tsx similarity index 77% rename from public/components/placeholder/components/integration_overview_page.tsx rename to public/components/placeholder/components/added_integration_overview_page.tsx index 759726df7c..b56bd4f7e6 100644 --- a/public/components/placeholder/components/integration_overview_page.tsx +++ b/public/components/placeholder/components/added_integration_overview_page.tsx @@ -4,13 +4,14 @@ */ /* eslint-disable react-hooks/exhaustive-deps */ -import { EuiPage, EuiPageBody } from '@elastic/eui'; +import { EuiPage, EuiPageBody, EuiSpacer } from '@elastic/eui'; import _ from 'lodash'; import React, { ReactElement, useEffect, useState } from 'react'; import { AppAnalyticsComponentDeps } from '../home'; import { ApplicationType } from '../../../../common/types/application_analytics'; import { IntegrationHeader } from './integration_header'; -import { AvailableIntegrationsTable } from './integration_table'; +import { AvailableIntegrationsTable } from './available_integration_table'; +import { AddedIntegrationsTable } from './added_integration_table'; interface AppTableProps extends AppAnalyticsComponentDeps { loading: boolean; @@ -22,7 +23,7 @@ interface AppTableProps extends AppAnalyticsComponentDeps { moveToApp: (id: string, type: string) => void; } -export function IntegrationOverviewPage(props: AppTableProps) { +export function AddedIntegrationOverviewPage(props: AppTableProps) { const { chrome, parentBreadcrumbs } = props; useEffect(() => { @@ -39,7 +40,7 @@ export function IntegrationOverviewPage(props: AppTableProps) { {IntegrationHeader()} - {AvailableIntegrationsTable({ loading: false, chrome, parentBreadcrumbs })} + {AddedIntegrationsTable({loading: false})} ); diff --git a/public/components/placeholder/components/added_integration_table.tsx b/public/components/placeholder/components/added_integration_table.tsx new file mode 100644 index 0000000000..056e6335d8 --- /dev/null +++ b/public/components/placeholder/components/added_integration_table.tsx @@ -0,0 +1,159 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { + EuiInMemoryTable, + EuiLink, + EuiPageContent, + EuiPageContentHeaderSection, + EuiSpacer, + EuiTableFieldDataColumnType, + EuiText, + EuiTitle, + } from '@elastic/eui'; + import _ from 'lodash'; + import React, { ReactElement, useEffect, useState } from 'react'; + + + + interface AddedIntegrationsTableProps { + loading: boolean; + } + + export function AddedIntegrationsTable(props: AddedIntegrationsTableProps) { + + + + + const integrations = [ + // { + // name: 'nginx', + // description: + // 'Open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server', + // status: 'Available', + // }, + // ]; + ]; + + const tableColumns = [ + { + field: 'name', + name: 'Name', + sortable: true, + truncateText: true, + render: (value, record) => ( + + {_.truncate(record.name, { length: 100 })} + + ), + }, + { + field: 'description', + name: 'Description', + sortable: true, + truncateText: true, + render: (value, record) => ( + + {_.truncate(record.description, { length: 100 })} + + ), + }, + { + field: 'status', + name: 'Status', + sortable: true, + truncateText: true, + render: (value, record) => ( + + {_.truncate(record.status, { length: 100 })} + + ), + }, + { + field: 'actions', + name: 'Actions', + sortable: true, + truncateText: true, + render: (value, record) => ( + {}} + > + Add + + ), + }, + ] as Array>; + + const FILTER_OPTIONS = ['Visualization', 'Query', 'Metric']; + + const search = { + box: { + incremental: true, + }, + filters: [ + { + type: 'field_value_selection', + field: 'type', + name: 'Type', + multiSelect: false, + options: FILTER_OPTIONS.map((i) => ({ + value: i, + name: i, + view: i, + })), + }, + ], + }; + + return ( + + + +

Added Integrations

+
+
+ + {integrations.length > 0 ? ( + setSelectedApplications(items), + // }} + /> + ) : ( + <> + + +

There are currently no added integrations. Add them above to start using pre-canned assets!

+
+ + + )} +
+ ); + } + \ No newline at end of file diff --git a/public/components/placeholder/components/available_integration_overview_page.tsx b/public/components/placeholder/components/available_integration_overview_page.tsx new file mode 100644 index 0000000000..49f775af71 --- /dev/null +++ b/public/components/placeholder/components/available_integration_overview_page.tsx @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ +/* eslint-disable react-hooks/exhaustive-deps */ + +import { EuiPage, EuiPageBody, EuiSpacer } from '@elastic/eui'; +import _ from 'lodash'; +import React, { ReactElement, useEffect, useState } from 'react'; +import { AppAnalyticsComponentDeps } from '../home'; +import { ApplicationType } from '../../../../common/types/application_analytics'; +import { IntegrationHeader } from './integration_header'; +import { AvailableIntegrationsTable } from './available_integration_table'; +import { AddedIntegrationsTable } from './added_integration_table'; + +interface AppTableProps extends AppAnalyticsComponentDeps { + loading: boolean; + applications: ApplicationType[]; + fetchApplications: () => void; + renameApplication: (newAppName: string, appId: string) => void; + deleteApplication: (appList: string[], panelIdList: string[], toastMessage?: string) => void; + clearStorage: () => void; + moveToApp: (id: string, type: string) => void; +} + +export function AvailableIntegrationOverviewPage(props: AppTableProps) { + const { chrome, parentBreadcrumbs } = props; + + useEffect(() => { + chrome.setBreadcrumbs([ + ...parentBreadcrumbs, + { + text: 'Placeholder', + href: '#/placeholder', + }, + ]); + }, []); + + return ( + + + {IntegrationHeader()} + {AvailableIntegrationsTable({loading: false})} + + + ); +} diff --git a/public/components/placeholder/components/integration_table.tsx b/public/components/placeholder/components/available_integration_table.tsx similarity index 93% rename from public/components/placeholder/components/integration_table.tsx rename to public/components/placeholder/components/available_integration_table.tsx index 5e5ff613f4..fcd24a78c7 100644 --- a/public/components/placeholder/components/integration_table.tsx +++ b/public/components/placeholder/components/available_integration_table.tsx @@ -2,7 +2,6 @@ * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ -/* eslint-disable react-hooks/exhaustive-deps */ import { EuiInMemoryTable, @@ -19,22 +18,9 @@ import React, { ReactElement, useEffect, useState } from 'react'; interface AvailableIntegrationsTableProps { loading: boolean; - chrome: any; - parentBreadcrumbs: any; } export function AvailableIntegrationsTable(props: AvailableIntegrationsTableProps) { - const { chrome, parentBreadcrumbs } = props; - - useEffect(() => { - chrome.setBreadcrumbs([ - ...parentBreadcrumbs, - { - text: 'Placeholder', - href: '#/placeholder', - }, - ]); - }, []); const integrations = [ { diff --git a/public/components/placeholder/components/integration_header.tsx b/public/components/placeholder/components/integration_header.tsx index 76910335de..ce0b47f640 100644 --- a/public/components/placeholder/components/integration_header.tsx +++ b/public/components/placeholder/components/integration_header.tsx @@ -4,33 +4,15 @@ */ import { - EuiBadge, - EuiButton, - EuiContextMenuItem, - EuiContextMenuPanel, - EuiFlexGroup, - EuiFlexItem, - EuiHorizontalRule, - EuiInMemoryTable, EuiLink, - EuiLoadingSpinner, - EuiOverlayMask, - EuiPage, - EuiPageBody, - EuiPageContent, - EuiPageContentHeader, - EuiPageContentHeaderSection, EuiPageHeader, EuiPageHeaderSection, - EuiPopover, EuiSpacer, - EuiTableFieldDataColumnType, EuiText, EuiTitle, - EuiToolTip, } from '@elastic/eui'; import _ from 'lodash'; -import React, { ReactElement, useEffect, useState } from 'react'; +import React from 'react'; import { CUSTOM_PANELS_DOCUMENTATION_URL } from '../../../../common/constants/custom_panels'; export function IntegrationHeader() { diff --git a/public/components/placeholder/components/integration_side_nav.tsx b/public/components/placeholder/components/integration_side_nav.tsx new file mode 100644 index 0000000000..5a1b94d042 --- /dev/null +++ b/public/components/placeholder/components/integration_side_nav.tsx @@ -0,0 +1,83 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { + EuiButton, + EuiFlexGroup, + EuiFlexItem, + EuiPage, + EuiPageBody, + EuiPageSideBar, + EuiSideNav, + EuiSideNavItemType, + EuiSwitch, +} from '@elastic/eui'; +import React from 'react'; +// import { useState } from 'react'; +// import { toMountPoint } from '../../../../../src/plugins/opensearch_dashboards_react/public'; +// import { uiSettingsService } from '../../../common/utils'; + +export const Sidebar = (props: { children: React.ReactNode }) => { + const items = [ + { + name: 'Integrations', + id: 0, + items: [ + { + name: 'Available integrations', + id: 1, + href: '#/placeholder/available', + }, + { + name: 'Added integrations', + id: 2, + href: '#/placeholder/added', + }, + ], + }, + ]; + + function setIsSelected( + items: Array>, + hash: string, + initial = true, + reverse = false + ): boolean { + // Default page is Events Analytics + // But it is kept as second option in side nav + if (hash === '#/') { + items[0].items[0].isSelected = true; + return true; + } + for (let i = 0; i < items.length; i++) { + const item = items[i]; + if (item.href && ((reverse && item.href.startsWith(hash)) || hash.startsWith(item.href))) { + item.isSelected = true; + return true; + } + if (item.items?.length && setIsSelected(item.items, hash, false, reverse)) return true; + } + return initial && setIsSelected(items, hash, false, !reverse); + } + setIsSelected(items, location.hash); + + return ( + + + + + + + + + {props.children} + + ); +}; diff --git a/public/components/placeholder/home.tsx b/public/components/placeholder/home.tsx index 07b310eb19..a3b02921bf 100644 --- a/public/components/placeholder/home.tsx +++ b/public/components/placeholder/home.tsx @@ -15,7 +15,6 @@ import { EuiGlobalToastList, EuiLink } from '@elastic/eui'; import { Toast } from '@elastic/eui/src/components/toast/global_toast_list'; import { isEmpty, last } from 'lodash'; import { useDispatch } from 'react-redux'; -import { AppTable } from './components/integration_table'; import { Application } from './components/integration'; import { TraceAnalyticsComponentDeps, TraceAnalyticsCoreDeps } from '../trace_analytics/home'; import { FilterType } from '../trace_analytics/components/common/filters/filters'; @@ -32,7 +31,9 @@ import { CUSTOM_PANELS_DOCUMENTATION_URL, } from '../../../common/constants/custom_panels'; import { QueryManager } from '../../../common/query_manager/ppl_query_manager'; -import { IntegrationOverviewPage } from './components/integration_overview_page'; +import { AvailableIntegrationOverviewPage, IntegrationOverviewPage } from './components/available_integration_overview_page'; +import { Sidebar } from './components/integration_side_nav'; +import { AddedIntegrationOverviewPage } from './components/added_integration_overview_page'; export type AppAnalyticsCoreDeps = TraceAnalyticsCoreDeps; @@ -386,10 +387,10 @@ export const Home = (props: HomeProps) => { ( - - + { moveToApp={moveToApp} {...commonProps} /> - + + + )} + /> + ( + + + + )} /> Date: Thu, 9 Mar 2023 17:46:29 -0500 Subject: [PATCH 004/190] add barebones for integration specific page Signed-off-by: Derek Ho --- .../components/added_integration_table.tsx | 279 +++++++++--------- .../placeholder/components/integration.tsx | 21 +- .../components/integration_assets_panel.tsx | 146 +++++++++ .../components/integration_details_panel.tsx | 11 + .../components/integration_fields_panel.tsx | 11 + .../components/integration_overview_panel.tsx | 68 +++++ public/components/placeholder/home.tsx | 15 +- 7 files changed, 399 insertions(+), 152 deletions(-) create mode 100644 public/components/placeholder/components/integration_assets_panel.tsx create mode 100644 public/components/placeholder/components/integration_details_panel.tsx create mode 100644 public/components/placeholder/components/integration_fields_panel.tsx create mode 100644 public/components/placeholder/components/integration_overview_panel.tsx diff --git a/public/components/placeholder/components/added_integration_table.tsx b/public/components/placeholder/components/added_integration_table.tsx index 056e6335d8..17082c422c 100644 --- a/public/components/placeholder/components/added_integration_table.tsx +++ b/public/components/placeholder/components/added_integration_table.tsx @@ -4,30 +4,24 @@ */ import { - EuiInMemoryTable, - EuiLink, - EuiPageContent, - EuiPageContentHeaderSection, - EuiSpacer, - EuiTableFieldDataColumnType, - EuiText, - EuiTitle, - } from '@elastic/eui'; - import _ from 'lodash'; - import React, { ReactElement, useEffect, useState } from 'react'; + EuiInMemoryTable, + EuiLink, + EuiPageContent, + EuiPageContentHeaderSection, + EuiSpacer, + EuiTableFieldDataColumnType, + EuiText, + EuiTitle, +} from '@elastic/eui'; +import _ from 'lodash'; +import React, { ReactElement, useEffect, useState } from 'react'; +interface AddedIntegrationsTableProps { + loading: boolean; +} - - interface AddedIntegrationsTableProps { - loading: boolean; - } - - export function AddedIntegrationsTable(props: AddedIntegrationsTableProps) { - - - - - const integrations = [ +export function AddedIntegrationsTable(props: AddedIntegrationsTableProps) { + const integrations = [ // { // name: 'nginx', // description: @@ -35,125 +29,128 @@ import { // status: 'Available', // }, // ]; - ]; - - const tableColumns = [ + ]; + + const tableColumns = [ + { + field: 'name', + name: 'Name', + sortable: true, + truncateText: true, + render: (value, record) => ( + + {_.truncate(record.name, { length: 100 })} + + ), + }, + { + field: 'description', + name: 'Description', + sortable: true, + truncateText: true, + render: (value, record) => ( + + {_.truncate(record.description, { length: 100 })} + + ), + }, + { + field: 'status', + name: 'Status', + sortable: true, + truncateText: true, + render: (value, record) => ( + + {_.truncate(record.status, { length: 100 })} + + ), + }, + { + field: 'actions', + name: 'Actions', + sortable: true, + truncateText: true, + render: (value, record) => ( + {}} + > + Add + + ), + }, + ] as Array>; + + const FILTER_OPTIONS = ['Visualization', 'Query', 'Metric']; + + const search = { + box: { + incremental: true, + }, + filters: [ { - field: 'name', - name: 'Name', - sortable: true, - truncateText: true, - render: (value, record) => ( - - {_.truncate(record.name, { length: 100 })} - - ), + type: 'field_value_selection', + field: 'type', + name: 'Type', + multiSelect: false, + options: FILTER_OPTIONS.map((i) => ({ + value: i, + name: i, + view: i, + })), }, - { - field: 'description', - name: 'Description', - sortable: true, - truncateText: true, - render: (value, record) => ( - - {_.truncate(record.description, { length: 100 })} - - ), - }, - { - field: 'status', - name: 'Status', - sortable: true, - truncateText: true, - render: (value, record) => ( - - {_.truncate(record.status, { length: 100 })} + ], + }; + + return ( + + + +

Added Integrations

+
+
+ + {integrations.length > 0 ? ( + setSelectedApplications(items), + // }} + /> + ) : ( + <> + + +

+ There are currently no added integrations. Add them{' '} + here to start using pre-canned + assets! +

- ), - }, - { - field: 'actions', - name: 'Actions', - sortable: true, - truncateText: true, - render: (value, record) => ( - {}} - > - Add - - ), - }, - ] as Array>; - - const FILTER_OPTIONS = ['Visualization', 'Query', 'Metric']; - - const search = { - box: { - incremental: true, - }, - filters: [ - { - type: 'field_value_selection', - field: 'type', - name: 'Type', - multiSelect: false, - options: FILTER_OPTIONS.map((i) => ({ - value: i, - name: i, - view: i, - })), - }, - ], - }; - - return ( - - - -

Added Integrations

-
-
- - {integrations.length > 0 ? ( - setSelectedApplications(items), - // }} - /> - ) : ( - <> - - -

There are currently no added integrations. Add them above to start using pre-canned assets!

-
- - - )} -
- ); - } - \ No newline at end of file + + + )} +
+ ); +} diff --git a/public/components/placeholder/components/integration.tsx b/public/components/placeholder/components/integration.tsx index 282623cf15..ae82b9b6a0 100644 --- a/public/components/placeholder/components/integration.tsx +++ b/public/components/placeholder/components/integration.tsx @@ -8,6 +8,7 @@ import { EuiHorizontalRule, EuiPage, EuiPageBody, + EuiPageContent, EuiPageHeader, EuiPageHeaderSection, EuiPanel, @@ -63,6 +64,9 @@ import { SpanDetailFlyout } from '../../trace_analytics/components/traces/span_d import { TraceDetailFlyout } from './flyout_components/trace_detail_flyout'; import { fetchAppById, initializeTabData } from '../helpers/utils'; import { QueryManager } from '../../../../common/query_manager/ppl_query_manager'; +import { IntegrationOverview } from './integration_overview_panel'; +import { IntegrationDetails } from './integration_details_panel'; +import { IntegrationFields } from './integration_fields_panel'; const searchBarConfigs = { [TAB_EVENT_ID]: { @@ -89,7 +93,7 @@ interface AppDetailProps extends AppAnalyticsComponentDeps { callback: (childfunction: () => void) => void; } -export function Application(props: AppDetailProps) { +export function Integration(props: AppDetailProps) { const { pplService, dslService, @@ -139,8 +143,17 @@ export function Application(props: AppDetailProps) { }, [appId]); return ( - -

{appId}

-
+ + + {IntegrationOverview({ appId, link: 'https://www.nginx.com/' })} + + + {IntegrationDetails({ appId })} + + {IntegrationFields({ appId })} + + + + ); } diff --git a/public/components/placeholder/components/integration_assets_panel.tsx b/public/components/placeholder/components/integration_assets_panel.tsx new file mode 100644 index 0000000000..0ff818dd5c --- /dev/null +++ b/public/components/placeholder/components/integration_assets_panel.tsx @@ -0,0 +1,146 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ +/* eslint-disable react-hooks/exhaustive-deps */ + +import { + EuiHorizontalRule, + EuiPage, + EuiPageBody, + EuiPageHeader, + EuiPageHeaderSection, + EuiPanel, + EuiSelectOption, + EuiSpacer, + EuiTabbedContent, + EuiTabbedContentTab, + EuiText, + EuiTitle, +} from '@elastic/eui'; +import DSLService from 'public/services/requests/dsl'; +import PPLService from 'public/services/requests/ppl'; +import SavedObjects from 'public/services/saved_objects/event_analytics/saved_objects'; +import TimestampUtils from 'public/services/timestamp/timestamp'; +import React, { ReactChild, useEffect, useState } from 'react'; +import { useHistory } from 'react-router-dom'; +import { useDispatch } from 'react-redux'; +import { last } from 'lodash'; +import { VisualizationType } from 'common/types/custom_panels'; +import { TracesContent } from '../../trace_analytics/components/traces/traces_content'; +import { DashboardContent } from '../../trace_analytics/components/dashboard/dashboard_content'; +import { ServicesContent } from '../../trace_analytics/components/services/services_content'; +import { filtersToDsl, PanelTitle } from '../../trace_analytics/components/common/helper_functions'; +import { SpanDetailTable } from '../../trace_analytics/components/traces/span_detail_table'; +import { Explorer } from '../../event_analytics/explorer/explorer'; +// import { Configuration } from './configuration'; +import { + TAB_CONFIG_ID, + TAB_CONFIG_TITLE, + TAB_LOG_ID, + TAB_LOG_TITLE, + TAB_OVERVIEW_ID, + TAB_OVERVIEW_TITLE, + TAB_PANEL_ID, + TAB_PANEL_TITLE, + TAB_SERVICE_ID, + TAB_SERVICE_TITLE, + TAB_TRACE_ID, + TAB_TRACE_TITLE, +} from '../../../../common/constants/application_analytics'; +import { TAB_EVENT_ID, TAB_CHART_ID, NEW_TAB } from '../../../../common/constants/explorer'; +import { IQueryTab } from '../../../../common/types/explorer'; +import { NotificationsStart } from '../../../../../../src/core/public'; +import { AppAnalyticsComponentDeps } from '../home'; +import { CustomPanelView } from '../../custom_panels/custom_panel_view'; +import { + ApplicationRequestType, + ApplicationType, +} from '../../../../common/types/application_analytics'; +import { CUSTOM_PANELS_API_PREFIX } from '../../../../common/constants/custom_panels'; +import { ServiceDetailFlyout } from './flyout_components/service_detail_flyout'; +import { SpanDetailFlyout } from '../../trace_analytics/components/traces/span_detail_flyout'; +import { TraceDetailFlyout } from './flyout_components/trace_detail_flyout'; +import { fetchAppById, initializeTabData } from '../helpers/utils'; +import { QueryManager } from '../../../../common/query_manager/ppl_query_manager'; + +const searchBarConfigs = { + [TAB_EVENT_ID]: { + showSaveButton: false, + showSavePanelOptionsList: false, + }, + [TAB_CHART_ID]: { + showSaveButton: true, + showSavePanelOptionsList: false, + }, +}; + +interface AppDetailProps extends AppAnalyticsComponentDeps { + disabled?: boolean; + appId: string; + pplService: PPLService; + dslService: DSLService; + savedObjects: SavedObjects; + timestampUtils: TimestampUtils; + notifications: NotificationsStart; + queryManager: QueryManager; + updateApp: (appId: string, updateAppData: Partial, type: string) => void; + setToasts: (title: string, color?: string, text?: ReactChild) => void; + callback: (childfunction: () => void) => void; +} + +export function Integration(props: AppDetailProps) { + const { + pplService, + dslService, + timestampUtils, + savedObjects, + http, + notifications, + appId, + chrome, + parentBreadcrumbs, + query, + filters, + appConfigs, + updateApp, + setAppConfigs, + setToasts, + setFilters, + callback, + queryManager, + mode, + } = props; + const [application, setApplication] = useState({ + id: '', + dateCreated: '', + dateModified: '', + name: '', + description: '', + baseQuery: '', + servicesEntities: [], + traceGroups: [], + panelId: '', + availability: { name: '', color: '', availabilityVisId: '' }, + }); + + useEffect(() => { + chrome.setBreadcrumbs([ + ...parentBreadcrumbs, + { + text: 'Placeholder', + href: '#/placeholder', + }, + { + text: appId, + href: `${last(parentBreadcrumbs)!.href}placeholder/${appId}`, + }, + ]); + }, [appId]); + + return ( + + + + ); +} diff --git a/public/components/placeholder/components/integration_details_panel.tsx b/public/components/placeholder/components/integration_details_panel.tsx new file mode 100644 index 0000000000..791fad3762 --- /dev/null +++ b/public/components/placeholder/components/integration_details_panel.tsx @@ -0,0 +1,11 @@ +import { EuiPanel } from '@elastic/eui'; +import React from 'react'; +import { PanelTitle } from '../../../../public/components/trace_analytics/components/common/helper_functions'; + +export function IntegrationDetails(props: { appId }) { + return ( + + + + ); +} diff --git a/public/components/placeholder/components/integration_fields_panel.tsx b/public/components/placeholder/components/integration_fields_panel.tsx new file mode 100644 index 0000000000..1a45e99e44 --- /dev/null +++ b/public/components/placeholder/components/integration_fields_panel.tsx @@ -0,0 +1,11 @@ +import { EuiPanel } from '@elastic/eui'; +import React from 'react'; +import { PanelTitle } from '../../../../public/components/trace_analytics/components/common/helper_functions'; + +export function IntegrationFields(props: { appId }) { + return ( + + + + ); +} diff --git a/public/components/placeholder/components/integration_overview_panel.tsx b/public/components/placeholder/components/integration_overview_panel.tsx new file mode 100644 index 0000000000..68ffdc576e --- /dev/null +++ b/public/components/placeholder/components/integration_overview_panel.tsx @@ -0,0 +1,68 @@ +import { + EuiButton, + EuiFlexGroup, + EuiLink, + EuiPageHeader, + EuiPageHeaderSection, + EuiPanel, + EuiSpacer, + EuiTitle, + EuiFlexItem, + EuiText, +} from '@elastic/eui'; +import React from 'react'; + +export function IntegrationOverview(props: { appId; link }) { + return ( + + + + + + {props.appId} + + + Add + + + + + +

Status

+
+ + hello +
+ + +

Version

+
+ + hello +
+ + +

Category

+
+ + hello +
+ + +

Contributer

+
+ + hello +
+ + +

License

+
+ + hello +
+
+
+
+ ); +} diff --git a/public/components/placeholder/home.tsx b/public/components/placeholder/home.tsx index a3b02921bf..a26998c99a 100644 --- a/public/components/placeholder/home.tsx +++ b/public/components/placeholder/home.tsx @@ -15,7 +15,7 @@ import { EuiGlobalToastList, EuiLink } from '@elastic/eui'; import { Toast } from '@elastic/eui/src/components/toast/global_toast_list'; import { isEmpty, last } from 'lodash'; import { useDispatch } from 'react-redux'; -import { Application } from './components/integration'; +import { Application, Integration } from './components/integration'; import { TraceAnalyticsComponentDeps, TraceAnalyticsCoreDeps } from '../trace_analytics/home'; import { FilterType } from '../trace_analytics/components/common/filters/filters'; import { handleDataPrepperIndicesExistRequest } from '../trace_analytics/requests/request_handler'; @@ -31,7 +31,10 @@ import { CUSTOM_PANELS_DOCUMENTATION_URL, } from '../../../common/constants/custom_panels'; import { QueryManager } from '../../../common/query_manager/ppl_query_manager'; -import { AvailableIntegrationOverviewPage, IntegrationOverviewPage } from './components/available_integration_overview_page'; +import { + AvailableIntegrationOverviewPage, + IntegrationOverviewPage, +} from './components/available_integration_overview_page'; import { Sidebar } from './components/integration_side_nav'; import { AddedIntegrationOverviewPage } from './components/added_integration_overview_page'; @@ -400,8 +403,7 @@ export const Home = (props: HomeProps) => { moveToApp={moveToApp} {...commonProps} /> - - + )} /> { moveToApp={moveToApp} {...commonProps} /> - - + )} /> ( - Date: Fri, 10 Mar 2023 12:11:09 -0500 Subject: [PATCH 005/190] fix margins Signed-off-by: Derek Ho --- .../components/integration_overview_panel.tsx | 59 +++++++++++++++---- 1 file changed, 49 insertions(+), 10 deletions(-) diff --git a/public/components/placeholder/components/integration_overview_panel.tsx b/public/components/placeholder/components/integration_overview_panel.tsx index 68ffdc576e..1e8007395f 100644 --- a/public/components/placeholder/components/integration_overview_panel.tsx +++ b/public/components/placeholder/components/integration_overview_panel.tsx @@ -9,21 +9,60 @@ import { EuiTitle, EuiFlexItem, EuiText, + EuiPageContentHeaderSection, } from '@elastic/eui'; import React from 'react'; +const pageStyles: CSS.Properties = { + width: '80%', +}; + export function IntegrationOverview(props: { appId; link }) { return ( - - - - - - {props.appId} - - - Add - + + + {/* + + +

+ Applications ({applications.length}) +

+
+
+ + + + setIsActionsPopoverOpen(false)} + > + + + + + + {createButtonText} + + + + +
*/} + + + + + + {props.appId} + + + + + Add + + + From 117eb1c6f8572cb9ff64dc2059e50d68eee1c603 Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Fri, 17 Mar 2023 10:05:56 -0400 Subject: [PATCH 006/190] add toggle and begin work on card view Signed-off-by: Derek Ho --- .../placeholder/assets/nginx-svgrepo-com.svg | 2 + .../components/placeholder/assets/nginx.svg | 0 .../available_integration_card_view.tsx | 185 ++++++++++++++++++ .../available_integration_overview_page.tsx | 40 +++- .../placeholder/components/integration.tsx | 20 +- .../components/integration_assets_panel.tsx | 145 +------------- .../components/integration_details_panel.tsx | 16 +- .../components/integration_fields_panel.tsx | 2 +- .../components/integration_overview_panel.tsx | 52 ++--- 9 files changed, 276 insertions(+), 186 deletions(-) create mode 100644 public/components/placeholder/assets/nginx-svgrepo-com.svg create mode 100644 public/components/placeholder/assets/nginx.svg create mode 100644 public/components/placeholder/components/available_integration_card_view.tsx diff --git a/public/components/placeholder/assets/nginx-svgrepo-com.svg b/public/components/placeholder/assets/nginx-svgrepo-com.svg new file mode 100644 index 0000000000..27062a8304 --- /dev/null +++ b/public/components/placeholder/assets/nginx-svgrepo-com.svg @@ -0,0 +1,2 @@ + +file_type_nginx \ No newline at end of file diff --git a/public/components/placeholder/assets/nginx.svg b/public/components/placeholder/assets/nginx.svg new file mode 100644 index 0000000000..e69de29bb2 diff --git a/public/components/placeholder/components/available_integration_card_view.tsx b/public/components/placeholder/components/available_integration_card_view.tsx new file mode 100644 index 0000000000..74b0a64fd1 --- /dev/null +++ b/public/components/placeholder/components/available_integration_card_view.tsx @@ -0,0 +1,185 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { + EuiInMemoryTable, + EuiLink, + EuiPageContent, + EuiPageContentHeaderSection, + EuiSpacer, + EuiTableFieldDataColumnType, + EuiText, + EuiTitle, +} from '@elastic/eui'; +import _ from 'lodash'; +import React, { ReactElement, useEffect, useState } from 'react'; + +interface AvailableIntegrationsTableProps { + loading: boolean; +} + +export function AvailableIntegrationsCardView(props: AvailableIntegrationsTableProps) { + const integrations = [ + { + name: 'nginx', + description: + 'Open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server', + status: 'Available', + }, + ]; + + const tableColumns = [ + { + field: 'name', + name: 'Name', + sortable: true, + truncateText: true, + render: (value, record) => ( + + {_.truncate(record.name, { length: 100 })} + + ), + }, + { + field: 'description', + name: 'Description', + sortable: true, + truncateText: true, + render: (value, record) => ( + + {_.truncate(record.description, { length: 100 })} + + ), + }, + { + field: 'status', + name: 'Status', + sortable: true, + truncateText: true, + render: (value, record) => ( + + {_.truncate(record.status, { length: 100 })} + + ), + }, + { + field: 'actions', + name: 'Actions', + sortable: true, + truncateText: true, + render: (value, record) => ( + {}} + > + Add + + ), + }, + ] as Array>; + + const FILTER_OPTIONS = ['Visualization', 'Query', 'Metric']; + + const search = { + box: { + incremental: true, + }, + filters: [ + { + type: 'field_value_selection', + field: 'type', + name: 'Type', + multiSelect: false, + options: FILTER_OPTIONS.map((i) => ({ + value: i, + name: i, + view: i, + })), + }, + ], + }; + + // return ( + //
+ // + // + // + //

Integrations (2)

+ //
+ //
+ //
+ + // + + // + // {features.map((feature) => ( + // + // { + // window.location.assign(`#/placeholder/${feature}`); + // }} + // /> + // + // ))} + // + //
+ // ); + return ( + + + +

Availble Integrations

+
+
+ + {integrations.length > 0 ? ( + setSelectedApplications(items), + // }} + /> + ) : ( + <> + + +

No Integrations Available

+
+ + + )} +
+ ); +} diff --git a/public/components/placeholder/components/available_integration_overview_page.tsx b/public/components/placeholder/components/available_integration_overview_page.tsx index 49f775af71..5f1042fb2f 100644 --- a/public/components/placeholder/components/available_integration_overview_page.tsx +++ b/public/components/placeholder/components/available_integration_overview_page.tsx @@ -4,7 +4,7 @@ */ /* eslint-disable react-hooks/exhaustive-deps */ -import { EuiPage, EuiPageBody, EuiSpacer } from '@elastic/eui'; +import { EuiFlexItem, EuiPage, EuiPageBody, EuiSpacer, EuiSwitch } from '@elastic/eui'; import _ from 'lodash'; import React, { ReactElement, useEffect, useState } from 'react'; import { AppAnalyticsComponentDeps } from '../home'; @@ -12,6 +12,7 @@ import { ApplicationType } from '../../../../common/types/application_analytics' import { IntegrationHeader } from './integration_header'; import { AvailableIntegrationsTable } from './available_integration_table'; import { AddedIntegrationsTable } from './added_integration_table'; +import { AvailableIntegrationsCardView } from './available_integration_card_view'; interface AppTableProps extends AppAnalyticsComponentDeps { loading: boolean; @@ -26,6 +27,8 @@ interface AppTableProps extends AppAnalyticsComponentDeps { export function AvailableIntegrationOverviewPage(props: AppTableProps) { const { chrome, parentBreadcrumbs } = props; + const [isCardView, setCardView] = useState(true); + useEffect(() => { chrome.setBreadcrumbs([ ...parentBreadcrumbs, @@ -40,7 +43,40 @@ export function AvailableIntegrationOverviewPage(props: AppTableProps) { {IntegrationHeader()} - {AvailableIntegrationsTable({loading: false})} + + { + setCardView(!isCardView); + }} + // label="Dark mode" + // checked={isDarkMode} + // onChange={() => { + // uiSettingsService.set('theme:darkMode', !isDarkMode).then((resp) => { + // setIsDarkMode(!isDarkMode); + // uiSettingsService.addToast({ + // title: 'Theme setting changes require you to reload the page to take effect.', + // text: toMountPoint( + // <> + // + // + // window.location.reload()}> + // Reload page + // + // + // + // + // ), + // color: 'success', + // }); + // }); + // }} + /> + + {isCardView + ? AvailableIntegrationsCardView({ loading: false }) + : AvailableIntegrationsTable({ loading: false })} ); diff --git a/public/components/placeholder/components/integration.tsx b/public/components/placeholder/components/integration.tsx index ae82b9b6a0..b28e92ce88 100644 --- a/public/components/placeholder/components/integration.tsx +++ b/public/components/placeholder/components/integration.tsx @@ -53,20 +53,15 @@ import { TAB_EVENT_ID, TAB_CHART_ID, NEW_TAB } from '../../../../common/constant import { IQueryTab } from '../../../../common/types/explorer'; import { NotificationsStart } from '../../../../../../src/core/public'; import { AppAnalyticsComponentDeps } from '../home'; -import { CustomPanelView } from '../../custom_panels/custom_panel_view'; import { ApplicationRequestType, ApplicationType, } from '../../../../common/types/application_analytics'; -import { CUSTOM_PANELS_API_PREFIX } from '../../../../common/constants/custom_panels'; -import { ServiceDetailFlyout } from './flyout_components/service_detail_flyout'; -import { SpanDetailFlyout } from '../../trace_analytics/components/traces/span_detail_flyout'; -import { TraceDetailFlyout } from './flyout_components/trace_detail_flyout'; -import { fetchAppById, initializeTabData } from '../helpers/utils'; import { QueryManager } from '../../../../common/query_manager/ppl_query_manager'; import { IntegrationOverview } from './integration_overview_panel'; import { IntegrationDetails } from './integration_details_panel'; import { IntegrationFields } from './integration_fields_panel'; +import { IntegrationAssets } from './integration_assets_panel'; const searchBarConfigs = { [TAB_EVENT_ID]: { @@ -145,11 +140,22 @@ export function Integration(props: AppDetailProps) { return ( - {IntegrationOverview({ appId, link: 'https://www.nginx.com/' })} + + {IntegrationOverview({ + appId, + link: 'https://www.nginx.com/', + license: 'Apache 2.0', + category: 'web, http', + version: 2.0, + contributer: { name: 'Joshua Li', link: 'https://github.com/joshuali925' }, + status: 'available', + })} {IntegrationDetails({ appId })} + {IntegrationAssets({ appId })} + {IntegrationFields({ appId })} diff --git a/public/components/placeholder/components/integration_assets_panel.tsx b/public/components/placeholder/components/integration_assets_panel.tsx index 0ff818dd5c..e6bf1dd05d 100644 --- a/public/components/placeholder/components/integration_assets_panel.tsx +++ b/public/components/placeholder/components/integration_assets_panel.tsx @@ -1,146 +1,11 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ -/* eslint-disable react-hooks/exhaustive-deps */ - -import { - EuiHorizontalRule, - EuiPage, - EuiPageBody, - EuiPageHeader, - EuiPageHeaderSection, - EuiPanel, - EuiSelectOption, - EuiSpacer, - EuiTabbedContent, - EuiTabbedContentTab, - EuiText, - EuiTitle, -} from '@elastic/eui'; -import DSLService from 'public/services/requests/dsl'; -import PPLService from 'public/services/requests/ppl'; -import SavedObjects from 'public/services/saved_objects/event_analytics/saved_objects'; -import TimestampUtils from 'public/services/timestamp/timestamp'; -import React, { ReactChild, useEffect, useState } from 'react'; -import { useHistory } from 'react-router-dom'; -import { useDispatch } from 'react-redux'; -import { last } from 'lodash'; -import { VisualizationType } from 'common/types/custom_panels'; -import { TracesContent } from '../../trace_analytics/components/traces/traces_content'; -import { DashboardContent } from '../../trace_analytics/components/dashboard/dashboard_content'; -import { ServicesContent } from '../../trace_analytics/components/services/services_content'; -import { filtersToDsl, PanelTitle } from '../../trace_analytics/components/common/helper_functions'; -import { SpanDetailTable } from '../../trace_analytics/components/traces/span_detail_table'; -import { Explorer } from '../../event_analytics/explorer/explorer'; -// import { Configuration } from './configuration'; -import { - TAB_CONFIG_ID, - TAB_CONFIG_TITLE, - TAB_LOG_ID, - TAB_LOG_TITLE, - TAB_OVERVIEW_ID, - TAB_OVERVIEW_TITLE, - TAB_PANEL_ID, - TAB_PANEL_TITLE, - TAB_SERVICE_ID, - TAB_SERVICE_TITLE, - TAB_TRACE_ID, - TAB_TRACE_TITLE, -} from '../../../../common/constants/application_analytics'; -import { TAB_EVENT_ID, TAB_CHART_ID, NEW_TAB } from '../../../../common/constants/explorer'; -import { IQueryTab } from '../../../../common/types/explorer'; -import { NotificationsStart } from '../../../../../../src/core/public'; -import { AppAnalyticsComponentDeps } from '../home'; -import { CustomPanelView } from '../../custom_panels/custom_panel_view'; -import { - ApplicationRequestType, - ApplicationType, -} from '../../../../common/types/application_analytics'; -import { CUSTOM_PANELS_API_PREFIX } from '../../../../common/constants/custom_panels'; -import { ServiceDetailFlyout } from './flyout_components/service_detail_flyout'; -import { SpanDetailFlyout } from '../../trace_analytics/components/traces/span_detail_flyout'; -import { TraceDetailFlyout } from './flyout_components/trace_detail_flyout'; -import { fetchAppById, initializeTabData } from '../helpers/utils'; -import { QueryManager } from '../../../../common/query_manager/ppl_query_manager'; - -const searchBarConfigs = { - [TAB_EVENT_ID]: { - showSaveButton: false, - showSavePanelOptionsList: false, - }, - [TAB_CHART_ID]: { - showSaveButton: true, - showSavePanelOptionsList: false, - }, -}; - -interface AppDetailProps extends AppAnalyticsComponentDeps { - disabled?: boolean; - appId: string; - pplService: PPLService; - dslService: DSLService; - savedObjects: SavedObjects; - timestampUtils: TimestampUtils; - notifications: NotificationsStart; - queryManager: QueryManager; - updateApp: (appId: string, updateAppData: Partial, type: string) => void; - setToasts: (title: string, color?: string, text?: ReactChild) => void; - callback: (childfunction: () => void) => void; -} - -export function Integration(props: AppDetailProps) { - const { - pplService, - dslService, - timestampUtils, - savedObjects, - http, - notifications, - appId, - chrome, - parentBreadcrumbs, - query, - filters, - appConfigs, - updateApp, - setAppConfigs, - setToasts, - setFilters, - callback, - queryManager, - mode, - } = props; - const [application, setApplication] = useState({ - id: '', - dateCreated: '', - dateModified: '', - name: '', - description: '', - baseQuery: '', - servicesEntities: [], - traceGroups: [], - panelId: '', - availability: { name: '', color: '', availabilityVisId: '' }, - }); - - useEffect(() => { - chrome.setBreadcrumbs([ - ...parentBreadcrumbs, - { - text: 'Placeholder', - href: '#/placeholder', - }, - { - text: appId, - href: `${last(parentBreadcrumbs)!.href}placeholder/${appId}`, - }, - ]); - }, [appId]); +import { EuiPanel } from '@elastic/eui'; +import React from 'react'; +import { PanelTitle } from '../../../../public/components/trace_analytics/components/common/helper_functions'; +export function IntegrationAssets(props: { appId }) { return ( - + ); } diff --git a/public/components/placeholder/components/integration_details_panel.tsx b/public/components/placeholder/components/integration_details_panel.tsx index 791fad3762..9fe3f15f7d 100644 --- a/public/components/placeholder/components/integration_details_panel.tsx +++ b/public/components/placeholder/components/integration_details_panel.tsx @@ -1,11 +1,23 @@ -import { EuiPanel } from '@elastic/eui'; +import { + EuiButton, + EuiFlexGroup, + EuiLink, + EuiPageHeader, + EuiPageHeaderSection, + EuiPanel, + EuiSpacer, + EuiTitle, + EuiFlexItem, + EuiText, + EuiPageContentHeaderSection, +} from '@elastic/eui'; import React from 'react'; import { PanelTitle } from '../../../../public/components/trace_analytics/components/common/helper_functions'; export function IntegrationDetails(props: { appId }) { return ( - + ); } diff --git a/public/components/placeholder/components/integration_fields_panel.tsx b/public/components/placeholder/components/integration_fields_panel.tsx index 1a45e99e44..6ff5d67f82 100644 --- a/public/components/placeholder/components/integration_fields_panel.tsx +++ b/public/components/placeholder/components/integration_fields_panel.tsx @@ -5,7 +5,7 @@ import { PanelTitle } from '../../../../public/components/trace_analytics/compon export function IntegrationFields(props: { appId }) { return ( - + ); } diff --git a/public/components/placeholder/components/integration_overview_panel.tsx b/public/components/placeholder/components/integration_overview_panel.tsx index 1e8007395f..0d0418344d 100644 --- a/public/components/placeholder/components/integration_overview_panel.tsx +++ b/public/components/placeholder/components/integration_overview_panel.tsx @@ -12,43 +12,25 @@ import { EuiPageContentHeaderSection, } from '@elastic/eui'; import React from 'react'; +import logo from '../assets/nginx-svgrepo-com.svg'; const pageStyles: CSS.Properties = { width: '80%', }; -export function IntegrationOverview(props: { appId; link }) { +export function IntegrationOverview(props: { + appId; + link; + status; + version; + category; + contributer; + license; +}) { return ( + React Logo - {/* - - -

- Applications ({applications.length}) -

-
-
- - - - setIsActionsPopoverOpen(false)} - > - - - - - - {createButtonText} - - - - -
*/} @@ -70,35 +52,37 @@ export function IntegrationOverview(props: { appId; link }) {

Status

- hello + {props.status}

Version

- hello + {props.version}

Category

- hello + {props.category}

Contributer

- hello + + {props.contributer.name} +

License

- hello + {props.license}
From a144420b6f0b378babe9bfe794cf5107ef2f0b82 Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Fri, 17 Mar 2023 10:26:34 -0400 Subject: [PATCH 007/190] get initial card view working Signed-off-by: Derek Ho --- .../available_integration_card_view.tsx | 226 +++++------------- .../available_integration_overview_page.tsx | 2 +- 2 files changed, 64 insertions(+), 164 deletions(-) diff --git a/public/components/placeholder/components/available_integration_card_view.tsx b/public/components/placeholder/components/available_integration_card_view.tsx index 74b0a64fd1..d083567d9d 100644 --- a/public/components/placeholder/components/available_integration_card_view.tsx +++ b/public/components/placeholder/components/available_integration_card_view.tsx @@ -1,26 +1,26 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - import { - EuiInMemoryTable, - EuiLink, - EuiPageContent, - EuiPageContentHeaderSection, + EuiCard, + EuiHorizontalRule, + EuiIcon, + EuiPage, + EuiPageBody, + EuiPageHeader, + EuiPageHeaderSection, + EuiPanel, + EuiSelectOption, EuiSpacer, - EuiTableFieldDataColumnType, + EuiTabbedContent, + EuiTabbedContentTab, EuiText, EuiTitle, } from '@elastic/eui'; -import _ from 'lodash'; -import React, { ReactElement, useEffect, useState } from 'react'; - -interface AvailableIntegrationsTableProps { - loading: boolean; -} +import DSLService from 'public/services/requests/dsl'; +import PPLService from 'public/services/requests/ppl'; +import SavedObjects from 'public/services/saved_objects/event_analytics/saved_objects'; +import TimestampUtils from 'public/services/timestamp/timestamp'; +import React, { ReactChild, useEffect, useState } from 'react'; -export function AvailableIntegrationsCardView(props: AvailableIntegrationsTableProps) { +export function AvailableIntegrationsCardView() { const integrations = [ { name: 'nginx', @@ -30,156 +30,56 @@ export function AvailableIntegrationsCardView(props: AvailableIntegrationsTableP }, ]; - const tableColumns = [ - { - field: 'name', - name: 'Name', - sortable: true, - truncateText: true, - render: (value, record) => ( - - {_.truncate(record.name, { length: 100 })} - - ), - }, - { - field: 'description', - name: 'Description', - sortable: true, - truncateText: true, - render: (value, record) => ( - - {_.truncate(record.description, { length: 100 })} - - ), - }, - { - field: 'status', - name: 'Status', - sortable: true, - truncateText: true, - render: (value, record) => ( - - {_.truncate(record.status, { length: 100 })} - - ), - }, - { - field: 'actions', - name: 'Actions', - sortable: true, - truncateText: true, - render: (value, record) => ( - {}} - > - Add - - ), - }, - ] as Array>; - - const FILTER_OPTIONS = ['Visualization', 'Query', 'Metric']; - - const search = { - box: { - incremental: true, - }, - filters: [ - { - type: 'field_value_selection', - field: 'type', - name: 'Type', - multiSelect: false, - options: FILTER_OPTIONS.map((i) => ({ - value: i, - name: i, - view: i, - })), - }, - ], - }; - - // return ( - //
- // - // - // - //

Integrations (2)

- //
- //
- //
- - // - - // - // {features.map((feature) => ( - // - // { // window.location.assign(`#/placeholder/${feature}`); // }} - // /> - // - // ))} - // - //
- // ); + const url = 'random'; + + let optionalImg; + if (iconUrl) { + optionalImg = ; + } else if (iconType) { + optionalImg = ; + } + + // const classes = classNames('homSynopsis__card', { + // 'homSynopsis__card--noPanel': !wrapInPanel, + // }); + return ( - - - -

Availble Integrations

-
-
- - {integrations.length > 0 ? ( - setSelectedApplications(items), - // }} - /> - ) : ( - <> - - -

No Integrations Available

-
- - - )} -
+ { + window.location.assign(`#/placeholder/${title}`); + }} + data-test-subj={`homeSynopsisLink${id.toLowerCase()}`} + // betaBadgeLabel={isBeta ? 'Beta' : null} + titleElement="h3" + /> ); } + +// Synopsis.propTypes = { +// description: PropTypes.string.isRequired, +// iconUrl: PropTypes.string, +// iconType: PropTypes.string, +// title: PropTypes.string.isRequired, +// url: PropTypes.string, +// onClick: PropTypes.func, +// isBeta: PropTypes.bool, +// }; + +// Synopsis.defaultProps = { +// isBeta: false, +// }; diff --git a/public/components/placeholder/components/available_integration_overview_page.tsx b/public/components/placeholder/components/available_integration_overview_page.tsx index 5f1042fb2f..4c6117b39e 100644 --- a/public/components/placeholder/components/available_integration_overview_page.tsx +++ b/public/components/placeholder/components/available_integration_overview_page.tsx @@ -75,7 +75,7 @@ export function AvailableIntegrationOverviewPage(props: AppTableProps) { /> {isCardView - ? AvailableIntegrationsCardView({ loading: false }) + ? AvailableIntegrationsCardView() : AvailableIntegrationsTable({ loading: false })} From 3090a5f79810d7467191576e8ee9782961d990c3 Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Fri, 17 Mar 2023 14:33:35 -0400 Subject: [PATCH 008/190] generalize and figure out rows for card view Signed-off-by: Derek Ho --- .../available_integration_card_view.tsx | 91 ++++++++++++------- .../available_integration_overview_page.tsx | 87 +++++++++++++----- .../available_integration_table.tsx | 15 +-- 3 files changed, 121 insertions(+), 72 deletions(-) diff --git a/public/components/placeholder/components/available_integration_card_view.tsx b/public/components/placeholder/components/available_integration_card_view.tsx index d083567d9d..dc2cf65902 100644 --- a/public/components/placeholder/components/available_integration_card_view.tsx +++ b/public/components/placeholder/components/available_integration_card_view.tsx @@ -1,9 +1,13 @@ import { EuiCard, + EuiFlexGrid, + EuiFlexGroup, + EuiFlexItem, EuiHorizontalRule, EuiIcon, EuiPage, EuiPageBody, + EuiPageContent, EuiPageHeader, EuiPageHeaderSection, EuiPanel, @@ -19,54 +23,71 @@ import PPLService from 'public/services/requests/ppl'; import SavedObjects from 'public/services/saved_objects/event_analytics/saved_objects'; import TimestampUtils from 'public/services/timestamp/timestamp'; import React, { ReactChild, useEffect, useState } from 'react'; +import { AvailableIntegrationsCardViewProps } from './available_integration_overview_page'; -export function AvailableIntegrationsCardView() { - const integrations = [ - { - name: 'nginx', - description: - 'Open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server', - status: 'Available', - }, - ]; +export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardViewProps) { + const integrations = props.data; - const id = 'random'; - const description = 'random'; - const iconUrl = - 'https://images.pexels.com/photos/20787/pexels-photo.jpg?auto=compress&cs=tinysrgb&h=350'; - const title = 'nginx'; // title={feature} // onClick={() => { // window.location.assign(`#/placeholder/${feature}`); // }} - const url = 'random'; - let optionalImg; - if (iconUrl) { - optionalImg = ; - } else if (iconType) { - optionalImg = ; - } + const getImage = (url?: string) => { + let optionalImg; + if (url) { + optionalImg = ; + } + return optionalImg; + }; // const classes = classNames('homSynopsis__card', { // 'homSynopsis__card--noPanel': !wrapInPanel, // }); return ( - { - window.location.assign(`#/placeholder/${title}`); - }} - data-test-subj={`homeSynopsisLink${id.toLowerCase()}`} - // betaBadgeLabel={isBeta ? 'Beta' : null} - titleElement="h3" - /> + + + {integrations.map((i, v) => { + return ( + + { + window.location.assign(`#/placeholder/${i.name}`); + }} + data-test-subj={`homeSynopsisLink${i.name.toLowerCase()}`} + /> + + ); + })} + + + {integrations.map((i, v) => { + return ( + + { + window.location.assign(`#/placeholder/${i.name}`); + }} + data-test-subj={`homeSynopsisLink${i.name.toLowerCase()}`} + /> + + ); + })} + + ); } diff --git a/public/components/placeholder/components/available_integration_overview_page.tsx b/public/components/placeholder/components/available_integration_overview_page.tsx index 4c6117b39e..4e8227f52a 100644 --- a/public/components/placeholder/components/available_integration_overview_page.tsx +++ b/public/components/placeholder/components/available_integration_overview_page.tsx @@ -24,11 +24,72 @@ interface AppTableProps extends AppAnalyticsComponentDeps { moveToApp: (id: string, type: string) => void; } +interface AvailableIntegrationType { + name: string; + description: string; + status: string; + assetUrl?: string | undefined; +} + +export interface AvailableIntegrationsTableProps { + loading: boolean; + data: AvailableIntegrationType[]; +} + +export interface AvailableIntegrationsCardViewProps { + data: AvailableIntegrationType[]; +} + export function AvailableIntegrationOverviewPage(props: AppTableProps) { const { chrome, parentBreadcrumbs } = props; const [isCardView, setCardView] = useState(true); + const data: AvailableIntegrationType[] = [ + { + name: 'nginx', + description: + 'Open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server', + status: 'Available', + assetUrl: 'https://www.shareicon.net/data/256x256/2017/06/28/888041_logo_512x512.png', + }, + { + name: 'nginx', + description: + 'Open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server', + status: 'Available', + assetUrl: 'https://www.shareicon.net/data/256x256/2017/06/28/888041_logo_512x512.png', + }, + { + name: 'nginx', + description: + 'Open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server', + status: 'Available', + assetUrl: 'https://www.shareicon.net/data/256x256/2017/06/28/888041_logo_512x512.png', + }, + { + name: 'nginx', + description: + 'Open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server', + status: 'Available', + assetUrl: 'https://www.shareicon.net/data/256x256/2017/06/28/888041_logo_512x512.png', + }, + { + name: 'nginx', + description: + 'Open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server', + status: 'Available', + assetUrl: 'https://www.shareicon.net/data/256x256/2017/06/28/888041_logo_512x512.png', + }, + { + name: 'nginx', + description: + 'Open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server', + status: 'Available', + assetUrl: 'https://www.shareicon.net/data/256x256/2017/06/28/888041_logo_512x512.png', + }, + ]; + useEffect(() => { chrome.setBreadcrumbs([ ...parentBreadcrumbs, @@ -50,33 +111,11 @@ export function AvailableIntegrationOverviewPage(props: AppTableProps) { onChange={() => { setCardView(!isCardView); }} - // label="Dark mode" - // checked={isDarkMode} - // onChange={() => { - // uiSettingsService.set('theme:darkMode', !isDarkMode).then((resp) => { - // setIsDarkMode(!isDarkMode); - // uiSettingsService.addToast({ - // title: 'Theme setting changes require you to reload the page to take effect.', - // text: toMountPoint( - // <> - // - // - // window.location.reload()}> - // Reload page - // - // - // - // - // ), - // color: 'success', - // }); - // }); - // }} /> {isCardView - ? AvailableIntegrationsCardView() - : AvailableIntegrationsTable({ loading: false })} + ? AvailableIntegrationsCardView({ data }) + : AvailableIntegrationsTable({ loading: false, data })} ); diff --git a/public/components/placeholder/components/available_integration_table.tsx b/public/components/placeholder/components/available_integration_table.tsx index fcd24a78c7..f13e4e7026 100644 --- a/public/components/placeholder/components/available_integration_table.tsx +++ b/public/components/placeholder/components/available_integration_table.tsx @@ -15,21 +15,10 @@ import { } from '@elastic/eui'; import _ from 'lodash'; import React, { ReactElement, useEffect, useState } from 'react'; - -interface AvailableIntegrationsTableProps { - loading: boolean; -} +import { AvailableIntegrationsTableProps } from './available_integration_overview_page'; export function AvailableIntegrationsTable(props: AvailableIntegrationsTableProps) { - - const integrations = [ - { - name: 'nginx', - description: - 'Open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server', - status: 'Available', - }, - ]; + const integrations = props.data; const tableColumns = [ { From 15fad6b3f91a13de6a1ff1684a54e82b1a12867e Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Fri, 17 Mar 2023 15:20:13 -0400 Subject: [PATCH 009/190] make general for any number of records Signed-off-by: Derek Ho --- .../available_integration_card_view.tsx | 84 +++++++++---------- .../available_integration_overview_page.tsx | 8 +- 2 files changed, 43 insertions(+), 49 deletions(-) diff --git a/public/components/placeholder/components/available_integration_card_view.tsx b/public/components/placeholder/components/available_integration_card_view.tsx index dc2cf65902..552d0efdfa 100644 --- a/public/components/placeholder/components/available_integration_card_view.tsx +++ b/public/components/placeholder/components/available_integration_card_view.tsx @@ -18,15 +18,20 @@ import { EuiText, EuiTitle, } from '@elastic/eui'; +import _ from 'lodash'; import DSLService from 'public/services/requests/dsl'; import PPLService from 'public/services/requests/ppl'; import SavedObjects from 'public/services/saved_objects/event_analytics/saved_objects'; import TimestampUtils from 'public/services/timestamp/timestamp'; import React, { ReactChild, useEffect, useState } from 'react'; -import { AvailableIntegrationsCardViewProps } from './available_integration_overview_page'; +import { + AvailableIntegrationsCardViewProps, + AvailableIntegrationType, +} from './available_integration_overview_page'; export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardViewProps) { - const integrations = props.data; + const rowNumber = props.records / 5; + // console.log(rowNumber) // title={feature} // onClick={() => { @@ -45,50 +50,37 @@ export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardVi // 'homSynopsis__card--noPanel': !wrapInPanel, // }); - return ( - - - {integrations.map((i, v) => { - return ( - - { - window.location.assign(`#/placeholder/${i.name}`); - }} - data-test-subj={`homeSynopsisLink${i.name.toLowerCase()}`} - /> - - ); - })} - - - {integrations.map((i, v) => { - return ( - - { - window.location.assign(`#/placeholder/${i.name}`); - }} - data-test-subj={`homeSynopsisLink${i.name.toLowerCase()}`} - /> - - ); - })} - - - ); + const renderRows = (integrations: AvailableIntegrationType[]) => { + return _.times(rowNumber).map(() => { + return ( + <> + + {integrations.map((i, v) => { + return ( + + { + window.location.assign(`#/placeholder/${i.name}`); + }} + data-test-subj={`homeSynopsisLink${i.name.toLowerCase()}`} + /> + + ); + })} + + + + ); + }); + }; + + return <>{renderRows(props.data)}; } // Synopsis.propTypes = { diff --git a/public/components/placeholder/components/available_integration_overview_page.tsx b/public/components/placeholder/components/available_integration_overview_page.tsx index 4e8227f52a..e169b57d53 100644 --- a/public/components/placeholder/components/available_integration_overview_page.tsx +++ b/public/components/placeholder/components/available_integration_overview_page.tsx @@ -24,7 +24,7 @@ interface AppTableProps extends AppAnalyticsComponentDeps { moveToApp: (id: string, type: string) => void; } -interface AvailableIntegrationType { +export interface AvailableIntegrationType { name: string; description: string; status: string; @@ -34,10 +34,12 @@ interface AvailableIntegrationType { export interface AvailableIntegrationsTableProps { loading: boolean; data: AvailableIntegrationType[]; + records: number; } export interface AvailableIntegrationsCardViewProps { data: AvailableIntegrationType[]; + records: number; } export function AvailableIntegrationOverviewPage(props: AppTableProps) { @@ -114,8 +116,8 @@ export function AvailableIntegrationOverviewPage(props: AppTableProps) { /> {isCardView - ? AvailableIntegrationsCardView({ data }) - : AvailableIntegrationsTable({ loading: false, data })} + ? AvailableIntegrationsCardView({ data, records: 6 }) + : AvailableIntegrationsTable({ loading: false, data, records: 6 })} ); From 80348c37beec4e1f9e8b9a3f09af848e7cb0fe47 Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Wed, 22 Mar 2023 14:14:59 -0400 Subject: [PATCH 010/190] clean up Signed-off-by: Derek Ho --- .../available_integration_card_view.tsx | 36 +++++- .../available_integration_overview_page.tsx | 107 +++++++++------- .../available_integration_table.tsx | 8 +- .../components/integration_card.tsx | 8 +- server/routes/index.ts | 9 +- .../routes/placeholder/placeholder_router.ts | 121 ++++++++++++++++++ 6 files changed, 226 insertions(+), 63 deletions(-) create mode 100644 server/routes/placeholder/placeholder_router.ts diff --git a/public/components/placeholder/components/available_integration_card_view.tsx b/public/components/placeholder/components/available_integration_card_view.tsx index 552d0efdfa..89e9dc3e00 100644 --- a/public/components/placeholder/components/available_integration_card_view.tsx +++ b/public/components/placeholder/components/available_integration_card_view.tsx @@ -1,4 +1,5 @@ import { + EuiButton, EuiCard, EuiFlexGrid, EuiFlexGroup, @@ -18,6 +19,16 @@ import { EuiText, EuiTitle, } from '@elastic/eui'; +import { + OuiButton, + OuiCard, + OuiIcon, + OuiFlexGroup, + OuiFlexItem, + OuiLink, + OuiSpacer, + OuiText, +} from '@opensearch-project/oui'; import _ from 'lodash'; import DSLService from 'public/services/requests/dsl'; import PPLService from 'public/services/requests/ppl'; @@ -63,12 +74,25 @@ export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardVi layout="vertical" icon={getImage(i.assetUrl)} titleSize="xs" - title={i.name} + title={i.templateName} description={i.description} - onClick={() => { - window.location.assign(`#/placeholder/${i.name}`); - }} - data-test-subj={`homeSynopsisLink${i.name.toLowerCase()}`} + data-test-subj={`homeSynopsisLink${i.templateName.toLowerCase()}`} + footer={ +
+ { + window.location.assign(`#/placeholder/${i.templateName}`); + }} + > + View Details + + + {}}> + Add + +
+ } /> ); @@ -80,7 +104,7 @@ export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardVi }); }; - return <>{renderRows(props.data)}; + return <>{renderRows(props.data.data)}; } // Synopsis.propTypes = { diff --git a/public/components/placeholder/components/available_integration_overview_page.tsx b/public/components/placeholder/components/available_integration_overview_page.tsx index e169b57d53..6469a6c8ea 100644 --- a/public/components/placeholder/components/available_integration_overview_page.tsx +++ b/public/components/placeholder/components/available_integration_overview_page.tsx @@ -13,6 +13,7 @@ import { IntegrationHeader } from './integration_header'; import { AvailableIntegrationsTable } from './available_integration_table'; import { AddedIntegrationsTable } from './added_integration_table'; import { AvailableIntegrationsCardView } from './available_integration_card_view'; +import { OBSERVABILITY_BASE } from '../../../../common/constants/shared'; interface AppTableProps extends AppAnalyticsComponentDeps { loading: boolean; @@ -25,7 +26,7 @@ interface AppTableProps extends AppAnalyticsComponentDeps { } export interface AvailableIntegrationType { - name: string; + templateName: string; description: string; status: string; assetUrl?: string | undefined; @@ -33,64 +34,69 @@ export interface AvailableIntegrationType { export interface AvailableIntegrationsTableProps { loading: boolean; - data: AvailableIntegrationType[]; + data: AvailableIntegrationsList; records: number; } -export interface AvailableIntegrationsCardViewProps { +export interface AvailableIntegrationsList { data: AvailableIntegrationType[]; +} + +export interface AvailableIntegrationsCardViewProps { + data: AvailableIntegrationsList; records: number; } export function AvailableIntegrationOverviewPage(props: AppTableProps) { - const { chrome, parentBreadcrumbs } = props; + const { chrome, parentBreadcrumbs, http } = props; const [isCardView, setCardView] = useState(true); + const [data, setData] = useState({ data: [] }); - const data: AvailableIntegrationType[] = [ - { - name: 'nginx', - description: - 'Open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server', - status: 'Available', - assetUrl: 'https://www.shareicon.net/data/256x256/2017/06/28/888041_logo_512x512.png', - }, - { - name: 'nginx', - description: - 'Open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server', - status: 'Available', - assetUrl: 'https://www.shareicon.net/data/256x256/2017/06/28/888041_logo_512x512.png', - }, - { - name: 'nginx', - description: - 'Open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server', - status: 'Available', - assetUrl: 'https://www.shareicon.net/data/256x256/2017/06/28/888041_logo_512x512.png', - }, - { - name: 'nginx', - description: - 'Open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server', - status: 'Available', - assetUrl: 'https://www.shareicon.net/data/256x256/2017/06/28/888041_logo_512x512.png', - }, - { - name: 'nginx', - description: - 'Open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server', - status: 'Available', - assetUrl: 'https://www.shareicon.net/data/256x256/2017/06/28/888041_logo_512x512.png', - }, - { - name: 'nginx', - description: - 'Open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server', - status: 'Available', - assetUrl: 'https://www.shareicon.net/data/256x256/2017/06/28/888041_logo_512x512.png', - }, - ]; + // const data: AvailableIntegrationType[] = [ + // { + // name: 'nginx', + // description: + // 'Open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server', + // status: 'Available', + // assetUrl: 'https://www.shareicon.net/data/256x256/2017/06/28/888041_logo_512x512.png', + // }, + // { + // name: 'nginx', + // description: + // 'Open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server', + // status: 'Available', + // assetUrl: 'https://www.shareicon.net/data/256x256/2017/06/28/888041_logo_512x512.png', + // }, + // { + // name: 'nginx', + // description: + // 'Open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server', + // status: 'Available', + // assetUrl: 'https://www.shareicon.net/data/256x256/2017/06/28/888041_logo_512x512.png', + // }, + // { + // name: 'nginx', + // description: + // 'Open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server', + // status: 'Available', + // assetUrl: 'https://www.shareicon.net/data/256x256/2017/06/28/888041_logo_512x512.png', + // }, + // { + // name: 'nginx', + // description: + // 'Open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server', + // status: 'Available', + // assetUrl: 'https://www.shareicon.net/data/256x256/2017/06/28/888041_logo_512x512.png', + // }, + // { + // name: 'nginx', + // description: + // 'Open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server', + // status: 'Available', + // assetUrl: 'https://www.shareicon.net/data/256x256/2017/06/28/888041_logo_512x512.png', + // }, + // ]; useEffect(() => { chrome.setBreadcrumbs([ @@ -100,8 +106,13 @@ export function AvailableIntegrationOverviewPage(props: AppTableProps) { href: '#/placeholder', }, ]); + handleDataRequest(); }, []); + async function handleDataRequest() { + http.get(`${OBSERVABILITY_BASE}/repository`).then((exists) => setData(exists)); + } + return ( diff --git a/public/components/placeholder/components/available_integration_table.tsx b/public/components/placeholder/components/available_integration_table.tsx index f13e4e7026..ad42d5057f 100644 --- a/public/components/placeholder/components/available_integration_table.tsx +++ b/public/components/placeholder/components/available_integration_table.tsx @@ -18,7 +18,7 @@ import React, { ReactElement, useEffect, useState } from 'react'; import { AvailableIntegrationsTableProps } from './available_integration_overview_page'; export function AvailableIntegrationsTable(props: AvailableIntegrationsTableProps) { - const integrations = props.data; + const integrations = props.data.data; const tableColumns = [ { @@ -28,10 +28,10 @@ export function AvailableIntegrationsTable(props: AvailableIntegrationsTableProp truncateText: true, render: (value, record) => ( - {_.truncate(record.name, { length: 100 })} + {_.truncate(record.templateName, { length: 100 })} ), }, diff --git a/public/components/placeholder/components/integration_card.tsx b/public/components/placeholder/components/integration_card.tsx index 9208b94e40..cb88c176a1 100644 --- a/public/components/placeholder/components/integration_card.tsx +++ b/public/components/placeholder/components/integration_card.tsx @@ -1,4 +1,5 @@ import { + EuiButton, EuiCard, EuiHorizontalRule, EuiIcon, @@ -45,7 +46,7 @@ export function Synopsis({ return ( + Choice One + + } /> ); } diff --git a/server/routes/index.ts b/server/routes/index.ts index 31e5c04564..885efa9b40 100644 --- a/server/routes/index.ts +++ b/server/routes/index.ts @@ -20,16 +20,16 @@ import { registerSqlRoute } from './notebooks/sqlRouter'; import { registerEventAnalyticsRouter } from './event_analytics/event_analytics_router'; import { registerAppAnalyticsRouter } from './application_analytics/app_analytics_router'; import { registerMetricsRoute } from './metrics/metrics_rounter'; - +import { registerPlaceholderRoute } from './placeholder/placeholder_router'; export function setupRoutes({ router, client }: { router: IRouter; client: ILegacyClusterClient }) { PanelsRouter(router); VisualizationsRouter(router); registerPplRoute({ router, facet: new PPLFacet(client) }); - registerDslRoute({ router, facet: new DSLFacet(client)}); + registerDslRoute({ router, facet: new DSLFacet(client) }); registerEventAnalyticsRouter({ router, savedObjectFacet: new SavedObjectFacet(client) }); registerAppAnalyticsRouter(router); - + // TODO remove trace analytics route when DSL route for autocomplete is added registerTraceAnalyticsDslRouter(router); @@ -41,4 +41,5 @@ export function setupRoutes({ router, client }: { router: IRouter; client: ILega registerSqlRoute(router, queryService); registerMetricsRoute(router); -}; + registerPlaceholderRoute(router); +} diff --git a/server/routes/placeholder/placeholder_router.ts b/server/routes/placeholder/placeholder_router.ts new file mode 100644 index 0000000000..6768fcb86f --- /dev/null +++ b/server/routes/placeholder/placeholder_router.ts @@ -0,0 +1,121 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { ResponseError } from '@opensearch-project/opensearch/lib/errors'; +import { schema } from '@osd/config-schema'; +import fetch from 'node-fetch'; +import { IOpenSearchDashboardsResponse, IRouter } from '../../../../../src/core/server'; +import { OBSERVABILITY_BASE } from '../../../common/constants/shared'; +import { addClickToMetric, getMetrics } from '../../common/metrics/metrics_helper'; + +export function registerPlaceholderRoute(router: IRouter) { + router.get( + { + path: `${OBSERVABILITY_BASE}/repository`, + validate: false, + }, + async (context, request, response): Promise => { + try { + const random = await fetch('http://127.0.0.1:4010/repository?limit=24', { + // method: "GET", // *GET, POST, PUT, DELETE, etc. + // mode: "cors", // no-cors, *cors, same-origin + // cache: "no-cache", // *default, no-cache, reload, force-cache, only-if-cached + // credentials: "same-origin", // include, *same-origin, omit + // headers: { + // "Content-Type": "application/json", + // // 'Content-Type': 'application/x-www-form-urlencoded', + // }, + // redirect: "follow", // manual, *follow, error + // referrerPolicy: "no-referrer", // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url + // // body: '{limit: 3}', // body data type must match "Content-Type" header + }); + return response.ok({ + body: { + data: await random.json(), + }, + }); + // const metrics = getMetrics(); + // return response.ok({ + // body: metrics, + // }); + } catch (error) { + // console.error(error); + // return response.custom({ + // statusCode: error.statusCode || 500, + // body: error.message, + // }); + } + } + ); + // router.get( + // { + // path: `${OBSERVABILITY_BASE}/repository`, + // validate: false, + // }, + // async ( + // context, + // request, + // response + // ): Promise> => { + // console.log('made it in here') + // try { + // await fetch("http://127.0.0.1:4010/repository", { + // method: "POST", // *GET, POST, PUT, DELETE, etc. + // mode: "cors", // no-cors, *cors, same-origin + // cache: "no-cache", // *default, no-cache, reload, force-cache, only-if-cached + // // credentials: "same-origin", // include, *same-origin, omit + // headers: { + // "Content-Type": "application/zip", + // // 'Content-Type': 'application/x-www-form-urlencoded', + // }, + // redirect: "follow", // manual, *follow, error + // referrerPolicy: "no-referrer", // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url + // body: 'UEsDBBQAAAAAAOhpdVYAAAAAAAAAAAAAAAAFAAAAdGVzdC9QSwECPwAUAAAAAADoaXVWAAAAAAAAAAAAAAAABQAkAAAAAAAAABAAAAAAAAAAdGVzdC8KACAAAAAAAAEAGABGQanYMVzZAUZBqdgxXNkBRkGp2DFc2QFQSwUGAAAAAAEAAQBXAAAAIwAAAAA', // body data type must match "Content-Type" header + // }); + // return Promise.reject() + // // const metrics = getMetrics(); + // // return response.ok({ + // // body: metrics, + // // }); + // } catch (error) { + + // console.error(error); + // // return response.custom({ + // // statusCode: error.statusCode || 500, + // // body: error.message, + // // }); + // } + // return Promise.reject() + // } + // ); + + // router.post( + // { + // path: `${OBSERVABILITY_BASE}/stats`, + // validate: { + // body: schema.object({ + // element: schema.string() + // }), + // }, + // }, + // async ( + // context, + // request, + // response + // ): Promise> => { + // try { + // const { element } = request.body; + // addClickToMetric(element); + // return response.ok(); + // } catch (error) { + // console.error(error); + // return response.custom({ + // statusCode: error.statusCode || 500, + // body: error.message, + // }); + // } + // } + // ); +} From 45685b1449e9735e1cd325e0ad658ba34045b37d Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Wed, 22 Mar 2023 16:49:12 -0400 Subject: [PATCH 011/190] get added table working Signed-off-by: Derek Ho --- .../added_integration_overview_page.tsx | 25 +++++- .../components/added_integration_table.tsx | 77 ++++++++++--------- .../routes/placeholder/placeholder_router.ts | 39 ++++++++++ 3 files changed, 104 insertions(+), 37 deletions(-) diff --git a/public/components/placeholder/components/added_integration_overview_page.tsx b/public/components/placeholder/components/added_integration_overview_page.tsx index b56bd4f7e6..fa4f038a61 100644 --- a/public/components/placeholder/components/added_integration_overview_page.tsx +++ b/public/components/placeholder/components/added_integration_overview_page.tsx @@ -12,6 +12,7 @@ import { ApplicationType } from '../../../../common/types/application_analytics' import { IntegrationHeader } from './integration_header'; import { AvailableIntegrationsTable } from './available_integration_table'; import { AddedIntegrationsTable } from './added_integration_table'; +import { OBSERVABILITY_BASE } from '../../../../common/constants/shared'; interface AppTableProps extends AppAnalyticsComponentDeps { loading: boolean; @@ -23,8 +24,23 @@ interface AppTableProps extends AppAnalyticsComponentDeps { moveToApp: (id: string, type: string) => void; } +export interface AddedIntegrationsTableProps { + loading: boolean; + data: AddedIntegrationsList; +} + +export interface AddedIntegrationsList { + data: AddedIntegrationType[]; +} + +export interface AddedIntegrationType { + dashboardUrl: string; +} + export function AddedIntegrationOverviewPage(props: AppTableProps) { - const { chrome, parentBreadcrumbs } = props; + const { chrome, parentBreadcrumbs, http } = props; + + const [data, setData] = useState({ data: [] }); useEffect(() => { chrome.setBreadcrumbs([ @@ -34,13 +50,18 @@ export function AddedIntegrationOverviewPage(props: AppTableProps) { href: '#/placeholder', }, ]); + handleDataRequest(); }, []); + async function handleDataRequest() { + http.get(`${OBSERVABILITY_BASE}/store`).then((exists) => setData(exists)); + } + return ( {IntegrationHeader()} - {AddedIntegrationsTable({loading: false})} + {AddedIntegrationsTable({ data, loading: false })} ); diff --git a/public/components/placeholder/components/added_integration_table.tsx b/public/components/placeholder/components/added_integration_table.tsx index 17082c422c..3c63289046 100644 --- a/public/components/placeholder/components/added_integration_table.tsx +++ b/public/components/placeholder/components/added_integration_table.tsx @@ -15,72 +15,79 @@ import { } from '@elastic/eui'; import _ from 'lodash'; import React, { ReactElement, useEffect, useState } from 'react'; - -interface AddedIntegrationsTableProps { - loading: boolean; -} +import { AddedIntegrationsTableProps } from './added_integration_overview_page'; export function AddedIntegrationsTable(props: AddedIntegrationsTableProps) { - const integrations = [ - // { - // name: 'nginx', - // description: - // 'Open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server', - // status: 'Available', - // }, - // ]; - ]; + const integrations = props.data.data; const tableColumns = [ { field: 'name', - name: 'Name', + name: 'Asset name', sortable: true, truncateText: true, render: (value, record) => ( - {_.truncate(record.name, { length: 100 })} + {_.truncate(record.id, { length: 100 })} ), }, { - field: 'description', - name: 'Description', + field: 'source', + name: 'Source', sortable: true, truncateText: true, render: (value, record) => ( - - {_.truncate(record.description, { length: 100 })} + + {_.truncate(record.templateName, { length: 100 })} ), }, { - field: 'status', - name: 'Status', + field: 'type', + name: 'Type', sortable: true, truncateText: true, render: (value, record) => ( - - {_.truncate(record.status, { length: 100 })} + + {_.truncate(record.type, { length: 100 })} ), }, { - field: 'actions', - name: 'Actions', + field: 'dateAdded', + name: 'Date Added', sortable: true, truncateText: true, render: (value, record) => ( - {}} - > - Add - + + {_.truncate(record.creationDate, { length: 100 })} + + ), + }, + { + field: 'author', + name: 'Added By', + sortable: true, + truncateText: true, + render: (value, record) => ( + + {_.truncate(record.author, { length: 100 })} + + ), + }, + { + field: 'status', + name: 'Status', + sortable: true, + truncateText: true, + render: (value, record) => ( + + {_.truncate(record.status, { length: 100 })} + ), }, ] as Array>; @@ -114,7 +121,7 @@ export function AddedIntegrationsTable(props: AddedIntegrationsTableProps) { - {integrations.length > 0 ? ( + {integrations ? ( => { + try { + const random = await fetch('http://127.0.0.1:4010/store?limit=24', { + // method: "GET", // *GET, POST, PUT, DELETE, etc. + // mode: "cors", // no-cors, *cors, same-origin + // cache: "no-cache", // *default, no-cache, reload, force-cache, only-if-cached + // credentials: "same-origin", // include, *same-origin, omit + // headers: { + // "Content-Type": "application/json", + // // 'Content-Type': 'application/x-www-form-urlencoded', + // }, + // redirect: "follow", // manual, *follow, error + // referrerPolicy: "no-referrer", // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url + // // body: '{limit: 3}', // body data type must match "Content-Type" header + }); + return response.ok({ + body: { + data: await random.json(), + }, + }); + // const metrics = getMetrics(); + // return response.ok({ + // body: metrics, + // }); + } catch (error) { + // console.error(error); + // return response.custom({ + // statusCode: error.statusCode || 500, + // body: error.message, + // }); + } + } + ); // router.get( // { // path: `${OBSERVABILITY_BASE}/repository`, From 46844f08564e059b134fcf86407d4b5f6ccb61db Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Wed, 22 Mar 2023 17:16:42 -0400 Subject: [PATCH 012/190] get modal to pop up on add Signed-off-by: Derek Ho --- .../available_integration_card_view.tsx | 38 +++++++++++++------ 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/public/components/placeholder/components/available_integration_card_view.tsx b/public/components/placeholder/components/available_integration_card_view.tsx index 89e9dc3e00..d40e8b0a3f 100644 --- a/public/components/placeholder/components/available_integration_card_view.tsx +++ b/public/components/placeholder/components/available_integration_card_view.tsx @@ -18,23 +18,15 @@ import { EuiTabbedContentTab, EuiText, EuiTitle, + EuiOverlayMask, } from '@elastic/eui'; -import { - OuiButton, - OuiCard, - OuiIcon, - OuiFlexGroup, - OuiFlexItem, - OuiLink, - OuiSpacer, - OuiText, -} from '@opensearch-project/oui'; import _ from 'lodash'; import DSLService from 'public/services/requests/dsl'; import PPLService from 'public/services/requests/ppl'; import SavedObjects from 'public/services/saved_objects/event_analytics/saved_objects'; import TimestampUtils from 'public/services/timestamp/timestamp'; import React, { ReactChild, useEffect, useState } from 'react'; +import { getCustomModal } from '../../../../public/components/custom_panels/helpers/modal_containers'; import { AvailableIntegrationsCardViewProps, AvailableIntegrationType, @@ -42,6 +34,9 @@ import { export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardViewProps) { const rowNumber = props.records / 5; + + const [isModalVisible, setIsModalVisible] = useState(false); + const [modalLayout, setModalLayout] = useState(); // console.log(rowNumber) // title={feature} @@ -57,6 +52,21 @@ export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardVi return optionalImg; }; + const getModal = () => { + setModalLayout( + getCustomModal( + () => {}, + () => {}, + 'Name', + 'Rename application', + 'Cancel', + 'Rename', + 'test' + ) + ); + setIsModalVisible(true); + }; + // const classes = classNames('homSynopsis__card', { // 'homSynopsis__card--noPanel': !wrapInPanel, // }); @@ -88,7 +98,12 @@ export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardVi View Details - {}}> + { + getModal(); + }} + > Add @@ -99,6 +114,7 @@ export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardVi })} + {isModalVisible && modalLayout} ); }); From 33ecdf75f4b90c7e228d4d4d521f87a6d0207508 Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Wed, 22 Mar 2023 21:15:35 -0400 Subject: [PATCH 013/190] get modal mostly working Signed-off-by: Derek Ho --- .../components/add_integration_modal.tsx | 163 ++++++++++++++++++ .../available_integration_card_view.tsx | 21 +-- .../available_integration_overview_page.tsx | 37 +++- .../available_integration_table.tsx | 2 +- .../placeholder/components/integration.tsx | 24 +++ .../components/integration_overview_panel.tsx | 10 +- 6 files changed, 232 insertions(+), 25 deletions(-) create mode 100644 public/components/placeholder/components/add_integration_modal.tsx diff --git a/public/components/placeholder/components/add_integration_modal.tsx b/public/components/placeholder/components/add_integration_modal.tsx new file mode 100644 index 0000000000..ef73d55d09 --- /dev/null +++ b/public/components/placeholder/components/add_integration_modal.tsx @@ -0,0 +1,163 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import React, { useState } from 'react'; +import { + EuiButtonEmpty, + EuiForm, + EuiModal, + EuiModalBody, + EuiModalFooter, + EuiModalHeader, + EuiModalHeaderTitle, + EuiOverlayMask, + EuiFormRow, + EuiFieldText, + EuiButton, +} from '@elastic/eui'; + +/* + * "CustomInputModalProps" component is used to create a modal with an input filed + * + * Props taken in as params are: + * runModal - function to fetch input field value and trigger closing modal + * closeModal - function to trigger closing modal + * titletxt - string as header for title of modal + * labelTxt - string as header for input field + * btn1txt - string as content to fill "close button" + * btn2txt - string as content to fill "confirm button" + * openPanelName - Default input value for the field + * helpText - string help for the input field + * optionalArgs - Arguments needed to pass them to runModal function + */ + +interface CustomInputModalProps { + runModal: + | ((value: string, value2: string, value3: string, value4: string) => void) + | ((value: string) => void); + closeModal: ( + event?: React.KeyboardEvent | React.MouseEvent + ) => void; + labelTxt: string; + titletxt: string; + btn1txt: string; + btn2txt: string; + openPanelName?: string; + helpText?: string; + optionalArgs?: string[]; +} + +export const CustomInputModal = (props: CustomInputModalProps) => { + const { + runModal, + closeModal, + labelTxt, + titletxt, + btn1txt, + btn2txt, + openPanelName, + helpText, + optionalArgs, + } = props; + const [value, setValue] = useState(openPanelName || ''); // sets input value + + const onChange = (e: React.ChangeEvent) => { + setValue(e.target.value); + }; + + return ( + + + + {titletxt} + + + + + onChange(e)} + /> + + + + + + + onChange(e)} + /> + + + + + + + + onChange(e)} + /> + + + + + + {btn1txt} + {optionalArgs === undefined ? ( + runModal(value)} fill> + {btn2txt} + + ) : ( + runModal(value, ...optionalArgs)} + fill + > + {btn2txt} + + )} + + + + ); +}; + +export const getAddIntegrationModal = ( + runModal: + | ((value: string, value2: string, value3: string, value4: string) => void) + | ((value: string) => void), + closeModal: ( + event?: React.KeyboardEvent | React.MouseEvent + ) => void, + labelTxt: string, + titletxt: string, + btn1txt: string, + btn2txt: string, + openPanelName?: string, + helpText?: string, + optionalArgs?: string[] +) => { + return ( + + ); +}; diff --git a/public/components/placeholder/components/available_integration_card_view.tsx b/public/components/placeholder/components/available_integration_card_view.tsx index d40e8b0a3f..ee152c6844 100644 --- a/public/components/placeholder/components/available_integration_card_view.tsx +++ b/public/components/placeholder/components/available_integration_card_view.tsx @@ -34,9 +34,6 @@ import { export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardViewProps) { const rowNumber = props.records / 5; - - const [isModalVisible, setIsModalVisible] = useState(false); - const [modalLayout, setModalLayout] = useState(); // console.log(rowNumber) // title={feature} @@ -52,21 +49,6 @@ export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardVi return optionalImg; }; - const getModal = () => { - setModalLayout( - getCustomModal( - () => {}, - () => {}, - 'Name', - 'Rename application', - 'Cancel', - 'Rename', - 'test' - ) - ); - setIsModalVisible(true); - }; - // const classes = classNames('homSynopsis__card', { // 'homSynopsis__card--noPanel': !wrapInPanel, // }); @@ -101,7 +83,7 @@ export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardVi { - getModal(); + props.showModal(); }} > Add @@ -114,7 +96,6 @@ export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardVi })} - {isModalVisible && modalLayout} ); }); diff --git a/public/components/placeholder/components/available_integration_overview_page.tsx b/public/components/placeholder/components/available_integration_overview_page.tsx index 6469a6c8ea..3ca22f4b24 100644 --- a/public/components/placeholder/components/available_integration_overview_page.tsx +++ b/public/components/placeholder/components/available_integration_overview_page.tsx @@ -4,7 +4,14 @@ */ /* eslint-disable react-hooks/exhaustive-deps */ -import { EuiFlexItem, EuiPage, EuiPageBody, EuiSpacer, EuiSwitch } from '@elastic/eui'; +import { + EuiFlexItem, + EuiOverlayMask, + EuiPage, + EuiPageBody, + EuiSpacer, + EuiSwitch, +} from '@elastic/eui'; import _ from 'lodash'; import React, { ReactElement, useEffect, useState } from 'react'; import { AppAnalyticsComponentDeps } from '../home'; @@ -14,6 +21,7 @@ import { AvailableIntegrationsTable } from './available_integration_table'; import { AddedIntegrationsTable } from './added_integration_table'; import { AvailableIntegrationsCardView } from './available_integration_card_view'; import { OBSERVABILITY_BASE } from '../../../../common/constants/shared'; +import { getAddIntegrationModal } from './add_integration_modal'; interface AppTableProps extends AppAnalyticsComponentDeps { loading: boolean; @@ -36,6 +44,7 @@ export interface AvailableIntegrationsTableProps { loading: boolean; data: AvailableIntegrationsList; records: number; + showModal: () => void; } export interface AvailableIntegrationsList { @@ -45,6 +54,7 @@ export interface AvailableIntegrationsList { export interface AvailableIntegrationsCardViewProps { data: AvailableIntegrationsList; records: number; + showModal: () => void; } export function AvailableIntegrationOverviewPage(props: AppTableProps) { @@ -53,6 +63,26 @@ export function AvailableIntegrationOverviewPage(props: AppTableProps) { const [isCardView, setCardView] = useState(true); const [data, setData] = useState({ data: [] }); + const [isModalVisible, setIsModalVisible] = useState(false); + const [modalLayout, setModalLayout] = useState(); + + const getModal = () => { + setModalLayout( + getAddIntegrationModal( + () => {}, + () => { + setIsModalVisible(false); + }, + 'Name', + 'Add Integration Options', + 'Cancel', + 'Create', + 'test' + ) + ); + setIsModalVisible(true); + }; + // const data: AvailableIntegrationType[] = [ // { // name: 'nginx', @@ -127,9 +157,10 @@ export function AvailableIntegrationOverviewPage(props: AppTableProps) { /> {isCardView - ? AvailableIntegrationsCardView({ data, records: 6 }) - : AvailableIntegrationsTable({ loading: false, data, records: 6 })} + ? AvailableIntegrationsCardView({ data, records: 6, showModal: getModal }) + : AvailableIntegrationsTable({ loading: false, data, records: 6, showModal: getModal })} + {isModalVisible && modalLayout} ); } diff --git a/public/components/placeholder/components/available_integration_table.tsx b/public/components/placeholder/components/available_integration_table.tsx index ad42d5057f..0fdd96a7c4 100644 --- a/public/components/placeholder/components/available_integration_table.tsx +++ b/public/components/placeholder/components/available_integration_table.tsx @@ -66,7 +66,7 @@ export function AvailableIntegrationsTable(props: AvailableIntegrationsTableProp {}} + onClick={() => props.showModal()} > Add diff --git a/public/components/placeholder/components/integration.tsx b/public/components/placeholder/components/integration.tsx index b28e92ce88..a919e60814 100644 --- a/public/components/placeholder/components/integration.tsx +++ b/public/components/placeholder/components/integration.tsx @@ -6,6 +6,7 @@ import { EuiHorizontalRule, + EuiOverlayMask, EuiPage, EuiPageBody, EuiPageContent, @@ -62,6 +63,7 @@ import { IntegrationOverview } from './integration_overview_panel'; import { IntegrationDetails } from './integration_details_panel'; import { IntegrationFields } from './integration_fields_panel'; import { IntegrationAssets } from './integration_assets_panel'; +import { getAddIntegrationModal } from './add_integration_modal'; const searchBarConfigs = { [TAB_EVENT_ID]: { @@ -123,6 +125,26 @@ export function Integration(props: AppDetailProps) { availability: { name: '', color: '', availabilityVisId: '' }, }); + const [isModalVisible, setIsModalVisible] = useState(false); + const [modalLayout, setModalLayout] = useState(); + + const getModal = () => { + setModalLayout( + getAddIntegrationModal( + () => {}, + () => { + setIsModalVisible(false); + }, + 'Name', + 'Add Integration Options', + 'Cancel', + 'Create', + 'test' + ) + ); + setIsModalVisible(true); + }; + useEffect(() => { chrome.setBreadcrumbs([ ...parentBreadcrumbs, @@ -149,6 +171,7 @@ export function Integration(props: AppDetailProps) { version: 2.0, contributer: { name: 'Joshua Li', link: 'https://github.com/joshuali925' }, status: 'available', + getModal, })} @@ -160,6 +183,7 @@ export function Integration(props: AppDetailProps) { + {isModalVisible && modalLayout} ); } diff --git a/public/components/placeholder/components/integration_overview_panel.tsx b/public/components/placeholder/components/integration_overview_panel.tsx index 0d0418344d..65e9db8b6c 100644 --- a/public/components/placeholder/components/integration_overview_panel.tsx +++ b/public/components/placeholder/components/integration_overview_panel.tsx @@ -26,6 +26,7 @@ export function IntegrationOverview(props: { category; contributer; license; + getModal: () => void; }) { return ( @@ -41,7 +42,14 @@ export function IntegrationOverview(props: { - Add + { + props.getModal(); + }} + > + Add + From b726616769d1dd329d68f28423e6c30a90c01d65 Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Thu, 23 Mar 2023 10:01:03 -0400 Subject: [PATCH 014/190] cleanup Signed-off-by: Derek Ho --- .../components/add_integration_modal.tsx | 27 ++++++++-- .../available_integration_card_view.tsx | 2 +- .../available_integration_overview_page.tsx | 54 ++++++++++++++++--- .../available_integration_table.tsx | 2 +- .../placeholder/components/integration.tsx | 51 ++++++++++++++++-- .../components/integration_overview_panel.tsx | 4 +- .../routes/placeholder/placeholder_router.ts | 39 ++++++++++++++ 7 files changed, 159 insertions(+), 20 deletions(-) diff --git a/public/components/placeholder/components/add_integration_modal.tsx b/public/components/placeholder/components/add_integration_modal.tsx index ef73d55d09..82a5d2f857 100644 --- a/public/components/placeholder/components/add_integration_modal.tsx +++ b/public/components/placeholder/components/add_integration_modal.tsx @@ -17,6 +17,7 @@ import { EuiFieldText, EuiButton, } from '@elastic/eui'; +import { string } from 'joi'; /* * "CustomInputModalProps" component is used to create a modal with an input filed @@ -41,6 +42,10 @@ interface CustomInputModalProps { event?: React.KeyboardEvent | React.MouseEvent ) => void; labelTxt: string; + label2txt: string; + label3txt: string; + defaultName: string; + defaultNamespace: string; titletxt: string; btn1txt: string; btn2txt: string; @@ -54,6 +59,10 @@ export const CustomInputModal = (props: CustomInputModalProps) => { runModal, closeModal, labelTxt, + label2txt, + label3txt, + defaultName, + defaultNamespace, titletxt, btn1txt, btn2txt, @@ -79,7 +88,7 @@ export const CustomInputModal = (props: CustomInputModalProps) => { onChange(e)} /> @@ -87,11 +96,11 @@ export const CustomInputModal = (props: CustomInputModalProps) => { - + onChange(e)} /> @@ -100,11 +109,11 @@ export const CustomInputModal = (props: CustomInputModalProps) => { - + onChange(e)} /> @@ -140,6 +149,10 @@ export const getAddIntegrationModal = ( event?: React.KeyboardEvent | React.MouseEvent ) => void, labelTxt: string, + label2Txt: string, + label3Txt: string, + defaultName: string, + defaultNamespace: string, titletxt: string, btn1txt: string, btn2txt: string, @@ -152,6 +165,10 @@ export const getAddIntegrationModal = ( runModal={runModal} closeModal={closeModal} labelTxt={labelTxt} + label2txt={label2Txt} + label3txt={label3Txt} + defaultName={defaultName} + defaultNamespace={defaultNamespace} titletxt={titletxt} btn1txt={btn1txt} btn2txt={btn2txt} diff --git a/public/components/placeholder/components/available_integration_card_view.tsx b/public/components/placeholder/components/available_integration_card_view.tsx index ee152c6844..bee5c30d6e 100644 --- a/public/components/placeholder/components/available_integration_card_view.tsx +++ b/public/components/placeholder/components/available_integration_card_view.tsx @@ -83,7 +83,7 @@ export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardVi { - props.showModal(); + props.showModal(i.templateName); }} > Add diff --git a/public/components/placeholder/components/available_integration_overview_page.tsx b/public/components/placeholder/components/available_integration_overview_page.tsx index 3ca22f4b24..66a5d79451 100644 --- a/public/components/placeholder/components/available_integration_overview_page.tsx +++ b/public/components/placeholder/components/available_integration_overview_page.tsx @@ -6,6 +6,8 @@ import { EuiFlexItem, + EuiGlobalToastList, + EuiLink, EuiOverlayMask, EuiPage, EuiPageBody, @@ -13,7 +15,8 @@ import { EuiSwitch, } from '@elastic/eui'; import _ from 'lodash'; -import React, { ReactElement, useEffect, useState } from 'react'; +import React, { ReactChild, ReactElement, useEffect, useState } from 'react'; +import { Toast } from '@elastic/eui/src/components/toast/global_toast_list'; import { AppAnalyticsComponentDeps } from '../home'; import { ApplicationType } from '../../../../common/types/application_analytics'; import { IntegrationHeader } from './integration_header'; @@ -44,7 +47,7 @@ export interface AvailableIntegrationsTableProps { loading: boolean; data: AvailableIntegrationsList; records: number; - showModal: () => void; + showModal: (input: string) => void; } export interface AvailableIntegrationsList { @@ -54,29 +57,37 @@ export interface AvailableIntegrationsList { export interface AvailableIntegrationsCardViewProps { data: AvailableIntegrationsList; records: number; - showModal: () => void; + showModal: (input: string) => void; } export function AvailableIntegrationOverviewPage(props: AppTableProps) { const { chrome, parentBreadcrumbs, http } = props; const [isCardView, setCardView] = useState(true); + const [toasts, setToasts] = useState([]); const [data, setData] = useState({ data: [] }); const [isModalVisible, setIsModalVisible] = useState(false); const [modalLayout, setModalLayout] = useState(); - const getModal = () => { + const getModal = (name: string) => { setModalLayout( getAddIntegrationModal( - () => {}, + () => { + addIntegrationRequest(name); + setIsModalVisible(false); + }, () => { setIsModalVisible(false); }, 'Name', + 'Namespace', + 'Tags (optional)', + name, + 'prod', 'Add Integration Options', 'Cancel', - 'Create', + 'Add', 'test' ) ); @@ -143,8 +154,39 @@ export function AvailableIntegrationOverviewPage(props: AppTableProps) { http.get(`${OBSERVABILITY_BASE}/repository`).then((exists) => setData(exists)); } + const setToast = (title: string, color = 'success', text?: ReactChild) => { + if (!text) text = ''; + setToasts([...toasts, { id: new Date().toISOString(), title, text, color } as Toast]); + }; + + async function addIntegrationRequest(name: string) { + http + .post(`${OBSERVABILITY_BASE}/store`) + .then((res) => { + setToast( + `${name} integration successfully added!`, + 'success', + `View the added assets from ${name} in the Added Integrations list` + ); + }) + .catch((err) => + setToast( + 'Please ask your administrator to enable Operational Panels for you.', + 'danger', + Documentation + ) + ); + } + return ( + { + setToasts(toasts.filter((toast) => toast.id !== removedToast.id)); + }} + toastLifeTimeMs={6000} + /> {IntegrationHeader()} diff --git a/public/components/placeholder/components/available_integration_table.tsx b/public/components/placeholder/components/available_integration_table.tsx index 0fdd96a7c4..abaedfcc0d 100644 --- a/public/components/placeholder/components/available_integration_table.tsx +++ b/public/components/placeholder/components/available_integration_table.tsx @@ -66,7 +66,7 @@ export function AvailableIntegrationsTable(props: AvailableIntegrationsTableProp props.showModal()} + onClick={() => props.showModal(record.templateName)} > Add diff --git a/public/components/placeholder/components/integration.tsx b/public/components/placeholder/components/integration.tsx index a919e60814..9329258fef 100644 --- a/public/components/placeholder/components/integration.tsx +++ b/public/components/placeholder/components/integration.tsx @@ -5,7 +5,9 @@ /* eslint-disable react-hooks/exhaustive-deps */ import { + EuiGlobalToastList, EuiHorizontalRule, + EuiLink, EuiOverlayMask, EuiPage, EuiPageBody, @@ -29,6 +31,7 @@ import { useHistory } from 'react-router-dom'; import { useDispatch } from 'react-redux'; import { last } from 'lodash'; import { VisualizationType } from 'common/types/custom_panels'; +import { Toast } from '@elastic/eui/src/components/toast/global_toast_list'; import { TracesContent } from '../../trace_analytics/components/traces/traces_content'; import { DashboardContent } from '../../trace_analytics/components/dashboard/dashboard_content'; import { ServicesContent } from '../../trace_analytics/components/services/services_content'; @@ -64,6 +67,7 @@ import { IntegrationDetails } from './integration_details_panel'; import { IntegrationFields } from './integration_fields_panel'; import { IntegrationAssets } from './integration_assets_panel'; import { getAddIntegrationModal } from './add_integration_modal'; +import { OBSERVABILITY_BASE } from '../../../../common/constants/shared'; const searchBarConfigs = { [TAB_EVENT_ID]: { @@ -86,7 +90,6 @@ interface AppDetailProps extends AppAnalyticsComponentDeps { notifications: NotificationsStart; queryManager: QueryManager; updateApp: (appId: string, updateAppData: Partial, type: string) => void; - setToasts: (title: string, color?: string, text?: ReactChild) => void; callback: (childfunction: () => void) => void; } @@ -106,7 +109,6 @@ export function Integration(props: AppDetailProps) { appConfigs, updateApp, setAppConfigs, - setToasts, setFilters, callback, queryManager, @@ -127,18 +129,26 @@ export function Integration(props: AppDetailProps) { const [isModalVisible, setIsModalVisible] = useState(false); const [modalLayout, setModalLayout] = useState(); + const [toasts, setToasts] = useState([]); - const getModal = () => { + const getModal = (name: string) => { setModalLayout( getAddIntegrationModal( - () => {}, + () => { + addIntegrationRequest(name); + setIsModalVisible(false); + }, () => { setIsModalVisible(false); }, 'Name', + 'Namespace', + 'Tags (optional)', + name, + 'prod', 'Add Integration Options', 'Cancel', - 'Create', + 'Add', 'test' ) ); @@ -159,8 +169,39 @@ export function Integration(props: AppDetailProps) { ]); }, [appId]); + const setToast = (title: string, color = 'success', text?: ReactChild) => { + if (!text) text = ''; + setToasts([...toasts, { id: new Date().toISOString(), title, text, color } as Toast]); + }; + + async function addIntegrationRequest(name: string) { + http + .post(`${OBSERVABILITY_BASE}/store`) + .then((res) => { + setToast( + `${name} integration successfully added!`, + 'success', + `View the added assets from ${name} in the Added Integrations list` + ); + }) + .catch((err) => + setToast( + 'Please ask your administrator to enable Operational Panels for you.', + 'danger', + Documentation + ) + ); + } + return ( + { + setToasts(toasts.filter((toast) => toast.id !== removedToast.id)); + }} + toastLifeTimeMs={6000} + /> {IntegrationOverview({ diff --git a/public/components/placeholder/components/integration_overview_panel.tsx b/public/components/placeholder/components/integration_overview_panel.tsx index 65e9db8b6c..d94468426c 100644 --- a/public/components/placeholder/components/integration_overview_panel.tsx +++ b/public/components/placeholder/components/integration_overview_panel.tsx @@ -26,7 +26,7 @@ export function IntegrationOverview(props: { category; contributer; license; - getModal: () => void; + getModal: (input: string) => void; }) { return ( @@ -45,7 +45,7 @@ export function IntegrationOverview(props: { { - props.getModal(); + props.getModal(props.appId); }} > Add diff --git a/server/routes/placeholder/placeholder_router.ts b/server/routes/placeholder/placeholder_router.ts index c26cc67eb8..34a2eb0b21 100644 --- a/server/routes/placeholder/placeholder_router.ts +++ b/server/routes/placeholder/placeholder_router.ts @@ -88,6 +88,45 @@ export function registerPlaceholderRoute(router: IRouter) { } } ); + + router.post( + { + path: `${OBSERVABILITY_BASE}/store`, + validate: false, + }, + async (context, request, response): Promise => { + try { + const random = await fetch('http://127.0.0.1:4010/store', { + method: 'POST', // *GET, POST, PUT, DELETE, etc. + // // mode: "cors", // no-cors, *cors, same-origin + // // cache: "no-cache", // *default, no-cache, reload, force-cache, only-if-cached + // // credentials: "same-origin", // include, *same-origin, omit + headers: { + 'Content-Type': 'application/json', + // 'Content-Type': 'application/x-www-form-urlencoded', + }, + // // redirect: "follow", // manual, *follow, error + // // referrerPolicy: "no-referrer", // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url + body: '{"limit": "5"}', // body data type must match "Content-Type" header + }); + return response.ok(); + // const metrics = getMetrics(); + // return response.ok({ + // body: metrics, + // }); + } catch (error) { + return response.custom({ + statusCode: error.statusCode || 500, + body: error.message, + }); + // console.error(error); + // return response.custom({ + // statusCode: error.statusCode || 500, + // body: error.message, + // }); + } + } + ); // router.get( // { // path: `${OBSERVABILITY_BASE}/repository`, From 05ab45adbf9495a162f6e96ac4aa6381ebc01889 Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Thu, 23 Mar 2023 12:12:19 -0400 Subject: [PATCH 015/190] almost done with POC Signed-off-by: Derek Ho --- .../components/added_integration_table.tsx | 7 +++- .../available_integration_overview_page.tsx | 3 +- .../placeholder/components/integration.tsx | 26 ++++++------- .../components/integration_assets_panel.tsx | 4 +- .../components/integration_details_panel.tsx | 30 +++++++++++++- .../components/integration_fields_panel.tsx | 4 +- .../components/integration_overview_panel.tsx | 33 +++++++--------- .../routes/placeholder/placeholder_router.ts | 39 +++++++++++++++++++ 8 files changed, 101 insertions(+), 45 deletions(-) diff --git a/public/components/placeholder/components/added_integration_table.tsx b/public/components/placeholder/components/added_integration_table.tsx index 3c63289046..0e2b824517 100644 --- a/public/components/placeholder/components/added_integration_table.tsx +++ b/public/components/placeholder/components/added_integration_table.tsx @@ -41,9 +41,12 @@ export function AddedIntegrationsTable(props: AddedIntegrationsTableProps) { sortable: true, truncateText: true, render: (value, record) => ( - + {_.truncate(record.templateName, { length: 100 })} - + ), }, { diff --git a/public/components/placeholder/components/available_integration_overview_page.tsx b/public/components/placeholder/components/available_integration_overview_page.tsx index 66a5d79451..911f5e62f3 100644 --- a/public/components/placeholder/components/available_integration_overview_page.tsx +++ b/public/components/placeholder/components/available_integration_overview_page.tsx @@ -171,9 +171,8 @@ export function AvailableIntegrationOverviewPage(props: AppTableProps) { }) .catch((err) => setToast( - 'Please ask your administrator to enable Operational Panels for you.', + 'Failed to load integration. Check Added Integrations table for more details', 'danger', - Documentation ) ); } diff --git a/public/components/placeholder/components/integration.tsx b/public/components/placeholder/components/integration.tsx index 9329258fef..f72f2c30f5 100644 --- a/public/components/placeholder/components/integration.tsx +++ b/public/components/placeholder/components/integration.tsx @@ -130,6 +130,7 @@ export function Integration(props: AppDetailProps) { const [isModalVisible, setIsModalVisible] = useState(false); const [modalLayout, setModalLayout] = useState(); const [toasts, setToasts] = useState([]); + const [data, setData] = useState({ data: {} }); const getModal = (name: string) => { setModalLayout( @@ -167,8 +168,13 @@ export function Integration(props: AppDetailProps) { href: `${last(parentBreadcrumbs)!.href}placeholder/${appId}`, }, ]); + handleDataRequest(); }, [appId]); + async function handleDataRequest() { + http.get(`${OBSERVABILITY_BASE}/repository/id`).then((exists) => setData(exists)); + } + const setToast = (title: string, color = 'success', text?: ReactChild) => { if (!text) text = ''; setToasts([...toasts, { id: new Date().toISOString(), title, text, color } as Toast]); @@ -186,9 +192,8 @@ export function Integration(props: AppDetailProps) { }) .catch((err) => setToast( - 'Please ask your administrator to enable Operational Panels for you.', + 'Failed to load integration. Check Added Integrations table for more details', 'danger', - Documentation ) ); } @@ -204,23 +209,14 @@ export function Integration(props: AppDetailProps) { /> - {IntegrationOverview({ - appId, - link: 'https://www.nginx.com/', - license: 'Apache 2.0', - category: 'web, http', - version: 2.0, - contributer: { name: 'Joshua Li', link: 'https://github.com/joshuali925' }, - status: 'available', - getModal, - })} + {IntegrationOverview({data, getModal})} - {IntegrationDetails({ appId })} + {IntegrationDetails({ data })} - {IntegrationAssets({ appId })} + {IntegrationAssets({ data })} - {IntegrationFields({ appId })} + {IntegrationFields({ data })} diff --git a/public/components/placeholder/components/integration_assets_panel.tsx b/public/components/placeholder/components/integration_assets_panel.tsx index e6bf1dd05d..002d620289 100644 --- a/public/components/placeholder/components/integration_assets_panel.tsx +++ b/public/components/placeholder/components/integration_assets_panel.tsx @@ -2,10 +2,10 @@ import { EuiPanel } from '@elastic/eui'; import React from 'react'; import { PanelTitle } from '../../../../public/components/trace_analytics/components/common/helper_functions'; -export function IntegrationAssets(props: { appId }) { +export function IntegrationAssets(props: any) { return ( - + ); } diff --git a/public/components/placeholder/components/integration_details_panel.tsx b/public/components/placeholder/components/integration_details_panel.tsx index 9fe3f15f7d..1af9db80e9 100644 --- a/public/components/placeholder/components/integration_details_panel.tsx +++ b/public/components/placeholder/components/integration_details_panel.tsx @@ -14,10 +14,36 @@ import { import React from 'react'; import { PanelTitle } from '../../../../public/components/trace_analytics/components/common/helper_functions'; -export function IntegrationDetails(props: { appId }) { +export function IntegrationDetails(props: any) { + let screenshots = undefined; + if (props.data.data.screenshotUrls) { + screenshots = Object.values(props.data.data.screenshotUrls) + } + + + return ( - + + + + NginX [pronounced "Engine X"] is an HTTP and reverse proxy server that emphasizes high concurrency, performance, and low memory usage. Nginx can also act as a mail proxy server and a generic TCP proxy server. Nginx is available as open source and in a commercial version (NginX Plus). +As Nginx is a high-speed, lightweight HTTP server engine, more and more web sites and applications are moving to Nginx. According to W3Techs, over 25 percent of all known web servers use Nginx. The performance improvements for serving static content can be significant. Especially at high loads, Nginx is faster than other solutions and consumes less server resources. + + + + + + {screenshots?.map((i, v) => { + return ( + + + + ); + })} + + + ); } diff --git a/public/components/placeholder/components/integration_fields_panel.tsx b/public/components/placeholder/components/integration_fields_panel.tsx index 6ff5d67f82..2e0d5b41e7 100644 --- a/public/components/placeholder/components/integration_fields_panel.tsx +++ b/public/components/placeholder/components/integration_fields_panel.tsx @@ -2,10 +2,10 @@ import { EuiPanel } from '@elastic/eui'; import React from 'react'; import { PanelTitle } from '../../../../public/components/trace_analytics/components/common/helper_functions'; -export function IntegrationFields(props: { appId }) { +export function IntegrationFields(props: any) { return ( - + ); } diff --git a/public/components/placeholder/components/integration_overview_panel.tsx b/public/components/placeholder/components/integration_overview_panel.tsx index d94468426c..be8c0411b1 100644 --- a/public/components/placeholder/components/integration_overview_panel.tsx +++ b/public/components/placeholder/components/integration_overview_panel.tsx @@ -18,26 +18,19 @@ const pageStyles: CSS.Properties = { width: '80%', }; -export function IntegrationOverview(props: { - appId; - link; - status; - version; - category; - contributer; - license; - getModal: (input: string) => void; -}) { +export function IntegrationOverview(props: any) { + const {data} = props; return ( - React Logo + React Logo + - - {props.appId} + + {data.data.templateName} @@ -45,7 +38,7 @@ export function IntegrationOverview(props: { { - props.getModal(props.appId); + props.getModal(data.data.templateName); }} > Add @@ -60,29 +53,29 @@ export function IntegrationOverview(props: {

Status

- {props.status} + {data.data.status}

Version

- {props.version} + {data.data.version?.resource}

Category

- {props.category} + {data.data.components?.join(', ')}

Contributer

- - {props.contributer.name} + + {data.data.contributer?.name}
@@ -90,7 +83,7 @@ export function IntegrationOverview(props: {

License

- {props.license} + {data.data.license}
diff --git a/server/routes/placeholder/placeholder_router.ts b/server/routes/placeholder/placeholder_router.ts index 34a2eb0b21..a77970c2e0 100644 --- a/server/routes/placeholder/placeholder_router.ts +++ b/server/routes/placeholder/placeholder_router.ts @@ -50,6 +50,45 @@ export function registerPlaceholderRoute(router: IRouter) { } ); + router.get( + { + path: `${OBSERVABILITY_BASE}/repository/id`, + validate: false, + }, + async (context, request, response): Promise => { + try { + const random = await fetch('http://127.0.0.1:4010/repository/id', { + // method: "GET", // *GET, POST, PUT, DELETE, etc. + // mode: "cors", // no-cors, *cors, same-origin + // cache: "no-cache", // *default, no-cache, reload, force-cache, only-if-cached + // credentials: "same-origin", // include, *same-origin, omit + // headers: { + // "Content-Type": "application/json", + // // 'Content-Type': 'application/x-www-form-urlencoded', + // }, + // redirect: "follow", // manual, *follow, error + // referrerPolicy: "no-referrer", // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url + // // body: '{limit: 3}', // body data type must match "Content-Type" header + }); + return response.ok({ + body: { + data: await random.json(), + }, + }); + // const metrics = getMetrics(); + // return response.ok({ + // body: metrics, + // }); + } catch (error) { + // console.error(error); + // return response.custom({ + // statusCode: error.statusCode || 500, + // body: error.message, + // }); + } + } + ); + router.get( { path: `${OBSERVABILITY_BASE}/store`, From ccfefd93a77ae95a882d909cb88f7f5de488ca51 Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Thu, 23 Mar 2023 13:38:54 -0400 Subject: [PATCH 016/190] cleanup Signed-off-by: Derek Ho --- .../placeholder/components/integration.tsx | 2 - .../components/integration_assets_panel.tsx | 67 +++++++++++++++- .../components/integration_details_panel.tsx | 2 +- .../components/integration_fields_panel.tsx | 79 ++++++++++++++++++- 4 files changed, 144 insertions(+), 6 deletions(-) diff --git a/public/components/placeholder/components/integration.tsx b/public/components/placeholder/components/integration.tsx index f72f2c30f5..30f47d2fc9 100644 --- a/public/components/placeholder/components/integration.tsx +++ b/public/components/placeholder/components/integration.tsx @@ -211,14 +211,12 @@ export function Integration(props: AppDetailProps) { {IntegrationOverview({data, getModal})} - {IntegrationDetails({ data })} {IntegrationAssets({ data })} {IntegrationFields({ data })} -
{isModalVisible && modalLayout}
diff --git a/public/components/placeholder/components/integration_assets_panel.tsx b/public/components/placeholder/components/integration_assets_panel.tsx index 002d620289..f75d7ad4b1 100644 --- a/public/components/placeholder/components/integration_assets_panel.tsx +++ b/public/components/placeholder/components/integration_assets_panel.tsx @@ -1,11 +1,76 @@ -import { EuiPanel } from '@elastic/eui'; +import { EuiInMemoryTable, EuiLink, EuiPanel, EuiSpacer, EuiTableFieldDataColumnType, EuiText } from '@elastic/eui'; +import { FILTER_OPTIONS } from '../../../../common/constants/explorer'; import React from 'react'; import { PanelTitle } from '../../../../public/components/trace_analytics/components/common/helper_functions'; +import _ from 'lodash'; export function IntegrationAssets(props: any) { + + const data = props.data.data.assets || [] + + const search = { + box: { + incremental: true, + }, + filters: [ + { + type: 'field_value_selection', + field: 'type', + name: 'Type', + multiSelect: false, + options: FILTER_OPTIONS.map((i) => ({ + value: i, + name: i, + view: i, + })), + }, + ], + }; + + const tableColumns = [ + { + field: 'name', + name: 'Name', + sortable: true, + truncateText: true, + render: (value, record) => ( + + {_.truncate(record.name, { length: 100 })} + + ), + }, + { + field: 'type', + name: 'Type', + sortable: true, + truncateText: true, + render: (value, record) => ( + + {_.truncate(record.type, { length: 100 })} + + ), + }, + ] as Array>; + + + return ( + + ); } diff --git a/public/components/placeholder/components/integration_details_panel.tsx b/public/components/placeholder/components/integration_details_panel.tsx index 1af9db80e9..727b96aac7 100644 --- a/public/components/placeholder/components/integration_details_panel.tsx +++ b/public/components/placeholder/components/integration_details_panel.tsx @@ -37,7 +37,7 @@ As Nginx is a high-speed, lightweight HTTP server engine, more and more web site {screenshots?.map((i, v) => { return ( - + ); })} diff --git a/public/components/placeholder/components/integration_fields_panel.tsx b/public/components/placeholder/components/integration_fields_panel.tsx index 2e0d5b41e7..be6bae8a0f 100644 --- a/public/components/placeholder/components/integration_fields_panel.tsx +++ b/public/components/placeholder/components/integration_fields_panel.tsx @@ -1,11 +1,86 @@ -import { EuiPanel } from '@elastic/eui'; +import { EuiInMemoryTable, EuiPanel, EuiSpacer, EuiTableFieldDataColumnType, EuiText } from '@elastic/eui'; +import { FILTER_OPTIONS } from '../../../../common/constants/explorer'; import React from 'react'; import { PanelTitle } from '../../../../public/components/trace_analytics/components/common/helper_functions'; +import _ from 'lodash'; export function IntegrationFields(props: any) { + const data = props.data.data.fields || [] + + const search = { + box: { + incremental: true, + }, + filters: [ + { + type: 'field_value_selection', + field: 'type', + name: 'Type', + multiSelect: false, + options: FILTER_OPTIONS.map((i) => ({ + value: i, + name: i, + view: i, + })), + }, + ], + }; + + const tableColumns = [ + { + field: 'name', + name: 'Name', + sortable: true, + truncateText: true, + render: (value, record) => ( + + {_.truncate(record.name, { length: 100 })} + + ), + }, + { + field: 'type', + name: 'Type', + sortable: true, + truncateText: true, + render: (value, record) => ( + + {_.truncate(record.type, { length: 100 })} + + ), + }, + { + field: 'category', + name: 'Category', + sortable: true, + truncateText: true, + render: (value, record) => ( + + {_.truncate(record.category, { length: 100 })} + + ), + }, + ] as Array>; + + + return ( - + + + ); } From 81a6e5e6625dc01c2434400d145478db6d59b1e6 Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Fri, 24 Mar 2023 10:29:06 -0400 Subject: [PATCH 017/190] fix formatting for cards Signed-off-by: Derek Ho --- .../available_integration_card_view.tsx | 95 ++++++++++--------- 1 file changed, 48 insertions(+), 47 deletions(-) diff --git a/public/components/placeholder/components/available_integration_card_view.tsx b/public/components/placeholder/components/available_integration_card_view.tsx index bee5c30d6e..fb4fceaf9e 100644 --- a/public/components/placeholder/components/available_integration_card_view.tsx +++ b/public/components/placeholder/components/available_integration_card_view.tsx @@ -33,7 +33,7 @@ import { } from './available_integration_overview_page'; export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardViewProps) { - const rowNumber = props.records / 5; + const rowNumber = _.ceil(props.records / 5); // console.log(rowNumber) // title={feature} @@ -44,7 +44,9 @@ export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardVi const getImage = (url?: string) => { let optionalImg; if (url) { - optionalImg = ; + optionalImg = ( + + ); } return optionalImg; }; @@ -54,51 +56,50 @@ export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardVi // }); const renderRows = (integrations: AvailableIntegrationType[]) => { - return _.times(rowNumber).map(() => { - return ( - <> - - {integrations.map((i, v) => { - return ( - - - { - window.location.assign(`#/placeholder/${i.templateName}`); - }} - > - View Details - - - { - props.showModal(i.templateName); - }} - > - Add - - - } - /> - - ); - })} - - - - ); - }); + return ( + <> + + {integrations.map((i, v) => { + return ( + + + { + window.location.assign(`#/placeholder/${i.templateName}`); + }} + > + View Details + + + { + props.showModal(i.templateName); + }} + size="s" + > + Add + + + } + /> + + ); + })} + + + + ); }; return <>{renderRows(props.data.data)}; From ed08cba150ce12587082a3a667e3b8c24b1aa0ea Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Tue, 28 Mar 2023 15:26:33 -0400 Subject: [PATCH 018/190] final fix up Signed-off-by: Derek Ho --- .../placeholder/components/available_integration_card_view.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/components/placeholder/components/available_integration_card_view.tsx b/public/components/placeholder/components/available_integration_card_view.tsx index fb4fceaf9e..f6a3f13cab 100644 --- a/public/components/placeholder/components/available_integration_card_view.tsx +++ b/public/components/placeholder/components/available_integration_card_view.tsx @@ -61,7 +61,7 @@ export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardVi {integrations.map((i, v) => { return ( - + Date: Tue, 4 Apr 2023 13:22:34 -0400 Subject: [PATCH 019/190] added integration specific page Signed-off-by: Derek Ho --- .../components/add_integration_modal.tsx | 2 + .../components/added_integration.tsx | 463 ++++++++++++++++++ .../added_integration_overview_page.tsx | 6 +- .../components/added_integration_table.tsx | 2 +- .../available_integration_card_view.tsx | 2 +- .../available_integration_table.tsx | 2 +- public/components/placeholder/home.tsx | 27 +- .../routes/placeholder/placeholder_router.ts | 39 ++ 8 files changed, 538 insertions(+), 5 deletions(-) create mode 100644 public/components/placeholder/components/added_integration.tsx diff --git a/public/components/placeholder/components/add_integration_modal.tsx b/public/components/placeholder/components/add_integration_modal.tsx index 82a5d2f857..34b64162a8 100644 --- a/public/components/placeholder/components/add_integration_modal.tsx +++ b/public/components/placeholder/components/add_integration_modal.tsx @@ -178,3 +178,5 @@ export const getAddIntegrationModal = ( /> ); }; + + diff --git a/public/components/placeholder/components/added_integration.tsx b/public/components/placeholder/components/added_integration.tsx new file mode 100644 index 0000000000..9f32bd697b --- /dev/null +++ b/public/components/placeholder/components/added_integration.tsx @@ -0,0 +1,463 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ +/* eslint-disable react-hooks/exhaustive-deps */ + +import { + EuiButton, + EuiFlexGroup, + EuiFlexItem, + EuiGlobalToastList, + EuiHorizontalRule, + EuiIcon, + EuiInMemoryTable, + EuiLink, + EuiOverlayMask, + EuiPage, + EuiPageBody, + EuiPageContent, + EuiPageContentHeaderSection, + EuiPageHeader, + EuiPageHeaderSection, + EuiPanel, + EuiSelectOption, + EuiSpacer, + EuiTabbedContent, + EuiTabbedContentTab, + EuiTableFieldDataColumnType, + EuiText, + EuiTitle, + } from '@elastic/eui'; + import DSLService from 'public/services/requests/dsl'; + import PPLService from 'public/services/requests/ppl'; + import SavedObjects from 'public/services/saved_objects/event_analytics/saved_objects'; + import TimestampUtils from 'public/services/timestamp/timestamp'; + import React, { ReactChild, useEffect, useState } from 'react'; + import { useHistory } from 'react-router-dom'; + import { useDispatch } from 'react-redux'; + import { last } from 'lodash'; + import { VisualizationType } from 'common/types/custom_panels'; + import { Toast } from '@elastic/eui/src/components/toast/global_toast_list'; + import { TracesContent } from '../../trace_analytics/components/traces/traces_content'; + import { DashboardContent } from '../../trace_analytics/components/dashboard/dashboard_content'; + import { ServicesContent } from '../../trace_analytics/components/services/services_content'; + import { filtersToDsl, PanelTitle } from '../../trace_analytics/components/common/helper_functions'; + import { SpanDetailTable } from '../../trace_analytics/components/traces/span_detail_table'; + import { Explorer } from '../../event_analytics/explorer/explorer'; + // import { Configuration } from './configuration'; + import { + TAB_CONFIG_ID, + TAB_CONFIG_TITLE, + TAB_LOG_ID, + TAB_LOG_TITLE, + TAB_OVERVIEW_ID, + TAB_OVERVIEW_TITLE, + TAB_PANEL_ID, + TAB_PANEL_TITLE, + TAB_SERVICE_ID, + TAB_SERVICE_TITLE, + TAB_TRACE_ID, + TAB_TRACE_TITLE, + } from '../../../../common/constants/application_analytics'; + import { TAB_EVENT_ID, TAB_CHART_ID, NEW_TAB, FILTER_OPTIONS } from '../../../../common/constants/explorer'; + import { IQueryTab } from '../../../../common/types/explorer'; + import { NotificationsStart } from '../../../../../../src/core/public'; + import { AppAnalyticsComponentDeps } from '../home'; + import { + ApplicationRequestType, + ApplicationType, + } from '../../../../common/types/application_analytics'; + import { QueryManager } from '../../../../common/query_manager/ppl_query_manager'; + import { IntegrationOverview } from './integration_overview_panel'; + import { IntegrationDetails } from './integration_details_panel'; + import { IntegrationFields } from './integration_fields_panel'; + import { IntegrationAssets } from './integration_assets_panel'; + import { getAddIntegrationModal } from './add_integration_modal'; + import { OBSERVABILITY_BASE } from '../../../../common/constants/shared'; +import _ from 'lodash'; +import { DeleteModal } from '../../../../public/components/common/helpers/delete_modal'; + + const searchBarConfigs = { + [TAB_EVENT_ID]: { + showSaveButton: false, + showSavePanelOptionsList: false, + }, + [TAB_CHART_ID]: { + showSaveButton: true, + showSavePanelOptionsList: false, + }, + }; + + interface AppDetailProps extends AppAnalyticsComponentDeps { + disabled?: boolean; + appId: string; + pplService: PPLService; + dslService: DSLService; + savedObjects: SavedObjects; + timestampUtils: TimestampUtils; + notifications: NotificationsStart; + queryManager: QueryManager; + updateApp: (appId: string, updateAppData: Partial, type: string) => void; + callback: (childfunction: () => void) => void; + } + + export function AddedIntegration(props: AppDetailProps) { + const { + pplService, + dslService, + timestampUtils, + savedObjects, + http, + notifications, + appId, + chrome, + parentBreadcrumbs, + query, + filters, + appConfigs, + updateApp, + setAppConfigs, + setFilters, + callback, + queryManager, + mode, + } = props; + const [application, setApplication] = useState({ + id: '', + dateCreated: '', + dateModified: '', + name: '', + description: '', + baseQuery: '', + servicesEntities: [], + traceGroups: [], + panelId: '', + availability: { name: '', color: '', availabilityVisId: '' }, + }); + + const [toasts, setToasts] = useState([]); + const [data, setData] = useState({ data: {} }); + + useEffect(() => { + chrome.setBreadcrumbs([ + ...parentBreadcrumbs, + { + text: 'Placeholder', + href: '#/placeholder', + }, + { + text: 'Added Integration', + href: '#/placeholder/added' + }, + { + text: appId, + href: `${last(parentBreadcrumbs)!.href}placeholder/added/${appId}`, + }, + ]); + handleDataRequest(); + }, [appId]); + + const [isModalVisible, setIsModalVisible] = useState(false); + const [modalLayout, setModalLayout] = useState(); + + const getModal = () => { + setModalLayout( + {setIsModalVisible(false)}} + onCancel={() => {setIsModalVisible(false)}} + title={`Delete Assets`} + message={`Are you sure you want to delete the selected asset(s)?`} + /> + ) + setIsModalVisible(true); + }; + + + async function handleDataRequest() { + http.get(`${OBSERVABILITY_BASE}/store/id`).then((exists) => setData(exists)); + } + + const setToast = (title: string, color = 'success', text?: ReactChild) => { + if (!text) text = ''; + setToasts([...toasts, { id: new Date().toISOString(), title, text, color } as Toast]); + }; + + async function addIntegrationRequest(name: string) { + http + .post(`${OBSERVABILITY_BASE}/store`) + .then((res) => { + setToast( + `${name} integration successfully added!`, + 'success', + `View the added assets from ${name} in the Added Integrations list` + ); + }) + .catch((err) => + setToast( + 'Failed to load integration. Check Added Integrations table for more details', + 'danger', + ) + ); + } + + function AddedOverview(props: any) { + const {data} = props; + + return ( + + + + + + + + + {data.data.id} + + + + + { + getModal(); + }} + > + Delete + + + + + + + + +

Template

+
+ + + {data.data.templateName} + +
+ + +

Date Added

+
+ + {data.data.creationDate?.split('T')[0]} +
+ + +

Status

+
+ + {data.data.status} +
+ + +

Added By

+
+ + + {data.data.author} + +
+ + +

Tags

+
+ + {data.data.license} +
+
+
+
+ ); + } + + function AddedAssets(props: any) { + + const data = props.data.data.assets || [] + + const search = { + box: { + incremental: true, + }, + filters: [ + { + type: 'field_value_selection', + field: 'type', + name: 'Type', + multiSelect: false, + options: FILTER_OPTIONS.map((i) => ({ + value: i, + name: i, + view: i, + })), + }, + ], + }; + + const tableColumns = [ + { + field: 'name', + name: 'Name', + sortable: true, + truncateText: true, + render: (value, record) => ( + + {_.truncate(record.name, { length: 100 })} + + ), + }, + { + field: 'type', + name: 'Type', + sortable: true, + truncateText: true, + render: (value, record) => ( + + {_.truncate(record.type, { length: 100 })} + + ), + }, + { + field: 'actions', + name: 'Actions', + sortable: true, + truncateText: true, + render: (value, record) => ( + {getModal()}}/> + ), + }, + ] as Array>; + + + + return ( + + + + + + ); + } + + function AddedIntegrationFields(props: any) { + const data = props.data.data.fields || [] + + const search = { + box: { + incremental: true, + }, + filters: [ + { + type: 'field_value_selection', + field: 'type', + name: 'Type', + multiSelect: false, + options: FILTER_OPTIONS.map((i) => ({ + value: i, + name: i, + view: i, + })), + }, + ], + }; + + const tableColumns = [ + { + field: 'name', + name: 'Name', + sortable: true, + truncateText: true, + render: (value, record) => ( + + {_.truncate(record.name, { length: 100 })} + + ), + }, + { + field: 'type', + name: 'Type', + sortable: true, + truncateText: true, + render: (value, record) => ( + + {_.truncate(record.type, { length: 100 })} + + ), + }, + { + field: 'category', + name: 'Category', + sortable: true, + truncateText: true, + render: (value, record) => ( + + {_.truncate(record.category, { length: 100 })} + + ), + }, + ] as Array>; + + + + return ( + + + + + + ); + } + + + return ( + + { + setToasts(toasts.filter((toast) => toast.id !== removedToast.id)); + }} + toastLifeTimeMs={6000} + /> + + + {AddedOverview({data})} + + {AddedAssets({ data })} + + {AddedIntegrationFields({ data })} + + + {isModalVisible && modalLayout} + + ); + } + \ No newline at end of file diff --git a/public/components/placeholder/components/added_integration_overview_page.tsx b/public/components/placeholder/components/added_integration_overview_page.tsx index fa4f038a61..335fb3750d 100644 --- a/public/components/placeholder/components/added_integration_overview_page.tsx +++ b/public/components/placeholder/components/added_integration_overview_page.tsx @@ -14,7 +14,7 @@ import { AvailableIntegrationsTable } from './available_integration_table'; import { AddedIntegrationsTable } from './added_integration_table'; import { OBSERVABILITY_BASE } from '../../../../common/constants/shared'; -interface AppTableProps extends AppAnalyticsComponentDeps { +export interface AppTableProps extends AppAnalyticsComponentDeps { loading: boolean; applications: ApplicationType[]; fetchApplications: () => void; @@ -49,6 +49,10 @@ export function AddedIntegrationOverviewPage(props: AppTableProps) { text: 'Placeholder', href: '#/placeholder', }, + { + text: 'Added Integrations', + href: '#/placeholder/added', + } ]); handleDataRequest(); }, []); diff --git a/public/components/placeholder/components/added_integration_table.tsx b/public/components/placeholder/components/added_integration_table.tsx index 0e2b824517..9b9d8e0d7e 100644 --- a/public/components/placeholder/components/added_integration_table.tsx +++ b/public/components/placeholder/components/added_integration_table.tsx @@ -29,7 +29,7 @@ export function AddedIntegrationsTable(props: AddedIntegrationsTableProps) { render: (value, record) => ( {_.truncate(record.id, { length: 100 })} diff --git a/public/components/placeholder/components/available_integration_card_view.tsx b/public/components/placeholder/components/available_integration_card_view.tsx index f6a3f13cab..91de8f4807 100644 --- a/public/components/placeholder/components/available_integration_card_view.tsx +++ b/public/components/placeholder/components/available_integration_card_view.tsx @@ -75,7 +75,7 @@ export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardVi { - window.location.assign(`#/placeholder/${i.templateName}`); + window.location.assign(`#/placeholder/available/${i.templateName}`); }} > View Details diff --git a/public/components/placeholder/components/available_integration_table.tsx b/public/components/placeholder/components/available_integration_table.tsx index abaedfcc0d..c2a11fa60f 100644 --- a/public/components/placeholder/components/available_integration_table.tsx +++ b/public/components/placeholder/components/available_integration_table.tsx @@ -29,7 +29,7 @@ export function AvailableIntegrationsTable(props: AvailableIntegrationsTableProp render: (value, record) => ( {_.truncate(record.templateName, { length: 100 })} diff --git a/public/components/placeholder/home.tsx b/public/components/placeholder/home.tsx index a26998c99a..bce1d4778d 100644 --- a/public/components/placeholder/home.tsx +++ b/public/components/placeholder/home.tsx @@ -37,6 +37,7 @@ import { } from './components/available_integration_overview_page'; import { Sidebar } from './components/integration_side_nav'; import { AddedIntegrationOverviewPage } from './components/added_integration_overview_page'; +import { AddedIntegration } from './components/added_integration'; export type AppAnalyticsCoreDeps = TraceAnalyticsCoreDeps; @@ -426,8 +427,31 @@ export const Home = (props: HomeProps) => { /> ( + + + + )} + /> + ( + { queryManager={queryManager} {...commonProps} /> + )} />
diff --git a/server/routes/placeholder/placeholder_router.ts b/server/routes/placeholder/placeholder_router.ts index a77970c2e0..6ce8b8f361 100644 --- a/server/routes/placeholder/placeholder_router.ts +++ b/server/routes/placeholder/placeholder_router.ts @@ -128,6 +128,45 @@ export function registerPlaceholderRoute(router: IRouter) { } ); + router.get( + { + path: `${OBSERVABILITY_BASE}/store/id`, + validate: false, + }, + async (context, request, response): Promise => { + try { + const random = await fetch('http://127.0.0.1:4010/store/id', { + // method: "GET", // *GET, POST, PUT, DELETE, etc. + // mode: "cors", // no-cors, *cors, same-origin + // cache: "no-cache", // *default, no-cache, reload, force-cache, only-if-cached + // credentials: "same-origin", // include, *same-origin, omit + // headers: { + // "Content-Type": "application/json", + // // 'Content-Type': 'application/x-www-form-urlencoded', + // }, + // redirect: "follow", // manual, *follow, error + // referrerPolicy: "no-referrer", // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url + // // body: '{limit: 3}', // body data type must match "Content-Type" header + }); + return response.ok({ + body: { + data: await random.json(), + }, + }); + // const metrics = getMetrics(); + // return response.ok({ + // body: metrics, + // }); + } catch (error) { + // console.error(error); + // return response.custom({ + // statusCode: error.statusCode || 500, + // body: error.message, + // }); + } + } + ); + router.post( { path: `${OBSERVABILITY_BASE}/store`, From 208a9ca7b2b38043c04e370ab5503d9850851d47 Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Tue, 4 Apr 2023 13:24:41 -0400 Subject: [PATCH 020/190] add link fix Signed-off-by: Derek Ho --- .../placeholder/components/added_integration_table.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/components/placeholder/components/added_integration_table.tsx b/public/components/placeholder/components/added_integration_table.tsx index 9b9d8e0d7e..7164ca78e2 100644 --- a/public/components/placeholder/components/added_integration_table.tsx +++ b/public/components/placeholder/components/added_integration_table.tsx @@ -41,9 +41,9 @@ export function AddedIntegrationsTable(props: AddedIntegrationsTableProps) { sortable: true, truncateText: true, render: (value, record) => ( - {_.truncate(record.templateName, { length: 100 })} From 6a4f60aa36c8fa723be36543449df75cc3b02990 Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Fri, 5 May 2023 12:51:24 -0400 Subject: [PATCH 021/190] push up some work Signed-off-by: Derek Ho --- common/constants/shared.ts | 7 + .../added_integration_overview_page.tsx | 4 +- .../available_integration_card_view.tsx | 5 +- .../available_integration_overview_page.tsx | 5 +- .../opensearch_observability_plugin.ts | 19 +- .../placeholder/placeholder_adaptor.ts | 139 ++++++++++ .../routes/placeholder/placeholder_router.ts | 262 ++++++++++++------ 7 files changed, 343 insertions(+), 98 deletions(-) create mode 100644 server/adaptors/placeholder/placeholder_adaptor.ts diff --git a/common/constants/shared.ts b/common/constants/shared.ts index 5797994601..bb324f5d12 100644 --- a/common/constants/shared.ts +++ b/common/constants/shared.ts @@ -13,6 +13,7 @@ export const DSL_SEARCH = '/search'; export const DSL_CAT = '/cat.indices'; export const DSL_MAPPING = '/indices.getFieldMapping'; export const OBSERVABILITY_BASE = '/api/observability'; +export const INTEGRATIONS_BASE = '/api/integrations'; export const EVENT_ANALYTICS = '/event_analytics'; export const SAVED_OBJECTS = '/saved_objects'; export const SAVED_QUERY = '/query'; @@ -69,6 +70,12 @@ export const PPL_NEWLINE_REGEX = /[\n\r]+/g; // Observability plugin URI const BASE_OBSERVABILITY_URI = '/_plugins/_observability'; +const BASE_INTEGRATIONS_URI = '/_plugins/_integrations'; +export const OPENSEARCH_INTEGRATIONS_API = { + OBJECT: `${BASE_INTEGRATIONS_URI}/object`, + ALL: `${BASE_INTEGRATIONS_URI}/store/list_all`, + ADDED: `${BASE_INTEGRATIONS_URI}/store/list_added`, +} export const OPENSEARCH_PANELS_API = { OBJECT: `${BASE_OBSERVABILITY_URI}/object`, }; diff --git a/public/components/placeholder/components/added_integration_overview_page.tsx b/public/components/placeholder/components/added_integration_overview_page.tsx index 335fb3750d..23822f0002 100644 --- a/public/components/placeholder/components/added_integration_overview_page.tsx +++ b/public/components/placeholder/components/added_integration_overview_page.tsx @@ -12,7 +12,7 @@ import { ApplicationType } from '../../../../common/types/application_analytics' import { IntegrationHeader } from './integration_header'; import { AvailableIntegrationsTable } from './available_integration_table'; import { AddedIntegrationsTable } from './added_integration_table'; -import { OBSERVABILITY_BASE } from '../../../../common/constants/shared'; +import { INTEGRATIONS_BASE, OBSERVABILITY_BASE } from '../../../../common/constants/shared'; export interface AppTableProps extends AppAnalyticsComponentDeps { loading: boolean; @@ -58,7 +58,7 @@ export function AddedIntegrationOverviewPage(props: AppTableProps) { }, []); async function handleDataRequest() { - http.get(`${OBSERVABILITY_BASE}/store`).then((exists) => setData(exists)); + http.get(`${INTEGRATIONS_BASE}/store/list_added`).then((exists) => setData(exists)); } return ( diff --git a/public/components/placeholder/components/available_integration_card_view.tsx b/public/components/placeholder/components/available_integration_card_view.tsx index 91de8f4807..e4cc58f0e5 100644 --- a/public/components/placeholder/components/available_integration_card_view.tsx +++ b/public/components/placeholder/components/available_integration_card_view.tsx @@ -56,10 +56,11 @@ export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardVi // }); const renderRows = (integrations: AvailableIntegrationType[]) => { + if (!integrations || !integrations.length) return null return ( <> - {integrations.map((i, v) => { + integrations ? {integrations.map((i, v) => { return ( ); - })} + })} diff --git a/public/components/placeholder/components/available_integration_overview_page.tsx b/public/components/placeholder/components/available_integration_overview_page.tsx index 911f5e62f3..61766036eb 100644 --- a/public/components/placeholder/components/available_integration_overview_page.tsx +++ b/public/components/placeholder/components/available_integration_overview_page.tsx @@ -23,7 +23,7 @@ import { IntegrationHeader } from './integration_header'; import { AvailableIntegrationsTable } from './available_integration_table'; import { AddedIntegrationsTable } from './added_integration_table'; import { AvailableIntegrationsCardView } from './available_integration_card_view'; -import { OBSERVABILITY_BASE } from '../../../../common/constants/shared'; +import { INTEGRATIONS_BASE, OBSERVABILITY_BASE } from '../../../../common/constants/shared'; import { getAddIntegrationModal } from './add_integration_modal'; interface AppTableProps extends AppAnalyticsComponentDeps { @@ -151,7 +151,8 @@ export function AvailableIntegrationOverviewPage(props: AppTableProps) { }, []); async function handleDataRequest() { - http.get(`${OBSERVABILITY_BASE}/repository`).then((exists) => setData(exists)); + http.get(`${INTEGRATIONS_BASE}/repository`).then((exists) => setData(exists)); + console.log(data) } const setToast = (title: string, color = 'success', text?: ReactChild) => { diff --git a/server/adaptors/opensearch_observability_plugin.ts b/server/adaptors/opensearch_observability_plugin.ts index 2a99187c65..858bb3f58e 100644 --- a/server/adaptors/opensearch_observability_plugin.ts +++ b/server/adaptors/opensearch_observability_plugin.ts @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { OPENSEARCH_PANELS_API } from "../../common/constants/shared"; +import { OPENSEARCH_INTEGRATIONS_API, OPENSEARCH_PANELS_API } from "../../common/constants/shared"; export function OpenSearchObservabilityPlugin( Client: any, @@ -13,7 +13,24 @@ export function OpenSearchObservabilityPlugin( const clientAction = components.clientAction.factory; Client.prototype.observability = components.clientAction.namespaceFactory(); + Client.prototype.integrations = components.clientAction.namespaceFactory(); const observability = Client.prototype.observability.prototype; + const integrations = Client.prototype.integrations.prototype; + + // Get Object + integrations.getObject = clientAction({ + url: { + fmt: OPENSEARCH_INTEGRATIONS_API.ALL, + }, + method: "GET", + }); + + integrations.getAdded = clientAction({ + url: { + fmt: OPENSEARCH_INTEGRATIONS_API.ADDED + }, + method: "GET", + }); // Get Object observability.getObject = clientAction({ diff --git a/server/adaptors/placeholder/placeholder_adaptor.ts b/server/adaptors/placeholder/placeholder_adaptor.ts new file mode 100644 index 0000000000..c5f9d95c25 --- /dev/null +++ b/server/adaptors/placeholder/placeholder_adaptor.ts @@ -0,0 +1,139 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { + ApplicationRequestType, + ApplicationType, +} from '../../../common/types/application_analytics'; +import { ILegacyScopedClusterClient } from '../../../../../src/core/server'; + +export class PlaceholderAdaptor { + // Fetch all existing integrations + fetchApps = async (client: ILegacyScopedClusterClient): Promise => { + try { + console.log('poopy') + const response = await client.callAsCurrentUser('integrations.getObject'); + console.log(response) + // return response.observabilityObjectList.map((object: any) => { + return response + // return { + // }; + // }); + } catch (err: any) { + throw new Error('Fetch All Applications Error: ' + err); + } + }; + + fetchAdded = async (client: ILegacyScopedClusterClient): Promise => { + try { + const response = await client.callAsCurrentUser('integrations.getAdded', {}); + console.log(response) + // return response.observabilityObjectList.map((object: any) => { + return response.list + // return { + // }; + // }); + } catch (err: any) { + throw new Error('Fetch All Applications Error: ' + err); + } + } + + // // Fetch application by id + // fetchAppById = async ( + // client: ILegacyScopedClusterClient, + // appId: string + // ): Promise => { + // try { + // const response = await client.callAsCurrentUser('observability.getObjectById', { + // objectId: appId, + // }); + // const app = response.observabilityObjectList[0]; + // return { + // id: appId, + // dateCreated: app.createdTimeMs, + // dateModified: app.lastUpdatedTimeMs, + // name: app.application.name, + // description: app.application.description, + // baseQuery: app.application.baseQuery, + // servicesEntities: app.application.servicesEntities.map((rec: string) => decodeURI(rec)), + // traceGroups: app.application.traceGroups.map((rec: string) => decodeURI(rec)), + // panelId: app.application.panelId, + // availability: { + // name: '', + // color: '', + // availabilityVisId: app.application.availabilityVisId || '', + // }, + // }; + // } catch (err: any) { + // throw new Error('Fetch Application By Id Error: ' + err); + // } + // }; + + // // Create a new application + // createNewApp = async ( + // client: ILegacyScopedClusterClient, + // appBody: Partial + // ) => { + // try { + // const response = await client.callAsCurrentUser('observability.createObject', { + // body: { + // application: appBody, + // }, + // }); + // return response.objectId; + // } catch (err) { + // throw new Error('Create New Application Error: ' + err); + // } + // }; + + // // Rename an existing application + // renameApp = async (client: ILegacyScopedClusterClient, appId: string, name: string) => { + // const updateApplicationBody = { + // name, + // }; + // try { + // const response = await client.callAsCurrentUser('observability.updateObjectById', { + // objectId: appId, + // body: { + // application: updateApplicationBody, + // }, + // }); + // return response.objectId; + // } catch (err: any) { + // throw new Error('Rename Application Error: ' + err); + // } + // }; + + // // Update an existing application + // updateApp = async ( + // client: ILegacyScopedClusterClient, + // appId: string, + // updateAppBody: Partial + // ) => { + // try { + // const response = await client.callAsCurrentUser('observability.updateObjectById', { + // objectId: appId, + // body: { + // application: updateAppBody, + // }, + // }); + // return response.objectId; + // } catch (err: any) { + // throw new Error('Update Panel Error: ' + err); + // } + // }; + + // // Delete existing applications + // deleteApp = async (client: ILegacyScopedClusterClient, appList: string) => { + // try { + // const response = await client.callAsCurrentUser('observability.deleteObjectByIdList', { + // objectIdList: appList, + // }); + // return { status: 'OK', message: response }; + // } catch (err: any) { + // throw new Error('Delete Application Error: ' + err); + // } + // }; +} diff --git a/server/routes/placeholder/placeholder_router.ts b/server/routes/placeholder/placeholder_router.ts index 6ce8b8f361..edc3333fb2 100644 --- a/server/routes/placeholder/placeholder_router.ts +++ b/server/routes/placeholder/placeholder_router.ts @@ -6,48 +6,73 @@ import { ResponseError } from '@opensearch-project/opensearch/lib/errors'; import { schema } from '@osd/config-schema'; import fetch from 'node-fetch'; -import { IOpenSearchDashboardsResponse, IRouter } from '../../../../../src/core/server'; -import { OBSERVABILITY_BASE } from '../../../common/constants/shared'; +import { ILegacyScopedClusterClient, IOpenSearchDashboardsResponse, IRouter } from '../../../../../src/core/server'; +import { INTEGRATIONS_BASE, OBSERVABILITY_BASE } from '../../../common/constants/shared'; import { addClickToMetric, getMetrics } from '../../common/metrics/metrics_helper'; +import { PlaceholderAdaptor } from '../../../server/adaptors/placeholder/placeholder_adaptor'; +import { ApplicationType } from 'common/types/application_analytics'; export function registerPlaceholderRoute(router: IRouter) { + const appAnalyticsBackend = new PlaceholderAdaptor(); + router.get( { - path: `${OBSERVABILITY_BASE}/repository`, + path: `${INTEGRATIONS_BASE}/repository`, validate: false, }, async (context, request, response): Promise => { + const opensearchClient: ILegacyScopedClusterClient = context.observability_plugin.observabilityClient.asScoped( + request + ); + let applicationsData: ApplicationType[] = []; try { - const random = await fetch('http://127.0.0.1:4010/repository?limit=24', { - // method: "GET", // *GET, POST, PUT, DELETE, etc. - // mode: "cors", // no-cors, *cors, same-origin - // cache: "no-cache", // *default, no-cache, reload, force-cache, only-if-cached - // credentials: "same-origin", // include, *same-origin, omit - // headers: { - // "Content-Type": "application/json", - // // 'Content-Type': 'application/x-www-form-urlencoded', - // }, - // redirect: "follow", // manual, *follow, error - // referrerPolicy: "no-referrer", // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url - // // body: '{limit: 3}', // body data type must match "Content-Type" header - }); + console.log('hello') + applicationsData = await appAnalyticsBackend.fetchApps(opensearchClient); + console.log(applicationsData) return response.ok({ body: { - data: await random.json(), + data: applicationsData, }, }); - // const metrics = getMetrics(); - // return response.ok({ - // body: metrics, - // }); - } catch (error) { - // console.error(error); - // return response.custom({ - // statusCode: error.statusCode || 500, - // body: error.message, - // }); - } + } catch (err: any) { + console.error('Error occurred while fetching applications', err); + return response.custom({ + statusCode: err.statusCode || 500, + body: err.message, + }); + + // try { + // const random = await fetch('http://127.0.0.1:4010/store/id', { + // // method: "GET", // *GET, POST, PUT, DELETE, etc. + // // mode: "cors", // no-cors, *cors, same-origin + // // cache: "no-cache", // *default, no-cache, reload, force-cache, only-if-cached + // // credentials: "same-origin", // include, *same-origin, omit + // // headers: { + // // "Content-Type": "application/json", + // // // 'Content-Type': 'application/x-www-form-urlencoded', + // // }, + // // redirect: "follow", // manual, *follow, error + // // referrerPolicy: "no-referrer", // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url + // // // body: '{limit: 3}', // body data type must match "Content-Type" header + // }); + // return response.ok({ + // body: { + // data: await random.json(), + // }, + // }); + // // const metrics = getMetrics(); + // // return response.ok({ + // // body: metrics, + // // }); + // } catch (error) { + // // console.error(error); + // // return response.custom({ + // // statusCode: error.statusCode || 500, + // // body: error.message, + // // }); + // } } + } ); router.get( @@ -130,81 +155,136 @@ export function registerPlaceholderRoute(router: IRouter) { router.get( { - path: `${OBSERVABILITY_BASE}/store/id`, + path: `${INTEGRATIONS_BASE}/store`, validate: false, }, async (context, request, response): Promise => { + const opensearchClient: ILegacyScopedClusterClient = context.observability_plugin.observabilityClient.asScoped( + request + ); + let applicationsData: ApplicationType[] = []; try { - const random = await fetch('http://127.0.0.1:4010/store/id', { - // method: "GET", // *GET, POST, PUT, DELETE, etc. - // mode: "cors", // no-cors, *cors, same-origin - // cache: "no-cache", // *default, no-cache, reload, force-cache, only-if-cached - // credentials: "same-origin", // include, *same-origin, omit - // headers: { - // "Content-Type": "application/json", - // // 'Content-Type': 'application/x-www-form-urlencoded', - // }, - // redirect: "follow", // manual, *follow, error - // referrerPolicy: "no-referrer", // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url - // // body: '{limit: 3}', // body data type must match "Content-Type" header - }); + applicationsData = await appAnalyticsBackend.fetchApps(opensearchClient); return response.ok({ body: { - data: await random.json(), + data: applicationsData, }, }); - // const metrics = getMetrics(); - // return response.ok({ - // body: metrics, - // }); - } catch (error) { - // console.error(error); - // return response.custom({ - // statusCode: error.statusCode || 500, - // body: error.message, - // }); - } - } - ); - - router.post( - { - path: `${OBSERVABILITY_BASE}/store`, - validate: false, - }, - async (context, request, response): Promise => { - try { - const random = await fetch('http://127.0.0.1:4010/store', { - method: 'POST', // *GET, POST, PUT, DELETE, etc. - // // mode: "cors", // no-cors, *cors, same-origin - // // cache: "no-cache", // *default, no-cache, reload, force-cache, only-if-cached - // // credentials: "same-origin", // include, *same-origin, omit - headers: { - 'Content-Type': 'application/json', - // 'Content-Type': 'application/x-www-form-urlencoded', - }, - // // redirect: "follow", // manual, *follow, error - // // referrerPolicy: "no-referrer", // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url - body: '{"limit": "5"}', // body data type must match "Content-Type" header - }); - return response.ok(); - // const metrics = getMetrics(); - // return response.ok({ - // body: metrics, - // }); - } catch (error) { + } catch (err: any) { + console.error('Error occurred while fetching applications', err); return response.custom({ - statusCode: error.statusCode || 500, - body: error.message, + statusCode: err.statusCode || 500, + body: err.message, }); - // console.error(error); - // return response.custom({ - // statusCode: error.statusCode || 500, - // body: error.message, - // }); - } + + // try { + // const random = await fetch('http://127.0.0.1:4010/store/id', { + // // method: "GET", // *GET, POST, PUT, DELETE, etc. + // // mode: "cors", // no-cors, *cors, same-origin + // // cache: "no-cache", // *default, no-cache, reload, force-cache, only-if-cached + // // credentials: "same-origin", // include, *same-origin, omit + // // headers: { + // // "Content-Type": "application/json", + // // // 'Content-Type': 'application/x-www-form-urlencoded', + // // }, + // // redirect: "follow", // manual, *follow, error + // // referrerPolicy: "no-referrer", // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url + // // // body: '{limit: 3}', // body data type must match "Content-Type" header + // }); + // return response.ok({ + // body: { + // data: await random.json(), + // }, + // }); + // // const metrics = getMetrics(); + // // return response.ok({ + // // body: metrics, + // // }); + // } catch (error) { + // // console.error(error); + // // return response.custom({ + // // statusCode: error.statusCode || 500, + // // body: error.message, + // // }); + // } } + } ); + + // router.post( + // { + // path: `${OBSERVABILITY_BASE}/store`, + // validate: false, + // }, + // async (context, request, response): Promise => { + // try { + // const random = await fetch('http://127.0.0.1:4010/store', { + // method: 'POST', // *GET, POST, PUT, DELETE, etc. + // // // mode: "cors", // no-cors, *cors, same-origin + // // // cache: "no-cache", // *default, no-cache, reload, force-cache, only-if-cached + // // // credentials: "same-origin", // include, *same-origin, omit + // headers: { + // 'Content-Type': 'application/json', + // // 'Content-Type': 'application/x-www-form-urlencoded', + // }, + // // // redirect: "follow", // manual, *follow, error + // // // referrerPolicy: "no-referrer", // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url + // body: '{"limit": "5"}', // body data type must match "Content-Type" header + // }); + // return response.ok(); + // // const metrics = getMetrics(); + // // return response.ok({ + // // body: metrics, + // // }); + // } catch (error) { + // return response.custom({ + // statusCode: error.statusCode || 500, + // body: error.message, + // }); + // // console.error(error); + // // return response.custom({ + // // statusCode: error.statusCode || 500, + // // body: error.message, + // // }); + // } + // } + // ); + + // Get all paragraphs of notebooks + // router.get( + // { + // path: `${NOTEBOOKS_API_PREFIX}/note/{noteId}`, + // validate: { + // params: schema.object({ + // noteId: schema.string(), + // }), + // }, + // }, + // async ( + // context, + // request, + // response + // ): Promise> => { + // const opensearchNotebooksClient: ILegacyScopedClusterClient = context.observability_plugin.observabilityClient.asScoped( + // request + // ); + // try { + // const notebookinfo = await BACKEND.fetchNote( + // opensearchNotebooksClient, + // request.params.noteId, + // wreckOptions + // ); + // return response.ok({ + // body: notebookinfo, + // }); + // } catch (error) { + // return response.custom({ + // statusCode: error.statusCode || 500, + // body: error.message, + // }); + // } + // } + // ); // router.get( // { // path: `${OBSERVABILITY_BASE}/repository`, From 1fe6720bb35cecaee3cdd53081793fd41202529e Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Wed, 10 May 2023 10:41:20 -0400 Subject: [PATCH 022/190] integrations left nav registration Signed-off-by: Derek Ho --- common/constants/shared.ts | 6 +++++- public/components/app.tsx | 1 + public/plugin.ts | 11 +++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/common/constants/shared.ts b/common/constants/shared.ts index bb324f5d12..d29950ee1f 100644 --- a/common/constants/shared.ts +++ b/common/constants/shared.ts @@ -52,6 +52,10 @@ export const observabilityPanelsID = 'observability-dashboards'; export const observabilityPanelsTitle = 'Dashboards'; export const observabilityPanelsPluginOrder = 5095; +export const observabilityIntegrationsID = 'observability-integrations'; +export const observabilityIntegrationsTitle = 'Integrations'; +export const observabilityIntegrationsPluginOrder = 5096; + // Shared Constants export const SQL_DOCUMENTATION_URL = 'https://opensearch.org/docs/latest/search-plugins/sql/index/'; export const PPL_DOCUMENTATION_URL = @@ -75,7 +79,7 @@ export const OPENSEARCH_INTEGRATIONS_API = { OBJECT: `${BASE_INTEGRATIONS_URI}/object`, ALL: `${BASE_INTEGRATIONS_URI}/store/list_all`, ADDED: `${BASE_INTEGRATIONS_URI}/store/list_added`, -} +}; export const OPENSEARCH_PANELS_API = { OBJECT: `${BASE_OBSERVABILITY_URI}/object`, }; diff --git a/public/components/app.tsx b/public/components/app.tsx index ad4fef745a..102c37e16f 100644 --- a/public/components/app.tsx +++ b/public/components/app.tsx @@ -43,6 +43,7 @@ const pages = { traces: TraceAnalyticsHome, notebooks: NotebooksHome, dashboards: CustomPanelsHome, + integrations: PlaceholderHome, }; export const App = ({ diff --git a/public/plugin.ts b/public/plugin.ts index bb21d79ae3..048d0a11c8 100644 --- a/public/plugin.ts +++ b/public/plugin.ts @@ -34,6 +34,9 @@ import { observabilityLogsID, observabilityLogsTitle, observabilityLogsPluginOrder, + observabilityIntegrationsID, + observabilityIntegrationsTitle, + observabilityIntegrationsPluginOrder, } from '../common/constants/shared'; import { QueryManager } from '../common/query_manager'; import { VISUALIZATION_SAVED_OBJECT } from '../common/types/observability_saved_object_attributes'; @@ -196,6 +199,14 @@ export class ObservabilityPlugin mount: appMountWithStartPage('dashboards'), }); + core.application.register({ + id: observabilityIntegrationsID, + title: observabilityIntegrationsTitle, + category: OBSERVABILITY_APP_CATEGORIES.observability, + order: observabilityIntegrationsPluginOrder, + mount: appMountWithStartPage('placeholder'), + }); + const embeddableFactory = new ObservabilityEmbeddableFactoryDefinition(async () => ({ getAttributeService: (await core.getStartServices())[1].dashboard.getAttributeService, savedObjectsClient: (await core.getStartServices())[0].savedObjects.client, From b5a64f430af79c1f9ab97272020d687cead5f9f3 Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Wed, 10 May 2023 10:59:50 -0400 Subject: [PATCH 023/190] get integrations hooked up to modules Signed-off-by: Derek Ho --- public/components/placeholder/home.tsx | 173 +++++++++++++------------ public/plugin.ts | 2 +- 2 files changed, 89 insertions(+), 86 deletions(-) diff --git a/public/components/placeholder/home.tsx b/public/components/placeholder/home.tsx index bce1d4778d..c40cd1cf8b 100644 --- a/public/components/placeholder/home.tsx +++ b/public/components/placeholder/home.tsx @@ -3,10 +3,9 @@ * SPDX-License-Identifier: Apache-2.0 */ /* eslint-disable react-hooks/exhaustive-deps */ -/* eslint-disable no-console */ import React, { ReactChild, useEffect, useState } from 'react'; -import { Route, RouteComponentProps, Switch } from 'react-router-dom'; +import { HashRouter, Route, RouteComponentProps, Switch } from 'react-router-dom'; import DSLService from 'public/services/requests/dsl'; import PPLService from 'public/services/requests/ppl'; import SavedObjects from 'public/services/saved_objects/event_analytics/saved_objects'; @@ -20,7 +19,7 @@ import { TraceAnalyticsComponentDeps, TraceAnalyticsCoreDeps } from '../trace_an import { FilterType } from '../trace_analytics/components/common/filters/filters'; import { handleDataPrepperIndicesExistRequest } from '../trace_analytics/requests/request_handler'; import { ObservabilitySideBar } from '../common/side_nav'; -import { NotificationsStart } from '../../../../../src/core/public'; +import { ChromeBreadcrumb, NotificationsStart } from '../../../../../src/core/public'; import { APP_ANALYTICS_API_PREFIX } from '../../../common/constants/application_analytics'; import { ApplicationRequestType, @@ -48,6 +47,7 @@ interface HomeProps extends RouteComponentProps, AppAnalyticsCoreDeps { timestampUtils: TimestampUtils; notifications: NotificationsStart; queryManager: QueryManager; + parentBreadcrumbs: ChromeBreadcrumb[]; } export interface AppAnalyticsComponentDeps extends TraceAnalyticsComponentDeps { @@ -58,6 +58,7 @@ export interface AppAnalyticsComponentDeps extends TraceAnalyticsComponentDeps { setQueryWithStorage: (newQuery: string) => void; setFiltersWithStorage: (newFilters: FilterType[]) => void; setAppConfigs: (newAppConfigs: FilterType[]) => void; + parentBreadcrumbs: ChromeBreadcrumb[]; } export const Home = (props: HomeProps) => { @@ -388,88 +389,90 @@ export const Home = (props: HomeProps) => { }} toastLifeTimeMs={6000} /> - - ( - - - - )} - /> - ( - - - - )} - /> - ( - - - - )} - /> - ( - - - - )} - /> - + + + ( + + + + )} + /> + ( + + + + )} + /> + ( + + + + )} + /> + ( + + + + )} + /> + + ); }; diff --git a/public/plugin.ts b/public/plugin.ts index 048d0a11c8..9eb5c275df 100644 --- a/public/plugin.ts +++ b/public/plugin.ts @@ -204,7 +204,7 @@ export class ObservabilityPlugin title: observabilityIntegrationsTitle, category: OBSERVABILITY_APP_CATEGORIES.observability, order: observabilityIntegrationsPluginOrder, - mount: appMountWithStartPage('placeholder'), + mount: appMountWithStartPage('integrations'), }); const embeddableFactory = new ObservabilityEmbeddableFactoryDefinition(async () => ({ From 68764284394b01f8fa0f2ca8a55c750dd18bd99b Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Wed, 10 May 2023 11:02:42 -0400 Subject: [PATCH 024/190] fix links Signed-off-by: Derek Ho --- .../components/placeholder/components/added_integration.tsx | 4 ++-- .../placeholder/components/added_integration_table.tsx | 6 +++--- .../components/available_integration_card_view.tsx | 2 +- .../placeholder/components/available_integration_table.tsx | 2 +- .../placeholder/components/integration_side_nav.tsx | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/public/components/placeholder/components/added_integration.tsx b/public/components/placeholder/components/added_integration.tsx index 9f32bd697b..16b917d944 100644 --- a/public/components/placeholder/components/added_integration.tsx +++ b/public/components/placeholder/components/added_integration.tsx @@ -148,7 +148,7 @@ import { DeleteModal } from '../../../../public/components/common/helpers/delete }, { text: 'Added Integration', - href: '#/placeholder/added' + href: '#/added' }, { text: appId, @@ -236,7 +236,7 @@ import { DeleteModal } from '../../../../public/components/common/helpers/delete

Template

- + {data.data.templateName} diff --git a/public/components/placeholder/components/added_integration_table.tsx b/public/components/placeholder/components/added_integration_table.tsx index 7164ca78e2..bffd31d164 100644 --- a/public/components/placeholder/components/added_integration_table.tsx +++ b/public/components/placeholder/components/added_integration_table.tsx @@ -29,7 +29,7 @@ export function AddedIntegrationsTable(props: AddedIntegrationsTableProps) { render: (value, record) => ( {_.truncate(record.id, { length: 100 })} @@ -43,7 +43,7 @@ export function AddedIntegrationsTable(props: AddedIntegrationsTableProps) { render: (value, record) => ( {_.truncate(record.templateName, { length: 100 })} @@ -154,7 +154,7 @@ export function AddedIntegrationsTable(props: AddedIntegrationsTableProps) {

There are currently no added integrations. Add them{' '} - here to start using pre-canned + here to start using pre-canned assets!

diff --git a/public/components/placeholder/components/available_integration_card_view.tsx b/public/components/placeholder/components/available_integration_card_view.tsx index e4cc58f0e5..ec67a758cb 100644 --- a/public/components/placeholder/components/available_integration_card_view.tsx +++ b/public/components/placeholder/components/available_integration_card_view.tsx @@ -76,7 +76,7 @@ export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardVi { - window.location.assign(`#/placeholder/available/${i.templateName}`); + window.location.assign(`#/available/${i.templateName}`); }} > View Details diff --git a/public/components/placeholder/components/available_integration_table.tsx b/public/components/placeholder/components/available_integration_table.tsx index c2a11fa60f..501aff457b 100644 --- a/public/components/placeholder/components/available_integration_table.tsx +++ b/public/components/placeholder/components/available_integration_table.tsx @@ -29,7 +29,7 @@ export function AvailableIntegrationsTable(props: AvailableIntegrationsTableProp render: (value, record) => ( {_.truncate(record.templateName, { length: 100 })} diff --git a/public/components/placeholder/components/integration_side_nav.tsx b/public/components/placeholder/components/integration_side_nav.tsx index 5a1b94d042..71d2cda6d9 100644 --- a/public/components/placeholder/components/integration_side_nav.tsx +++ b/public/components/placeholder/components/integration_side_nav.tsx @@ -28,12 +28,12 @@ export const Sidebar = (props: { children: React.ReactNode }) => { { name: 'Available integrations', id: 1, - href: '#/placeholder/available', + href: '#/available', }, { name: 'Added integrations', id: 2, - href: '#/placeholder/added', + href: '#/added', }, ], }, From ed28346a89d756ee67e752dd7f2585336a0f108d Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Thu, 11 May 2023 12:44:54 -0400 Subject: [PATCH 025/190] check Signed-off-by: Derek Ho --- .../available_integration_card_view.tsx | 9 +- .../available_integration_overview_page.tsx | 6 +- .../routes/placeholder/placeholder_router.ts | 219 +++++++++----- server/routes/placeholder/test.ndjson | 266 ++++++++++++++++++ server/routes/placeholder/testing.ndjson | 14 + 5 files changed, 439 insertions(+), 75 deletions(-) create mode 100644 server/routes/placeholder/test.ndjson create mode 100644 server/routes/placeholder/testing.ndjson diff --git a/public/components/placeholder/components/available_integration_card_view.tsx b/public/components/placeholder/components/available_integration_card_view.tsx index ec67a758cb..aca6a86c22 100644 --- a/public/components/placeholder/components/available_integration_card_view.tsx +++ b/public/components/placeholder/components/available_integration_card_view.tsx @@ -33,6 +33,7 @@ import { } from './available_integration_overview_page'; export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardViewProps) { + console.log(props); const rowNumber = _.ceil(props.records / 5); // console.log(rowNumber) @@ -56,11 +57,11 @@ export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardVi // }); const renderRows = (integrations: AvailableIntegrationType[]) => { - if (!integrations || !integrations.length) return null + if (!integrations || !integrations.length) return null; return ( <> - integrations ? {integrations.map((i, v) => { + {integrations.map((i, v) => { return ( ); - })} + })} ); }; - return <>{renderRows(props.data.data)}; + return <>{renderRows(props.data.data?.integrations)}; } // Synopsis.propTypes = { diff --git a/public/components/placeholder/components/available_integration_overview_page.tsx b/public/components/placeholder/components/available_integration_overview_page.tsx index 61766036eb..956d9e6f6f 100644 --- a/public/components/placeholder/components/available_integration_overview_page.tsx +++ b/public/components/placeholder/components/available_integration_overview_page.tsx @@ -152,7 +152,6 @@ export function AvailableIntegrationOverviewPage(props: AppTableProps) { async function handleDataRequest() { http.get(`${INTEGRATIONS_BASE}/repository`).then((exists) => setData(exists)); - console.log(data) } const setToast = (title: string, color = 'success', text?: ReactChild) => { @@ -161,8 +160,9 @@ export function AvailableIntegrationOverviewPage(props: AppTableProps) { }; async function addIntegrationRequest(name: string) { + console.log('name', name); http - .post(`${OBSERVABILITY_BASE}/store`) + .post(`${INTEGRATIONS_BASE}/store`) .then((res) => { setToast( `${name} integration successfully added!`, @@ -173,7 +173,7 @@ export function AvailableIntegrationOverviewPage(props: AppTableProps) { .catch((err) => setToast( 'Failed to load integration. Check Added Integrations table for more details', - 'danger', + 'danger' ) ); } diff --git a/server/routes/placeholder/placeholder_router.ts b/server/routes/placeholder/placeholder_router.ts index edc3333fb2..79371c0b25 100644 --- a/server/routes/placeholder/placeholder_router.ts +++ b/server/routes/placeholder/placeholder_router.ts @@ -6,11 +6,17 @@ import { ResponseError } from '@opensearch-project/opensearch/lib/errors'; import { schema } from '@osd/config-schema'; import fetch from 'node-fetch'; -import { ILegacyScopedClusterClient, IOpenSearchDashboardsResponse, IRouter } from '../../../../../src/core/server'; +import { ApplicationType } from 'common/types/application_analytics'; +import { + ILegacyScopedClusterClient, + IOpenSearchDashboardsResponse, + IRouter, +} from '../../../../../src/core/server'; import { INTEGRATIONS_BASE, OBSERVABILITY_BASE } from '../../../common/constants/shared'; import { addClickToMetric, getMetrics } from '../../common/metrics/metrics_helper'; import { PlaceholderAdaptor } from '../../../server/adaptors/placeholder/placeholder_adaptor'; -import { ApplicationType } from 'common/types/application_analytics'; +import { importFile } from '../../../../../src/plugins/saved_objects_management/public/lib'; +import { SavedObject } from '../../../../../src/plugins/data/common'; export function registerPlaceholderRoute(router: IRouter) { const appAnalyticsBackend = new PlaceholderAdaptor(); @@ -26,9 +32,9 @@ export function registerPlaceholderRoute(router: IRouter) { ); let applicationsData: ApplicationType[] = []; try { - console.log('hello') + console.log('hello'); applicationsData = await appAnalyticsBackend.fetchApps(opensearchClient); - console.log(applicationsData) + console.log(applicationsData); return response.ok({ body: { data: applicationsData, @@ -40,41 +46,118 @@ export function registerPlaceholderRoute(router: IRouter) { statusCode: err.statusCode || 500, body: err.message, }); - - // try { - // const random = await fetch('http://127.0.0.1:4010/store/id', { - // // method: "GET", // *GET, POST, PUT, DELETE, etc. - // // mode: "cors", // no-cors, *cors, same-origin - // // cache: "no-cache", // *default, no-cache, reload, force-cache, only-if-cached - // // credentials: "same-origin", // include, *same-origin, omit - // // headers: { - // // "Content-Type": "application/json", - // // // 'Content-Type': 'application/x-www-form-urlencoded', - // // }, - // // redirect: "follow", // manual, *follow, error - // // referrerPolicy: "no-referrer", // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url - // // // body: '{limit: 3}', // body data type must match "Content-Type" header - // }); - // return response.ok({ - // body: { - // data: await random.json(), - // }, - // }); - // // const metrics = getMetrics(); - // // return response.ok({ - // // body: metrics, - // // }); - // } catch (error) { - // // console.error(error); - // // return response.custom({ - // // statusCode: error.statusCode || 500, - // // body: error.message, - // // }); - // } + + // try { + // const random = await fetch('http://127.0.0.1:4010/store/id', { + // // method: "GET", // *GET, POST, PUT, DELETE, etc. + // // mode: "cors", // no-cors, *cors, same-origin + // // cache: "no-cache", // *default, no-cache, reload, force-cache, only-if-cached + // // credentials: "same-origin", // include, *same-origin, omit + // // headers: { + // // "Content-Type": "application/json", + // // // 'Content-Type': 'application/x-www-form-urlencoded', + // // }, + // // redirect: "follow", // manual, *follow, error + // // referrerPolicy: "no-referrer", // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url + // // // body: '{limit: 3}', // body data type must match "Content-Type" header + // }); + // return response.ok({ + // body: { + // data: await random.json(), + // }, + // }); + // // const metrics = getMetrics(); + // // return response.ok({ + // // body: metrics, + // // }); + // } catch (error) { + // // console.error(error); + // // return response.custom({ + // // statusCode: error.statusCode || 500, + // // body: error.message, + // // }); + // } + } } - } ); + router.post( + { + path: `${INTEGRATIONS_BASE}/store`, + validate: false, + }, + async (context, request, response): Promise => { + const opensearchClient: ILegacyScopedClusterClient = context.observability_plugin.observabilityClient.asScoped( + request + ); + console.log('poopy'); + const applicationsData: ApplicationType[] = []; + try { + // console.log('hello') + // applicationsData = await appAnalyticsBackend.fetchApps(opensearchClient); + // console.log(applicationsData) + // return response.ok({ + // body: { + // data: applicationsData, + // }, + // }); + const respons = await context.core.savedObjects.client.bulkCreate([ + { + type: 'observability-panel', + id: 'awiehgio;haw;oieghoiwaeg', + attributes: {}, + }, + { + type: 'observability-panel', + id: 'a', + attributes: {}, + }, + ]); + return response.ok({ + body: { + data: {}, + }, + }); + } catch (err: any) { + console.error('Error occurred while fetching applications', err); + return response.custom({ + statusCode: err.statusCode || 500, + body: err.message, + }); + + // try { + // const random = await fetch('http://127.0.0.1:4010/store/id', { + // // method: "GET", // *GET, POST, PUT, DELETE, etc. + // // mode: "cors", // no-cors, *cors, same-origin + // // cache: "no-cache", // *default, no-cache, reload, force-cache, only-if-cached + // // credentials: "same-origin", // include, *same-origin, omit + // // headers: { + // // "Content-Type": "application/json", + // // // 'Content-Type': 'application/x-www-form-urlencoded', + // // }, + // // redirect: "follow", // manual, *follow, error + // // referrerPolicy: "no-referrer", // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url + // // // body: '{limit: 3}', // body data type must match "Content-Type" header + // }); + // return response.ok({ + // body: { + // data: await random.json(), + // }, + // }); + // // const metrics = getMetrics(); + // // return response.ok({ + // // body: metrics, + // // }); + // } catch (error) { + // // console.error(error); + // // return response.custom({ + // // statusCode: error.statusCode || 500, + // // body: error.message, + // // }); + // } + } + } + ); router.get( { path: `${OBSERVABILITY_BASE}/repository/id`, @@ -176,39 +259,39 @@ export function registerPlaceholderRoute(router: IRouter) { statusCode: err.statusCode || 500, body: err.message, }); - - // try { - // const random = await fetch('http://127.0.0.1:4010/store/id', { - // // method: "GET", // *GET, POST, PUT, DELETE, etc. - // // mode: "cors", // no-cors, *cors, same-origin - // // cache: "no-cache", // *default, no-cache, reload, force-cache, only-if-cached - // // credentials: "same-origin", // include, *same-origin, omit - // // headers: { - // // "Content-Type": "application/json", - // // // 'Content-Type': 'application/x-www-form-urlencoded', - // // }, - // // redirect: "follow", // manual, *follow, error - // // referrerPolicy: "no-referrer", // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url - // // // body: '{limit: 3}', // body data type must match "Content-Type" header - // }); - // return response.ok({ - // body: { - // data: await random.json(), - // }, - // }); - // // const metrics = getMetrics(); - // // return response.ok({ - // // body: metrics, - // // }); - // } catch (error) { - // // console.error(error); - // // return response.custom({ - // // statusCode: error.statusCode || 500, - // // body: error.message, - // // }); - // } + + // try { + // const random = await fetch('http://127.0.0.1:4010/store/id', { + // // method: "GET", // *GET, POST, PUT, DELETE, etc. + // // mode: "cors", // no-cors, *cors, same-origin + // // cache: "no-cache", // *default, no-cache, reload, force-cache, only-if-cached + // // credentials: "same-origin", // include, *same-origin, omit + // // headers: { + // // "Content-Type": "application/json", + // // // 'Content-Type': 'application/x-www-form-urlencoded', + // // }, + // // redirect: "follow", // manual, *follow, error + // // referrerPolicy: "no-referrer", // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url + // // // body: '{limit: 3}', // body data type must match "Content-Type" header + // }); + // return response.ok({ + // body: { + // data: await random.json(), + // }, + // }); + // // const metrics = getMetrics(); + // // return response.ok({ + // // body: metrics, + // // }); + // } catch (error) { + // // console.error(error); + // // return response.custom({ + // // statusCode: error.statusCode || 500, + // // body: error.message, + // // }); + // } + } } - } ); // router.post( diff --git a/server/routes/placeholder/test.ndjson b/server/routes/placeholder/test.ndjson new file mode 100644 index 0000000000..777651bbb3 --- /dev/null +++ b/server/routes/placeholder/test.ndjson @@ -0,0 +1,266 @@ +{ + "attributes": { + "fields": "[{\"count\":0,\"name\":\"@timestamp\",\"type\":\"date\",\"esTypes\":[\"date\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"_id\",\"type\":\"string\",\"esTypes\":[\"_id\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"count\":0,\"name\":\"_index\",\"type\":\"string\",\"esTypes\":[\"_index\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"count\":0,\"name\":\"_score\",\"type\":\"number\",\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"_source\",\"type\":\"_source\",\"esTypes\":[\"_source\"],\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"_type\",\"type\":\"string\",\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"attributes.data_stream.dataset\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"attributes.data_stream.dataset.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"attributes.data_stream.dataset\"}}},{\"count\":0,\"name\":\"attributes.data_stream.namespace\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"attributes.data_stream.namespace.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"attributes.data_stream.namespace\"}}},{\"count\":0,\"name\":\"attributes.data_stream.type\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"attributes.data_stream.type.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"attributes.data_stream.type\"}}},{\"count\":0,\"name\":\"body\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"body.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"body\"}}},{\"count\":0,\"name\":\"communication.source.address\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"communication.source.address.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"communication.source.address\"}}},{\"count\":0,\"name\":\"communication.source.ip\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"communication.source.ip.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"communication.source.ip\"}}},{\"count\":0,\"name\":\"event.category\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"event.category.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"event.category\"}}},{\"count\":0,\"name\":\"event.domain\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"event.domain.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"event.domain\"}}},{\"count\":0,\"name\":\"event.kind\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"event.kind.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"event.kind\"}}},{\"count\":0,\"name\":\"event.name\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"event.name.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"event.name\"}}},{\"count\":0,\"name\":\"event.result\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"event.result.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"event.result\"}}},{\"count\":0,\"name\":\"event.type\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"event.type.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"event.type\"}}},{\"count\":0,\"name\":\"http.flavor\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"http.flavor.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"http.flavor\"}}},{\"count\":0,\"name\":\"http.request.method\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"http.request.method.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"http.request.method\"}}},{\"count\":0,\"name\":\"http.response.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"http.response.status_code\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"http.response.status_code.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"http.response.status_code\"}}},{\"count\":0,\"name\":\"http.url\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"http.url\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"http.url\"}}},{\"count\":0,\"name\":\"observerTime\",\"type\":\"date\",\"esTypes\":[\"date\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span_id\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span_id.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span_id\"}}},{\"count\":0,\"name\":\"trace_id\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"trace_id.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"trace_id\"}}}]", + "timeFieldName": "@timestamp", + "title": "sso_logs-*-*" + }, + "id": "47892350-b495-11ed-af0a-cf5c93b5a3b6", + "migrationVersion": { + "index-pattern": "7.6.0" + }, + "references": [], + "type": "index-pattern", + "updated_at": "2023-02-26T00:34:36.592Z", + "version": "WzYxLDdd" +} +{ + "attributes": { + "columns": [ + "http.request.method", + "http.response.status_code" + ], + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\n \"highlightAll\": true,\n \"version\": true,\n \"query\": {\n \"query\": \"event.domain:nginx.access\",\n \"language\": \"kuery\"\n },\n \"filter\": [],\n \"indexRefName\": \"kibanaSavedObjectMeta.searchSourceJSON.index\"\n}" + }, + "sort": [], + "title": "[NGINX Core Logs 1.0] Nginx Access Logs", + "version": 1 + }, + "id": "d80e05b2-518c-4c3d-9651-4c9d8632dce4", + "migrationVersion": { + "search": "7.9.3" + }, + "references": [ + { + "id": "47892350-b495-11ed-af0a-cf5c93b5a3b6", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "search", + "updated_at": "2023-02-26T00:34:36.592Z", + "version": "WzYyLDdd" +} +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[]}" + }, + "savedSearchRefName": "search_0", + "title": "[NGINX Core Logs 1.0] Response codes over time", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"[NGINX Core Logs 1.0] Response codes over time\",\"type\":\"histogram\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"params\":{},\"schema\":\"metric\"},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"params\":{\"field\":\"@timestamp\",\"timeRange\":{\"from\":\"now-24h\",\"to\":\"now\"},\"useNormalizedOpenSearchInterval\":true,\"scaleMetricValues\":false,\"interval\":\"auto\",\"drop_partials\":false,\"min_doc_count\":1,\"extended_bounds\":{}},\"schema\":\"segment\"},{\"id\":\"3\",\"enabled\":true,\"type\":\"filters\",\"params\":{\"filters\":[{\"input\":{\"query\":\"http.response.status_code:[200 TO 299]\",\"language\":\"lucene\"},\"label\":\"200s\"},{\"input\":{\"query\":\"http.response.status_code:[300 TO 399]\",\"language\":\"lucene\"},\"label\":\"300s\"},{\"input\":{\"query\":\"http.response.status_code:[400 TO 499]\",\"language\":\"lucene\"},\"label\":\"400s\"},{\"input\":{\"query\":\"http.response.status_code:[500 TO 599]\",\"language\":\"lucene\"},\"label\":\"500s\"},{\"input\":{\"query\":\"http.response.status_code:0\",\"language\":\"lucene\"},\"label\":\"0\"}]},\"schema\":\"group\"}],\"params\":{\"type\":\"histogram\",\"grid\":{\"categoryLines\":false},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"filter\":true,\"truncate\":100},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Count\"}}],\"seriesParams\":[{\"show\":true,\"type\":\"histogram\",\"mode\":\"stacked\",\"data\":{\"label\":\"Count\",\"id\":\"1\"},\"valueAxis\":\"ValueAxis-1\",\"drawLinesBetweenPoints\":true,\"lineWidth\":2,\"showCircles\":true}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"times\":[],\"addTimeMarker\":false,\"labels\":{\"show\":false},\"thresholdLine\":{\"show\":false,\"value\":10,\"width\":1,\"style\":\"full\",\"color\":\"#E7664C\"}}}" + }, + "id": "3b49a65d-54d8-483d-a8f0-3d7c855e1ecf", + "migrationVersion": { + "visualization": "7.10.0" + }, + "references": [ + { + "id": "d80e05b2-518c-4c3d-9651-4c9d8632dce4", + "name": "search_0", + "type": "search" + } + ], + "type": "visualization", + "updated_at": "2023-02-26T00:34:36.592Z", + "version": "WzYzLDdd" +} +{ + "attributes": { + "columns": [ + "_source" + ], + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\n \"highlightAll\": true,\n \"query\": {\n \"query\": \"http.response.status_code >= 300 and event.domain:nginx.access\",\n \"language\": \"kuery\"\n },\n \"version\": true,\n \"highlight\": {\n \"post_tags\": [\n \"@/kibana-highlighted-field@\"\n ],\n \"fields\": {\n \"*\": {}\n },\n \"pre_tags\": [\n \"@kibana-highlighted-field@\"\n ],\n \"require_field_match\": false,\n \"fragment_size\": 2147483647\n },\n \"filter\": [],\n \"indexRefName\": \"kibanaSavedObjectMeta.searchSourceJSON.index\"\n}" + }, + "sort": [ + [ + "@timestamp", + "desc" + ] + ], + "title": "[NGINX Core Logs 1.0] Nginx Error Logs", + "version": 1 + }, + "id": "9f820fbe-ddde-43a2-9402-30bd295c97f6", + "migrationVersion": { + "search": "7.9.3" + }, + "references": [ + { + "id": "47892350-b495-11ed-af0a-cf5c93b5a3b6", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "search", + "updated_at": "2023-02-26T00:34:36.592Z", + "version": "WzY0LDdd" +} +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[]}" + }, + "savedSearchRefName": "search_0", + "title": "[NGINX Core Logs 1.0] Errors over time", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"[NGINX Core Logs 1.0] Errors over time\",\"type\":\"histogram\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"params\":{},\"schema\":\"metric\"},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"params\":{\"field\":\"@timestamp\",\"timeRange\":{\"from\":\"now-24h\",\"to\":\"now\"},\"useNormalizedOpenSearchInterval\":true,\"scaleMetricValues\":false,\"interval\":\"auto\",\"drop_partials\":false,\"min_doc_count\":1,\"extended_bounds\":{}},\"schema\":\"segment\"}],\"params\":{\"type\":\"histogram\",\"grid\":{\"categoryLines\":false},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"filter\":true,\"truncate\":100},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Count\"}}],\"seriesParams\":[{\"show\":true,\"type\":\"histogram\",\"mode\":\"stacked\",\"data\":{\"label\":\"Count\",\"id\":\"1\"},\"valueAxis\":\"ValueAxis-1\",\"drawLinesBetweenPoints\":true,\"lineWidth\":2,\"showCircles\":true}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"times\":[],\"addTimeMarker\":false,\"labels\":{\"show\":false},\"thresholdLine\":{\"show\":false,\"value\":10,\"width\":1,\"style\":\"full\",\"color\":\"#E7664C\"}}}" + }, + "id": "865e577b-634b-4a65-b9d6-7e324c395d18", + "migrationVersion": { + "visualization": "7.10.0" + }, + "references": [ + { + "id": "9f820fbe-ddde-43a2-9402-30bd295c97f6", + "name": "search_0", + "type": "search" + } + ], + "type": "visualization", + "updated_at": "2023-02-26T00:34:36.592Z", + "version": "WzY1LDdd" +} +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}" + }, + "savedSearchRefName": "search_0", + "title": "Top Paths", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Top Paths\",\"type\":\"table\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"params\":{},\"schema\":\"metric\"},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"params\":{\"field\":\"http.url\",\"orderBy\":\"1\",\"order\":\"desc\",\"size\":10,\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"customLabel\":\"Paths\"},\"schema\":\"bucket\"}],\"params\":{\"perPage\":10,\"showPartialRows\":false,\"showMetricsAtAllLevels\":false,\"showTotal\":false,\"totalFunc\":\"sum\",\"percentageCol\":\"\"}}" + }, + "id": "dc1803f0-b478-11ed-9063-ebe46f9ac203", + "migrationVersion": { + "visualization": "7.10.0" + }, + "references": [ + { + "id": "d80e05b2-518c-4c3d-9651-4c9d8632dce4", + "name": "search_0", + "type": "search" + } + ], + "type": "visualization", + "updated_at": "2023-02-26T00:34:36.592Z", + "version": "WzY2LDdd" +} +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}" + }, + "savedSearchRefName": "search_0", + "title": "Data Volume", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Data Volume\",\"type\":\"area\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"sum\",\"params\":{\"field\":\"http.response.bytes\",\"customLabel\":\"Response Bytes\"},\"schema\":\"metric\"},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"params\":{\"field\":\"observerTime\",\"timeRange\":{\"from\":\"now-15m\",\"to\":\"now\"},\"useNormalizedOpenSearchInterval\":true,\"scaleMetricValues\":false,\"interval\":\"auto\",\"drop_partials\":false,\"min_doc_count\":1,\"extended_bounds\":{},\"customLabel\":\"\"},\"schema\":\"segment\"}],\"params\":{\"type\":\"area\",\"grid\":{\"categoryLines\":false},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"filter\":true,\"truncate\":100},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Response Bytes\"}}],\"seriesParams\":[{\"show\":true,\"type\":\"area\",\"mode\":\"stacked\",\"data\":{\"label\":\"Response Bytes\",\"id\":\"1\"},\"drawLinesBetweenPoints\":true,\"lineWidth\":2,\"showCircles\":true,\"interpolate\":\"linear\",\"valueAxis\":\"ValueAxis-1\"}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"times\":[],\"addTimeMarker\":false,\"thresholdLine\":{\"show\":false,\"value\":10,\"width\":1,\"style\":\"full\",\"color\":\"#E7664C\"},\"labels\":{}}}" + }, + "id": "99acc580-b47a-11ed-9063-ebe46f9ac203", + "migrationVersion": { + "visualization": "7.10.0" + }, + "references": [ + { + "id": "d80e05b2-518c-4c3d-9651-4c9d8632dce4", + "name": "search_0", + "type": "search" + } + ], + "type": "visualization", + "updated_at": "2023-02-26T00:34:36.592Z", + "version": "WzY3LDdd" +} +{ + "attributes": { + "description": "requests per minute aggregation", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Req-per-min", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Req-per-min\",\"type\":\"table\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"moving_avg\",\"params\":{\"metricAgg\":\"custom\",\"customMetric\":{\"id\":\"1-metric\",\"enabled\":true,\"type\":\"count\",\"params\":{}},\"window\":5,\"script\":\"MovingFunctions.unweightedAvg(values)\"},\"schema\":\"metric\"},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"params\":{\"field\":\"@timestamp\",\"timeRange\":{\"from\":\"2023-02-24T17:25:00.000Z\",\"to\":\"2023-02-24T17:30:00.000Z\"},\"useNormalizedOpenSearchInterval\":true,\"scaleMetricValues\":false,\"interval\":\"m\",\"drop_partials\":false,\"min_doc_count\":0,\"extended_bounds\":{},\"customLabel\":\"Req/Min\"},\"schema\":\"bucket\"}],\"params\":{\"perPage\":10,\"showPartialRows\":false,\"showMetricsAtAllLevels\":false,\"showTotal\":false,\"totalFunc\":\"sum\",\"percentageCol\":\"\"}}" + }, + "id": "01ea64d0-b62f-11ed-a677-43d7aa86763b", + "migrationVersion": { + "visualization": "7.10.0" + }, + "references": [ + { + "id": "47892350-b495-11ed-af0a-cf5c93b5a3b6", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2023-02-26T23:40:53.020Z", + "version": "WzcyLDdd" +} +{ + "attributes": { + "description": "Nginx dashboard with basic Observability on access / error logs", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"language\":\"kuery\",\"query\":\"\"},\"filter\":[]}" + }, + "optionsJSON": "{\"hidePanelTitles\":false,\"useMargins\":true}", + "panelsJSON": "[{\"version\":\"2.5.0\",\"gridData\":{\"h\":8,\"i\":\"1f31e50b-06e3-41e6-972e-e4e5fe1a9872\",\"w\":48,\"x\":0,\"y\":0},\"panelIndex\":\"1f31e50b-06e3-41e6-972e-e4e5fe1a9872\",\"embeddableConfig\":{},\"panelRefName\":\"panel_0\"},{\"version\":\"2.5.0\",\"gridData\":{\"h\":9,\"i\":\"d91a8da4-b34b-470a-aca6-9c76b47cd6fb\",\"w\":24,\"x\":0,\"y\":8},\"panelIndex\":\"d91a8da4-b34b-470a-aca6-9c76b47cd6fb\",\"embeddableConfig\":{},\"panelRefName\":\"panel_1\"},{\"version\":\"2.5.0\",\"gridData\":{\"h\":15,\"i\":\"27149e5a-3a77-4f3c-800e-8a160c3765f4\",\"w\":24,\"x\":24,\"y\":8},\"panelIndex\":\"27149e5a-3a77-4f3c-800e-8a160c3765f4\",\"embeddableConfig\":{},\"panelRefName\":\"panel_2\"},{\"version\":\"2.5.0\",\"gridData\":{\"x\":0,\"y\":17,\"w\":24,\"h\":15,\"i\":\"4d8c2aa7-159c-4a1a-80ff-00a9299056ce\"},\"panelIndex\":\"4d8c2aa7-159c-4a1a-80ff-00a9299056ce\",\"embeddableConfig\":{},\"panelRefName\":\"panel_3\"},{\"version\":\"2.5.0\",\"gridData\":{\"x\":24,\"y\":23,\"w\":24,\"h\":15,\"i\":\"800b7f19-f50c-417f-8987-21b930531cbe\"},\"panelIndex\":\"800b7f19-f50c-417f-8987-21b930531cbe\",\"embeddableConfig\":{},\"panelRefName\":\"panel_4\"}]", + "timeRestore": false, + "title": "[NGINX Core Logs 1.0] Overview", + "version": 1 + }, + "id": "96847220-5261-44d0-89b4-65f3a659f13a", + "migrationVersion": { + "dashboard": "7.9.3" + }, + "references": [ + { + "id": "3b49a65d-54d8-483d-a8f0-3d7c855e1ecf", + "name": "panel_0", + "type": "visualization" + }, + { + "id": "865e577b-634b-4a65-b9d6-7e324c395d18", + "name": "panel_1", + "type": "visualization" + }, + { + "id": "dc1803f0-b478-11ed-9063-ebe46f9ac203", + "name": "panel_2", + "type": "visualization" + }, + { + "id": "99acc580-b47a-11ed-9063-ebe46f9ac203", + "name": "panel_3", + "type": "visualization" + }, + { + "id": "01ea64d0-b62f-11ed-a677-43d7aa86763b", + "name": "panel_4", + "type": "visualization" + } + ], + "type": "dashboard", + "updated_at": "2023-02-26T23:44:09.855Z", + "version": "WzczLDdd" +} +{ + "exportedCount": 9, + "missingRefCount": 0, + "missingReferences": [] +} \ No newline at end of file diff --git a/server/routes/placeholder/testing.ndjson b/server/routes/placeholder/testing.ndjson new file mode 100644 index 0000000000..da32e03521 --- /dev/null +++ b/server/routes/placeholder/testing.ndjson @@ -0,0 +1,14 @@ +{"attributes":{"fields":"[{\"count\":0,\"name\":\"_id\",\"type\":\"string\",\"esTypes\":[\"_id\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"count\":0,\"name\":\"_index\",\"type\":\"string\",\"esTypes\":[\"_index\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"count\":0,\"name\":\"_score\",\"type\":\"number\",\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"_source\",\"type\":\"_source\",\"esTypes\":[\"_source\"],\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"_type\",\"type\":\"string\",\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"droppedAttributesCount\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"droppedEventsCount\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"droppedLinksCount\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":1,\"name\":\"durationInNanos\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"endTime\",\"type\":\"date\",\"esTypes\":[\"date_nanos\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"events.attributes.app@payment@transaction@id\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.app@payment@transaction@id.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"events.attributes.app@payment@transaction@id\"},\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.app@quote@cost@total\",\"type\":\"number\",\"esTypes\":[\"float\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.app@shipping@cost@total\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.app@shipping@cost@total.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"events.attributes.app@shipping@cost@total\"},\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.app@shipping@tracking@id\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.app@shipping@tracking@id.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"events.attributes.app@shipping@tracking@id\"},\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.exception@escaped\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.exception@escaped.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"events.attributes.exception@escaped\"},\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.exception@message\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.exception@message.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"events.attributes.exception@message\"},\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.exception@stacktrace\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.exception@stacktrace.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"events.attributes.exception@stacktrace\"},\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.exception@type\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.exception@type.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"events.attributes.exception@type\"},\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.message\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.message.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"events.attributes.message\"},\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.message@id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.message@type\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.message@type.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"events.attributes.message@type\"},\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.message@uncompressed_size\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.droppedAttributesCount\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.name\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.name.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"events.name\"},\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.time\",\"type\":\"date\",\"esTypes\":[\"date_nanos\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"instrumentationScope.name\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"instrumentationScope.name.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"instrumentationScope.name\"}}},{\"count\":0,\"name\":\"instrumentationScope.version\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"instrumentationScope.version.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"instrumentationScope.version\"}}},{\"count\":0,\"name\":\"kind\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"links.droppedAttributesCount\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"nested\":{\"path\":\"links\"}}},{\"count\":0,\"name\":\"links.spanId\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false,\"subType\":{\"nested\":{\"path\":\"links\"}}},{\"count\":0,\"name\":\"links.spanId.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"links.spanId\"},\"nested\":{\"path\":\"links\"}}},{\"count\":0,\"name\":\"links.traceId\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false,\"subType\":{\"nested\":{\"path\":\"links\"}}},{\"count\":0,\"name\":\"links.traceId.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"links.traceId\"},\"nested\":{\"path\":\"links\"}}},{\"count\":0,\"name\":\"links.traceState\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false,\"subType\":{\"nested\":{\"path\":\"links\"}}},{\"count\":0,\"name\":\"links.traceState.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"links.traceState\"},\"nested\":{\"path\":\"links\"}}},{\"count\":0,\"name\":\"name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"parentSpanId\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.container@id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.host@arch\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.host@name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.k8s@namespace@name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.k8s@node@name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.k8s@pod@name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.library@language\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.library@name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.library@version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.os@description\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.os@name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.os@type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.os@version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.process@command\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.process@command_args\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.process@command_line\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.process@executable@name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.process@executable@path\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.process@owner\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.process@pid\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.process@runtime@description\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.process@runtime@name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.process@runtime@version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.service@instance@id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.service@name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.service@namespace\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.telemetry@auto@version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.telemetry@sdk@language\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.telemetry@sdk@name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.telemetry@sdk@version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":3,\"name\":\"serviceName\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@ads@ad_request_type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@ads@ad_response_type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@ads@category\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@ads@contextKeys\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@ads@contextKeys@count\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@ads@count\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@cart@items@count\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@currency@conversion@from\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@currency@conversion@to\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@email@recipient\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@featureflag@enabled\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@featureflag@name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@filtered_products@count\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@filtered_products@list\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@order@amount\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@order@id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@order@items@count\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@payment@amount\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@payment@card_type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@payment@card_valid\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@payment@charged\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@product@id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@product@name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@product@quantity\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@products@count\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@products_recommended@count\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@quote@cost@total\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@quote@items@count\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@recommendation@cache_enabled\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@shipping@amount\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@shipping@cost@total\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@shipping@items@count\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@shipping@tracking@id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@shipping@zip_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@synthetic_request\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@user@currency\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@user@id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.busy_ns\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.canceled\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.code@filepath\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.code@function\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.code@lineno\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.code@namespace\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.component\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.db@connection_string\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.db@instance\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.db@name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.db@operation\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.db@redis@database_index\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.db@redis@flags\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.db@sql@table\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.db@statement\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.db@system\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.db@type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.db@url\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.db@user\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.decode_time_microseconds\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.downstream_cluster\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.error\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.error@cause_chain\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.error@message\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.fid_log_tracking_id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.grpc@error_message\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.grpc@error_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.guid:x-request-id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.http@client_ip\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.http@flavor\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":1,\"name\":\"span.attributes.http@host\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":2,\"name\":\"span.attributes.http@method\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.http@protocol\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.http@request_content_length\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.http@request_content_length_uncompressed\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.http@response_content_length\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":1,\"name\":\"span.attributes.http@route\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.http@scheme\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":2,\"name\":\"span.attributes.http@status_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.http@status_text\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.http@target\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.http@url\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.http@user_agent\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.idle_ns\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.idle_time_microseconds\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.messaging@destination\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.messaging@destination_kind\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.messaging@kafka@message@offset\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.messaging@kafka@partition\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.messaging@message_id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.messaging@message_payload_size_bytes\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.messaging@operation\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.messaging@system\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.net@host@ip\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.net@host@name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.net@host@port\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.net@peer@ip\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.net@peer@name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.net@peer@port\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.net@sock@peer@addr\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.net@sock@peer@port\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.net@transport\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.node_id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.peer@address\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.peer@ipv4\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.peer@service\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.phoenix@action\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.phoenix@plug\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.proxy_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.query_time_microseconds\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.queue_time_microseconds\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.request_size\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.response_flags\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.response_size\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.rpc@grpc@status_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.rpc@method\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.rpc@service\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.rpc@system\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.rpc@user_agent\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.sinatra@template_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.source\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.span@kind\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.target_url\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.thread@id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.thread@name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.total_time_microseconds\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.upstream_address\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.upstream_cluster\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.upstream_cluster@name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.user_agent\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.zone\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"spanId\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"startTime\",\"type\":\"date\",\"esTypes\":[\"date_nanos\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":2,\"name\":\"status.code\",\"type\":\"number\",\"esTypes\":[\"integer\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"status.message\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"traceGroup\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"traceGroupFields.durationInNanos\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"traceGroupFields.endTime\",\"type\":\"date\",\"esTypes\":[\"date_nanos\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"traceGroupFields.statusCode\",\"type\":\"number\",\"esTypes\":[\"integer\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":1,\"name\":\"traceId\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"traceState\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"traceState.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"traceState\"}}}]","timeFieldName":"endTime","title":"otel-v1-apm-sp*"},"id":"ab680ce0-ccc5-11ed-875a-c33867f208cf","migrationVersion":{"index-pattern":"7.6.0"},"references":[],"type":"index-pattern","updated_at":"2023-05-10T20:01:38.410Z","version":"WzM1MiwzMF0="} +{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"serviceName: dd-api-service\",\"language\":\"lucene\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"},"title":"[dd][metrics][requests]","uiStateJSON":"{}","version":1,"visState":"{\"title\":\"[dd][metrics][requests]\",\"type\":\"metric\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"cardinality\",\"params\":{\"field\":\"traceId\",\"customLabel\":\" \"},\"schema\":\"metric\"}],\"params\":{\"addTooltip\":true,\"addLegend\":false,\"type\":\"metric\",\"metric\":{\"percentageMode\":false,\"useRanges\":false,\"colorSchema\":\"Greens\",\"metricColorMode\":\"Labels\",\"colorsRange\":[{\"from\":0,\"to\":1},{\"from\":10000,\"to\":20000}],\"labels\":{\"show\":true},\"invertColors\":false,\"style\":{\"bgFill\":\"#000\",\"bgColor\":false,\"labelColor\":false,\"subText\":\"\",\"fontSize\":30}}}}"},"id":"be476270-ef43-11ed-8680-adcbd0ec4d25","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"ab680ce0-ccc5-11ed-875a-c33867f208cf","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"visualization","updated_at":"2023-05-10T20:01:38.410Z","version":"WzM2NiwzMF0="} +{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"serviceName: dd-api-service\",\"language\":\"lucene\"},\"filter\":[{\"meta\":{\"type\":\"phrases\",\"key\":\"status.code\",\"value\":\"1, 2\",\"params\":[\"1\",\"2\"],\"alias\":null,\"negate\":false,\"disabled\":false,\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"bool\":{\"should\":[{\"match_phrase\":{\"status.code\":\"1\"}},{\"match_phrase\":{\"status.code\":\"2\"}}],\"minimum_should_match\":1}},\"$state\":{\"store\":\"appState\"}}],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"},"title":"[dd][metrics][errors]","uiStateJSON":"{}","version":1,"visState":"{\"title\":\"[dd][metrics][errors]\",\"type\":\"metric\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"cardinality\",\"params\":{\"field\":\"traceId\",\"customLabel\":\" \"},\"schema\":\"metric\"}],\"params\":{\"addTooltip\":true,\"addLegend\":false,\"type\":\"metric\",\"metric\":{\"percentageMode\":false,\"useRanges\":false,\"colorSchema\":\"Reds\",\"metricColorMode\":\"Labels\",\"colorsRange\":[{\"from\":0,\"to\":1},{\"from\":10000,\"to\":20000}],\"labels\":{\"show\":true},\"invertColors\":false,\"style\":{\"bgFill\":\"#000\",\"bgColor\":false,\"labelColor\":false,\"subText\":\"\",\"fontSize\":30}}}}"},"id":"3e7a7220-ef44-11ed-8680-adcbd0ec4d25","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"ab680ce0-ccc5-11ed-875a-c33867f208cf","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"},{"id":"ab680ce0-ccc5-11ed-875a-c33867f208cf","name":"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index","type":"index-pattern"}],"type":"visualization","updated_at":"2023-05-10T20:01:38.410Z","version":"WzM2NCwzMF0="} +{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"serviceName:dd-api-service\",\"language\":\"lucene\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"},"title":"[dd][metrics][duration][millis]","uiStateJSON":"{}","version":1,"visState":"{\"title\":\"[dd][metrics][duration][millis]\",\"type\":\"metric\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"avg\",\"params\":{\"field\":\"durationInNanos\",\"json\":\"{\\\"script\\\":\\\"(_value)/1e+6\\\"}\",\"customLabel\":\"Milliseconds\"},\"schema\":\"metric\"}],\"params\":{\"addTooltip\":true,\"addLegend\":false,\"type\":\"metric\",\"metric\":{\"percentageMode\":false,\"useRanges\":false,\"colorSchema\":\"Greens\",\"metricColorMode\":\"Labels\",\"colorsRange\":[{\"from\":0,\"to\":1}],\"labels\":{\"show\":true},\"invertColors\":false,\"style\":{\"bgFill\":\"#000\",\"bgColor\":false,\"labelColor\":false,\"subText\":\"\",\"fontSize\":30}}}}"},"id":"583d07d0-ef45-11ed-9ddd-779f1be269b2","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"ab680ce0-ccc5-11ed-875a-c33867f208cf","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"visualization","updated_at":"2023-05-10T20:01:38.410Z","version":"WzM2NSwzMF0="} +{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"serviceName: dd-api-service\",\"language\":\"lucene\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"},"title":"[dd][new][duration][percentiles]","uiStateJSON":"{}","version":1,"visState":"{\"title\":\"[dd][new][duration][percentiles]\",\"type\":\"metric\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"percentiles\",\"params\":{\"field\":\"traceGroupFields.durationInNanos\",\"percents\":[98,90,80,50],\"json\":\"{\\\"script\\\":\\\"(_value)/1e+6\\\"}\",\"customLabel\":\" \"},\"schema\":\"metric\"}],\"params\":{\"addTooltip\":true,\"addLegend\":false,\"type\":\"metric\",\"metric\":{\"percentageMode\":false,\"useRanges\":false,\"colorSchema\":\"Greens\",\"metricColorMode\":\"Labels\",\"colorsRange\":[{\"from\":0,\"to\":1}],\"labels\":{\"show\":true},\"invertColors\":false,\"style\":{\"bgFill\":\"#000\",\"bgColor\":false,\"labelColor\":false,\"subText\":\"\",\"fontSize\":30}}}}"},"id":"8ee41a60-ef4c-11ed-8680-adcbd0ec4d25","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"ab680ce0-ccc5-11ed-875a-c33867f208cf","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"visualization","updated_at":"2023-05-10T20:01:38.410Z","version":"WzM2NywzMF0="} +{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"serviceName: dd-api-service\",\"language\":\"lucene\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"},"title":"[dd][bar][requests_by_api]","uiStateJSON":"{}","version":1,"visState":"{\"title\":\"[dd][bar][requests_by_api]\",\"type\":\"histogram\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"params\":{},\"schema\":\"metric\"},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"params\":{\"field\":\"endTime\",\"timeRange\":{\"from\":\"now-24h\",\"to\":\"now\"},\"useNormalizedOpenSearchInterval\":true,\"scaleMetricValues\":false,\"interval\":\"auto\",\"drop_partials\":false,\"min_doc_count\":1,\"extended_bounds\":{},\"customLabel\":\"Date\"},\"schema\":\"segment\"},{\"id\":\"3\",\"enabled\":true,\"type\":\"terms\",\"params\":{\"field\":\"span.attributes.http@route\",\"orderBy\":\"1\",\"order\":\"desc\",\"size\":5,\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"customLabel\":\"API\"},\"schema\":\"group\"}],\"params\":{\"type\":\"histogram\",\"grid\":{\"categoryLines\":false,\"valueAxis\":\"ValueAxis-1\"},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"filter\":true,\"truncate\":100,\"rotate\":0},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Count\"}}],\"seriesParams\":[{\"show\":true,\"type\":\"histogram\",\"mode\":\"stacked\",\"data\":{\"label\":\"Count\",\"id\":\"1\"},\"valueAxis\":\"ValueAxis-1\",\"drawLinesBetweenPoints\":true,\"lineWidth\":2,\"showCircles\":true}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"top\",\"times\":[],\"addTimeMarker\":false,\"labels\":{\"show\":true},\"thresholdLine\":{\"show\":false,\"value\":10,\"width\":1,\"style\":\"full\",\"color\":\"#E7664C\"}}}"},"id":"d599ed10-ef45-11ed-9b98-c36d505f6575","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"ab680ce0-ccc5-11ed-875a-c33867f208cf","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"visualization","updated_at":"2023-05-10T20:01:38.410Z","version":"WzM2OCwzMF0="} +{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"serviceName: dd-api-service\",\"language\":\"lucene\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"},"title":"[dd][bar][latency_by_api]","uiStateJSON":"{}","version":1,"visState":"{\"title\":\"[dd][bar][latency_by_api]\",\"type\":\"histogram\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"avg\",\"params\":{\"field\":\"durationInNanos\",\"json\":\"{\\\"script\\\":\\\"(_value)/1e+6\\\"}\",\"customLabel\":\"Latency (ms)\"},\"schema\":\"metric\"},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"params\":{\"field\":\"endTime\",\"timeRange\":{\"from\":\"now-24h\",\"to\":\"now\"},\"useNormalizedOpenSearchInterval\":true,\"scaleMetricValues\":false,\"interval\":\"auto\",\"drop_partials\":false,\"min_doc_count\":1,\"extended_bounds\":{},\"customLabel\":\"Date\"},\"schema\":\"segment\"},{\"id\":\"3\",\"enabled\":true,\"type\":\"terms\",\"params\":{\"field\":\"span.attributes.http@route\",\"orderBy\":\"1\",\"order\":\"desc\",\"size\":5,\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"customLabel\":\"API\"},\"schema\":\"group\"}],\"params\":{\"type\":\"histogram\",\"grid\":{\"categoryLines\":false,\"valueAxis\":\"ValueAxis-1\"},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"filter\":true,\"truncate\":100,\"rotate\":0},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Latency (ms)\"}}],\"seriesParams\":[{\"show\":true,\"type\":\"area\",\"mode\":\"stacked\",\"data\":{\"label\":\"Latency (ms)\",\"id\":\"1\"},\"valueAxis\":\"ValueAxis-1\",\"drawLinesBetweenPoints\":true,\"lineWidth\":2,\"showCircles\":true}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"top\",\"times\":[],\"addTimeMarker\":false,\"labels\":{\"show\":true},\"thresholdLine\":{\"show\":false,\"value\":10,\"width\":1,\"style\":\"full\",\"color\":\"#E7664C\"}}}"},"id":"cc593160-ef46-11ed-aa9c-59d0a6a55ce7","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"ab680ce0-ccc5-11ed-875a-c33867f208cf","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"visualization","updated_at":"2023-05-10T20:01:38.410Z","version":"WzM2OSwzMF0="} +{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"serviceName: dd-api-service\",\"language\":\"lucene\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"},"title":"[dd][data][requests_api]","uiStateJSON":"{\"vis\":{\"params\":{\"sort\":{\"columnIndex\":null,\"direction\":null}}}}","version":1,"visState":"{\"title\":\"[dd][data][requests_api]\",\"type\":\"table\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"params\":{},\"schema\":\"metric\"},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"params\":{\"field\":\"span.attributes.http@route\",\"orderBy\":\"1\",\"order\":\"desc\",\"size\":5,\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"customLabel\":\"Api\"},\"schema\":\"bucket\"},{\"id\":\"3\",\"enabled\":true,\"type\":\"terms\",\"params\":{\"field\":\"span.attributes.http@method\",\"orderBy\":\"1\",\"order\":\"desc\",\"size\":5,\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"customLabel\":\"Method\"},\"schema\":\"bucket\"},{\"id\":\"4\",\"enabled\":true,\"type\":\"terms\",\"params\":{\"field\":\"serviceName\",\"orderBy\":\"1\",\"order\":\"desc\",\"size\":5,\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"customLabel\":\"Service\"},\"schema\":\"bucket\"}],\"params\":{\"perPage\":10,\"showPartialRows\":false,\"showMetricsAtAllLevels\":false,\"sort\":{\"columnIndex\":null,\"direction\":null},\"showTotal\":false,\"totalFunc\":\"sum\",\"percentageCol\":\"\"}}"},"id":"83494640-ef46-11ed-9ddd-779f1be269b2","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"ab680ce0-ccc5-11ed-875a-c33867f208cf","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"visualization","updated_at":"2023-05-10T20:01:38.410Z","version":"WzM3MCwzMF0="} +{"attributes":{"columns":["traceId","span.attributes.http@method","span.attributes.http@route","span.attributes.http@status_code","durationInNanos"],"description":"","hits":0,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\"highlightAll\":true,\"version\":true,\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[{\"meta\":{\"alias\":null,\"negate\":false,\"disabled\":false,\"type\":\"phrase\",\"key\":\"serviceName\",\"params\":{\"query\":\"dd-api-service\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match_phrase\":{\"serviceName\":\"dd-api-service\"}},\"$state\":{\"store\":\"appState\"}}],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"},"sort":[],"title":"[dd][ss]","version":1},"id":"613149d0-ef47-11ed-aa9c-59d0a6a55ce7","migrationVersion":{"search":"7.9.3"},"references":[{"id":"ab680ce0-ccc5-11ed-875a-c33867f208cf","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"},{"id":"ab680ce0-ccc5-11ed-875a-c33867f208cf","name":"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index","type":"index-pattern"}],"type":"search","updated_at":"2023-05-10T20:01:38.410Z","version":"WzM3MSwzMF0="} +{"attributes":{"fields":"[{\"count\":0,\"name\":\"_id\",\"type\":\"string\",\"esTypes\":[\"_id\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"count\":0,\"name\":\"_index\",\"type\":\"string\",\"esTypes\":[\"_index\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"count\":0,\"name\":\"_score\",\"type\":\"number\",\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"_source\",\"type\":\"_source\",\"esTypes\":[\"_source\"],\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"_type\",\"type\":\"string\",\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"droppedAttributesCount\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"droppedEventsCount\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"droppedLinksCount\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"durationInNanos\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"endTime\",\"type\":\"date\",\"esTypes\":[\"date_nanos\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"events.attributes.exception@message\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.exception@message.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"events.attributes.exception@message\"},\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.exception@stacktrace\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.exception@stacktrace.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"events.attributes.exception@stacktrace\"},\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.exception@type\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.exception@type.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"events.attributes.exception@type\"},\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.droppedAttributesCount\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.name\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.name.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"events.name\"},\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.time\",\"type\":\"date\",\"esTypes\":[\"date_nanos\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"instrumentationLibrary.name\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"instrumentationLibrary.name.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"instrumentationLibrary.name\"}}},{\"count\":0,\"name\":\"instrumentationLibrary.version\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"instrumentationLibrary.version.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"instrumentationLibrary.version\"}}},{\"count\":0,\"name\":\"kind\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"parentSpanId\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.host@hostname\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"resource.attributes.host@hostname.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"resource.attributes.host@hostname\"}}},{\"count\":0,\"name\":\"resource.attributes.service@instance@id\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"resource.attributes.service@instance@id.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"resource.attributes.service@instance@id\"}}},{\"count\":0,\"name\":\"resource.attributes.service@name\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"resource.attributes.service@name.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"resource.attributes.service@name\"}}},{\"count\":0,\"name\":\"resource.attributes.telemetry@auto@version\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"resource.attributes.telemetry@auto@version.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"resource.attributes.telemetry@auto@version\"}}},{\"count\":0,\"name\":\"resource.attributes.telemetry@sdk@language\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"resource.attributes.telemetry@sdk@language.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"resource.attributes.telemetry@sdk@language\"}}},{\"count\":0,\"name\":\"resource.attributes.telemetry@sdk@name\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"resource.attributes.telemetry@sdk@name.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"resource.attributes.telemetry@sdk@name\"}}},{\"count\":0,\"name\":\"resource.attributes.telemetry@sdk@version\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"resource.attributes.telemetry@sdk@version.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"resource.attributes.telemetry@sdk@version\"}}},{\"count\":0,\"name\":\"serviceName\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.component\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.component.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.component\"}}},{\"count\":0,\"name\":\"span.attributes.db@instance\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.db@instance.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.db@instance\"}}},{\"count\":0,\"name\":\"span.attributes.db@statement\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.db@statement.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.db@statement\"}}},{\"count\":0,\"name\":\"span.attributes.db@statement@parameters\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.db@statement@parameters.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.db@statement@parameters\"}}},{\"count\":0,\"name\":\"span.attributes.db@type\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.db@type.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.db@type\"}}},{\"count\":0,\"name\":\"span.attributes.db@user\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.db@user.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.db@user\"}}},{\"count\":0,\"name\":\"span.attributes.host@port\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.http@client_ip\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.http@client_ip.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.http@client_ip\"}}},{\"count\":0,\"name\":\"span.attributes.http@flavor\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.http@flavor.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.http@flavor\"}}},{\"count\":0,\"name\":\"span.attributes.http@host\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.http@host.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.http@host\"}}},{\"count\":0,\"name\":\"span.attributes.http@method\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.http@method.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.http@method\"}}},{\"count\":0,\"name\":\"span.attributes.http@route\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.http@route.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.http@route\"}}},{\"count\":0,\"name\":\"span.attributes.http@scheme\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.http@scheme.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.http@scheme\"}}},{\"count\":0,\"name\":\"span.attributes.http@server_name\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.http@server_name.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.http@server_name\"}}},{\"count\":0,\"name\":\"span.attributes.http@status_code\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.http@status_text\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.http@status_text.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.http@status_text\"}}},{\"count\":0,\"name\":\"span.attributes.http@target\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.http@target.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.http@target\"}}},{\"count\":0,\"name\":\"span.attributes.http@url\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.http@url.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.http@url\"}}},{\"count\":0,\"name\":\"span.attributes.http@user_agent\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.http@user_agent.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.http@user_agent\"}}},{\"count\":0,\"name\":\"span.attributes.net@peer@ip\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.net@peer@ip.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.net@peer@ip\"}}},{\"count\":0,\"name\":\"span.attributes.net@peer@name\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.net@peer@name.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.net@peer@name\"}}},{\"count\":0,\"name\":\"span.attributes.net@peer@port\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.thread@id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.thread@name\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.thread@name.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.thread@name\"}}},{\"count\":0,\"name\":\"spanId\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"startTime\",\"type\":\"date\",\"esTypes\":[\"date_nanos\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"status.code\",\"type\":\"number\",\"esTypes\":[\"integer\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"status.message\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"traceGroup\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"traceGroupFields.durationInNanos\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"traceGroupFields.endTime\",\"type\":\"date\",\"esTypes\":[\"date_nanos\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"traceGroupFields.statusCode\",\"type\":\"number\",\"esTypes\":[\"integer\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"traceId\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"traceState\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"traceState.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"traceState\"}}}]","timeFieldName":"startTime","title":"otel-v1-apm-span-*"},"id":"39e1c110-ef4d-11ed-aaaa-39d41c2520f1","migrationVersion":{"index-pattern":"7.6.0"},"references":[],"type":"index-pattern","updated_at":"2023-05-10T20:00:52.893Z","version":"WzM0NCwzMF0="} +{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}"},"title":"Trace Selector Control","uiStateJSON":"{}","version":1,"visState":"{\"title\":\"Trace Selector Control\",\"type\":\"input_control_vis\",\"aggs\":[],\"params\":{\"controls\":[{\"id\":\"1683748927403\",\"fieldName\":\"traceId\",\"parent\":\"\",\"label\":\"Trace Selector\",\"type\":\"list\",\"options\":{\"type\":\"terms\",\"multiselect\":true,\"dynamicOptions\":true,\"size\":5,\"order\":\"desc\"},\"indexPatternRefName\":\"control_0_index_pattern\"}],\"updateFiltersOnChange\":false,\"useTimeFilter\":false,\"pinFilters\":false}}"},"id":"a6b5f610-ef6d-11ed-aaaa-39d41c2520f1","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"39e1c110-ef4d-11ed-aaaa-39d41c2520f1","name":"control_0_index_pattern","type":"index-pattern"}],"type":"visualization","updated_at":"2023-05-10T20:02:54.576Z","version":"WzM3NywzMF0="} +{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"},"title":"Service Breakdown by Time for a Trace","uiStateJSON":"{}","version":1,"visState":"{\"title\":\"Service Breakdown by Time for a Trace\",\"type\":\"pie\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"sum\",\"params\":{\"field\":\"durationInNanos\"},\"schema\":\"metric\"},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"params\":{\"field\":\"serviceName\",\"orderBy\":\"1\",\"order\":\"desc\",\"size\":1000,\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\"},\"schema\":\"segment\"}],\"params\":{\"type\":\"pie\",\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"isDonut\":true,\"labels\":{\"show\":false,\"values\":true,\"last_level\":true,\"truncate\":100}}}"},"id":"d0eab5b0-ef6d-11ed-aaaa-39d41c2520f1","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"ab680ce0-ccc5-11ed-875a-c33867f208cf","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"visualization","updated_at":"2023-05-10T20:04:05.387Z","version":"WzM3OCwzMF0="} +{"attributes":{"description":"","hits":0,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}"},"optionsJSON":"{\"hidePanelTitles\":false,\"useMargins\":true}","panelsJSON":"[{\"version\":\"3.0.0\",\"gridData\":{\"h\":6,\"i\":\"cc742d73-2798-40e7-9aea-78577f5cadea\",\"w\":9,\"x\":0,\"y\":0},\"panelIndex\":\"cc742d73-2798-40e7-9aea-78577f5cadea\",\"embeddableConfig\":{\"title\":\"Requests\",\"hidePanelTitles\":false},\"title\":\"Requests\",\"panelRefName\":\"panel_0\"},{\"version\":\"3.0.0\",\"gridData\":{\"h\":6,\"i\":\"db7e0092-021d-43c4-b36d-f919c0f1319b\",\"w\":9,\"x\":9,\"y\":0},\"panelIndex\":\"db7e0092-021d-43c4-b36d-f919c0f1319b\",\"embeddableConfig\":{\"title\":\"Errors\",\"hidePanelTitles\":false},\"title\":\"Errors\",\"panelRefName\":\"panel_1\"},{\"version\":\"3.0.0\",\"gridData\":{\"h\":6,\"i\":\"1e34c7a4-c7e7-4f26-b0bb-7db23ddbfa1e\",\"w\":11,\"x\":18,\"y\":0},\"panelIndex\":\"1e34c7a4-c7e7-4f26-b0bb-7db23ddbfa1e\",\"embeddableConfig\":{\"title\":\"Latency Average\",\"hidePanelTitles\":false},\"title\":\"Latency Average\",\"panelRefName\":\"panel_2\"},{\"version\":\"3.0.0\",\"gridData\":{\"h\":6,\"i\":\"bd5ec796-6045-472a-aadd-c1330b50844a\",\"w\":18,\"x\":29,\"y\":0},\"panelIndex\":\"bd5ec796-6045-472a-aadd-c1330b50844a\",\"embeddableConfig\":{\"title\":\"Latency Percentile (ms)\",\"hidePanelTitles\":false},\"title\":\"Latency Percentile (ms)\",\"panelRefName\":\"panel_3\"},{\"version\":\"3.0.0\",\"gridData\":{\"h\":14,\"i\":\"e7c4907f-beb9-498f-91f7-644a0a318c92\",\"w\":15,\"x\":0,\"y\":6},\"panelIndex\":\"e7c4907f-beb9-498f-91f7-644a0a318c92\",\"embeddableConfig\":{\"title\":\"Requests Count Over The Time\",\"hidePanelTitles\":false},\"title\":\"Requests Count Over The Time\",\"panelRefName\":\"panel_4\"},{\"version\":\"3.0.0\",\"gridData\":{\"h\":14,\"i\":\"391985d7-e55e-4c71-afce-7321d3149b95\",\"w\":16,\"x\":15,\"y\":6},\"panelIndex\":\"391985d7-e55e-4c71-afce-7321d3149b95\",\"embeddableConfig\":{\"title\":\"Latency Average\",\"hidePanelTitles\":false},\"title\":\"Latency Average\",\"panelRefName\":\"panel_5\"},{\"version\":\"3.0.0\",\"gridData\":{\"h\":14,\"i\":\"30fe503f-6c4a-46cd-b82f-3d53b25103ad\",\"w\":16,\"x\":31,\"y\":6},\"panelIndex\":\"30fe503f-6c4a-46cd-b82f-3d53b25103ad\",\"embeddableConfig\":{\"title\":\"Requests By Api\",\"hidePanelTitles\":false},\"title\":\"Requests By Api\",\"panelRefName\":\"panel_6\"},{\"version\":\"3.0.0\",\"gridData\":{\"h\":17,\"i\":\"b400dd8c-c57b-4f64-a326-d7bcebeda348\",\"w\":47,\"x\":0,\"y\":20},\"panelIndex\":\"b400dd8c-c57b-4f64-a326-d7bcebeda348\",\"embeddableConfig\":{\"title\":\"Traces\",\"hidePanelTitles\":false},\"title\":\"Traces\",\"panelRefName\":\"panel_7\"},{\"version\":\"3.0.0\",\"gridData\":{\"h\":10,\"i\":\"b798d9f5-097b-410f-82f5-d89a76b248af\",\"w\":47,\"x\":0,\"y\":37},\"panelIndex\":\"b798d9f5-097b-410f-82f5-d89a76b248af\",\"embeddableConfig\":{},\"panelRefName\":\"panel_8\"},{\"version\":\"3.0.0\",\"gridData\":{\"x\":0,\"y\":47,\"w\":24,\"h\":15,\"i\":\"202e87db-da14-447d-9400-13e526456a24\"},\"panelIndex\":\"202e87db-da14-447d-9400-13e526456a24\",\"embeddableConfig\":{},\"panelRefName\":\"panel_9\"}]","refreshInterval":{"pause":true,"value":0},"timeFrom":"now-24h","timeRestore":true,"timeTo":"now","title":"DD Dashboard New","version":1},"id":"609577a0-ef4a-11ed-9daf-6da9ea5ab0f8","migrationVersion":{"dashboard":"7.9.3"},"references":[{"id":"be476270-ef43-11ed-8680-adcbd0ec4d25","name":"panel_0","type":"visualization"},{"id":"3e7a7220-ef44-11ed-8680-adcbd0ec4d25","name":"panel_1","type":"visualization"},{"id":"583d07d0-ef45-11ed-9ddd-779f1be269b2","name":"panel_2","type":"visualization"},{"id":"8ee41a60-ef4c-11ed-8680-adcbd0ec4d25","name":"panel_3","type":"visualization"},{"id":"d599ed10-ef45-11ed-9b98-c36d505f6575","name":"panel_4","type":"visualization"},{"id":"cc593160-ef46-11ed-aa9c-59d0a6a55ce7","name":"panel_5","type":"visualization"},{"id":"83494640-ef46-11ed-9ddd-779f1be269b2","name":"panel_6","type":"visualization"},{"id":"613149d0-ef47-11ed-aa9c-59d0a6a55ce7","name":"panel_7","type":"search"},{"id":"a6b5f610-ef6d-11ed-aaaa-39d41c2520f1","name":"panel_8","type":"visualization"},{"id":"d0eab5b0-ef6d-11ed-aaaa-39d41c2520f1","name":"panel_9","type":"visualization"}],"type":"dashboard","updated_at":"2023-05-10T20:05:16.472Z","version":"WzM4MCwzMF0="} +{"exportedCount":13,"missingRefCount":0,"missingReferences":[]} \ No newline at end of file From 63e3651ebae50e75ff0d8983079c1b65ef43b455 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Thu, 11 May 2023 10:32:26 -0700 Subject: [PATCH 026/190] Read and serve local ndjson as integration Signed-off-by: Simeon Widdis --- .../routes/placeholder/placeholder_router.ts | 334 ++---------------- 1 file changed, 27 insertions(+), 307 deletions(-) diff --git a/server/routes/placeholder/placeholder_router.ts b/server/routes/placeholder/placeholder_router.ts index 79371c0b25..aa907b24d1 100644 --- a/server/routes/placeholder/placeholder_router.ts +++ b/server/routes/placeholder/placeholder_router.ts @@ -18,6 +18,25 @@ import { PlaceholderAdaptor } from '../../../server/adaptors/placeholder/placeho import { importFile } from '../../../../../src/plugins/saved_objects_management/public/lib'; import { SavedObject } from '../../../../../src/plugins/data/common'; +import * as fs from 'fs'; + +async function readJSONFile(filePath: string): Promise { + return new Promise((resolve, reject) => { + let assets: any[] = []; + const stream = fs.createReadStream(filePath, { encoding: 'utf-8' }); + stream.on('data', (data: string) => { + let data_array = "[" + data.replace(/\}\s+\{/gi, "},{") + "]"; + assets = JSON.parse(data_array); + }); + stream.on('end', () => { + resolve(assets); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); +} + export function registerPlaceholderRoute(router: IRouter) { const appAnalyticsBackend = new PlaceholderAdaptor(); @@ -32,7 +51,7 @@ export function registerPlaceholderRoute(router: IRouter) { ); let applicationsData: ApplicationType[] = []; try { - console.log('hello'); + console.log('in get'); applicationsData = await appAnalyticsBackend.fetchApps(opensearchClient); console.log(applicationsData); return response.ok({ @@ -46,37 +65,6 @@ export function registerPlaceholderRoute(router: IRouter) { statusCode: err.statusCode || 500, body: err.message, }); - - // try { - // const random = await fetch('http://127.0.0.1:4010/store/id', { - // // method: "GET", // *GET, POST, PUT, DELETE, etc. - // // mode: "cors", // no-cors, *cors, same-origin - // // cache: "no-cache", // *default, no-cache, reload, force-cache, only-if-cached - // // credentials: "same-origin", // include, *same-origin, omit - // // headers: { - // // "Content-Type": "application/json", - // // // 'Content-Type': 'application/x-www-form-urlencoded', - // // }, - // // redirect: "follow", // manual, *follow, error - // // referrerPolicy: "no-referrer", // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url - // // // body: '{limit: 3}', // body data type must match "Content-Type" header - // }); - // return response.ok({ - // body: { - // data: await random.json(), - // }, - // }); - // // const metrics = getMetrics(); - // // return response.ok({ - // // body: metrics, - // // }); - // } catch (error) { - // // console.error(error); - // // return response.custom({ - // // statusCode: error.statusCode || 500, - // // body: error.message, - // // }); - // } } } ); @@ -90,29 +78,11 @@ export function registerPlaceholderRoute(router: IRouter) { const opensearchClient: ILegacyScopedClusterClient = context.observability_plugin.observabilityClient.asScoped( request ); - console.log('poopy'); + console.log('in post'); const applicationsData: ApplicationType[] = []; try { - // console.log('hello') - // applicationsData = await appAnalyticsBackend.fetchApps(opensearchClient); - // console.log(applicationsData) - // return response.ok({ - // body: { - // data: applicationsData, - // }, - // }); - const respons = await context.core.savedObjects.client.bulkCreate([ - { - type: 'observability-panel', - id: 'awiehgio;haw;oieghoiwaeg', - attributes: {}, - }, - { - type: 'observability-panel', - id: 'a', - attributes: {}, - }, - ]); + const assets = await readJSONFile(__dirname + "/test.ndjson") + const bulkCreateResponse = await context.core.savedObjects.client.bulkCreate(assets); return response.ok({ body: { data: {}, @@ -124,37 +94,6 @@ export function registerPlaceholderRoute(router: IRouter) { statusCode: err.statusCode || 500, body: err.message, }); - - // try { - // const random = await fetch('http://127.0.0.1:4010/store/id', { - // // method: "GET", // *GET, POST, PUT, DELETE, etc. - // // mode: "cors", // no-cors, *cors, same-origin - // // cache: "no-cache", // *default, no-cache, reload, force-cache, only-if-cached - // // credentials: "same-origin", // include, *same-origin, omit - // // headers: { - // // "Content-Type": "application/json", - // // // 'Content-Type': 'application/x-www-form-urlencoded', - // // }, - // // redirect: "follow", // manual, *follow, error - // // referrerPolicy: "no-referrer", // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url - // // // body: '{limit: 3}', // body data type must match "Content-Type" header - // }); - // return response.ok({ - // body: { - // data: await random.json(), - // }, - // }); - // // const metrics = getMetrics(); - // // return response.ok({ - // // body: metrics, - // // }); - // } catch (error) { - // // console.error(error); - // // return response.custom({ - // // statusCode: error.statusCode || 500, - // // body: error.message, - // // }); - // } } } ); @@ -165,35 +104,13 @@ export function registerPlaceholderRoute(router: IRouter) { }, async (context, request, response): Promise => { try { - const random = await fetch('http://127.0.0.1:4010/repository/id', { - // method: "GET", // *GET, POST, PUT, DELETE, etc. - // mode: "cors", // no-cors, *cors, same-origin - // cache: "no-cache", // *default, no-cache, reload, force-cache, only-if-cached - // credentials: "same-origin", // include, *same-origin, omit - // headers: { - // "Content-Type": "application/json", - // // 'Content-Type': 'application/x-www-form-urlencoded', - // }, - // redirect: "follow", // manual, *follow, error - // referrerPolicy: "no-referrer", // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url - // // body: '{limit: 3}', // body data type must match "Content-Type" header - }); + const random = await fetch('http://127.0.0.1:4010/repository/id', {}); return response.ok({ body: { data: await random.json(), }, }); - // const metrics = getMetrics(); - // return response.ok({ - // body: metrics, - // }); - } catch (error) { - // console.error(error); - // return response.custom({ - // statusCode: error.statusCode || 500, - // body: error.message, - // }); - } + } catch (error) {} } ); @@ -204,35 +121,13 @@ export function registerPlaceholderRoute(router: IRouter) { }, async (context, request, response): Promise => { try { - const random = await fetch('http://127.0.0.1:4010/store?limit=24', { - // method: "GET", // *GET, POST, PUT, DELETE, etc. - // mode: "cors", // no-cors, *cors, same-origin - // cache: "no-cache", // *default, no-cache, reload, force-cache, only-if-cached - // credentials: "same-origin", // include, *same-origin, omit - // headers: { - // "Content-Type": "application/json", - // // 'Content-Type': 'application/x-www-form-urlencoded', - // }, - // redirect: "follow", // manual, *follow, error - // referrerPolicy: "no-referrer", // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url - // // body: '{limit: 3}', // body data type must match "Content-Type" header - }); + const random = await fetch('http://127.0.0.1:4010/store?limit=24', {}); return response.ok({ body: { data: await random.json(), }, }); - // const metrics = getMetrics(); - // return response.ok({ - // body: metrics, - // }); - } catch (error) { - // console.error(error); - // return response.custom({ - // statusCode: error.statusCode || 500, - // body: error.message, - // }); - } + } catch (error) {} } ); @@ -259,182 +154,7 @@ export function registerPlaceholderRoute(router: IRouter) { statusCode: err.statusCode || 500, body: err.message, }); - - // try { - // const random = await fetch('http://127.0.0.1:4010/store/id', { - // // method: "GET", // *GET, POST, PUT, DELETE, etc. - // // mode: "cors", // no-cors, *cors, same-origin - // // cache: "no-cache", // *default, no-cache, reload, force-cache, only-if-cached - // // credentials: "same-origin", // include, *same-origin, omit - // // headers: { - // // "Content-Type": "application/json", - // // // 'Content-Type': 'application/x-www-form-urlencoded', - // // }, - // // redirect: "follow", // manual, *follow, error - // // referrerPolicy: "no-referrer", // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url - // // // body: '{limit: 3}', // body data type must match "Content-Type" header - // }); - // return response.ok({ - // body: { - // data: await random.json(), - // }, - // }); - // // const metrics = getMetrics(); - // // return response.ok({ - // // body: metrics, - // // }); - // } catch (error) { - // // console.error(error); - // // return response.custom({ - // // statusCode: error.statusCode || 500, - // // body: error.message, - // // }); - // } } } ); - - // router.post( - // { - // path: `${OBSERVABILITY_BASE}/store`, - // validate: false, - // }, - // async (context, request, response): Promise => { - // try { - // const random = await fetch('http://127.0.0.1:4010/store', { - // method: 'POST', // *GET, POST, PUT, DELETE, etc. - // // // mode: "cors", // no-cors, *cors, same-origin - // // // cache: "no-cache", // *default, no-cache, reload, force-cache, only-if-cached - // // // credentials: "same-origin", // include, *same-origin, omit - // headers: { - // 'Content-Type': 'application/json', - // // 'Content-Type': 'application/x-www-form-urlencoded', - // }, - // // // redirect: "follow", // manual, *follow, error - // // // referrerPolicy: "no-referrer", // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url - // body: '{"limit": "5"}', // body data type must match "Content-Type" header - // }); - // return response.ok(); - // // const metrics = getMetrics(); - // // return response.ok({ - // // body: metrics, - // // }); - // } catch (error) { - // return response.custom({ - // statusCode: error.statusCode || 500, - // body: error.message, - // }); - // // console.error(error); - // // return response.custom({ - // // statusCode: error.statusCode || 500, - // // body: error.message, - // // }); - // } - // } - // ); - - // Get all paragraphs of notebooks - // router.get( - // { - // path: `${NOTEBOOKS_API_PREFIX}/note/{noteId}`, - // validate: { - // params: schema.object({ - // noteId: schema.string(), - // }), - // }, - // }, - // async ( - // context, - // request, - // response - // ): Promise> => { - // const opensearchNotebooksClient: ILegacyScopedClusterClient = context.observability_plugin.observabilityClient.asScoped( - // request - // ); - // try { - // const notebookinfo = await BACKEND.fetchNote( - // opensearchNotebooksClient, - // request.params.noteId, - // wreckOptions - // ); - // return response.ok({ - // body: notebookinfo, - // }); - // } catch (error) { - // return response.custom({ - // statusCode: error.statusCode || 500, - // body: error.message, - // }); - // } - // } - // ); - // router.get( - // { - // path: `${OBSERVABILITY_BASE}/repository`, - // validate: false, - // }, - // async ( - // context, - // request, - // response - // ): Promise> => { - // console.log('made it in here') - // try { - // await fetch("http://127.0.0.1:4010/repository", { - // method: "POST", // *GET, POST, PUT, DELETE, etc. - // mode: "cors", // no-cors, *cors, same-origin - // cache: "no-cache", // *default, no-cache, reload, force-cache, only-if-cached - // // credentials: "same-origin", // include, *same-origin, omit - // headers: { - // "Content-Type": "application/zip", - // // 'Content-Type': 'application/x-www-form-urlencoded', - // }, - // redirect: "follow", // manual, *follow, error - // referrerPolicy: "no-referrer", // no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url - // body: 'UEsDBBQAAAAAAOhpdVYAAAAAAAAAAAAAAAAFAAAAdGVzdC9QSwECPwAUAAAAAADoaXVWAAAAAAAAAAAAAAAABQAkAAAAAAAAABAAAAAAAAAAdGVzdC8KACAAAAAAAAEAGABGQanYMVzZAUZBqdgxXNkBRkGp2DFc2QFQSwUGAAAAAAEAAQBXAAAAIwAAAAA', // body data type must match "Content-Type" header - // }); - // return Promise.reject() - // // const metrics = getMetrics(); - // // return response.ok({ - // // body: metrics, - // // }); - // } catch (error) { - - // console.error(error); - // // return response.custom({ - // // statusCode: error.statusCode || 500, - // // body: error.message, - // // }); - // } - // return Promise.reject() - // } - // ); - - // router.post( - // { - // path: `${OBSERVABILITY_BASE}/stats`, - // validate: { - // body: schema.object({ - // element: schema.string() - // }), - // }, - // }, - // async ( - // context, - // request, - // response - // ): Promise> => { - // try { - // const { element } = request.body; - // addClickToMetric(element); - // return response.ok(); - // } catch (error) { - // console.error(error); - // return response.custom({ - // statusCode: error.statusCode || 500, - // body: error.message, - // }); - // } - // } - // ); } From 0b581fb2cf3f1a18caea14738ab5b033459aefd5 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Thu, 11 May 2023 10:34:59 -0700 Subject: [PATCH 027/190] Apply lint feedback Signed-off-by: Simeon Widdis --- server/routes/placeholder/placeholder_router.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/server/routes/placeholder/placeholder_router.ts b/server/routes/placeholder/placeholder_router.ts index aa907b24d1..a84ac13c46 100644 --- a/server/routes/placeholder/placeholder_router.ts +++ b/server/routes/placeholder/placeholder_router.ts @@ -7,6 +7,7 @@ import { ResponseError } from '@opensearch-project/opensearch/lib/errors'; import { schema } from '@osd/config-schema'; import fetch from 'node-fetch'; import { ApplicationType } from 'common/types/application_analytics'; +import * as fs from 'fs'; import { ILegacyScopedClusterClient, IOpenSearchDashboardsResponse, @@ -18,15 +19,13 @@ import { PlaceholderAdaptor } from '../../../server/adaptors/placeholder/placeho import { importFile } from '../../../../../src/plugins/saved_objects_management/public/lib'; import { SavedObject } from '../../../../../src/plugins/data/common'; -import * as fs from 'fs'; - async function readJSONFile(filePath: string): Promise { return new Promise((resolve, reject) => { let assets: any[] = []; const stream = fs.createReadStream(filePath, { encoding: 'utf-8' }); stream.on('data', (data: string) => { - let data_array = "[" + data.replace(/\}\s+\{/gi, "},{") + "]"; - assets = JSON.parse(data_array); + const dataArray = '[' + data.replace(/\}\s+\{/gi, '},{') + ']'; + assets = JSON.parse(dataArray); }); stream.on('end', () => { resolve(assets); @@ -81,7 +80,7 @@ export function registerPlaceholderRoute(router: IRouter) { console.log('in post'); const applicationsData: ApplicationType[] = []; try { - const assets = await readJSONFile(__dirname + "/test.ndjson") + const assets = await readJSONFile(__dirname + '/test.ndjson'); const bulkCreateResponse = await context.core.savedObjects.client.bulkCreate(assets); return response.ok({ body: { @@ -110,7 +109,9 @@ export function registerPlaceholderRoute(router: IRouter) { data: await random.json(), }, }); - } catch (error) {} + } catch (error) { + console.log(error); + } } ); @@ -127,7 +128,9 @@ export function registerPlaceholderRoute(router: IRouter) { data: await random.json(), }, }); - } catch (error) {} + } catch (error) { + console.log(error); + } } ); From aae4daff1e2f97034813f2526876b8404aedc046 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Thu, 11 May 2023 14:29:36 -0700 Subject: [PATCH 028/190] Add populated add-endpoint handling Signed-off-by: Simeon Widdis --- common/constants/shared.ts | 1 + .../opensearch_observability_plugin.ts | 61 ++++----- .../placeholder/placeholder_adaptor.ts | 123 ++---------------- .../routes/placeholder/placeholder_router.ts | 32 +++++ 4 files changed, 78 insertions(+), 139 deletions(-) diff --git a/common/constants/shared.ts b/common/constants/shared.ts index d29950ee1f..0171bca1da 100644 --- a/common/constants/shared.ts +++ b/common/constants/shared.ts @@ -79,6 +79,7 @@ export const OPENSEARCH_INTEGRATIONS_API = { OBJECT: `${BASE_INTEGRATIONS_URI}/object`, ALL: `${BASE_INTEGRATIONS_URI}/store/list_all`, ADDED: `${BASE_INTEGRATIONS_URI}/store/list_added`, + ADDED_POP: `${BASE_INTEGRATIONS_URI}/store/list_added_pop`, }; export const OPENSEARCH_PANELS_API = { OBJECT: `${BASE_OBSERVABILITY_URI}/object`, diff --git a/server/adaptors/opensearch_observability_plugin.ts b/server/adaptors/opensearch_observability_plugin.ts index 858bb3f58e..f1ec0dfe23 100644 --- a/server/adaptors/opensearch_observability_plugin.ts +++ b/server/adaptors/opensearch_observability_plugin.ts @@ -3,13 +3,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { OPENSEARCH_INTEGRATIONS_API, OPENSEARCH_PANELS_API } from "../../common/constants/shared"; +import { OPENSEARCH_INTEGRATIONS_API, OPENSEARCH_PANELS_API } from '../../common/constants/shared'; -export function OpenSearchObservabilityPlugin( - Client: any, - config: any, - components: any -) { +export function OpenSearchObservabilityPlugin(Client: any, config: any, components: any) { const clientAction = components.clientAction.factory; Client.prototype.observability = components.clientAction.namespaceFactory(); @@ -22,14 +18,21 @@ export function OpenSearchObservabilityPlugin( url: { fmt: OPENSEARCH_INTEGRATIONS_API.ALL, }, - method: "GET", + method: 'GET', }); integrations.getAdded = clientAction({ url: { - fmt: OPENSEARCH_INTEGRATIONS_API.ADDED + fmt: OPENSEARCH_INTEGRATIONS_API.ADDED, }, - method: "GET", + method: 'GET', + }); + + integrations.getAddedPop = clientAction({ + url: { + fmt: OPENSEARCH_INTEGRATIONS_API.ADDED_POP, + }, + method: 'GET', }); // Get Object @@ -38,38 +41,38 @@ export function OpenSearchObservabilityPlugin( fmt: OPENSEARCH_PANELS_API.OBJECT, params: { objectId: { - type: "string", + type: 'string', }, objectIdList: { - type: "string", + type: 'string', }, objectType: { - type: "string", + type: 'string', }, sortField: { - type: "string", + type: 'string', }, sortOrder: { - type: "string", + type: 'string', }, fromIndex: { - type: "number", + type: 'number', }, maxItems: { - type: "number", + type: 'number', }, name: { - type: "string", + type: 'string', }, lastUpdatedTimeMs: { - type: "string", + type: 'string', }, createdTimeMs: { - type: "string", + type: 'string', }, }, }, - method: "GET", + method: 'GET', }); // Get Object by Id @@ -78,12 +81,12 @@ export function OpenSearchObservabilityPlugin( fmt: `${OPENSEARCH_PANELS_API.OBJECT}/<%=objectId%>`, req: { objectId: { - type: "string", + type: 'string', required: true, }, }, }, - method: "GET", + method: 'GET', }); // Create new Object @@ -91,7 +94,7 @@ export function OpenSearchObservabilityPlugin( url: { fmt: OPENSEARCH_PANELS_API.OBJECT, }, - method: "POST", + method: 'POST', needBody: true, }); @@ -101,12 +104,12 @@ export function OpenSearchObservabilityPlugin( fmt: `${OPENSEARCH_PANELS_API.OBJECT}/<%=objectId%>`, req: { objectId: { - type: "string", + type: 'string', required: true, }, }, }, - method: "PUT", + method: 'PUT', needBody: true, }); @@ -116,12 +119,12 @@ export function OpenSearchObservabilityPlugin( fmt: `${OPENSEARCH_PANELS_API.OBJECT}/<%=objectId%>`, req: { objectId: { - type: "string", + type: 'string', required: true, }, }, }, - method: "DELETE", + method: 'DELETE', }); // Delete Object by Id List @@ -130,11 +133,11 @@ export function OpenSearchObservabilityPlugin( fmt: OPENSEARCH_PANELS_API.OBJECT, params: { objectIdList: { - type: "string", + type: 'string', required: true, }, }, }, - method: "DELETE", + method: 'DELETE', }); } diff --git a/server/adaptors/placeholder/placeholder_adaptor.ts b/server/adaptors/placeholder/placeholder_adaptor.ts index c5f9d95c25..67ec9f7390 100644 --- a/server/adaptors/placeholder/placeholder_adaptor.ts +++ b/server/adaptors/placeholder/placeholder_adaptor.ts @@ -13,127 +13,30 @@ export class PlaceholderAdaptor { // Fetch all existing integrations fetchApps = async (client: ILegacyScopedClusterClient): Promise => { try { - console.log('poopy') + console.log('poopy'); const response = await client.callAsCurrentUser('integrations.getObject'); - console.log(response) - // return response.observabilityObjectList.map((object: any) => { - return response - // return { - // }; - // }); + console.log(response); + return response; } catch (err: any) { throw new Error('Fetch All Applications Error: ' + err); } }; - fetchAdded = async (client: ILegacyScopedClusterClient): Promise => { + fetchAdded = async ( + client: ILegacyScopedClusterClient, + added: boolean = false + ): Promise => { try { - const response = await client.callAsCurrentUser('integrations.getAdded', {}); - console.log(response) + const endpoint = added ? 'integrations.getAddedPop' : 'integrations.getAdded'; + const response = await client.callAsCurrentUser(endpoint, {}); + console.log(response); // return response.observabilityObjectList.map((object: any) => { - return response.list + return response.test; // return { // }; // }); } catch (err: any) { - throw new Error('Fetch All Applications Error: ' + err); + throw new Error('Fetch Added Applications Error: ' + err); } - } - - // // Fetch application by id - // fetchAppById = async ( - // client: ILegacyScopedClusterClient, - // appId: string - // ): Promise => { - // try { - // const response = await client.callAsCurrentUser('observability.getObjectById', { - // objectId: appId, - // }); - // const app = response.observabilityObjectList[0]; - // return { - // id: appId, - // dateCreated: app.createdTimeMs, - // dateModified: app.lastUpdatedTimeMs, - // name: app.application.name, - // description: app.application.description, - // baseQuery: app.application.baseQuery, - // servicesEntities: app.application.servicesEntities.map((rec: string) => decodeURI(rec)), - // traceGroups: app.application.traceGroups.map((rec: string) => decodeURI(rec)), - // panelId: app.application.panelId, - // availability: { - // name: '', - // color: '', - // availabilityVisId: app.application.availabilityVisId || '', - // }, - // }; - // } catch (err: any) { - // throw new Error('Fetch Application By Id Error: ' + err); - // } - // }; - - // // Create a new application - // createNewApp = async ( - // client: ILegacyScopedClusterClient, - // appBody: Partial - // ) => { - // try { - // const response = await client.callAsCurrentUser('observability.createObject', { - // body: { - // application: appBody, - // }, - // }); - // return response.objectId; - // } catch (err) { - // throw new Error('Create New Application Error: ' + err); - // } - // }; - - // // Rename an existing application - // renameApp = async (client: ILegacyScopedClusterClient, appId: string, name: string) => { - // const updateApplicationBody = { - // name, - // }; - // try { - // const response = await client.callAsCurrentUser('observability.updateObjectById', { - // objectId: appId, - // body: { - // application: updateApplicationBody, - // }, - // }); - // return response.objectId; - // } catch (err: any) { - // throw new Error('Rename Application Error: ' + err); - // } - // }; - - // // Update an existing application - // updateApp = async ( - // client: ILegacyScopedClusterClient, - // appId: string, - // updateAppBody: Partial - // ) => { - // try { - // const response = await client.callAsCurrentUser('observability.updateObjectById', { - // objectId: appId, - // body: { - // application: updateAppBody, - // }, - // }); - // return response.objectId; - // } catch (err: any) { - // throw new Error('Update Panel Error: ' + err); - // } - // }; - - // // Delete existing applications - // deleteApp = async (client: ILegacyScopedClusterClient, appList: string) => { - // try { - // const response = await client.callAsCurrentUser('observability.deleteObjectByIdList', { - // objectIdList: appList, - // }); - // return { status: 'OK', message: response }; - // } catch (err: any) { - // throw new Error('Delete Application Error: ' + err); - // } - // }; + }; } diff --git a/server/routes/placeholder/placeholder_router.ts b/server/routes/placeholder/placeholder_router.ts index a84ac13c46..b0096cb61f 100644 --- a/server/routes/placeholder/placeholder_router.ts +++ b/server/routes/placeholder/placeholder_router.ts @@ -36,6 +36,8 @@ async function readJSONFile(filePath: string): Promise { }); } +let added = false; + export function registerPlaceholderRoute(router: IRouter) { const appAnalyticsBackend = new PlaceholderAdaptor(); @@ -82,6 +84,7 @@ export function registerPlaceholderRoute(router: IRouter) { try { const assets = await readJSONFile(__dirname + '/test.ndjson'); const bulkCreateResponse = await context.core.savedObjects.client.bulkCreate(assets); + added = true; return response.ok({ body: { data: {}, @@ -160,4 +163,33 @@ export function registerPlaceholderRoute(router: IRouter) { } } ); + + router.get( + { + path: `${INTEGRATIONS_BASE}/store/list_added`, + validate: false, + }, + async (context, request, response): Promise => { + const opensearchClient: ILegacyScopedClusterClient = context.observability_plugin.observabilityClient.asScoped( + request + ); + let applicationsData: ApplicationType[] = []; + try { + console.log('in get added'); + applicationsData = await appAnalyticsBackend.fetchAdded(opensearchClient, added); + console.log('applicationsData: ' + applicationsData); + return response.ok({ + body: { + data: applicationsData, + }, + }); + } catch (err: any) { + console.error('Error occurred while fetching applications', err); + return response.custom({ + statusCode: err.statusCode || 500, + body: err.message, + }); + } + } + ); } From 0d46dcb74afc9ecc6d4f60bce025ec5f35c78852 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Fri, 12 May 2023 09:32:18 -0700 Subject: [PATCH 029/190] Fix asset linking bug Signed-off-by: Simeon Widdis --- .../placeholder/components/added_integration_table.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/components/placeholder/components/added_integration_table.tsx b/public/components/placeholder/components/added_integration_table.tsx index bffd31d164..9e4e59d735 100644 --- a/public/components/placeholder/components/added_integration_table.tsx +++ b/public/components/placeholder/components/added_integration_table.tsx @@ -29,7 +29,8 @@ export function AddedIntegrationsTable(props: AddedIntegrationsTableProps) { render: (value, record) => ( {_.truncate(record.id, { length: 100 })} @@ -154,8 +155,7 @@ export function AddedIntegrationsTable(props: AddedIntegrationsTableProps) {

There are currently no added integrations. Add them{' '} - here to start using pre-canned - assets! + here to start using pre-canned assets!

From 972070cb76e5950da44b7e9f56b2a5132ae58304 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Fri, 12 May 2023 10:52:56 -0700 Subject: [PATCH 030/190] Clean NDJson parsing logic Signed-off-by: Simeon Widdis --- .../placeholder/__tests__/ndjson.test.ts | 21 ++ .../routes/placeholder/__tests__/test.ndjson | 266 ++++++++++++++++++ .../routes/placeholder/placeholder_router.ts | 20 +- 3 files changed, 300 insertions(+), 7 deletions(-) create mode 100644 server/routes/placeholder/__tests__/ndjson.test.ts create mode 100644 server/routes/placeholder/__tests__/test.ndjson diff --git a/server/routes/placeholder/__tests__/ndjson.test.ts b/server/routes/placeholder/__tests__/ndjson.test.ts new file mode 100644 index 0000000000..d5fd0233fb --- /dev/null +++ b/server/routes/placeholder/__tests__/ndjson.test.ts @@ -0,0 +1,21 @@ +import { readNDJson } from '../placeholder_router'; +import { Readable } from 'stream'; +import { createReadStream } from 'fs'; + +describe('ReadNDJsonStream', () => { + it('should successfully parse simple ndjson', async () => { + const stream = Readable.from(['{"key":1}\n{"key":2}\n{"key":3}']); + const array = await readNDJson(stream); + expect(array).toEqual([{ key: 1 }, { key: 2 }, { key: 3 }]); + }); + it('should succeed if chunks split objects', async () => { + const stream = Readable.from(['{"key":1}\n{"ke', 'y":2}\n{"key":3}']); + const array = await readNDJson(stream); + expect(array).toEqual([{ key: 1 }, { key: 2 }, { key: 3 }]); + }); + it('should succeed on test ndjson file', async () => { + const file = createReadStream(__dirname + '/test.ndjson'); + const array = await readNDJson(file); + expect(array.length).toBeGreaterThan(0); + }); +}); diff --git a/server/routes/placeholder/__tests__/test.ndjson b/server/routes/placeholder/__tests__/test.ndjson new file mode 100644 index 0000000000..777651bbb3 --- /dev/null +++ b/server/routes/placeholder/__tests__/test.ndjson @@ -0,0 +1,266 @@ +{ + "attributes": { + "fields": "[{\"count\":0,\"name\":\"@timestamp\",\"type\":\"date\",\"esTypes\":[\"date\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"_id\",\"type\":\"string\",\"esTypes\":[\"_id\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"count\":0,\"name\":\"_index\",\"type\":\"string\",\"esTypes\":[\"_index\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"count\":0,\"name\":\"_score\",\"type\":\"number\",\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"_source\",\"type\":\"_source\",\"esTypes\":[\"_source\"],\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"_type\",\"type\":\"string\",\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"attributes.data_stream.dataset\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"attributes.data_stream.dataset.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"attributes.data_stream.dataset\"}}},{\"count\":0,\"name\":\"attributes.data_stream.namespace\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"attributes.data_stream.namespace.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"attributes.data_stream.namespace\"}}},{\"count\":0,\"name\":\"attributes.data_stream.type\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"attributes.data_stream.type.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"attributes.data_stream.type\"}}},{\"count\":0,\"name\":\"body\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"body.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"body\"}}},{\"count\":0,\"name\":\"communication.source.address\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"communication.source.address.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"communication.source.address\"}}},{\"count\":0,\"name\":\"communication.source.ip\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"communication.source.ip.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"communication.source.ip\"}}},{\"count\":0,\"name\":\"event.category\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"event.category.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"event.category\"}}},{\"count\":0,\"name\":\"event.domain\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"event.domain.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"event.domain\"}}},{\"count\":0,\"name\":\"event.kind\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"event.kind.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"event.kind\"}}},{\"count\":0,\"name\":\"event.name\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"event.name.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"event.name\"}}},{\"count\":0,\"name\":\"event.result\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"event.result.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"event.result\"}}},{\"count\":0,\"name\":\"event.type\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"event.type.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"event.type\"}}},{\"count\":0,\"name\":\"http.flavor\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"http.flavor.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"http.flavor\"}}},{\"count\":0,\"name\":\"http.request.method\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"http.request.method.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"http.request.method\"}}},{\"count\":0,\"name\":\"http.response.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"http.response.status_code\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"http.response.status_code.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"http.response.status_code\"}}},{\"count\":0,\"name\":\"http.url\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"http.url\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"http.url\"}}},{\"count\":0,\"name\":\"observerTime\",\"type\":\"date\",\"esTypes\":[\"date\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span_id\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span_id.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span_id\"}}},{\"count\":0,\"name\":\"trace_id\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"trace_id.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"trace_id\"}}}]", + "timeFieldName": "@timestamp", + "title": "sso_logs-*-*" + }, + "id": "47892350-b495-11ed-af0a-cf5c93b5a3b6", + "migrationVersion": { + "index-pattern": "7.6.0" + }, + "references": [], + "type": "index-pattern", + "updated_at": "2023-02-26T00:34:36.592Z", + "version": "WzYxLDdd" +} +{ + "attributes": { + "columns": [ + "http.request.method", + "http.response.status_code" + ], + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\n \"highlightAll\": true,\n \"version\": true,\n \"query\": {\n \"query\": \"event.domain:nginx.access\",\n \"language\": \"kuery\"\n },\n \"filter\": [],\n \"indexRefName\": \"kibanaSavedObjectMeta.searchSourceJSON.index\"\n}" + }, + "sort": [], + "title": "[NGINX Core Logs 1.0] Nginx Access Logs", + "version": 1 + }, + "id": "d80e05b2-518c-4c3d-9651-4c9d8632dce4", + "migrationVersion": { + "search": "7.9.3" + }, + "references": [ + { + "id": "47892350-b495-11ed-af0a-cf5c93b5a3b6", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "search", + "updated_at": "2023-02-26T00:34:36.592Z", + "version": "WzYyLDdd" +} +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[]}" + }, + "savedSearchRefName": "search_0", + "title": "[NGINX Core Logs 1.0] Response codes over time", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"[NGINX Core Logs 1.0] Response codes over time\",\"type\":\"histogram\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"params\":{},\"schema\":\"metric\"},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"params\":{\"field\":\"@timestamp\",\"timeRange\":{\"from\":\"now-24h\",\"to\":\"now\"},\"useNormalizedOpenSearchInterval\":true,\"scaleMetricValues\":false,\"interval\":\"auto\",\"drop_partials\":false,\"min_doc_count\":1,\"extended_bounds\":{}},\"schema\":\"segment\"},{\"id\":\"3\",\"enabled\":true,\"type\":\"filters\",\"params\":{\"filters\":[{\"input\":{\"query\":\"http.response.status_code:[200 TO 299]\",\"language\":\"lucene\"},\"label\":\"200s\"},{\"input\":{\"query\":\"http.response.status_code:[300 TO 399]\",\"language\":\"lucene\"},\"label\":\"300s\"},{\"input\":{\"query\":\"http.response.status_code:[400 TO 499]\",\"language\":\"lucene\"},\"label\":\"400s\"},{\"input\":{\"query\":\"http.response.status_code:[500 TO 599]\",\"language\":\"lucene\"},\"label\":\"500s\"},{\"input\":{\"query\":\"http.response.status_code:0\",\"language\":\"lucene\"},\"label\":\"0\"}]},\"schema\":\"group\"}],\"params\":{\"type\":\"histogram\",\"grid\":{\"categoryLines\":false},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"filter\":true,\"truncate\":100},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Count\"}}],\"seriesParams\":[{\"show\":true,\"type\":\"histogram\",\"mode\":\"stacked\",\"data\":{\"label\":\"Count\",\"id\":\"1\"},\"valueAxis\":\"ValueAxis-1\",\"drawLinesBetweenPoints\":true,\"lineWidth\":2,\"showCircles\":true}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"times\":[],\"addTimeMarker\":false,\"labels\":{\"show\":false},\"thresholdLine\":{\"show\":false,\"value\":10,\"width\":1,\"style\":\"full\",\"color\":\"#E7664C\"}}}" + }, + "id": "3b49a65d-54d8-483d-a8f0-3d7c855e1ecf", + "migrationVersion": { + "visualization": "7.10.0" + }, + "references": [ + { + "id": "d80e05b2-518c-4c3d-9651-4c9d8632dce4", + "name": "search_0", + "type": "search" + } + ], + "type": "visualization", + "updated_at": "2023-02-26T00:34:36.592Z", + "version": "WzYzLDdd" +} +{ + "attributes": { + "columns": [ + "_source" + ], + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\n \"highlightAll\": true,\n \"query\": {\n \"query\": \"http.response.status_code >= 300 and event.domain:nginx.access\",\n \"language\": \"kuery\"\n },\n \"version\": true,\n \"highlight\": {\n \"post_tags\": [\n \"@/kibana-highlighted-field@\"\n ],\n \"fields\": {\n \"*\": {}\n },\n \"pre_tags\": [\n \"@kibana-highlighted-field@\"\n ],\n \"require_field_match\": false,\n \"fragment_size\": 2147483647\n },\n \"filter\": [],\n \"indexRefName\": \"kibanaSavedObjectMeta.searchSourceJSON.index\"\n}" + }, + "sort": [ + [ + "@timestamp", + "desc" + ] + ], + "title": "[NGINX Core Logs 1.0] Nginx Error Logs", + "version": 1 + }, + "id": "9f820fbe-ddde-43a2-9402-30bd295c97f6", + "migrationVersion": { + "search": "7.9.3" + }, + "references": [ + { + "id": "47892350-b495-11ed-af0a-cf5c93b5a3b6", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "search", + "updated_at": "2023-02-26T00:34:36.592Z", + "version": "WzY0LDdd" +} +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[]}" + }, + "savedSearchRefName": "search_0", + "title": "[NGINX Core Logs 1.0] Errors over time", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"[NGINX Core Logs 1.0] Errors over time\",\"type\":\"histogram\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"params\":{},\"schema\":\"metric\"},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"params\":{\"field\":\"@timestamp\",\"timeRange\":{\"from\":\"now-24h\",\"to\":\"now\"},\"useNormalizedOpenSearchInterval\":true,\"scaleMetricValues\":false,\"interval\":\"auto\",\"drop_partials\":false,\"min_doc_count\":1,\"extended_bounds\":{}},\"schema\":\"segment\"}],\"params\":{\"type\":\"histogram\",\"grid\":{\"categoryLines\":false},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"filter\":true,\"truncate\":100},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Count\"}}],\"seriesParams\":[{\"show\":true,\"type\":\"histogram\",\"mode\":\"stacked\",\"data\":{\"label\":\"Count\",\"id\":\"1\"},\"valueAxis\":\"ValueAxis-1\",\"drawLinesBetweenPoints\":true,\"lineWidth\":2,\"showCircles\":true}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"times\":[],\"addTimeMarker\":false,\"labels\":{\"show\":false},\"thresholdLine\":{\"show\":false,\"value\":10,\"width\":1,\"style\":\"full\",\"color\":\"#E7664C\"}}}" + }, + "id": "865e577b-634b-4a65-b9d6-7e324c395d18", + "migrationVersion": { + "visualization": "7.10.0" + }, + "references": [ + { + "id": "9f820fbe-ddde-43a2-9402-30bd295c97f6", + "name": "search_0", + "type": "search" + } + ], + "type": "visualization", + "updated_at": "2023-02-26T00:34:36.592Z", + "version": "WzY1LDdd" +} +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}" + }, + "savedSearchRefName": "search_0", + "title": "Top Paths", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Top Paths\",\"type\":\"table\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"params\":{},\"schema\":\"metric\"},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"params\":{\"field\":\"http.url\",\"orderBy\":\"1\",\"order\":\"desc\",\"size\":10,\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"customLabel\":\"Paths\"},\"schema\":\"bucket\"}],\"params\":{\"perPage\":10,\"showPartialRows\":false,\"showMetricsAtAllLevels\":false,\"showTotal\":false,\"totalFunc\":\"sum\",\"percentageCol\":\"\"}}" + }, + "id": "dc1803f0-b478-11ed-9063-ebe46f9ac203", + "migrationVersion": { + "visualization": "7.10.0" + }, + "references": [ + { + "id": "d80e05b2-518c-4c3d-9651-4c9d8632dce4", + "name": "search_0", + "type": "search" + } + ], + "type": "visualization", + "updated_at": "2023-02-26T00:34:36.592Z", + "version": "WzY2LDdd" +} +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}" + }, + "savedSearchRefName": "search_0", + "title": "Data Volume", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Data Volume\",\"type\":\"area\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"sum\",\"params\":{\"field\":\"http.response.bytes\",\"customLabel\":\"Response Bytes\"},\"schema\":\"metric\"},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"params\":{\"field\":\"observerTime\",\"timeRange\":{\"from\":\"now-15m\",\"to\":\"now\"},\"useNormalizedOpenSearchInterval\":true,\"scaleMetricValues\":false,\"interval\":\"auto\",\"drop_partials\":false,\"min_doc_count\":1,\"extended_bounds\":{},\"customLabel\":\"\"},\"schema\":\"segment\"}],\"params\":{\"type\":\"area\",\"grid\":{\"categoryLines\":false},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"filter\":true,\"truncate\":100},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Response Bytes\"}}],\"seriesParams\":[{\"show\":true,\"type\":\"area\",\"mode\":\"stacked\",\"data\":{\"label\":\"Response Bytes\",\"id\":\"1\"},\"drawLinesBetweenPoints\":true,\"lineWidth\":2,\"showCircles\":true,\"interpolate\":\"linear\",\"valueAxis\":\"ValueAxis-1\"}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"times\":[],\"addTimeMarker\":false,\"thresholdLine\":{\"show\":false,\"value\":10,\"width\":1,\"style\":\"full\",\"color\":\"#E7664C\"},\"labels\":{}}}" + }, + "id": "99acc580-b47a-11ed-9063-ebe46f9ac203", + "migrationVersion": { + "visualization": "7.10.0" + }, + "references": [ + { + "id": "d80e05b2-518c-4c3d-9651-4c9d8632dce4", + "name": "search_0", + "type": "search" + } + ], + "type": "visualization", + "updated_at": "2023-02-26T00:34:36.592Z", + "version": "WzY3LDdd" +} +{ + "attributes": { + "description": "requests per minute aggregation", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" + }, + "title": "Req-per-min", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"title\":\"Req-per-min\",\"type\":\"table\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"moving_avg\",\"params\":{\"metricAgg\":\"custom\",\"customMetric\":{\"id\":\"1-metric\",\"enabled\":true,\"type\":\"count\",\"params\":{}},\"window\":5,\"script\":\"MovingFunctions.unweightedAvg(values)\"},\"schema\":\"metric\"},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"params\":{\"field\":\"@timestamp\",\"timeRange\":{\"from\":\"2023-02-24T17:25:00.000Z\",\"to\":\"2023-02-24T17:30:00.000Z\"},\"useNormalizedOpenSearchInterval\":true,\"scaleMetricValues\":false,\"interval\":\"m\",\"drop_partials\":false,\"min_doc_count\":0,\"extended_bounds\":{},\"customLabel\":\"Req/Min\"},\"schema\":\"bucket\"}],\"params\":{\"perPage\":10,\"showPartialRows\":false,\"showMetricsAtAllLevels\":false,\"showTotal\":false,\"totalFunc\":\"sum\",\"percentageCol\":\"\"}}" + }, + "id": "01ea64d0-b62f-11ed-a677-43d7aa86763b", + "migrationVersion": { + "visualization": "7.10.0" + }, + "references": [ + { + "id": "47892350-b495-11ed-af0a-cf5c93b5a3b6", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "visualization", + "updated_at": "2023-02-26T23:40:53.020Z", + "version": "WzcyLDdd" +} +{ + "attributes": { + "description": "Nginx dashboard with basic Observability on access / error logs", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"query\":{\"language\":\"kuery\",\"query\":\"\"},\"filter\":[]}" + }, + "optionsJSON": "{\"hidePanelTitles\":false,\"useMargins\":true}", + "panelsJSON": "[{\"version\":\"2.5.0\",\"gridData\":{\"h\":8,\"i\":\"1f31e50b-06e3-41e6-972e-e4e5fe1a9872\",\"w\":48,\"x\":0,\"y\":0},\"panelIndex\":\"1f31e50b-06e3-41e6-972e-e4e5fe1a9872\",\"embeddableConfig\":{},\"panelRefName\":\"panel_0\"},{\"version\":\"2.5.0\",\"gridData\":{\"h\":9,\"i\":\"d91a8da4-b34b-470a-aca6-9c76b47cd6fb\",\"w\":24,\"x\":0,\"y\":8},\"panelIndex\":\"d91a8da4-b34b-470a-aca6-9c76b47cd6fb\",\"embeddableConfig\":{},\"panelRefName\":\"panel_1\"},{\"version\":\"2.5.0\",\"gridData\":{\"h\":15,\"i\":\"27149e5a-3a77-4f3c-800e-8a160c3765f4\",\"w\":24,\"x\":24,\"y\":8},\"panelIndex\":\"27149e5a-3a77-4f3c-800e-8a160c3765f4\",\"embeddableConfig\":{},\"panelRefName\":\"panel_2\"},{\"version\":\"2.5.0\",\"gridData\":{\"x\":0,\"y\":17,\"w\":24,\"h\":15,\"i\":\"4d8c2aa7-159c-4a1a-80ff-00a9299056ce\"},\"panelIndex\":\"4d8c2aa7-159c-4a1a-80ff-00a9299056ce\",\"embeddableConfig\":{},\"panelRefName\":\"panel_3\"},{\"version\":\"2.5.0\",\"gridData\":{\"x\":24,\"y\":23,\"w\":24,\"h\":15,\"i\":\"800b7f19-f50c-417f-8987-21b930531cbe\"},\"panelIndex\":\"800b7f19-f50c-417f-8987-21b930531cbe\",\"embeddableConfig\":{},\"panelRefName\":\"panel_4\"}]", + "timeRestore": false, + "title": "[NGINX Core Logs 1.0] Overview", + "version": 1 + }, + "id": "96847220-5261-44d0-89b4-65f3a659f13a", + "migrationVersion": { + "dashboard": "7.9.3" + }, + "references": [ + { + "id": "3b49a65d-54d8-483d-a8f0-3d7c855e1ecf", + "name": "panel_0", + "type": "visualization" + }, + { + "id": "865e577b-634b-4a65-b9d6-7e324c395d18", + "name": "panel_1", + "type": "visualization" + }, + { + "id": "dc1803f0-b478-11ed-9063-ebe46f9ac203", + "name": "panel_2", + "type": "visualization" + }, + { + "id": "99acc580-b47a-11ed-9063-ebe46f9ac203", + "name": "panel_3", + "type": "visualization" + }, + { + "id": "01ea64d0-b62f-11ed-a677-43d7aa86763b", + "name": "panel_4", + "type": "visualization" + } + ], + "type": "dashboard", + "updated_at": "2023-02-26T23:44:09.855Z", + "version": "WzczLDdd" +} +{ + "exportedCount": 9, + "missingRefCount": 0, + "missingReferences": [] +} \ No newline at end of file diff --git a/server/routes/placeholder/placeholder_router.ts b/server/routes/placeholder/placeholder_router.ts index b0096cb61f..fdbea6d31b 100644 --- a/server/routes/placeholder/placeholder_router.ts +++ b/server/routes/placeholder/placeholder_router.ts @@ -8,6 +8,7 @@ import { schema } from '@osd/config-schema'; import fetch from 'node-fetch'; import { ApplicationType } from 'common/types/application_analytics'; import * as fs from 'fs'; +import { Readable } from 'stream'; import { ILegacyScopedClusterClient, IOpenSearchDashboardsResponse, @@ -19,16 +20,20 @@ import { PlaceholderAdaptor } from '../../../server/adaptors/placeholder/placeho import { importFile } from '../../../../../src/plugins/saved_objects_management/public/lib'; import { SavedObject } from '../../../../../src/plugins/data/common'; -async function readJSONFile(filePath: string): Promise { +export async function readNDJson(stream: Readable): Promise { return new Promise((resolve, reject) => { let assets: any[] = []; - const stream = fs.createReadStream(filePath, { encoding: 'utf-8' }); - stream.on('data', (data: string) => { - const dataArray = '[' + data.replace(/\}\s+\{/gi, '},{') + ']'; - assets = JSON.parse(dataArray); + let json: string = ''; + stream.on('data', (chunk: string | Buffer) => { + json += chunk.toString(); }); stream.on('end', () => { - resolve(assets); + try { + assets = JSON.parse(`[${json.replace(/\}\s+\{/g, '},{')}]`); + resolve(assets); + } catch (err: any) { + reject(err); + } }); stream.on('error', (err: Error) => { reject(err); @@ -82,7 +87,8 @@ export function registerPlaceholderRoute(router: IRouter) { console.log('in post'); const applicationsData: ApplicationType[] = []; try { - const assets = await readJSONFile(__dirname + '/test.ndjson'); + const stream = fs.createReadStream(__dirname + '/test.ndjson'); + const assets = await readNDJson(stream); const bulkCreateResponse = await context.core.savedObjects.client.bulkCreate(assets); added = true; return response.ok({ From 81db07410a40e35b9ea43355dd32b745e1968d42 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Fri, 12 May 2023 11:32:13 -0700 Subject: [PATCH 031/190] Remove unused testing file Signed-off-by: Simeon Widdis --- server/routes/placeholder/testing.ndjson | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 server/routes/placeholder/testing.ndjson diff --git a/server/routes/placeholder/testing.ndjson b/server/routes/placeholder/testing.ndjson deleted file mode 100644 index da32e03521..0000000000 --- a/server/routes/placeholder/testing.ndjson +++ /dev/null @@ -1,14 +0,0 @@ -{"attributes":{"fields":"[{\"count\":0,\"name\":\"_id\",\"type\":\"string\",\"esTypes\":[\"_id\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"count\":0,\"name\":\"_index\",\"type\":\"string\",\"esTypes\":[\"_index\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"count\":0,\"name\":\"_score\",\"type\":\"number\",\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"_source\",\"type\":\"_source\",\"esTypes\":[\"_source\"],\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"_type\",\"type\":\"string\",\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"droppedAttributesCount\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"droppedEventsCount\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"droppedLinksCount\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":1,\"name\":\"durationInNanos\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"endTime\",\"type\":\"date\",\"esTypes\":[\"date_nanos\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"events.attributes.app@payment@transaction@id\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.app@payment@transaction@id.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"events.attributes.app@payment@transaction@id\"},\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.app@quote@cost@total\",\"type\":\"number\",\"esTypes\":[\"float\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.app@shipping@cost@total\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.app@shipping@cost@total.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"events.attributes.app@shipping@cost@total\"},\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.app@shipping@tracking@id\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.app@shipping@tracking@id.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"events.attributes.app@shipping@tracking@id\"},\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.exception@escaped\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.exception@escaped.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"events.attributes.exception@escaped\"},\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.exception@message\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.exception@message.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"events.attributes.exception@message\"},\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.exception@stacktrace\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.exception@stacktrace.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"events.attributes.exception@stacktrace\"},\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.exception@type\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.exception@type.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"events.attributes.exception@type\"},\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.message\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.message.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"events.attributes.message\"},\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.message@id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.message@type\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.message@type.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"events.attributes.message@type\"},\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.message@uncompressed_size\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.droppedAttributesCount\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.name\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.name.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"events.name\"},\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.time\",\"type\":\"date\",\"esTypes\":[\"date_nanos\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"instrumentationScope.name\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"instrumentationScope.name.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"instrumentationScope.name\"}}},{\"count\":0,\"name\":\"instrumentationScope.version\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"instrumentationScope.version.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"instrumentationScope.version\"}}},{\"count\":0,\"name\":\"kind\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"links.droppedAttributesCount\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"nested\":{\"path\":\"links\"}}},{\"count\":0,\"name\":\"links.spanId\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false,\"subType\":{\"nested\":{\"path\":\"links\"}}},{\"count\":0,\"name\":\"links.spanId.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"links.spanId\"},\"nested\":{\"path\":\"links\"}}},{\"count\":0,\"name\":\"links.traceId\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false,\"subType\":{\"nested\":{\"path\":\"links\"}}},{\"count\":0,\"name\":\"links.traceId.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"links.traceId\"},\"nested\":{\"path\":\"links\"}}},{\"count\":0,\"name\":\"links.traceState\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false,\"subType\":{\"nested\":{\"path\":\"links\"}}},{\"count\":0,\"name\":\"links.traceState.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"links.traceState\"},\"nested\":{\"path\":\"links\"}}},{\"count\":0,\"name\":\"name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"parentSpanId\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.container@id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.host@arch\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.host@name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.k8s@namespace@name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.k8s@node@name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.k8s@pod@name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.library@language\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.library@name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.library@version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.os@description\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.os@name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.os@type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.os@version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.process@command\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.process@command_args\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.process@command_line\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.process@executable@name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.process@executable@path\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.process@owner\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.process@pid\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.process@runtime@description\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.process@runtime@name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.process@runtime@version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.service@instance@id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.service@name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.service@namespace\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.telemetry@auto@version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.telemetry@sdk@language\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.telemetry@sdk@name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.telemetry@sdk@version\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":3,\"name\":\"serviceName\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@ads@ad_request_type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@ads@ad_response_type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@ads@category\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@ads@contextKeys\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@ads@contextKeys@count\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@ads@count\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@cart@items@count\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@currency@conversion@from\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@currency@conversion@to\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@email@recipient\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@featureflag@enabled\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@featureflag@name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@filtered_products@count\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@filtered_products@list\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@order@amount\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@order@id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@order@items@count\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@payment@amount\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@payment@card_type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@payment@card_valid\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@payment@charged\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@product@id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@product@name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@product@quantity\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@products@count\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@products_recommended@count\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@quote@cost@total\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@quote@items@count\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@recommendation@cache_enabled\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@shipping@amount\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@shipping@cost@total\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@shipping@items@count\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@shipping@tracking@id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@shipping@zip_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@synthetic_request\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@user@currency\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.app@user@id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.busy_ns\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.canceled\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.code@filepath\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.code@function\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.code@lineno\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.code@namespace\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.component\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.db@connection_string\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.db@instance\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.db@name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.db@operation\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.db@redis@database_index\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.db@redis@flags\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.db@sql@table\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.db@statement\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.db@system\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.db@type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.db@url\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.db@user\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.decode_time_microseconds\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.downstream_cluster\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.error\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.error@cause_chain\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.error@message\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.fid_log_tracking_id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.grpc@error_message\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.grpc@error_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.guid:x-request-id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.http@client_ip\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.http@flavor\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":1,\"name\":\"span.attributes.http@host\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":2,\"name\":\"span.attributes.http@method\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.http@protocol\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.http@request_content_length\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.http@request_content_length_uncompressed\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.http@response_content_length\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":1,\"name\":\"span.attributes.http@route\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.http@scheme\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":2,\"name\":\"span.attributes.http@status_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.http@status_text\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.http@target\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.http@url\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.http@user_agent\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.idle_ns\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.idle_time_microseconds\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.messaging@destination\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.messaging@destination_kind\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.messaging@kafka@message@offset\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.messaging@kafka@partition\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.messaging@message_id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.messaging@message_payload_size_bytes\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.messaging@operation\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.messaging@system\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.net@host@ip\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.net@host@name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.net@host@port\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.net@peer@ip\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.net@peer@name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.net@peer@port\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.net@sock@peer@addr\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.net@sock@peer@port\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.net@transport\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.node_id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.peer@address\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.peer@ipv4\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.peer@service\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.phoenix@action\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.phoenix@plug\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.proxy_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.query_time_microseconds\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.queue_time_microseconds\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.request_size\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.response_flags\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.response_size\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.rpc@grpc@status_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.rpc@method\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.rpc@service\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.rpc@system\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.rpc@user_agent\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.sinatra@template_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.source\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.span@kind\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.target_url\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.thread@id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.thread@name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.total_time_microseconds\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.upstream_address\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.upstream_cluster\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.upstream_cluster@name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.user_agent\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.zone\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"spanId\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"startTime\",\"type\":\"date\",\"esTypes\":[\"date_nanos\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":2,\"name\":\"status.code\",\"type\":\"number\",\"esTypes\":[\"integer\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"status.message\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"traceGroup\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"traceGroupFields.durationInNanos\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"traceGroupFields.endTime\",\"type\":\"date\",\"esTypes\":[\"date_nanos\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"traceGroupFields.statusCode\",\"type\":\"number\",\"esTypes\":[\"integer\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":1,\"name\":\"traceId\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"traceState\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"traceState.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"traceState\"}}}]","timeFieldName":"endTime","title":"otel-v1-apm-sp*"},"id":"ab680ce0-ccc5-11ed-875a-c33867f208cf","migrationVersion":{"index-pattern":"7.6.0"},"references":[],"type":"index-pattern","updated_at":"2023-05-10T20:01:38.410Z","version":"WzM1MiwzMF0="} -{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"serviceName: dd-api-service\",\"language\":\"lucene\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"},"title":"[dd][metrics][requests]","uiStateJSON":"{}","version":1,"visState":"{\"title\":\"[dd][metrics][requests]\",\"type\":\"metric\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"cardinality\",\"params\":{\"field\":\"traceId\",\"customLabel\":\" \"},\"schema\":\"metric\"}],\"params\":{\"addTooltip\":true,\"addLegend\":false,\"type\":\"metric\",\"metric\":{\"percentageMode\":false,\"useRanges\":false,\"colorSchema\":\"Greens\",\"metricColorMode\":\"Labels\",\"colorsRange\":[{\"from\":0,\"to\":1},{\"from\":10000,\"to\":20000}],\"labels\":{\"show\":true},\"invertColors\":false,\"style\":{\"bgFill\":\"#000\",\"bgColor\":false,\"labelColor\":false,\"subText\":\"\",\"fontSize\":30}}}}"},"id":"be476270-ef43-11ed-8680-adcbd0ec4d25","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"ab680ce0-ccc5-11ed-875a-c33867f208cf","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"visualization","updated_at":"2023-05-10T20:01:38.410Z","version":"WzM2NiwzMF0="} -{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"serviceName: dd-api-service\",\"language\":\"lucene\"},\"filter\":[{\"meta\":{\"type\":\"phrases\",\"key\":\"status.code\",\"value\":\"1, 2\",\"params\":[\"1\",\"2\"],\"alias\":null,\"negate\":false,\"disabled\":false,\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"bool\":{\"should\":[{\"match_phrase\":{\"status.code\":\"1\"}},{\"match_phrase\":{\"status.code\":\"2\"}}],\"minimum_should_match\":1}},\"$state\":{\"store\":\"appState\"}}],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"},"title":"[dd][metrics][errors]","uiStateJSON":"{}","version":1,"visState":"{\"title\":\"[dd][metrics][errors]\",\"type\":\"metric\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"cardinality\",\"params\":{\"field\":\"traceId\",\"customLabel\":\" \"},\"schema\":\"metric\"}],\"params\":{\"addTooltip\":true,\"addLegend\":false,\"type\":\"metric\",\"metric\":{\"percentageMode\":false,\"useRanges\":false,\"colorSchema\":\"Reds\",\"metricColorMode\":\"Labels\",\"colorsRange\":[{\"from\":0,\"to\":1},{\"from\":10000,\"to\":20000}],\"labels\":{\"show\":true},\"invertColors\":false,\"style\":{\"bgFill\":\"#000\",\"bgColor\":false,\"labelColor\":false,\"subText\":\"\",\"fontSize\":30}}}}"},"id":"3e7a7220-ef44-11ed-8680-adcbd0ec4d25","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"ab680ce0-ccc5-11ed-875a-c33867f208cf","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"},{"id":"ab680ce0-ccc5-11ed-875a-c33867f208cf","name":"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index","type":"index-pattern"}],"type":"visualization","updated_at":"2023-05-10T20:01:38.410Z","version":"WzM2NCwzMF0="} -{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"serviceName:dd-api-service\",\"language\":\"lucene\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"},"title":"[dd][metrics][duration][millis]","uiStateJSON":"{}","version":1,"visState":"{\"title\":\"[dd][metrics][duration][millis]\",\"type\":\"metric\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"avg\",\"params\":{\"field\":\"durationInNanos\",\"json\":\"{\\\"script\\\":\\\"(_value)/1e+6\\\"}\",\"customLabel\":\"Milliseconds\"},\"schema\":\"metric\"}],\"params\":{\"addTooltip\":true,\"addLegend\":false,\"type\":\"metric\",\"metric\":{\"percentageMode\":false,\"useRanges\":false,\"colorSchema\":\"Greens\",\"metricColorMode\":\"Labels\",\"colorsRange\":[{\"from\":0,\"to\":1}],\"labels\":{\"show\":true},\"invertColors\":false,\"style\":{\"bgFill\":\"#000\",\"bgColor\":false,\"labelColor\":false,\"subText\":\"\",\"fontSize\":30}}}}"},"id":"583d07d0-ef45-11ed-9ddd-779f1be269b2","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"ab680ce0-ccc5-11ed-875a-c33867f208cf","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"visualization","updated_at":"2023-05-10T20:01:38.410Z","version":"WzM2NSwzMF0="} -{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"serviceName: dd-api-service\",\"language\":\"lucene\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"},"title":"[dd][new][duration][percentiles]","uiStateJSON":"{}","version":1,"visState":"{\"title\":\"[dd][new][duration][percentiles]\",\"type\":\"metric\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"percentiles\",\"params\":{\"field\":\"traceGroupFields.durationInNanos\",\"percents\":[98,90,80,50],\"json\":\"{\\\"script\\\":\\\"(_value)/1e+6\\\"}\",\"customLabel\":\" \"},\"schema\":\"metric\"}],\"params\":{\"addTooltip\":true,\"addLegend\":false,\"type\":\"metric\",\"metric\":{\"percentageMode\":false,\"useRanges\":false,\"colorSchema\":\"Greens\",\"metricColorMode\":\"Labels\",\"colorsRange\":[{\"from\":0,\"to\":1}],\"labels\":{\"show\":true},\"invertColors\":false,\"style\":{\"bgFill\":\"#000\",\"bgColor\":false,\"labelColor\":false,\"subText\":\"\",\"fontSize\":30}}}}"},"id":"8ee41a60-ef4c-11ed-8680-adcbd0ec4d25","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"ab680ce0-ccc5-11ed-875a-c33867f208cf","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"visualization","updated_at":"2023-05-10T20:01:38.410Z","version":"WzM2NywzMF0="} -{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"serviceName: dd-api-service\",\"language\":\"lucene\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"},"title":"[dd][bar][requests_by_api]","uiStateJSON":"{}","version":1,"visState":"{\"title\":\"[dd][bar][requests_by_api]\",\"type\":\"histogram\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"params\":{},\"schema\":\"metric\"},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"params\":{\"field\":\"endTime\",\"timeRange\":{\"from\":\"now-24h\",\"to\":\"now\"},\"useNormalizedOpenSearchInterval\":true,\"scaleMetricValues\":false,\"interval\":\"auto\",\"drop_partials\":false,\"min_doc_count\":1,\"extended_bounds\":{},\"customLabel\":\"Date\"},\"schema\":\"segment\"},{\"id\":\"3\",\"enabled\":true,\"type\":\"terms\",\"params\":{\"field\":\"span.attributes.http@route\",\"orderBy\":\"1\",\"order\":\"desc\",\"size\":5,\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"customLabel\":\"API\"},\"schema\":\"group\"}],\"params\":{\"type\":\"histogram\",\"grid\":{\"categoryLines\":false,\"valueAxis\":\"ValueAxis-1\"},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"filter\":true,\"truncate\":100,\"rotate\":0},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Count\"}}],\"seriesParams\":[{\"show\":true,\"type\":\"histogram\",\"mode\":\"stacked\",\"data\":{\"label\":\"Count\",\"id\":\"1\"},\"valueAxis\":\"ValueAxis-1\",\"drawLinesBetweenPoints\":true,\"lineWidth\":2,\"showCircles\":true}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"top\",\"times\":[],\"addTimeMarker\":false,\"labels\":{\"show\":true},\"thresholdLine\":{\"show\":false,\"value\":10,\"width\":1,\"style\":\"full\",\"color\":\"#E7664C\"}}}"},"id":"d599ed10-ef45-11ed-9b98-c36d505f6575","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"ab680ce0-ccc5-11ed-875a-c33867f208cf","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"visualization","updated_at":"2023-05-10T20:01:38.410Z","version":"WzM2OCwzMF0="} -{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"serviceName: dd-api-service\",\"language\":\"lucene\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"},"title":"[dd][bar][latency_by_api]","uiStateJSON":"{}","version":1,"visState":"{\"title\":\"[dd][bar][latency_by_api]\",\"type\":\"histogram\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"avg\",\"params\":{\"field\":\"durationInNanos\",\"json\":\"{\\\"script\\\":\\\"(_value)/1e+6\\\"}\",\"customLabel\":\"Latency (ms)\"},\"schema\":\"metric\"},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"params\":{\"field\":\"endTime\",\"timeRange\":{\"from\":\"now-24h\",\"to\":\"now\"},\"useNormalizedOpenSearchInterval\":true,\"scaleMetricValues\":false,\"interval\":\"auto\",\"drop_partials\":false,\"min_doc_count\":1,\"extended_bounds\":{},\"customLabel\":\"Date\"},\"schema\":\"segment\"},{\"id\":\"3\",\"enabled\":true,\"type\":\"terms\",\"params\":{\"field\":\"span.attributes.http@route\",\"orderBy\":\"1\",\"order\":\"desc\",\"size\":5,\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"customLabel\":\"API\"},\"schema\":\"group\"}],\"params\":{\"type\":\"histogram\",\"grid\":{\"categoryLines\":false,\"valueAxis\":\"ValueAxis-1\"},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"filter\":true,\"truncate\":100,\"rotate\":0},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Latency (ms)\"}}],\"seriesParams\":[{\"show\":true,\"type\":\"area\",\"mode\":\"stacked\",\"data\":{\"label\":\"Latency (ms)\",\"id\":\"1\"},\"valueAxis\":\"ValueAxis-1\",\"drawLinesBetweenPoints\":true,\"lineWidth\":2,\"showCircles\":true}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"top\",\"times\":[],\"addTimeMarker\":false,\"labels\":{\"show\":true},\"thresholdLine\":{\"show\":false,\"value\":10,\"width\":1,\"style\":\"full\",\"color\":\"#E7664C\"}}}"},"id":"cc593160-ef46-11ed-aa9c-59d0a6a55ce7","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"ab680ce0-ccc5-11ed-875a-c33867f208cf","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"visualization","updated_at":"2023-05-10T20:01:38.410Z","version":"WzM2OSwzMF0="} -{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"serviceName: dd-api-service\",\"language\":\"lucene\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"},"title":"[dd][data][requests_api]","uiStateJSON":"{\"vis\":{\"params\":{\"sort\":{\"columnIndex\":null,\"direction\":null}}}}","version":1,"visState":"{\"title\":\"[dd][data][requests_api]\",\"type\":\"table\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"params\":{},\"schema\":\"metric\"},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"params\":{\"field\":\"span.attributes.http@route\",\"orderBy\":\"1\",\"order\":\"desc\",\"size\":5,\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"customLabel\":\"Api\"},\"schema\":\"bucket\"},{\"id\":\"3\",\"enabled\":true,\"type\":\"terms\",\"params\":{\"field\":\"span.attributes.http@method\",\"orderBy\":\"1\",\"order\":\"desc\",\"size\":5,\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"customLabel\":\"Method\"},\"schema\":\"bucket\"},{\"id\":\"4\",\"enabled\":true,\"type\":\"terms\",\"params\":{\"field\":\"serviceName\",\"orderBy\":\"1\",\"order\":\"desc\",\"size\":5,\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"customLabel\":\"Service\"},\"schema\":\"bucket\"}],\"params\":{\"perPage\":10,\"showPartialRows\":false,\"showMetricsAtAllLevels\":false,\"sort\":{\"columnIndex\":null,\"direction\":null},\"showTotal\":false,\"totalFunc\":\"sum\",\"percentageCol\":\"\"}}"},"id":"83494640-ef46-11ed-9ddd-779f1be269b2","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"ab680ce0-ccc5-11ed-875a-c33867f208cf","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"visualization","updated_at":"2023-05-10T20:01:38.410Z","version":"WzM3MCwzMF0="} -{"attributes":{"columns":["traceId","span.attributes.http@method","span.attributes.http@route","span.attributes.http@status_code","durationInNanos"],"description":"","hits":0,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\"highlightAll\":true,\"version\":true,\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[{\"meta\":{\"alias\":null,\"negate\":false,\"disabled\":false,\"type\":\"phrase\",\"key\":\"serviceName\",\"params\":{\"query\":\"dd-api-service\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match_phrase\":{\"serviceName\":\"dd-api-service\"}},\"$state\":{\"store\":\"appState\"}}],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"},"sort":[],"title":"[dd][ss]","version":1},"id":"613149d0-ef47-11ed-aa9c-59d0a6a55ce7","migrationVersion":{"search":"7.9.3"},"references":[{"id":"ab680ce0-ccc5-11ed-875a-c33867f208cf","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"},{"id":"ab680ce0-ccc5-11ed-875a-c33867f208cf","name":"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index","type":"index-pattern"}],"type":"search","updated_at":"2023-05-10T20:01:38.410Z","version":"WzM3MSwzMF0="} -{"attributes":{"fields":"[{\"count\":0,\"name\":\"_id\",\"type\":\"string\",\"esTypes\":[\"_id\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"count\":0,\"name\":\"_index\",\"type\":\"string\",\"esTypes\":[\"_index\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"count\":0,\"name\":\"_score\",\"type\":\"number\",\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"_source\",\"type\":\"_source\",\"esTypes\":[\"_source\"],\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"_type\",\"type\":\"string\",\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"droppedAttributesCount\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"droppedEventsCount\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"droppedLinksCount\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"durationInNanos\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"endTime\",\"type\":\"date\",\"esTypes\":[\"date_nanos\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"events.attributes.exception@message\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.exception@message.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"events.attributes.exception@message\"},\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.exception@stacktrace\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.exception@stacktrace.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"events.attributes.exception@stacktrace\"},\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.exception@type\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.attributes.exception@type.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"events.attributes.exception@type\"},\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.droppedAttributesCount\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.name\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.name.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"events.name\"},\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"events.time\",\"type\":\"date\",\"esTypes\":[\"date_nanos\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"nested\":{\"path\":\"events\"}}},{\"count\":0,\"name\":\"instrumentationLibrary.name\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"instrumentationLibrary.name.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"instrumentationLibrary.name\"}}},{\"count\":0,\"name\":\"instrumentationLibrary.version\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"instrumentationLibrary.version.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"instrumentationLibrary.version\"}}},{\"count\":0,\"name\":\"kind\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"parentSpanId\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"resource.attributes.host@hostname\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"resource.attributes.host@hostname.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"resource.attributes.host@hostname\"}}},{\"count\":0,\"name\":\"resource.attributes.service@instance@id\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"resource.attributes.service@instance@id.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"resource.attributes.service@instance@id\"}}},{\"count\":0,\"name\":\"resource.attributes.service@name\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"resource.attributes.service@name.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"resource.attributes.service@name\"}}},{\"count\":0,\"name\":\"resource.attributes.telemetry@auto@version\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"resource.attributes.telemetry@auto@version.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"resource.attributes.telemetry@auto@version\"}}},{\"count\":0,\"name\":\"resource.attributes.telemetry@sdk@language\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"resource.attributes.telemetry@sdk@language.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"resource.attributes.telemetry@sdk@language\"}}},{\"count\":0,\"name\":\"resource.attributes.telemetry@sdk@name\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"resource.attributes.telemetry@sdk@name.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"resource.attributes.telemetry@sdk@name\"}}},{\"count\":0,\"name\":\"resource.attributes.telemetry@sdk@version\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"resource.attributes.telemetry@sdk@version.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"resource.attributes.telemetry@sdk@version\"}}},{\"count\":0,\"name\":\"serviceName\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.component\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.component.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.component\"}}},{\"count\":0,\"name\":\"span.attributes.db@instance\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.db@instance.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.db@instance\"}}},{\"count\":0,\"name\":\"span.attributes.db@statement\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.db@statement.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.db@statement\"}}},{\"count\":0,\"name\":\"span.attributes.db@statement@parameters\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.db@statement@parameters.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.db@statement@parameters\"}}},{\"count\":0,\"name\":\"span.attributes.db@type\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.db@type.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.db@type\"}}},{\"count\":0,\"name\":\"span.attributes.db@user\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.db@user.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.db@user\"}}},{\"count\":0,\"name\":\"span.attributes.host@port\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.http@client_ip\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.http@client_ip.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.http@client_ip\"}}},{\"count\":0,\"name\":\"span.attributes.http@flavor\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.http@flavor.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.http@flavor\"}}},{\"count\":0,\"name\":\"span.attributes.http@host\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.http@host.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.http@host\"}}},{\"count\":0,\"name\":\"span.attributes.http@method\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.http@method.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.http@method\"}}},{\"count\":0,\"name\":\"span.attributes.http@route\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.http@route.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.http@route\"}}},{\"count\":0,\"name\":\"span.attributes.http@scheme\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.http@scheme.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.http@scheme\"}}},{\"count\":0,\"name\":\"span.attributes.http@server_name\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.http@server_name.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.http@server_name\"}}},{\"count\":0,\"name\":\"span.attributes.http@status_code\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.http@status_text\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.http@status_text.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.http@status_text\"}}},{\"count\":0,\"name\":\"span.attributes.http@target\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.http@target.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.http@target\"}}},{\"count\":0,\"name\":\"span.attributes.http@url\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.http@url.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.http@url\"}}},{\"count\":0,\"name\":\"span.attributes.http@user_agent\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.http@user_agent.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.http@user_agent\"}}},{\"count\":0,\"name\":\"span.attributes.net@peer@ip\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.net@peer@ip.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.net@peer@ip\"}}},{\"count\":0,\"name\":\"span.attributes.net@peer@name\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.net@peer@name.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.net@peer@name\"}}},{\"count\":0,\"name\":\"span.attributes.net@peer@port\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.thread@id\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span.attributes.thread@name\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span.attributes.thread@name.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span.attributes.thread@name\"}}},{\"count\":0,\"name\":\"spanId\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"startTime\",\"type\":\"date\",\"esTypes\":[\"date_nanos\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"status.code\",\"type\":\"number\",\"esTypes\":[\"integer\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"status.message\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"traceGroup\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"traceGroupFields.durationInNanos\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"traceGroupFields.endTime\",\"type\":\"date\",\"esTypes\":[\"date_nanos\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"traceGroupFields.statusCode\",\"type\":\"number\",\"esTypes\":[\"integer\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"traceId\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"traceState\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"traceState.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"traceState\"}}}]","timeFieldName":"startTime","title":"otel-v1-apm-span-*"},"id":"39e1c110-ef4d-11ed-aaaa-39d41c2520f1","migrationVersion":{"index-pattern":"7.6.0"},"references":[],"type":"index-pattern","updated_at":"2023-05-10T20:00:52.893Z","version":"WzM0NCwzMF0="} -{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}"},"title":"Trace Selector Control","uiStateJSON":"{}","version":1,"visState":"{\"title\":\"Trace Selector Control\",\"type\":\"input_control_vis\",\"aggs\":[],\"params\":{\"controls\":[{\"id\":\"1683748927403\",\"fieldName\":\"traceId\",\"parent\":\"\",\"label\":\"Trace Selector\",\"type\":\"list\",\"options\":{\"type\":\"terms\",\"multiselect\":true,\"dynamicOptions\":true,\"size\":5,\"order\":\"desc\"},\"indexPatternRefName\":\"control_0_index_pattern\"}],\"updateFiltersOnChange\":false,\"useTimeFilter\":false,\"pinFilters\":false}}"},"id":"a6b5f610-ef6d-11ed-aaaa-39d41c2520f1","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"39e1c110-ef4d-11ed-aaaa-39d41c2520f1","name":"control_0_index_pattern","type":"index-pattern"}],"type":"visualization","updated_at":"2023-05-10T20:02:54.576Z","version":"WzM3NywzMF0="} -{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"},"title":"Service Breakdown by Time for a Trace","uiStateJSON":"{}","version":1,"visState":"{\"title\":\"Service Breakdown by Time for a Trace\",\"type\":\"pie\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"sum\",\"params\":{\"field\":\"durationInNanos\"},\"schema\":\"metric\"},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"params\":{\"field\":\"serviceName\",\"orderBy\":\"1\",\"order\":\"desc\",\"size\":1000,\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\"},\"schema\":\"segment\"}],\"params\":{\"type\":\"pie\",\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"isDonut\":true,\"labels\":{\"show\":false,\"values\":true,\"last_level\":true,\"truncate\":100}}}"},"id":"d0eab5b0-ef6d-11ed-aaaa-39d41c2520f1","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"ab680ce0-ccc5-11ed-875a-c33867f208cf","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"visualization","updated_at":"2023-05-10T20:04:05.387Z","version":"WzM3OCwzMF0="} -{"attributes":{"description":"","hits":0,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}"},"optionsJSON":"{\"hidePanelTitles\":false,\"useMargins\":true}","panelsJSON":"[{\"version\":\"3.0.0\",\"gridData\":{\"h\":6,\"i\":\"cc742d73-2798-40e7-9aea-78577f5cadea\",\"w\":9,\"x\":0,\"y\":0},\"panelIndex\":\"cc742d73-2798-40e7-9aea-78577f5cadea\",\"embeddableConfig\":{\"title\":\"Requests\",\"hidePanelTitles\":false},\"title\":\"Requests\",\"panelRefName\":\"panel_0\"},{\"version\":\"3.0.0\",\"gridData\":{\"h\":6,\"i\":\"db7e0092-021d-43c4-b36d-f919c0f1319b\",\"w\":9,\"x\":9,\"y\":0},\"panelIndex\":\"db7e0092-021d-43c4-b36d-f919c0f1319b\",\"embeddableConfig\":{\"title\":\"Errors\",\"hidePanelTitles\":false},\"title\":\"Errors\",\"panelRefName\":\"panel_1\"},{\"version\":\"3.0.0\",\"gridData\":{\"h\":6,\"i\":\"1e34c7a4-c7e7-4f26-b0bb-7db23ddbfa1e\",\"w\":11,\"x\":18,\"y\":0},\"panelIndex\":\"1e34c7a4-c7e7-4f26-b0bb-7db23ddbfa1e\",\"embeddableConfig\":{\"title\":\"Latency Average\",\"hidePanelTitles\":false},\"title\":\"Latency Average\",\"panelRefName\":\"panel_2\"},{\"version\":\"3.0.0\",\"gridData\":{\"h\":6,\"i\":\"bd5ec796-6045-472a-aadd-c1330b50844a\",\"w\":18,\"x\":29,\"y\":0},\"panelIndex\":\"bd5ec796-6045-472a-aadd-c1330b50844a\",\"embeddableConfig\":{\"title\":\"Latency Percentile (ms)\",\"hidePanelTitles\":false},\"title\":\"Latency Percentile (ms)\",\"panelRefName\":\"panel_3\"},{\"version\":\"3.0.0\",\"gridData\":{\"h\":14,\"i\":\"e7c4907f-beb9-498f-91f7-644a0a318c92\",\"w\":15,\"x\":0,\"y\":6},\"panelIndex\":\"e7c4907f-beb9-498f-91f7-644a0a318c92\",\"embeddableConfig\":{\"title\":\"Requests Count Over The Time\",\"hidePanelTitles\":false},\"title\":\"Requests Count Over The Time\",\"panelRefName\":\"panel_4\"},{\"version\":\"3.0.0\",\"gridData\":{\"h\":14,\"i\":\"391985d7-e55e-4c71-afce-7321d3149b95\",\"w\":16,\"x\":15,\"y\":6},\"panelIndex\":\"391985d7-e55e-4c71-afce-7321d3149b95\",\"embeddableConfig\":{\"title\":\"Latency Average\",\"hidePanelTitles\":false},\"title\":\"Latency Average\",\"panelRefName\":\"panel_5\"},{\"version\":\"3.0.0\",\"gridData\":{\"h\":14,\"i\":\"30fe503f-6c4a-46cd-b82f-3d53b25103ad\",\"w\":16,\"x\":31,\"y\":6},\"panelIndex\":\"30fe503f-6c4a-46cd-b82f-3d53b25103ad\",\"embeddableConfig\":{\"title\":\"Requests By Api\",\"hidePanelTitles\":false},\"title\":\"Requests By Api\",\"panelRefName\":\"panel_6\"},{\"version\":\"3.0.0\",\"gridData\":{\"h\":17,\"i\":\"b400dd8c-c57b-4f64-a326-d7bcebeda348\",\"w\":47,\"x\":0,\"y\":20},\"panelIndex\":\"b400dd8c-c57b-4f64-a326-d7bcebeda348\",\"embeddableConfig\":{\"title\":\"Traces\",\"hidePanelTitles\":false},\"title\":\"Traces\",\"panelRefName\":\"panel_7\"},{\"version\":\"3.0.0\",\"gridData\":{\"h\":10,\"i\":\"b798d9f5-097b-410f-82f5-d89a76b248af\",\"w\":47,\"x\":0,\"y\":37},\"panelIndex\":\"b798d9f5-097b-410f-82f5-d89a76b248af\",\"embeddableConfig\":{},\"panelRefName\":\"panel_8\"},{\"version\":\"3.0.0\",\"gridData\":{\"x\":0,\"y\":47,\"w\":24,\"h\":15,\"i\":\"202e87db-da14-447d-9400-13e526456a24\"},\"panelIndex\":\"202e87db-da14-447d-9400-13e526456a24\",\"embeddableConfig\":{},\"panelRefName\":\"panel_9\"}]","refreshInterval":{"pause":true,"value":0},"timeFrom":"now-24h","timeRestore":true,"timeTo":"now","title":"DD Dashboard New","version":1},"id":"609577a0-ef4a-11ed-9daf-6da9ea5ab0f8","migrationVersion":{"dashboard":"7.9.3"},"references":[{"id":"be476270-ef43-11ed-8680-adcbd0ec4d25","name":"panel_0","type":"visualization"},{"id":"3e7a7220-ef44-11ed-8680-adcbd0ec4d25","name":"panel_1","type":"visualization"},{"id":"583d07d0-ef45-11ed-9ddd-779f1be269b2","name":"panel_2","type":"visualization"},{"id":"8ee41a60-ef4c-11ed-8680-adcbd0ec4d25","name":"panel_3","type":"visualization"},{"id":"d599ed10-ef45-11ed-9b98-c36d505f6575","name":"panel_4","type":"visualization"},{"id":"cc593160-ef46-11ed-aa9c-59d0a6a55ce7","name":"panel_5","type":"visualization"},{"id":"83494640-ef46-11ed-9ddd-779f1be269b2","name":"panel_6","type":"visualization"},{"id":"613149d0-ef47-11ed-aa9c-59d0a6a55ce7","name":"panel_7","type":"search"},{"id":"a6b5f610-ef6d-11ed-aaaa-39d41c2520f1","name":"panel_8","type":"visualization"},{"id":"d0eab5b0-ef6d-11ed-aaaa-39d41c2520f1","name":"panel_9","type":"visualization"}],"type":"dashboard","updated_at":"2023-05-10T20:05:16.472Z","version":"WzM4MCwzMF0="} -{"exportedCount":13,"missingRefCount":0,"missingReferences":[]} \ No newline at end of file From 2505abc02aa8fa4b51acd44ee708aabcab7a7524 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Fri, 12 May 2023 14:55:50 -0700 Subject: [PATCH 032/190] Simplify routing logic --- .../routes/placeholder/placeholder_router.ts | 144 ++++++------------ 1 file changed, 47 insertions(+), 97 deletions(-) diff --git a/server/routes/placeholder/placeholder_router.ts b/server/routes/placeholder/placeholder_router.ts index fdbea6d31b..7ec2907428 100644 --- a/server/routes/placeholder/placeholder_router.ts +++ b/server/routes/placeholder/placeholder_router.ts @@ -13,12 +13,18 @@ import { ILegacyScopedClusterClient, IOpenSearchDashboardsResponse, IRouter, + OpenSearchDashboardsRequest, + RequestHandlerContext, } from '../../../../../src/core/server'; import { INTEGRATIONS_BASE, OBSERVABILITY_BASE } from '../../../common/constants/shared'; import { addClickToMetric, getMetrics } from '../../common/metrics/metrics_helper'; import { PlaceholderAdaptor } from '../../../server/adaptors/placeholder/placeholder_adaptor'; import { importFile } from '../../../../../src/plugins/saved_objects_management/public/lib'; import { SavedObject } from '../../../../../src/plugins/data/common'; +import { + OpenSearchDashboardsResponse, + OpenSearchDashboardsResponseFactory, +} from '../../../../../src/core/server/http/router'; export async function readNDJson(stream: Readable): Promise { return new Promise((resolve, reject) => { @@ -43,8 +49,35 @@ export async function readNDJson(stream: Readable): Promise { let added = false; +const wrappedData = async ( + context: RequestHandlerContext, + request: OpenSearchDashboardsRequest, + response: OpenSearchDashboardsResponseFactory, + callback: any +): Promise => { + const opensearchClient: ILegacyScopedClusterClient = context.observability_plugin.observabilityClient.asScoped( + request + ); + try { + console.log(`Calling callback for path "${request.url.pathname}"`); + const data = await callback(opensearchClient); + console.log(`Callback returned ${data.toString().length} bytes`); + return response.ok({ + body: { + data, + }, + }); + } catch (err: any) { + console.error(`Callback failed with error "${err.message}"`); + return response.custom({ + statusCode: err.statusCode || 500, + body: err.message, + }); + } +}; + export function registerPlaceholderRoute(router: IRouter) { - const appAnalyticsBackend = new PlaceholderAdaptor(); + const integrationsAdaptor = new PlaceholderAdaptor(); router.get( { @@ -52,26 +85,7 @@ export function registerPlaceholderRoute(router: IRouter) { validate: false, }, async (context, request, response): Promise => { - const opensearchClient: ILegacyScopedClusterClient = context.observability_plugin.observabilityClient.asScoped( - request - ); - let applicationsData: ApplicationType[] = []; - try { - console.log('in get'); - applicationsData = await appAnalyticsBackend.fetchApps(opensearchClient); - console.log(applicationsData); - return response.ok({ - body: { - data: applicationsData, - }, - }); - } catch (err: any) { - console.error('Error occurred while fetching applications', err); - return response.custom({ - statusCode: err.statusCode || 500, - body: err.message, - }); - } + return wrappedData(context, request, response, integrationsAdaptor.fetchApps); } ); @@ -81,28 +95,12 @@ export function registerPlaceholderRoute(router: IRouter) { validate: false, }, async (context, request, response): Promise => { - const opensearchClient: ILegacyScopedClusterClient = context.observability_plugin.observabilityClient.asScoped( - request - ); - console.log('in post'); - const applicationsData: ApplicationType[] = []; - try { + return wrappedData(context, request, response, async (client: any) => { const stream = fs.createReadStream(__dirname + '/test.ndjson'); const assets = await readNDJson(stream); - const bulkCreateResponse = await context.core.savedObjects.client.bulkCreate(assets); added = true; - return response.ok({ - body: { - data: {}, - }, - }); - } catch (err: any) { - console.error('Error occurred while fetching applications', err); - return response.custom({ - statusCode: err.statusCode || 500, - body: err.message, - }); - } + return context.core.savedObjects.client.bulkCreate(assets); + }); } ); router.get( @@ -111,16 +109,9 @@ export function registerPlaceholderRoute(router: IRouter) { validate: false, }, async (context, request, response): Promise => { - try { - const random = await fetch('http://127.0.0.1:4010/repository/id', {}); - return response.ok({ - body: { - data: await random.json(), - }, - }); - } catch (error) { - console.log(error); - } + return wrappedData(context, request, response, async (_client: any) => { + return await fetch('http://127.0.0.1:4010/repository/id', {}).json(); + }); } ); @@ -130,16 +121,9 @@ export function registerPlaceholderRoute(router: IRouter) { validate: false, }, async (context, request, response): Promise => { - try { - const random = await fetch('http://127.0.0.1:4010/store?limit=24', {}); - return response.ok({ - body: { - data: await random.json(), - }, - }); - } catch (error) { - console.log(error); - } + return wrappedData(context, request, response, async (_client: any) => { + return await fetch('http://127.0.0.1:4010/store?limit=24', {}).json(); + }); } ); @@ -149,24 +133,7 @@ export function registerPlaceholderRoute(router: IRouter) { validate: false, }, async (context, request, response): Promise => { - const opensearchClient: ILegacyScopedClusterClient = context.observability_plugin.observabilityClient.asScoped( - request - ); - let applicationsData: ApplicationType[] = []; - try { - applicationsData = await appAnalyticsBackend.fetchApps(opensearchClient); - return response.ok({ - body: { - data: applicationsData, - }, - }); - } catch (err: any) { - console.error('Error occurred while fetching applications', err); - return response.custom({ - statusCode: err.statusCode || 500, - body: err.message, - }); - } + return wrappedData(context, request, response, integrationsAdaptor.fetchApps); } ); @@ -176,26 +143,9 @@ export function registerPlaceholderRoute(router: IRouter) { validate: false, }, async (context, request, response): Promise => { - const opensearchClient: ILegacyScopedClusterClient = context.observability_plugin.observabilityClient.asScoped( - request + return wrappedData(context, request, response, async (client: any) => + integrationsAdaptor.fetchAdded(client, added) ); - let applicationsData: ApplicationType[] = []; - try { - console.log('in get added'); - applicationsData = await appAnalyticsBackend.fetchAdded(opensearchClient, added); - console.log('applicationsData: ' + applicationsData); - return response.ok({ - body: { - data: applicationsData, - }, - }); - } catch (err: any) { - console.error('Error occurred while fetching applications', err); - return response.custom({ - statusCode: err.statusCode || 500, - body: err.message, - }); - } } ); } From 43ed7e2e9a88132c570dbb96f25445aaba99519e Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Fri, 12 May 2023 15:58:11 -0700 Subject: [PATCH 033/190] Add testing for wrappedData method Signed-off-by: Simeon Widdis --- .../__tests__/placeholder_router.test.ts | 61 +++++++++++++++++++ .../routes/placeholder/placeholder_router.ts | 23 ++----- 2 files changed, 67 insertions(+), 17 deletions(-) create mode 100644 server/routes/placeholder/__tests__/placeholder_router.test.ts diff --git a/server/routes/placeholder/__tests__/placeholder_router.test.ts b/server/routes/placeholder/__tests__/placeholder_router.test.ts new file mode 100644 index 0000000000..07f7156397 --- /dev/null +++ b/server/routes/placeholder/__tests__/placeholder_router.test.ts @@ -0,0 +1,61 @@ +import { + OpenSearchDashboardsRequest, + RequestHandlerContext, +} from '../../../../../../src/core/server'; +import { OpenSearchDashboardsResponseFactory } from '../../../../../../src/core/server/http/router'; +import { wrappedData } from '../placeholder_router'; + +jest + .mock('../../../../../../src/core/server', () => jest.fn()) + .mock('../../../../../../src/core/server/http/router', () => jest.fn()); + +describe('Data wrapper', () => { + const contextMock: Partial = { + observability_plugin: { + observabilityClient: { + asScoped: jest.fn(), + }, + }, + }; + const requestMock: Partial = { + url: { + pathname: '/test', + }, + }; + const responseMock: Partial = { + custom: jest.fn((data) => data), + ok: jest.fn((data) => data), + }; + + it('retrieves data from the callback method', async () => { + const callback = jest.fn((_) => { + return { test: 'data' }; + }); + const result = await wrappedData( + contextMock as RequestHandlerContext, + requestMock as OpenSearchDashboardsRequest, + responseMock as OpenSearchDashboardsResponseFactory, + callback + ); + + expect(callback).toHaveBeenCalled(); + expect(responseMock.ok).toHaveBeenCalled(); + expect(result.body.data).toEqual({ test: 'data' }); + }); + + it('passes callback errors through', async () => { + const callback = jest.fn((_) => { + throw new Error('test error'); + }); + const result = await wrappedData( + contextMock as RequestHandlerContext, + requestMock as OpenSearchDashboardsRequest, + responseMock as OpenSearchDashboardsResponseFactory, + callback + ); + + expect(callback).toHaveBeenCalled(); + expect(responseMock.custom).toHaveBeenCalled(); + expect(result.body).toEqual('test error'); + }); +}); diff --git a/server/routes/placeholder/placeholder_router.ts b/server/routes/placeholder/placeholder_router.ts index 7ec2907428..0d7da240be 100644 --- a/server/routes/placeholder/placeholder_router.ts +++ b/server/routes/placeholder/placeholder_router.ts @@ -3,30 +3,20 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { ResponseError } from '@opensearch-project/opensearch/lib/errors'; -import { schema } from '@osd/config-schema'; import fetch from 'node-fetch'; -import { ApplicationType } from 'common/types/application_analytics'; import * as fs from 'fs'; import { Readable } from 'stream'; import { ILegacyScopedClusterClient, - IOpenSearchDashboardsResponse, IRouter, OpenSearchDashboardsRequest, RequestHandlerContext, } from '../../../../../src/core/server'; import { INTEGRATIONS_BASE, OBSERVABILITY_BASE } from '../../../common/constants/shared'; -import { addClickToMetric, getMetrics } from '../../common/metrics/metrics_helper'; import { PlaceholderAdaptor } from '../../../server/adaptors/placeholder/placeholder_adaptor'; -import { importFile } from '../../../../../src/plugins/saved_objects_management/public/lib'; -import { SavedObject } from '../../../../../src/plugins/data/common'; -import { - OpenSearchDashboardsResponse, - OpenSearchDashboardsResponseFactory, -} from '../../../../../src/core/server/http/router'; +import { OpenSearchDashboardsResponseFactory } from '../../../../../src/core/server/http/router'; -export async function readNDJson(stream: Readable): Promise { +export const readNDJson = async (stream: Readable): Promise => { return new Promise((resolve, reject) => { let assets: any[] = []; let json: string = ''; @@ -45,11 +35,11 @@ export async function readNDJson(stream: Readable): Promise { reject(err); }); }); -} +}; let added = false; -const wrappedData = async ( +export const wrappedData = async ( context: RequestHandlerContext, request: OpenSearchDashboardsRequest, response: OpenSearchDashboardsResponseFactory, @@ -59,16 +49,15 @@ const wrappedData = async ( request ); try { - console.log(`Calling callback for path "${request.url.pathname}"`); const data = await callback(opensearchClient); - console.log(`Callback returned ${data.toString().length} bytes`); + console.log(`${request.url.pathname}: callback returned ${data.toString().length} bytes`); return response.ok({ body: { data, }, }); } catch (err: any) { - console.error(`Callback failed with error "${err.message}"`); + console.error(`${request.url.pathname}: callback failed with error "${err.message}"`); return response.custom({ statusCode: err.statusCode || 500, body: err.message, From 91fb2759647dd9c72156640c0cf40b01d8658466 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Mon, 15 May 2023 10:20:02 -0700 Subject: [PATCH 034/190] Remove extraneous test ndjson Signed-off-by: Simeon Widdis --- .../routes/placeholder/placeholder_router.ts | 2 +- server/routes/placeholder/test.ndjson | 266 ------------------ 2 files changed, 1 insertion(+), 267 deletions(-) delete mode 100644 server/routes/placeholder/test.ndjson diff --git a/server/routes/placeholder/placeholder_router.ts b/server/routes/placeholder/placeholder_router.ts index 0d7da240be..f52bcbb62f 100644 --- a/server/routes/placeholder/placeholder_router.ts +++ b/server/routes/placeholder/placeholder_router.ts @@ -85,7 +85,7 @@ export function registerPlaceholderRoute(router: IRouter) { }, async (context, request, response): Promise => { return wrappedData(context, request, response, async (client: any) => { - const stream = fs.createReadStream(__dirname + '/test.ndjson'); + const stream = fs.createReadStream(__dirname + '/__tests__/test.ndjson'); const assets = await readNDJson(stream); added = true; return context.core.savedObjects.client.bulkCreate(assets); diff --git a/server/routes/placeholder/test.ndjson b/server/routes/placeholder/test.ndjson deleted file mode 100644 index 777651bbb3..0000000000 --- a/server/routes/placeholder/test.ndjson +++ /dev/null @@ -1,266 +0,0 @@ -{ - "attributes": { - "fields": "[{\"count\":0,\"name\":\"@timestamp\",\"type\":\"date\",\"esTypes\":[\"date\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"_id\",\"type\":\"string\",\"esTypes\":[\"_id\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"count\":0,\"name\":\"_index\",\"type\":\"string\",\"esTypes\":[\"_index\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"count\":0,\"name\":\"_score\",\"type\":\"number\",\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"_source\",\"type\":\"_source\",\"esTypes\":[\"_source\"],\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"_type\",\"type\":\"string\",\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"attributes.data_stream.dataset\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"attributes.data_stream.dataset.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"attributes.data_stream.dataset\"}}},{\"count\":0,\"name\":\"attributes.data_stream.namespace\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"attributes.data_stream.namespace.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"attributes.data_stream.namespace\"}}},{\"count\":0,\"name\":\"attributes.data_stream.type\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"attributes.data_stream.type.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"attributes.data_stream.type\"}}},{\"count\":0,\"name\":\"body\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"body.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"body\"}}},{\"count\":0,\"name\":\"communication.source.address\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"communication.source.address.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"communication.source.address\"}}},{\"count\":0,\"name\":\"communication.source.ip\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"communication.source.ip.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"communication.source.ip\"}}},{\"count\":0,\"name\":\"event.category\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"event.category.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"event.category\"}}},{\"count\":0,\"name\":\"event.domain\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"event.domain.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"event.domain\"}}},{\"count\":0,\"name\":\"event.kind\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"event.kind.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"event.kind\"}}},{\"count\":0,\"name\":\"event.name\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"event.name.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"event.name\"}}},{\"count\":0,\"name\":\"event.result\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"event.result.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"event.result\"}}},{\"count\":0,\"name\":\"event.type\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"event.type.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"event.type\"}}},{\"count\":0,\"name\":\"http.flavor\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"http.flavor.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"http.flavor\"}}},{\"count\":0,\"name\":\"http.request.method\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"http.request.method.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"http.request.method\"}}},{\"count\":0,\"name\":\"http.response.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"http.response.status_code\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"http.response.status_code.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"http.response.status_code\"}}},{\"count\":0,\"name\":\"http.url\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"http.url\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"http.url\"}}},{\"count\":0,\"name\":\"observerTime\",\"type\":\"date\",\"esTypes\":[\"date\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span_id\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span_id.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span_id\"}}},{\"count\":0,\"name\":\"trace_id\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"trace_id.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"trace_id\"}}}]", - "timeFieldName": "@timestamp", - "title": "sso_logs-*-*" - }, - "id": "47892350-b495-11ed-af0a-cf5c93b5a3b6", - "migrationVersion": { - "index-pattern": "7.6.0" - }, - "references": [], - "type": "index-pattern", - "updated_at": "2023-02-26T00:34:36.592Z", - "version": "WzYxLDdd" -} -{ - "attributes": { - "columns": [ - "http.request.method", - "http.response.status_code" - ], - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\n \"highlightAll\": true,\n \"version\": true,\n \"query\": {\n \"query\": \"event.domain:nginx.access\",\n \"language\": \"kuery\"\n },\n \"filter\": [],\n \"indexRefName\": \"kibanaSavedObjectMeta.searchSourceJSON.index\"\n}" - }, - "sort": [], - "title": "[NGINX Core Logs 1.0] Nginx Access Logs", - "version": 1 - }, - "id": "d80e05b2-518c-4c3d-9651-4c9d8632dce4", - "migrationVersion": { - "search": "7.9.3" - }, - "references": [ - { - "id": "47892350-b495-11ed-af0a-cf5c93b5a3b6", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "type": "search", - "updated_at": "2023-02-26T00:34:36.592Z", - "version": "WzYyLDdd" -} -{ - "attributes": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[]}" - }, - "savedSearchRefName": "search_0", - "title": "[NGINX Core Logs 1.0] Response codes over time", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"[NGINX Core Logs 1.0] Response codes over time\",\"type\":\"histogram\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"params\":{},\"schema\":\"metric\"},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"params\":{\"field\":\"@timestamp\",\"timeRange\":{\"from\":\"now-24h\",\"to\":\"now\"},\"useNormalizedOpenSearchInterval\":true,\"scaleMetricValues\":false,\"interval\":\"auto\",\"drop_partials\":false,\"min_doc_count\":1,\"extended_bounds\":{}},\"schema\":\"segment\"},{\"id\":\"3\",\"enabled\":true,\"type\":\"filters\",\"params\":{\"filters\":[{\"input\":{\"query\":\"http.response.status_code:[200 TO 299]\",\"language\":\"lucene\"},\"label\":\"200s\"},{\"input\":{\"query\":\"http.response.status_code:[300 TO 399]\",\"language\":\"lucene\"},\"label\":\"300s\"},{\"input\":{\"query\":\"http.response.status_code:[400 TO 499]\",\"language\":\"lucene\"},\"label\":\"400s\"},{\"input\":{\"query\":\"http.response.status_code:[500 TO 599]\",\"language\":\"lucene\"},\"label\":\"500s\"},{\"input\":{\"query\":\"http.response.status_code:0\",\"language\":\"lucene\"},\"label\":\"0\"}]},\"schema\":\"group\"}],\"params\":{\"type\":\"histogram\",\"grid\":{\"categoryLines\":false},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"filter\":true,\"truncate\":100},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Count\"}}],\"seriesParams\":[{\"show\":true,\"type\":\"histogram\",\"mode\":\"stacked\",\"data\":{\"label\":\"Count\",\"id\":\"1\"},\"valueAxis\":\"ValueAxis-1\",\"drawLinesBetweenPoints\":true,\"lineWidth\":2,\"showCircles\":true}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"times\":[],\"addTimeMarker\":false,\"labels\":{\"show\":false},\"thresholdLine\":{\"show\":false,\"value\":10,\"width\":1,\"style\":\"full\",\"color\":\"#E7664C\"}}}" - }, - "id": "3b49a65d-54d8-483d-a8f0-3d7c855e1ecf", - "migrationVersion": { - "visualization": "7.10.0" - }, - "references": [ - { - "id": "d80e05b2-518c-4c3d-9651-4c9d8632dce4", - "name": "search_0", - "type": "search" - } - ], - "type": "visualization", - "updated_at": "2023-02-26T00:34:36.592Z", - "version": "WzYzLDdd" -} -{ - "attributes": { - "columns": [ - "_source" - ], - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\n \"highlightAll\": true,\n \"query\": {\n \"query\": \"http.response.status_code >= 300 and event.domain:nginx.access\",\n \"language\": \"kuery\"\n },\n \"version\": true,\n \"highlight\": {\n \"post_tags\": [\n \"@/kibana-highlighted-field@\"\n ],\n \"fields\": {\n \"*\": {}\n },\n \"pre_tags\": [\n \"@kibana-highlighted-field@\"\n ],\n \"require_field_match\": false,\n \"fragment_size\": 2147483647\n },\n \"filter\": [],\n \"indexRefName\": \"kibanaSavedObjectMeta.searchSourceJSON.index\"\n}" - }, - "sort": [ - [ - "@timestamp", - "desc" - ] - ], - "title": "[NGINX Core Logs 1.0] Nginx Error Logs", - "version": 1 - }, - "id": "9f820fbe-ddde-43a2-9402-30bd295c97f6", - "migrationVersion": { - "search": "7.9.3" - }, - "references": [ - { - "id": "47892350-b495-11ed-af0a-cf5c93b5a3b6", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "type": "search", - "updated_at": "2023-02-26T00:34:36.592Z", - "version": "WzY0LDdd" -} -{ - "attributes": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[]}" - }, - "savedSearchRefName": "search_0", - "title": "[NGINX Core Logs 1.0] Errors over time", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"[NGINX Core Logs 1.0] Errors over time\",\"type\":\"histogram\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"params\":{},\"schema\":\"metric\"},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"params\":{\"field\":\"@timestamp\",\"timeRange\":{\"from\":\"now-24h\",\"to\":\"now\"},\"useNormalizedOpenSearchInterval\":true,\"scaleMetricValues\":false,\"interval\":\"auto\",\"drop_partials\":false,\"min_doc_count\":1,\"extended_bounds\":{}},\"schema\":\"segment\"}],\"params\":{\"type\":\"histogram\",\"grid\":{\"categoryLines\":false},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"filter\":true,\"truncate\":100},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Count\"}}],\"seriesParams\":[{\"show\":true,\"type\":\"histogram\",\"mode\":\"stacked\",\"data\":{\"label\":\"Count\",\"id\":\"1\"},\"valueAxis\":\"ValueAxis-1\",\"drawLinesBetweenPoints\":true,\"lineWidth\":2,\"showCircles\":true}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"times\":[],\"addTimeMarker\":false,\"labels\":{\"show\":false},\"thresholdLine\":{\"show\":false,\"value\":10,\"width\":1,\"style\":\"full\",\"color\":\"#E7664C\"}}}" - }, - "id": "865e577b-634b-4a65-b9d6-7e324c395d18", - "migrationVersion": { - "visualization": "7.10.0" - }, - "references": [ - { - "id": "9f820fbe-ddde-43a2-9402-30bd295c97f6", - "name": "search_0", - "type": "search" - } - ], - "type": "visualization", - "updated_at": "2023-02-26T00:34:36.592Z", - "version": "WzY1LDdd" -} -{ - "attributes": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}" - }, - "savedSearchRefName": "search_0", - "title": "Top Paths", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Top Paths\",\"type\":\"table\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"params\":{},\"schema\":\"metric\"},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"params\":{\"field\":\"http.url\",\"orderBy\":\"1\",\"order\":\"desc\",\"size\":10,\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"customLabel\":\"Paths\"},\"schema\":\"bucket\"}],\"params\":{\"perPage\":10,\"showPartialRows\":false,\"showMetricsAtAllLevels\":false,\"showTotal\":false,\"totalFunc\":\"sum\",\"percentageCol\":\"\"}}" - }, - "id": "dc1803f0-b478-11ed-9063-ebe46f9ac203", - "migrationVersion": { - "visualization": "7.10.0" - }, - "references": [ - { - "id": "d80e05b2-518c-4c3d-9651-4c9d8632dce4", - "name": "search_0", - "type": "search" - } - ], - "type": "visualization", - "updated_at": "2023-02-26T00:34:36.592Z", - "version": "WzY2LDdd" -} -{ - "attributes": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}" - }, - "savedSearchRefName": "search_0", - "title": "Data Volume", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Data Volume\",\"type\":\"area\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"sum\",\"params\":{\"field\":\"http.response.bytes\",\"customLabel\":\"Response Bytes\"},\"schema\":\"metric\"},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"params\":{\"field\":\"observerTime\",\"timeRange\":{\"from\":\"now-15m\",\"to\":\"now\"},\"useNormalizedOpenSearchInterval\":true,\"scaleMetricValues\":false,\"interval\":\"auto\",\"drop_partials\":false,\"min_doc_count\":1,\"extended_bounds\":{},\"customLabel\":\"\"},\"schema\":\"segment\"}],\"params\":{\"type\":\"area\",\"grid\":{\"categoryLines\":false},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"filter\":true,\"truncate\":100},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Response Bytes\"}}],\"seriesParams\":[{\"show\":true,\"type\":\"area\",\"mode\":\"stacked\",\"data\":{\"label\":\"Response Bytes\",\"id\":\"1\"},\"drawLinesBetweenPoints\":true,\"lineWidth\":2,\"showCircles\":true,\"interpolate\":\"linear\",\"valueAxis\":\"ValueAxis-1\"}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"times\":[],\"addTimeMarker\":false,\"thresholdLine\":{\"show\":false,\"value\":10,\"width\":1,\"style\":\"full\",\"color\":\"#E7664C\"},\"labels\":{}}}" - }, - "id": "99acc580-b47a-11ed-9063-ebe46f9ac203", - "migrationVersion": { - "visualization": "7.10.0" - }, - "references": [ - { - "id": "d80e05b2-518c-4c3d-9651-4c9d8632dce4", - "name": "search_0", - "type": "search" - } - ], - "type": "visualization", - "updated_at": "2023-02-26T00:34:36.592Z", - "version": "WzY3LDdd" -} -{ - "attributes": { - "description": "requests per minute aggregation", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "Req-per-min", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Req-per-min\",\"type\":\"table\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"moving_avg\",\"params\":{\"metricAgg\":\"custom\",\"customMetric\":{\"id\":\"1-metric\",\"enabled\":true,\"type\":\"count\",\"params\":{}},\"window\":5,\"script\":\"MovingFunctions.unweightedAvg(values)\"},\"schema\":\"metric\"},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"params\":{\"field\":\"@timestamp\",\"timeRange\":{\"from\":\"2023-02-24T17:25:00.000Z\",\"to\":\"2023-02-24T17:30:00.000Z\"},\"useNormalizedOpenSearchInterval\":true,\"scaleMetricValues\":false,\"interval\":\"m\",\"drop_partials\":false,\"min_doc_count\":0,\"extended_bounds\":{},\"customLabel\":\"Req/Min\"},\"schema\":\"bucket\"}],\"params\":{\"perPage\":10,\"showPartialRows\":false,\"showMetricsAtAllLevels\":false,\"showTotal\":false,\"totalFunc\":\"sum\",\"percentageCol\":\"\"}}" - }, - "id": "01ea64d0-b62f-11ed-a677-43d7aa86763b", - "migrationVersion": { - "visualization": "7.10.0" - }, - "references": [ - { - "id": "47892350-b495-11ed-af0a-cf5c93b5a3b6", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "type": "visualization", - "updated_at": "2023-02-26T23:40:53.020Z", - "version": "WzcyLDdd" -} -{ - "attributes": { - "description": "Nginx dashboard with basic Observability on access / error logs", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"language\":\"kuery\",\"query\":\"\"},\"filter\":[]}" - }, - "optionsJSON": "{\"hidePanelTitles\":false,\"useMargins\":true}", - "panelsJSON": "[{\"version\":\"2.5.0\",\"gridData\":{\"h\":8,\"i\":\"1f31e50b-06e3-41e6-972e-e4e5fe1a9872\",\"w\":48,\"x\":0,\"y\":0},\"panelIndex\":\"1f31e50b-06e3-41e6-972e-e4e5fe1a9872\",\"embeddableConfig\":{},\"panelRefName\":\"panel_0\"},{\"version\":\"2.5.0\",\"gridData\":{\"h\":9,\"i\":\"d91a8da4-b34b-470a-aca6-9c76b47cd6fb\",\"w\":24,\"x\":0,\"y\":8},\"panelIndex\":\"d91a8da4-b34b-470a-aca6-9c76b47cd6fb\",\"embeddableConfig\":{},\"panelRefName\":\"panel_1\"},{\"version\":\"2.5.0\",\"gridData\":{\"h\":15,\"i\":\"27149e5a-3a77-4f3c-800e-8a160c3765f4\",\"w\":24,\"x\":24,\"y\":8},\"panelIndex\":\"27149e5a-3a77-4f3c-800e-8a160c3765f4\",\"embeddableConfig\":{},\"panelRefName\":\"panel_2\"},{\"version\":\"2.5.0\",\"gridData\":{\"x\":0,\"y\":17,\"w\":24,\"h\":15,\"i\":\"4d8c2aa7-159c-4a1a-80ff-00a9299056ce\"},\"panelIndex\":\"4d8c2aa7-159c-4a1a-80ff-00a9299056ce\",\"embeddableConfig\":{},\"panelRefName\":\"panel_3\"},{\"version\":\"2.5.0\",\"gridData\":{\"x\":24,\"y\":23,\"w\":24,\"h\":15,\"i\":\"800b7f19-f50c-417f-8987-21b930531cbe\"},\"panelIndex\":\"800b7f19-f50c-417f-8987-21b930531cbe\",\"embeddableConfig\":{},\"panelRefName\":\"panel_4\"}]", - "timeRestore": false, - "title": "[NGINX Core Logs 1.0] Overview", - "version": 1 - }, - "id": "96847220-5261-44d0-89b4-65f3a659f13a", - "migrationVersion": { - "dashboard": "7.9.3" - }, - "references": [ - { - "id": "3b49a65d-54d8-483d-a8f0-3d7c855e1ecf", - "name": "panel_0", - "type": "visualization" - }, - { - "id": "865e577b-634b-4a65-b9d6-7e324c395d18", - "name": "panel_1", - "type": "visualization" - }, - { - "id": "dc1803f0-b478-11ed-9063-ebe46f9ac203", - "name": "panel_2", - "type": "visualization" - }, - { - "id": "99acc580-b47a-11ed-9063-ebe46f9ac203", - "name": "panel_3", - "type": "visualization" - }, - { - "id": "01ea64d0-b62f-11ed-a677-43d7aa86763b", - "name": "panel_4", - "type": "visualization" - } - ], - "type": "dashboard", - "updated_at": "2023-02-26T23:44:09.855Z", - "version": "WzczLDdd" -} -{ - "exportedCount": 9, - "missingRefCount": 0, - "missingReferences": [] -} \ No newline at end of file From c5b98f76e2a653e2bb7d8128399cff1e4a259a8d Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Mon, 15 May 2023 14:16:52 -0700 Subject: [PATCH 035/190] Fix broken type checking for placeholder Signed-off-by: Simeon Widdis --- package.json | 1 + .../__tests__/placeholder_router.test.ts | 15 +++++++++------ .../routes/placeholder/placeholder_router.ts | 8 +++----- yarn.lock | 19 ++++++++++++++++++- 4 files changed, 31 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 242fb5405c..3ac3c75aa3 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ "devDependencies": { "@cypress/skip-test": "^2.6.1", "@types/enzyme-adapter-react-16": "^1.0.6", + "@types/node-fetch": "^2.6.3", "@types/react-plotly.js": "^2.5.0", "@types/react-test-renderer": "^16.9.1", "antlr4ts-cli": "^0.5.0-alpha.4", diff --git a/server/routes/placeholder/__tests__/placeholder_router.test.ts b/server/routes/placeholder/__tests__/placeholder_router.test.ts index 07f7156397..fa72324675 100644 --- a/server/routes/placeholder/__tests__/placeholder_router.test.ts +++ b/server/routes/placeholder/__tests__/placeholder_router.test.ts @@ -1,3 +1,4 @@ +import { DeepPartial } from 'redux'; import { OpenSearchDashboardsRequest, RequestHandlerContext, @@ -10,19 +11,21 @@ jest .mock('../../../../../../src/core/server/http/router', () => jest.fn()); describe('Data wrapper', () => { - const contextMock: Partial = { - observability_plugin: { - observabilityClient: { - asScoped: jest.fn(), + const contextMock: DeepPartial = { + core: { + opensearch: { + legacy: { + client: {}, + }, }, }, }; - const requestMock: Partial = { + const requestMock: DeepPartial = { url: { pathname: '/test', }, }; - const responseMock: Partial = { + const responseMock: DeepPartial = { custom: jest.fn((data) => data), ok: jest.fn((data) => data), }; diff --git a/server/routes/placeholder/placeholder_router.ts b/server/routes/placeholder/placeholder_router.ts index f52bcbb62f..576a55ef00 100644 --- a/server/routes/placeholder/placeholder_router.ts +++ b/server/routes/placeholder/placeholder_router.ts @@ -45,9 +45,7 @@ export const wrappedData = async ( response: OpenSearchDashboardsResponseFactory, callback: any ): Promise => { - const opensearchClient: ILegacyScopedClusterClient = context.observability_plugin.observabilityClient.asScoped( - request - ); + const opensearchClient = context.core.opensearch.legacy.client; try { const data = await callback(opensearchClient); console.log(`${request.url.pathname}: callback returned ${data.toString().length} bytes`); @@ -99,7 +97,7 @@ export function registerPlaceholderRoute(router: IRouter) { }, async (context, request, response): Promise => { return wrappedData(context, request, response, async (_client: any) => { - return await fetch('http://127.0.0.1:4010/repository/id', {}).json(); + return (await fetch('http://127.0.0.1:4010/repository/id', {})).json(); }); } ); @@ -111,7 +109,7 @@ export function registerPlaceholderRoute(router: IRouter) { }, async (context, request, response): Promise => { return wrappedData(context, request, response, async (_client: any) => { - return await fetch('http://127.0.0.1:4010/store?limit=24', {}).json(); + return (await fetch('http://127.0.0.1:4010/store?limit=24', {})).json(); }); } ); diff --git a/yarn.lock b/yarn.lock index 3963074944..3a37519b02 100644 --- a/yarn.lock +++ b/yarn.lock @@ -293,6 +293,14 @@ dependencies: "@types/istanbul-lib-report" "*" +"@types/node-fetch@^2.6.3": + version "2.6.3" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.3.tgz#175d977f5e24d93ad0f57602693c435c57ad7e80" + integrity sha512-ETTL1mOEdq/sxUtgtOhKjyB2Irra4cjxksvcMUR5Zr4n+PxVhsCD9WS46oPbHL3et9Zde7CNRr+WUNlcHvsX+w== + dependencies: + "@types/node" "*" + form-data "^3.0.0" + "@types/node@*": version "16.7.2" resolved "https://registry.yarnpkg.com/@types/node/-/node-16.7.2.tgz#0465a39b5456b61a04d98bd5545f8b34be340cb7" @@ -850,7 +858,7 @@ colors@^1.1.2: resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== -combined-stream@^1.0.6, combined-stream@~1.0.6: +combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== @@ -1417,6 +1425,15 @@ forever-agent@~0.6.1: resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= +form-data@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" + integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + form-data@~2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" From 478c1c3d0979d6c5eb4ff85475467969f4ce09cb Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Mon, 15 May 2023 16:10:38 -0700 Subject: [PATCH 036/190] Add documentation for placeholder's helper methods Signed-off-by: Simeon Widdis --- .../placeholder/__tests__/ndjson.test.ts | 8 ++--- .../routes/placeholder/placeholder_router.ts | 34 +++++++++++++++++-- 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/server/routes/placeholder/__tests__/ndjson.test.ts b/server/routes/placeholder/__tests__/ndjson.test.ts index d5fd0233fb..970d97cd6d 100644 --- a/server/routes/placeholder/__tests__/ndjson.test.ts +++ b/server/routes/placeholder/__tests__/ndjson.test.ts @@ -1,21 +1,21 @@ -import { readNDJson } from '../placeholder_router'; +import { readNDJsonObjects } from '../placeholder_router'; import { Readable } from 'stream'; import { createReadStream } from 'fs'; describe('ReadNDJsonStream', () => { it('should successfully parse simple ndjson', async () => { const stream = Readable.from(['{"key":1}\n{"key":2}\n{"key":3}']); - const array = await readNDJson(stream); + const array = await readNDJsonObjects(stream); expect(array).toEqual([{ key: 1 }, { key: 2 }, { key: 3 }]); }); it('should succeed if chunks split objects', async () => { const stream = Readable.from(['{"key":1}\n{"ke', 'y":2}\n{"key":3}']); - const array = await readNDJson(stream); + const array = await readNDJsonObjects(stream); expect(array).toEqual([{ key: 1 }, { key: 2 }, { key: 3 }]); }); it('should succeed on test ndjson file', async () => { const file = createReadStream(__dirname + '/test.ndjson'); - const array = await readNDJson(file); + const array = await readNDJsonObjects(file); expect(array.length).toBeGreaterThan(0); }); }); diff --git a/server/routes/placeholder/placeholder_router.ts b/server/routes/placeholder/placeholder_router.ts index 576a55ef00..f125cd508c 100644 --- a/server/routes/placeholder/placeholder_router.ts +++ b/server/routes/placeholder/placeholder_router.ts @@ -15,10 +15,23 @@ import { import { INTEGRATIONS_BASE, OBSERVABILITY_BASE } from '../../../common/constants/shared'; import { PlaceholderAdaptor } from '../../../server/adaptors/placeholder/placeholder_adaptor'; import { OpenSearchDashboardsResponseFactory } from '../../../../../src/core/server/http/router'; +import { SavedObjectsBulkCreateObject } from '../../../../../src/core/public'; -export const readNDJson = async (stream: Readable): Promise => { +/** + * Parse a stream of newline-delimited JSON objects as an array. + * The entire stream is read; the method will hang if the stream is not closed. + * The data entries MUST be JSON objects, + * other valid JSON values will be rejected. + * + * Resolves the `Promise` if every newline-separated JSON object is valid. + * Rejects the `Promise` if the stream errors, or if the JSON is not parseable. + * + * @param stream A `Readable` stream of newline-delimited JSON objects. + * @returns A `Promise` for an array of parsed JSON objects. + */ +export const readNDJsonObjects = async (stream: Readable): Promise => { return new Promise((resolve, reject) => { - let assets: any[] = []; + let assets: object[] = []; let json: string = ''; stream.on('data', (chunk: string | Buffer) => { json += chunk.toString(); @@ -39,6 +52,21 @@ export const readNDJson = async (stream: Readable): Promise => { let added = false; +/** + * Handle an `OpenSearchDashboardsRequest` using the provided `callback` function. + * This is a convenience method that handles common error handling and response formatting. + * The callback must accept an `ILegacyScopedClusterClient` as its first argument. + * + * If the callback throws an error, + * the `OpenSearchDashboardsResponse` will be formatted using the error's `statusCode` and `message` properties. + * Otherwise, the callback's return value will be formatted in a JSON object under the `data` field. + * + * @param context The `RequestHandlerContext` for the current request. + * @param request The request to be handled. + * @param response An `OpenSearchDashboardsResponseFactory` for creating responses. + * @param callback A callback that will be invoked on an `ILegacyScopedClusterClient`. + * @returns An `OpenSearchDashboardsResponse` with the return data from the callback. + */ export const wrappedData = async ( context: RequestHandlerContext, request: OpenSearchDashboardsRequest, @@ -84,7 +112,7 @@ export function registerPlaceholderRoute(router: IRouter) { async (context, request, response): Promise => { return wrappedData(context, request, response, async (client: any) => { const stream = fs.createReadStream(__dirname + '/__tests__/test.ndjson'); - const assets = await readNDJson(stream); + const assets = (await readNDJsonObjects(stream)) as SavedObjectsBulkCreateObject[]; added = true; return context.core.savedObjects.client.bulkCreate(assets); }); From b7eeee91650313c8194ca3510fc2e07845abc61c Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Mon, 15 May 2023 16:13:59 -0700 Subject: [PATCH 037/190] Rename handleWithCallback Signed-off-by: Simeon Widdis --- .../__tests__/placeholder_router.test.ts | 6 +++--- server/routes/placeholder/placeholder_router.ts | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/server/routes/placeholder/__tests__/placeholder_router.test.ts b/server/routes/placeholder/__tests__/placeholder_router.test.ts index fa72324675..9d9a6b46e2 100644 --- a/server/routes/placeholder/__tests__/placeholder_router.test.ts +++ b/server/routes/placeholder/__tests__/placeholder_router.test.ts @@ -4,7 +4,7 @@ import { RequestHandlerContext, } from '../../../../../../src/core/server'; import { OpenSearchDashboardsResponseFactory } from '../../../../../../src/core/server/http/router'; -import { wrappedData } from '../placeholder_router'; +import { handleWithCallback } from '../placeholder_router'; jest .mock('../../../../../../src/core/server', () => jest.fn()) @@ -34,7 +34,7 @@ describe('Data wrapper', () => { const callback = jest.fn((_) => { return { test: 'data' }; }); - const result = await wrappedData( + const result = await handleWithCallback( contextMock as RequestHandlerContext, requestMock as OpenSearchDashboardsRequest, responseMock as OpenSearchDashboardsResponseFactory, @@ -50,7 +50,7 @@ describe('Data wrapper', () => { const callback = jest.fn((_) => { throw new Error('test error'); }); - const result = await wrappedData( + const result = await handleWithCallback( contextMock as RequestHandlerContext, requestMock as OpenSearchDashboardsRequest, responseMock as OpenSearchDashboardsResponseFactory, diff --git a/server/routes/placeholder/placeholder_router.ts b/server/routes/placeholder/placeholder_router.ts index f125cd508c..89010d0954 100644 --- a/server/routes/placeholder/placeholder_router.ts +++ b/server/routes/placeholder/placeholder_router.ts @@ -67,7 +67,7 @@ let added = false; * @param callback A callback that will be invoked on an `ILegacyScopedClusterClient`. * @returns An `OpenSearchDashboardsResponse` with the return data from the callback. */ -export const wrappedData = async ( +export const handleWithCallback = async ( context: RequestHandlerContext, request: OpenSearchDashboardsRequest, response: OpenSearchDashboardsResponseFactory, @@ -100,7 +100,7 @@ export function registerPlaceholderRoute(router: IRouter) { validate: false, }, async (context, request, response): Promise => { - return wrappedData(context, request, response, integrationsAdaptor.fetchApps); + return handleWithCallback(context, request, response, integrationsAdaptor.fetchApps); } ); @@ -110,7 +110,7 @@ export function registerPlaceholderRoute(router: IRouter) { validate: false, }, async (context, request, response): Promise => { - return wrappedData(context, request, response, async (client: any) => { + return handleWithCallback(context, request, response, async (client: any) => { const stream = fs.createReadStream(__dirname + '/__tests__/test.ndjson'); const assets = (await readNDJsonObjects(stream)) as SavedObjectsBulkCreateObject[]; added = true; @@ -124,7 +124,7 @@ export function registerPlaceholderRoute(router: IRouter) { validate: false, }, async (context, request, response): Promise => { - return wrappedData(context, request, response, async (_client: any) => { + return handleWithCallback(context, request, response, async (_client: any) => { return (await fetch('http://127.0.0.1:4010/repository/id', {})).json(); }); } @@ -136,7 +136,7 @@ export function registerPlaceholderRoute(router: IRouter) { validate: false, }, async (context, request, response): Promise => { - return wrappedData(context, request, response, async (_client: any) => { + return handleWithCallback(context, request, response, async (_client: any) => { return (await fetch('http://127.0.0.1:4010/store?limit=24', {})).json(); }); } @@ -148,7 +148,7 @@ export function registerPlaceholderRoute(router: IRouter) { validate: false, }, async (context, request, response): Promise => { - return wrappedData(context, request, response, integrationsAdaptor.fetchApps); + return handleWithCallback(context, request, response, integrationsAdaptor.fetchApps); } ); @@ -158,7 +158,7 @@ export function registerPlaceholderRoute(router: IRouter) { validate: false, }, async (context, request, response): Promise => { - return wrappedData(context, request, response, async (client: any) => + return handleWithCallback(context, request, response, async (client: any) => integrationsAdaptor.fetchAdded(client, added) ); } From 1c174dc04d005ee42213a9ee78f54adcbd87783e Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Mon, 15 May 2023 17:04:25 -0700 Subject: [PATCH 038/190] Add more strict typing Signed-off-by: Simeon Widdis --- .../placeholder/placeholder_adaptor.ts | 8 ------ .../routes/placeholder/placeholder_router.ts | 25 +++++++++++-------- 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/server/adaptors/placeholder/placeholder_adaptor.ts b/server/adaptors/placeholder/placeholder_adaptor.ts index 67ec9f7390..b39cdb26b7 100644 --- a/server/adaptors/placeholder/placeholder_adaptor.ts +++ b/server/adaptors/placeholder/placeholder_adaptor.ts @@ -3,10 +3,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - ApplicationRequestType, - ApplicationType, -} from '../../../common/types/application_analytics'; import { ILegacyScopedClusterClient } from '../../../../../src/core/server'; export class PlaceholderAdaptor { @@ -30,11 +26,7 @@ export class PlaceholderAdaptor { const endpoint = added ? 'integrations.getAddedPop' : 'integrations.getAdded'; const response = await client.callAsCurrentUser(endpoint, {}); console.log(response); - // return response.observabilityObjectList.map((object: any) => { return response.test; - // return { - // }; - // }); } catch (err: any) { throw new Error('Fetch Added Applications Error: ' + err); } diff --git a/server/routes/placeholder/placeholder_router.ts b/server/routes/placeholder/placeholder_router.ts index 89010d0954..529e9a25b6 100644 --- a/server/routes/placeholder/placeholder_router.ts +++ b/server/routes/placeholder/placeholder_router.ts @@ -14,7 +14,10 @@ import { } from '../../../../../src/core/server'; import { INTEGRATIONS_BASE, OBSERVABILITY_BASE } from '../../../common/constants/shared'; import { PlaceholderAdaptor } from '../../../server/adaptors/placeholder/placeholder_adaptor'; -import { OpenSearchDashboardsResponseFactory } from '../../../../../src/core/server/http/router'; +import { + OpenSearchDashboardsResponse, + OpenSearchDashboardsResponseFactory, +} from '../../../../../src/core/server/http/router'; import { SavedObjectsBulkCreateObject } from '../../../../../src/core/public'; /** @@ -26,11 +29,11 @@ import { SavedObjectsBulkCreateObject } from '../../../../../src/core/public'; * Resolves the `Promise` if every newline-separated JSON object is valid. * Rejects the `Promise` if the stream errors, or if the JSON is not parseable. * - * @param stream A `Readable` stream of newline-delimited JSON objects. - * @returns A `Promise` for an array of parsed JSON objects. + * @param {Readable} stream A stream of newline-delimited JSON objects. + * @returns {Promise} A `Promise` for an array of parsed JSON objects. */ export const readNDJsonObjects = async (stream: Readable): Promise => { - return new Promise((resolve, reject) => { + return new Promise((resolve, reject) => { let assets: object[] = []; let json: string = ''; stream.on('data', (chunk: string | Buffer) => { @@ -61,18 +64,18 @@ let added = false; * the `OpenSearchDashboardsResponse` will be formatted using the error's `statusCode` and `message` properties. * Otherwise, the callback's return value will be formatted in a JSON object under the `data` field. * - * @param context The `RequestHandlerContext` for the current request. - * @param request The request to be handled. - * @param response An `OpenSearchDashboardsResponseFactory` for creating responses. - * @param callback A callback that will be invoked on an `ILegacyScopedClusterClient`. - * @returns An `OpenSearchDashboardsResponse` with the return data from the callback. + * @param {RequestHandlerContext} context The context for the current request. + * @param {OpenSearchDashboardsRequest} request The request to be handled. + * @param {OpenSearchDashboardsResponseFactory} response The factory to use for creating responses. + * @callback callback A callback that will invoke a request on a provided client. + * @returns {Promise} An `OpenSearchDashboardsResponse` with the return data from the callback. */ export const handleWithCallback = async ( context: RequestHandlerContext, request: OpenSearchDashboardsRequest, response: OpenSearchDashboardsResponseFactory, - callback: any -): Promise => { + callback: (client: ILegacyScopedClusterClient) => object +): Promise => { const opensearchClient = context.core.opensearch.legacy.client; try { const data = await callback(opensearchClient); From 98adfdd78bda4745409445f9d62ea080600b39c6 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Tue, 16 May 2023 14:26:02 -0700 Subject: [PATCH 039/190] Revert faulty client change Signed-off-by: Simeon Widdis --- server/routes/placeholder/placeholder_router.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/routes/placeholder/placeholder_router.ts b/server/routes/placeholder/placeholder_router.ts index 576a55ef00..88e842d46b 100644 --- a/server/routes/placeholder/placeholder_router.ts +++ b/server/routes/placeholder/placeholder_router.ts @@ -45,7 +45,10 @@ export const wrappedData = async ( response: OpenSearchDashboardsResponseFactory, callback: any ): Promise => { - const opensearchClient = context.core.opensearch.legacy.client; + // context.observability_plugin.observabilityClient is not in the RequestHandlerContext, + // but it's the correct client. + // Not sure why context.core.opensearch.legacy.client doesn't work, but it changes the loaded routes. + const opensearchClient = context.observability_plugin.observabilityClient.asScoped(request); try { const data = await callback(opensearchClient); console.log(`${request.url.pathname}: callback returned ${data.toString().length} bytes`); From 7fda8aafa7aee3a3a63128b37762f0e27f4aeae5 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Tue, 16 May 2023 14:32:51 -0700 Subject: [PATCH 040/190] Update typing for adaptor methods Signed-off-by: Simeon Widdis --- .../opensearch_observability_plugin.ts | 2 +- .../placeholder/placeholder_adaptor.ts | 25 ++++++++++++------- server/adaptors/placeholder/types.ts | 19 ++++++++++++++ .../routes/placeholder/placeholder_router.ts | 17 +++++++++---- 4 files changed, 48 insertions(+), 15 deletions(-) create mode 100644 server/adaptors/placeholder/types.ts diff --git a/server/adaptors/opensearch_observability_plugin.ts b/server/adaptors/opensearch_observability_plugin.ts index f1ec0dfe23..7fab43ca1c 100644 --- a/server/adaptors/opensearch_observability_plugin.ts +++ b/server/adaptors/opensearch_observability_plugin.ts @@ -14,7 +14,7 @@ export function OpenSearchObservabilityPlugin(Client: any, config: any, componen const integrations = Client.prototype.integrations.prototype; // Get Object - integrations.getObject = clientAction({ + integrations.getIntegrationTemplates = clientAction({ url: { fmt: OPENSEARCH_INTEGRATIONS_API.ALL, }, diff --git a/server/adaptors/placeholder/placeholder_adaptor.ts b/server/adaptors/placeholder/placeholder_adaptor.ts index b39cdb26b7..1b67ca33fc 100644 --- a/server/adaptors/placeholder/placeholder_adaptor.ts +++ b/server/adaptors/placeholder/placeholder_adaptor.ts @@ -7,25 +7,32 @@ import { ILegacyScopedClusterClient } from '../../../../../src/core/server'; export class PlaceholderAdaptor { // Fetch all existing integrations - fetchApps = async (client: ILegacyScopedClusterClient): Promise => { + getIntegrationTemplates = async ( + client: ILegacyScopedClusterClient, + query: IntegrationTemplateQuery | null + ): Promise => { try { - console.log('poopy'); - const response = await client.callAsCurrentUser('integrations.getObject'); - console.log(response); + console.log('getIntegrationTemplates query: ' + query); + const response = await client.callAsCurrentUser('integrations.getIntegrationTemplates'); + console.log('getIntegrationTemplates response: ' + response); return response; } catch (err: any) { throw new Error('Fetch All Applications Error: ' + err); } }; - fetchAdded = async ( + getIntegrationInstances = async ( client: ILegacyScopedClusterClient, - added: boolean = false - ): Promise => { + query: IntegrationInstanceQuery | null + ): Promise => { try { - const endpoint = added ? 'integrations.getAddedPop' : 'integrations.getAdded'; + let endpoint: string = 'integrations.getAdded'; + if (query && query.added) { + endpoint = 'integrations.getAddedPop'; + } + console.log('getIntegrationInstances query: ' + query); const response = await client.callAsCurrentUser(endpoint, {}); - console.log(response); + console.log('getIntegrationInstances response: ' + response); return response.test; } catch (err: any) { throw new Error('Fetch Added Applications Error: ' + err); diff --git a/server/adaptors/placeholder/types.ts b/server/adaptors/placeholder/types.ts new file mode 100644 index 0000000000..194c369cd8 --- /dev/null +++ b/server/adaptors/placeholder/types.ts @@ -0,0 +1,19 @@ +interface IntegrationTemplate { + name: string; + description: string; + url: string; +} + +interface IntegrationTemplateQuery { + name: string | null; +} + +interface IntegrationInstance { + name: string; + description: string; + url: string; +} + +interface IntegrationInstanceQuery { + added: boolean | null; +} diff --git a/server/routes/placeholder/placeholder_router.ts b/server/routes/placeholder/placeholder_router.ts index 6815434827..d43a14d0fd 100644 --- a/server/routes/placeholder/placeholder_router.ts +++ b/server/routes/placeholder/placeholder_router.ts @@ -106,7 +106,9 @@ export function registerPlaceholderRoute(router: IRouter) { validate: false, }, async (context, request, response): Promise => { - return handleWithCallback(context, request, response, integrationsAdaptor.fetchApps); + return handleWithCallback(context, request, response, async (client: any) => { + return await integrationsAdaptor.getIntegrationTemplates(client, null); + }); } ); @@ -124,6 +126,7 @@ export function registerPlaceholderRoute(router: IRouter) { }); } ); + router.get( { path: `${OBSERVABILITY_BASE}/repository/id`, @@ -154,7 +157,9 @@ export function registerPlaceholderRoute(router: IRouter) { validate: false, }, async (context, request, response): Promise => { - return handleWithCallback(context, request, response, integrationsAdaptor.fetchApps); + return handleWithCallback(context, request, response, async (client: any) => { + return await integrationsAdaptor.getIntegrationTemplates(client, null); + }); } ); @@ -164,9 +169,11 @@ export function registerPlaceholderRoute(router: IRouter) { validate: false, }, async (context, request, response): Promise => { - return handleWithCallback(context, request, response, async (client: any) => - integrationsAdaptor.fetchAdded(client, added) - ); + return handleWithCallback(context, request, response, async (client: any) => { + return await integrationsAdaptor.getIntegrationInstances(client, { + added, + }); + }); } ); } From ea56bcec0bc126c57009e130bc043ac9c61cc6ea Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Tue, 16 May 2023 15:14:24 -0700 Subject: [PATCH 041/190] Move client creation code Signed-off-by: Simeon Widdis --- .../__tests__/placeholder_router.test.ts | 17 ++----- .../routes/placeholder/placeholder_router.ts | 50 ++++++++++++------- 2 files changed, 35 insertions(+), 32 deletions(-) diff --git a/server/routes/placeholder/__tests__/placeholder_router.test.ts b/server/routes/placeholder/__tests__/placeholder_router.test.ts index 9d9a6b46e2..f5a1a4595d 100644 --- a/server/routes/placeholder/__tests__/placeholder_router.test.ts +++ b/server/routes/placeholder/__tests__/placeholder_router.test.ts @@ -1,5 +1,6 @@ import { DeepPartial } from 'redux'; import { + ILegacyScopedClusterClient, OpenSearchDashboardsRequest, RequestHandlerContext, } from '../../../../../../src/core/server'; @@ -11,15 +12,7 @@ jest .mock('../../../../../../src/core/server/http/router', () => jest.fn()); describe('Data wrapper', () => { - const contextMock: DeepPartial = { - core: { - opensearch: { - legacy: { - client: {}, - }, - }, - }, - }; + const clientMock: Partial = {}; const requestMock: DeepPartial = { url: { pathname: '/test', @@ -35,8 +28,7 @@ describe('Data wrapper', () => { return { test: 'data' }; }); const result = await handleWithCallback( - contextMock as RequestHandlerContext, - requestMock as OpenSearchDashboardsRequest, + clientMock as ILegacyScopedClusterClient, responseMock as OpenSearchDashboardsResponseFactory, callback ); @@ -51,8 +43,7 @@ describe('Data wrapper', () => { throw new Error('test error'); }); const result = await handleWithCallback( - contextMock as RequestHandlerContext, - requestMock as OpenSearchDashboardsRequest, + clientMock as ILegacyScopedClusterClient, responseMock as OpenSearchDashboardsResponseFactory, callback ); diff --git a/server/routes/placeholder/placeholder_router.ts b/server/routes/placeholder/placeholder_router.ts index d43a14d0fd..21b8d4d09b 100644 --- a/server/routes/placeholder/placeholder_router.ts +++ b/server/routes/placeholder/placeholder_router.ts @@ -9,13 +9,12 @@ import { Readable } from 'stream'; import { ILegacyScopedClusterClient, IRouter, - OpenSearchDashboardsRequest, RequestHandlerContext, } from '../../../../../src/core/server'; import { INTEGRATIONS_BASE, OBSERVABILITY_BASE } from '../../../common/constants/shared'; import { PlaceholderAdaptor } from '../../../server/adaptors/placeholder/placeholder_adaptor'; import { - OpenSearchDashboardsResponse, + OpenSearchDashboardsRequest, OpenSearchDashboardsResponseFactory, } from '../../../../../src/core/server/http/router'; import { SavedObjectsBulkCreateObject } from '../../../../../src/core/public'; @@ -64,32 +63,26 @@ let added = false; * the `OpenSearchDashboardsResponse` will be formatted using the error's `statusCode` and `message` properties. * Otherwise, the callback's return value will be formatted in a JSON object under the `data` field. * - * @param {RequestHandlerContext} context The context for the current request. - * @param {OpenSearchDashboardsRequest} request The request to be handled. + * @param {ILegacyScopedClusterClient} client The client to use for making requests. * @param {OpenSearchDashboardsResponseFactory} response The factory to use for creating responses. * @callback callback A callback that will invoke a request on a provided client. * @returns {Promise} An `OpenSearchDashboardsResponse` with the return data from the callback. */ export const handleWithCallback = async ( - context: RequestHandlerContext, - request: OpenSearchDashboardsRequest, + client: ILegacyScopedClusterClient, response: OpenSearchDashboardsResponseFactory, callback: any ): Promise => { - // context.observability_plugin.observabilityClient is not in the RequestHandlerContext, - // but it's the correct client. - // Not sure why context.core.opensearch.legacy.client doesn't work, but it changes the loaded routes. - const opensearchClient = context.observability_plugin.observabilityClient.asScoped(request); try { - const data = await callback(opensearchClient); - console.log(`${request.url.pathname}: callback returned ${data.toString().length} bytes`); + const data = await callback(client); + console.log(`handleWithCallback: callback returned ${data.toString().length} bytes`); return response.ok({ body: { data, }, }); } catch (err: any) { - console.error(`${request.url.pathname}: callback failed with error "${err.message}"`); + console.error(`handleWithCallback: callback failed with error "${err.message}"`); return response.custom({ statusCode: err.statusCode || 500, body: err.message, @@ -97,6 +90,19 @@ export const handleWithCallback = async ( } }; +const makeClientFromContext = ( + context: RequestHandlerContext, + request: OpenSearchDashboardsRequest +): ILegacyScopedClusterClient => { + // context.observability_plugin.observabilityClient is not in the RequestHandlerContext type, but it's the correct client. + // Updating to the seemingly-correct context.core.opensearch.legacy.client is a breaking change. + // For now, we'll wrap access in manual type checking. + if (context.observability_plugin === null) { + throw new Error('context.observability_plugin is null'); + } + return context.observability_plugin.observabilityClient.asScoped(request); +}; + export function registerPlaceholderRoute(router: IRouter) { const integrationsAdaptor = new PlaceholderAdaptor(); @@ -106,7 +112,8 @@ export function registerPlaceholderRoute(router: IRouter) { validate: false, }, async (context, request, response): Promise => { - return handleWithCallback(context, request, response, async (client: any) => { + const scopedClient = makeClientFromContext(context, request); + return handleWithCallback(scopedClient, response, async (client: any) => { return await integrationsAdaptor.getIntegrationTemplates(client, null); }); } @@ -118,7 +125,8 @@ export function registerPlaceholderRoute(router: IRouter) { validate: false, }, async (context, request, response): Promise => { - return handleWithCallback(context, request, response, async (client: any) => { + const scopedClient = makeClientFromContext(context, request); + return handleWithCallback(scopedClient, response, async (client: any) => { const stream = fs.createReadStream(__dirname + '/__tests__/test.ndjson'); const assets = (await readNDJsonObjects(stream)) as SavedObjectsBulkCreateObject[]; added = true; @@ -133,7 +141,8 @@ export function registerPlaceholderRoute(router: IRouter) { validate: false, }, async (context, request, response): Promise => { - return handleWithCallback(context, request, response, async (_client: any) => { + const scopedClient = makeClientFromContext(context, request); + return handleWithCallback(scopedClient, response, async (_client: any) => { return (await fetch('http://127.0.0.1:4010/repository/id', {})).json(); }); } @@ -145,7 +154,8 @@ export function registerPlaceholderRoute(router: IRouter) { validate: false, }, async (context, request, response): Promise => { - return handleWithCallback(context, request, response, async (_client: any) => { + const scopedClient = makeClientFromContext(context, request); + return handleWithCallback(scopedClient, response, async (_client: any) => { return (await fetch('http://127.0.0.1:4010/store?limit=24', {})).json(); }); } @@ -157,7 +167,8 @@ export function registerPlaceholderRoute(router: IRouter) { validate: false, }, async (context, request, response): Promise => { - return handleWithCallback(context, request, response, async (client: any) => { + const scopedClient = makeClientFromContext(context, request); + return handleWithCallback(scopedClient, response, async (client: any) => { return await integrationsAdaptor.getIntegrationTemplates(client, null); }); } @@ -169,7 +180,8 @@ export function registerPlaceholderRoute(router: IRouter) { validate: false, }, async (context, request, response): Promise => { - return handleWithCallback(context, request, response, async (client: any) => { + const scopedClient = makeClientFromContext(context, request); + return handleWithCallback(scopedClient, response, async (client: any) => { return await integrationsAdaptor.getIntegrationInstances(client, { added, }); From 941337e110b89155c0be471d79e2f164ba43401d Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Wed, 17 May 2023 12:02:22 -0700 Subject: [PATCH 042/190] Extract java backend away from adaptor Signed-off-by: Simeon Widdis --- .../placeholder/placeholder_adaptor.ts | 37 ++------------ .../placeholder/placeholder_java_backend.ts | 40 +++++++++++++++ .../routes/placeholder/placeholder_router.ts | 50 +++++++++---------- 3 files changed, 70 insertions(+), 57 deletions(-) create mode 100644 server/adaptors/placeholder/placeholder_java_backend.ts diff --git a/server/adaptors/placeholder/placeholder_adaptor.ts b/server/adaptors/placeholder/placeholder_adaptor.ts index 1b67ca33fc..2d20d9f5f1 100644 --- a/server/adaptors/placeholder/placeholder_adaptor.ts +++ b/server/adaptors/placeholder/placeholder_adaptor.ts @@ -3,39 +3,12 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { ILegacyScopedClusterClient } from '../../../../../src/core/server'; - -export class PlaceholderAdaptor { - // Fetch all existing integrations - getIntegrationTemplates = async ( - client: ILegacyScopedClusterClient, +export interface PlaceholderAdaptor { + getIntegrationTemplates: ( query: IntegrationTemplateQuery | null - ): Promise => { - try { - console.log('getIntegrationTemplates query: ' + query); - const response = await client.callAsCurrentUser('integrations.getIntegrationTemplates'); - console.log('getIntegrationTemplates response: ' + response); - return response; - } catch (err: any) { - throw new Error('Fetch All Applications Error: ' + err); - } - }; + ) => Promise; - getIntegrationInstances = async ( - client: ILegacyScopedClusterClient, + getIntegrationInstances: ( query: IntegrationInstanceQuery | null - ): Promise => { - try { - let endpoint: string = 'integrations.getAdded'; - if (query && query.added) { - endpoint = 'integrations.getAddedPop'; - } - console.log('getIntegrationInstances query: ' + query); - const response = await client.callAsCurrentUser(endpoint, {}); - console.log('getIntegrationInstances response: ' + response); - return response.test; - } catch (err: any) { - throw new Error('Fetch Added Applications Error: ' + err); - } - }; + ) => Promise; } diff --git a/server/adaptors/placeholder/placeholder_java_backend.ts b/server/adaptors/placeholder/placeholder_java_backend.ts new file mode 100644 index 0000000000..d07226d51e --- /dev/null +++ b/server/adaptors/placeholder/placeholder_java_backend.ts @@ -0,0 +1,40 @@ +import { ILegacyScopedClusterClient } from '../../../../../src/core/server'; + +export class PlaceholderJavaBackend { + client: ILegacyScopedClusterClient; + + constructor(client: ILegacyScopedClusterClient) { + this.client = client; + } + + // Fetch all existing integrations + getIntegrationTemplates = async ( + query: IntegrationTemplateQuery | null + ): Promise => { + try { + console.log('getIntegrationTemplates query: ' + query); + const response = await this.client.callAsCurrentUser('integrations.getIntegrationTemplates'); + console.log('getIntegrationTemplates response: ' + response); + return response; + } catch (err: any) { + throw new Error('Fetch All Applications Error: ' + err); + } + }; + + getIntegrationInstances = async ( + query: IntegrationInstanceQuery | null + ): Promise => { + try { + let endpoint: string = 'integrations.getAdded'; + if (query && query.added) { + endpoint = 'integrations.getAddedPop'; + } + console.log('getIntegrationInstances query: ' + query); + const response = await this.client.callAsCurrentUser(endpoint, {}); + console.log('getIntegrationInstances response: ' + response); + return response.test; + } catch (err: any) { + throw new Error('Fetch Added Applications Error: ' + err); + } + }; +} diff --git a/server/routes/placeholder/placeholder_router.ts b/server/routes/placeholder/placeholder_router.ts index 21b8d4d09b..12d5b05e8c 100644 --- a/server/routes/placeholder/placeholder_router.ts +++ b/server/routes/placeholder/placeholder_router.ts @@ -18,6 +18,7 @@ import { OpenSearchDashboardsResponseFactory, } from '../../../../../src/core/server/http/router'; import { SavedObjectsBulkCreateObject } from '../../../../../src/core/public'; +import { PlaceholderJavaBackend } from '../../adaptors/placeholder/placeholder_java_backend'; /** * Parse a stream of newline-delimited JSON objects as an array. @@ -63,18 +64,18 @@ let added = false; * the `OpenSearchDashboardsResponse` will be formatted using the error's `statusCode` and `message` properties. * Otherwise, the callback's return value will be formatted in a JSON object under the `data` field. * - * @param {ILegacyScopedClusterClient} client The client to use for making requests. + * @param {PlaceholderAdaptor} adaptor The adaptor instance to use for making requests. * @param {OpenSearchDashboardsResponseFactory} response The factory to use for creating responses. - * @callback callback A callback that will invoke a request on a provided client. + * @callback callback A callback that will invoke a request on a provided adaptor. * @returns {Promise} An `OpenSearchDashboardsResponse` with the return data from the callback. */ export const handleWithCallback = async ( - client: ILegacyScopedClusterClient, + adaptor: PlaceholderAdaptor, response: OpenSearchDashboardsResponseFactory, - callback: any + callback: (a: PlaceholderAdaptor) => object ): Promise => { try { - const data = await callback(client); + const data = await callback(adaptor); console.log(`handleWithCallback: callback returned ${data.toString().length} bytes`); return response.ok({ body: { @@ -90,31 +91,30 @@ export const handleWithCallback = async ( } }; -const makeClientFromContext = ( +const getAdaptor = ( context: RequestHandlerContext, request: OpenSearchDashboardsRequest -): ILegacyScopedClusterClient => { +): PlaceholderAdaptor => { // context.observability_plugin.observabilityClient is not in the RequestHandlerContext type, but it's the correct client. // Updating to the seemingly-correct context.core.opensearch.legacy.client is a breaking change. // For now, we'll wrap access in manual type checking. if (context.observability_plugin === null) { throw new Error('context.observability_plugin is null'); } - return context.observability_plugin.observabilityClient.asScoped(request); + const client = context.observability_plugin.observabilityClient.asScoped(request); + return new PlaceholderJavaBackend(client); }; export function registerPlaceholderRoute(router: IRouter) { - const integrationsAdaptor = new PlaceholderAdaptor(); - router.get( { path: `${INTEGRATIONS_BASE}/repository`, validate: false, }, async (context, request, response): Promise => { - const scopedClient = makeClientFromContext(context, request); - return handleWithCallback(scopedClient, response, async (client: any) => { - return await integrationsAdaptor.getIntegrationTemplates(client, null); + const adaptor = getAdaptor(context, request); + return handleWithCallback(adaptor, response, async (a: PlaceholderAdaptor) => { + return await a.getIntegrationTemplates(null); }); } ); @@ -125,8 +125,8 @@ export function registerPlaceholderRoute(router: IRouter) { validate: false, }, async (context, request, response): Promise => { - const scopedClient = makeClientFromContext(context, request); - return handleWithCallback(scopedClient, response, async (client: any) => { + const adaptor = getAdaptor(context, request); + return handleWithCallback(adaptor, response, async (_a: PlaceholderAdaptor) => { const stream = fs.createReadStream(__dirname + '/__tests__/test.ndjson'); const assets = (await readNDJsonObjects(stream)) as SavedObjectsBulkCreateObject[]; added = true; @@ -141,8 +141,8 @@ export function registerPlaceholderRoute(router: IRouter) { validate: false, }, async (context, request, response): Promise => { - const scopedClient = makeClientFromContext(context, request); - return handleWithCallback(scopedClient, response, async (_client: any) => { + const adaptor = getAdaptor(context, request); + return handleWithCallback(adaptor, response, async (_a: PlaceholderAdaptor) => { return (await fetch('http://127.0.0.1:4010/repository/id', {})).json(); }); } @@ -154,8 +154,8 @@ export function registerPlaceholderRoute(router: IRouter) { validate: false, }, async (context, request, response): Promise => { - const scopedClient = makeClientFromContext(context, request); - return handleWithCallback(scopedClient, response, async (_client: any) => { + const adaptor = getAdaptor(context, request); + return handleWithCallback(adaptor, response, async (_a: PlaceholderAdaptor) => { return (await fetch('http://127.0.0.1:4010/store?limit=24', {})).json(); }); } @@ -167,9 +167,9 @@ export function registerPlaceholderRoute(router: IRouter) { validate: false, }, async (context, request, response): Promise => { - const scopedClient = makeClientFromContext(context, request); - return handleWithCallback(scopedClient, response, async (client: any) => { - return await integrationsAdaptor.getIntegrationTemplates(client, null); + const adaptor = getAdaptor(context, request); + return handleWithCallback(adaptor, response, async (a: PlaceholderAdaptor) => { + return await a.getIntegrationTemplates(null); }); } ); @@ -180,9 +180,9 @@ export function registerPlaceholderRoute(router: IRouter) { validate: false, }, async (context, request, response): Promise => { - const scopedClient = makeClientFromContext(context, request); - return handleWithCallback(scopedClient, response, async (client: any) => { - return await integrationsAdaptor.getIntegrationInstances(client, { + const adaptor = getAdaptor(context, request); + return handleWithCallback(adaptor, response, async (a: PlaceholderAdaptor) => { + return await a.getIntegrationInstances({ added, }); }); From cb8374d80a00187a73d7ade95ee0a812fd057f55 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Wed, 17 May 2023 12:59:38 -0700 Subject: [PATCH 043/190] Update docs Signed-off-by: Simeon Widdis --- server/routes/placeholder/placeholder_router.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/routes/placeholder/placeholder_router.ts b/server/routes/placeholder/placeholder_router.ts index 12d5b05e8c..5fabee5246 100644 --- a/server/routes/placeholder/placeholder_router.ts +++ b/server/routes/placeholder/placeholder_router.ts @@ -58,7 +58,7 @@ let added = false; /** * Handle an `OpenSearchDashboardsRequest` using the provided `callback` function. * This is a convenience method that handles common error handling and response formatting. - * The callback must accept an `ILegacyScopedClusterClient` as its first argument. + * The callback must accept a `PlaceholderAdaptor` as its first argument. * * If the callback throws an error, * the `OpenSearchDashboardsResponse` will be formatted using the error's `statusCode` and `message` properties. From b5d9a42f9c0114c1272a3239b6aa22df4dc971cd Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Wed, 17 May 2023 15:05:03 -0700 Subject: [PATCH 044/190] Stub kibana backend Signed-off-by: Simeon Widdis --- .../added_integration_overview_page.tsx | 8 ++- .../placeholder/placeholder_adaptor.ts | 8 +-- .../placeholder/placeholder_java_backend.ts | 21 +++--- .../placeholder/placeholder_kibana_backend.ts | 64 +++++++++++++++++++ server/adaptors/placeholder/types.ts | 32 ++++++++-- .../routes/placeholder/placeholder_router.ts | 21 ++---- 6 files changed, 119 insertions(+), 35 deletions(-) create mode 100644 server/adaptors/placeholder/placeholder_kibana_backend.ts diff --git a/public/components/placeholder/components/added_integration_overview_page.tsx b/public/components/placeholder/components/added_integration_overview_page.tsx index 23822f0002..7eb7c8fafb 100644 --- a/public/components/placeholder/components/added_integration_overview_page.tsx +++ b/public/components/placeholder/components/added_integration_overview_page.tsx @@ -52,13 +52,17 @@ export function AddedIntegrationOverviewPage(props: AppTableProps) { { text: 'Added Integrations', href: '#/placeholder/added', - } + }, ]); handleDataRequest(); }, []); async function handleDataRequest() { - http.get(`${INTEGRATIONS_BASE}/store/list_added`).then((exists) => setData(exists)); + http.get(`${INTEGRATIONS_BASE}/store/list_added`).then((exists) => + setData({ + data: exists.data.integrations, + }) + ); } return ( diff --git a/server/adaptors/placeholder/placeholder_adaptor.ts b/server/adaptors/placeholder/placeholder_adaptor.ts index 2d20d9f5f1..c3077489d5 100644 --- a/server/adaptors/placeholder/placeholder_adaptor.ts +++ b/server/adaptors/placeholder/placeholder_adaptor.ts @@ -5,10 +5,10 @@ export interface PlaceholderAdaptor { getIntegrationTemplates: ( - query: IntegrationTemplateQuery | null - ) => Promise; + query?: IntegrationTemplateQuery + ) => Promise; getIntegrationInstances: ( - query: IntegrationInstanceQuery | null - ) => Promise; + query?: IntegrationInstanceQuery + ) => Promise; } diff --git a/server/adaptors/placeholder/placeholder_java_backend.ts b/server/adaptors/placeholder/placeholder_java_backend.ts index d07226d51e..eda3bc43ac 100644 --- a/server/adaptors/placeholder/placeholder_java_backend.ts +++ b/server/adaptors/placeholder/placeholder_java_backend.ts @@ -1,6 +1,7 @@ import { ILegacyScopedClusterClient } from '../../../../../src/core/server'; +import { PlaceholderAdaptor } from './placeholder_adaptor'; -export class PlaceholderJavaBackend { +export class PlaceholderJavaBackend implements PlaceholderAdaptor { client: ILegacyScopedClusterClient; constructor(client: ILegacyScopedClusterClient) { @@ -9,12 +10,13 @@ export class PlaceholderJavaBackend { // Fetch all existing integrations getIntegrationTemplates = async ( - query: IntegrationTemplateQuery | null - ): Promise => { + query?: IntegrationTemplateQuery + ): Promise => { try { - console.log('getIntegrationTemplates query: ' + query); + console.log(`getIntegrationTemplates query: ${query}`); const response = await this.client.callAsCurrentUser('integrations.getIntegrationTemplates'); - console.log('getIntegrationTemplates response: ' + response); + console.log(`getIntegrationTemplates response: ${response}`); + console.log(response); return response; } catch (err: any) { throw new Error('Fetch All Applications Error: ' + err); @@ -22,16 +24,17 @@ export class PlaceholderJavaBackend { }; getIntegrationInstances = async ( - query: IntegrationInstanceQuery | null - ): Promise => { + query?: IntegrationInstanceQuery + ): Promise => { try { let endpoint: string = 'integrations.getAdded'; - if (query && query.added) { + if (query?.added) { endpoint = 'integrations.getAddedPop'; } console.log('getIntegrationInstances query: ' + query); const response = await this.client.callAsCurrentUser(endpoint, {}); - console.log('getIntegrationInstances response: ' + response); + console.log('getIntegrationInstances response:'); + console.log(response); return response.test; } catch (err: any) { throw new Error('Fetch Added Applications Error: ' + err); diff --git a/server/adaptors/placeholder/placeholder_kibana_backend.ts b/server/adaptors/placeholder/placeholder_kibana_backend.ts new file mode 100644 index 0000000000..424e1370cd --- /dev/null +++ b/server/adaptors/placeholder/placeholder_kibana_backend.ts @@ -0,0 +1,64 @@ +import { coreRefs } from '../../../public/framework/core_refs'; +import { PlaceholderAdaptor } from './placeholder_adaptor'; +import { SavedObjectsClientContract } from '../../../../../src/core/public'; + +const sampleTemplates: IntegrationTemplate[] = [ + { + templateName: 'nginx', + version: '1.0.0', + description: 'Nginx HTTP server collector', + catalog: 'observability', + assetUrl: ' https://cdn.iconscout.com/icon/free/png-256/nginx-3521604-2945048.png', + }, +]; + +const sampleIntegrations: IntegrationInstance[] = [ + { + templateName: 'nginx', + type: 'dashboard', + dataset: 'prod', + namespace: 'us_east', + id: 'nginx-prod-us_east', + version: '0.1.0', + description: 'Nginx HTTP server collector for east cost prod systems', + template: + 'https://github.com/opensearch-project/observability/blob/2.x/integrations/nginx/config.json', + creationDate: '2016-08-29T09:12:33.001Z', + author: 'Ani', + status: 'LOADED', + dashboardUrl: + "http://localhost:5601/nol/app/dashboards#/view/96847220-5261-44d0-89b4-65f3a659f13a?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(description:'Nginx%20dashboard%20with%20basic%20Observability%20on%20access%20%2F%20error%20logs',filters:!(),fullScreenMode:!f,options:(hidePanelTitles:!f,useMargins:!t),query:(language:kuery,query:''),timeRestore:!f,title:'%5BNGINX%20Core%20Logs%201.0%5D%20Overview',viewMode:view)", + assets: {}, + }, +]; + +export class PlaceholderKibanaBackend implements PlaceholderAdaptor { + client: SavedObjectsClientContract; + + constructor() { + this.client = coreRefs.savedObjectsClient!; + } + + getIntegrationTemplates = ( + _query?: IntegrationTemplateQuery + ): Promise => { + console.log(sampleTemplates); + return Promise.resolve({ + integrations: sampleTemplates, + }); + }; + + getIntegrationInstances = ( + query?: IntegrationInstanceQuery + ): Promise => { + console.log(sampleIntegrations); + if (query?.added) { + return Promise.resolve({ + integrations: sampleIntegrations, + }); + } + return Promise.resolve({ + integrations: [], + }); + }; +} diff --git a/server/adaptors/placeholder/types.ts b/server/adaptors/placeholder/types.ts index 194c369cd8..a43271484e 100644 --- a/server/adaptors/placeholder/types.ts +++ b/server/adaptors/placeholder/types.ts @@ -1,19 +1,39 @@ interface IntegrationTemplate { - name: string; + templateName: string; + version: string; description: string; - url: string; + catalog: string; + assetUrl: string; +} + +interface IntegrationTemplateSearchResult { + integrations: IntegrationTemplate[]; } interface IntegrationTemplateQuery { - name: string | null; + name?: string; // Temporary value to satisfy linter, don't use } interface IntegrationInstance { - name: string; + templateName: string; + type: string; + dataset: string; + namespace: string; + id: string; + version: string; description: string; - url: string; + template: string; + creationDate: string; + author: string; + status: string; + dashboardUrl: string; + assets: object; +} + +interface IntegrationInstanceSearchResult { + integrations: IntegrationInstance[]; } interface IntegrationInstanceQuery { - added: boolean | null; + added?: boolean; } diff --git a/server/routes/placeholder/placeholder_router.ts b/server/routes/placeholder/placeholder_router.ts index 5fabee5246..8d9c6235d5 100644 --- a/server/routes/placeholder/placeholder_router.ts +++ b/server/routes/placeholder/placeholder_router.ts @@ -18,7 +18,7 @@ import { OpenSearchDashboardsResponseFactory, } from '../../../../../src/core/server/http/router'; import { SavedObjectsBulkCreateObject } from '../../../../../src/core/public'; -import { PlaceholderJavaBackend } from '../../adaptors/placeholder/placeholder_java_backend'; +import { PlaceholderKibanaBackend } from '../../../server/adaptors/placeholder/placeholder_kibana_backend'; /** * Parse a stream of newline-delimited JSON objects as an array. @@ -72,7 +72,7 @@ let added = false; export const handleWithCallback = async ( adaptor: PlaceholderAdaptor, response: OpenSearchDashboardsResponseFactory, - callback: (a: PlaceholderAdaptor) => object + callback: (a: PlaceholderAdaptor) => any ): Promise => { try { const data = await callback(adaptor); @@ -92,17 +92,10 @@ export const handleWithCallback = async ( }; const getAdaptor = ( - context: RequestHandlerContext, - request: OpenSearchDashboardsRequest + _context: RequestHandlerContext, + _request: OpenSearchDashboardsRequest ): PlaceholderAdaptor => { - // context.observability_plugin.observabilityClient is not in the RequestHandlerContext type, but it's the correct client. - // Updating to the seemingly-correct context.core.opensearch.legacy.client is a breaking change. - // For now, we'll wrap access in manual type checking. - if (context.observability_plugin === null) { - throw new Error('context.observability_plugin is null'); - } - const client = context.observability_plugin.observabilityClient.asScoped(request); - return new PlaceholderJavaBackend(client); + return new PlaceholderKibanaBackend(); }; export function registerPlaceholderRoute(router: IRouter) { @@ -114,7 +107,7 @@ export function registerPlaceholderRoute(router: IRouter) { async (context, request, response): Promise => { const adaptor = getAdaptor(context, request); return handleWithCallback(adaptor, response, async (a: PlaceholderAdaptor) => { - return await a.getIntegrationTemplates(null); + return await a.getIntegrationTemplates(); }); } ); @@ -169,7 +162,7 @@ export function registerPlaceholderRoute(router: IRouter) { async (context, request, response): Promise => { const adaptor = getAdaptor(context, request); return handleWithCallback(adaptor, response, async (a: PlaceholderAdaptor) => { - return await a.getIntegrationTemplates(null); + return await a.getIntegrationTemplates(); }); } ); From 1188515570349fc58161b3e2f5fb7ba38641d87d Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Wed, 17 May 2023 15:13:19 -0700 Subject: [PATCH 045/190] Fix placeholder tests Signed-off-by: Simeon Widdis --- .../placeholder/__tests__/placeholder_router.test.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/server/routes/placeholder/__tests__/placeholder_router.test.ts b/server/routes/placeholder/__tests__/placeholder_router.test.ts index f5a1a4595d..bf8f0f6338 100644 --- a/server/routes/placeholder/__tests__/placeholder_router.test.ts +++ b/server/routes/placeholder/__tests__/placeholder_router.test.ts @@ -6,18 +6,14 @@ import { } from '../../../../../../src/core/server'; import { OpenSearchDashboardsResponseFactory } from '../../../../../../src/core/server/http/router'; import { handleWithCallback } from '../placeholder_router'; +import { PlaceholderAdaptor } from 'server/adaptors/placeholder/placeholder_adaptor'; jest .mock('../../../../../../src/core/server', () => jest.fn()) .mock('../../../../../../src/core/server/http/router', () => jest.fn()); describe('Data wrapper', () => { - const clientMock: Partial = {}; - const requestMock: DeepPartial = { - url: { - pathname: '/test', - }, - }; + const adaptorMock: Partial = {}; const responseMock: DeepPartial = { custom: jest.fn((data) => data), ok: jest.fn((data) => data), @@ -28,7 +24,7 @@ describe('Data wrapper', () => { return { test: 'data' }; }); const result = await handleWithCallback( - clientMock as ILegacyScopedClusterClient, + adaptorMock as PlaceholderAdaptor, responseMock as OpenSearchDashboardsResponseFactory, callback ); @@ -43,7 +39,7 @@ describe('Data wrapper', () => { throw new Error('test error'); }); const result = await handleWithCallback( - clientMock as ILegacyScopedClusterClient, + adaptorMock as PlaceholderAdaptor, responseMock as OpenSearchDashboardsResponseFactory, callback ); From ebbd0008041a196a25b5a414ed70c0f31215151a Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Wed, 17 May 2023 16:14:42 -0700 Subject: [PATCH 046/190] Add integration template type to saved objects Signed-off-by: Simeon Widdis --- .../placeholder/placeholder_kibana_backend.ts | 28 +++++++++++++++---- server/plugin.ts | 25 +++++++++++++++++ .../routes/placeholder/placeholder_router.ts | 19 +++++++++++-- 3 files changed, 64 insertions(+), 8 deletions(-) diff --git a/server/adaptors/placeholder/placeholder_kibana_backend.ts b/server/adaptors/placeholder/placeholder_kibana_backend.ts index 424e1370cd..92de1a2894 100644 --- a/server/adaptors/placeholder/placeholder_kibana_backend.ts +++ b/server/adaptors/placeholder/placeholder_kibana_backend.ts @@ -1,8 +1,9 @@ import { coreRefs } from '../../../public/framework/core_refs'; import { PlaceholderAdaptor } from './placeholder_adaptor'; -import { SavedObjectsClientContract } from '../../../../../src/core/public'; +import { SavedObjectsBulkCreateObject } from '../../../../../src/core/public'; +import { SavedObjectsClientContract } from '../../../../../src/core/server/types'; -const sampleTemplates: IntegrationTemplate[] = [ +const catalog: IntegrationTemplate[] = [ { templateName: 'nginx', version: '1.0.0', @@ -35,19 +36,34 @@ const sampleIntegrations: IntegrationInstance[] = [ export class PlaceholderKibanaBackend implements PlaceholderAdaptor { client: SavedObjectsClientContract; - constructor() { - this.client = coreRefs.savedObjectsClient!; + constructor(client: SavedObjectsClientContract) { + this.client = client; } getIntegrationTemplates = ( _query?: IntegrationTemplateQuery ): Promise => { - console.log(sampleTemplates); + console.log(`Retrieving ${catalog.length} templates from catalog`); return Promise.resolve({ - integrations: sampleTemplates, + integrations: catalog, }); }; + loadCatalog(): Promise { + const toCreate: SavedObjectsBulkCreateObject[] = catalog.map((template) => { + return { + type: 'integration-template', + attributes: template, + }; + }); + try { + this.client.bulkCreate(toCreate); + return Promise.resolve(); + } catch (err: any) { + return Promise.reject(err); + } + } + getIntegrationInstances = ( query?: IntegrationInstanceQuery ): Promise => { diff --git a/server/plugin.ts b/server/plugin.ts index f315f809b4..e40e4a7259 100644 --- a/server/plugin.ts +++ b/server/plugin.ts @@ -78,7 +78,32 @@ export class ObservabilityPlugin }, }; + const integrationTemplateType: SavedObjectsType = { + name: 'integration-template', + hidden: false, + namespaceType: 'agnostic', + mappings: { + dynamic: false, + // TODO fill in the rest of the fields + properties: { + templateName: { + type: 'text', + }, + description: { + type: 'text', + }, + }, + }, + management: { + importableAndExportable: false, + getTitle(obj) { + return `Integration Template [${obj.id}]`; + }, + }, + }; + core.savedObjects.registerType(obsPanelType); + core.savedObjects.registerType(integrationTemplateType); // Register server side APIs setupRoutes({ router, client: openSearchObservabilityClient }); diff --git a/server/routes/placeholder/placeholder_router.ts b/server/routes/placeholder/placeholder_router.ts index 8d9c6235d5..33dea573dd 100644 --- a/server/routes/placeholder/placeholder_router.ts +++ b/server/routes/placeholder/placeholder_router.ts @@ -92,10 +92,10 @@ export const handleWithCallback = async ( }; const getAdaptor = ( - _context: RequestHandlerContext, + context: RequestHandlerContext, _request: OpenSearchDashboardsRequest ): PlaceholderAdaptor => { - return new PlaceholderKibanaBackend(); + return new PlaceholderKibanaBackend(context.core.savedObjects.client); }; export function registerPlaceholderRoute(router: IRouter) { @@ -128,6 +128,21 @@ export function registerPlaceholderRoute(router: IRouter) { } ); + router.post( + { + path: `${INTEGRATIONS_BASE}/test_load`, + validate: false, + }, + async (context, request, response): Promise => { + const adaptor = getAdaptor(context, request) as PlaceholderAdaptor; + return handleWithCallback(adaptor, response, async (a: PlaceholderAdaptor) => { + const unwrapped = a as PlaceholderKibanaBackend; + await unwrapped.loadCatalog(); + return {}; + }); + } + ); + router.get( { path: `${OBSERVABILITY_BASE}/repository/id`, From f0e78c32023662635eea24d24432bf91fca47c4e Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Wed, 17 May 2023 16:34:18 -0700 Subject: [PATCH 047/190] Move asset retrieval to kibana backend Signed-off-by: Simeon Widdis --- .../placeholder/__tests__/test.ndjson | 0 .../placeholder/__tests__/utils.test.ts} | 2 +- .../placeholder/placeholder_adaptor.ts | 4 ++ .../placeholder/placeholder_java_backend.ts | 10 ++++- .../placeholder/placeholder_kibana_backend.ts | 14 +++++- server/adaptors/placeholder/types.ts | 1 + server/adaptors/placeholder/utils.ts | 34 ++++++++++++++ .../routes/placeholder/placeholder_router.ts | 45 ++----------------- 8 files changed, 64 insertions(+), 46 deletions(-) rename server/{routes => adaptors}/placeholder/__tests__/test.ndjson (100%) rename server/{routes/placeholder/__tests__/ndjson.test.ts => adaptors/placeholder/__tests__/utils.test.ts} (93%) create mode 100644 server/adaptors/placeholder/utils.ts diff --git a/server/routes/placeholder/__tests__/test.ndjson b/server/adaptors/placeholder/__tests__/test.ndjson similarity index 100% rename from server/routes/placeholder/__tests__/test.ndjson rename to server/adaptors/placeholder/__tests__/test.ndjson diff --git a/server/routes/placeholder/__tests__/ndjson.test.ts b/server/adaptors/placeholder/__tests__/utils.test.ts similarity index 93% rename from server/routes/placeholder/__tests__/ndjson.test.ts rename to server/adaptors/placeholder/__tests__/utils.test.ts index 970d97cd6d..5c1fac2591 100644 --- a/server/routes/placeholder/__tests__/ndjson.test.ts +++ b/server/adaptors/placeholder/__tests__/utils.test.ts @@ -1,4 +1,4 @@ -import { readNDJsonObjects } from '../placeholder_router'; +import { readNDJsonObjects } from '../utils'; import { Readable } from 'stream'; import { createReadStream } from 'fs'; diff --git a/server/adaptors/placeholder/placeholder_adaptor.ts b/server/adaptors/placeholder/placeholder_adaptor.ts index c3077489d5..f253030333 100644 --- a/server/adaptors/placeholder/placeholder_adaptor.ts +++ b/server/adaptors/placeholder/placeholder_adaptor.ts @@ -3,11 +3,15 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { SavedObjectsBulkCreateObject } from '../../../../../src/core/server'; + export interface PlaceholderAdaptor { getIntegrationTemplates: ( query?: IntegrationTemplateQuery ) => Promise; + getAssets: (templateName: string) => Promise; + getIntegrationInstances: ( query?: IntegrationInstanceQuery ) => Promise; diff --git a/server/adaptors/placeholder/placeholder_java_backend.ts b/server/adaptors/placeholder/placeholder_java_backend.ts index eda3bc43ac..4a2bb5d106 100644 --- a/server/adaptors/placeholder/placeholder_java_backend.ts +++ b/server/adaptors/placeholder/placeholder_java_backend.ts @@ -1,4 +1,8 @@ -import { ILegacyScopedClusterClient } from '../../../../../src/core/server'; +import { reject } from 'lodash'; +import { + ILegacyScopedClusterClient, + SavedObjectsBulkCreateObject, +} from '../../../../../src/core/server'; import { PlaceholderAdaptor } from './placeholder_adaptor'; export class PlaceholderJavaBackend implements PlaceholderAdaptor { @@ -40,4 +44,8 @@ export class PlaceholderJavaBackend implements PlaceholderAdaptor { throw new Error('Fetch Added Applications Error: ' + err); } }; + + getAssets = async (_: any): Promise => { + return Promise.reject('not implemented'); + }; } diff --git a/server/adaptors/placeholder/placeholder_kibana_backend.ts b/server/adaptors/placeholder/placeholder_kibana_backend.ts index 92de1a2894..605af09b4d 100644 --- a/server/adaptors/placeholder/placeholder_kibana_backend.ts +++ b/server/adaptors/placeholder/placeholder_kibana_backend.ts @@ -1,7 +1,8 @@ -import { coreRefs } from '../../../public/framework/core_refs'; +import * as fs from 'fs'; import { PlaceholderAdaptor } from './placeholder_adaptor'; import { SavedObjectsBulkCreateObject } from '../../../../../src/core/public'; import { SavedObjectsClientContract } from '../../../../../src/core/server/types'; +import { readNDJsonObjects } from './utils'; const catalog: IntegrationTemplate[] = [ { @@ -9,7 +10,8 @@ const catalog: IntegrationTemplate[] = [ version: '1.0.0', description: 'Nginx HTTP server collector', catalog: 'observability', - assetUrl: ' https://cdn.iconscout.com/icon/free/png-256/nginx-3521604-2945048.png', + assetUrl: 'https://cdn.iconscout.com/icon/free/png-256/nginx-3521604-2945048.png', + displayAssets: [], }, ]; @@ -49,6 +51,14 @@ export class PlaceholderKibanaBackend implements PlaceholderAdaptor { }); }; + getAssets = (_templateName: string): Promise => { + const stream = fs.createReadStream(__dirname + '/__tests__/test.ndjson'); + const assets = readNDJsonObjects(stream).then( + (objects) => objects as SavedObjectsBulkCreateObject[] + ); + return assets; + }; + loadCatalog(): Promise { const toCreate: SavedObjectsBulkCreateObject[] = catalog.map((template) => { return { diff --git a/server/adaptors/placeholder/types.ts b/server/adaptors/placeholder/types.ts index a43271484e..30fd2e41d0 100644 --- a/server/adaptors/placeholder/types.ts +++ b/server/adaptors/placeholder/types.ts @@ -4,6 +4,7 @@ interface IntegrationTemplate { description: string; catalog: string; assetUrl: string; + displayAssets: any[]; } interface IntegrationTemplateSearchResult { diff --git a/server/adaptors/placeholder/utils.ts b/server/adaptors/placeholder/utils.ts new file mode 100644 index 0000000000..b67c12011a --- /dev/null +++ b/server/adaptors/placeholder/utils.ts @@ -0,0 +1,34 @@ +import { Readable } from 'stream'; + +/** + * Parse a stream of newline-delimited JSON objects as an array. + * The entire stream is read; the method will hang if the stream is not closed. + * The data entries MUST be JSON objects, + * other valid JSON values will be rejected. + * + * Resolves the `Promise` if every newline-separated JSON object is valid. + * Rejects the `Promise` if the stream errors, or if the JSON is not parseable. + * + * @param {Readable} stream A stream of newline-delimited JSON objects. + * @returns {Promise} A `Promise` for an array of parsed JSON objects. + */ +export const readNDJsonObjects = async (stream: Readable): Promise => { + return new Promise((resolve, reject) => { + let assets: any[] = []; + let json: string = ''; + stream.on('data', (chunk: string | Buffer) => { + json += chunk.toString(); + }); + stream.on('end', () => { + try { + assets = JSON.parse(`[${json.replace(/\}\s+\{/g, '},{')}]`); + resolve(assets); + } catch (err: any) { + reject(err); + } + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); +}; diff --git a/server/routes/placeholder/placeholder_router.ts b/server/routes/placeholder/placeholder_router.ts index 33dea573dd..b45064cf74 100644 --- a/server/routes/placeholder/placeholder_router.ts +++ b/server/routes/placeholder/placeholder_router.ts @@ -5,12 +5,7 @@ import fetch from 'node-fetch'; import * as fs from 'fs'; -import { Readable } from 'stream'; -import { - ILegacyScopedClusterClient, - IRouter, - RequestHandlerContext, -} from '../../../../../src/core/server'; +import { IRouter, RequestHandlerContext } from '../../../../../src/core/server'; import { INTEGRATIONS_BASE, OBSERVABILITY_BASE } from '../../../common/constants/shared'; import { PlaceholderAdaptor } from '../../../server/adaptors/placeholder/placeholder_adaptor'; import { @@ -20,39 +15,6 @@ import { import { SavedObjectsBulkCreateObject } from '../../../../../src/core/public'; import { PlaceholderKibanaBackend } from '../../../server/adaptors/placeholder/placeholder_kibana_backend'; -/** - * Parse a stream of newline-delimited JSON objects as an array. - * The entire stream is read; the method will hang if the stream is not closed. - * The data entries MUST be JSON objects, - * other valid JSON values will be rejected. - * - * Resolves the `Promise` if every newline-separated JSON object is valid. - * Rejects the `Promise` if the stream errors, or if the JSON is not parseable. - * - * @param {Readable} stream A stream of newline-delimited JSON objects. - * @returns {Promise} A `Promise` for an array of parsed JSON objects. - */ -export const readNDJsonObjects = async (stream: Readable): Promise => { - return new Promise((resolve, reject) => { - let assets: object[] = []; - let json: string = ''; - stream.on('data', (chunk: string | Buffer) => { - json += chunk.toString(); - }); - stream.on('end', () => { - try { - assets = JSON.parse(`[${json.replace(/\}\s+\{/g, '},{')}]`); - resolve(assets); - } catch (err: any) { - reject(err); - } - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); -}; - let added = false; /** @@ -119,9 +81,8 @@ export function registerPlaceholderRoute(router: IRouter) { }, async (context, request, response): Promise => { const adaptor = getAdaptor(context, request); - return handleWithCallback(adaptor, response, async (_a: PlaceholderAdaptor) => { - const stream = fs.createReadStream(__dirname + '/__tests__/test.ndjson'); - const assets = (await readNDJsonObjects(stream)) as SavedObjectsBulkCreateObject[]; + return handleWithCallback(adaptor, response, async (a: PlaceholderAdaptor) => { + const assets = await a.getAssets('nginx'); added = true; return context.core.savedObjects.client.bulkCreate(assets); }); From 5a7eb74b608a99619d1bbf90a55c7940151d09f5 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Wed, 17 May 2023 16:46:57 -0700 Subject: [PATCH 048/190] Add actual catalog query to getIntegrationTemplates Signed-off-by: Simeon Widdis --- server/adaptors/placeholder/placeholder_kibana_backend.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server/adaptors/placeholder/placeholder_kibana_backend.ts b/server/adaptors/placeholder/placeholder_kibana_backend.ts index 605af09b4d..5c2464c842 100644 --- a/server/adaptors/placeholder/placeholder_kibana_backend.ts +++ b/server/adaptors/placeholder/placeholder_kibana_backend.ts @@ -45,6 +45,13 @@ export class PlaceholderKibanaBackend implements PlaceholderAdaptor { getIntegrationTemplates = ( _query?: IntegrationTemplateQuery ): Promise => { + this.client + .find({ + type: 'integration-template', + }) + .then((data) => { + console.warn(`Catalog queried for ${data.total} entries, ignoring for sample data.`); + }); console.log(`Retrieving ${catalog.length} templates from catalog`); return Promise.resolve({ integrations: catalog, From 064124cb3baa49c2a426677cd99f72bae916d2e2 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Wed, 17 May 2023 16:58:57 -0700 Subject: [PATCH 049/190] Remove management info from integration template type Signed-off-by: Simeon Widdis --- server/plugin.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/server/plugin.ts b/server/plugin.ts index e40e4a7259..4c6b9a0e8d 100644 --- a/server/plugin.ts +++ b/server/plugin.ts @@ -94,12 +94,6 @@ export class ObservabilityPlugin }, }, }, - management: { - importableAndExportable: false, - getTitle(obj) { - return `Integration Template [${obj.id}]`; - }, - }, }; core.savedObjects.registerType(obsPanelType); From 3fa5d873e32de38f0978d7ec14762a76a7254d21 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Fri, 19 May 2023 13:28:40 -0700 Subject: [PATCH 050/190] Use FS for repository Signed-off-by: Simeon Widdis --- .../placeholder/__data__/repository.json | 10 ++++ .../placeholder/placeholder_kibana_backend.ts | 55 +++++++++---------- .../routes/placeholder/placeholder_router.ts | 2 +- 3 files changed, 37 insertions(+), 30 deletions(-) create mode 100644 server/adaptors/placeholder/__data__/repository.json diff --git a/server/adaptors/placeholder/__data__/repository.json b/server/adaptors/placeholder/__data__/repository.json new file mode 100644 index 0000000000..9b5e1deebe --- /dev/null +++ b/server/adaptors/placeholder/__data__/repository.json @@ -0,0 +1,10 @@ +[ + { + "templateName": "nginx", + "version": "1.0.0", + "description": "Nginx HTTP server collector", + "catalog": "observability", + "assetUrl": "https://cdn.iconscout.com/icon/free/png-256/nginx-3521604-2945048.png", + "displayAssets": [] + } +] \ No newline at end of file diff --git a/server/adaptors/placeholder/placeholder_kibana_backend.ts b/server/adaptors/placeholder/placeholder_kibana_backend.ts index 5c2464c842..0bc4d1a2bc 100644 --- a/server/adaptors/placeholder/placeholder_kibana_backend.ts +++ b/server/adaptors/placeholder/placeholder_kibana_backend.ts @@ -1,21 +1,12 @@ -import * as fs from 'fs'; +import { promises as fs } from 'fs'; import { PlaceholderAdaptor } from './placeholder_adaptor'; import { SavedObjectsBulkCreateObject } from '../../../../../src/core/public'; import { SavedObjectsClientContract } from '../../../../../src/core/server/types'; import { readNDJsonObjects } from './utils'; -const catalog: IntegrationTemplate[] = [ - { - templateName: 'nginx', - version: '1.0.0', - description: 'Nginx HTTP server collector', - catalog: 'observability', - assetUrl: 'https://cdn.iconscout.com/icon/free/png-256/nginx-3521604-2945048.png', - displayAssets: [], - }, -]; +let repository: IntegrationTemplate[] = []; -const sampleIntegrations: IntegrationInstance[] = [ +const store: IntegrationInstance[] = [ { templateName: 'nginx', type: 'dashboard', @@ -25,16 +16,26 @@ const sampleIntegrations: IntegrationInstance[] = [ version: '0.1.0', description: 'Nginx HTTP server collector for east cost prod systems', template: - 'https://github.com/opensearch-project/observability/blob/2.x/integrations/nginx/config.json', - creationDate: '2016-08-29T09:12:33.001Z', + 'https: //github.com/opensearch-project/observability/blob/2.x/integrations/nginx/config.json', + creationDate: '2016-08-29T09: 12: 33.001Z', author: 'Ani', status: 'LOADED', dashboardUrl: "http://localhost:5601/nol/app/dashboards#/view/96847220-5261-44d0-89b4-65f3a659f13a?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(description:'Nginx%20dashboard%20with%20basic%20Observability%20on%20access%20%2F%20error%20logs',filters:!(),fullScreenMode:!f,options:(hidePanelTitles:!f,useMargins:!t),query:(language:kuery,query:''),timeRestore:!f,title:'%5BNGINX%20Core%20Logs%201.0%5D%20Overview',viewMode:view)", - assets: {}, + assets: [], }, ]; +const readRepository = async (): Promise => { + const buffer = await fs.readFile(__dirname + '/__data__/repository.json', 'utf-8'); + try { + repository = JSON.parse(buffer); + return Promise.resolve(); + } catch (err: any) { + return Promise.reject(err); + } +}; + export class PlaceholderKibanaBackend implements PlaceholderAdaptor { client: SavedObjectsClientContract; @@ -42,19 +43,15 @@ export class PlaceholderKibanaBackend implements PlaceholderAdaptor { this.client = client; } - getIntegrationTemplates = ( + getIntegrationTemplates = async ( _query?: IntegrationTemplateQuery ): Promise => { - this.client - .find({ - type: 'integration-template', - }) - .then((data) => { - console.warn(`Catalog queried for ${data.total} entries, ignoring for sample data.`); - }); - console.log(`Retrieving ${catalog.length} templates from catalog`); + if (repository.length === 0) { + await readRepository(); + } + console.log(`Retrieving ${repository.length} templates from catalog`); return Promise.resolve({ - integrations: catalog, + integrations: repository, }); }; @@ -66,8 +63,8 @@ export class PlaceholderKibanaBackend implements PlaceholderAdaptor { return assets; }; - loadCatalog(): Promise { - const toCreate: SavedObjectsBulkCreateObject[] = catalog.map((template) => { + loadRepository(): Promise { + const toCreate: SavedObjectsBulkCreateObject[] = repository.map((template) => { return { type: 'integration-template', attributes: template, @@ -84,10 +81,10 @@ export class PlaceholderKibanaBackend implements PlaceholderAdaptor { getIntegrationInstances = ( query?: IntegrationInstanceQuery ): Promise => { - console.log(sampleIntegrations); + console.log(store); if (query?.added) { return Promise.resolve({ - integrations: sampleIntegrations, + integrations: store, }); } return Promise.resolve({ diff --git a/server/routes/placeholder/placeholder_router.ts b/server/routes/placeholder/placeholder_router.ts index b45064cf74..34cbcc7ded 100644 --- a/server/routes/placeholder/placeholder_router.ts +++ b/server/routes/placeholder/placeholder_router.ts @@ -98,7 +98,7 @@ export function registerPlaceholderRoute(router: IRouter) { const adaptor = getAdaptor(context, request) as PlaceholderAdaptor; return handleWithCallback(adaptor, response, async (a: PlaceholderAdaptor) => { const unwrapped = a as PlaceholderKibanaBackend; - await unwrapped.loadCatalog(); + await unwrapped.loadRepository(); return {}; }); } From 8220d9c6684f5be00fe50eaeecc78b74e2ed97ab Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Fri, 19 May 2023 15:00:13 -0700 Subject: [PATCH 051/190] Update integration types to store instances in kibana Signed-off-by: Simeon Widdis --- server/plugin.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/plugin.ts b/server/plugin.ts index 4c6b9a0e8d..ba38fdadaf 100644 --- a/server/plugin.ts +++ b/server/plugin.ts @@ -78,10 +78,10 @@ export class ObservabilityPlugin }, }; - const integrationTemplateType: SavedObjectsType = { - name: 'integration-template', + const integrationInstanceType: SavedObjectsType = { + name: 'integration-instance', hidden: false, - namespaceType: 'agnostic', + namespaceType: 'single', mappings: { dynamic: false, // TODO fill in the rest of the fields @@ -97,7 +97,7 @@ export class ObservabilityPlugin }; core.savedObjects.registerType(obsPanelType); - core.savedObjects.registerType(integrationTemplateType); + core.savedObjects.registerType(integrationInstanceType); // Register server side APIs setupRoutes({ router, client: openSearchObservabilityClient }); From 4c4a005d150afb886d869777525dfe3ba41e5c2f Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Mon, 22 May 2023 10:25:05 -0700 Subject: [PATCH 052/190] Rename Placeholder references to Integrations Signed-off-by: Simeon Widdis --- public/components/app.tsx | 2 +- .../assets/nginx-svgrepo-com.svg | 0 .../assets/nginx.svg | 0 .../components/add_integration_modal.tsx | 2 - .../components/added_integration.tsx | 461 +++++++++++++++++ .../added_integration_overview_page.tsx | 0 .../components/added_integration_table.tsx | 0 .../available_integration_card_view.tsx | 2 +- .../available_integration_overview_page.tsx | 0 .../available_integration_table.tsx | 0 .../components/integration.tsx | 16 +- .../components/integration_assets_panel.tsx | 44 +- .../components/integration_card.tsx | 0 .../components/integration_details_panel.tsx | 50 ++ .../components/integration_fields_panel.tsx | 42 +- .../components/integration_header.tsx | 0 .../components/integration_overview_panel.tsx | 4 +- .../components/integration_side_nav.tsx | 7 +- .../{placeholder => integrations}/home.tsx | 0 .../components/added_integration.tsx | 463 ------------------ .../components/integration_details_panel.tsx | 49 -- .../__data__/repository.json | 0 .../__tests__/test.ndjson | 0 .../__tests__/utils.test.ts | 0 .../integrations_adaptor.ts} | 2 +- .../integrations_java_backend.ts} | 4 +- .../integrations_kibana_backend.ts} | 8 +- .../{placeholder => integrations}/types.ts | 0 .../{placeholder => integrations}/utils.ts | 0 server/common/metrics/constants.ts | 2 +- server/routes/index.ts | 7 +- .../__tests__/integrations_router.test.ts} | 10 +- .../integrations_router.ts} | 36 +- 33 files changed, 608 insertions(+), 603 deletions(-) rename public/components/{placeholder => integrations}/assets/nginx-svgrepo-com.svg (100%) rename public/components/{placeholder => integrations}/assets/nginx.svg (100%) rename public/components/{placeholder => integrations}/components/add_integration_modal.tsx (99%) create mode 100644 public/components/integrations/components/added_integration.tsx rename public/components/{placeholder => integrations}/components/added_integration_overview_page.tsx (100%) rename public/components/{placeholder => integrations}/components/added_integration_table.tsx (100%) rename public/components/{placeholder => integrations}/components/available_integration_card_view.tsx (97%) rename public/components/{placeholder => integrations}/components/available_integration_overview_page.tsx (100%) rename public/components/{placeholder => integrations}/components/available_integration_table.tsx (100%) rename public/components/{placeholder => integrations}/components/integration.tsx (96%) rename public/components/{placeholder => integrations}/components/integration_assets_panel.tsx (67%) rename public/components/{placeholder => integrations}/components/integration_card.tsx (100%) create mode 100644 public/components/integrations/components/integration_details_panel.tsx rename public/components/{placeholder => integrations}/components/integration_fields_panel.tsx (72%) rename public/components/{placeholder => integrations}/components/integration_header.tsx (100%) rename public/components/{placeholder => integrations}/components/integration_overview_panel.tsx (97%) rename public/components/{placeholder => integrations}/components/integration_side_nav.tsx (94%) rename public/components/{placeholder => integrations}/home.tsx (100%) delete mode 100644 public/components/placeholder/components/added_integration.tsx delete mode 100644 public/components/placeholder/components/integration_details_panel.tsx rename server/adaptors/{placeholder => integrations}/__data__/repository.json (100%) rename server/adaptors/{placeholder => integrations}/__tests__/test.ndjson (100%) rename server/adaptors/{placeholder => integrations}/__tests__/utils.test.ts (100%) rename server/adaptors/{placeholder/placeholder_adaptor.ts => integrations/integrations_adaptor.ts} (92%) rename server/adaptors/{placeholder/placeholder_java_backend.ts => integrations/integrations_java_backend.ts} (92%) rename server/adaptors/{placeholder/placeholder_kibana_backend.ts => integrations/integrations_kibana_backend.ts} (91%) rename server/adaptors/{placeholder => integrations}/types.ts (100%) rename server/adaptors/{placeholder => integrations}/utils.ts (100%) rename server/routes/{placeholder/__tests__/placeholder_router.test.ts => integrations/__tests__/integrations_router.test.ts} (83%) rename server/routes/{placeholder/placeholder_router.ts => integrations/integrations_router.ts} (75%) diff --git a/public/components/app.tsx b/public/components/app.tsx index 102c37e16f..e28bfa047e 100644 --- a/public/components/app.tsx +++ b/public/components/app.tsx @@ -12,7 +12,7 @@ import { observabilityID, observabilityTitle } from '../../common/constants/shar import { store } from '../framework/redux/store'; import { AppPluginStartDependencies } from '../types'; import { Home as ApplicationAnalyticsHome } from './application_analytics/home'; -import { Home as PlaceholderHome } from './placeholder/home'; +import { Home as PlaceholderHome } from './integrations/home'; import { MetricsListener } from './common/metrics_listener'; import { Home as CustomPanelsHome } from './custom_panels/home'; import { EventAnalytics } from './event_analytics'; diff --git a/public/components/placeholder/assets/nginx-svgrepo-com.svg b/public/components/integrations/assets/nginx-svgrepo-com.svg similarity index 100% rename from public/components/placeholder/assets/nginx-svgrepo-com.svg rename to public/components/integrations/assets/nginx-svgrepo-com.svg diff --git a/public/components/placeholder/assets/nginx.svg b/public/components/integrations/assets/nginx.svg similarity index 100% rename from public/components/placeholder/assets/nginx.svg rename to public/components/integrations/assets/nginx.svg diff --git a/public/components/placeholder/components/add_integration_modal.tsx b/public/components/integrations/components/add_integration_modal.tsx similarity index 99% rename from public/components/placeholder/components/add_integration_modal.tsx rename to public/components/integrations/components/add_integration_modal.tsx index 34b64162a8..82a5d2f857 100644 --- a/public/components/placeholder/components/add_integration_modal.tsx +++ b/public/components/integrations/components/add_integration_modal.tsx @@ -178,5 +178,3 @@ export const getAddIntegrationModal = ( /> ); }; - - diff --git a/public/components/integrations/components/added_integration.tsx b/public/components/integrations/components/added_integration.tsx new file mode 100644 index 0000000000..0d892343e8 --- /dev/null +++ b/public/components/integrations/components/added_integration.tsx @@ -0,0 +1,461 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ +/* eslint-disable react-hooks/exhaustive-deps */ + +import { + EuiButton, + EuiFlexGroup, + EuiFlexItem, + EuiGlobalToastList, + EuiHorizontalRule, + EuiIcon, + EuiInMemoryTable, + EuiLink, + EuiOverlayMask, + EuiPage, + EuiPageBody, + EuiPageContent, + EuiPageContentHeaderSection, + EuiPageHeader, + EuiPageHeaderSection, + EuiPanel, + EuiSelectOption, + EuiSpacer, + EuiTabbedContent, + EuiTabbedContentTab, + EuiTableFieldDataColumnType, + EuiText, + EuiTitle, +} from '@elastic/eui'; +import DSLService from 'public/services/requests/dsl'; +import PPLService from 'public/services/requests/ppl'; +import SavedObjects from 'public/services/saved_objects/event_analytics/saved_objects'; +import TimestampUtils from 'public/services/timestamp/timestamp'; +import React, { ReactChild, useEffect, useState } from 'react'; +import { useHistory } from 'react-router-dom'; +import { useDispatch } from 'react-redux'; +import { last } from 'lodash'; +import { VisualizationType } from 'common/types/custom_panels'; +import { Toast } from '@elastic/eui/src/components/toast/global_toast_list'; +import _ from 'lodash'; +import { TracesContent } from '../../trace_analytics/components/traces/traces_content'; +import { DashboardContent } from '../../trace_analytics/components/dashboard/dashboard_content'; +import { ServicesContent } from '../../trace_analytics/components/services/services_content'; +import { filtersToDsl, PanelTitle } from '../../trace_analytics/components/common/helper_functions'; +import { SpanDetailTable } from '../../trace_analytics/components/traces/span_detail_table'; +import { Explorer } from '../../event_analytics/explorer/explorer'; +// import { Configuration } from './configuration'; +import { + TAB_CONFIG_ID, + TAB_CONFIG_TITLE, + TAB_LOG_ID, + TAB_LOG_TITLE, + TAB_OVERVIEW_ID, + TAB_OVERVIEW_TITLE, + TAB_PANEL_ID, + TAB_PANEL_TITLE, + TAB_SERVICE_ID, + TAB_SERVICE_TITLE, + TAB_TRACE_ID, + TAB_TRACE_TITLE, +} from '../../../../common/constants/application_analytics'; +import { + TAB_EVENT_ID, + TAB_CHART_ID, + NEW_TAB, + FILTER_OPTIONS, +} from '../../../../common/constants/explorer'; +import { IQueryTab } from '../../../../common/types/explorer'; +import { NotificationsStart } from '../../../../../../src/core/public'; +import { AppAnalyticsComponentDeps } from '../home'; +import { + ApplicationRequestType, + ApplicationType, +} from '../../../../common/types/application_analytics'; +import { QueryManager } from '../../../../common/query_manager/ppl_query_manager'; +import { IntegrationOverview } from './integration_overview_panel'; +import { IntegrationDetails } from './integration_details_panel'; +import { IntegrationFields } from './integration_fields_panel'; +import { IntegrationAssets } from './integration_assets_panel'; +import { getAddIntegrationModal } from './add_integration_modal'; +import { OBSERVABILITY_BASE } from '../../../../common/constants/shared'; +import { DeleteModal } from '../../common/helpers/delete_modal'; + +const searchBarConfigs = { + [TAB_EVENT_ID]: { + showSaveButton: false, + showSavePanelOptionsList: false, + }, + [TAB_CHART_ID]: { + showSaveButton: true, + showSavePanelOptionsList: false, + }, +}; + +interface AppDetailProps extends AppAnalyticsComponentDeps { + disabled?: boolean; + appId: string; + pplService: PPLService; + dslService: DSLService; + savedObjects: SavedObjects; + timestampUtils: TimestampUtils; + notifications: NotificationsStart; + queryManager: QueryManager; + updateApp: (appId: string, updateAppData: Partial, type: string) => void; + callback: (childfunction: () => void) => void; +} + +export function AddedIntegration(props: AppDetailProps) { + const { + pplService, + dslService, + timestampUtils, + savedObjects, + http, + notifications, + appId, + chrome, + parentBreadcrumbs, + query, + filters, + appConfigs, + updateApp, + setAppConfigs, + setFilters, + callback, + queryManager, + mode, + } = props; + const [application, setApplication] = useState({ + id: '', + dateCreated: '', + dateModified: '', + name: '', + description: '', + baseQuery: '', + servicesEntities: [], + traceGroups: [], + panelId: '', + availability: { name: '', color: '', availabilityVisId: '' }, + }); + + const [toasts, setToasts] = useState([]); + const [stateData, setData] = useState({ data: {} }); + + useEffect(() => { + chrome.setBreadcrumbs([ + ...parentBreadcrumbs, + { + text: 'Placeholder', + href: '#/placeholder', + }, + { + text: 'Added Integration', + href: '#/added', + }, + { + text: appId, + href: `${last(parentBreadcrumbs)!.href}placeholder/added/${appId}`, + }, + ]); + handleDataRequest(); + }, [appId]); + + const [isModalVisible, setIsModalVisible] = useState(false); + const [modalLayout, setModalLayout] = useState(); + + const getModal = () => { + setModalLayout( + { + setIsModalVisible(false); + }} + onCancel={() => { + setIsModalVisible(false); + }} + title={`Delete Assets`} + message={`Are you sure you want to delete the selected asset(s)?`} + /> + ); + setIsModalVisible(true); + }; + + async function handleDataRequest() { + http.get(`${OBSERVABILITY_BASE}/store/id`).then((exists) => setData(exists)); + } + + const setToast = (title: string, color = 'success', text?: ReactChild) => { + if (!text) text = ''; + setToasts([...toasts, { id: new Date().toISOString(), title, text, color } as Toast]); + }; + + async function addIntegrationRequest(name: string) { + http + .post(`${OBSERVABILITY_BASE}/store`) + .then((res) => { + setToast( + `${name} integration successfully added!`, + 'success', + `View the added assets from ${name} in the Added Integrations list` + ); + }) + .catch((err) => + setToast( + 'Failed to load integration. Check Added Integrations table for more details', + 'danger' + ) + ); + } + + function AddedOverview(overviewProps: any) { + const { data } = overviewProps; + + return ( + + + + + + + + {data.data.id} + + + + { + getModal(); + }} + > + Delete + + + + + + + + +

Template

+
+ + + {data.data.templateName} + +
+ + +

Date Added

+
+ + {data.data.creationDate?.split('T')[0]} +
+ + +

Status

+
+ + {data.data.status} +
+ + +

Added By

+
+ + {data.data.author} +
+ + +

Tags

+
+ + {data.data.license} +
+
+
+
+ ); + } + + function AddedAssets(assetProps: any) { + const data = assetProps.data.data.assets || []; + + const search = { + box: { + incremental: true, + }, + filters: [ + { + type: 'field_value_selection', + field: 'type', + name: 'Type', + multiSelect: false, + options: FILTER_OPTIONS.map((i) => ({ + value: i, + name: i, + view: i, + })), + }, + ], + }; + + const tableColumns = [ + { + field: 'name', + name: 'Name', + sortable: true, + truncateText: true, + render: (value, record) => ( + + {_.truncate(record.name, { length: 100 })} + + ), + }, + { + field: 'type', + name: 'Type', + sortable: true, + truncateText: true, + render: (value, record) => ( + + {_.truncate(record.type, { length: 100 })} + + ), + }, + { + field: 'actions', + name: 'Actions', + sortable: true, + truncateText: true, + render: (value, record) => ( + { + getModal(); + }} + /> + ), + }, + ] as Array>; + + return ( + + + + + + ); + } + + function AddedIntegrationFields(fieldProps: any) { + const data = fieldProps.data.data.fields || []; + + const search = { + box: { + incremental: true, + }, + filters: [ + { + type: 'field_value_selection', + field: 'type', + name: 'Type', + multiSelect: false, + options: FILTER_OPTIONS.map((i) => ({ + value: i, + name: i, + view: i, + })), + }, + ], + }; + + const tableColumns = [ + { + field: 'name', + name: 'Name', + sortable: true, + truncateText: true, + render: (value, record) => ( + + {_.truncate(record.name, { length: 100 })} + + ), + }, + { + field: 'type', + name: 'Type', + sortable: true, + truncateText: true, + render: (value, record) => ( + + {_.truncate(record.type, { length: 100 })} + + ), + }, + { + field: 'category', + name: 'Category', + sortable: true, + truncateText: true, + render: (value, record) => ( + + {_.truncate(record.category, { length: 100 })} + + ), + }, + ] as Array>; + + return ( + + + + + + ); + } + + return ( + + { + setToasts(toasts.filter((toast) => toast.id !== removedToast.id)); + }} + toastLifeTimeMs={6000} + /> + + + {AddedOverview({ stateData })} + + {AddedAssets({ stateData })} + + {AddedIntegrationFields({ stateData })} + + + {isModalVisible && modalLayout} + + ); +} diff --git a/public/components/placeholder/components/added_integration_overview_page.tsx b/public/components/integrations/components/added_integration_overview_page.tsx similarity index 100% rename from public/components/placeholder/components/added_integration_overview_page.tsx rename to public/components/integrations/components/added_integration_overview_page.tsx diff --git a/public/components/placeholder/components/added_integration_table.tsx b/public/components/integrations/components/added_integration_table.tsx similarity index 100% rename from public/components/placeholder/components/added_integration_table.tsx rename to public/components/integrations/components/added_integration_table.tsx diff --git a/public/components/placeholder/components/available_integration_card_view.tsx b/public/components/integrations/components/available_integration_card_view.tsx similarity index 97% rename from public/components/placeholder/components/available_integration_card_view.tsx rename to public/components/integrations/components/available_integration_card_view.tsx index aca6a86c22..07882c876c 100644 --- a/public/components/placeholder/components/available_integration_card_view.tsx +++ b/public/components/integrations/components/available_integration_card_view.tsx @@ -26,7 +26,7 @@ import PPLService from 'public/services/requests/ppl'; import SavedObjects from 'public/services/saved_objects/event_analytics/saved_objects'; import TimestampUtils from 'public/services/timestamp/timestamp'; import React, { ReactChild, useEffect, useState } from 'react'; -import { getCustomModal } from '../../../../public/components/custom_panels/helpers/modal_containers'; +import { getCustomModal } from '../../custom_panels/helpers/modal_containers'; import { AvailableIntegrationsCardViewProps, AvailableIntegrationType, diff --git a/public/components/placeholder/components/available_integration_overview_page.tsx b/public/components/integrations/components/available_integration_overview_page.tsx similarity index 100% rename from public/components/placeholder/components/available_integration_overview_page.tsx rename to public/components/integrations/components/available_integration_overview_page.tsx diff --git a/public/components/placeholder/components/available_integration_table.tsx b/public/components/integrations/components/available_integration_table.tsx similarity index 100% rename from public/components/placeholder/components/available_integration_table.tsx rename to public/components/integrations/components/available_integration_table.tsx diff --git a/public/components/placeholder/components/integration.tsx b/public/components/integrations/components/integration.tsx similarity index 96% rename from public/components/placeholder/components/integration.tsx rename to public/components/integrations/components/integration.tsx index 30f47d2fc9..a610da6206 100644 --- a/public/components/placeholder/components/integration.tsx +++ b/public/components/integrations/components/integration.tsx @@ -193,7 +193,7 @@ export function Integration(props: AppDetailProps) { .catch((err) => setToast( 'Failed to load integration. Check Added Integrations table for more details', - 'danger', + 'danger' ) ); } @@ -209,14 +209,14 @@ export function Integration(props: AppDetailProps) { /> - {IntegrationOverview({data, getModal})} + {IntegrationOverview({ data, getModal })} + + {IntegrationDetails({ data })} + + {IntegrationAssets({ data })} + + {IntegrationFields({ data })} - {IntegrationDetails({ data })} - - {IntegrationAssets({ data })} - - {IntegrationFields({ data })} - {isModalVisible && modalLayout} diff --git a/public/components/placeholder/components/integration_assets_panel.tsx b/public/components/integrations/components/integration_assets_panel.tsx similarity index 67% rename from public/components/placeholder/components/integration_assets_panel.tsx rename to public/components/integrations/components/integration_assets_panel.tsx index f75d7ad4b1..d1faf06364 100644 --- a/public/components/placeholder/components/integration_assets_panel.tsx +++ b/public/components/integrations/components/integration_assets_panel.tsx @@ -1,12 +1,18 @@ -import { EuiInMemoryTable, EuiLink, EuiPanel, EuiSpacer, EuiTableFieldDataColumnType, EuiText } from '@elastic/eui'; -import { FILTER_OPTIONS } from '../../../../common/constants/explorer'; +import { + EuiInMemoryTable, + EuiLink, + EuiPanel, + EuiSpacer, + EuiTableFieldDataColumnType, + EuiText, +} from '@elastic/eui'; import React from 'react'; -import { PanelTitle } from '../../../../public/components/trace_analytics/components/common/helper_functions'; import _ from 'lodash'; +import { FILTER_OPTIONS } from '../../../../common/constants/explorer'; +import { PanelTitle } from '../../trace_analytics/components/common/helper_functions'; export function IntegrationAssets(props: any) { - - const data = props.data.data.assets || [] + const data = props.data.data.assets || []; const search = { box: { @@ -34,9 +40,7 @@ export function IntegrationAssets(props: any) { sortable: true, truncateText: true, render: (value, record) => ( - + {_.truncate(record.name, { length: 100 })} ), @@ -54,23 +58,21 @@ export function IntegrationAssets(props: any) { }, ] as Array>; - - return ( - + + itemId="id" + loading={false} + items={data} + columns={tableColumns} + pagination={{ + initialPageSize: 10, + pageSizeOptions: [5, 10, 15], + }} + search={search} + /> ); } diff --git a/public/components/placeholder/components/integration_card.tsx b/public/components/integrations/components/integration_card.tsx similarity index 100% rename from public/components/placeholder/components/integration_card.tsx rename to public/components/integrations/components/integration_card.tsx diff --git a/public/components/integrations/components/integration_details_panel.tsx b/public/components/integrations/components/integration_details_panel.tsx new file mode 100644 index 0000000000..165a166914 --- /dev/null +++ b/public/components/integrations/components/integration_details_panel.tsx @@ -0,0 +1,50 @@ +import { + EuiButton, + EuiFlexGroup, + EuiLink, + EuiPageHeader, + EuiPageHeaderSection, + EuiPanel, + EuiSpacer, + EuiTitle, + EuiFlexItem, + EuiText, + EuiPageContentHeaderSection, +} from '@elastic/eui'; +import React from 'react'; +import { PanelTitle } from '../../trace_analytics/components/common/helper_functions'; + +export function IntegrationDetails(props: any) { + let screenshots; + if (props.data.data.screenshotUrls) { + screenshots = Object.values(props.data.data.screenshotUrls); + } + + return ( + + + + + NginX [pronounced "Engine X"] is an HTTP and reverse proxy server that emphasizes + high concurrency, performance, and low memory usage. Nginx can also act as a mail proxy + server and a generic TCP proxy server. Nginx is available as open source and in a commercial + version (NginX Plus). As Nginx is a high-speed, lightweight HTTP server engine, more and + more web sites and applications are moving to Nginx. According to W3Techs, over 25 percent + of all known web servers use Nginx. The performance improvements for serving static content + can be significant. Especially at high loads, Nginx is faster than other solutions and + consumes less server resources. + + + + + {screenshots?.map((i, v) => { + return ( + + + + ); + })} + + + ); +} diff --git a/public/components/placeholder/components/integration_fields_panel.tsx b/public/components/integrations/components/integration_fields_panel.tsx similarity index 72% rename from public/components/placeholder/components/integration_fields_panel.tsx rename to public/components/integrations/components/integration_fields_panel.tsx index be6bae8a0f..c7281f98f5 100644 --- a/public/components/placeholder/components/integration_fields_panel.tsx +++ b/public/components/integrations/components/integration_fields_panel.tsx @@ -1,11 +1,17 @@ -import { EuiInMemoryTable, EuiPanel, EuiSpacer, EuiTableFieldDataColumnType, EuiText } from '@elastic/eui'; -import { FILTER_OPTIONS } from '../../../../common/constants/explorer'; +import { + EuiInMemoryTable, + EuiPanel, + EuiSpacer, + EuiTableFieldDataColumnType, + EuiText, +} from '@elastic/eui'; import React from 'react'; -import { PanelTitle } from '../../../../public/components/trace_analytics/components/common/helper_functions'; import _ from 'lodash'; +import { FILTER_OPTIONS } from '../../../../common/constants/explorer'; +import { PanelTitle } from '../../trace_analytics/components/common/helper_functions'; export function IntegrationFields(props: any) { - const data = props.data.data.fields || [] + const data = props.data.data.fields || []; const search = { box: { @@ -33,9 +39,7 @@ export function IntegrationFields(props: any) { sortable: true, truncateText: true, render: (value, record) => ( - + {_.truncate(record.name, { length: 100 })} ), @@ -64,23 +68,21 @@ export function IntegrationFields(props: any) { }, ] as Array>; - - return ( - + + itemId="id" + loading={false} + items={data} + columns={tableColumns} + pagination={{ + initialPageSize: 10, + pageSizeOptions: [5, 10, 15], + }} + search={search} + /> ); } diff --git a/public/components/placeholder/components/integration_header.tsx b/public/components/integrations/components/integration_header.tsx similarity index 100% rename from public/components/placeholder/components/integration_header.tsx rename to public/components/integrations/components/integration_header.tsx diff --git a/public/components/placeholder/components/integration_overview_panel.tsx b/public/components/integrations/components/integration_overview_panel.tsx similarity index 97% rename from public/components/placeholder/components/integration_overview_panel.tsx rename to public/components/integrations/components/integration_overview_panel.tsx index be8c0411b1..57d778d471 100644 --- a/public/components/placeholder/components/integration_overview_panel.tsx +++ b/public/components/integrations/components/integration_overview_panel.tsx @@ -19,11 +19,11 @@ const pageStyles: CSS.Properties = { }; export function IntegrationOverview(props: any) { - const {data} = props; + const { data } = props; return ( React Logo - + diff --git a/public/components/placeholder/components/integration_side_nav.tsx b/public/components/integrations/components/integration_side_nav.tsx similarity index 94% rename from public/components/placeholder/components/integration_side_nav.tsx rename to public/components/integrations/components/integration_side_nav.tsx index 71d2cda6d9..c99bb5d66e 100644 --- a/public/components/placeholder/components/integration_side_nav.tsx +++ b/public/components/integrations/components/integration_side_nav.tsx @@ -20,7 +20,7 @@ import React from 'react'; // import { uiSettingsService } from '../../../common/utils'; export const Sidebar = (props: { children: React.ReactNode }) => { - const items = [ + const sidebarItems = [ { name: 'Integrations', id: 0, @@ -61,7 +61,8 @@ export const Sidebar = (props: { children: React.ReactNode }) => { } return initial && setIsSelected(items, hash, false, !reverse); } - setIsSelected(items, location.hash); + + setIsSelected(sidebarItems, location.hash); return ( @@ -73,7 +74,7 @@ export const Sidebar = (props: { children: React.ReactNode }) => { gutterSize="none" > - + diff --git a/public/components/placeholder/home.tsx b/public/components/integrations/home.tsx similarity index 100% rename from public/components/placeholder/home.tsx rename to public/components/integrations/home.tsx diff --git a/public/components/placeholder/components/added_integration.tsx b/public/components/placeholder/components/added_integration.tsx deleted file mode 100644 index 16b917d944..0000000000 --- a/public/components/placeholder/components/added_integration.tsx +++ /dev/null @@ -1,463 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ -/* eslint-disable react-hooks/exhaustive-deps */ - -import { - EuiButton, - EuiFlexGroup, - EuiFlexItem, - EuiGlobalToastList, - EuiHorizontalRule, - EuiIcon, - EuiInMemoryTable, - EuiLink, - EuiOverlayMask, - EuiPage, - EuiPageBody, - EuiPageContent, - EuiPageContentHeaderSection, - EuiPageHeader, - EuiPageHeaderSection, - EuiPanel, - EuiSelectOption, - EuiSpacer, - EuiTabbedContent, - EuiTabbedContentTab, - EuiTableFieldDataColumnType, - EuiText, - EuiTitle, - } from '@elastic/eui'; - import DSLService from 'public/services/requests/dsl'; - import PPLService from 'public/services/requests/ppl'; - import SavedObjects from 'public/services/saved_objects/event_analytics/saved_objects'; - import TimestampUtils from 'public/services/timestamp/timestamp'; - import React, { ReactChild, useEffect, useState } from 'react'; - import { useHistory } from 'react-router-dom'; - import { useDispatch } from 'react-redux'; - import { last } from 'lodash'; - import { VisualizationType } from 'common/types/custom_panels'; - import { Toast } from '@elastic/eui/src/components/toast/global_toast_list'; - import { TracesContent } from '../../trace_analytics/components/traces/traces_content'; - import { DashboardContent } from '../../trace_analytics/components/dashboard/dashboard_content'; - import { ServicesContent } from '../../trace_analytics/components/services/services_content'; - import { filtersToDsl, PanelTitle } from '../../trace_analytics/components/common/helper_functions'; - import { SpanDetailTable } from '../../trace_analytics/components/traces/span_detail_table'; - import { Explorer } from '../../event_analytics/explorer/explorer'; - // import { Configuration } from './configuration'; - import { - TAB_CONFIG_ID, - TAB_CONFIG_TITLE, - TAB_LOG_ID, - TAB_LOG_TITLE, - TAB_OVERVIEW_ID, - TAB_OVERVIEW_TITLE, - TAB_PANEL_ID, - TAB_PANEL_TITLE, - TAB_SERVICE_ID, - TAB_SERVICE_TITLE, - TAB_TRACE_ID, - TAB_TRACE_TITLE, - } from '../../../../common/constants/application_analytics'; - import { TAB_EVENT_ID, TAB_CHART_ID, NEW_TAB, FILTER_OPTIONS } from '../../../../common/constants/explorer'; - import { IQueryTab } from '../../../../common/types/explorer'; - import { NotificationsStart } from '../../../../../../src/core/public'; - import { AppAnalyticsComponentDeps } from '../home'; - import { - ApplicationRequestType, - ApplicationType, - } from '../../../../common/types/application_analytics'; - import { QueryManager } from '../../../../common/query_manager/ppl_query_manager'; - import { IntegrationOverview } from './integration_overview_panel'; - import { IntegrationDetails } from './integration_details_panel'; - import { IntegrationFields } from './integration_fields_panel'; - import { IntegrationAssets } from './integration_assets_panel'; - import { getAddIntegrationModal } from './add_integration_modal'; - import { OBSERVABILITY_BASE } from '../../../../common/constants/shared'; -import _ from 'lodash'; -import { DeleteModal } from '../../../../public/components/common/helpers/delete_modal'; - - const searchBarConfigs = { - [TAB_EVENT_ID]: { - showSaveButton: false, - showSavePanelOptionsList: false, - }, - [TAB_CHART_ID]: { - showSaveButton: true, - showSavePanelOptionsList: false, - }, - }; - - interface AppDetailProps extends AppAnalyticsComponentDeps { - disabled?: boolean; - appId: string; - pplService: PPLService; - dslService: DSLService; - savedObjects: SavedObjects; - timestampUtils: TimestampUtils; - notifications: NotificationsStart; - queryManager: QueryManager; - updateApp: (appId: string, updateAppData: Partial, type: string) => void; - callback: (childfunction: () => void) => void; - } - - export function AddedIntegration(props: AppDetailProps) { - const { - pplService, - dslService, - timestampUtils, - savedObjects, - http, - notifications, - appId, - chrome, - parentBreadcrumbs, - query, - filters, - appConfigs, - updateApp, - setAppConfigs, - setFilters, - callback, - queryManager, - mode, - } = props; - const [application, setApplication] = useState({ - id: '', - dateCreated: '', - dateModified: '', - name: '', - description: '', - baseQuery: '', - servicesEntities: [], - traceGroups: [], - panelId: '', - availability: { name: '', color: '', availabilityVisId: '' }, - }); - - const [toasts, setToasts] = useState([]); - const [data, setData] = useState({ data: {} }); - - useEffect(() => { - chrome.setBreadcrumbs([ - ...parentBreadcrumbs, - { - text: 'Placeholder', - href: '#/placeholder', - }, - { - text: 'Added Integration', - href: '#/added' - }, - { - text: appId, - href: `${last(parentBreadcrumbs)!.href}placeholder/added/${appId}`, - }, - ]); - handleDataRequest(); - }, [appId]); - - const [isModalVisible, setIsModalVisible] = useState(false); - const [modalLayout, setModalLayout] = useState(); - - const getModal = () => { - setModalLayout( - {setIsModalVisible(false)}} - onCancel={() => {setIsModalVisible(false)}} - title={`Delete Assets`} - message={`Are you sure you want to delete the selected asset(s)?`} - /> - ) - setIsModalVisible(true); - }; - - - async function handleDataRequest() { - http.get(`${OBSERVABILITY_BASE}/store/id`).then((exists) => setData(exists)); - } - - const setToast = (title: string, color = 'success', text?: ReactChild) => { - if (!text) text = ''; - setToasts([...toasts, { id: new Date().toISOString(), title, text, color } as Toast]); - }; - - async function addIntegrationRequest(name: string) { - http - .post(`${OBSERVABILITY_BASE}/store`) - .then((res) => { - setToast( - `${name} integration successfully added!`, - 'success', - `View the added assets from ${name} in the Added Integrations list` - ); - }) - .catch((err) => - setToast( - 'Failed to load integration. Check Added Integrations table for more details', - 'danger', - ) - ); - } - - function AddedOverview(props: any) { - const {data} = props; - - return ( - - - - - - - - - {data.data.id} - - - - - { - getModal(); - }} - > - Delete - - - - - - - - -

Template

-
- - - {data.data.templateName} - -
- - -

Date Added

-
- - {data.data.creationDate?.split('T')[0]} -
- - -

Status

-
- - {data.data.status} -
- - -

Added By

-
- - - {data.data.author} - -
- - -

Tags

-
- - {data.data.license} -
-
-
-
- ); - } - - function AddedAssets(props: any) { - - const data = props.data.data.assets || [] - - const search = { - box: { - incremental: true, - }, - filters: [ - { - type: 'field_value_selection', - field: 'type', - name: 'Type', - multiSelect: false, - options: FILTER_OPTIONS.map((i) => ({ - value: i, - name: i, - view: i, - })), - }, - ], - }; - - const tableColumns = [ - { - field: 'name', - name: 'Name', - sortable: true, - truncateText: true, - render: (value, record) => ( - - {_.truncate(record.name, { length: 100 })} - - ), - }, - { - field: 'type', - name: 'Type', - sortable: true, - truncateText: true, - render: (value, record) => ( - - {_.truncate(record.type, { length: 100 })} - - ), - }, - { - field: 'actions', - name: 'Actions', - sortable: true, - truncateText: true, - render: (value, record) => ( - {getModal()}}/> - ), - }, - ] as Array>; - - - - return ( - - - - - - ); - } - - function AddedIntegrationFields(props: any) { - const data = props.data.data.fields || [] - - const search = { - box: { - incremental: true, - }, - filters: [ - { - type: 'field_value_selection', - field: 'type', - name: 'Type', - multiSelect: false, - options: FILTER_OPTIONS.map((i) => ({ - value: i, - name: i, - view: i, - })), - }, - ], - }; - - const tableColumns = [ - { - field: 'name', - name: 'Name', - sortable: true, - truncateText: true, - render: (value, record) => ( - - {_.truncate(record.name, { length: 100 })} - - ), - }, - { - field: 'type', - name: 'Type', - sortable: true, - truncateText: true, - render: (value, record) => ( - - {_.truncate(record.type, { length: 100 })} - - ), - }, - { - field: 'category', - name: 'Category', - sortable: true, - truncateText: true, - render: (value, record) => ( - - {_.truncate(record.category, { length: 100 })} - - ), - }, - ] as Array>; - - - - return ( - - - - - - ); - } - - - return ( - - { - setToasts(toasts.filter((toast) => toast.id !== removedToast.id)); - }} - toastLifeTimeMs={6000} - /> - - - {AddedOverview({data})} - - {AddedAssets({ data })} - - {AddedIntegrationFields({ data })} - - - {isModalVisible && modalLayout} - - ); - } - \ No newline at end of file diff --git a/public/components/placeholder/components/integration_details_panel.tsx b/public/components/placeholder/components/integration_details_panel.tsx deleted file mode 100644 index 727b96aac7..0000000000 --- a/public/components/placeholder/components/integration_details_panel.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import { - EuiButton, - EuiFlexGroup, - EuiLink, - EuiPageHeader, - EuiPageHeaderSection, - EuiPanel, - EuiSpacer, - EuiTitle, - EuiFlexItem, - EuiText, - EuiPageContentHeaderSection, -} from '@elastic/eui'; -import React from 'react'; -import { PanelTitle } from '../../../../public/components/trace_analytics/components/common/helper_functions'; - -export function IntegrationDetails(props: any) { - let screenshots = undefined; - if (props.data.data.screenshotUrls) { - screenshots = Object.values(props.data.data.screenshotUrls) - } - - - - return ( - - - - - NginX [pronounced "Engine X"] is an HTTP and reverse proxy server that emphasizes high concurrency, performance, and low memory usage. Nginx can also act as a mail proxy server and a generic TCP proxy server. Nginx is available as open source and in a commercial version (NginX Plus). -As Nginx is a high-speed, lightweight HTTP server engine, more and more web sites and applications are moving to Nginx. According to W3Techs, over 25 percent of all known web servers use Nginx. The performance improvements for serving static content can be significant. Especially at high loads, Nginx is faster than other solutions and consumes less server resources. - - - - - - {screenshots?.map((i, v) => { - return ( - - - - ); - })} - - - - - ); -} diff --git a/server/adaptors/placeholder/__data__/repository.json b/server/adaptors/integrations/__data__/repository.json similarity index 100% rename from server/adaptors/placeholder/__data__/repository.json rename to server/adaptors/integrations/__data__/repository.json diff --git a/server/adaptors/placeholder/__tests__/test.ndjson b/server/adaptors/integrations/__tests__/test.ndjson similarity index 100% rename from server/adaptors/placeholder/__tests__/test.ndjson rename to server/adaptors/integrations/__tests__/test.ndjson diff --git a/server/adaptors/placeholder/__tests__/utils.test.ts b/server/adaptors/integrations/__tests__/utils.test.ts similarity index 100% rename from server/adaptors/placeholder/__tests__/utils.test.ts rename to server/adaptors/integrations/__tests__/utils.test.ts diff --git a/server/adaptors/placeholder/placeholder_adaptor.ts b/server/adaptors/integrations/integrations_adaptor.ts similarity index 92% rename from server/adaptors/placeholder/placeholder_adaptor.ts rename to server/adaptors/integrations/integrations_adaptor.ts index f253030333..f1e934a397 100644 --- a/server/adaptors/placeholder/placeholder_adaptor.ts +++ b/server/adaptors/integrations/integrations_adaptor.ts @@ -5,7 +5,7 @@ import { SavedObjectsBulkCreateObject } from '../../../../../src/core/server'; -export interface PlaceholderAdaptor { +export interface IntegrationsAdaptor { getIntegrationTemplates: ( query?: IntegrationTemplateQuery ) => Promise; diff --git a/server/adaptors/placeholder/placeholder_java_backend.ts b/server/adaptors/integrations/integrations_java_backend.ts similarity index 92% rename from server/adaptors/placeholder/placeholder_java_backend.ts rename to server/adaptors/integrations/integrations_java_backend.ts index 4a2bb5d106..0e1a82b63c 100644 --- a/server/adaptors/placeholder/placeholder_java_backend.ts +++ b/server/adaptors/integrations/integrations_java_backend.ts @@ -3,9 +3,9 @@ import { ILegacyScopedClusterClient, SavedObjectsBulkCreateObject, } from '../../../../../src/core/server'; -import { PlaceholderAdaptor } from './placeholder_adaptor'; +import { IntegrationsAdaptor } from './integrations_adaptor'; -export class PlaceholderJavaBackend implements PlaceholderAdaptor { +export class IntegrationsJavaBackend implements IntegrationsAdaptor { client: ILegacyScopedClusterClient; constructor(client: ILegacyScopedClusterClient) { diff --git a/server/adaptors/placeholder/placeholder_kibana_backend.ts b/server/adaptors/integrations/integrations_kibana_backend.ts similarity index 91% rename from server/adaptors/placeholder/placeholder_kibana_backend.ts rename to server/adaptors/integrations/integrations_kibana_backend.ts index 0bc4d1a2bc..a20bac9d38 100644 --- a/server/adaptors/placeholder/placeholder_kibana_backend.ts +++ b/server/adaptors/integrations/integrations_kibana_backend.ts @@ -1,5 +1,5 @@ -import { promises as fs } from 'fs'; -import { PlaceholderAdaptor } from './placeholder_adaptor'; +import * as fs from 'fs'; +import { IntegrationsAdaptor } from './integrations_adaptor'; import { SavedObjectsBulkCreateObject } from '../../../../../src/core/public'; import { SavedObjectsClientContract } from '../../../../../src/core/server/types'; import { readNDJsonObjects } from './utils'; @@ -27,7 +27,7 @@ const store: IntegrationInstance[] = [ ]; const readRepository = async (): Promise => { - const buffer = await fs.readFile(__dirname + '/__data__/repository.json', 'utf-8'); + const buffer = await fs.promises.readFile(__dirname + '/__data__/repository.json', 'utf-8'); try { repository = JSON.parse(buffer); return Promise.resolve(); @@ -36,7 +36,7 @@ const readRepository = async (): Promise => { } }; -export class PlaceholderKibanaBackend implements PlaceholderAdaptor { +export class IntegrationsKibanaBackend implements IntegrationsAdaptor { client: SavedObjectsClientContract; constructor(client: SavedObjectsClientContract) { diff --git a/server/adaptors/placeholder/types.ts b/server/adaptors/integrations/types.ts similarity index 100% rename from server/adaptors/placeholder/types.ts rename to server/adaptors/integrations/types.ts diff --git a/server/adaptors/placeholder/utils.ts b/server/adaptors/integrations/utils.ts similarity index 100% rename from server/adaptors/placeholder/utils.ts rename to server/adaptors/integrations/utils.ts diff --git a/server/common/metrics/constants.ts b/server/common/metrics/constants.ts index 4e7eaf6460..1c7cbabb81 100644 --- a/server/common/metrics/constants.ts +++ b/server/common/metrics/constants.ts @@ -17,7 +17,7 @@ export const COMPONENTS = [ 'notebooks', 'trace_analytics', 'metrics_analytics', - 'placeholder', + 'integrations', ] as const; export const REQUESTS = ['create', 'get', 'update', 'delete'] as const; diff --git a/server/routes/index.ts b/server/routes/index.ts index 885efa9b40..6c598680ac 100644 --- a/server/routes/index.ts +++ b/server/routes/index.ts @@ -20,7 +20,10 @@ import { registerSqlRoute } from './notebooks/sqlRouter'; import { registerEventAnalyticsRouter } from './event_analytics/event_analytics_router'; import { registerAppAnalyticsRouter } from './application_analytics/app_analytics_router'; import { registerMetricsRoute } from './metrics/metrics_rounter'; -import { registerPlaceholderRoute } from './placeholder/placeholder_router'; +import { + registerIntegrationsRoute, + registerPlaceholderRoute, +} from './placeholder/integrations_router'; export function setupRoutes({ router, client }: { router: IRouter; client: ILegacyClusterClient }) { PanelsRouter(router); @@ -41,5 +44,5 @@ export function setupRoutes({ router, client }: { router: IRouter; client: ILega registerSqlRoute(router, queryService); registerMetricsRoute(router); - registerPlaceholderRoute(router); + registerIntegrationsRoute(router); } diff --git a/server/routes/placeholder/__tests__/placeholder_router.test.ts b/server/routes/integrations/__tests__/integrations_router.test.ts similarity index 83% rename from server/routes/placeholder/__tests__/placeholder_router.test.ts rename to server/routes/integrations/__tests__/integrations_router.test.ts index bf8f0f6338..e4fd5753a6 100644 --- a/server/routes/placeholder/__tests__/placeholder_router.test.ts +++ b/server/routes/integrations/__tests__/integrations_router.test.ts @@ -5,15 +5,15 @@ import { RequestHandlerContext, } from '../../../../../../src/core/server'; import { OpenSearchDashboardsResponseFactory } from '../../../../../../src/core/server/http/router'; -import { handleWithCallback } from '../placeholder_router'; -import { PlaceholderAdaptor } from 'server/adaptors/placeholder/placeholder_adaptor'; +import { handleWithCallback } from '../integrations_router'; +import { IntegrationsAdaptor } from 'server/adaptors/placeholder/integrations_adaptor'; jest .mock('../../../../../../src/core/server', () => jest.fn()) .mock('../../../../../../src/core/server/http/router', () => jest.fn()); describe('Data wrapper', () => { - const adaptorMock: Partial = {}; + const adaptorMock: Partial = {}; const responseMock: DeepPartial = { custom: jest.fn((data) => data), ok: jest.fn((data) => data), @@ -24,7 +24,7 @@ describe('Data wrapper', () => { return { test: 'data' }; }); const result = await handleWithCallback( - adaptorMock as PlaceholderAdaptor, + adaptorMock as IntegrationsAdaptor, responseMock as OpenSearchDashboardsResponseFactory, callback ); @@ -39,7 +39,7 @@ describe('Data wrapper', () => { throw new Error('test error'); }); const result = await handleWithCallback( - adaptorMock as PlaceholderAdaptor, + adaptorMock as IntegrationsAdaptor, responseMock as OpenSearchDashboardsResponseFactory, callback ); diff --git a/server/routes/placeholder/placeholder_router.ts b/server/routes/integrations/integrations_router.ts similarity index 75% rename from server/routes/placeholder/placeholder_router.ts rename to server/routes/integrations/integrations_router.ts index 34cbcc7ded..9fe1dfc47d 100644 --- a/server/routes/placeholder/placeholder_router.ts +++ b/server/routes/integrations/integrations_router.ts @@ -7,34 +7,34 @@ import fetch from 'node-fetch'; import * as fs from 'fs'; import { IRouter, RequestHandlerContext } from '../../../../../src/core/server'; import { INTEGRATIONS_BASE, OBSERVABILITY_BASE } from '../../../common/constants/shared'; -import { PlaceholderAdaptor } from '../../../server/adaptors/placeholder/placeholder_adaptor'; +import { IntegrationsAdaptor } from '../../adaptors/integrations/integrations_adaptor'; import { OpenSearchDashboardsRequest, OpenSearchDashboardsResponseFactory, } from '../../../../../src/core/server/http/router'; import { SavedObjectsBulkCreateObject } from '../../../../../src/core/public'; -import { PlaceholderKibanaBackend } from '../../../server/adaptors/placeholder/placeholder_kibana_backend'; +import { IntegrationsKibanaBackend } from '../../adaptors/integrations/integrations_kibana_backend'; let added = false; /** * Handle an `OpenSearchDashboardsRequest` using the provided `callback` function. * This is a convenience method that handles common error handling and response formatting. - * The callback must accept a `PlaceholderAdaptor` as its first argument. + * The callback must accept a `IntegrationsAdaptor` as its first argument. * * If the callback throws an error, * the `OpenSearchDashboardsResponse` will be formatted using the error's `statusCode` and `message` properties. * Otherwise, the callback's return value will be formatted in a JSON object under the `data` field. * - * @param {PlaceholderAdaptor} adaptor The adaptor instance to use for making requests. + * @param {IntegrationsAdaptor} adaptor The adaptor instance to use for making requests. * @param {OpenSearchDashboardsResponseFactory} response The factory to use for creating responses. * @callback callback A callback that will invoke a request on a provided adaptor. * @returns {Promise} An `OpenSearchDashboardsResponse` with the return data from the callback. */ export const handleWithCallback = async ( - adaptor: PlaceholderAdaptor, + adaptor: IntegrationsAdaptor, response: OpenSearchDashboardsResponseFactory, - callback: (a: PlaceholderAdaptor) => any + callback: (a: IntegrationsAdaptor) => any ): Promise => { try { const data = await callback(adaptor); @@ -56,11 +56,11 @@ export const handleWithCallback = async ( const getAdaptor = ( context: RequestHandlerContext, _request: OpenSearchDashboardsRequest -): PlaceholderAdaptor => { - return new PlaceholderKibanaBackend(context.core.savedObjects.client); +): IntegrationsAdaptor => { + return new IntegrationsKibanaBackend(context.core.savedObjects.client); }; -export function registerPlaceholderRoute(router: IRouter) { +export function registerIntegrationsRoute(router: IRouter) { router.get( { path: `${INTEGRATIONS_BASE}/repository`, @@ -68,7 +68,7 @@ export function registerPlaceholderRoute(router: IRouter) { }, async (context, request, response): Promise => { const adaptor = getAdaptor(context, request); - return handleWithCallback(adaptor, response, async (a: PlaceholderAdaptor) => { + return handleWithCallback(adaptor, response, async (a: IntegrationsAdaptor) => { return await a.getIntegrationTemplates(); }); } @@ -81,7 +81,7 @@ export function registerPlaceholderRoute(router: IRouter) { }, async (context, request, response): Promise => { const adaptor = getAdaptor(context, request); - return handleWithCallback(adaptor, response, async (a: PlaceholderAdaptor) => { + return handleWithCallback(adaptor, response, async (a: IntegrationsAdaptor) => { const assets = await a.getAssets('nginx'); added = true; return context.core.savedObjects.client.bulkCreate(assets); @@ -95,9 +95,9 @@ export function registerPlaceholderRoute(router: IRouter) { validate: false, }, async (context, request, response): Promise => { - const adaptor = getAdaptor(context, request) as PlaceholderAdaptor; - return handleWithCallback(adaptor, response, async (a: PlaceholderAdaptor) => { - const unwrapped = a as PlaceholderKibanaBackend; + const adaptor = getAdaptor(context, request) as IntegrationsAdaptor; + return handleWithCallback(adaptor, response, async (a: IntegrationsAdaptor) => { + const unwrapped = a as IntegrationsKibanaBackend; await unwrapped.loadRepository(); return {}; }); @@ -111,7 +111,7 @@ export function registerPlaceholderRoute(router: IRouter) { }, async (context, request, response): Promise => { const adaptor = getAdaptor(context, request); - return handleWithCallback(adaptor, response, async (_a: PlaceholderAdaptor) => { + return handleWithCallback(adaptor, response, async (_a: IntegrationsAdaptor) => { return (await fetch('http://127.0.0.1:4010/repository/id', {})).json(); }); } @@ -124,7 +124,7 @@ export function registerPlaceholderRoute(router: IRouter) { }, async (context, request, response): Promise => { const adaptor = getAdaptor(context, request); - return handleWithCallback(adaptor, response, async (_a: PlaceholderAdaptor) => { + return handleWithCallback(adaptor, response, async (_a: IntegrationsAdaptor) => { return (await fetch('http://127.0.0.1:4010/store?limit=24', {})).json(); }); } @@ -137,7 +137,7 @@ export function registerPlaceholderRoute(router: IRouter) { }, async (context, request, response): Promise => { const adaptor = getAdaptor(context, request); - return handleWithCallback(adaptor, response, async (a: PlaceholderAdaptor) => { + return handleWithCallback(adaptor, response, async (a: IntegrationsAdaptor) => { return await a.getIntegrationTemplates(); }); } @@ -150,7 +150,7 @@ export function registerPlaceholderRoute(router: IRouter) { }, async (context, request, response): Promise => { const adaptor = getAdaptor(context, request); - return handleWithCallback(adaptor, response, async (a: PlaceholderAdaptor) => { + return handleWithCallback(adaptor, response, async (a: IntegrationsAdaptor) => { return await a.getIntegrationInstances({ added, }); From e49ddd8420950caff9329982bf5397c8ec29b618 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Mon, 22 May 2023 10:50:40 -0700 Subject: [PATCH 053/190] Perform minor code maintenance Signed-off-by: Simeon Widdis --- public/components/common/side_nav.tsx | 2 +- .../components/add_integration_modal.tsx | 1 - .../components/added_integration.tsx | 47 ++-------------- .../added_integration_overview_page.tsx | 11 ++-- .../components/added_integration_table.tsx | 2 +- .../available_integration_card_view.tsx | 54 +------------------ .../available_integration_overview_page.tsx | 9 ++-- .../available_integration_table.tsx | 36 +------------ .../integrations/components/integration.tsx | 48 ++--------------- .../components/integration_assets_panel.tsx | 1 - .../components/integration_card.tsx | 24 +-------- .../components/integration_details_panel.tsx | 14 +---- .../components/integration_overview_panel.tsx | 2 - .../components/integration_side_nav.tsx | 2 - server/routes/index.ts | 5 +- .../__tests__/integrations_router.test.ts | 7 +-- .../integrations/integrations_router.ts | 1 - 17 files changed, 25 insertions(+), 241 deletions(-) diff --git a/public/components/common/side_nav.tsx b/public/components/common/side_nav.tsx index 6c54fb9dd3..16e60983b3 100644 --- a/public/components/common/side_nav.tsx +++ b/public/components/common/side_nav.tsx @@ -96,7 +96,7 @@ export function ObservabilitySideBar(props: { children: React.ReactNode }) { { name: 'Placeholder', id: 7, - href: '#/placeholder', + href: '#/integrations', }, ], }, diff --git a/public/components/integrations/components/add_integration_modal.tsx b/public/components/integrations/components/add_integration_modal.tsx index 82a5d2f857..ff0d9d890c 100644 --- a/public/components/integrations/components/add_integration_modal.tsx +++ b/public/components/integrations/components/add_integration_modal.tsx @@ -17,7 +17,6 @@ import { EuiFieldText, EuiButton, } from '@elastic/eui'; -import { string } from 'joi'; /* * "CustomInputModalProps" component is used to create a modal with an input filed diff --git a/public/components/integrations/components/added_integration.tsx b/public/components/integrations/components/added_integration.tsx index 0d892343e8..cb2d672b09 100644 --- a/public/components/integrations/components/added_integration.tsx +++ b/public/components/integrations/components/added_integration.tsx @@ -9,22 +9,17 @@ import { EuiFlexGroup, EuiFlexItem, EuiGlobalToastList, - EuiHorizontalRule, EuiIcon, EuiInMemoryTable, EuiLink, EuiOverlayMask, EuiPage, EuiPageBody, - EuiPageContent, EuiPageContentHeaderSection, EuiPageHeader, EuiPageHeaderSection, EuiPanel, - EuiSelectOption, EuiSpacer, - EuiTabbedContent, - EuiTabbedContentTab, EuiTableFieldDataColumnType, EuiText, EuiTitle, @@ -34,40 +29,11 @@ import PPLService from 'public/services/requests/ppl'; import SavedObjects from 'public/services/saved_objects/event_analytics/saved_objects'; import TimestampUtils from 'public/services/timestamp/timestamp'; import React, { ReactChild, useEffect, useState } from 'react'; -import { useHistory } from 'react-router-dom'; -import { useDispatch } from 'react-redux'; import { last } from 'lodash'; -import { VisualizationType } from 'common/types/custom_panels'; import { Toast } from '@elastic/eui/src/components/toast/global_toast_list'; import _ from 'lodash'; -import { TracesContent } from '../../trace_analytics/components/traces/traces_content'; -import { DashboardContent } from '../../trace_analytics/components/dashboard/dashboard_content'; -import { ServicesContent } from '../../trace_analytics/components/services/services_content'; -import { filtersToDsl, PanelTitle } from '../../trace_analytics/components/common/helper_functions'; -import { SpanDetailTable } from '../../trace_analytics/components/traces/span_detail_table'; -import { Explorer } from '../../event_analytics/explorer/explorer'; -// import { Configuration } from './configuration'; -import { - TAB_CONFIG_ID, - TAB_CONFIG_TITLE, - TAB_LOG_ID, - TAB_LOG_TITLE, - TAB_OVERVIEW_ID, - TAB_OVERVIEW_TITLE, - TAB_PANEL_ID, - TAB_PANEL_TITLE, - TAB_SERVICE_ID, - TAB_SERVICE_TITLE, - TAB_TRACE_ID, - TAB_TRACE_TITLE, -} from '../../../../common/constants/application_analytics'; -import { - TAB_EVENT_ID, - TAB_CHART_ID, - NEW_TAB, - FILTER_OPTIONS, -} from '../../../../common/constants/explorer'; -import { IQueryTab } from '../../../../common/types/explorer'; +import { PanelTitle } from '../../trace_analytics/components/common/helper_functions'; +import { TAB_EVENT_ID, TAB_CHART_ID, FILTER_OPTIONS } from '../../../../common/constants/explorer'; import { NotificationsStart } from '../../../../../../src/core/public'; import { AppAnalyticsComponentDeps } from '../home'; import { @@ -75,11 +41,6 @@ import { ApplicationType, } from '../../../../common/types/application_analytics'; import { QueryManager } from '../../../../common/query_manager/ppl_query_manager'; -import { IntegrationOverview } from './integration_overview_panel'; -import { IntegrationDetails } from './integration_details_panel'; -import { IntegrationFields } from './integration_fields_panel'; -import { IntegrationAssets } from './integration_assets_panel'; -import { getAddIntegrationModal } from './add_integration_modal'; import { OBSERVABILITY_BASE } from '../../../../common/constants/shared'; import { DeleteModal } from '../../common/helpers/delete_modal'; @@ -149,7 +110,7 @@ export function AddedIntegration(props: AppDetailProps) { ...parentBreadcrumbs, { text: 'Placeholder', - href: '#/placeholder', + href: '#/integrations', }, { text: 'Added Integration', @@ -157,7 +118,7 @@ export function AddedIntegration(props: AppDetailProps) { }, { text: appId, - href: `${last(parentBreadcrumbs)!.href}placeholder/added/${appId}`, + href: `${last(parentBreadcrumbs)!.href}integrations/added/${appId}`, }, ]); handleDataRequest(); diff --git a/public/components/integrations/components/added_integration_overview_page.tsx b/public/components/integrations/components/added_integration_overview_page.tsx index 7eb7c8fafb..b1331314df 100644 --- a/public/components/integrations/components/added_integration_overview_page.tsx +++ b/public/components/integrations/components/added_integration_overview_page.tsx @@ -4,15 +4,14 @@ */ /* eslint-disable react-hooks/exhaustive-deps */ -import { EuiPage, EuiPageBody, EuiSpacer } from '@elastic/eui'; +import { EuiPage, EuiPageBody } from '@elastic/eui'; import _ from 'lodash'; -import React, { ReactElement, useEffect, useState } from 'react'; +import React, { useEffect, useState } from 'react'; import { AppAnalyticsComponentDeps } from '../home'; import { ApplicationType } from '../../../../common/types/application_analytics'; import { IntegrationHeader } from './integration_header'; -import { AvailableIntegrationsTable } from './available_integration_table'; import { AddedIntegrationsTable } from './added_integration_table'; -import { INTEGRATIONS_BASE, OBSERVABILITY_BASE } from '../../../../common/constants/shared'; +import { INTEGRATIONS_BASE } from '../../../../common/constants/shared'; export interface AppTableProps extends AppAnalyticsComponentDeps { loading: boolean; @@ -47,11 +46,11 @@ export function AddedIntegrationOverviewPage(props: AppTableProps) { ...parentBreadcrumbs, { text: 'Placeholder', - href: '#/placeholder', + href: '#/integrations', }, { text: 'Added Integrations', - href: '#/placeholder/added', + href: '#/integrations/added', }, ]); handleDataRequest(); diff --git a/public/components/integrations/components/added_integration_table.tsx b/public/components/integrations/components/added_integration_table.tsx index 9e4e59d735..9d6b99b7da 100644 --- a/public/components/integrations/components/added_integration_table.tsx +++ b/public/components/integrations/components/added_integration_table.tsx @@ -14,7 +14,7 @@ import { EuiTitle, } from '@elastic/eui'; import _ from 'lodash'; -import React, { ReactElement, useEffect, useState } from 'react'; +import React from 'react'; import { AddedIntegrationsTableProps } from './added_integration_overview_page'; export function AddedIntegrationsTable(props: AddedIntegrationsTableProps) { diff --git a/public/components/integrations/components/available_integration_card_view.tsx b/public/components/integrations/components/available_integration_card_view.tsx index 07882c876c..28594da0de 100644 --- a/public/components/integrations/components/available_integration_card_view.tsx +++ b/public/components/integrations/components/available_integration_card_view.tsx @@ -1,32 +1,6 @@ -import { - EuiButton, - EuiCard, - EuiFlexGrid, - EuiFlexGroup, - EuiFlexItem, - EuiHorizontalRule, - EuiIcon, - EuiPage, - EuiPageBody, - EuiPageContent, - EuiPageHeader, - EuiPageHeaderSection, - EuiPanel, - EuiSelectOption, - EuiSpacer, - EuiTabbedContent, - EuiTabbedContentTab, - EuiText, - EuiTitle, - EuiOverlayMask, -} from '@elastic/eui'; +import { EuiButton, EuiCard, EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui'; import _ from 'lodash'; -import DSLService from 'public/services/requests/dsl'; -import PPLService from 'public/services/requests/ppl'; -import SavedObjects from 'public/services/saved_objects/event_analytics/saved_objects'; -import TimestampUtils from 'public/services/timestamp/timestamp'; -import React, { ReactChild, useEffect, useState } from 'react'; -import { getCustomModal } from '../../custom_panels/helpers/modal_containers'; +import React from 'react'; import { AvailableIntegrationsCardViewProps, AvailableIntegrationType, @@ -35,12 +9,6 @@ import { export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardViewProps) { console.log(props); const rowNumber = _.ceil(props.records / 5); - // console.log(rowNumber) - - // title={feature} - // onClick={() => { - // window.location.assign(`#/placeholder/${feature}`); - // }} const getImage = (url?: string) => { let optionalImg; @@ -52,10 +20,6 @@ export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardVi return optionalImg; }; - // const classes = classNames('homSynopsis__card', { - // 'homSynopsis__card--noPanel': !wrapInPanel, - // }); - const renderRows = (integrations: AvailableIntegrationType[]) => { if (!integrations || !integrations.length) return null; return ( @@ -106,17 +70,3 @@ export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardVi return <>{renderRows(props.data.data?.integrations)}; } - -// Synopsis.propTypes = { -// description: PropTypes.string.isRequired, -// iconUrl: PropTypes.string, -// iconType: PropTypes.string, -// title: PropTypes.string.isRequired, -// url: PropTypes.string, -// onClick: PropTypes.func, -// isBeta: PropTypes.bool, -// }; - -// Synopsis.defaultProps = { -// isBeta: false, -// }; diff --git a/public/components/integrations/components/available_integration_overview_page.tsx b/public/components/integrations/components/available_integration_overview_page.tsx index 956d9e6f6f..ab38ee7ba2 100644 --- a/public/components/integrations/components/available_integration_overview_page.tsx +++ b/public/components/integrations/components/available_integration_overview_page.tsx @@ -7,23 +7,20 @@ import { EuiFlexItem, EuiGlobalToastList, - EuiLink, EuiOverlayMask, EuiPage, EuiPageBody, - EuiSpacer, EuiSwitch, } from '@elastic/eui'; import _ from 'lodash'; -import React, { ReactChild, ReactElement, useEffect, useState } from 'react'; +import React, { ReactChild, useEffect, useState } from 'react'; import { Toast } from '@elastic/eui/src/components/toast/global_toast_list'; import { AppAnalyticsComponentDeps } from '../home'; import { ApplicationType } from '../../../../common/types/application_analytics'; import { IntegrationHeader } from './integration_header'; import { AvailableIntegrationsTable } from './available_integration_table'; -import { AddedIntegrationsTable } from './added_integration_table'; import { AvailableIntegrationsCardView } from './available_integration_card_view'; -import { INTEGRATIONS_BASE, OBSERVABILITY_BASE } from '../../../../common/constants/shared'; +import { INTEGRATIONS_BASE } from '../../../../common/constants/shared'; import { getAddIntegrationModal } from './add_integration_modal'; interface AppTableProps extends AppAnalyticsComponentDeps { @@ -144,7 +141,7 @@ export function AvailableIntegrationOverviewPage(props: AppTableProps) { ...parentBreadcrumbs, { text: 'Placeholder', - href: '#/placeholder', + href: '#/integrations', }, ]); handleDataRequest(); diff --git a/public/components/integrations/components/available_integration_table.tsx b/public/components/integrations/components/available_integration_table.tsx index 501aff457b..487cf07642 100644 --- a/public/components/integrations/components/available_integration_table.tsx +++ b/public/components/integrations/components/available_integration_table.tsx @@ -14,7 +14,7 @@ import { EuiTitle, } from '@elastic/eui'; import _ from 'lodash'; -import React, { ReactElement, useEffect, useState } from 'react'; +import React from 'react'; import { AvailableIntegrationsTableProps } from './available_integration_overview_page'; export function AvailableIntegrationsTable(props: AvailableIntegrationsTableProps) { @@ -95,40 +95,6 @@ export function AvailableIntegrationsTable(props: AvailableIntegrationsTableProp ], }; - // return ( - //
- // - // - // - //

Integrations (2)

- //
- //
- //
- - // - - // - // {features.map((feature) => ( - // - // { - // window.location.assign(`#/placeholder/${feature}`); - // }} - // /> - // - // ))} - // - //
- // ); return ( diff --git a/public/components/integrations/components/integration.tsx b/public/components/integrations/components/integration.tsx index a610da6206..ca0fecaa2a 100644 --- a/public/components/integrations/components/integration.tsx +++ b/public/components/integrations/components/integration.tsx @@ -4,57 +4,15 @@ */ /* eslint-disable react-hooks/exhaustive-deps */ -import { - EuiGlobalToastList, - EuiHorizontalRule, - EuiLink, - EuiOverlayMask, - EuiPage, - EuiPageBody, - EuiPageContent, - EuiPageHeader, - EuiPageHeaderSection, - EuiPanel, - EuiSelectOption, - EuiSpacer, - EuiTabbedContent, - EuiTabbedContentTab, - EuiText, - EuiTitle, -} from '@elastic/eui'; +import { EuiGlobalToastList, EuiOverlayMask, EuiPage, EuiPageBody, EuiSpacer } from '@elastic/eui'; import DSLService from 'public/services/requests/dsl'; import PPLService from 'public/services/requests/ppl'; import SavedObjects from 'public/services/saved_objects/event_analytics/saved_objects'; import TimestampUtils from 'public/services/timestamp/timestamp'; import React, { ReactChild, useEffect, useState } from 'react'; -import { useHistory } from 'react-router-dom'; -import { useDispatch } from 'react-redux'; import { last } from 'lodash'; -import { VisualizationType } from 'common/types/custom_panels'; import { Toast } from '@elastic/eui/src/components/toast/global_toast_list'; -import { TracesContent } from '../../trace_analytics/components/traces/traces_content'; -import { DashboardContent } from '../../trace_analytics/components/dashboard/dashboard_content'; -import { ServicesContent } from '../../trace_analytics/components/services/services_content'; -import { filtersToDsl, PanelTitle } from '../../trace_analytics/components/common/helper_functions'; -import { SpanDetailTable } from '../../trace_analytics/components/traces/span_detail_table'; -import { Explorer } from '../../event_analytics/explorer/explorer'; -// import { Configuration } from './configuration'; -import { - TAB_CONFIG_ID, - TAB_CONFIG_TITLE, - TAB_LOG_ID, - TAB_LOG_TITLE, - TAB_OVERVIEW_ID, - TAB_OVERVIEW_TITLE, - TAB_PANEL_ID, - TAB_PANEL_TITLE, - TAB_SERVICE_ID, - TAB_SERVICE_TITLE, - TAB_TRACE_ID, - TAB_TRACE_TITLE, -} from '../../../../common/constants/application_analytics'; import { TAB_EVENT_ID, TAB_CHART_ID, NEW_TAB } from '../../../../common/constants/explorer'; -import { IQueryTab } from '../../../../common/types/explorer'; import { NotificationsStart } from '../../../../../../src/core/public'; import { AppAnalyticsComponentDeps } from '../home'; import { @@ -161,11 +119,11 @@ export function Integration(props: AppDetailProps) { ...parentBreadcrumbs, { text: 'Placeholder', - href: '#/placeholder', + href: '#/integrations', }, { text: appId, - href: `${last(parentBreadcrumbs)!.href}placeholder/${appId}`, + href: `${last(parentBreadcrumbs)!.href}integrations/${appId}`, }, ]); handleDataRequest(); diff --git a/public/components/integrations/components/integration_assets_panel.tsx b/public/components/integrations/components/integration_assets_panel.tsx index d1faf06364..30c3eea940 100644 --- a/public/components/integrations/components/integration_assets_panel.tsx +++ b/public/components/integrations/components/integration_assets_panel.tsx @@ -1,6 +1,5 @@ import { EuiInMemoryTable, - EuiLink, EuiPanel, EuiSpacer, EuiTableFieldDataColumnType, diff --git a/public/components/integrations/components/integration_card.tsx b/public/components/integrations/components/integration_card.tsx index cb88c176a1..b5415565c3 100644 --- a/public/components/integrations/components/integration_card.tsx +++ b/public/components/integrations/components/integration_card.tsx @@ -1,25 +1,5 @@ -import { - EuiButton, - EuiCard, - EuiHorizontalRule, - EuiIcon, - EuiPage, - EuiPageBody, - EuiPageHeader, - EuiPageHeaderSection, - EuiPanel, - EuiSelectOption, - EuiSpacer, - EuiTabbedContent, - EuiTabbedContentTab, - EuiText, - EuiTitle, -} from '@elastic/eui'; -import DSLService from 'public/services/requests/dsl'; -import PPLService from 'public/services/requests/ppl'; -import SavedObjects from 'public/services/saved_objects/event_analytics/saved_objects'; -import TimestampUtils from 'public/services/timestamp/timestamp'; -import React, { ReactChild, useEffect, useState } from 'react'; +import { EuiButton, EuiCard, EuiIcon } from '@elastic/eui'; +import React from 'react'; export function Synopsis({ id, diff --git a/public/components/integrations/components/integration_details_panel.tsx b/public/components/integrations/components/integration_details_panel.tsx index 165a166914..955ec6a062 100644 --- a/public/components/integrations/components/integration_details_panel.tsx +++ b/public/components/integrations/components/integration_details_panel.tsx @@ -1,16 +1,4 @@ -import { - EuiButton, - EuiFlexGroup, - EuiLink, - EuiPageHeader, - EuiPageHeaderSection, - EuiPanel, - EuiSpacer, - EuiTitle, - EuiFlexItem, - EuiText, - EuiPageContentHeaderSection, -} from '@elastic/eui'; +import { EuiFlexGroup, EuiPanel, EuiSpacer, EuiFlexItem, EuiText } from '@elastic/eui'; import React from 'react'; import { PanelTitle } from '../../trace_analytics/components/common/helper_functions'; diff --git a/public/components/integrations/components/integration_overview_panel.tsx b/public/components/integrations/components/integration_overview_panel.tsx index 57d778d471..ca0c80e544 100644 --- a/public/components/integrations/components/integration_overview_panel.tsx +++ b/public/components/integrations/components/integration_overview_panel.tsx @@ -4,7 +4,6 @@ import { EuiLink, EuiPageHeader, EuiPageHeaderSection, - EuiPanel, EuiSpacer, EuiTitle, EuiFlexItem, @@ -12,7 +11,6 @@ import { EuiPageContentHeaderSection, } from '@elastic/eui'; import React from 'react'; -import logo from '../assets/nginx-svgrepo-com.svg'; const pageStyles: CSS.Properties = { width: '80%', diff --git a/public/components/integrations/components/integration_side_nav.tsx b/public/components/integrations/components/integration_side_nav.tsx index c99bb5d66e..40d925e7fa 100644 --- a/public/components/integrations/components/integration_side_nav.tsx +++ b/public/components/integrations/components/integration_side_nav.tsx @@ -4,7 +4,6 @@ */ import { - EuiButton, EuiFlexGroup, EuiFlexItem, EuiPage, @@ -12,7 +11,6 @@ import { EuiPageSideBar, EuiSideNav, EuiSideNavItemType, - EuiSwitch, } from '@elastic/eui'; import React from 'react'; // import { useState } from 'react'; diff --git a/server/routes/index.ts b/server/routes/index.ts index 6c598680ac..4830bf58c4 100644 --- a/server/routes/index.ts +++ b/server/routes/index.ts @@ -20,10 +20,7 @@ import { registerSqlRoute } from './notebooks/sqlRouter'; import { registerEventAnalyticsRouter } from './event_analytics/event_analytics_router'; import { registerAppAnalyticsRouter } from './application_analytics/app_analytics_router'; import { registerMetricsRoute } from './metrics/metrics_rounter'; -import { - registerIntegrationsRoute, - registerPlaceholderRoute, -} from './placeholder/integrations_router'; +import { registerIntegrationsRoute } from './integrations/integrations_router'; export function setupRoutes({ router, client }: { router: IRouter; client: ILegacyClusterClient }) { PanelsRouter(router); diff --git a/server/routes/integrations/__tests__/integrations_router.test.ts b/server/routes/integrations/__tests__/integrations_router.test.ts index e4fd5753a6..75b1f44c29 100644 --- a/server/routes/integrations/__tests__/integrations_router.test.ts +++ b/server/routes/integrations/__tests__/integrations_router.test.ts @@ -1,12 +1,7 @@ import { DeepPartial } from 'redux'; -import { - ILegacyScopedClusterClient, - OpenSearchDashboardsRequest, - RequestHandlerContext, -} from '../../../../../../src/core/server'; import { OpenSearchDashboardsResponseFactory } from '../../../../../../src/core/server/http/router'; import { handleWithCallback } from '../integrations_router'; -import { IntegrationsAdaptor } from 'server/adaptors/placeholder/integrations_adaptor'; +import { IntegrationsAdaptor } from 'server/adaptors/integrations/integrations_adaptor'; jest .mock('../../../../../../src/core/server', () => jest.fn()) diff --git a/server/routes/integrations/integrations_router.ts b/server/routes/integrations/integrations_router.ts index 9fe1dfc47d..a5b2f17900 100644 --- a/server/routes/integrations/integrations_router.ts +++ b/server/routes/integrations/integrations_router.ts @@ -12,7 +12,6 @@ import { OpenSearchDashboardsRequest, OpenSearchDashboardsResponseFactory, } from '../../../../../src/core/server/http/router'; -import { SavedObjectsBulkCreateObject } from '../../../../../src/core/public'; import { IntegrationsKibanaBackend } from '../../adaptors/integrations/integrations_kibana_backend'; let added = false; From 8f445f14305fe7a0a2973abf398afe2eac2e2849 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Mon, 22 May 2023 14:44:09 -0700 Subject: [PATCH 054/190] Add revised typing for integration objects Signed-off-by: Simeon Widdis --- server/adaptors/integrations/types.ts | 68 ++++++++++++++++++++------- 1 file changed, 51 insertions(+), 17 deletions(-) diff --git a/server/adaptors/integrations/types.ts b/server/adaptors/integrations/types.ts index 30fd2e41d0..683e7f59f2 100644 --- a/server/adaptors/integrations/types.ts +++ b/server/adaptors/integrations/types.ts @@ -1,38 +1,72 @@ interface IntegrationTemplate { - templateName: string; + name: string; version: string; - description: string; - catalog: string; - assetUrl: string; - displayAssets: any[]; + author?: string; + description?: string; + tags?: string[]; + sourceUrl?: string; + catalog?: string; + staticAssetMapping?: StaticAssetMapping; + staticAssets?: StaticAsset[]; // Blobs for static assets to display, like logos + components: IntegrationComponent[]; // Describes expected format of the data, used for validation + displayAssets: IntegrationAsset[]; // Asset objects that can be imported +} + +interface StaticAssetMapping { + logo?: string; + gallery?: string[]; + darkModeLogo?: string; // Fallback to light mode if absent + darkModeGallery?: string[]; +} + +interface StaticAsset { + path: string; + mimeType: string; + annotation?: string; + data: string; // Base64 encoded +} + +interface IntegrationComponent { + name: string; + version: string; + description?: string; + sourceUrl?: string; + schemaBody: string; + mappingBody: string; +} + +interface IntegrationAsset { + assetBody: string; } interface IntegrationTemplateSearchResult { - integrations: IntegrationTemplate[]; + hits: IntegrationTemplate[]; } interface IntegrationTemplateQuery { - name?: string; // Temporary value to satisfy linter, don't use + tags?: string[]; } interface IntegrationInstance { + id: string; templateName: string; - type: string; + integrationType: string; dataset: string; namespace: string; - id: string; - version: string; - description: string; - template: string; creationDate: string; - author: string; - status: string; - dashboardUrl: string; - assets: object; + status: string; // Dynamically computed status on read + assets: AssetReference[]; // References to imported assets +} + +interface AssetReference { + assetType: string; + assetUrl: string; + status: string; // Aggregated to show status in parent object + isDefaultAsset: boolean; // Used to know which one to open by default } interface IntegrationInstanceSearchResult { - integrations: IntegrationInstance[]; + hits: IntegrationInstance[]; } interface IntegrationInstanceQuery { From b41c45d6861083d2669d39cba7b62c9213017e74 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Mon, 22 May 2023 14:46:09 -0700 Subject: [PATCH 055/190] Remove unused java backend Signed-off-by: Simeon Widdis --- .../integrations/integrations_java_backend.ts | 51 ------------------- .../opensearch_observability_plugin.ts | 23 --------- 2 files changed, 74 deletions(-) delete mode 100644 server/adaptors/integrations/integrations_java_backend.ts diff --git a/server/adaptors/integrations/integrations_java_backend.ts b/server/adaptors/integrations/integrations_java_backend.ts deleted file mode 100644 index 0e1a82b63c..0000000000 --- a/server/adaptors/integrations/integrations_java_backend.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { reject } from 'lodash'; -import { - ILegacyScopedClusterClient, - SavedObjectsBulkCreateObject, -} from '../../../../../src/core/server'; -import { IntegrationsAdaptor } from './integrations_adaptor'; - -export class IntegrationsJavaBackend implements IntegrationsAdaptor { - client: ILegacyScopedClusterClient; - - constructor(client: ILegacyScopedClusterClient) { - this.client = client; - } - - // Fetch all existing integrations - getIntegrationTemplates = async ( - query?: IntegrationTemplateQuery - ): Promise => { - try { - console.log(`getIntegrationTemplates query: ${query}`); - const response = await this.client.callAsCurrentUser('integrations.getIntegrationTemplates'); - console.log(`getIntegrationTemplates response: ${response}`); - console.log(response); - return response; - } catch (err: any) { - throw new Error('Fetch All Applications Error: ' + err); - } - }; - - getIntegrationInstances = async ( - query?: IntegrationInstanceQuery - ): Promise => { - try { - let endpoint: string = 'integrations.getAdded'; - if (query?.added) { - endpoint = 'integrations.getAddedPop'; - } - console.log('getIntegrationInstances query: ' + query); - const response = await this.client.callAsCurrentUser(endpoint, {}); - console.log('getIntegrationInstances response:'); - console.log(response); - return response.test; - } catch (err: any) { - throw new Error('Fetch Added Applications Error: ' + err); - } - }; - - getAssets = async (_: any): Promise => { - return Promise.reject('not implemented'); - }; -} diff --git a/server/adaptors/opensearch_observability_plugin.ts b/server/adaptors/opensearch_observability_plugin.ts index 7fab43ca1c..d57b73bc43 100644 --- a/server/adaptors/opensearch_observability_plugin.ts +++ b/server/adaptors/opensearch_observability_plugin.ts @@ -11,29 +11,6 @@ export function OpenSearchObservabilityPlugin(Client: any, config: any, componen Client.prototype.observability = components.clientAction.namespaceFactory(); Client.prototype.integrations = components.clientAction.namespaceFactory(); const observability = Client.prototype.observability.prototype; - const integrations = Client.prototype.integrations.prototype; - - // Get Object - integrations.getIntegrationTemplates = clientAction({ - url: { - fmt: OPENSEARCH_INTEGRATIONS_API.ALL, - }, - method: 'GET', - }); - - integrations.getAdded = clientAction({ - url: { - fmt: OPENSEARCH_INTEGRATIONS_API.ADDED, - }, - method: 'GET', - }); - - integrations.getAddedPop = clientAction({ - url: { - fmt: OPENSEARCH_INTEGRATIONS_API.ADDED_POP, - }, - method: 'GET', - }); // Get Object observability.getObject = clientAction({ From 0a32fc8cf2b9b3968d4819874c153be6a44f95a1 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Mon, 22 May 2023 14:58:48 -0700 Subject: [PATCH 056/190] Modify integration type based on front-end data Signed-off-by: Simeon Widdis --- server/adaptors/integrations/types.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/adaptors/integrations/types.ts b/server/adaptors/integrations/types.ts index 683e7f59f2..a4bd661151 100644 --- a/server/adaptors/integrations/types.ts +++ b/server/adaptors/integrations/types.ts @@ -49,11 +49,11 @@ interface IntegrationTemplateQuery { interface IntegrationInstance { id: string; + name: string; templateName: string; - integrationType: string; - dataset: string; - namespace: string; + dataSource: string; creationDate: string; + tags?: string[]; status: string; // Dynamically computed status on read assets: AssetReference[]; // References to imported assets } From 9e94420524f7523db2578eebc55f996fb68c2049 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Mon, 22 May 2023 15:49:13 -0700 Subject: [PATCH 057/190] Stub load integration method Signed-off-by: Simeon Widdis --- server/adaptors/integrations/utils.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/server/adaptors/integrations/utils.ts b/server/adaptors/integrations/utils.ts index b67c12011a..244bb1006c 100644 --- a/server/adaptors/integrations/utils.ts +++ b/server/adaptors/integrations/utils.ts @@ -1,3 +1,4 @@ +import { string } from 'joi'; import { Readable } from 'stream'; /** @@ -32,3 +33,22 @@ export const readNDJsonObjects = async (stream: Readable): Promise => { }); }); }; + +export const loadIntegration = async ( + template: IntegrationTemplate, + name: string, + dataSource: string, + tags?: string[] +): Promise => { + const instance: Partial = { + name, + dataSource, + tags, + id: 'unknown', + status: 'unknown', + templateName: template.name, + creationDate: new Date().toISOString(), + assets: [], + }; + return Promise.resolve(instance as IntegrationInstance); +}; From cc4c9b3b2dbfcea5d311f9ed37d26b68a0016777 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Tue, 23 May 2023 11:32:38 -0700 Subject: [PATCH 058/190] Add integration statics class Signed-off-by: Simeon Widdis --- server/adaptors/integrations/types.ts | 41 +++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/server/adaptors/integrations/types.ts b/server/adaptors/integrations/types.ts index a4bd661151..bcd4122fc7 100644 --- a/server/adaptors/integrations/types.ts +++ b/server/adaptors/integrations/types.ts @@ -1,17 +1,53 @@ interface IntegrationTemplate { name: string; version: string; + integrationType: string; author?: string; description?: string; tags?: string[]; sourceUrl?: string; catalog?: string; - staticAssetMapping?: StaticAssetMapping; - staticAssets?: StaticAsset[]; // Blobs for static assets to display, like logos + statics?: IntegrationStatics; components: IntegrationComponent[]; // Describes expected format of the data, used for validation displayAssets: IntegrationAsset[]; // Asset objects that can be imported } +class IntegrationStatics { + mapping?: StaticAssetMapping; + assets?: StaticAsset[]; + + getLogo(darkMode?: boolean): StaticAsset | undefined { + if (darkMode && this.mapping?.darkModeLogo) { + return this.getAsset(this.mapping?.darkModeLogo); + } + if (this.mapping?.logo) { + return this.getAsset(this.mapping?.logo); + } + } + + getGallery(darkMode?: boolean): StaticAsset[] { + if (darkMode && this.mapping?.darkModeGallery) { + return this.mapping.darkModeGallery + .map((path) => this.getAsset(path)) + .filter((x) => x) as StaticAsset[]; + } + if (this.mapping?.gallery) { + return this.mapping.gallery + .map((path) => this.getAsset(path)) + .filter((x) => x) as StaticAsset[]; + } + return []; + } + + getAsset(path: string): StaticAsset | undefined { + for (const asset of this.assets?.values() ?? []) { + if (asset.path === path) { + return asset; + } + } + } +} + interface StaticAssetMapping { logo?: string; gallery?: string[]; @@ -51,6 +87,7 @@ interface IntegrationInstance { id: string; name: string; templateName: string; + integrationType: string; dataSource: string; creationDate: string; tags?: string[]; From 4859a09bf501bc487bd55de764e386d587756e1a Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Tue, 23 May 2023 11:48:58 -0700 Subject: [PATCH 059/190] Revert "Stub load integration method" This reverts commit 9e94420524f7523db2578eebc55f996fb68c2049. Signed-off-by: Simeon Widdis --- server/adaptors/integrations/utils.ts | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/server/adaptors/integrations/utils.ts b/server/adaptors/integrations/utils.ts index 244bb1006c..b67c12011a 100644 --- a/server/adaptors/integrations/utils.ts +++ b/server/adaptors/integrations/utils.ts @@ -1,4 +1,3 @@ -import { string } from 'joi'; import { Readable } from 'stream'; /** @@ -33,22 +32,3 @@ export const readNDJsonObjects = async (stream: Readable): Promise => { }); }); }; - -export const loadIntegration = async ( - template: IntegrationTemplate, - name: string, - dataSource: string, - tags?: string[] -): Promise => { - const instance: Partial = { - name, - dataSource, - tags, - id: 'unknown', - status: 'unknown', - templateName: template.name, - creationDate: new Date().toISOString(), - assets: [], - }; - return Promise.resolve(instance as IntegrationInstance); -}; From ea74319b991521f2806536fd96274c4012f9c3b9 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Tue, 23 May 2023 12:03:23 -0700 Subject: [PATCH 060/190] Convert interfaces to types Signed-off-by: Simeon Widdis --- server/adaptors/integrations/types.ts | 115 +++++++++----------------- 1 file changed, 37 insertions(+), 78 deletions(-) diff --git a/server/adaptors/integrations/types.ts b/server/adaptors/integrations/types.ts index bcd4122fc7..6bea74325a 100644 --- a/server/adaptors/integrations/types.ts +++ b/server/adaptors/integrations/types.ts @@ -6,73 +6,31 @@ interface IntegrationTemplate { description?: string; tags?: string[]; sourceUrl?: string; - catalog?: string; - statics?: IntegrationStatics; - components: IntegrationComponent[]; // Describes expected format of the data, used for validation - displayAssets: IntegrationAsset[]; // Asset objects that can be imported -} - -class IntegrationStatics { - mapping?: StaticAssetMapping; - assets?: StaticAsset[]; - - getLogo(darkMode?: boolean): StaticAsset | undefined { - if (darkMode && this.mapping?.darkModeLogo) { - return this.getAsset(this.mapping?.darkModeLogo); - } - if (this.mapping?.logo) { - return this.getAsset(this.mapping?.logo); - } - } - - getGallery(darkMode?: boolean): StaticAsset[] { - if (darkMode && this.mapping?.darkModeGallery) { - return this.mapping.darkModeGallery - .map((path) => this.getAsset(path)) - .filter((x) => x) as StaticAsset[]; - } - if (this.mapping?.gallery) { - return this.mapping.gallery - .map((path) => this.getAsset(path)) - .filter((x) => x) as StaticAsset[]; - } - return []; - } - - getAsset(path: string): StaticAsset | undefined { - for (const asset of this.assets?.values() ?? []) { - if (asset.path === path) { - return asset; - } - } - } -} - -interface StaticAssetMapping { - logo?: string; - gallery?: string[]; - darkModeLogo?: string; // Fallback to light mode if absent - darkModeGallery?: string[]; -} - -interface StaticAsset { - path: string; - mimeType: string; - annotation?: string; - data: string; // Base64 encoded -} - -interface IntegrationComponent { - name: string; - version: string; - description?: string; - sourceUrl?: string; - schemaBody: string; - mappingBody: string; -} - -interface IntegrationAsset { - assetBody: string; + statics?: { + mapping?: { + logo?: string; + gallery?: string[]; + darkModeLogo?: string; // Fallback to light mode if absent + darkModeGallery?: string[]; + }; + assets?: Array<{ + path: string; + mimeType: string; + annotation?: string; + data: string; + }>; + }; + components: Array<{ + name: string; + version: string; + description?: string; + sourceUrl?: string; + schemaBody: string; + mappingBody: string; + }>; + displayAssets: Array<{ + assetBody: string; + }>; } interface IntegrationTemplateSearchResult { @@ -87,19 +45,20 @@ interface IntegrationInstance { id: string; name: string; templateName: string; - integrationType: string; - dataSource: string; + dataSource: { + sourceType: string; + dataset: string; + namespace: string; + }; creationDate: string; tags?: string[]; - status: string; // Dynamically computed status on read - assets: AssetReference[]; // References to imported assets -} - -interface AssetReference { - assetType: string; - assetUrl: string; - status: string; // Aggregated to show status in parent object - isDefaultAsset: boolean; // Used to know which one to open by default + status: string; + assets: Array<{ + assetType: string; + assetUrl: string; + status: string; + isDefaultAsset: boolean; + }>; } interface IntegrationInstanceSearchResult { From 74f22b8ed731108fc1623bf046d731b095e9861f Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Tue, 23 May 2023 13:56:35 -0700 Subject: [PATCH 061/190] Change assets to map Signed-off-by: Simeon Widdis --- server/adaptors/integrations/types.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/server/adaptors/integrations/types.ts b/server/adaptors/integrations/types.ts index 6bea74325a..3be8928075 100644 --- a/server/adaptors/integrations/types.ts +++ b/server/adaptors/integrations/types.ts @@ -13,12 +13,14 @@ interface IntegrationTemplate { darkModeLogo?: string; // Fallback to light mode if absent darkModeGallery?: string[]; }; - assets?: Array<{ - path: string; - mimeType: string; - annotation?: string; - data: string; - }>; + assets?: Map< + string, + { + mimeType: string; + annotation?: string; + data: string; + } + >; }; components: Array<{ name: string; @@ -29,7 +31,7 @@ interface IntegrationTemplate { mappingBody: string; }>; displayAssets: Array<{ - assetBody: string; + body: string; }>; } From 2a33e65100dcfaa3f715deb5d697d4f185649097 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Tue, 23 May 2023 14:28:26 -0700 Subject: [PATCH 062/190] Adjust repository for new typing Signed-off-by: Simeon Widdis --- .../integrations/__data__/repository.json | 68 ++++++++++++++++++- .../integrations_kibana_backend.ts | 26 ++----- 2 files changed, 69 insertions(+), 25 deletions(-) diff --git a/server/adaptors/integrations/__data__/repository.json b/server/adaptors/integrations/__data__/repository.json index 9b5e1deebe..97076783d3 100644 --- a/server/adaptors/integrations/__data__/repository.json +++ b/server/adaptors/integrations/__data__/repository.json @@ -2,9 +2,71 @@ { "templateName": "nginx", "version": "1.0.0", + "integrationType": "logs", "description": "Nginx HTTP server collector", - "catalog": "observability", - "assetUrl": "https://cdn.iconscout.com/icon/free/png-256/nginx-3521604-2945048.png", - "displayAssets": [] + "statics": { + "mapping": { + "logo": "/logo" + }, + "assets": { + "/logo": { + "mineType": "image/png", + "annotation": "NginX Logo", + "data": "iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAACXBIWXMAAAsSAAALEgHS3X78AAAfBklEQVR42u1dDYxc1XWe2dkNfzFEAVxh8LyZtU0LhoTYnvtmAacINWmJm+CmiRKoiBLRqH/8qE3URm2pLBqVUsC77834L5CSJqKhblOaQlMUEaKmSdSgNCSIokJL25QSURMiU6EAM7O7Pffcc++7b7y217vz3u7M+450NG9nZ3dm7rv3u+d85+eWSpCRlSAOS7Uo5Gv9GERhxf0uCjcHkXqEXvNoLVZvsc/XIlXRf2euG6Va3MRAQiDDtfCVXuAOBPoW/lm0yKfpsVvfPzWvlV7fo9fF9PzahYCAgIKAIMTAQiCrWap7L9cLt+Qt9jH6eYwX9MxlY/TzDaQvTN596Twt6Hm61gu/p6/1c3R9iK5vrrVURUCgHMjfW2DZGG/HQEMgq3rXj8Jy366/gxby4/VP0cLf09QLvUvPzemFz0AQqzn9XK3dnNevoevv0fPvSVsDqmzdggDWAAQyFH7+xbTwv1jfRwt73xQtdqUX/qxZ9BoAlAaBOXPNz81qINCv1UrXD9JrLgE/AIEMq5+vd/1YzWpz3+34kVv886JzfRYBuwb1A5eCH4BAhtzPd+a+7PT+wk9rpK0BAwwBX5NbAH4AAhl6P98t7EVqAgTgByCQoffz55eo4AcgkBHx85cOAuAHIJAR8fOXquAHIJCR8vOX4RaAH4BARsXPBz8AgRTczwc/AIEU3s8HPwCBwM8HPwCBwM8HPwCBwM8HPwCBwM8HPwCBwM8HPwCBwM8HPwCBwM8HPwCBnw8/H/wABH4+/HzwAxD4+fDzwQ9A4OfDzwc/AIGfDz8f/AAEfj4U/AAEfj4U/AAEfj4U/AAEfj4U/AAEfj4U/AAEfj4U/AAEfj4U/AAEfj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/YTAv7EbICHqWFfjH8/GLK/wNkczJMJgkn1AAAAABJRU5ErkJggg==" + } + } + }, + "components": [ + { + "name": "communication", + "version": "1.0.0", + "schemaBody": "{\"$schema\":\"http:\/\/json-schema.org\/draft-07\/schema#\",\"$id\":\"https:\/\/opensearch.org\/schemas\/observability\/Communication\",\"title\":\"Communication\",\"type\":\"object\",\"properties\":{\"source\":{\"type\":\"object\",\"properties\":{\"sock.family\":{\"type\":\"string\"},\"source\":{\"$ref\":\"#\/definitions\/Source\"},\"destination\":{\"$ref\":\"#\/definitions\/Destination\"}}},\"destination\":{\"type\":\"object\",\"properties\":{}}},\"definitions\":{\"Source\":{\"$id\":\"#\/definitions\/Source\",\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"address\":{\"type\":\"string\"},\"domain\":{\"type\":\"string\"},\"bytes\":{\"type\":\"integer\"},\"ip\":{\"type\":\"string\"},\"port\":{\"type\":\"integer\"},\"mac\":{\"type\":\"string\"},\"packets\":{\"type\":\"integer\"}},\"title\":\"Source\"},\"Destination\":{\"$id\":\"#\/definitions\/Destination\",\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"address\":{\"type\":\"string\"},\"domain\":{\"type\":\"string\"},\"bytes\":{\"type\":\"integer\"},\"ip\":{\"type\":\"string\"},\"port\":{\"type\":\"integer\"},\"mac\":{\"type\":\"string\"},\"packets\":{\"type\":\"integer\"}},\"title\":\"Destination\"}}}", + "mappingBody": "{\"template\":{\"mappings\":{\"_meta\":{\"version\":\"1.0.0\",\"catalog\":\"observability\",\"type\":\"logs\",\"component\":\"communication\"},\"properties\":{\"communication\":{\"properties\":{\"sock.family\":{\"type\":\"keyword\",\"ignore_above\":256},\"source\":{\"type\":\"object\",\"properties\":{\"address\":{\"type\":\"text\",\"fields\":{\"keyword\":{\"type\":\"keyword\",\"ignore_above\":1024}}},\"domain\":{\"type\":\"text\",\"fields\":{\"keyword\":{\"type\":\"keyword\",\"ignore_above\":1024}}},\"bytes\":{\"type\":\"long\"},\"ip\":{\"type\":\"ip\"},\"port\":{\"type\":\"long\"},\"mac\":{\"type\":\"keyword\",\"ignore_above\":1024},\"packets\":{\"type\":\"long\"}}},\"destination\":{\"type\":\"object\",\"properties\":{\"address\":{\"type\":\"text\",\"fields\":{\"keyword\":{\"type\":\"keyword\",\"ignore_above\":1024}}},\"domain\":{\"type\":\"text\",\"fields\":{\"keyword\":{\"type\":\"keyword\",\"ignore_above\":1024}}},\"bytes\":{\"type\":\"long\"},\"ip\":{\"type\":\"ip\"},\"port\":{\"type\":\"long\"},\"mac\":{\"type\":\"keyword\",\"ignore_above\":1024},\"packets\":{\"type\":\"long\"}}}}}}}}}" + }, + { + "name": "http", + "version": "1.0.0", + "schemaBody": "{\"$schema\":\"http:\/\/json-schema.org\/draft-07\/schema#\",\"$id\":\"https:\/\/opensearch.org\/schemas\/observability\/Http\",\"title\":\"Http\",\"type\":\"object\",\"properties\":{\"request\":{\"$ref\":\"#\/definitions\/Request\"},\"response\":{\"$ref\":\"#\/definitions\/Response\"},\"flavor\":{\"type\":\"string\"},\"user_agent\":{\"type\":\"string\"},\"url\":{\"type\":\"string\"},\"schema\":{\"type\":\"string\"},\"target\":{\"type\":\"string\"},\"route\":{\"type\":\"string\"},\"client_ip\":{\"type\":\"string\"},\"resent_count\":{\"type\":\"integer\"}},\"definitions\":{\"Request\":{\"$id\":\"#\/definitions\/Request\",\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"id\":{\"type\":\"string\"},\"body.content\":{\"type\":\"string\"},\"bytes\":{\"type\":\"integer\"},\"method\":{\"type\":\"string\"},\"referrer\":{\"type\":\"string\"},\"header\":{\"type\":\"string\"},\"mime_type\":{\"type\":\"object\"}},\"title\":\"Request\"},\"Response\":{\"$id\":\"#\/definitions\/Response\",\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"id\":{\"type\":\"string\"},\"body.content\":{\"type\":\"string\"},\"bytes\":{\"type\":\"integer\"},\"status_code\":{\"type\":\"integer\"},\"header\":{\"type\":\"object\"}},\"title\":\"Response\"}}}", + "mappingBody": "{\"template\":{\"mappings\":{\"_meta\":{\"version\":\"1.0.0\",\"catalog\":\"observability\",\"type\":\"logs\",\"component\":\"http\"},\"dynamic_templates\":[{\"request_header_map\":{\"mapping\":{\"type\":\"keyword\"},\"path_match\":\"request.header.*\"}},{\"response_header_map\":{\"mapping\":{\"type\":\"keyword\"},\"path_match\":\"response.header.*\"}}],\"properties\":{\"http\":{\"properties\":{\"flavor\":{\"type\":\"keyword\",\"ignore_above\":256},\"user_agent\":{\"type\":\"keyword\",\"ignore_above\":2048},\"url\":{\"type\":\"keyword\",\"ignore_above\":2048},\"schema\":{\"type\":\"keyword\",\"ignore_above\":1024},\"target\":{\"type\":\"keyword\",\"ignore_above\":1024},\"route\":{\"type\":\"keyword\",\"ignore_above\":1024},\"client.ip\":{\"type\":\"ip\"},\"resent_count\":{\"type\":\"integer\"},\"request\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"text\",\"fields\":{\"keyword\":{\"type\":\"keyword\",\"ignore_above\":256}}},\"body.content\":{\"type\":\"text\"},\"bytes\":{\"type\":\"long\"},\"method\":{\"type\":\"keyword\",\"ignore_above\":256},\"referrer\":{\"type\":\"keyword\",\"ignore_above\":1024},\"mime_type\":{\"type\":\"keyword\",\"ignore_above\":1024}}},\"response\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"text\",\"fields\":{\"keyword\":{\"type\":\"keyword\",\"ignore_above\":256}}},\"body.content\":{\"type\":\"text\"},\"bytes\":{\"type\":\"long\"},\"status_code\":{\"type\":\"integer\"}}}}}}}}}" + }, + { + "name": "logs", + "version": "1.0.0", + "schemaBody": "{\"$schema\":\"http:\/\/json-schema.org\/draft-07\/schema#\",\"$id\":\"https:\/\/opensearch.org\/schema\/observability\/Logs\",\"title\":\"OpenTelemetry Logs\",\"type\":\"object\",\"properties\":{\"severity\":{\"$ref\":\"#\/definitions\/Severity\"},\"resource\":{\"type\":\"object\"},\"attributes\":{\"$ref\":\"#\/definitions\/Attributes\"},\"body\":{\"type\":\"string\"},\"@timestamp\":{\"type\":\"string\",\"format\":\"date-time\"},\"observedTimestamp\":{\"type\":\"string\",\"format\":\"date-time\"},\"traceId\":{\"$ref\":\"https:\/\/opensearch.org\/schemas\/observability\/Span#\/properties\/traceId\"},\"spanId\":{\"$ref\":\"https:\/\/opensearch.org\/schemas\/observability\/Span#\/properties\/spanId\"},\"schemaUrl\":{\"type\":\"string\"},\"instrumentationScope\":{\"$ref\":\"#\/definitions\/InstrumentationScope\"},\"event\":{\"$ref\":\"#\/definitions\/Event\"}},\"required\":[\"body\",\"@timestamp\"],\"definitions\":{\"InstrumentationScope\":{\"$id\":\"#\/definitions\/InstrumentationScope\",\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"name\":{\"type\":\"string\"},\"version\":{\"type\":\"string\"},\"schemaUrl\":{\"type\":\"string\"}},\"title\":\"InstrumentationScope\"},\"Severity\":{\"$id\":\"#\/definitions\/Severity\",\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"text\":{\"type\":\"string\",\"enum\":[\"TRACE\",\"DEBUG\",\"INFO\",\"WARN\",\"ERROR\",\"FATAL\"]},\"number\":{\"type\":\"integer\"}},\"title\":\"Severity\"},\"Attributes\":{\"$id\":\"#\/definitions\/Attributes\",\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"data_stream\":{\"$ref\":\"#\/definitions\/Dataflow\"}},\"title\":\"Attributes\"},\"Dataflow\":{\"$id\":\"#\/definitions\/Dataflow\",\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"type\":{\"type\":\"string\"},\"namespace\":{\"type\":\"string\"},\"dataset\":{\"type\":\"string\"}},\"title\":\"Dataflow\"},\"Exception\":{\"$id\":\"#\/definitions\/Exception\",\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"message\":{\"type\":\"string\"},\"stacktrace\":{\"type\":\"string\"},\"type\":{\"type\":\"string\"}},\"title\":\"Exception\"},\"Event\":{\"$id\":\"#\/definitions\/Event\",\"type\":\"object\",\"additionalProperties\":true,\"properties\":{\"category\":{\"type\":\"string\",\"enum\":[\"authentication\",\"configuration\",\"database\",\"driver\",\"email\",\"file\",\"host\",\"iam\",\"intrusion_detection\",\"malware\",\"network\",\"package\",\"process\",\"registry\",\"session\",\"threat\",\"vulnerability\",\"web\"]},\"kind\":{\"type\":\"string\",\"enum\":[\"alert\",\"enrichment\",\"event\",\"metric\",\"state\",\"error\",\"signal\"]},\"type\":{\"type\":\"string\",\"enum\":[\"access\",\"admin\",\"allowed\",\"change\",\"connection\",\"creation\",\"deletion\",\"denied\",\"end\",\"error\",\"group\",\"indicator\",\"info\",\"installation\",\"protocol\",\"start\",\"user\"]},\"domain\":{\"type\":\"string\"},\"name\":{\"type\":\"string\"},\"source\":{\"type\":\"string\"},\"result\":{\"type\":\"string\",\"enum\":[\"failure\",\"success\",\"pending\",\"undetermined\"]},\"exception\":{\"$ref\":\"#\/definitions\/Exception\"}},\"title\":\"Event\"}}}", + "mappingBody": "{\"index_patterns\":[\"sso_logs-*-*\"],\"data_stream\":{},\"template\":{\"mappings\":{\"_meta\":{\"version\":\"1.0.0\",\"catalog\":\"observability\",\"type\":\"logs\",\"component\":\"log\",\"correlations\":[{\"field\":\"spanId\",\"foreign-schema\":\"traces\",\"foreign-field\":\"spanId\"},{\"field\":\"traceId\",\"foreign-schema\":\"traces\",\"foreign-field\":\"traceId\"}]},\"_source\":{\"enabled\":true},\"dynamic_templates\":[{\"resources_map\":{\"mapping\":{\"type\":\"keyword\"},\"path_match\":\"resource.*\"}},{\"attributes_map\":{\"mapping\":{\"type\":\"keyword\"},\"path_match\":\"attributes.*\"}},{\"instrumentation_scope_attributes_map\":{\"mapping\":{\"type\":\"keyword\"},\"path_match\":\"instrumentationScope.attributes.*\"}}],\"properties\":{\"severity\":{\"properties\":{\"number\":{\"type\":\"long\"},\"text\":{\"type\":\"text\",\"fields\":{\"keyword\":{\"type\":\"keyword\",\"ignore_above\":256}}}}},\"attributes\":{\"type\":\"object\",\"properties\":{\"data_stream\":{\"properties\":{\"dataset\":{\"ignore_above\":128,\"type\":\"keyword\"},\"namespace\":{\"ignore_above\":128,\"type\":\"keyword\"},\"type\":{\"ignore_above\":56,\"type\":\"keyword\"}}}}},\"body\":{\"type\":\"text\"},\"@timestamp\":{\"type\":\"date\"},\"observedTimestamp\":{\"type\":\"date\"},\"observerTime\":{\"type\":\"alias\",\"path\":\"observedTimestamp\"},\"traceId\":{\"ignore_above\":256,\"type\":\"keyword\"},\"spanId\":{\"ignore_above\":256,\"type\":\"keyword\"},\"schemaUrl\":{\"type\":\"text\",\"fields\":{\"keyword\":{\"type\":\"keyword\",\"ignore_above\":256}}},\"instrumentationScope\":{\"properties\":{\"name\":{\"type\":\"text\",\"fields\":{\"keyword\":{\"type\":\"keyword\",\"ignore_above\":128}}},\"version\":{\"type\":\"text\",\"fields\":{\"keyword\":{\"type\":\"keyword\",\"ignore_above\":256}}},\"dropped_attributes_count\":{\"type\":\"integer\"},\"schemaUrl\":{\"type\":\"text\",\"fields\":{\"keyword\":{\"type\":\"keyword\",\"ignore_above\":256}}}}},\"event\":{\"properties\":{\"domain\":{\"ignore_above\":256,\"type\":\"keyword\"},\"name\":{\"ignore_above\":256,\"type\":\"keyword\"},\"source\":{\"ignore_above\":256,\"type\":\"keyword\"},\"category\":{\"ignore_above\":256,\"type\":\"keyword\"},\"type\":{\"ignore_above\":256,\"type\":\"keyword\"},\"kind\":{\"ignore_above\":256,\"type\":\"keyword\"},\"result\":{\"ignore_above\":256,\"type\":\"keyword\"},\"exception\":{\"properties\":{\"message\":{\"ignore_above\":1024,\"type\":\"keyword\"},\"type\":{\"ignore_above\":256,\"type\":\"keyword\"},\"stacktrace\":{\"type\":\"text\"}}}}}}},\"settings\":{\"index\":{\"mapping\":{\"total_fields\":{\"limit\":10000}},\"refresh_interval\":\"5s\"}}},\"composed_of\":[\"http_template\",\"communication_template\"],\"version\":1,\"_meta\":{\"description\":\"Simple Schema For Observability\",\"catalog\":\"observability\",\"type\":\"logs\",\"correlations\":[{\"field\":\"spanId\",\"foreign-schema\":\"traces\",\"foreign-field\":\"spanId\"},{\"field\":\"traceId\",\"foreign-schema\":\"traces\",\"foreign-field\":\"traceId\"}]}}" + } + ], + "displayAssets": [ + { + "body": "{\"attributes\":{\"fields\":\"[{\\\"count\\\":0,\\\"name\\\":\\\"@timestamp\\\",\\\"type\\\":\\\"date\\\",\\\"esTypes\\\":[\\\"date\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":true,\\\"readFromDocValues\\\":true},{\\\"count\\\":0,\\\"name\\\":\\\"_id\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"_id\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":true,\\\"readFromDocValues\\\":false},{\\\"count\\\":0,\\\"name\\\":\\\"_index\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"_index\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":true,\\\"readFromDocValues\\\":false},{\\\"count\\\":0,\\\"name\\\":\\\"_score\\\",\\\"type\\\":\\\"number\\\",\\\"scripted\\\":false,\\\"searchable\\\":false,\\\"aggregatable\\\":false,\\\"readFromDocValues\\\":false},{\\\"count\\\":0,\\\"name\\\":\\\"_source\\\",\\\"type\\\":\\\"_source\\\",\\\"esTypes\\\":[\\\"_source\\\"],\\\"scripted\\\":false,\\\"searchable\\\":false,\\\"aggregatable\\\":false,\\\"readFromDocValues\\\":false},{\\\"count\\\":0,\\\"name\\\":\\\"_type\\\",\\\"type\\\":\\\"string\\\",\\\"scripted\\\":false,\\\"searchable\\\":false,\\\"aggregatable\\\":false,\\\"readFromDocValues\\\":false},{\\\"count\\\":0,\\\"name\\\":\\\"attributes.data_stream.dataset\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"text\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":false,\\\"readFromDocValues\\\":false},{\\\"count\\\":0,\\\"name\\\":\\\"attributes.data_stream.dataset.keyword\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"keyword\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":true,\\\"readFromDocValues\\\":true,\\\"subType\\\":{\\\"multi\\\":{\\\"parent\\\":\\\"attributes.data_stream.dataset\\\"}}},{\\\"count\\\":0,\\\"name\\\":\\\"attributes.data_stream.namespace\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"text\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":false,\\\"readFromDocValues\\\":false},{\\\"count\\\":0,\\\"name\\\":\\\"attributes.data_stream.namespace.keyword\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"keyword\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":true,\\\"readFromDocValues\\\":true,\\\"subType\\\":{\\\"multi\\\":{\\\"parent\\\":\\\"attributes.data_stream.namespace\\\"}}},{\\\"count\\\":0,\\\"name\\\":\\\"attributes.data_stream.type\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"text\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":false,\\\"readFromDocValues\\\":false},{\\\"count\\\":0,\\\"name\\\":\\\"attributes.data_stream.type.keyword\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"keyword\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":true,\\\"readFromDocValues\\\":true,\\\"subType\\\":{\\\"multi\\\":{\\\"parent\\\":\\\"attributes.data_stream.type\\\"}}},{\\\"count\\\":0,\\\"name\\\":\\\"body\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"text\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":false,\\\"readFromDocValues\\\":false},{\\\"count\\\":0,\\\"name\\\":\\\"body.keyword\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"keyword\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":true,\\\"readFromDocValues\\\":true,\\\"subType\\\":{\\\"multi\\\":{\\\"parent\\\":\\\"body\\\"}}},{\\\"count\\\":0,\\\"name\\\":\\\"communication.source.address\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"text\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":false,\\\"readFromDocValues\\\":false},{\\\"count\\\":0,\\\"name\\\":\\\"communication.source.address.keyword\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"keyword\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":true,\\\"readFromDocValues\\\":true,\\\"subType\\\":{\\\"multi\\\":{\\\"parent\\\":\\\"communication.source.address\\\"}}},{\\\"count\\\":0,\\\"name\\\":\\\"communication.source.ip\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"text\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":false,\\\"readFromDocValues\\\":false},{\\\"count\\\":0,\\\"name\\\":\\\"communication.source.ip.keyword\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"keyword\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":true,\\\"readFromDocValues\\\":true,\\\"subType\\\":{\\\"multi\\\":{\\\"parent\\\":\\\"communication.source.ip\\\"}}},{\\\"count\\\":0,\\\"name\\\":\\\"event.category\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"text\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":false,\\\"readFromDocValues\\\":false},{\\\"count\\\":0,\\\"name\\\":\\\"event.category.keyword\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"keyword\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":true,\\\"readFromDocValues\\\":true,\\\"subType\\\":{\\\"multi\\\":{\\\"parent\\\":\\\"event.category\\\"}}},{\\\"count\\\":0,\\\"name\\\":\\\"event.domain\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"text\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":false,\\\"readFromDocValues\\\":false},{\\\"count\\\":0,\\\"name\\\":\\\"event.domain.keyword\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"keyword\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":true,\\\"readFromDocValues\\\":true,\\\"subType\\\":{\\\"multi\\\":{\\\"parent\\\":\\\"event.domain\\\"}}},{\\\"count\\\":0,\\\"name\\\":\\\"event.kind\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"text\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":false,\\\"readFromDocValues\\\":false},{\\\"count\\\":0,\\\"name\\\":\\\"event.kind.keyword\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"keyword\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":true,\\\"readFromDocValues\\\":true,\\\"subType\\\":{\\\"multi\\\":{\\\"parent\\\":\\\"event.kind\\\"}}},{\\\"count\\\":0,\\\"name\\\":\\\"event.name\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"text\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":false,\\\"readFromDocValues\\\":false},{\\\"count\\\":0,\\\"name\\\":\\\"event.name.keyword\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"keyword\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":true,\\\"readFromDocValues\\\":true,\\\"subType\\\":{\\\"multi\\\":{\\\"parent\\\":\\\"event.name\\\"}}},{\\\"count\\\":0,\\\"name\\\":\\\"event.result\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"text\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":false,\\\"readFromDocValues\\\":false},{\\\"count\\\":0,\\\"name\\\":\\\"event.result.keyword\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"keyword\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":true,\\\"readFromDocValues\\\":true,\\\"subType\\\":{\\\"multi\\\":{\\\"parent\\\":\\\"event.result\\\"}}},{\\\"count\\\":0,\\\"name\\\":\\\"event.type\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"text\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":false,\\\"readFromDocValues\\\":false},{\\\"count\\\":0,\\\"name\\\":\\\"event.type.keyword\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"keyword\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":true,\\\"readFromDocValues\\\":true,\\\"subType\\\":{\\\"multi\\\":{\\\"parent\\\":\\\"event.type\\\"}}},{\\\"count\\\":0,\\\"name\\\":\\\"http.flavor\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"text\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":false,\\\"readFromDocValues\\\":false},{\\\"count\\\":0,\\\"name\\\":\\\"http.flavor.keyword\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"keyword\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":true,\\\"readFromDocValues\\\":true,\\\"subType\\\":{\\\"multi\\\":{\\\"parent\\\":\\\"http.flavor\\\"}}},{\\\"count\\\":0,\\\"name\\\":\\\"http.request.method\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"text\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":false,\\\"readFromDocValues\\\":false},{\\\"count\\\":0,\\\"name\\\":\\\"http.request.method.keyword\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"keyword\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":true,\\\"readFromDocValues\\\":true,\\\"subType\\\":{\\\"multi\\\":{\\\"parent\\\":\\\"http.request.method\\\"}}},{\\\"count\\\":0,\\\"name\\\":\\\"http.response.bytes\\\",\\\"type\\\":\\\"number\\\",\\\"esTypes\\\":[\\\"long\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":true,\\\"readFromDocValues\\\":true},{\\\"count\\\":0,\\\"name\\\":\\\"http.response.status_code\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"text\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":false,\\\"readFromDocValues\\\":false},{\\\"count\\\":0,\\\"name\\\":\\\"http.response.status_code.keyword\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"keyword\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":true,\\\"readFromDocValues\\\":true,\\\"subType\\\":{\\\"multi\\\":{\\\"parent\\\":\\\"http.response.status_code\\\"}}},{\\\"count\\\":0,\\\"name\\\":\\\"http.url\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"text\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":false,\\\"readFromDocValues\\\":false},{\\\"count\\\":0,\\\"name\\\":\\\"http.url\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"keyword\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":true,\\\"readFromDocValues\\\":true,\\\"subType\\\":{\\\"multi\\\":{\\\"parent\\\":\\\"http.url\\\"}}},{\\\"count\\\":0,\\\"name\\\":\\\"observerTime\\\",\\\"type\\\":\\\"date\\\",\\\"esTypes\\\":[\\\"date\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":true,\\\"readFromDocValues\\\":true},{\\\"count\\\":0,\\\"name\\\":\\\"span_id\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"text\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":false,\\\"readFromDocValues\\\":false},{\\\"count\\\":0,\\\"name\\\":\\\"span_id.keyword\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"keyword\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":true,\\\"readFromDocValues\\\":true,\\\"subType\\\":{\\\"multi\\\":{\\\"parent\\\":\\\"span_id\\\"}}},{\\\"count\\\":0,\\\"name\\\":\\\"trace_id\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"text\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":false,\\\"readFromDocValues\\\":false},{\\\"count\\\":0,\\\"name\\\":\\\"trace_id.keyword\\\",\\\"type\\\":\\\"string\\\",\\\"esTypes\\\":[\\\"keyword\\\"],\\\"scripted\\\":false,\\\"searchable\\\":true,\\\"aggregatable\\\":true,\\\"readFromDocValues\\\":true,\\\"subType\\\":{\\\"multi\\\":{\\\"parent\\\":\\\"trace_id\\\"}}}]\",\"timeFieldName\":\"@timestamp\",\"title\":\"sso_logs-*-*\"},\"id\":\"47892350-b495-11ed-af0a-cf5c93b5a3b6\",\"migrationVersion\":{\"index-pattern\":\"7.6.0\"},\"references\":[],\"type\":\"index-pattern\",\"updated_at\":\"2023-02-26T00:34:36.592Z\",\"version\":\"WzYxLDdd\"}" + }, + { + "body": "{\"attributes\":{\"columns\":[\"http.request.method\",\"http.response.status_code\"],\"description\":\"\",\"hits\":0,\"kibanaSavedObjectMeta\":{\"searchSourceJSON\":\"{\\n \\\"highlightAll\\\": true,\\n \\\"version\\\": true,\\n \\\"query\\\": {\\n \\\"query\\\": \\\"event.domain:nginx.access\\\",\\n \\\"language\\\": \\\"kuery\\\"\\n },\\n \\\"filter\\\": [],\\n \\\"indexRefName\\\": \\\"kibanaSavedObjectMeta.searchSourceJSON.index\\\"\\n}\"},\"sort\":[],\"title\":\"[NGINX Core Logs 1.0] Nginx Access Logs\",\"version\":1},\"id\":\"d80e05b2-518c-4c3d-9651-4c9d8632dce4\",\"migrationVersion\":{\"search\":\"7.9.3\"},\"references\":[{\"id\":\"47892350-b495-11ed-af0a-cf5c93b5a3b6\",\"name\":\"kibanaSavedObjectMeta.searchSourceJSON.index\",\"type\":\"index-pattern\"}],\"type\":\"search\",\"updated_at\":\"2023-02-26T00:34:36.592Z\",\"version\":\"WzYyLDdd\"}" + }, + { + "body": "{\"attributes\":{\"description\":\"\",\"kibanaSavedObjectMeta\":{\"searchSourceJSON\":\"{\\\"query\\\":{\\\"query\\\":\\\"\\\",\\\"language\\\":\\\"lucene\\\"},\\\"filter\\\":[]}\"},\"savedSearchRefName\":\"search_0\",\"title\":\"[NGINX Core Logs 1.0] Response codes over time\",\"uiStateJSON\":\"{}\",\"version\":1,\"visState\":\"{\\\"title\\\":\\\"[NGINX Core Logs 1.0] Response codes over time\\\",\\\"type\\\":\\\"histogram\\\",\\\"aggs\\\":[{\\\"id\\\":\\\"1\\\",\\\"enabled\\\":true,\\\"type\\\":\\\"count\\\",\\\"params\\\":{},\\\"schema\\\":\\\"metric\\\"},{\\\"id\\\":\\\"2\\\",\\\"enabled\\\":true,\\\"type\\\":\\\"date_histogram\\\",\\\"params\\\":{\\\"field\\\":\\\"@timestamp\\\",\\\"timeRange\\\":{\\\"from\\\":\\\"now-24h\\\",\\\"to\\\":\\\"now\\\"},\\\"useNormalizedOpenSearchInterval\\\":true,\\\"scaleMetricValues\\\":false,\\\"interval\\\":\\\"auto\\\",\\\"drop_partials\\\":false,\\\"min_doc_count\\\":1,\\\"extended_bounds\\\":{}},\\\"schema\\\":\\\"segment\\\"},{\\\"id\\\":\\\"3\\\",\\\"enabled\\\":true,\\\"type\\\":\\\"filters\\\",\\\"params\\\":{\\\"filters\\\":[{\\\"input\\\":{\\\"query\\\":\\\"http.response.status_code:[200 TO 299]\\\",\\\"language\\\":\\\"lucene\\\"},\\\"label\\\":\\\"200s\\\"},{\\\"input\\\":{\\\"query\\\":\\\"http.response.status_code:[300 TO 399]\\\",\\\"language\\\":\\\"lucene\\\"},\\\"label\\\":\\\"300s\\\"},{\\\"input\\\":{\\\"query\\\":\\\"http.response.status_code:[400 TO 499]\\\",\\\"language\\\":\\\"lucene\\\"},\\\"label\\\":\\\"400s\\\"},{\\\"input\\\":{\\\"query\\\":\\\"http.response.status_code:[500 TO 599]\\\",\\\"language\\\":\\\"lucene\\\"},\\\"label\\\":\\\"500s\\\"},{\\\"input\\\":{\\\"query\\\":\\\"http.response.status_code:0\\\",\\\"language\\\":\\\"lucene\\\"},\\\"label\\\":\\\"0\\\"}]},\\\"schema\\\":\\\"group\\\"}],\\\"params\\\":{\\\"type\\\":\\\"histogram\\\",\\\"grid\\\":{\\\"categoryLines\\\":false},\\\"categoryAxes\\\":[{\\\"id\\\":\\\"CategoryAxis-1\\\",\\\"type\\\":\\\"category\\\",\\\"position\\\":\\\"bottom\\\",\\\"show\\\":true,\\\"style\\\":{},\\\"scale\\\":{\\\"type\\\":\\\"linear\\\"},\\\"labels\\\":{\\\"show\\\":true,\\\"filter\\\":true,\\\"truncate\\\":100},\\\"title\\\":{}}],\\\"valueAxes\\\":[{\\\"id\\\":\\\"ValueAxis-1\\\",\\\"name\\\":\\\"LeftAxis-1\\\",\\\"type\\\":\\\"value\\\",\\\"position\\\":\\\"left\\\",\\\"show\\\":true,\\\"style\\\":{},\\\"scale\\\":{\\\"type\\\":\\\"linear\\\",\\\"mode\\\":\\\"normal\\\"},\\\"labels\\\":{\\\"show\\\":true,\\\"rotate\\\":0,\\\"filter\\\":false,\\\"truncate\\\":100},\\\"title\\\":{\\\"text\\\":\\\"Count\\\"}}],\\\"seriesParams\\\":[{\\\"show\\\":true,\\\"type\\\":\\\"histogram\\\",\\\"mode\\\":\\\"stacked\\\",\\\"data\\\":{\\\"label\\\":\\\"Count\\\",\\\"id\\\":\\\"1\\\"},\\\"valueAxis\\\":\\\"ValueAxis-1\\\",\\\"drawLinesBetweenPoints\\\":true,\\\"lineWidth\\\":2,\\\"showCircles\\\":true}],\\\"addTooltip\\\":true,\\\"addLegend\\\":true,\\\"legendPosition\\\":\\\"right\\\",\\\"times\\\":[],\\\"addTimeMarker\\\":false,\\\"labels\\\":{\\\"show\\\":false},\\\"thresholdLine\\\":{\\\"show\\\":false,\\\"value\\\":10,\\\"width\\\":1,\\\"style\\\":\\\"full\\\",\\\"color\\\":\\\"#E7664C\\\"}}}\"},\"id\":\"3b49a65d-54d8-483d-a8f0-3d7c855e1ecf\",\"migrationVersion\":{\"visualization\":\"7.10.0\"},\"references\":[{\"id\":\"d80e05b2-518c-4c3d-9651-4c9d8632dce4\",\"name\":\"search_0\",\"type\":\"search\"}],\"type\":\"visualization\",\"updated_at\":\"2023-02-26T00:34:36.592Z\",\"version\":\"WzYzLDdd\"}" + }, + { + "body": "{\"attributes\":{\"columns\":[\"_source\"],\"description\":\"\",\"hits\":0,\"kibanaSavedObjectMeta\":{\"searchSourceJSON\":\"{\\n \\\"highlightAll\\\": true,\\n \\\"query\\\": {\\n \\\"query\\\": \\\"http.response.status_code >= 300 and event.domain:nginx.access\\\",\\n \\\"language\\\": \\\"kuery\\\"\\n },\\n \\\"version\\\": true,\\n \\\"highlight\\\": {\\n \\\"post_tags\\\": [\\n \\\"@/kibana-highlighted-field@\\\"\\n ],\\n \\\"fields\\\": {\\n \\\"*\\\": {}\\n },\\n \\\"pre_tags\\\": [\\n \\\"@kibana-highlighted-field@\\\"\\n ],\\n \\\"require_field_match\\\": false,\\n \\\"fragment_size\\\": 2147483647\\n },\\n \\\"filter\\\": [],\\n \\\"indexRefName\\\": \\\"kibanaSavedObjectMeta.searchSourceJSON.index\\\"\\n}\"},\"sort\":[[\"@timestamp\",\"desc\"]],\"title\":\"[NGINX Core Logs 1.0] Nginx Error Logs\",\"version\":1},\"id\":\"9f820fbe-ddde-43a2-9402-30bd295c97f6\",\"migrationVersion\":{\"search\":\"7.9.3\"},\"references\":[{\"id\":\"47892350-b495-11ed-af0a-cf5c93b5a3b6\",\"name\":\"kibanaSavedObjectMeta.searchSourceJSON.index\",\"type\":\"index-pattern\"}],\"type\":\"search\",\"updated_at\":\"2023-02-26T00:34:36.592Z\",\"version\":\"WzY0LDdd\"}" + }, + { + "body": "{\"attributes\":{\"description\":\"\",\"kibanaSavedObjectMeta\":{\"searchSourceJSON\":\"{\\\"query\\\":{\\\"query\\\":\\\"\\\",\\\"language\\\":\\\"lucene\\\"},\\\"filter\\\":[]}\"},\"savedSearchRefName\":\"search_0\",\"title\":\"[NGINX Core Logs 1.0] Errors over time\",\"uiStateJSON\":\"{}\",\"version\":1,\"visState\":\"{\\\"title\\\":\\\"[NGINX Core Logs 1.0] Errors over time\\\",\\\"type\\\":\\\"histogram\\\",\\\"aggs\\\":[{\\\"id\\\":\\\"1\\\",\\\"enabled\\\":true,\\\"type\\\":\\\"count\\\",\\\"params\\\":{},\\\"schema\\\":\\\"metric\\\"},{\\\"id\\\":\\\"2\\\",\\\"enabled\\\":true,\\\"type\\\":\\\"date_histogram\\\",\\\"params\\\":{\\\"field\\\":\\\"@timestamp\\\",\\\"timeRange\\\":{\\\"from\\\":\\\"now-24h\\\",\\\"to\\\":\\\"now\\\"},\\\"useNormalizedOpenSearchInterval\\\":true,\\\"scaleMetricValues\\\":false,\\\"interval\\\":\\\"auto\\\",\\\"drop_partials\\\":false,\\\"min_doc_count\\\":1,\\\"extended_bounds\\\":{}},\\\"schema\\\":\\\"segment\\\"}],\\\"params\\\":{\\\"type\\\":\\\"histogram\\\",\\\"grid\\\":{\\\"categoryLines\\\":false},\\\"categoryAxes\\\":[{\\\"id\\\":\\\"CategoryAxis-1\\\",\\\"type\\\":\\\"category\\\",\\\"position\\\":\\\"bottom\\\",\\\"show\\\":true,\\\"style\\\":{},\\\"scale\\\":{\\\"type\\\":\\\"linear\\\"},\\\"labels\\\":{\\\"show\\\":true,\\\"filter\\\":true,\\\"truncate\\\":100},\\\"title\\\":{}}],\\\"valueAxes\\\":[{\\\"id\\\":\\\"ValueAxis-1\\\",\\\"name\\\":\\\"LeftAxis-1\\\",\\\"type\\\":\\\"value\\\",\\\"position\\\":\\\"left\\\",\\\"show\\\":true,\\\"style\\\":{},\\\"scale\\\":{\\\"type\\\":\\\"linear\\\",\\\"mode\\\":\\\"normal\\\"},\\\"labels\\\":{\\\"show\\\":true,\\\"rotate\\\":0,\\\"filter\\\":false,\\\"truncate\\\":100},\\\"title\\\":{\\\"text\\\":\\\"Count\\\"}}],\\\"seriesParams\\\":[{\\\"show\\\":true,\\\"type\\\":\\\"histogram\\\",\\\"mode\\\":\\\"stacked\\\",\\\"data\\\":{\\\"label\\\":\\\"Count\\\",\\\"id\\\":\\\"1\\\"},\\\"valueAxis\\\":\\\"ValueAxis-1\\\",\\\"drawLinesBetweenPoints\\\":true,\\\"lineWidth\\\":2,\\\"showCircles\\\":true}],\\\"addTooltip\\\":true,\\\"addLegend\\\":true,\\\"legendPosition\\\":\\\"right\\\",\\\"times\\\":[],\\\"addTimeMarker\\\":false,\\\"labels\\\":{\\\"show\\\":false},\\\"thresholdLine\\\":{\\\"show\\\":false,\\\"value\\\":10,\\\"width\\\":1,\\\"style\\\":\\\"full\\\",\\\"color\\\":\\\"#E7664C\\\"}}}\"},\"id\":\"865e577b-634b-4a65-b9d6-7e324c395d18\",\"migrationVersion\":{\"visualization\":\"7.10.0\"},\"references\":[{\"id\":\"9f820fbe-ddde-43a2-9402-30bd295c97f6\",\"name\":\"search_0\",\"type\":\"search\"}],\"type\":\"visualization\",\"updated_at\":\"2023-02-26T00:34:36.592Z\",\"version\":\"WzY1LDdd\"}" + }, + { + "body": "{\"attributes\":{\"description\":\"\",\"kibanaSavedObjectMeta\":{\"searchSourceJSON\":\"{\\\"query\\\":{\\\"query\\\":\\\"\\\",\\\"language\\\":\\\"kuery\\\"},\\\"filter\\\":[]}\"},\"savedSearchRefName\":\"search_0\",\"title\":\"Top Paths\",\"uiStateJSON\":\"{}\",\"version\":1,\"visState\":\"{\\\"title\\\":\\\"Top Paths\\\",\\\"type\\\":\\\"table\\\",\\\"aggs\\\":[{\\\"id\\\":\\\"1\\\",\\\"enabled\\\":true,\\\"type\\\":\\\"count\\\",\\\"params\\\":{},\\\"schema\\\":\\\"metric\\\"},{\\\"id\\\":\\\"2\\\",\\\"enabled\\\":true,\\\"type\\\":\\\"terms\\\",\\\"params\\\":{\\\"field\\\":\\\"http.url\\\",\\\"orderBy\\\":\\\"1\\\",\\\"order\\\":\\\"desc\\\",\\\"size\\\":10,\\\"otherBucket\\\":false,\\\"otherBucketLabel\\\":\\\"Other\\\",\\\"missingBucket\\\":false,\\\"missingBucketLabel\\\":\\\"Missing\\\",\\\"customLabel\\\":\\\"Paths\\\"},\\\"schema\\\":\\\"bucket\\\"}],\\\"params\\\":{\\\"perPage\\\":10,\\\"showPartialRows\\\":false,\\\"showMetricsAtAllLevels\\\":false,\\\"showTotal\\\":false,\\\"totalFunc\\\":\\\"sum\\\",\\\"percentageCol\\\":\\\"\\\"}}\"},\"id\":\"dc1803f0-b478-11ed-9063-ebe46f9ac203\",\"migrationVersion\":{\"visualization\":\"7.10.0\"},\"references\":[{\"id\":\"d80e05b2-518c-4c3d-9651-4c9d8632dce4\",\"name\":\"search_0\",\"type\":\"search\"}],\"type\":\"visualization\",\"updated_at\":\"2023-02-26T00:34:36.592Z\",\"version\":\"WzY2LDdd\"}" + }, + { + "body": "{\"attributes\":{\"description\":\"\",\"kibanaSavedObjectMeta\":{\"searchSourceJSON\":\"{\\\"query\\\":{\\\"query\\\":\\\"\\\",\\\"language\\\":\\\"kuery\\\"},\\\"filter\\\":[]}\"},\"savedSearchRefName\":\"search_0\",\"title\":\"Data Volume\",\"uiStateJSON\":\"{}\",\"version\":1,\"visState\":\"{\\\"title\\\":\\\"Data Volume\\\",\\\"type\\\":\\\"area\\\",\\\"aggs\\\":[{\\\"id\\\":\\\"1\\\",\\\"enabled\\\":true,\\\"type\\\":\\\"sum\\\",\\\"params\\\":{\\\"field\\\":\\\"http.response.bytes\\\",\\\"customLabel\\\":\\\"Response Bytes\\\"},\\\"schema\\\":\\\"metric\\\"},{\\\"id\\\":\\\"2\\\",\\\"enabled\\\":true,\\\"type\\\":\\\"date_histogram\\\",\\\"params\\\":{\\\"field\\\":\\\"observerTime\\\",\\\"timeRange\\\":{\\\"from\\\":\\\"now-15m\\\",\\\"to\\\":\\\"now\\\"},\\\"useNormalizedOpenSearchInterval\\\":true,\\\"scaleMetricValues\\\":false,\\\"interval\\\":\\\"auto\\\",\\\"drop_partials\\\":false,\\\"min_doc_count\\\":1,\\\"extended_bounds\\\":{},\\\"customLabel\\\":\\\"\\\"},\\\"schema\\\":\\\"segment\\\"}],\\\"params\\\":{\\\"type\\\":\\\"area\\\",\\\"grid\\\":{\\\"categoryLines\\\":false},\\\"categoryAxes\\\":[{\\\"id\\\":\\\"CategoryAxis-1\\\",\\\"type\\\":\\\"category\\\",\\\"position\\\":\\\"bottom\\\",\\\"show\\\":true,\\\"style\\\":{},\\\"scale\\\":{\\\"type\\\":\\\"linear\\\"},\\\"labels\\\":{\\\"show\\\":true,\\\"filter\\\":true,\\\"truncate\\\":100},\\\"title\\\":{}}],\\\"valueAxes\\\":[{\\\"id\\\":\\\"ValueAxis-1\\\",\\\"name\\\":\\\"LeftAxis-1\\\",\\\"type\\\":\\\"value\\\",\\\"position\\\":\\\"left\\\",\\\"show\\\":true,\\\"style\\\":{},\\\"scale\\\":{\\\"type\\\":\\\"linear\\\",\\\"mode\\\":\\\"normal\\\"},\\\"labels\\\":{\\\"show\\\":true,\\\"rotate\\\":0,\\\"filter\\\":false,\\\"truncate\\\":100},\\\"title\\\":{\\\"text\\\":\\\"Response Bytes\\\"}}],\\\"seriesParams\\\":[{\\\"show\\\":true,\\\"type\\\":\\\"area\\\",\\\"mode\\\":\\\"stacked\\\",\\\"data\\\":{\\\"label\\\":\\\"Response Bytes\\\",\\\"id\\\":\\\"1\\\"},\\\"drawLinesBetweenPoints\\\":true,\\\"lineWidth\\\":2,\\\"showCircles\\\":true,\\\"interpolate\\\":\\\"linear\\\",\\\"valueAxis\\\":\\\"ValueAxis-1\\\"}],\\\"addTooltip\\\":true,\\\"addLegend\\\":true,\\\"legendPosition\\\":\\\"right\\\",\\\"times\\\":[],\\\"addTimeMarker\\\":false,\\\"thresholdLine\\\":{\\\"show\\\":false,\\\"value\\\":10,\\\"width\\\":1,\\\"style\\\":\\\"full\\\",\\\"color\\\":\\\"#E7664C\\\"},\\\"labels\\\":{}}}\"},\"id\":\"99acc580-b47a-11ed-9063-ebe46f9ac203\",\"migrationVersion\":{\"visualization\":\"7.10.0\"},\"references\":[{\"id\":\"d80e05b2-518c-4c3d-9651-4c9d8632dce4\",\"name\":\"search_0\",\"type\":\"search\"}],\"type\":\"visualization\",\"updated_at\":\"2023-02-26T00:34:36.592Z\",\"version\":\"WzY3LDdd\"}" + }, + { + "body": "{\"attributes\":{\"description\":\"requests per minute aggregation\",\"kibanaSavedObjectMeta\":{\"searchSourceJSON\":\"{\\\"query\\\":{\\\"query\\\":\\\"\\\",\\\"language\\\":\\\"kuery\\\"},\\\"filter\\\":[],\\\"indexRefName\\\":\\\"kibanaSavedObjectMeta.searchSourceJSON.index\\\"}\"},\"title\":\"Req-per-min\",\"uiStateJSON\":\"{}\",\"version\":1,\"visState\":\"{\\\"title\\\":\\\"Req-per-min\\\",\\\"type\\\":\\\"table\\\",\\\"aggs\\\":[{\\\"id\\\":\\\"1\\\",\\\"enabled\\\":true,\\\"type\\\":\\\"moving_avg\\\",\\\"params\\\":{\\\"metricAgg\\\":\\\"custom\\\",\\\"customMetric\\\":{\\\"id\\\":\\\"1-metric\\\",\\\"enabled\\\":true,\\\"type\\\":\\\"count\\\",\\\"params\\\":{}},\\\"window\\\":5,\\\"script\\\":\\\"MovingFunctions.unweightedAvg(values)\\\"},\\\"schema\\\":\\\"metric\\\"},{\\\"id\\\":\\\"2\\\",\\\"enabled\\\":true,\\\"type\\\":\\\"date_histogram\\\",\\\"params\\\":{\\\"field\\\":\\\"@timestamp\\\",\\\"timeRange\\\":{\\\"from\\\":\\\"2023-02-24T17:25:00.000Z\\\",\\\"to\\\":\\\"2023-02-24T17:30:00.000Z\\\"},\\\"useNormalizedOpenSearchInterval\\\":true,\\\"scaleMetricValues\\\":false,\\\"interval\\\":\\\"m\\\",\\\"drop_partials\\\":false,\\\"min_doc_count\\\":0,\\\"extended_bounds\\\":{},\\\"customLabel\\\":\\\"Req/Min\\\"},\\\"schema\\\":\\\"bucket\\\"}],\\\"params\\\":{\\\"perPage\\\":10,\\\"showPartialRows\\\":false,\\\"showMetricsAtAllLevels\\\":false,\\\"showTotal\\\":false,\\\"totalFunc\\\":\\\"sum\\\",\\\"percentageCol\\\":\\\"\\\"}}\"},\"id\":\"01ea64d0-b62f-11ed-a677-43d7aa86763b\",\"migrationVersion\":{\"visualization\":\"7.10.0\"},\"references\":[{\"id\":\"47892350-b495-11ed-af0a-cf5c93b5a3b6\",\"name\":\"kibanaSavedObjectMeta.searchSourceJSON.index\",\"type\":\"index-pattern\"}],\"type\":\"visualization\",\"updated_at\":\"2023-02-26T23:40:53.020Z\",\"version\":\"WzcyLDdd\"}" + }, + { + "body": "{\"attributes\":{\"description\":\"Nginx dashboard with basic Observability on access / error logs\",\"hits\":0,\"kibanaSavedObjectMeta\":{\"searchSourceJSON\":\"{\\\"query\\\":{\\\"language\\\":\\\"kuery\\\",\\\"query\\\":\\\"\\\"},\\\"filter\\\":[]}\"},\"optionsJSON\":\"{\\\"hidePanelTitles\\\":false,\\\"useMargins\\\":true}\",\"panelsJSON\":\"[{\\\"version\\\":\\\"2.5.0\\\",\\\"gridData\\\":{\\\"h\\\":8,\\\"i\\\":\\\"1f31e50b-06e3-41e6-972e-e4e5fe1a9872\\\",\\\"w\\\":48,\\\"x\\\":0,\\\"y\\\":0},\\\"panelIndex\\\":\\\"1f31e50b-06e3-41e6-972e-e4e5fe1a9872\\\",\\\"embeddableConfig\\\":{},\\\"panelRefName\\\":\\\"panel_0\\\"},{\\\"version\\\":\\\"2.5.0\\\",\\\"gridData\\\":{\\\"h\\\":9,\\\"i\\\":\\\"d91a8da4-b34b-470a-aca6-9c76b47cd6fb\\\",\\\"w\\\":24,\\\"x\\\":0,\\\"y\\\":8},\\\"panelIndex\\\":\\\"d91a8da4-b34b-470a-aca6-9c76b47cd6fb\\\",\\\"embeddableConfig\\\":{},\\\"panelRefName\\\":\\\"panel_1\\\"},{\\\"version\\\":\\\"2.5.0\\\",\\\"gridData\\\":{\\\"h\\\":15,\\\"i\\\":\\\"27149e5a-3a77-4f3c-800e-8a160c3765f4\\\",\\\"w\\\":24,\\\"x\\\":24,\\\"y\\\":8},\\\"panelIndex\\\":\\\"27149e5a-3a77-4f3c-800e-8a160c3765f4\\\",\\\"embeddableConfig\\\":{},\\\"panelRefName\\\":\\\"panel_2\\\"},{\\\"version\\\":\\\"2.5.0\\\",\\\"gridData\\\":{\\\"x\\\":0,\\\"y\\\":17,\\\"w\\\":24,\\\"h\\\":15,\\\"i\\\":\\\"4d8c2aa7-159c-4a1a-80ff-00a9299056ce\\\"},\\\"panelIndex\\\":\\\"4d8c2aa7-159c-4a1a-80ff-00a9299056ce\\\",\\\"embeddableConfig\\\":{},\\\"panelRefName\\\":\\\"panel_3\\\"},{\\\"version\\\":\\\"2.5.0\\\",\\\"gridData\\\":{\\\"x\\\":24,\\\"y\\\":23,\\\"w\\\":24,\\\"h\\\":15,\\\"i\\\":\\\"800b7f19-f50c-417f-8987-21b930531cbe\\\"},\\\"panelIndex\\\":\\\"800b7f19-f50c-417f-8987-21b930531cbe\\\",\\\"embeddableConfig\\\":{},\\\"panelRefName\\\":\\\"panel_4\\\"}]\",\"timeRestore\":false,\"title\":\"[NGINX Core Logs 1.0] Overview\",\"version\":1},\"id\":\"96847220-5261-44d0-89b4-65f3a659f13a\",\"migrationVersion\":{\"dashboard\":\"7.9.3\"},\"references\":[{\"id\":\"3b49a65d-54d8-483d-a8f0-3d7c855e1ecf\",\"name\":\"panel_0\",\"type\":\"visualization\"},{\"id\":\"865e577b-634b-4a65-b9d6-7e324c395d18\",\"name\":\"panel_1\",\"type\":\"visualization\"},{\"id\":\"dc1803f0-b478-11ed-9063-ebe46f9ac203\",\"name\":\"panel_2\",\"type\":\"visualization\"},{\"id\":\"99acc580-b47a-11ed-9063-ebe46f9ac203\",\"name\":\"panel_3\",\"type\":\"visualization\"},{\"id\":\"01ea64d0-b62f-11ed-a677-43d7aa86763b\",\"name\":\"panel_4\",\"type\":\"visualization\"}],\"type\":\"dashboard\",\"updated_at\":\"2023-02-26T23:44:09.855Z\",\"version\":\"WzczLDdd\"}" + }, + { + "body": "{\"exportedCount\":9,\"missingRefCount\":0,\"missingReferences\":[]}" + } + ] } ] \ No newline at end of file diff --git a/server/adaptors/integrations/integrations_kibana_backend.ts b/server/adaptors/integrations/integrations_kibana_backend.ts index a20bac9d38..ea4d92a7c7 100644 --- a/server/adaptors/integrations/integrations_kibana_backend.ts +++ b/server/adaptors/integrations/integrations_kibana_backend.ts @@ -6,25 +6,7 @@ import { readNDJsonObjects } from './utils'; let repository: IntegrationTemplate[] = []; -const store: IntegrationInstance[] = [ - { - templateName: 'nginx', - type: 'dashboard', - dataset: 'prod', - namespace: 'us_east', - id: 'nginx-prod-us_east', - version: '0.1.0', - description: 'Nginx HTTP server collector for east cost prod systems', - template: - 'https: //github.com/opensearch-project/observability/blob/2.x/integrations/nginx/config.json', - creationDate: '2016-08-29T09: 12: 33.001Z', - author: 'Ani', - status: 'LOADED', - dashboardUrl: - "http://localhost:5601/nol/app/dashboards#/view/96847220-5261-44d0-89b4-65f3a659f13a?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(description:'Nginx%20dashboard%20with%20basic%20Observability%20on%20access%20%2F%20error%20logs',filters:!(),fullScreenMode:!f,options:(hidePanelTitles:!f,useMargins:!t),query:(language:kuery,query:''),timeRestore:!f,title:'%5BNGINX%20Core%20Logs%201.0%5D%20Overview',viewMode:view)", - assets: [], - }, -]; +const store: IntegrationInstance[] = []; const readRepository = async (): Promise => { const buffer = await fs.promises.readFile(__dirname + '/__data__/repository.json', 'utf-8'); @@ -51,7 +33,7 @@ export class IntegrationsKibanaBackend implements IntegrationsAdaptor { } console.log(`Retrieving ${repository.length} templates from catalog`); return Promise.resolve({ - integrations: repository, + hits: repository, }); }; @@ -84,11 +66,11 @@ export class IntegrationsKibanaBackend implements IntegrationsAdaptor { console.log(store); if (query?.added) { return Promise.resolve({ - integrations: store, + hits: store, }); } return Promise.resolve({ - integrations: [], + hits: [], }); }; } From 6c7d55ea92e10d0f58b9ef40ff2796b2230b3861 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Tue, 23 May 2023 14:59:02 -0700 Subject: [PATCH 063/190] Stub template load method Signed-off-by: Simeon Widdis --- server/adaptors/integrations/utils.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/server/adaptors/integrations/utils.ts b/server/adaptors/integrations/utils.ts index b67c12011a..c5197c6aee 100644 --- a/server/adaptors/integrations/utils.ts +++ b/server/adaptors/integrations/utils.ts @@ -32,3 +32,28 @@ export const readNDJsonObjects = async (stream: Readable): Promise => { }); }); }; + +export const loadTemplate = async ( + template: IntegrationTemplate, + options: { + name: string; + dataset: string; + namespace: string; + tags?: string[]; + } +): Promise => { + const instance: IntegrationInstance = { + id: 'unknown', + name: options.name, + templateName: template.name, + dataSource: { + sourceType: template.integrationType, + dataset: options.dataset, + namespace: options.namespace, + }, + creationDate: new Date().toISOString(), + status: 'unknown', + assets: [], + }; + return Promise.reject(new Error('Not implemented')); +}; From 8c08939ce819f17e74c00ca7bd07894468853f4a Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Wed, 24 May 2023 11:47:10 -0700 Subject: [PATCH 064/190] Move integration template conversion stub to class Signed-off-by: Simeon Widdis --- .../integrations/integrations_builder.ts | 55 +++++++++++++++++++ server/adaptors/integrations/types.ts | 40 ++++++++------ server/adaptors/integrations/utils.ts | 25 --------- 3 files changed, 78 insertions(+), 42 deletions(-) create mode 100644 server/adaptors/integrations/integrations_builder.ts diff --git a/server/adaptors/integrations/integrations_builder.ts b/server/adaptors/integrations/integrations_builder.ts new file mode 100644 index 0000000000..4f00cc161c --- /dev/null +++ b/server/adaptors/integrations/integrations_builder.ts @@ -0,0 +1,55 @@ +import { SavedObjectsClientContract } from '../../../../../src/core/server'; + +interface BuilderOptions { + name: string; + dataset: string; + namespace: string; + tags?: string[]; +} + +export class IntegrationInstanceBuilder { + client: SavedObjectsClientContract; + + constructor(client: SavedObjectsClientContract) { + this.client = client; + } + + async build( + template: IntegrationTemplate, + options: BuilderOptions + ): Promise { + const result = this.validate(template) + .then(() => this.post_assets(template.displayAssets)) + .then((refs) => this.build_instance(template, refs, options)); + return result; + } + + async validate(_template: IntegrationTemplate): Promise { + return Promise.resolve(); + } + + async post_assets(_assets: DisplayAsset[]): Promise { + return Promise.resolve([]); + } + + async build_instance( + template: IntegrationTemplate, + refs: AssetReference[], + options: BuilderOptions + ): Promise { + return Promise.resolve({ + id: 'unknown', + name: options.name, + templateName: template.name, + dataSource: { + sourceType: template.integrationType, + dataset: options.dataset, + namespace: options.namespace, + }, + tags: options.tags, + creationDate: new Date().toISOString(), + status: 'unknown', + assets: refs, + }); + } +} diff --git a/server/adaptors/integrations/types.ts b/server/adaptors/integrations/types.ts index 3be8928075..8ca203398a 100644 --- a/server/adaptors/integrations/types.ts +++ b/server/adaptors/integrations/types.ts @@ -22,17 +22,21 @@ interface IntegrationTemplate { } >; }; - components: Array<{ - name: string; - version: string; - description?: string; - sourceUrl?: string; - schemaBody: string; - mappingBody: string; - }>; - displayAssets: Array<{ - body: string; - }>; + components: IntegrationComponent[]; + displayAssets: DisplayAsset[]; +} + +interface IntegrationComponent { + name: string; + version: string; + description?: string; + sourceUrl?: string; + schemaBody: string; + mappingBody: string; +} + +interface DisplayAsset { + body: string; } interface IntegrationTemplateSearchResult { @@ -55,12 +59,14 @@ interface IntegrationInstance { creationDate: string; tags?: string[]; status: string; - assets: Array<{ - assetType: string; - assetUrl: string; - status: string; - isDefaultAsset: boolean; - }>; + assets: AssetReference[]; +} + +interface AssetReference { + assetType: string; + assetUrl: string; + status: string; + isDefaultAsset: boolean; } interface IntegrationInstanceSearchResult { diff --git a/server/adaptors/integrations/utils.ts b/server/adaptors/integrations/utils.ts index c5197c6aee..b67c12011a 100644 --- a/server/adaptors/integrations/utils.ts +++ b/server/adaptors/integrations/utils.ts @@ -32,28 +32,3 @@ export const readNDJsonObjects = async (stream: Readable): Promise => { }); }); }; - -export const loadTemplate = async ( - template: IntegrationTemplate, - options: { - name: string; - dataset: string; - namespace: string; - tags?: string[]; - } -): Promise => { - const instance: IntegrationInstance = { - id: 'unknown', - name: options.name, - templateName: template.name, - dataSource: { - sourceType: template.integrationType, - dataset: options.dataset, - namespace: options.namespace, - }, - creationDate: new Date().toISOString(), - status: 'unknown', - assets: [], - }; - return Promise.reject(new Error('Not implemented')); -}; From 2f8b40cd0fbb392486158739b9ee83bf599d078f Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Wed, 24 May 2023 13:18:00 -0700 Subject: [PATCH 065/190] Add implementation for post_assets Signed-off-by: Simeon Widdis --- .../integrations/integrations_builder.ts | 19 +++++++++++++++++-- server/adaptors/integrations/types.ts | 2 +- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/server/adaptors/integrations/integrations_builder.ts b/server/adaptors/integrations/integrations_builder.ts index 4f00cc161c..711b91d681 100644 --- a/server/adaptors/integrations/integrations_builder.ts +++ b/server/adaptors/integrations/integrations_builder.ts @@ -25,11 +25,26 @@ export class IntegrationInstanceBuilder { } async validate(_template: IntegrationTemplate): Promise { + // Assuming everything is valid for now return Promise.resolve(); } - async post_assets(_assets: DisplayAsset[]): Promise { - return Promise.resolve([]); + async post_assets(assets: DisplayAsset[]): Promise { + try { + const deserializedAssets = assets.map((asset) => JSON.parse(asset.body)); + const response = await this.client.bulkCreate(deserializedAssets); + const refs: AssetReference[] = response.saved_objects.map((obj) => { + return { + assetType: obj.type, + assetId: obj.id, + status: 'available', // Assuming a successfully created object is available + isDefaultAsset: obj.type === 'dashboard', // Assuming for now that dashboards are default + }; + }); + return Promise.resolve(refs); + } catch (err: any) { + return Promise.reject(err); + } } async build_instance( diff --git a/server/adaptors/integrations/types.ts b/server/adaptors/integrations/types.ts index 8ca203398a..d49f7a9b52 100644 --- a/server/adaptors/integrations/types.ts +++ b/server/adaptors/integrations/types.ts @@ -64,7 +64,7 @@ interface IntegrationInstance { interface AssetReference { assetType: string; - assetUrl: string; + assetId: string; status: string; isDefaultAsset: boolean; } From fd4a7ad5bc9876151d0577649c110b52ed7b822c Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Wed, 24 May 2023 14:13:37 -0700 Subject: [PATCH 066/190] Patch new integrations into E2E workflow Signed-off-by: Simeon Widdis --- .../available_integration_card_view.tsx | 14 ++++--- .../available_integration_overview_page.tsx | 6 +-- .../integrations/__data__/repository.json | 2 +- .../integrations/integrations_adaptor.ts | 2 + .../integrations_kibana_backend.ts | 39 ++++++++++++++----- .../integrations/integrations_router.ts | 21 +--------- 6 files changed, 46 insertions(+), 38 deletions(-) diff --git a/public/components/integrations/components/available_integration_card_view.tsx b/public/components/integrations/components/available_integration_card_view.tsx index 28594da0de..8164d2ba71 100644 --- a/public/components/integrations/components/available_integration_card_view.tsx +++ b/public/components/integrations/components/available_integration_card_view.tsx @@ -7,7 +7,6 @@ import { } from './available_integration_overview_page'; export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardViewProps) { - console.log(props); const rowNumber = _.ceil(props.records / 5); const getImage = (url?: string) => { @@ -21,6 +20,7 @@ export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardVi }; const renderRows = (integrations: AvailableIntegrationType[]) => { + console.log(integrations.length); if (!integrations || !integrations.length) return null; return ( <> @@ -33,15 +33,15 @@ export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardVi layout="vertical" icon={getImage(i.assetUrl)} titleSize="xs" - title={i.templateName} + title={i.name} description={i.description} - data-test-subj={`homeSynopsisLink${i.templateName.toLowerCase()}`} + data-test-subj={`homeSynopsisLink${i.name.toLowerCase()}`} footer={
{ - window.location.assign(`#/available/${i.templateName}`); + window.location.assign(`#/available/${i.name}`); }} > View Details @@ -50,7 +50,7 @@ export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardVi { - props.showModal(i.templateName); + props.showModal(i.name); }} size="s" > @@ -68,5 +68,7 @@ export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardVi ); }; - return <>{renderRows(props.data.data?.integrations)}; + console.log('MARKER'); + console.log(props); + return <>{props.data.data === undefined ? props.data.hits : renderRows(props.data.data.hits)}; } diff --git a/public/components/integrations/components/available_integration_overview_page.tsx b/public/components/integrations/components/available_integration_overview_page.tsx index ab38ee7ba2..1affb32a86 100644 --- a/public/components/integrations/components/available_integration_overview_page.tsx +++ b/public/components/integrations/components/available_integration_overview_page.tsx @@ -34,7 +34,7 @@ interface AppTableProps extends AppAnalyticsComponentDeps { } export interface AvailableIntegrationType { - templateName: string; + name: string; description: string; status: string; assetUrl?: string | undefined; @@ -48,7 +48,7 @@ export interface AvailableIntegrationsTableProps { } export interface AvailableIntegrationsList { - data: AvailableIntegrationType[]; + hits: AvailableIntegrationType[]; } export interface AvailableIntegrationsCardViewProps { @@ -62,7 +62,7 @@ export function AvailableIntegrationOverviewPage(props: AppTableProps) { const [isCardView, setCardView] = useState(true); const [toasts, setToasts] = useState([]); - const [data, setData] = useState({ data: [] }); + const [data, setData] = useState({ hits: [] }); const [isModalVisible, setIsModalVisible] = useState(false); const [modalLayout, setModalLayout] = useState(); diff --git a/server/adaptors/integrations/__data__/repository.json b/server/adaptors/integrations/__data__/repository.json index 97076783d3..53087c0611 100644 --- a/server/adaptors/integrations/__data__/repository.json +++ b/server/adaptors/integrations/__data__/repository.json @@ -1,6 +1,6 @@ [ { - "templateName": "nginx", + "name": "nginx", "version": "1.0.0", "integrationType": "logs", "description": "Nginx HTTP server collector", diff --git a/server/adaptors/integrations/integrations_adaptor.ts b/server/adaptors/integrations/integrations_adaptor.ts index f1e934a397..1ee2745f56 100644 --- a/server/adaptors/integrations/integrations_adaptor.ts +++ b/server/adaptors/integrations/integrations_adaptor.ts @@ -15,4 +15,6 @@ export interface IntegrationsAdaptor { getIntegrationInstances: ( query?: IntegrationInstanceQuery ) => Promise; + + loadIntegrationInstance: (templateName: string) => Promise; } diff --git a/server/adaptors/integrations/integrations_kibana_backend.ts b/server/adaptors/integrations/integrations_kibana_backend.ts index ea4d92a7c7..1aeb67faaa 100644 --- a/server/adaptors/integrations/integrations_kibana_backend.ts +++ b/server/adaptors/integrations/integrations_kibana_backend.ts @@ -3,6 +3,7 @@ import { IntegrationsAdaptor } from './integrations_adaptor'; import { SavedObjectsBulkCreateObject } from '../../../../../src/core/public'; import { SavedObjectsClientContract } from '../../../../../src/core/server/types'; import { readNDJsonObjects } from './utils'; +import { IntegrationInstanceBuilder } from './integrations_builder'; let repository: IntegrationTemplate[] = []; @@ -45,7 +46,7 @@ export class IntegrationsKibanaBackend implements IntegrationsAdaptor { return assets; }; - loadRepository(): Promise { + loadRepository = (): Promise => { const toCreate: SavedObjectsBulkCreateObject[] = repository.map((template) => { return { type: 'integration-template', @@ -58,19 +59,39 @@ export class IntegrationsKibanaBackend implements IntegrationsAdaptor { } catch (err: any) { return Promise.reject(err); } - } + }; getIntegrationInstances = ( query?: IntegrationInstanceQuery ): Promise => { - console.log(store); - if (query?.added) { - return Promise.resolve({ - hits: store, - }); - } return Promise.resolve({ - hits: [], + hits: store, + }); + }; + + loadIntegrationInstance = async (templateName: string): Promise => { + for (const template of repository) { + if (template.name !== templateName) { + continue; + } + try { + const result = await new IntegrationInstanceBuilder(this.client).build(template, { + name: 'Placeholder Nginx Integration', + dataset: 'nginx', + namespace: 'prod', + }); + store.push(result); + return Promise.resolve(result); + } catch (err: any) { + return Promise.reject({ + message: err.toString(), + statusCode: 500, + }); + } + } + return Promise.reject({ + message: `Template ${templateName} not found`, + statusCode: 404, }); }; } diff --git a/server/routes/integrations/integrations_router.ts b/server/routes/integrations/integrations_router.ts index a5b2f17900..6330aff2a4 100644 --- a/server/routes/integrations/integrations_router.ts +++ b/server/routes/integrations/integrations_router.ts @@ -14,7 +14,7 @@ import { } from '../../../../../src/core/server/http/router'; import { IntegrationsKibanaBackend } from '../../adaptors/integrations/integrations_kibana_backend'; -let added = false; +const added = false; /** * Handle an `OpenSearchDashboardsRequest` using the provided `callback` function. @@ -81,24 +81,7 @@ export function registerIntegrationsRoute(router: IRouter) { async (context, request, response): Promise => { const adaptor = getAdaptor(context, request); return handleWithCallback(adaptor, response, async (a: IntegrationsAdaptor) => { - const assets = await a.getAssets('nginx'); - added = true; - return context.core.savedObjects.client.bulkCreate(assets); - }); - } - ); - - router.post( - { - path: `${INTEGRATIONS_BASE}/test_load`, - validate: false, - }, - async (context, request, response): Promise => { - const adaptor = getAdaptor(context, request) as IntegrationsAdaptor; - return handleWithCallback(adaptor, response, async (a: IntegrationsAdaptor) => { - const unwrapped = a as IntegrationsKibanaBackend; - await unwrapped.loadRepository(); - return {}; + return a.loadIntegrationInstance('nginx'); }); } ); From 5e46e9e57e065eacbd7c7c4d6e273541206b0994 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Wed, 24 May 2023 14:42:02 -0700 Subject: [PATCH 067/190] Tweak frontend for integration type changes Signed-off-by: Simeon Widdis --- .../components/added_integration_overview_page.tsx | 6 +++--- .../components/added_integration_table.tsx | 11 +++++++---- .../components/available_integration_card_view.tsx | 1 - server/adaptors/integrations/integrations_builder.ts | 1 + .../integrations/integrations_kibana_backend.ts | 2 +- server/adaptors/integrations/types.ts | 1 + 6 files changed, 13 insertions(+), 9 deletions(-) diff --git a/public/components/integrations/components/added_integration_overview_page.tsx b/public/components/integrations/components/added_integration_overview_page.tsx index b1331314df..9baa00230d 100644 --- a/public/components/integrations/components/added_integration_overview_page.tsx +++ b/public/components/integrations/components/added_integration_overview_page.tsx @@ -29,7 +29,7 @@ export interface AddedIntegrationsTableProps { } export interface AddedIntegrationsList { - data: AddedIntegrationType[]; + hits: AddedIntegrationType[]; } export interface AddedIntegrationType { @@ -39,7 +39,7 @@ export interface AddedIntegrationType { export function AddedIntegrationOverviewPage(props: AppTableProps) { const { chrome, parentBreadcrumbs, http } = props; - const [data, setData] = useState({ data: [] }); + const [data, setData] = useState({ hits: [] }); useEffect(() => { chrome.setBreadcrumbs([ @@ -59,7 +59,7 @@ export function AddedIntegrationOverviewPage(props: AppTableProps) { async function handleDataRequest() { http.get(`${INTEGRATIONS_BASE}/store/list_added`).then((exists) => setData({ - data: exists.data.integrations, + data: exists.data, }) ); } diff --git a/public/components/integrations/components/added_integration_table.tsx b/public/components/integrations/components/added_integration_table.tsx index 9d6b99b7da..6c8c0927b4 100644 --- a/public/components/integrations/components/added_integration_table.tsx +++ b/public/components/integrations/components/added_integration_table.tsx @@ -18,7 +18,8 @@ import React from 'react'; import { AddedIntegrationsTableProps } from './added_integration_overview_page'; export function AddedIntegrationsTable(props: AddedIntegrationsTableProps) { - const integrations = props.data.data; + console.log(props); + const integrations = props.data.data ? props.data.data.hits : props.data.hits; const tableColumns = [ { @@ -30,9 +31,11 @@ export function AddedIntegrationsTable(props: AddedIntegrationsTableProps) { asset.isDefaultAsset)[0].assetId + }`} > - {_.truncate(record.id, { length: 100 })} + {_.truncate(record.name, { length: 100 })} ), }, @@ -79,7 +82,7 @@ export function AddedIntegrationsTable(props: AddedIntegrationsTableProps) { truncateText: true, render: (value, record) => ( - {_.truncate(record.author, { length: 100 })} + {_.truncate(record.addedBy, { length: 100 })} ), }, diff --git a/public/components/integrations/components/available_integration_card_view.tsx b/public/components/integrations/components/available_integration_card_view.tsx index 8164d2ba71..5321bf0102 100644 --- a/public/components/integrations/components/available_integration_card_view.tsx +++ b/public/components/integrations/components/available_integration_card_view.tsx @@ -68,7 +68,6 @@ export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardVi ); }; - console.log('MARKER'); console.log(props); return <>{props.data.data === undefined ? props.data.hits : renderRows(props.data.data.hits)}; } diff --git a/server/adaptors/integrations/integrations_builder.ts b/server/adaptors/integrations/integrations_builder.ts index 711b91d681..399442ecba 100644 --- a/server/adaptors/integrations/integrations_builder.ts +++ b/server/adaptors/integrations/integrations_builder.ts @@ -65,6 +65,7 @@ export class IntegrationInstanceBuilder { creationDate: new Date().toISOString(), status: 'unknown', assets: refs, + addedBy: 'unknown', }); } } diff --git a/server/adaptors/integrations/integrations_kibana_backend.ts b/server/adaptors/integrations/integrations_kibana_backend.ts index 1aeb67faaa..3010d272a5 100644 --- a/server/adaptors/integrations/integrations_kibana_backend.ts +++ b/server/adaptors/integrations/integrations_kibana_backend.ts @@ -62,7 +62,7 @@ export class IntegrationsKibanaBackend implements IntegrationsAdaptor { }; getIntegrationInstances = ( - query?: IntegrationInstanceQuery + _query?: IntegrationInstanceQuery ): Promise => { return Promise.resolve({ hits: store, diff --git a/server/adaptors/integrations/types.ts b/server/adaptors/integrations/types.ts index d49f7a9b52..b99f8bd4ff 100644 --- a/server/adaptors/integrations/types.ts +++ b/server/adaptors/integrations/types.ts @@ -59,6 +59,7 @@ interface IntegrationInstance { creationDate: string; tags?: string[]; status: string; + addedBy?: string; assets: AssetReference[]; } From 575a41673d2dbc2f463f40cb47e053fccdc0c46e Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Wed, 24 May 2023 15:22:24 -0700 Subject: [PATCH 068/190] Fix integration data deserialization Signed-off-by: Simeon Widdis --- .../added_integration_overview_page.tsx | 6 +-- .../components/added_integration_table.tsx | 2 +- .../available_integration_card_view.tsx | 4 +- .../available_integration_overview_page.tsx | 47 +------------------ 4 files changed, 4 insertions(+), 55 deletions(-) diff --git a/public/components/integrations/components/added_integration_overview_page.tsx b/public/components/integrations/components/added_integration_overview_page.tsx index 9baa00230d..92ad3b6e37 100644 --- a/public/components/integrations/components/added_integration_overview_page.tsx +++ b/public/components/integrations/components/added_integration_overview_page.tsx @@ -57,11 +57,7 @@ export function AddedIntegrationOverviewPage(props: AppTableProps) { }, []); async function handleDataRequest() { - http.get(`${INTEGRATIONS_BASE}/store/list_added`).then((exists) => - setData({ - data: exists.data, - }) - ); + http.get(`${INTEGRATIONS_BASE}/store/list_added`).then((exists) => setData(exists.data)); } return ( diff --git a/public/components/integrations/components/added_integration_table.tsx b/public/components/integrations/components/added_integration_table.tsx index 6c8c0927b4..dc301b602c 100644 --- a/public/components/integrations/components/added_integration_table.tsx +++ b/public/components/integrations/components/added_integration_table.tsx @@ -19,7 +19,7 @@ import { AddedIntegrationsTableProps } from './added_integration_overview_page'; export function AddedIntegrationsTable(props: AddedIntegrationsTableProps) { console.log(props); - const integrations = props.data.data ? props.data.data.hits : props.data.hits; + const integrations = props.data.hits; const tableColumns = [ { diff --git a/public/components/integrations/components/available_integration_card_view.tsx b/public/components/integrations/components/available_integration_card_view.tsx index 5321bf0102..0c611bedd6 100644 --- a/public/components/integrations/components/available_integration_card_view.tsx +++ b/public/components/integrations/components/available_integration_card_view.tsx @@ -20,7 +20,6 @@ export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardVi }; const renderRows = (integrations: AvailableIntegrationType[]) => { - console.log(integrations.length); if (!integrations || !integrations.length) return null; return ( <> @@ -68,6 +67,5 @@ export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardVi ); }; - console.log(props); - return <>{props.data.data === undefined ? props.data.hits : renderRows(props.data.data.hits)}; + return <>{renderRows(props.data.hits)}; } diff --git a/public/components/integrations/components/available_integration_overview_page.tsx b/public/components/integrations/components/available_integration_overview_page.tsx index 1affb32a86..506a2879e5 100644 --- a/public/components/integrations/components/available_integration_overview_page.tsx +++ b/public/components/integrations/components/available_integration_overview_page.tsx @@ -91,51 +91,6 @@ export function AvailableIntegrationOverviewPage(props: AppTableProps) { setIsModalVisible(true); }; - // const data: AvailableIntegrationType[] = [ - // { - // name: 'nginx', - // description: - // 'Open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server', - // status: 'Available', - // assetUrl: 'https://www.shareicon.net/data/256x256/2017/06/28/888041_logo_512x512.png', - // }, - // { - // name: 'nginx', - // description: - // 'Open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server', - // status: 'Available', - // assetUrl: 'https://www.shareicon.net/data/256x256/2017/06/28/888041_logo_512x512.png', - // }, - // { - // name: 'nginx', - // description: - // 'Open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server', - // status: 'Available', - // assetUrl: 'https://www.shareicon.net/data/256x256/2017/06/28/888041_logo_512x512.png', - // }, - // { - // name: 'nginx', - // description: - // 'Open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server', - // status: 'Available', - // assetUrl: 'https://www.shareicon.net/data/256x256/2017/06/28/888041_logo_512x512.png', - // }, - // { - // name: 'nginx', - // description: - // 'Open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server', - // status: 'Available', - // assetUrl: 'https://www.shareicon.net/data/256x256/2017/06/28/888041_logo_512x512.png', - // }, - // { - // name: 'nginx', - // description: - // 'Open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server', - // status: 'Available', - // assetUrl: 'https://www.shareicon.net/data/256x256/2017/06/28/888041_logo_512x512.png', - // }, - // ]; - useEffect(() => { chrome.setBreadcrumbs([ ...parentBreadcrumbs, @@ -148,7 +103,7 @@ export function AvailableIntegrationOverviewPage(props: AppTableProps) { }, []); async function handleDataRequest() { - http.get(`${INTEGRATIONS_BASE}/repository`).then((exists) => setData(exists)); + http.get(`${INTEGRATIONS_BASE}/repository`).then((exists) => setData(exists.data)); } const setToast = (title: string, color = 'success', text?: ReactChild) => { From 27dbf00f248b43078c93357af59018efe29caee5 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Thu, 25 May 2023 11:59:16 -0700 Subject: [PATCH 069/190] Add stubs for handling statics Signed-off-by: Simeon Widdis --- .../available_integration_card_view.tsx | 3 ++- .../integrations/__data__/repository.json | 2 +- .../integrations/integrations_adaptor.ts | 2 ++ .../integrations_kibana_backend.ts | 15 ++++++++++++ server/adaptors/integrations/types.ts | 15 ++++++------ .../integrations/integrations_router.ts | 24 +++++++++++++++++++ 6 files changed, 51 insertions(+), 10 deletions(-) diff --git a/public/components/integrations/components/available_integration_card_view.tsx b/public/components/integrations/components/available_integration_card_view.tsx index 0c611bedd6..3cef7f30d3 100644 --- a/public/components/integrations/components/available_integration_card_view.tsx +++ b/public/components/integrations/components/available_integration_card_view.tsx @@ -5,6 +5,7 @@ import { AvailableIntegrationsCardViewProps, AvailableIntegrationType, } from './available_integration_overview_page'; +import { INTEGRATIONS_BASE } from '../../../../common/constants/shared'; export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardViewProps) { const rowNumber = _.ceil(props.records / 5); @@ -30,7 +31,7 @@ export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardVi Promise; loadIntegrationInstance: (templateName: string) => Promise; + + getStatic: (templateName: string, path: string) => Promise; } diff --git a/server/adaptors/integrations/integrations_kibana_backend.ts b/server/adaptors/integrations/integrations_kibana_backend.ts index 3010d272a5..b9bd0c658b 100644 --- a/server/adaptors/integrations/integrations_kibana_backend.ts +++ b/server/adaptors/integrations/integrations_kibana_backend.ts @@ -94,4 +94,19 @@ export class IntegrationsKibanaBackend implements IntegrationsAdaptor { statusCode: 404, }); }; + + getStatic = async (templateName: string, path: string): Promise => { + if (repository.length === 0) { + await readRepository(); + } + const map = repository[0].statics?.assets!; + const data = map[path]; + if (data === undefined) { + return Promise.reject({ + message: `Asset ${path} not found`, + statusCode: 404, + }); + } + return Promise.resolve(data); + }; } diff --git a/server/adaptors/integrations/types.ts b/server/adaptors/integrations/types.ts index b99f8bd4ff..7006dd8be7 100644 --- a/server/adaptors/integrations/types.ts +++ b/server/adaptors/integrations/types.ts @@ -13,19 +13,18 @@ interface IntegrationTemplate { darkModeLogo?: string; // Fallback to light mode if absent darkModeGallery?: string[]; }; - assets?: Map< - string, - { - mimeType: string; - annotation?: string; - data: string; - } - >; + assets?: Map; }; components: IntegrationComponent[]; displayAssets: DisplayAsset[]; } +interface StaticAsset { + mimeType: string; + annotation?: string; + data: string; +} + interface IntegrationComponent { name: string; version: string; diff --git a/server/routes/integrations/integrations_router.ts b/server/routes/integrations/integrations_router.ts index 6330aff2a4..83500e5d74 100644 --- a/server/routes/integrations/integrations_router.ts +++ b/server/routes/integrations/integrations_router.ts @@ -99,6 +99,30 @@ export function registerIntegrationsRoute(router: IRouter) { } ); + router.get( + { + path: `${INTEGRATIONS_BASE}/repository/nginx/static/logo`, + validate: false, + }, + async (context, request, response): Promise => { + const adaptor = getAdaptor(context, request); + try { + const logo = await adaptor.getStatic('nginx', '/logo'); + return response.ok({ + headers: { + 'Content-Type': logo.mimeType, + }, + body: Buffer.from(logo.data, 'base64'), + }); + } catch (err: any) { + return response.custom({ + statusCode: err.statusCode ? err.statusCode : 500, + body: err.message, + }); + } + } + ); + router.get( { path: `${OBSERVABILITY_BASE}/store`, From 07095b117c3cdd116dd8e0af578e002d6169812a Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Thu, 25 May 2023 13:36:06 -0700 Subject: [PATCH 070/190] Fill in body of getStatic Signed-off-by: Simeon Widdis --- .../integrations_kibana_backend.ts | 24 ++++++++++++------- server/adaptors/integrations/types.ts | 4 +++- .../integrations/integrations_router.ts | 12 +++++++--- 3 files changed, 28 insertions(+), 12 deletions(-) diff --git a/server/adaptors/integrations/integrations_kibana_backend.ts b/server/adaptors/integrations/integrations_kibana_backend.ts index b9bd0c658b..ae2c98fa62 100644 --- a/server/adaptors/integrations/integrations_kibana_backend.ts +++ b/server/adaptors/integrations/integrations_kibana_backend.ts @@ -99,14 +99,22 @@ export class IntegrationsKibanaBackend implements IntegrationsAdaptor { if (repository.length === 0) { await readRepository(); } - const map = repository[0].statics?.assets!; - const data = map[path]; - if (data === undefined) { - return Promise.reject({ - message: `Asset ${path} not found`, - statusCode: 404, - }); + for (const item of repository) { + if (item.name !== templateName) { + continue; + } + const data = item.statics?.assets?.[path]; + if (data === undefined) { + return Promise.reject({ + message: `Asset ${path} not found`, + statusCode: 404, + }); + } + return Promise.resolve(data); } - return Promise.resolve(data); + return Promise.reject({ + message: `Template ${templateName} not found`, + statusCode: 404, + }); }; } diff --git a/server/adaptors/integrations/types.ts b/server/adaptors/integrations/types.ts index 7006dd8be7..1900279d56 100644 --- a/server/adaptors/integrations/types.ts +++ b/server/adaptors/integrations/types.ts @@ -13,7 +13,9 @@ interface IntegrationTemplate { darkModeLogo?: string; // Fallback to light mode if absent darkModeGallery?: string[]; }; - assets?: Map; + assets?: { + [key: string]: StaticAsset; + }; }; components: IntegrationComponent[]; displayAssets: DisplayAsset[]; diff --git a/server/routes/integrations/integrations_router.ts b/server/routes/integrations/integrations_router.ts index 83500e5d74..c68e774f6f 100644 --- a/server/routes/integrations/integrations_router.ts +++ b/server/routes/integrations/integrations_router.ts @@ -5,6 +5,7 @@ import fetch from 'node-fetch'; import * as fs from 'fs'; +import { schema } from '@osd/config-schema'; import { IRouter, RequestHandlerContext } from '../../../../../src/core/server'; import { INTEGRATIONS_BASE, OBSERVABILITY_BASE } from '../../../common/constants/shared'; import { IntegrationsAdaptor } from '../../adaptors/integrations/integrations_adaptor'; @@ -101,13 +102,18 @@ export function registerIntegrationsRoute(router: IRouter) { router.get( { - path: `${INTEGRATIONS_BASE}/repository/nginx/static/logo`, - validate: false, + path: `${INTEGRATIONS_BASE}/repository/{id}/static/{path}`, + validate: { + params: schema.object({ + id: schema.string(), + path: schema.string(), + }), + }, }, async (context, request, response): Promise => { const adaptor = getAdaptor(context, request); try { - const logo = await adaptor.getStatic('nginx', '/logo'); + const logo = await adaptor.getStatic(request.params.id, `/${request.params.path}`); return response.ok({ headers: { 'Content-Type': logo.mimeType, From 7eef35cb6c99d2fb6d6a1669543aaec4895986f8 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Thu, 25 May 2023 13:40:37 -0700 Subject: [PATCH 071/190] Remove unused load method Signed-off-by: Simeon Widdis --- .../integrations/integrations_kibana_backend.ts | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/server/adaptors/integrations/integrations_kibana_backend.ts b/server/adaptors/integrations/integrations_kibana_backend.ts index ae2c98fa62..90e5a3b317 100644 --- a/server/adaptors/integrations/integrations_kibana_backend.ts +++ b/server/adaptors/integrations/integrations_kibana_backend.ts @@ -46,21 +46,6 @@ export class IntegrationsKibanaBackend implements IntegrationsAdaptor { return assets; }; - loadRepository = (): Promise => { - const toCreate: SavedObjectsBulkCreateObject[] = repository.map((template) => { - return { - type: 'integration-template', - attributes: template, - }; - }); - try { - this.client.bulkCreate(toCreate); - return Promise.resolve(); - } catch (err: any) { - return Promise.reject(err); - } - }; - getIntegrationInstances = ( _query?: IntegrationInstanceQuery ): Promise => { From b66e04ca0cbf2b91273292b0a28bc90e255e9860 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Thu, 25 May 2023 14:02:11 -0700 Subject: [PATCH 072/190] Index loaded integrations in .kibana Signed-off-by: Simeon Widdis --- .../integrations/integrations_builder.ts | 3 +-- .../integrations_kibana_backend.ts | 8 +++++--- server/adaptors/integrations/types.ts | 3 +-- server/plugin.ts | 18 ++++++++++++++++-- 4 files changed, 23 insertions(+), 9 deletions(-) diff --git a/server/adaptors/integrations/integrations_builder.ts b/server/adaptors/integrations/integrations_builder.ts index 399442ecba..cc410d033c 100644 --- a/server/adaptors/integrations/integrations_builder.ts +++ b/server/adaptors/integrations/integrations_builder.ts @@ -53,7 +53,6 @@ export class IntegrationInstanceBuilder { options: BuilderOptions ): Promise { return Promise.resolve({ - id: 'unknown', name: options.name, templateName: template.name, dataSource: { @@ -62,7 +61,7 @@ export class IntegrationInstanceBuilder { namespace: options.namespace, }, tags: options.tags, - creationDate: new Date().toISOString(), + creationDate: new Date(), status: 'unknown', assets: refs, addedBy: 'unknown', diff --git a/server/adaptors/integrations/integrations_kibana_backend.ts b/server/adaptors/integrations/integrations_kibana_backend.ts index 3010d272a5..f0f7418d74 100644 --- a/server/adaptors/integrations/integrations_kibana_backend.ts +++ b/server/adaptors/integrations/integrations_kibana_backend.ts @@ -61,11 +61,13 @@ export class IntegrationsKibanaBackend implements IntegrationsAdaptor { } }; - getIntegrationInstances = ( + getIntegrationInstances = async ( _query?: IntegrationInstanceQuery ): Promise => { + const result = await this.client.find({ type: 'integration-instance' }); return Promise.resolve({ - hits: store, + total: result.total, + hits: result.saved_objects.map((x) => x.attributes) as IntegrationInstance[], }); }; @@ -80,7 +82,7 @@ export class IntegrationsKibanaBackend implements IntegrationsAdaptor { dataset: 'nginx', namespace: 'prod', }); - store.push(result); + this.client.create('integration-instance', result); return Promise.resolve(result); } catch (err: any) { return Promise.reject({ diff --git a/server/adaptors/integrations/types.ts b/server/adaptors/integrations/types.ts index b99f8bd4ff..bd7f17e20c 100644 --- a/server/adaptors/integrations/types.ts +++ b/server/adaptors/integrations/types.ts @@ -48,7 +48,6 @@ interface IntegrationTemplateQuery { } interface IntegrationInstance { - id: string; name: string; templateName: string; dataSource: { @@ -56,7 +55,7 @@ interface IntegrationInstance { dataset: string; namespace: string; }; - creationDate: string; + creationDate: Date; tags?: string[]; status: string; addedBy?: string; diff --git a/server/plugin.ts b/server/plugin.ts index ba38fdadaf..22753b6815 100644 --- a/server/plugin.ts +++ b/server/plugin.ts @@ -84,14 +84,28 @@ export class ObservabilityPlugin namespaceType: 'single', mappings: { dynamic: false, - // TODO fill in the rest of the fields properties: { + name: { + type: 'text', + }, templateName: { type: 'text', }, - description: { + dataSource: { + type: 'nested', + }, + creationDate: { + type: 'date', + }, + tags: { + type: 'nested', + }, + addedBy: { type: 'text', }, + assets: { + type: 'nested', + }, }, }, }; From bf901f0cfce3a83f47e114c2f64ce1ce96e9c2d2 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Thu, 25 May 2023 15:03:33 -0700 Subject: [PATCH 073/190] Remove unused NDJson parsing code Signed-off-by: Simeon Widdis --- .../integrations/__tests__/test.ndjson | 266 ------------------ .../integrations/__tests__/utils.test.ts | 21 -- .../integrations/integrations_adaptor.ts | 2 - .../integrations_kibana_backend.ts | 10 - server/adaptors/integrations/utils.ts | 34 --- 5 files changed, 333 deletions(-) delete mode 100644 server/adaptors/integrations/__tests__/test.ndjson delete mode 100644 server/adaptors/integrations/__tests__/utils.test.ts delete mode 100644 server/adaptors/integrations/utils.ts diff --git a/server/adaptors/integrations/__tests__/test.ndjson b/server/adaptors/integrations/__tests__/test.ndjson deleted file mode 100644 index 777651bbb3..0000000000 --- a/server/adaptors/integrations/__tests__/test.ndjson +++ /dev/null @@ -1,266 +0,0 @@ -{ - "attributes": { - "fields": "[{\"count\":0,\"name\":\"@timestamp\",\"type\":\"date\",\"esTypes\":[\"date\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"_id\",\"type\":\"string\",\"esTypes\":[\"_id\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"count\":0,\"name\":\"_index\",\"type\":\"string\",\"esTypes\":[\"_index\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"count\":0,\"name\":\"_score\",\"type\":\"number\",\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"_source\",\"type\":\"_source\",\"esTypes\":[\"_source\"],\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"_type\",\"type\":\"string\",\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"attributes.data_stream.dataset\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"attributes.data_stream.dataset.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"attributes.data_stream.dataset\"}}},{\"count\":0,\"name\":\"attributes.data_stream.namespace\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"attributes.data_stream.namespace.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"attributes.data_stream.namespace\"}}},{\"count\":0,\"name\":\"attributes.data_stream.type\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"attributes.data_stream.type.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"attributes.data_stream.type\"}}},{\"count\":0,\"name\":\"body\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"body.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"body\"}}},{\"count\":0,\"name\":\"communication.source.address\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"communication.source.address.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"communication.source.address\"}}},{\"count\":0,\"name\":\"communication.source.ip\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"communication.source.ip.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"communication.source.ip\"}}},{\"count\":0,\"name\":\"event.category\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"event.category.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"event.category\"}}},{\"count\":0,\"name\":\"event.domain\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"event.domain.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"event.domain\"}}},{\"count\":0,\"name\":\"event.kind\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"event.kind.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"event.kind\"}}},{\"count\":0,\"name\":\"event.name\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"event.name.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"event.name\"}}},{\"count\":0,\"name\":\"event.result\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"event.result.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"event.result\"}}},{\"count\":0,\"name\":\"event.type\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"event.type.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"event.type\"}}},{\"count\":0,\"name\":\"http.flavor\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"http.flavor.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"http.flavor\"}}},{\"count\":0,\"name\":\"http.request.method\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"http.request.method.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"http.request.method\"}}},{\"count\":0,\"name\":\"http.response.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"http.response.status_code\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"http.response.status_code.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"http.response.status_code\"}}},{\"count\":0,\"name\":\"http.url\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"http.url\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"http.url\"}}},{\"count\":0,\"name\":\"observerTime\",\"type\":\"date\",\"esTypes\":[\"date\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span_id\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span_id.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span_id\"}}},{\"count\":0,\"name\":\"trace_id\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"trace_id.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"trace_id\"}}}]", - "timeFieldName": "@timestamp", - "title": "sso_logs-*-*" - }, - "id": "47892350-b495-11ed-af0a-cf5c93b5a3b6", - "migrationVersion": { - "index-pattern": "7.6.0" - }, - "references": [], - "type": "index-pattern", - "updated_at": "2023-02-26T00:34:36.592Z", - "version": "WzYxLDdd" -} -{ - "attributes": { - "columns": [ - "http.request.method", - "http.response.status_code" - ], - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\n \"highlightAll\": true,\n \"version\": true,\n \"query\": {\n \"query\": \"event.domain:nginx.access\",\n \"language\": \"kuery\"\n },\n \"filter\": [],\n \"indexRefName\": \"kibanaSavedObjectMeta.searchSourceJSON.index\"\n}" - }, - "sort": [], - "title": "[NGINX Core Logs 1.0] Nginx Access Logs", - "version": 1 - }, - "id": "d80e05b2-518c-4c3d-9651-4c9d8632dce4", - "migrationVersion": { - "search": "7.9.3" - }, - "references": [ - { - "id": "47892350-b495-11ed-af0a-cf5c93b5a3b6", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "type": "search", - "updated_at": "2023-02-26T00:34:36.592Z", - "version": "WzYyLDdd" -} -{ - "attributes": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[]}" - }, - "savedSearchRefName": "search_0", - "title": "[NGINX Core Logs 1.0] Response codes over time", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"[NGINX Core Logs 1.0] Response codes over time\",\"type\":\"histogram\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"params\":{},\"schema\":\"metric\"},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"params\":{\"field\":\"@timestamp\",\"timeRange\":{\"from\":\"now-24h\",\"to\":\"now\"},\"useNormalizedOpenSearchInterval\":true,\"scaleMetricValues\":false,\"interval\":\"auto\",\"drop_partials\":false,\"min_doc_count\":1,\"extended_bounds\":{}},\"schema\":\"segment\"},{\"id\":\"3\",\"enabled\":true,\"type\":\"filters\",\"params\":{\"filters\":[{\"input\":{\"query\":\"http.response.status_code:[200 TO 299]\",\"language\":\"lucene\"},\"label\":\"200s\"},{\"input\":{\"query\":\"http.response.status_code:[300 TO 399]\",\"language\":\"lucene\"},\"label\":\"300s\"},{\"input\":{\"query\":\"http.response.status_code:[400 TO 499]\",\"language\":\"lucene\"},\"label\":\"400s\"},{\"input\":{\"query\":\"http.response.status_code:[500 TO 599]\",\"language\":\"lucene\"},\"label\":\"500s\"},{\"input\":{\"query\":\"http.response.status_code:0\",\"language\":\"lucene\"},\"label\":\"0\"}]},\"schema\":\"group\"}],\"params\":{\"type\":\"histogram\",\"grid\":{\"categoryLines\":false},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"filter\":true,\"truncate\":100},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Count\"}}],\"seriesParams\":[{\"show\":true,\"type\":\"histogram\",\"mode\":\"stacked\",\"data\":{\"label\":\"Count\",\"id\":\"1\"},\"valueAxis\":\"ValueAxis-1\",\"drawLinesBetweenPoints\":true,\"lineWidth\":2,\"showCircles\":true}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"times\":[],\"addTimeMarker\":false,\"labels\":{\"show\":false},\"thresholdLine\":{\"show\":false,\"value\":10,\"width\":1,\"style\":\"full\",\"color\":\"#E7664C\"}}}" - }, - "id": "3b49a65d-54d8-483d-a8f0-3d7c855e1ecf", - "migrationVersion": { - "visualization": "7.10.0" - }, - "references": [ - { - "id": "d80e05b2-518c-4c3d-9651-4c9d8632dce4", - "name": "search_0", - "type": "search" - } - ], - "type": "visualization", - "updated_at": "2023-02-26T00:34:36.592Z", - "version": "WzYzLDdd" -} -{ - "attributes": { - "columns": [ - "_source" - ], - "description": "", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\n \"highlightAll\": true,\n \"query\": {\n \"query\": \"http.response.status_code >= 300 and event.domain:nginx.access\",\n \"language\": \"kuery\"\n },\n \"version\": true,\n \"highlight\": {\n \"post_tags\": [\n \"@/kibana-highlighted-field@\"\n ],\n \"fields\": {\n \"*\": {}\n },\n \"pre_tags\": [\n \"@kibana-highlighted-field@\"\n ],\n \"require_field_match\": false,\n \"fragment_size\": 2147483647\n },\n \"filter\": [],\n \"indexRefName\": \"kibanaSavedObjectMeta.searchSourceJSON.index\"\n}" - }, - "sort": [ - [ - "@timestamp", - "desc" - ] - ], - "title": "[NGINX Core Logs 1.0] Nginx Error Logs", - "version": 1 - }, - "id": "9f820fbe-ddde-43a2-9402-30bd295c97f6", - "migrationVersion": { - "search": "7.9.3" - }, - "references": [ - { - "id": "47892350-b495-11ed-af0a-cf5c93b5a3b6", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "type": "search", - "updated_at": "2023-02-26T00:34:36.592Z", - "version": "WzY0LDdd" -} -{ - "attributes": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[]}" - }, - "savedSearchRefName": "search_0", - "title": "[NGINX Core Logs 1.0] Errors over time", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"[NGINX Core Logs 1.0] Errors over time\",\"type\":\"histogram\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"params\":{},\"schema\":\"metric\"},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"params\":{\"field\":\"@timestamp\",\"timeRange\":{\"from\":\"now-24h\",\"to\":\"now\"},\"useNormalizedOpenSearchInterval\":true,\"scaleMetricValues\":false,\"interval\":\"auto\",\"drop_partials\":false,\"min_doc_count\":1,\"extended_bounds\":{}},\"schema\":\"segment\"}],\"params\":{\"type\":\"histogram\",\"grid\":{\"categoryLines\":false},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"filter\":true,\"truncate\":100},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Count\"}}],\"seriesParams\":[{\"show\":true,\"type\":\"histogram\",\"mode\":\"stacked\",\"data\":{\"label\":\"Count\",\"id\":\"1\"},\"valueAxis\":\"ValueAxis-1\",\"drawLinesBetweenPoints\":true,\"lineWidth\":2,\"showCircles\":true}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"times\":[],\"addTimeMarker\":false,\"labels\":{\"show\":false},\"thresholdLine\":{\"show\":false,\"value\":10,\"width\":1,\"style\":\"full\",\"color\":\"#E7664C\"}}}" - }, - "id": "865e577b-634b-4a65-b9d6-7e324c395d18", - "migrationVersion": { - "visualization": "7.10.0" - }, - "references": [ - { - "id": "9f820fbe-ddde-43a2-9402-30bd295c97f6", - "name": "search_0", - "type": "search" - } - ], - "type": "visualization", - "updated_at": "2023-02-26T00:34:36.592Z", - "version": "WzY1LDdd" -} -{ - "attributes": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}" - }, - "savedSearchRefName": "search_0", - "title": "Top Paths", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Top Paths\",\"type\":\"table\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"params\":{},\"schema\":\"metric\"},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"params\":{\"field\":\"http.url\",\"orderBy\":\"1\",\"order\":\"desc\",\"size\":10,\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"customLabel\":\"Paths\"},\"schema\":\"bucket\"}],\"params\":{\"perPage\":10,\"showPartialRows\":false,\"showMetricsAtAllLevels\":false,\"showTotal\":false,\"totalFunc\":\"sum\",\"percentageCol\":\"\"}}" - }, - "id": "dc1803f0-b478-11ed-9063-ebe46f9ac203", - "migrationVersion": { - "visualization": "7.10.0" - }, - "references": [ - { - "id": "d80e05b2-518c-4c3d-9651-4c9d8632dce4", - "name": "search_0", - "type": "search" - } - ], - "type": "visualization", - "updated_at": "2023-02-26T00:34:36.592Z", - "version": "WzY2LDdd" -} -{ - "attributes": { - "description": "", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}" - }, - "savedSearchRefName": "search_0", - "title": "Data Volume", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Data Volume\",\"type\":\"area\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"sum\",\"params\":{\"field\":\"http.response.bytes\",\"customLabel\":\"Response Bytes\"},\"schema\":\"metric\"},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"params\":{\"field\":\"observerTime\",\"timeRange\":{\"from\":\"now-15m\",\"to\":\"now\"},\"useNormalizedOpenSearchInterval\":true,\"scaleMetricValues\":false,\"interval\":\"auto\",\"drop_partials\":false,\"min_doc_count\":1,\"extended_bounds\":{},\"customLabel\":\"\"},\"schema\":\"segment\"}],\"params\":{\"type\":\"area\",\"grid\":{\"categoryLines\":false},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"filter\":true,\"truncate\":100},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Response Bytes\"}}],\"seriesParams\":[{\"show\":true,\"type\":\"area\",\"mode\":\"stacked\",\"data\":{\"label\":\"Response Bytes\",\"id\":\"1\"},\"drawLinesBetweenPoints\":true,\"lineWidth\":2,\"showCircles\":true,\"interpolate\":\"linear\",\"valueAxis\":\"ValueAxis-1\"}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"times\":[],\"addTimeMarker\":false,\"thresholdLine\":{\"show\":false,\"value\":10,\"width\":1,\"style\":\"full\",\"color\":\"#E7664C\"},\"labels\":{}}}" - }, - "id": "99acc580-b47a-11ed-9063-ebe46f9ac203", - "migrationVersion": { - "visualization": "7.10.0" - }, - "references": [ - { - "id": "d80e05b2-518c-4c3d-9651-4c9d8632dce4", - "name": "search_0", - "type": "search" - } - ], - "type": "visualization", - "updated_at": "2023-02-26T00:34:36.592Z", - "version": "WzY3LDdd" -} -{ - "attributes": { - "description": "requests per minute aggregation", - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}" - }, - "title": "Req-per-min", - "uiStateJSON": "{}", - "version": 1, - "visState": "{\"title\":\"Req-per-min\",\"type\":\"table\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"moving_avg\",\"params\":{\"metricAgg\":\"custom\",\"customMetric\":{\"id\":\"1-metric\",\"enabled\":true,\"type\":\"count\",\"params\":{}},\"window\":5,\"script\":\"MovingFunctions.unweightedAvg(values)\"},\"schema\":\"metric\"},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"params\":{\"field\":\"@timestamp\",\"timeRange\":{\"from\":\"2023-02-24T17:25:00.000Z\",\"to\":\"2023-02-24T17:30:00.000Z\"},\"useNormalizedOpenSearchInterval\":true,\"scaleMetricValues\":false,\"interval\":\"m\",\"drop_partials\":false,\"min_doc_count\":0,\"extended_bounds\":{},\"customLabel\":\"Req/Min\"},\"schema\":\"bucket\"}],\"params\":{\"perPage\":10,\"showPartialRows\":false,\"showMetricsAtAllLevels\":false,\"showTotal\":false,\"totalFunc\":\"sum\",\"percentageCol\":\"\"}}" - }, - "id": "01ea64d0-b62f-11ed-a677-43d7aa86763b", - "migrationVersion": { - "visualization": "7.10.0" - }, - "references": [ - { - "id": "47892350-b495-11ed-af0a-cf5c93b5a3b6", - "name": "kibanaSavedObjectMeta.searchSourceJSON.index", - "type": "index-pattern" - } - ], - "type": "visualization", - "updated_at": "2023-02-26T23:40:53.020Z", - "version": "WzcyLDdd" -} -{ - "attributes": { - "description": "Nginx dashboard with basic Observability on access / error logs", - "hits": 0, - "kibanaSavedObjectMeta": { - "searchSourceJSON": "{\"query\":{\"language\":\"kuery\",\"query\":\"\"},\"filter\":[]}" - }, - "optionsJSON": "{\"hidePanelTitles\":false,\"useMargins\":true}", - "panelsJSON": "[{\"version\":\"2.5.0\",\"gridData\":{\"h\":8,\"i\":\"1f31e50b-06e3-41e6-972e-e4e5fe1a9872\",\"w\":48,\"x\":0,\"y\":0},\"panelIndex\":\"1f31e50b-06e3-41e6-972e-e4e5fe1a9872\",\"embeddableConfig\":{},\"panelRefName\":\"panel_0\"},{\"version\":\"2.5.0\",\"gridData\":{\"h\":9,\"i\":\"d91a8da4-b34b-470a-aca6-9c76b47cd6fb\",\"w\":24,\"x\":0,\"y\":8},\"panelIndex\":\"d91a8da4-b34b-470a-aca6-9c76b47cd6fb\",\"embeddableConfig\":{},\"panelRefName\":\"panel_1\"},{\"version\":\"2.5.0\",\"gridData\":{\"h\":15,\"i\":\"27149e5a-3a77-4f3c-800e-8a160c3765f4\",\"w\":24,\"x\":24,\"y\":8},\"panelIndex\":\"27149e5a-3a77-4f3c-800e-8a160c3765f4\",\"embeddableConfig\":{},\"panelRefName\":\"panel_2\"},{\"version\":\"2.5.0\",\"gridData\":{\"x\":0,\"y\":17,\"w\":24,\"h\":15,\"i\":\"4d8c2aa7-159c-4a1a-80ff-00a9299056ce\"},\"panelIndex\":\"4d8c2aa7-159c-4a1a-80ff-00a9299056ce\",\"embeddableConfig\":{},\"panelRefName\":\"panel_3\"},{\"version\":\"2.5.0\",\"gridData\":{\"x\":24,\"y\":23,\"w\":24,\"h\":15,\"i\":\"800b7f19-f50c-417f-8987-21b930531cbe\"},\"panelIndex\":\"800b7f19-f50c-417f-8987-21b930531cbe\",\"embeddableConfig\":{},\"panelRefName\":\"panel_4\"}]", - "timeRestore": false, - "title": "[NGINX Core Logs 1.0] Overview", - "version": 1 - }, - "id": "96847220-5261-44d0-89b4-65f3a659f13a", - "migrationVersion": { - "dashboard": "7.9.3" - }, - "references": [ - { - "id": "3b49a65d-54d8-483d-a8f0-3d7c855e1ecf", - "name": "panel_0", - "type": "visualization" - }, - { - "id": "865e577b-634b-4a65-b9d6-7e324c395d18", - "name": "panel_1", - "type": "visualization" - }, - { - "id": "dc1803f0-b478-11ed-9063-ebe46f9ac203", - "name": "panel_2", - "type": "visualization" - }, - { - "id": "99acc580-b47a-11ed-9063-ebe46f9ac203", - "name": "panel_3", - "type": "visualization" - }, - { - "id": "01ea64d0-b62f-11ed-a677-43d7aa86763b", - "name": "panel_4", - "type": "visualization" - } - ], - "type": "dashboard", - "updated_at": "2023-02-26T23:44:09.855Z", - "version": "WzczLDdd" -} -{ - "exportedCount": 9, - "missingRefCount": 0, - "missingReferences": [] -} \ No newline at end of file diff --git a/server/adaptors/integrations/__tests__/utils.test.ts b/server/adaptors/integrations/__tests__/utils.test.ts deleted file mode 100644 index 5c1fac2591..0000000000 --- a/server/adaptors/integrations/__tests__/utils.test.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { readNDJsonObjects } from '../utils'; -import { Readable } from 'stream'; -import { createReadStream } from 'fs'; - -describe('ReadNDJsonStream', () => { - it('should successfully parse simple ndjson', async () => { - const stream = Readable.from(['{"key":1}\n{"key":2}\n{"key":3}']); - const array = await readNDJsonObjects(stream); - expect(array).toEqual([{ key: 1 }, { key: 2 }, { key: 3 }]); - }); - it('should succeed if chunks split objects', async () => { - const stream = Readable.from(['{"key":1}\n{"ke', 'y":2}\n{"key":3}']); - const array = await readNDJsonObjects(stream); - expect(array).toEqual([{ key: 1 }, { key: 2 }, { key: 3 }]); - }); - it('should succeed on test ndjson file', async () => { - const file = createReadStream(__dirname + '/test.ndjson'); - const array = await readNDJsonObjects(file); - expect(array.length).toBeGreaterThan(0); - }); -}); diff --git a/server/adaptors/integrations/integrations_adaptor.ts b/server/adaptors/integrations/integrations_adaptor.ts index a398210e77..554f310af2 100644 --- a/server/adaptors/integrations/integrations_adaptor.ts +++ b/server/adaptors/integrations/integrations_adaptor.ts @@ -10,8 +10,6 @@ export interface IntegrationsAdaptor { query?: IntegrationTemplateQuery ) => Promise; - getAssets: (templateName: string) => Promise; - getIntegrationInstances: ( query?: IntegrationInstanceQuery ) => Promise; diff --git a/server/adaptors/integrations/integrations_kibana_backend.ts b/server/adaptors/integrations/integrations_kibana_backend.ts index c6c03cb914..dafb14070e 100644 --- a/server/adaptors/integrations/integrations_kibana_backend.ts +++ b/server/adaptors/integrations/integrations_kibana_backend.ts @@ -1,8 +1,6 @@ import * as fs from 'fs'; import { IntegrationsAdaptor } from './integrations_adaptor'; -import { SavedObjectsBulkCreateObject } from '../../../../../src/core/public'; import { SavedObjectsClientContract } from '../../../../../src/core/server/types'; -import { readNDJsonObjects } from './utils'; import { IntegrationInstanceBuilder } from './integrations_builder'; let repository: IntegrationTemplate[] = []; @@ -38,14 +36,6 @@ export class IntegrationsKibanaBackend implements IntegrationsAdaptor { }); }; - getAssets = (_templateName: string): Promise => { - const stream = fs.createReadStream(__dirname + '/__tests__/test.ndjson'); - const assets = readNDJsonObjects(stream).then( - (objects) => objects as SavedObjectsBulkCreateObject[] - ); - return assets; - }; - getIntegrationInstances = async ( _query?: IntegrationInstanceQuery ): Promise => { diff --git a/server/adaptors/integrations/utils.ts b/server/adaptors/integrations/utils.ts deleted file mode 100644 index b67c12011a..0000000000 --- a/server/adaptors/integrations/utils.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Readable } from 'stream'; - -/** - * Parse a stream of newline-delimited JSON objects as an array. - * The entire stream is read; the method will hang if the stream is not closed. - * The data entries MUST be JSON objects, - * other valid JSON values will be rejected. - * - * Resolves the `Promise` if every newline-separated JSON object is valid. - * Rejects the `Promise` if the stream errors, or if the JSON is not parseable. - * - * @param {Readable} stream A stream of newline-delimited JSON objects. - * @returns {Promise} A `Promise` for an array of parsed JSON objects. - */ -export const readNDJsonObjects = async (stream: Readable): Promise => { - return new Promise((resolve, reject) => { - let assets: any[] = []; - let json: string = ''; - stream.on('data', (chunk: string | Buffer) => { - json += chunk.toString(); - }); - stream.on('end', () => { - try { - assets = JSON.parse(`[${json.replace(/\}\s+\{/g, '},{')}]`); - resolve(assets); - } catch (err: any) { - reject(err); - } - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); -}; From 149f6c7a3dc759dd4aec70ddb16d4c051574e512 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Thu, 25 May 2023 15:04:48 -0700 Subject: [PATCH 074/190] Remove unused instance store Signed-off-by: Simeon Widdis --- server/adaptors/integrations/integrations_kibana_backend.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/server/adaptors/integrations/integrations_kibana_backend.ts b/server/adaptors/integrations/integrations_kibana_backend.ts index dafb14070e..d2145ba831 100644 --- a/server/adaptors/integrations/integrations_kibana_backend.ts +++ b/server/adaptors/integrations/integrations_kibana_backend.ts @@ -5,8 +5,6 @@ import { IntegrationInstanceBuilder } from './integrations_builder'; let repository: IntegrationTemplate[] = []; -const store: IntegrationInstance[] = []; - const readRepository = async (): Promise => { const buffer = await fs.promises.readFile(__dirname + '/__data__/repository.json', 'utf-8'); try { From cbfe3a44c0020ae46f19d10f0abf11eb868240f6 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Thu, 25 May 2023 15:53:25 -0700 Subject: [PATCH 075/190] Move repository logic to own class Signed-off-by: Simeon Widdis --- .../integrations_kibana_backend.ts | 88 ++++++------------- .../integrations/integrations_repository.ts | 50 +++++++++++ 2 files changed, 79 insertions(+), 59 deletions(-) create mode 100644 server/adaptors/integrations/integrations_repository.ts diff --git a/server/adaptors/integrations/integrations_kibana_backend.ts b/server/adaptors/integrations/integrations_kibana_backend.ts index d2145ba831..cb472dda09 100644 --- a/server/adaptors/integrations/integrations_kibana_backend.ts +++ b/server/adaptors/integrations/integrations_kibana_backend.ts @@ -2,35 +2,24 @@ import * as fs from 'fs'; import { IntegrationsAdaptor } from './integrations_adaptor'; import { SavedObjectsClientContract } from '../../../../../src/core/server/types'; import { IntegrationInstanceBuilder } from './integrations_builder'; - -let repository: IntegrationTemplate[] = []; - -const readRepository = async (): Promise => { - const buffer = await fs.promises.readFile(__dirname + '/__data__/repository.json', 'utf-8'); - try { - repository = JSON.parse(buffer); - return Promise.resolve(); - } catch (err: any) { - return Promise.reject(err); - } -}; +import { IntegrationsRepository } from './integrations_repository'; export class IntegrationsKibanaBackend implements IntegrationsAdaptor { client: SavedObjectsClientContract; + repository: IntegrationsRepository; - constructor(client: SavedObjectsClientContract) { + constructor(client: SavedObjectsClientContract, repository?: IntegrationsRepository) { this.client = client; + this.repository = repository ?? new IntegrationsRepository(); } getIntegrationTemplates = async ( _query?: IntegrationTemplateQuery ): Promise => { - if (repository.length === 0) { - await readRepository(); - } - console.log(`Retrieving ${repository.length} templates from catalog`); + const repo = await this.repository.get(); + console.log(`Retrieving ${repo.length} templates from catalog`); return Promise.resolve({ - hits: repository, + hits: repo, }); }; @@ -45,51 +34,32 @@ export class IntegrationsKibanaBackend implements IntegrationsAdaptor { }; loadIntegrationInstance = async (templateName: string): Promise => { - for (const template of repository) { - if (template.name !== templateName) { - continue; - } - try { - const result = await new IntegrationInstanceBuilder(this.client).build(template, { - name: 'Placeholder Nginx Integration', - dataset: 'nginx', - namespace: 'prod', - }); - this.client.create('integration-instance', result); - return Promise.resolve(result); - } catch (err: any) { - return Promise.reject({ - message: err.toString(), - statusCode: 500, - }); - } + const template = await this.repository.getByName(templateName); + try { + const result = await new IntegrationInstanceBuilder(this.client).build(template, { + name: 'Placeholder Nginx Integration', + dataset: 'nginx', + namespace: 'prod', + }); + await this.client.create('integration-instance', result); + return Promise.resolve(result); + } catch (err: any) { + return Promise.reject({ + message: err.toString(), + statusCode: 500, + }); } - return Promise.reject({ - message: `Template ${templateName} not found`, - statusCode: 404, - }); }; getStatic = async (templateName: string, path: string): Promise => { - if (repository.length === 0) { - await readRepository(); - } - for (const item of repository) { - if (item.name !== templateName) { - continue; - } - const data = item.statics?.assets?.[path]; - if (data === undefined) { - return Promise.reject({ - message: `Asset ${path} not found`, - statusCode: 404, - }); - } - return Promise.resolve(data); + const template = await this.repository.getByName(templateName); + const data = template.statics?.assets?.[path]; + if (data === undefined) { + return Promise.reject({ + message: `Asset ${path} not found`, + statusCode: 404, + }); } - return Promise.reject({ - message: `Template ${templateName} not found`, - statusCode: 404, - }); + return Promise.resolve(data); }; } diff --git a/server/adaptors/integrations/integrations_repository.ts b/server/adaptors/integrations/integrations_repository.ts new file mode 100644 index 0000000000..9167df70ae --- /dev/null +++ b/server/adaptors/integrations/integrations_repository.ts @@ -0,0 +1,50 @@ +import * as fs from 'fs'; + +const DEFAULT_REPOSITORY_PATH: string = __dirname + '/__data__/repository.json'; + +export class IntegrationsRepository { + _instance?: IntegrationsRepository; + repositoryPath: string = DEFAULT_REPOSITORY_PATH; + repository: IntegrationTemplate[] = []; + initialized: boolean = false; + + constructor(path?: string) { + if (this._instance !== undefined && this._instance.repositoryPath === path) { + return this._instance; + } + this.repositoryPath = path || DEFAULT_REPOSITORY_PATH; + this._instance = this; + } + + async init(): Promise { + const buffer = await fs.promises.readFile(this.repositoryPath, 'utf-8'); + try { + this.repository = JSON.parse(buffer); + this.initialized = true; + return Promise.resolve(); + } catch (err: any) { + return Promise.reject(err); + } + } + + async get(): Promise { + if (!this.initialized) { + await this.init(); + } + return Promise.resolve(this.repository); + } + + async getByName(templateName: string): Promise { + if (!this.initialized) { + await this.init(); + } + const result = this.repository.find((template) => template.name === templateName); + if (result === undefined) { + return Promise.reject({ + message: `Integration template with name ${templateName} not found`, + statusCode: 404, + }); + } + return Promise.resolve(result); + } +} From 69ba83f10194e5ef964960f97c7e181cebb71c03 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Thu, 25 May 2023 16:01:19 -0700 Subject: [PATCH 076/190] Add tests for IntegrationsRepository Signed-off-by: Simeon Widdis --- .../integrations/__test__/repository.test.ts | 62 +++++++++++++++++++ .../integrations/integrations_repository.ts | 5 ++ 2 files changed, 67 insertions(+) create mode 100644 server/adaptors/integrations/__test__/repository.test.ts diff --git a/server/adaptors/integrations/__test__/repository.test.ts b/server/adaptors/integrations/__test__/repository.test.ts new file mode 100644 index 0000000000..341c1426ac --- /dev/null +++ b/server/adaptors/integrations/__test__/repository.test.ts @@ -0,0 +1,62 @@ +import * as fs from 'fs'; +import { IntegrationsRepository } from '../integrations_repository'; + +jest.mock('fs', () => ({ + promises: { + readFile: jest.fn(), + }, +})); + +describe('IntegrationsRepository', () => { + const mockReadFile = fs.promises.readFile as jest.MockedFunction; + + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('should initialize the repository', async () => { + const buffer = '[{"name": "Template 1"}, {"name": "Template 2"}]'; + mockReadFile.mockResolvedValue(buffer); + + const repository = new IntegrationsRepository(); + await repository.init(); + + expect(mockReadFile).toHaveBeenCalledWith(repository.repositoryPath, 'utf-8'); + expect(repository.repository).toEqual([{ name: 'Template 1' }, { name: 'Template 2' }]); + expect(repository.initialized).toBe(true); + }); + + it('should return the repository', async () => { + const buffer = '[{"name": "Template 1"}, {"name": "Template 2"}]'; + mockReadFile.mockResolvedValue(buffer); + + const repository = new IntegrationsRepository(); + const result = await repository.get(); + + expect(result).toEqual([{ name: 'Template 1' }, { name: 'Template 2' }]); + expect(repository.initialized).toBe(true); + }); + + it('should return a template by name', async () => { + const buffer = '[{"name": "Template 1"}, {"name": "Template 2"}]'; + mockReadFile.mockResolvedValue(buffer); + + const repository = new IntegrationsRepository(); + const result = await repository.getByName('Template 2'); + + expect(result).toEqual({ name: 'Template 2' }); + expect(repository.initialized).toBe(true); + }); + + it('should reject when template is not found by name', async () => { + const buffer = '[{"name": "Template 1"}, {"name": "Template 2"}]'; + mockReadFile.mockResolvedValue(buffer); + + const repository = new IntegrationsRepository(); + await expect(repository.getByName('Template 3')).rejects.toEqual({ + message: 'Integration template with name Template 3 not found', + statusCode: 404, + }); + expect(repository.initialized).toBe(true); + }); +}); diff --git a/server/adaptors/integrations/integrations_repository.ts b/server/adaptors/integrations/integrations_repository.ts index 9167df70ae..f08d36dd8a 100644 --- a/server/adaptors/integrations/integrations_repository.ts +++ b/server/adaptors/integrations/integrations_repository.ts @@ -27,6 +27,11 @@ export class IntegrationsRepository { } } + _clear() { + this.repository = []; + this.initialized = false; + } + async get(): Promise { if (!this.initialized) { await this.init(); From 46e15f643f2414a3baff22217907d7dd756d1281 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Thu, 25 May 2023 16:14:57 -0700 Subject: [PATCH 077/190] Add tests for kibana backend Signed-off-by: Simeon Widdis --- .../__test__/kibana_backend.test.ts | 142 ++++++++++++++++++ .../integrations_kibana_backend.ts | 3 +- 2 files changed, 143 insertions(+), 2 deletions(-) create mode 100644 server/adaptors/integrations/__test__/kibana_backend.test.ts diff --git a/server/adaptors/integrations/__test__/kibana_backend.test.ts b/server/adaptors/integrations/__test__/kibana_backend.test.ts new file mode 100644 index 0000000000..5b74155b21 --- /dev/null +++ b/server/adaptors/integrations/__test__/kibana_backend.test.ts @@ -0,0 +1,142 @@ +import { IntegrationsKibanaBackend } from '../integrations_kibana_backend'; +import { SavedObjectsClientContract } from '../../../../../../src/core/server/types'; +import { IntegrationInstanceBuilder } from '../integrations_builder'; +import { IntegrationsRepository } from '../integrations_repository'; + +describe('IntegrationsKibanaBackend', () => { + let mockClient: SavedObjectsClientContract; + let mockRepository: IntegrationsRepository; + let backend: IntegrationsKibanaBackend; + + beforeEach(() => { + // Create mock instances for each test + mockClient = { + find: jest.fn(), + create: jest.fn(), + } as any; + mockRepository = { + get: jest.fn(), + getByName: jest.fn(), + } as any; + backend = new IntegrationsKibanaBackend(mockClient, mockRepository); + }); + + test('should get integration templates from the repository', async () => { + const templates = [{ name: 'Template 1' }, { name: 'Template 2' }]; + (mockRepository.get as jest.Mock).mockResolvedValue(templates); + + const result = await backend.getIntegrationTemplates(); + + expect(mockRepository.get).toHaveBeenCalled(); + expect(result).toEqual({ hits: templates }); + }); + + test('should get integration instances from the client', async () => { + const mockResult = { + total: 2, + saved_objects: [ + { attributes: { name: 'Instance 1' } }, + { attributes: { name: 'Instance 2' } }, + ], + }; + (mockClient.find as jest.Mock).mockResolvedValue(mockResult); + + const result = await backend.getIntegrationInstances(); + + expect(mockClient.find).toHaveBeenCalledWith({ type: 'integration-instance' }); + expect(result).toEqual({ + total: mockResult.total, + hits: mockResult.saved_objects.map((x) => x.attributes), + }); + }); + + test('should load an integration instance', async () => { + const templateName = 'Template 1'; + const template = { name: templateName }; + const instance = { name: 'Instance 1' }; + const builderMock = { + build: jest.fn().mockResolvedValue(instance), + }; + const mockCreate = jest.fn(); + (mockClient.create as jest.Mock).mockResolvedValue(mockCreate); + (mockRepository.getByName as jest.Mock).mockResolvedValue(template); + jest + .spyOn(IntegrationInstanceBuilder.prototype, 'build') + .mockImplementationOnce(builderMock.build); + + const result = await backend.loadIntegrationInstance(templateName); + + expect(mockRepository.getByName).toHaveBeenCalledWith(templateName); + expect(builderMock.build).toHaveBeenCalledWith(template, { + name: 'Placeholder Nginx Integration', + dataset: 'nginx', + namespace: 'prod', + }); + expect(mockClient.create).toHaveBeenCalledWith('integration-instance', instance); + expect(result).toEqual(instance); + }); + + test('should reject when loading an integration instance fails', async () => { + const templateName = 'Template 1'; + const template = { name: templateName }; + const errorMessage = 'An error occurred during instance creation'; + const builderMock = { + build: jest.fn().mockRejectedValue(new Error(errorMessage)), + }; + (mockRepository.getByName as jest.Mock).mockResolvedValue(template); + jest + .spyOn(IntegrationInstanceBuilder.prototype, 'build') + .mockImplementationOnce(builderMock.build); + + await expect(backend.loadIntegrationInstance(templateName)).rejects.toEqual({ + message: errorMessage, + statusCode: 500, + }); + + expect(mockRepository.getByName).toHaveBeenCalledWith(templateName); + expect(builderMock.build).toHaveBeenCalledWith(template, { + name: 'Placeholder Nginx Integration', + dataset: 'nginx', + namespace: 'prod', + }); + expect(mockClient.create).not.toHaveBeenCalled(); + }); + + test('should get a static asset from the template', async () => { + const templateName = 'Template 1'; + const template = { + name: templateName, + statics: { + assets: { + 'file.jpg': 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD', + }, + }, + }; + (mockRepository.getByName as jest.Mock).mockResolvedValue(template); + + const result = await backend.getStatic(templateName, 'file.jpg'); + + expect(mockRepository.getByName).toHaveBeenCalledWith(templateName); + expect(result).toEqual(template.statics.assets['file.jpg']); + }); + + test('should reject when the static asset is not found', async () => { + const templateName = 'Template 1'; + const template = { + name: templateName, + statics: { + assets: { + 'file.jpg': 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD', + }, + }, + }; + (mockRepository.getByName as jest.Mock).mockResolvedValue(template); + + await expect(backend.getStatic(templateName, 'file.png')).rejects.toEqual({ + message: 'Asset file.png not found', + statusCode: 404, + }); + + expect(mockRepository.getByName).toHaveBeenCalledWith(templateName); + }); +}); diff --git a/server/adaptors/integrations/integrations_kibana_backend.ts b/server/adaptors/integrations/integrations_kibana_backend.ts index cb472dda09..470ec9ba0a 100644 --- a/server/adaptors/integrations/integrations_kibana_backend.ts +++ b/server/adaptors/integrations/integrations_kibana_backend.ts @@ -1,4 +1,3 @@ -import * as fs from 'fs'; import { IntegrationsAdaptor } from './integrations_adaptor'; import { SavedObjectsClientContract } from '../../../../../src/core/server/types'; import { IntegrationInstanceBuilder } from './integrations_builder'; @@ -45,7 +44,7 @@ export class IntegrationsKibanaBackend implements IntegrationsAdaptor { return Promise.resolve(result); } catch (err: any) { return Promise.reject({ - message: err.toString(), + message: err.message, statusCode: 500, }); } From e56b0402a72b50a1338cc8e875c8217b14b9769d Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Thu, 25 May 2023 16:20:18 -0700 Subject: [PATCH 078/190] Hotfix: Clear repository between runs in testing Signed-off-by: Simeon Widdis --- server/adaptors/integrations/__test__/repository.test.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/server/adaptors/integrations/__test__/repository.test.ts b/server/adaptors/integrations/__test__/repository.test.ts index 341c1426ac..935f36ccc6 100644 --- a/server/adaptors/integrations/__test__/repository.test.ts +++ b/server/adaptors/integrations/__test__/repository.test.ts @@ -9,16 +9,17 @@ jest.mock('fs', () => ({ describe('IntegrationsRepository', () => { const mockReadFile = fs.promises.readFile as jest.MockedFunction; + const repository = new IntegrationsRepository(); beforeEach(() => { jest.clearAllMocks(); + repository._clear(); }); it('should initialize the repository', async () => { const buffer = '[{"name": "Template 1"}, {"name": "Template 2"}]'; mockReadFile.mockResolvedValue(buffer); - const repository = new IntegrationsRepository(); await repository.init(); expect(mockReadFile).toHaveBeenCalledWith(repository.repositoryPath, 'utf-8'); @@ -30,7 +31,6 @@ describe('IntegrationsRepository', () => { const buffer = '[{"name": "Template 1"}, {"name": "Template 2"}]'; mockReadFile.mockResolvedValue(buffer); - const repository = new IntegrationsRepository(); const result = await repository.get(); expect(result).toEqual([{ name: 'Template 1' }, { name: 'Template 2' }]); @@ -41,7 +41,6 @@ describe('IntegrationsRepository', () => { const buffer = '[{"name": "Template 1"}, {"name": "Template 2"}]'; mockReadFile.mockResolvedValue(buffer); - const repository = new IntegrationsRepository(); const result = await repository.getByName('Template 2'); expect(result).toEqual({ name: 'Template 2' }); @@ -52,7 +51,6 @@ describe('IntegrationsRepository', () => { const buffer = '[{"name": "Template 1"}, {"name": "Template 2"}]'; mockReadFile.mockResolvedValue(buffer); - const repository = new IntegrationsRepository(); await expect(repository.getByName('Template 3')).rejects.toEqual({ message: 'Integration template with name Template 3 not found', statusCode: 404, From 734d5a3d9c5cdbc49627b297e3bbae60fd8b308e Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Fri, 26 May 2023 11:11:27 -0400 Subject: [PATCH 079/190] fix tests and import Signed-off-by: Derek Ho --- package.json | 1 - .../integrations/integrations_router.ts | 6 +- yarn.lock | 950 +++++++++--------- 3 files changed, 498 insertions(+), 459 deletions(-) diff --git a/package.json b/package.json index 23fa4ac920..3eaa148895 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,6 @@ "devDependencies": { "@cypress/skip-test": "^2.6.1", "@types/enzyme-adapter-react-16": "^1.0.6", - "@types/node-fetch": "^2.6.3", "@types/react-plotly.js": "^2.5.0", "@types/react-test-renderer": "^16.9.1", "antlr4ts-cli": "^0.5.0-alpha.4", diff --git a/server/routes/integrations/integrations_router.ts b/server/routes/integrations/integrations_router.ts index c68e774f6f..1f6dc826a7 100644 --- a/server/routes/integrations/integrations_router.ts +++ b/server/routes/integrations/integrations_router.ts @@ -3,8 +3,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -import fetch from 'node-fetch'; -import * as fs from 'fs'; import { schema } from '@osd/config-schema'; import { IRouter, RequestHandlerContext } from '../../../../../src/core/server'; import { INTEGRATIONS_BASE, OBSERVABILITY_BASE } from '../../../common/constants/shared'; @@ -95,7 +93,7 @@ export function registerIntegrationsRoute(router: IRouter) { async (context, request, response): Promise => { const adaptor = getAdaptor(context, request); return handleWithCallback(adaptor, response, async (_a: IntegrationsAdaptor) => { - return (await fetch('http://127.0.0.1:4010/repository/id', {})).json(); + return {}; }); } ); @@ -137,7 +135,7 @@ export function registerIntegrationsRoute(router: IRouter) { async (context, request, response): Promise => { const adaptor = getAdaptor(context, request); return handleWithCallback(adaptor, response, async (_a: IntegrationsAdaptor) => { - return (await fetch('http://127.0.0.1:4010/store?limit=24', {})).json(); + return {}; }); } ); diff --git a/yarn.lock b/yarn.lock index 21b7ec1b7a..1b225471c5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3,71 +3,69 @@ "@algolia/autocomplete-core@^1.4.1": - version "1.9.2" - resolved "https://registry.yarnpkg.com/@algolia/autocomplete-core/-/autocomplete-core-1.9.2.tgz#1c9ffcfac7fc4733fe97356247b25d9d7a83538c" - integrity sha512-hkG80c9kx9ClVAEcUJbTd2ziVC713x9Bji9Ty4XJfKXlxlsx3iXsoNhAwfeR4ulzIUg7OE5gez0UU1zVDdG7kg== - dependencies: - "@algolia/autocomplete-plugin-algolia-insights" "1.9.2" - "@algolia/autocomplete-shared" "1.9.2" - -"@algolia/autocomplete-plugin-algolia-insights@1.9.2": - version "1.9.2" - resolved "https://registry.yarnpkg.com/@algolia/autocomplete-plugin-algolia-insights/-/autocomplete-plugin-algolia-insights-1.9.2.tgz#b4672d5662acc2d0a0547d14dfbdcc70c17625de" - integrity sha512-2LVsf4W66hVHQ3Ua/8k15oPlxjELCztbAkQm/hP42Sw+GLkHAdY1vaVRYziaWq64+Oljfg6FKkZHCdgXH+CGIA== + version "1.4.1" + resolved "https://registry.yarnpkg.com/@algolia/autocomplete-core/-/autocomplete-core-1.4.1.tgz#b17ef0e3299d6159ab6041365893384ec75de204" + integrity sha512-LPX4nFA5HzS07UfEAzdXHi6vSUfwqJe8mikcg81ZnMTv+khRAMh3VxHAMUISAnHqI5NzEImbyPdSDpjgh9IPGQ== dependencies: - "@algolia/autocomplete-shared" "1.9.2" + "@algolia/autocomplete-shared" "1.4.1" -"@algolia/autocomplete-shared@1.9.2": - version "1.9.2" - resolved "https://registry.yarnpkg.com/@algolia/autocomplete-shared/-/autocomplete-shared-1.9.2.tgz#b5b909377439c45774cfb91947ad8e6ebd4652c1" - integrity sha512-XxX6YDn+7LG+SmdpXEOnj7fc3TjiVpQ0CbGhjLwrd2tYr6LVY2D4Iiu/iuYJ4shvVDWWnpwArSk0uIWC/8OPUA== +"@algolia/autocomplete-shared@1.4.1": + version "1.4.1" + resolved "https://registry.yarnpkg.com/@algolia/autocomplete-shared/-/autocomplete-shared-1.4.1.tgz#d8f3b71dee1474a89989d359b434addacf140cdb" + integrity sha512-MGLj6on/809+xQi5dfOPv4EB6KruTfbkg1rZWQzDX5KrJuiu6CPHp/kk2JNyrEr2luiT0v7rxXWOz9XfxVReiQ== "@algolia/autocomplete-theme-classic@^1.2.1": - version "1.9.2" - resolved "https://registry.yarnpkg.com/@algolia/autocomplete-theme-classic/-/autocomplete-theme-classic-1.9.2.tgz#b04ce32d6994d885391b125d1adb5828514edfcb" - integrity sha512-3yjFogH3p08Lo1aqjrIp71o/YqLNJivHtZJlZ32jZ7sC/p4Q7bte1GKvDoLloU+oWPyv+4awsl6EdnW4mfIAVQ== + version "1.3.0" + resolved "https://registry.yarnpkg.com/@algolia/autocomplete-theme-classic/-/autocomplete-theme-classic-1.3.0.tgz#68657b214ea49715116f702ae3eae2a5d6b8983d" + integrity sha512-npQlljLXAAdXL9chj98xvhNOIgInaX27SUfBfFeCds3YtnwI+ZOATiYUOl7/WkyzxXvwEMUIO1sUenlZuH8o0A== "@babel/code-frame@^7.0.0": - version "7.21.4" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.21.4.tgz#d0fa9e4413aca81f2b23b9442797bda1826edb39" - integrity sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g== + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.16.7.tgz#44416b6bd7624b998f5b1af5d470856c40138789" + integrity sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg== dependencies: - "@babel/highlight" "^7.18.6" + "@babel/highlight" "^7.16.7" -"@babel/helper-validator-identifier@^7.18.6": - version "7.19.1" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" - integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== +"@babel/helper-validator-identifier@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz#e8c602438c4a8195751243da9031d1607d247cad" + integrity sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw== -"@babel/highlight@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" - integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== +"@babel/highlight@^7.16.7": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.17.9.tgz#61b2ee7f32ea0454612def4fccdae0de232b73e3" + integrity sha512-J9PfEKCbFIv2X5bjTMiZu6Vf341N05QIY+d6FvVKynkG1S7G0j3I0QoRtWIrXhZ+/Nlb5Q0MzqL7TokEJ5BNHg== dependencies: - "@babel/helper-validator-identifier" "^7.18.6" + "@babel/helper-validator-identifier" "^7.16.7" chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/runtime@^7.1.2", "@babel/runtime@^7.3.1", "@babel/runtime@^7.9.2": - version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.21.5.tgz#8492dddda9644ae3bda3b45eabe87382caee7200" - integrity sha512-8jI69toZqqcsnqGGqwGS4Qb1VwLOEp4hz+CXPywcvjs60u3B4Pom/U/7rm4W8tMOYEB+E9wgD0mW1l3r8qlI9Q== +"@babel/runtime@^7.1.2", "@babel/runtime@^7.3.1": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.15.4.tgz#fd17d16bfdf878e6dd02d19753a39fa8a8d9c84a" + integrity sha512-99catp6bHCaxr4sJ/DbTGgHS4+Rs2RVd2g7iOap6SLGPDknRK9ztKNsE/Fg6QhSeh1FGE5f6gHGQmvvn3I3xhw== dependencies: - regenerator-runtime "^0.13.11" + regenerator-runtime "^0.13.4" -"@blueprintjs/colors@^4.0.0-alpha.3": - version "4.1.23" - resolved "https://registry.yarnpkg.com/@blueprintjs/colors/-/colors-4.1.23.tgz#4facbe7610adcb3653f99b03b8dec0c6ac6c1372" - integrity sha512-XiocrpqUS6DCpjFsDAtbwcETyuglwpOFCjon+Du4PZzQqafTrs+4p73H2EIZZJNQm1ajxSFQgmbhfrOFgAZXfA== +"@babel/runtime@^7.9.2": + version "7.14.8" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.14.8.tgz#7119a56f421018852694290b9f9148097391b446" + integrity sha512-twj3L8Og5SaCRCErB4x4ajbvBIVV77CGeFglHpeg5WC5FF8TZzBWXtTJ4MqaD9QszLYTtr+IsaAL2rEUevb+eg== + dependencies: + regenerator-runtime "^0.13.4" + +"@blueprintjs/colors@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@blueprintjs/colors/-/colors-3.0.0.tgz#f121dc1bc24cc367668a425911fa8ff52e87014a" + integrity sha512-8rRkIcnnOwMEMAGDciKFdVQ3dZXvCkSGcgEzVR2ijopCvLZrrHf+ySzn8v7Y2d60A2Q2A3Of8NDrYbV32sBssg== -"@blueprintjs/core@^3.54.0", "@blueprintjs/core@^3.7.0": - version "3.54.0" - resolved "https://registry.yarnpkg.com/@blueprintjs/core/-/core-3.54.0.tgz#7269f34eccdf0d2874377c5ad973ca2a31562221" - integrity sha512-u2c1s6MNn0ocxhnC6CuiG5g3KV6b4cKUvSobznepA9SC3/AL1s3XOvT7DLWoHRv2B/vBOHFYEDzLw2/vlcGGZg== +"@blueprintjs/core@^3.49.1", "@blueprintjs/core@^3.7.0": + version "3.49.1" + resolved "https://registry.yarnpkg.com/@blueprintjs/core/-/core-3.49.1.tgz#6824ddb11ce2858f0b009c8ae0c774547e3edb0a" + integrity sha512-H6UAYZeBZcGDQb24vEkFps0eKlkyKvy/B/OJ2elZjHC1B1Regv7TwIDjju9wgzZvzKCcCVZzUg9OqtH43V+1yA== dependencies: - "@blueprintjs/colors" "^4.0.0-alpha.3" - "@blueprintjs/icons" "^3.33.0" - "@juggle/resize-observer" "^3.3.1" + "@blueprintjs/colors" "^3.0.0" + "@blueprintjs/icons" "^3.29.0" "@types/dom4" "^2.0.1" classnames "^2.2" dom4 "^2.1.5" @@ -76,24 +74,25 @@ react-lifecycles-compat "^3.0.4" react-popper "^1.3.7" react-transition-group "^2.9.0" - tslib "~2.3.1" + resize-observer-polyfill "^1.5.1" + tslib "~1.13.0" -"@blueprintjs/icons@^3.33.0": - version "3.33.0" - resolved "https://registry.yarnpkg.com/@blueprintjs/icons/-/icons-3.33.0.tgz#4dacdb7731abdf08d1ab240f3a23a185df60918b" - integrity sha512-Q6qoSDIm0kRYQZISm59UUcDCpV3oeHulkLuh3bSlw0HhcSjvEQh2PSYbtaifM60Q4aK4PCd6bwJHg7lvF1x5fQ== +"@blueprintjs/icons@^3.29.0": + version "3.29.0" + resolved "https://registry.yarnpkg.com/@blueprintjs/icons/-/icons-3.29.0.tgz#2e786c6264a1783f2df9423749236189a84c436e" + integrity sha512-FDpPsEBwzsFBsxDXNsea+u+bU+iFWcVTbKH05+jtGEpvDEOrpOsOwUYvkBvVaReR0DORREVye2/NL0/uvLCRrg== dependencies: classnames "^2.2" - tslib "~2.3.1" + tslib "~1.13.0" "@blueprintjs/select@^3.2.0": - version "3.19.1" - resolved "https://registry.yarnpkg.com/@blueprintjs/select/-/select-3.19.1.tgz#b5e8baa6f182a0647651a57fde8d1d97eaa1e997" - integrity sha512-8UJIZMaWXRMQHr14wbmzJc/CklcSKxOU5JUux0xXKQz/hDW/g1a650tlwJmnxufvRdShbGinlVfHupCs0EL6sw== + version "3.18.1" + resolved "https://registry.yarnpkg.com/@blueprintjs/select/-/select-3.18.1.tgz#655219326c09c80adf2711c0dd17191034c92248" + integrity sha512-WwPkNLlNBy0Et0VuQDuxyo0UtBd6JPiWhR2F/xub8ZlYX7tayvXW5DaedtFlnS1OhNlPsolJTcJVoAgYy4Lnbw== dependencies: - "@blueprintjs/core" "^3.54.0" + "@blueprintjs/core" "^3.49.1" classnames "^2.2" - tslib "~2.3.1" + tslib "~1.13.0" "@colors/colors@1.5.0": version "1.5.0" @@ -169,11 +168,6 @@ "@types/yargs" "^17.0.8" chalk "^4.0.0" -"@juggle/resize-observer@^3.3.1": - version "3.4.0" - resolved "https://registry.yarnpkg.com/@juggle/resize-observer/-/resize-observer-3.4.0.tgz#08d6c5e20cf7e4cc02fd181c4b0c225cd31dbb60" - integrity sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA== - "@nteract/markdown@^4.5.2": version "4.6.2" resolved "https://registry.yarnpkg.com/@nteract/markdown/-/markdown-4.6.2.tgz#5e3dc44047f7af761b3fb8cf76f6d239e7bb65c3" @@ -201,9 +195,9 @@ react-json-tree "^0.12.1" "@nteract/presentational-components@^3.3.11", "@nteract/presentational-components@^3.4.3": - version "3.4.12" - resolved "https://registry.yarnpkg.com/@nteract/presentational-components/-/presentational-components-3.4.12.tgz#29c5301ccb2298d7bfc4894c4b3f9ac3f079664f" - integrity sha512-gIZlHj2ZJ3glmRslyJh2HWmJftgk18w1CyOJVrxh9ovyso0Nw6CwPNEEKVdjouJvU4OCB7dpINIBLy/w4SxtRA== + version "3.4.11" + resolved "https://registry.yarnpkg.com/@nteract/presentational-components/-/presentational-components-3.4.11.tgz#4ab477d7cf4f7130d478f9bcf32b3c025bf48cd0" + integrity sha512-2lYcsYI6W0RLEs0ZUDn9kFJB8nCsnNtLDvOPSXuWaqhsSYo6Ml6nB/BFZeO9LZePvD/vTKQ4uJpR0INwLorU6Q== dependencies: "@blueprintjs/core" "^3.7.0" "@blueprintjs/select" "^3.2.0" @@ -213,14 +207,14 @@ react-toggle "^4.1.1" "@reduxjs/toolkit@^1.6.1": - version "1.9.5" - resolved "https://registry.yarnpkg.com/@reduxjs/toolkit/-/toolkit-1.9.5.tgz#d3987849c24189ca483baa7aa59386c8e52077c4" - integrity sha512-Rt97jHmfTeaxL4swLRNPD/zV4OxTes4la07Xc4hetpUW/vc75t5m1ANyxG6ymnEQ2FsLQsoMlYB2vV1sO3m8tQ== + version "1.6.1" + resolved "https://registry.yarnpkg.com/@reduxjs/toolkit/-/toolkit-1.6.1.tgz#7bc83b47352a663bf28db01e79d17ba54b98ade9" + integrity sha512-pa3nqclCJaZPAyBhruQtiRwtTjottRrVJqziVZcWzI73i6L3miLTtUyWfauwv08HWtiXLx1xGyGt+yLFfW/d0A== dependencies: - immer "^9.0.21" - redux "^4.2.1" - redux-thunk "^2.4.2" - reselect "^4.1.8" + immer "^9.0.1" + redux "^4.1.0" + redux-thunk "^2.3.0" + reselect "^4.0.0" "@sinclair/typebox@^0.25.16": version "0.25.24" @@ -228,12 +222,17 @@ integrity sha512-XJfwUVUKDHF5ugKwIcxEgc9k8b7HbznCp6eUfWgu710hMPNIO4aw4/zB5RogDQz8nd6gyCDpU9O/m6qYEWY6yQ== "@types/cheerio@*": - version "0.22.31" - resolved "https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.31.tgz#b8538100653d6bb1b08a1e46dec75b4f2a5d5eb6" - integrity sha512-Kt7Cdjjdi2XWSfrZ53v4Of0wG3ZcmaegFXjMmz9tfNrZSkzzo36G0AL1YqSdcIA78Etjt6E609pt5h1xnQkPUw== + version "0.22.30" + resolved "https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.30.tgz#6c1ded70d20d890337f0f5144be2c5e9ce0936e6" + integrity sha512-t7ZVArWZlq3dFa9Yt33qFBQIK4CQd1Q3UJp0V+UhP6vgLWLM6Qug7vZuRSGXg45zXeB1Fm5X2vmBkEX58LV2Tw== dependencies: "@types/node" "*" +"@types/d3@^3": + version "3.5.45" + resolved "https://registry.yarnpkg.com/@types/d3/-/d3-3.5.45.tgz#cceb1cd8f468b0ed1c96546ddefff3408d7463a7" + integrity sha512-wLICfMtjDEoAJie1MF6OuksAzOapRXgJy+l5HQVpyC1yMAlvHz2QKrrasUHru8xD6cbgQNGeO+CeyjOlKtly2A== + "@types/dom4@^2.0.1": version "2.0.2" resolved "https://registry.yarnpkg.com/@types/dom4/-/dom4-2.0.2.tgz#6495303f049689ce936ed328a3e5ede9c51408ee" @@ -247,12 +246,12 @@ "@types/enzyme" "*" "@types/enzyme@*": - version "3.10.13" - resolved "https://registry.yarnpkg.com/@types/enzyme/-/enzyme-3.10.13.tgz#332c0ed59b01f7b1c398c532a1c21a5feefabeb1" - integrity sha512-FCtoUhmFsud0Yx9fmZk179GkdZ4U9B0GFte64/Md+W/agx0L5SxsIIbhLBOxIb9y2UfBA4WQnaG1Od/UsUQs9Q== + version "3.10.9" + resolved "https://registry.yarnpkg.com/@types/enzyme/-/enzyme-3.10.9.tgz#b2d7c7429a37d994c156b6f361e83f271a60c8aa" + integrity sha512-dx5UvcWe2Vtye6S9Hw2rFB7Ul9uMXOAje2FAbXvVYieQDNle9qPAo7DfvFMSztZ9NFiD3dVZ4JsRYGTrSLynJg== dependencies: "@types/cheerio" "*" - "@types/react" "^16" + "@types/react" "*" "@types/hast@^2.0.0": version "2.3.4" @@ -280,18 +279,10 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/node-fetch@^2.6.3": - version "2.6.4" - resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.4.tgz#1bc3a26de814f6bf466b25aeb1473fa1afe6a660" - integrity sha512-1ZX9fcN4Rvkvgv4E6PAY5WXUFWFcRWxZa3EW83UjycOB9ljJCedb2CupIP4RZMEwF/M3eTcCihbBRgwtGbg5Rg== - dependencies: - "@types/node" "*" - form-data "^3.0.0" - "@types/node@*": - version "20.2.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.2.1.tgz#de559d4b33be9a808fd43372ccee822c70f39704" - integrity sha512-DqJociPbZP1lbZ5SQPk4oag6W7AyaGMO6gSfRwq3PWl4PXTwJpRQJhDq4W0kzrg3w6tJ1SwlvGZ5uKFHY13LIg== + version "16.7.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.7.2.tgz#0465a39b5456b61a04d98bd5545f8b34be340cb7" + integrity sha512-TbG4TOx9hng8FKxaVrCisdaxKxqEwJ3zwHoCWXZ0Jw6mnvTInpaB99/2Cy4+XxpXtjNv9/TgfGSvZFyfV/t8Fw== "@types/node@^14.14.31": version "14.18.47" @@ -299,19 +290,21 @@ integrity sha512-OuJi8bIng4wYHHA3YpKauL58dZrPxro3d0tabPHyiNF8rKfGKuVfr83oFlPLmKri1cX+Z3cJP39GXmnqkP11Gw== "@types/plotly.js@*": - version "2.12.18" - resolved "https://registry.yarnpkg.com/@types/plotly.js/-/plotly.js-2.12.18.tgz#7a231ce72a73fafe4842096b8c99d10a41b60962" - integrity sha512-ff+CIEWnqZNjZqHtQZvkEAVuLs9fkm1f54QnPVmgoET7wMHdSqUka2hasVN4e5yfHD05YwGjsAtCseewJh/BMw== + version "1.54.14" + resolved "https://registry.yarnpkg.com/@types/plotly.js/-/plotly.js-1.54.14.tgz#738f3507f49a707c03aae4fd5d568571ddf8bf31" + integrity sha512-vYevenBloZ3B4i831i+ccS9u782JSnkJpBG/c/qPRJNDW6s25udnrmoHkFhbBl7jkzBy8pO2lPNhpMrQJV7ETA== + dependencies: + "@types/d3" "^3" "@types/prop-types@*": - version "15.7.5" - resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.5.tgz#5f19d2b85a98e9558036f6a3cacc8819420f05cf" - integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w== + version "15.7.4" + resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.4.tgz#fcf7205c25dff795ee79af1e30da2c9790808f11" + integrity sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ== "@types/react-plotly.js@^2.5.0": - version "2.6.0" - resolved "https://registry.yarnpkg.com/@types/react-plotly.js/-/react-plotly.js-2.6.0.tgz#1b856c2ed1219babda3e95ef3270091f156ff987" - integrity sha512-nJJ57U0/CNDAO+F3dpnMgM8PtjLE/O1I3O6gq4+5Q13uKqrPnHGYOttfdzQJ4D7KYgF609miVzEYakUS2zds8w== + version "2.5.0" + resolved "https://registry.yarnpkg.com/@types/react-plotly.js/-/react-plotly.js-2.5.0.tgz#bf7793ed16db13a2bd775ff8fa8f9595e82e8597" + integrity sha512-bda7N/Y65d1x0FfwhgUXAugGeG9CRIxmkW/yBL8PVFUMvZGpfEnw4bXKjDozBYlOskVfxj6UQ9IKmZI6CZ7/QQ== dependencies: "@types/plotly.js" "*" "@types/react" "*" @@ -324,27 +317,27 @@ "@types/react" "^16" "@types/react@*": - version "18.2.6" - resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.6.tgz#5cd53ee0d30ffc193b159d3516c8c8ad2f19d571" - integrity sha512-wRZClXn//zxCFW+ye/D2qY65UsYP1Fpex2YXorHc8awoNamkMZSvBxwxdYVInsHOZZd2Ppq8isnSzJL5Mpf8OA== + version "17.0.17" + resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.17.tgz#1772d3d5425128e0635a716f49ef57c2955df055" + integrity sha512-nrfi7I13cAmrd0wje8czYpf5SFbryczCtPzFc6ijqvdjKcyA3tCvGxwchOUlxb2ucBPuJ9Y3oUqKrRqZvrz0lw== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" csstype "^3.0.2" "@types/react@^16": - version "16.14.41" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.14.41.tgz#55c4e7ebb736ca4e2379e97a4e0c1803150ed8d4" - integrity sha512-h+joCKF2r5rdECoM1U8WCEIHBp5/0TSR5Nyq8gtnnYY1n2WqGuj3indYqTjMb2/b5g2rfxJV6u4jUFq95lbT6Q== + version "16.14.14" + resolved "https://registry.yarnpkg.com/@types/react/-/react-16.14.14.tgz#853de95a32a6a0e719192e222eacad024add2b8e" + integrity sha512-uwIWDYW8LznHzEMJl7ag9St1RsK0gw/xaFZ5+uI1ZM1HndwUgmPH3/wQkSb87GkOVg7shUxnpNW8DcN0AzvG5Q== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" csstype "^3.0.2" "@types/scheduler@*": - version "0.16.3" - resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.3.tgz#cef09e3ec9af1d63d2a6cc5b383a737e24e6dcf5" - integrity sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ== + version "0.16.2" + resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39" + integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew== "@types/sinonjs__fake-timers@8.1.1": version "8.1.1" @@ -437,7 +430,7 @@ ansi-escapes@^4.2.1, ansi-escapes@^4.3.0: dependencies: type-fest "^0.21.3" -ansi-regex@^4.1.0, ansi-regex@^5.0.1, ansi-regex@^6.0.1: +ansi-regex@^4.1.0, ansi-regex@^5.0.0, ansi-regex@^5.0.1, ansi-regex@^6.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== @@ -505,16 +498,16 @@ argparse@^1.0.7: sprintf-js "~1.0.2" asn1@~0.2.3: - version "0.2.6" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.6.tgz#0d3a7bb6e64e02a90c0303b31f292868ea09a08d" - integrity sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ== + version "0.2.4" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" + integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== dependencies: safer-buffer "~2.1.0" assert-plus@1.0.0, assert-plus@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - integrity sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw== + integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= astral-regex@^1.0.0: version "1.0.0" @@ -532,14 +525,14 @@ async-wait-until@1.2.6: integrity sha512-7I1zd0bnMEo7WfLfDoLZp+iPYKv/dl7kcW8wphazZn+BAElTGvtkDuQuonr480JzkS7f42VcGyP90mk3+3IfWA== async@^3.2.0: - version "3.2.4" - resolved "https://registry.yarnpkg.com/async/-/async-3.2.4.tgz#2d22e00f8cddeb5fde5dd33522b56d1cf569a81c" - integrity sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ== + version "3.2.3" + resolved "https://registry.yarnpkg.com/async/-/async-3.2.3.tgz#ac53dafd3f4720ee9e8a160628f18ea91df196c9" + integrity sha512-spZRyzKL5l5BZQrr/6m/SqFdBN0q3OCI0f9rjfBzCMBIP4p75P620rR3gTmaksNOhmzgdxcaxdNfMy6anrbM0g== asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== + integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= at-least-node@^1.0.0: version "1.0.0" @@ -549,12 +542,12 @@ at-least-node@^1.0.0: aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" - integrity sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA== + integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= aws4@^1.8.0: - version "1.12.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.12.0.tgz#ce1c9d143389679e253b314241ea9aa5cec980d3" - integrity sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg== + version "1.11.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" + integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== bail@^1.0.0: version "1.0.5" @@ -569,7 +562,7 @@ balanced-match@^1.0.0: base16@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/base16/-/base16-1.0.0.tgz#e297f60d7ec1014a7a971a39ebc8a98c0b681e70" - integrity sha512-pNdYkNPiJUnEhnfXV56+sQy8+AaPcG3POZAUnwr4EeqCUZFz4u2PePbo3e5Gj4ziYPCWGUZT9RHisvJKnwFuBQ== + integrity sha1-4pf2DX7BAUp6lxo568ipjAtoHnA= base64-js@^1.3.1: version "1.5.1" @@ -579,7 +572,7 @@ base64-js@^1.3.1: bcrypt-pbkdf@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" - integrity sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w== + integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= dependencies: tweetnacl "^0.14.3" @@ -623,7 +616,7 @@ bs-logger@0.x: buffer-crc32@~0.2.3: version "0.2.13" resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" - integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ== + integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= buffer@^5.6.0: version "5.7.1" @@ -654,12 +647,7 @@ callsites@^3.0.0: caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw== - -chalk@5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.2.0.tgz#249623b7d66869c673699fb66d65723e54dfcfb3" - integrity sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA== + integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= chalk@^2.0.0, chalk@^2.1.0: version "2.4.2" @@ -701,7 +689,7 @@ chardet@^0.7.0: check-more-types@^2.24.0: version "2.24.0" resolved "https://registry.yarnpkg.com/check-more-types/-/check-more-types-2.24.0.tgz#1420ffb10fd444dcfc79b43891bbfffd32a84600" - integrity sha512-Pj779qHxV2tuapviy1bSZNEL1maXr13bPYpsvSDB68HlYcYuhlDrmGd63i0JHMCLKzc7rUSNIrpdJlhVlNwrxA== + integrity sha1-FCD/sQ/URNz8ebQ4kbv//TKoRgA= chokidar@3.5.3: version "3.5.3" @@ -724,9 +712,9 @@ ci-info@^3.2.0: integrity sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw== classnames@^2.2, classnames@^2.2.5, classnames@^2.2.6: - version "2.3.2" - resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.3.2.tgz#351d813bf0137fcc6a76a16b88208d2560a0d924" - integrity sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw== + version "2.3.1" + resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.3.1.tgz#dfcfa3891e306ec1dad105d0e88f4417b8535e8e" + integrity sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA== clean-stack@^2.0.0: version "2.2.0" @@ -792,19 +780,24 @@ color-convert@^2.0.1: color-name@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= color-name@~1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -colorette@^2.0.16, colorette@^2.0.19: +colorette@^2.0.16: version "2.0.20" resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== -combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: +colorette@^2.0.19: + version "2.0.19" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.19.tgz#cdf044f47ad41a0f4b56b3a0d5b4e6e1a2d5a798" + integrity sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ== + +combined-stream@^1.0.6, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== @@ -816,30 +809,30 @@ comma-separated-tokens@^1.0.0: resolved "https://registry.yarnpkg.com/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz#632b80b6117867a158f1080ad498b2fbe7e3f5ea" integrity sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw== -commander@^10.0.0: - version "10.0.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06" - integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug== +commander@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae" + integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg== -commander@^6.2.1: - version "6.2.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" - integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== +commander@^9.4.1: + version "9.5.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30" + integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== common-tags@^1.8.0: - version "1.8.2" - resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.8.2.tgz#94ebb3c076d26032745fd54face7f688ef5ac9c6" - integrity sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA== + version "1.8.0" + resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.8.0.tgz#8e3153e542d4a39e9b10554434afaaf98956a937" + integrity sha512-6P6g0uetGpW/sdyUy/iQQCbFF0kWVMSIVSyYz7Zgjcgh8mgw8PQzDNZeyZ5DQ2gM7LBoZPHmnjz8rUthkBG5tw== concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= core-util-is@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - integrity sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ== + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= cross-spawn@^6.0.5: version "6.0.5" @@ -862,9 +855,9 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.3: which "^2.0.1" csstype@^3.0.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.2.tgz#1d4bf9d572f11c14031f0436e1c10bc1f571f50b" - integrity sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ== + version "3.0.8" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.0.8.tgz#d2266a792729fb227cd216fb572f43728e1ad340" + integrity sha512-jXKhWqXPmlUeoQnF/EhTtTl4C9SnrxSH/jZUih3jmO6lBKr99rP3/+FmrMj4EFpOXzMtXHAZkd3x0E6h6Fgflw== cypress-watch-and-reload@^1.10.6: version "1.10.6" @@ -875,10 +868,10 @@ cypress-watch-and-reload@^1.10.6: chokidar "3.5.3" ws "8.13.0" -cypress@^12.8.1: - version "12.12.0" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-12.12.0.tgz#0da622a34c970d8699ca6562d8e905ed7ce33c77" - integrity sha512-UU5wFQ7SMVCR/hyKok/KmzG6fpZgBHHfrXcHzDmPHWrT+UUetxFzQgt7cxCszlwfozckzwkd22dxMwl/vNkWRw== +cypress@12.8.1: + version "12.8.1" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-12.8.1.tgz#0c6e67f34554d553138697aaf349b637d80004eb" + integrity sha512-lIFbKdaSYAOarNLHNFa2aPZu6YSF+8UY4VRXMxJrFUnk6RvfG0AWsZ7/qle/aIz30TNUD4aOihz2ZgS4vuQVSA== dependencies: "@cypress/request" "^2.88.10" "@cypress/xvfb" "^1.2.4" @@ -894,7 +887,7 @@ cypress@^12.8.1: check-more-types "^2.24.0" cli-cursor "^3.1.0" cli-table3 "~0.6.1" - commander "^6.2.1" + commander "^5.1.0" common-tags "^1.8.0" dayjs "^1.10.4" debug "^4.3.4" @@ -912,7 +905,7 @@ cypress@^12.8.1: listr2 "^3.8.3" lodash "^4.17.21" log-symbols "^4.0.0" - minimist "^1.2.8" + minimist "^1.2.6" ospath "^1.2.2" pretty-bytes "^5.6.0" proxy-from-env "1.0.0" @@ -926,7 +919,7 @@ cypress@^12.8.1: dashdash@^1.12.0: version "1.14.1" resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - integrity sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g== + integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= dependencies: assert-plus "^1.0.0" @@ -959,18 +952,17 @@ deep-is@~0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== -define-properties@^1.1.3, define-properties@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.0.tgz#52988570670c9eacedd8064f4a990f2405849bd5" - integrity sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA== +define-properties@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" + integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== dependencies: - has-property-descriptors "^1.0.0" - object-keys "^1.1.1" + object-keys "^1.0.12" delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== + integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= doctrine@^3.0.0: version "3.0.0" @@ -986,40 +978,47 @@ dom-helpers@^3.4.0: dependencies: "@babel/runtime" "^7.1.2" -dom-serializer@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-2.0.0.tgz#e41b802e1eedf9f6cae183ce5e622d789d7d8e53" - integrity sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg== +dom-serializer@^1.0.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.3.2.tgz#6206437d32ceefaec7161803230c7a20bc1b4d91" + integrity sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig== dependencies: - domelementtype "^2.3.0" - domhandler "^5.0.2" - entities "^4.2.0" + domelementtype "^2.0.1" + domhandler "^4.2.0" + entities "^2.0.0" dom4@^2.1.5: version "2.1.6" resolved "https://registry.yarnpkg.com/dom4/-/dom4-2.1.6.tgz#c90df07134aa0dbd81ed4d6ba1237b36fc164770" integrity sha512-JkCVGnN4ofKGbjf5Uvc8mmxaATIErKQKSgACdBXpsQ3fY6DlIpAyWfiBSrGkttATssbDCp3psiAKWXk5gmjycA== -domelementtype@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" - integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== +domelementtype@^2.0.1, domelementtype@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.2.0.tgz#9a0b6c2782ed6a1c7323d42267183df9bd8b1d57" + integrity sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A== -domhandler@^5.0, domhandler@^5.0.2, domhandler@^5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-5.0.3.tgz#cc385f7f751f1d1fc650c21374804254538c7d31" - integrity sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w== +domhandler@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-3.3.0.tgz#6db7ea46e4617eb15cf875df68b2b8524ce0037a" + integrity sha512-J1C5rIANUbuYK+FuFL98650rihynUOEzRLxW+90bKZRWB6A1X1Tf82GxR1qAWLyfNPRvjqfip3Q5tdYlmAa9lA== dependencies: - domelementtype "^2.3.0" + domelementtype "^2.0.1" -domutils@^3.0.1: - version "3.1.0" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-3.1.0.tgz#c47f551278d3dc4b0b1ab8cbb42d751a6f0d824e" - integrity sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA== +domhandler@^4.2.0: + version "4.2.2" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.2.2.tgz#e825d721d19a86b8c201a35264e226c678ee755f" + integrity sha512-PzE9aBMsdZO8TK4BnuJwH0QT41wgMbRzuZrHUcpYncEjmQazq8QEaBWgLG7ZyC/DAZKEgglpIA6j4Qn/HmxS3w== dependencies: - dom-serializer "^2.0.0" - domelementtype "^2.3.0" - domhandler "^5.0.3" + domelementtype "^2.2.0" + +domutils@^2.4.2: + version "2.8.0" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135" + integrity sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A== + dependencies: + dom-serializer "^1.0.1" + domelementtype "^2.2.0" + domhandler "^4.2.0" eastasianwidth@^0.2.0: version "0.2.0" @@ -1029,7 +1028,7 @@ eastasianwidth@^0.2.0: ecc-jsbn@~0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" - integrity sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw== + integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= dependencies: jsbn "~0.1.0" safer-buffer "^2.1.0" @@ -1063,20 +1062,20 @@ enquirer@^2.3.6: dependencies: ansi-colors "^4.1.1" -entities@^4.2.0, entities@^4.4.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48" - integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== +entities@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" + integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== escape-carriage@^1.3.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/escape-carriage/-/escape-carriage-1.3.1.tgz#842658e5422497b1232585e517dc813fc6a86170" - integrity sha512-GwBr6yViW3ttx1kb7/Oh+gKQ1/TrhYwxKqVmg5gS+BK+Qe2KrOa/Vh7w3HPBvgGf0LfcDGoY9I6NHKoA5Hozhw== + version "1.3.0" + resolved "https://registry.yarnpkg.com/escape-carriage/-/escape-carriage-1.3.0.tgz#71006b2d4da8cb6828686addafcb094239c742f3" + integrity sha512-ATWi5MD8QlAGQOeMgI8zTp671BG8aKvAC0M7yenlxU4CRLGO/sKthxVUyjiOFKjHdIo+6dZZUNFgHFeVEaKfGQ== escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= eslint-scope@^5.0.0: version "5.1.1" @@ -1156,9 +1155,9 @@ esprima@^4.0.0: integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== esquery@^1.0.1: - version "1.5.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" - integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== + version "1.4.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" + integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== dependencies: estraverse "^5.1.0" @@ -1204,14 +1203,14 @@ execa@4.1.0: signal-exit "^3.0.2" strip-final-newline "^2.0.0" -execa@^7.0.0: - version "7.1.1" - resolved "https://registry.yarnpkg.com/execa/-/execa-7.1.1.tgz#3eb3c83d239488e7b409d48e8813b76bb55c9c43" - integrity sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q== +execa@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-6.1.0.tgz#cea16dee211ff011246556388effa0818394fb20" + integrity sha512-QVWlX2e50heYJcCPG0iWtf8r0xjEYfz/OYLGDYH+IyjWezzPNxz63qNFOu0l4YftGWuizFVZHHs8PrLU5p2IDA== dependencies: cross-spawn "^7.0.3" get-stream "^6.0.1" - human-signals "^4.3.0" + human-signals "^3.0.1" is-stream "^3.0.0" merge-stream "^2.0.0" npm-run-path "^5.1.0" @@ -1254,12 +1253,12 @@ extract-zip@2.0.1: extsprintf@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - integrity sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g== + integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= extsprintf@^1.2.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.1.tgz#8d172c064867f235c0c84a596806d279bf4bcc07" - integrity sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA== + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= fast-deep-equal@^3.1.1: version "3.1.3" @@ -1274,7 +1273,12 @@ fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0: fast-levenshtein@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== + integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= + +fast-memoize@^2.5.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/fast-memoize/-/fast-memoize-2.5.2.tgz#79e3bb6a4ec867ea40ba0e7146816f6cdce9b57e" + integrity sha512-Ue0LwpDYErFbmNnZSF0UH6eImUwDmogUO1jyE+JbN2gsQz/jICm1Ve7t9QT0rNSsfJt+Hs4/S3GnsDVjL4HVrw== fault@^1.0.0: version "1.0.4" @@ -1286,7 +1290,7 @@ fault@^1.0.0: fd-slicer@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" - integrity sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g== + integrity sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4= dependencies: pend "~1.2.0" @@ -1328,16 +1332,7 @@ flatted@^2.0.0: forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - integrity sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw== - -form-data@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" - integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" + integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= form-data@~2.3.2: version "2.3.3" @@ -1351,7 +1346,7 @@ form-data@~2.3.2: format@^0.2.0: version "0.2.2" resolved "https://registry.yarnpkg.com/format/-/format-0.2.2.tgz#d6170107e9efdc4ed30c9dc39016df942b5cb58b" - integrity sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww== + integrity sha1-1hcBB+nv3E7TDJ3DkBbflCtctYs= fs-extra@^9.1.0: version "9.1.0" @@ -1366,7 +1361,7 @@ fs-extra@^9.1.0: fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= fsevents@~2.3.2: version "2.3.2" @@ -1381,22 +1376,16 @@ function-bind@^1.1.1: functional-red-black-tree@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" - integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== + integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= -functions-have-names@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" - integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== - -get-intrinsic@^1.0.2, get-intrinsic@^1.1.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz#d295644fed4505fc9cde952c37ee12b477a83d82" - integrity sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw== +get-intrinsic@^1.0.2: + version "1.1.1" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" + integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== dependencies: function-bind "^1.1.1" has "^1.0.3" - has-proto "^1.0.1" - has-symbols "^1.0.3" + has-symbols "^1.0.1" get-stream@^5.0.0, get-stream@^5.1.0: version "5.2.0" @@ -1420,7 +1409,7 @@ getos@^3.2.1: getpass@^0.1.1: version "0.1.7" resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - integrity sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng== + integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= dependencies: assert-plus "^1.0.0" @@ -1431,7 +1420,19 @@ glob-parent@^5.0.0, glob-parent@^6.0.1, glob-parent@~5.1.2: dependencies: is-glob "^4.0.3" -glob@^7.1.3, glob@^7.1.7: +glob@^7.1.3: + version "7.1.7" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" + integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.1.7: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -1457,7 +1458,12 @@ globals@^12.1.0: dependencies: type-fest "^0.8.1" -graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.9: +graceful-fs@^4.1.6, graceful-fs@^4.2.0: + version "4.2.8" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.8.tgz#e412b8d33f5e006593cbd3cee6df9f2cebbe802a" + integrity sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg== + +graceful-fs@^4.2.9: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -1470,29 +1476,17 @@ gud@^1.0.0: has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= has-flag@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== -has-property-descriptors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" - integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== - dependencies: - get-intrinsic "^1.1.1" - -has-proto@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" - integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== - -has-symbols@^1.0.2, has-symbols@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" - integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== +has-symbols@^1.0.1, has-symbols@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" + integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== has-tostringtag@^1.0.0: version "1.0.0" @@ -1530,24 +1524,24 @@ highlight.js@^10.4.1, highlight.js@~10.7.0: integrity sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A== html-to-react@^1.3.4: - version "1.5.1" - resolved "https://registry.yarnpkg.com/html-to-react/-/html-to-react-1.5.1.tgz#82ea8e5948ae15778a22888201add49e15bf8888" - integrity sha512-dFLZRBjpMk89Ukwa6Fq7oApinn3TEZD0gGFUkmI9DqNQxTjN7gF9owhyu+t8h+bpEZrX2DMxZLYjEfw0C/iL7A== + version "1.4.5" + resolved "https://registry.yarnpkg.com/html-to-react/-/html-to-react-1.4.5.tgz#59091c11021d1ef315ef738460abb6a4a41fe1ce" + integrity sha512-KONZUDFPg5OodWaQu2ymfkDmU0JA7zB1iPfvyHehTmMUZnk0DS7/TyCMTzsLH6b4BvxX15g88qZCXFhJWktsmA== dependencies: - domhandler "^5.0" - htmlparser2 "^8.0" + domhandler "^3.3.0" + htmlparser2 "^5.0" lodash.camelcase "^4.3.0" - react "^18.0" + ramda "^0.27.1" -htmlparser2@^8.0: - version "8.0.2" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-8.0.2.tgz#f002151705b383e62433b5cf466f5b716edaec21" - integrity sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA== +htmlparser2@^5.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-5.0.1.tgz#7daa6fc3e35d6107ac95a4fc08781f091664f6e7" + integrity sha512-vKZZra6CSe9qsJzh0BjBGXo8dvzNsq/oGvsjfRdOrrryfeD9UOBEEQdeoqCRmKZchF5h2zOBMQ6YuQ0uRUmdbQ== dependencies: - domelementtype "^2.3.0" - domhandler "^5.0.3" - domutils "^3.0.1" - entities "^4.4.0" + domelementtype "^2.0.1" + domhandler "^3.3.0" + domutils "^2.4.2" + entities "^2.0.0" http-signature@~1.3.6: version "1.3.6" @@ -1563,10 +1557,10 @@ human-signals@^1.1.1: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== -human-signals@^4.3.0: - version "4.3.1" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-4.3.1.tgz#ab7f811e851fca97ffbd2c1fe9a958964de321b2" - integrity sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ== +human-signals@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-3.0.1.tgz#c740920859dafa50e5a3222da9d3bf4bb0e5eef5" + integrity sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ== husky@6.0.0: version "6.0.0" @@ -1590,10 +1584,10 @@ ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -immer@^9.0.21: - version "9.0.21" - resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.21.tgz#1e025ea31a40f24fb064f1fef23e931496330176" - integrity sha512-bc4NBHqOqSfRW7POMkHd51LvClaeMXpm8dx0e8oE2GORbq5aRK7Bxl4FyzVLdGtLmvLKL7BTDBG5ACQm4HWjTA== +immer@^9.0.1: + version "9.0.6" + resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.6.tgz#7a96bf2674d06c8143e327cbf73539388ddf1a73" + integrity sha512-G95ivKpy+EvVAnAab4fVa4YGYn24J1SpEktnJX7JJ45Bd7xqME/SCplFzYFmTbrkwZbQ4xJK1xMTUYBkN6pWsQ== import-fresh@^3.0.0: version "3.3.0" @@ -1606,7 +1600,7 @@ import-fresh@^3.0.0: imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== + integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= indent-string@^4.0.0: version "4.0.0" @@ -1616,7 +1610,7 @@ indent-string@^4.0.0: inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= dependencies: once "^1.3.0" wrappy "1" @@ -1705,12 +1699,12 @@ is-decimal@^1.0.0: is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= is-fullwidth-code-point@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - integrity sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w== + integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= is-fullwidth-code-point@^3.0.0: version "3.0.0" @@ -1755,7 +1749,7 @@ is-path-inside@^3.0.2: is-plain-obj@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" - integrity sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg== + integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= is-regex@^1.0.4: version "1.1.4" @@ -1778,7 +1772,7 @@ is-stream@^3.0.0: is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA== + integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= is-unicode-supported@^0.1.0: version "0.1.0" @@ -1798,12 +1792,12 @@ is-word-character@^1.0.0: isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - integrity sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g== + integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= jest-dom@^4.0.0: version "4.0.0" @@ -1838,7 +1832,7 @@ js-yaml@^3.13.1: jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - integrity sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg== + integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= json-schema-traverse@^0.4.1: version "0.4.1" @@ -1853,12 +1847,12 @@ json-schema@0.4.0, json-schema@^0.4.0: json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" - integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== + integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== + integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= json5@^2.2.3: version "2.2.3" @@ -1887,39 +1881,39 @@ jsprim@^2.0.2: lazy-ass@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/lazy-ass/-/lazy-ass-1.6.0.tgz#7999655e8646c17f089fdd187d150d3324d54513" - integrity sha512-cc8oEVoctTvsFZ/Oje/kGnHbpWHYBe8IAJe4C0QNc3t8uM/0Y8+erSz/7Y1ALuXTEZTMvxXwO6YbX1ey3ujiZw== + integrity sha1-eZllXoZGwX8In90YfRUNMyTVRRM= levn@^0.3.0, levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" - integrity sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA== + integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= dependencies: prelude-ls "~1.1.2" type-check "~0.3.2" -lilconfig@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.1.0.tgz#78e23ac89ebb7e1bfbf25b18043de756548e7f52" - integrity sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ== +lilconfig@2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.6.tgz#32a384558bd58af3d4c6e077dd1ad1d397bc69d4" + integrity sha512-9JROoBW7pobfsx+Sq2JsASvCo6Pfo6WWoUW79HuB1BCoBXD4PLWJPqDF6fNj67pqBYTbAHkE57M1kS/+L1neOg== lint-staged@^13.1.0: - version "13.2.2" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-13.2.2.tgz#5e711d3139c234f73402177be2f8dd312e6508ca" - integrity sha512-71gSwXKy649VrSU09s10uAT0rWCcY3aewhMaHyl2N84oBk4Xs9HgxvUp3AYu+bNsK4NrOYYxvSgg7FyGJ+jGcA== + version "13.1.0" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-13.1.0.tgz#d4c61aec939e789e489fa51987ec5207b50fd37e" + integrity sha512-pn/sR8IrcF/T0vpWLilih8jmVouMlxqXxKuAojmbiGX5n/gDnz+abdPptlj0vYnbfE0SQNl3CY/HwtM0+yfOVQ== dependencies: - chalk "5.2.0" cli-truncate "^3.1.0" - commander "^10.0.0" + colorette "^2.0.19" + commander "^9.4.1" debug "^4.3.4" - execa "^7.0.0" - lilconfig "2.1.0" - listr2 "^5.0.7" + execa "^6.1.0" + lilconfig "2.0.6" + listr2 "^5.0.5" micromatch "^4.0.5" normalize-path "^3.0.0" - object-inspect "^1.12.3" + object-inspect "^1.12.2" pidtree "^0.6.0" string-argv "^0.3.1" - yaml "^2.2.2" + yaml "^2.1.3" listr2@^3.8.3: version "3.14.0" @@ -1935,39 +1929,39 @@ listr2@^3.8.3: through "^2.3.8" wrap-ansi "^7.0.0" -listr2@^5.0.7: - version "5.0.8" - resolved "https://registry.yarnpkg.com/listr2/-/listr2-5.0.8.tgz#a9379ffeb4bd83a68931a65fb223a11510d6ba23" - integrity sha512-mC73LitKHj9w6v30nLNGPetZIlfpUniNSsxxrbaPcWOjDb92SHPzJPi/t+v1YC/lxKz/AJ9egOjww0qUuFxBpA== +listr2@^5.0.5: + version "5.0.6" + resolved "https://registry.yarnpkg.com/listr2/-/listr2-5.0.6.tgz#3c61153383869ffaad08a8908d63edfde481dff8" + integrity sha512-u60KxKBy1BR2uLJNTWNptzWQ1ob/gjMzIJPZffAENzpZqbMZ/5PrXXOomDcevIS/+IB7s1mmCEtSlT2qHWMqag== dependencies: cli-truncate "^2.1.0" colorette "^2.0.19" log-update "^4.0.0" p-map "^4.0.0" rfdc "^1.3.0" - rxjs "^7.8.0" + rxjs "^7.5.7" through "^2.3.8" wrap-ansi "^7.0.0" load-script@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/load-script/-/load-script-1.0.0.tgz#0491939e0bee5643ee494a7e3da3d2bac70c6ca4" - integrity sha512-kPEjMFtZvwL9TaZo0uZ2ml+Ye9HUMmPwbYRJ324qF9tqMejwykJ5ggTyvzmrbBeapCAbk98BSbTeovHEEP1uCA== + integrity sha1-BJGTngvuVkPuSUp+PaPSuscMbKQ= lodash.camelcase@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" - integrity sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA== + integrity sha1-soqmKIorn8ZRA1x3EfZathkDMaY= lodash.curry@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/lodash.curry/-/lodash.curry-4.1.1.tgz#248e36072ede906501d75966200a86dab8b23170" - integrity sha512-/u14pXGviLaweY5JI0IUzgzF2J6Ne8INyzAZjImcryjgkZ+ebruBxy2/JaOOkTqScddcYtakjhSaeemV8lR0tA== + integrity sha1-JI42By7ekGUB11lmIAqG2riyMXA= lodash.flow@^3.5.0: version "3.5.0" resolved "https://registry.yarnpkg.com/lodash.flow/-/lodash.flow-3.5.0.tgz#87bf40292b8cf83e4e8ce1a3ae4209e20071675a" - integrity sha512-ff3BX/tSioo+XojX4MOsOMhJw0nZoUEF011LX8g8d3gvjVbxd89cCio4BCXronjxcTUIJUoqKEUA+n4CqvvRPw== + integrity sha1-h79AKSuM+D5OjOGjrkIJ4gBxZ1o= lodash.memoize@4.x: version "4.1.2" @@ -1977,7 +1971,7 @@ lodash.memoize@4.x: lodash.once@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" - integrity sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg== + integrity sha1-DdOXEhPHxW34gJd9UEyI+0cal6w= lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21: version "4.17.21" @@ -2002,7 +1996,7 @@ log-update@^4.0.0: slice-ansi "^4.0.0" wrap-ansi "^6.2.0" -loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: +loose-envify@^1.0.0, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== @@ -2054,17 +2048,17 @@ micromatch@^4.0.5: braces "^3.0.2" picomatch "^2.3.1" -mime-db@1.52.0: - version "1.52.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== +mime-db@1.49.0: + version "1.49.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.49.0.tgz#f3dfde60c99e9cf3bc9701d687778f537001cbed" + integrity sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA== mime-types@^2.1.12, mime-types@~2.1.19: - version "2.1.35" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + version "2.1.32" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.32.tgz#1d00e89e7de7fe02008db61001d9e02852670fd5" + integrity sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A== dependencies: - mime-db "1.52.0" + mime-db "1.49.0" mimic-fn@^2.1.0: version "2.1.0" @@ -2083,10 +2077,10 @@ minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1: dependencies: brace-expansion "^1.1.7" -minimist@^1.2.5, minimist@^1.2.6, minimist@^1.2.8: - version "1.2.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" - integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== +minimist@^1.2.5, minimist@^1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" + integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== mkdirp@^0.5.1: version "0.5.6" @@ -2108,7 +2102,7 @@ mute-stream@0.0.8: natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== + integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= nice-try@^1.0.4: version "1.0.5" @@ -2142,9 +2136,9 @@ npm-run-path@^5.1.0: object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= -object-inspect@^1.12.3: +object-inspect@^1.12.2: version "1.12.3" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== @@ -2157,7 +2151,7 @@ object-is@^1.0.1: call-bind "^1.0.2" define-properties "^1.1.3" -object-keys@^1.1.1: +object-keys@^1.0.12, object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== @@ -2165,7 +2159,7 @@ object-keys@^1.1.1: once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= dependencies: wrappy "1" @@ -2198,12 +2192,12 @@ optionator@^0.8.3: os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== + integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= ospath@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/ospath/-/ospath-1.2.2.tgz#1276639774a3f8ef2572f7fe4280e0ea4550c07b" - integrity sha512-o6E5qJV5zkAbIDNhGSIlyOhScKXgQrSRMilfph0clDfM0nEnBOlKlH4sWDmG95BW/CvwNz0vmm7dJVtU2KlMiA== + integrity sha1-EnZjl3Sj+O8lcvf+QoDg6kVQwHs= p-map@^4.0.0: version "4.0.0" @@ -2246,12 +2240,12 @@ parse-entities@^2.0.0: path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= path-key@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - integrity sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw== + integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= path-key@^3.0.0, path-key@^3.1.0: version "3.1.1" @@ -2266,12 +2260,12 @@ path-key@^4.0.0: pend@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" - integrity sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg== + integrity sha1-elfrVQpng/kRUzH89GY9XI4AelA= performance-now@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow== + integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.1: version "2.3.1" @@ -2286,12 +2280,12 @@ pidtree@^0.6.0: pify@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - integrity sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog== + integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= plotly.js-dist@^2.2.0: - version "2.23.1" - resolved "https://registry.yarnpkg.com/plotly.js-dist/-/plotly.js-dist-2.23.1.tgz#56fabd8a66ab66ecc24073bd48682c9a957b5a95" - integrity sha512-+C9FAAEO3/Fw/4sRzwlo9dAjjExXcFNRgbrSHLeYWPppxmglx1RU26vUo8c98LCH9H/5X30BLpgOCJBp8nWJiw== + version "2.4.1" + resolved "https://registry.yarnpkg.com/plotly.js-dist/-/plotly.js-dist-2.4.1.tgz#0afaf84132427720eda625c5908d9981318ab348" + integrity sha512-OsZgXlUJaxib+6HjrEaux61FaqNVLDiotNKF5JdoacigvAWoiTRUAD/K1x560jFR3fDzXaZ4mpXBbJukc5i3HQ== popper.js@^1.14.4, popper.js@^1.16.1: version "1.16.1" @@ -2312,24 +2306,33 @@ postinstall@^0.7.4: prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" - integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== + integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= pretty-bytes@^5.6.0: version "5.6.0" resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb" integrity sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg== -prismjs@^1.22.0, prismjs@^1.27.0, prismjs@~1.27.0: - version "1.29.0" - resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.29.0.tgz#f113555a8fa9b57c35e637bba27509dcf802dd12" - integrity sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q== +prismjs@^1.22.0, prismjs@~1.24.0: + version "1.27.0" + resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.27.0.tgz#bb6ee3138a0b438a3653dd4d6ce0cc6510a45057" + integrity sha512-t13BGPUlFDR7wRB5kQDG4jjl7XeuH6jbJGt11JHPL96qwsEHNX2+68tFXqc1/k+/jALsbSWJKUOT/hcYAZ5LkA== progress@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== -prop-types@^15, prop-types@^15.5.10, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2, prop-types@^15.8.1: +prop-types@^15.5.10, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2: + version "15.7.2" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" + integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== + dependencies: + loose-envify "^1.4.0" + object-assign "^4.1.1" + react-is "^16.8.1" + +prop-types@^15.8.1: version "15.8.1" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== @@ -2351,9 +2354,9 @@ proxy-from-env@1.0.0: integrity sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A== psl@^1.1.28: - version "1.9.0" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" - integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== + version "1.8.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" + integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== pump@^3.0.0: version "3.0.0" @@ -2364,24 +2367,31 @@ pump@^3.0.0: once "^1.3.1" punycode@^2.1.0, punycode@^2.1.1: - version "2.3.0" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" - integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== pure-color@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/pure-color/-/pure-color-1.3.0.tgz#1fe064fb0ac851f0de61320a8bf796836422f33e" - integrity sha512-QFADYnsVoBMw1srW7OVKEYjG+MbIa49s54w1MA1EDY6r2r/sTcKKYqRX1f4GYvnXP7eN/Pe9HFcX+hwzmrXRHA== + integrity sha1-H+Bk+wrIUfDeYTIKi/eWg2Qi8z4= qs@~6.10.3, qs@~6.5.3: version "6.5.3" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== +ramda@^0.27.1: + version "0.27.1" + resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.27.1.tgz#66fc2df3ef873874ffc2da6aa8984658abacf5c9" + integrity sha512-PgIdVpn5y5Yns8vqb8FzBUEYn98V3xcPgawAkkgj0YJ0qDsnHCiNmZYfOGMgOvoB0eWFLpYbhxUR3mxfDIMvpw== + re-resizable@^6.5.0: - version "6.9.9" - resolved "https://registry.yarnpkg.com/re-resizable/-/re-resizable-6.9.9.tgz#99e8b31c67a62115dc9c5394b7e55892265be216" - integrity sha512-l+MBlKZffv/SicxDySKEEh42hR6m5bAHfNu3Tvxks2c4Ah+ldnWjfnVRwxo/nxF27SsUsxDS0raAzFuJNKABXA== + version "6.9.0" + resolved "https://registry.yarnpkg.com/re-resizable/-/re-resizable-6.9.0.tgz#9c3059b389ced6ade602234cc5bb1e12d231cd47" + integrity sha512-3cUDG81ylyqI0Pdgle/RHwwRYq0ORZzsUaySOCO8IbEtNyaRtrIHYm/jMQ5pjcNiKCxR3vsSymIQZHwJq4gg2Q== + dependencies: + fast-memoize "^2.5.1" react-base16-styling@^0.7.0: version "0.7.0" @@ -2404,7 +2414,7 @@ react-graph-vis@^1.0.5: vis-data "^7.1.2" vis-network "^9.0.0" -react-is@^16.13.1, react-is@^16.8.6: +react-is@^16.13.1, react-is@^16.8.1, react-is@^16.8.6: version "16.13.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== @@ -2437,18 +2447,18 @@ react-markdown@^4.0.0: xtend "^4.0.1" react-paginate@^8.1.3: - version "8.2.0" - resolved "https://registry.yarnpkg.com/react-paginate/-/react-paginate-8.2.0.tgz#947c3dcb444a6c16c1bcf8361871aa135baa3dcd" - integrity sha512-sJCz1PW+9PNIjUSn919nlcRVuleN2YPoFBOvL+6TPgrH/3lwphqiSOgdrLafLdyLDxsgK+oSgviqacF4hxsDIw== + version "8.1.3" + resolved "https://registry.yarnpkg.com/react-paginate/-/react-paginate-8.1.3.tgz#cd6f3cb8a56b47617a61a6a52e3d7c662ad9b91b" + integrity sha512-zBp80DBRcaeBnAeHUfbGKD0XHfbGNUolQ+S60Ymfs8o7rusYaJYZMAt1j93ADDNLlzRmJ0tMF/NeTlcdKf7dlQ== dependencies: - prop-types "^15" + prop-types "^15.6.1" react-plotly.js@^2.5.1: - version "2.6.0" - resolved "https://registry.yarnpkg.com/react-plotly.js/-/react-plotly.js-2.6.0.tgz#ad6b68ee64f1b5cfa142ee92c59687f9c2c09209" - integrity sha512-g93xcyhAVCSt9kV1svqG1clAEdL6k3U+jjuSzfTV7owaSU9Go6Ph8bl25J+jKfKvIGAEYpe4qj++WHJuc9IaeA== + version "2.5.1" + resolved "https://registry.yarnpkg.com/react-plotly.js/-/react-plotly.js-2.5.1.tgz#11182bf599ef11a0dbfcd171c6f5645535a2b486" + integrity sha512-Oya14whSHvPsYXdI0nHOGs1pZhMzV2edV7HAW1xFHD58Y73m/LbG2Encvyz1tztL0vfjph0JNhiwO8cGBJnlhg== dependencies: - prop-types "^15.8.1" + prop-types "^15.7.2" react-popper@^1.3.7: version "1.3.11" @@ -2464,20 +2474,20 @@ react-popper@^1.3.7: warning "^4.0.2" react-syntax-highlighter@^13.0.0, react-syntax-highlighter@^15.4.3: - version "15.5.0" - resolved "https://registry.yarnpkg.com/react-syntax-highlighter/-/react-syntax-highlighter-15.5.0.tgz#4b3eccc2325fa2ec8eff1e2d6c18fa4a9e07ab20" - integrity sha512-+zq2myprEnQmH5yw6Gqc8lD55QHnpKaU8TOcFeC/Lg/MQSs8UknEA0JC4nTZGFAXC2J2Hyj/ijJ7NlabyPi2gg== + version "15.4.4" + resolved "https://registry.yarnpkg.com/react-syntax-highlighter/-/react-syntax-highlighter-15.4.4.tgz#dc9043f19e7bd063ff3ea78986d22a6eaa943b2a" + integrity sha512-PsOFHNTzkb3OroXdoR897eKN5EZ6grht1iM+f1lJSq7/L0YVnkJaNVwC3wEUYPOAmeyl5xyer1DjL6MrumO6Zw== dependencies: "@babel/runtime" "^7.3.1" highlight.js "^10.4.1" lowlight "^1.17.0" - prismjs "^1.27.0" - refractor "^3.6.0" + prismjs "^1.22.0" + refractor "^3.2.0" react-toggle@^4.1.1: - version "4.1.3" - resolved "https://registry.yarnpkg.com/react-toggle/-/react-toggle-4.1.3.tgz#99193392cca8e495710860c49f55e74c4e6cf452" - integrity sha512-WoPrvbwfQSvoagbrDnXPrlsxwzuhQIrs+V0I162j/s+4XPgY/YDAUmHSeWiroznfI73wj+MBydvW95zX8ABbSg== + version "4.1.2" + resolved "https://registry.yarnpkg.com/react-toggle/-/react-toggle-4.1.2.tgz#b00500832f925ad524356d909821821ae39f6c52" + integrity sha512-4Ohw31TuYQdhWfA6qlKafeXx3IOH7t4ZHhmRdwsm1fQREwOBGxJT+I22sgHqR/w8JRdk+AeMCJXPImEFSrNXow== dependencies: classnames "^2.2.5" @@ -2491,13 +2501,6 @@ react-transition-group@^2.9.0: prop-types "^15.6.2" react-lifecycles-compat "^3.0.4" -react@^18.0: - version "18.2.0" - resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5" - integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ== - dependencies: - loose-envify "^1.1.0" - readdirp@~3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" @@ -2510,40 +2513,39 @@ redux-persist@^6.0.0: resolved "https://registry.yarnpkg.com/redux-persist/-/redux-persist-6.0.0.tgz#b4d2972f9859597c130d40d4b146fecdab51b3a8" integrity sha512-71LLMbUq2r02ng2We9S215LtPu3fY0KgaGE0k8WRgl6RkqxtGfl7HUozz1Dftwsb0D/5mZ8dwAaPbtnzfvbEwQ== -redux-thunk@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-2.4.2.tgz#b9d05d11994b99f7a91ea223e8b04cf0afa5ef3b" - integrity sha512-+P3TjtnP0k/FEjcBL5FZpoovtvrTNT/UXd4/sluaSyrURlSlhLSzEdfsTBW7WsKB6yPvgd7q/iZPICFjW4o57Q== +redux-thunk@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-2.3.0.tgz#51c2c19a185ed5187aaa9a2d08b666d0d6467622" + integrity sha512-km6dclyFnmcvxhAcrQV2AkZmPQjzPDjgVlQtR0EQjxZPyJ0BnMf3in1ryuR8A2qU0HldVRfxYXbFSKlI3N7Slw== -redux@^4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/redux/-/redux-4.2.1.tgz#c08f4306826c49b5e9dc901dee0452ea8fce6197" - integrity sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w== +redux@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/redux/-/redux-4.1.1.tgz#76f1c439bb42043f985fbd9bf21990e60bd67f47" + integrity sha512-hZQZdDEM25UY2P493kPYuKqviVwZ58lEmGQNeQ+gXa+U0gYPUBf7NKYazbe3m+bs/DzM/ahN12DbF+NG8i0CWw== dependencies: "@babel/runtime" "^7.9.2" -refractor@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/refractor/-/refractor-3.6.0.tgz#ac318f5a0715ead790fcfb0c71f4dd83d977935a" - integrity sha512-MY9W41IOWxxk31o+YvFCNyNzdkc9M20NoZK5vq6jkv4I/uh2zkWcfudj0Q1fovjUQJrNewS9NMzeTtqPf+n5EA== +refractor@^3.2.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/refractor/-/refractor-3.4.0.tgz#62bd274b06c942041f390c371b676eb67cb0a678" + integrity sha512-dBeD02lC5eytm9Gld2Mx0cMcnR+zhSnsTfPpWqFaMgUMJfC9A6bcN3Br/NaXrnBJcuxnLFR90k1jrkaSyV8umg== dependencies: hastscript "^6.0.0" parse-entities "^2.0.0" - prismjs "~1.27.0" + prismjs "~1.24.0" -regenerator-runtime@^0.13.11: - version "0.13.11" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" - integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== +regenerator-runtime@^0.13.4: + version "0.13.9" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52" + integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA== regexp.prototype.flags@^1.2.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz#fe7ce25e7e4cca8db37b6634c8a2c7009199b9cb" - integrity sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA== + version "1.3.1" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz#7ef352ae8d159e758c0eadca6f8fcb4eef07be26" + integrity sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA== dependencies: call-bind "^1.0.2" - define-properties "^1.2.0" - functions-have-names "^1.2.3" + define-properties "^1.1.3" regexpp@^2.0.1: version "2.0.1" @@ -2574,24 +2576,29 @@ remark-parse@^5.0.0: repeat-string@^1.5.4: version "1.6.1" resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - integrity sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w== + integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= replace-ext@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb" - integrity sha512-vuNYXC7gG7IeVNBC1xUllqCcZKRbJoSPOBhnTEcAIiKCsbuef6zO3F0Rve3isPMMoNoQRWjQwbAgAjHUHniyEA== + integrity sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs= request-progress@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/request-progress/-/request-progress-3.0.0.tgz#4ca754081c7fec63f505e4faa825aa06cd669dbe" - integrity sha512-MnWzEHHaxHO2iWiQuHrUPBi/1WeBf5PkxQqNyNvLl9VAYSdXkP8tQ3pBSeCPD+yw0v0Aq1zosWLz0BdeXpWwZg== + integrity sha1-TKdUCBx/7GP1BeT6qCWqBs1mnb4= dependencies: throttleit "^1.0.0" -reselect@^4.1.8: - version "4.1.8" - resolved "https://registry.yarnpkg.com/reselect/-/reselect-4.1.8.tgz#3f5dc671ea168dccdeb3e141236f69f02eaec524" - integrity sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ== +reselect@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/reselect/-/reselect-4.0.0.tgz#f2529830e5d3d0e021408b246a206ef4ea4437f7" + integrity sha512-qUgANli03jjAyGlnbYVAV5vvnOmJnODyABz51RdBN7M4WaVu8mecZWgyQNkG8Yqe3KRGRt0l4K4B3XVEULC4CA== + +resize-observer-polyfill@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz#0e9020dd3d21024458d4ebd27e23e40269810464" + integrity sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg== resolve-from@^4.0.0: version "4.0.0" @@ -2649,13 +2656,20 @@ rxjs@^6.6.0: dependencies: tslib "^1.9.0" -rxjs@^7.5.1, rxjs@^7.8.0: +rxjs@^7.5.1: version "7.8.1" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543" integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== dependencies: tslib "^2.1.0" +rxjs@^7.5.7: + version "7.8.0" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.0.tgz#90a938862a82888ff4c7359811a595e14e1e09a4" + integrity sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg== + dependencies: + tslib "^2.1.0" + safe-buffer@^5.0.1, safe-buffer@^5.1.2: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" @@ -2666,10 +2680,10 @@ safe-buffer@^5.0.1, safe-buffer@^5.1.2: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -semver@7.x, semver@^7.3.2: - version "7.5.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.1.tgz#c90c4d631cf74720e46b21c1d37ea07edfab91ec" - integrity sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw== +semver@7.x: + version "7.3.8" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" + integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== dependencies: lru-cache "^6.0.0" @@ -2683,10 +2697,17 @@ semver@^6.1.2: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +semver@^7.3.2: + version "7.5.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.1.tgz#c90c4d631cf74720e46b21c1d37ea07edfab91ec" + integrity sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw== + dependencies: + lru-cache "^6.0.0" + shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - integrity sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg== + integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= dependencies: shebang-regex "^1.0.0" @@ -2700,14 +2721,19 @@ shebang-command@^2.0.0: shebang-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" - integrity sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ== + integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= shebang-regex@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -signal-exit@^3.0.2, signal-exit@^3.0.7: +signal-exit@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" + integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== + +signal-exit@^3.0.7: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== @@ -2755,7 +2781,7 @@ space-separated-tokens@^1.0.0: sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== + integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= sshpk@^1.14.1: version "1.17.0" @@ -2778,9 +2804,9 @@ state-toggle@^1.0.0: integrity sha512-d/5Z4/2iiCnHw6Xzghyhb+GcmF89bxwgXG60wjIiZaxnymbyOmI8Hk4VqHXiVVp6u2ysaskFfXg3ekCj4WNftQ== string-argv@^0.3.1: - version "0.3.2" - resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.2.tgz#2b6d0ef24b656274d957d54e0a4bbf6153dc02b6" - integrity sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q== + version "0.3.1" + resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da" + integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg== string-width@^3.0.0: version "3.1.0" @@ -2791,7 +2817,7 @@ string-width@^3.0.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^5.1.0" -string-width@^4.1.0, string-width@^4.2.0: +string-width@^4.1.0: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -2800,6 +2826,15 @@ string-width@^4.1.0, string-width@^4.2.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" +string-width@^4.2.0: + version "4.2.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.2.tgz#dafd4f9559a7585cfba529c6a0a4f73488ebd4c5" + integrity sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.0" + string-width@^5.0.0: version "5.1.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" @@ -2816,7 +2851,14 @@ strip-ansi@^5.1.0, strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" -strip-ansi@^6.0.0, strip-ansi@^6.0.1: +strip-ansi@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" + integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== + dependencies: + ansi-regex "^5.0.0" + +strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -2879,17 +2921,17 @@ table@^5.2.3: text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== + integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= throttleit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-1.0.0.tgz#9e785836daf46743145a5984b6268d828528ac6c" - integrity sha512-rkTVqu6IjfQ/6+uNuuc3sZek4CEYxTJom3IktzgdSxcZqdARuebbA/f4QmAxMQIxqq9ZLEUkSYqvuk1I6VKq4g== + integrity sha1-nnhYNtr0Z0MUWlmEtiaNgoUorGw= through@^2.3.6, through@^2.3.8: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== + integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= tmp@^0.0.33: version "0.0.33" @@ -2955,31 +2997,31 @@ tslib@^1.9.0: integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== tslib@^2.1.0: - version "2.5.2" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.2.tgz#1b6f07185c881557b0ffa84b111a0106989e8338" - integrity sha512-5svOrSA2w3iGFDs1HibEVBGbDrAY82bFQ3HZ3ixB+88nsbsWQoKqDRb5UBYAUPEzbBn6dAp5gRNXglySbx1MlA== + version "2.4.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e" + integrity sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA== -tslib@~2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" - integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== +tslib@~1.13.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043" + integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - integrity sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w== + integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= dependencies: safe-buffer "^5.0.1" tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - integrity sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA== + integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= type-check@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" - integrity sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg== + integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= dependencies: prelude-ls "~1.1.2" @@ -3074,7 +3116,7 @@ uri-js@^4.2.2: uuid@^2.0.1: version "2.0.3" resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a" - integrity sha512-FULf7fayPdpASncVy4DLh3xydlXEJJpvIELjYjNeQWYUZ9pclcpvCZSr2gkmN2FrrGcI7G/cJsIEwk5/8vfXpg== + integrity sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho= uuid@^8.3.2: version "8.3.2" @@ -3089,7 +3131,7 @@ v8-compile-cache@^2.0.3: verror@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - integrity sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw== + integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= dependencies: assert-plus "^1.0.0" core-util-is "1.0.2" @@ -3118,14 +3160,14 @@ vfile@^2.0.0: vfile-message "^1.0.0" vis-data@^7.1.2: - version "7.1.6" - resolved "https://registry.yarnpkg.com/vis-data/-/vis-data-7.1.6.tgz#81dcf4d024d23183cacb680ad605e644cdd6ee6c" - integrity sha512-lG7LJdkawlKSXsdcEkxe/zRDyW29a4r7N7PMwxCPxK12/QIdqxJwcMxwjVj9ozdisRhP5TyWDHZwsgjmj0g6Dg== + version "7.1.2" + resolved "https://registry.yarnpkg.com/vis-data/-/vis-data-7.1.2.tgz#b7d076ac79cb54f7c5e9c80f5b03b93cc8cc1fda" + integrity sha512-RPSegFxEcnp3HUEJSzhS2vBdbJ2PSsrYYuhRlpHp2frO/MfRtTYbIkkLZmPkA/Sg3pPfBlR235gcoKbtdm4mbw== vis-network@^9.0.0: - version "9.1.6" - resolved "https://registry.yarnpkg.com/vis-network/-/vis-network-9.1.6.tgz#943df07e829248943656a2f19a7ec87cc1b707de" - integrity sha512-Eiwx1JleAsUqfy4pzcsFngCVlCEdjAtRPB/OwCV7PHBm+o2jtE4IZPcPITAEGUlxvL4Fdw7/lZsfD32dL+IL6g== + version "9.1.0" + resolved "https://registry.yarnpkg.com/vis-network/-/vis-network-9.1.0.tgz#511db833b68060f279bedc4a852671261d40204e" + integrity sha512-rx96L144RJWcqOa6afjiFyxZKUerRRbT/YaNMpsusHdwzxrVTO2LlduR45PeJDEztrAf3AU5l2zmiG+1ydUZCw== warning@^4.0.2, warning@^4.0.3: version "4.0.3" @@ -3174,7 +3216,7 @@ wrap-ansi@^7.0.0: wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= write@1.0.3: version "1.0.3" @@ -3191,7 +3233,7 @@ ws@8.13.0: x-is-string@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/x-is-string/-/x-is-string-0.1.0.tgz#474b50865af3a49a9c4657f05acd145458f77d82" - integrity sha512-GojqklwG8gpzOVEVki5KudKNoq7MbbjYZCbyWzEz7tyPA7eleiE0+ePwOWQQRb5fm86rD3S8Tc0tSFf3AOv50w== + integrity sha1-R0tQhlrzpJqcRlfwWs0UVFj3fYI= xtend@^4.0.0, xtend@^4.0.1: version "4.0.2" @@ -3203,7 +3245,7 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yaml@^2.2.2: +yaml@^2.1.3, yaml@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.2.2.tgz#ec551ef37326e6d42872dad1970300f8eb83a073" integrity sha512-CBKFWExMn46Foo4cldiChEzn7S7SRV+wqiluAb6xmueD/fGyRHIhX8m14vVGgeFWjN540nKCNVj6P21eQjgTuA== @@ -3216,7 +3258,7 @@ yargs-parser@^21.0.1: yauzl@^2.10.0: version "2.10.0" resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" - integrity sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g== + integrity sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk= dependencies: buffer-crc32 "~0.2.3" fd-slicer "~1.1.0" From c126f51b7151c1ddebe71d35dfc4d325d256d186 Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Fri, 26 May 2023 11:58:40 -0400 Subject: [PATCH 080/190] add sanity test cypress test Signed-off-by: Derek Ho --- .cypress/integration/8_integrations.spec.js | 36 +++++++++++++++++++ .../components/integration_header.tsx | 2 +- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 .cypress/integration/8_integrations.spec.js diff --git a/.cypress/integration/8_integrations.spec.js b/.cypress/integration/8_integrations.spec.js new file mode 100644 index 0000000000..ec1d4017a2 --- /dev/null +++ b/.cypress/integration/8_integrations.spec.js @@ -0,0 +1,36 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +/// + +import { + delay, + TEST_NOTEBOOK, + MARKDOWN_TEXT, + SAMPLE_URL, + SQL_QUERY_TEXT, + PPL_QUERY_TEXT, + NOTEBOOK_TEXT, + OPENSEARCH_URL, + COMMAND_TIMEOUT_LONG, + } from '../utils/constants'; + + import { skipOn } from '@cypress/skip-test'; + + const moveToIntegrationsHome = () => { + cy.visit(`${Cypress.env('opensearchDashboards')}/app/observability-integrations#/`); + }; + + + + describe('Basic sanity test for integrations plugin', () => { + it('Navigates to integrations plugin and expects the correct header', () => { + moveToIntegrationsHome(); + cy.get('[data-test-subj="integrations-header"]').should('exist'); + }); + }); + + + \ No newline at end of file diff --git a/public/components/integrations/components/integration_header.tsx b/public/components/integrations/components/integration_header.tsx index ce0b47f640..6d56622ff9 100644 --- a/public/components/integrations/components/integration_header.tsx +++ b/public/components/integrations/components/integration_header.tsx @@ -20,7 +20,7 @@ export function IntegrationHeader() {
- +

Integrations

From 2d21b7d791742edbe33ee6f6b86b9672a263afef Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Fri, 26 May 2023 12:03:54 -0400 Subject: [PATCH 081/190] clean up code Signed-off-by: Derek Ho --- .../added_integration_overview_page.tsx | 3 - .../available_integration_overview_page.tsx | 3 - public/components/integrations/home.tsx | 234 +----------------- 3 files changed, 3 insertions(+), 237 deletions(-) diff --git a/public/components/integrations/components/added_integration_overview_page.tsx b/public/components/integrations/components/added_integration_overview_page.tsx index 92ad3b6e37..e1b953e61d 100644 --- a/public/components/integrations/components/added_integration_overview_page.tsx +++ b/public/components/integrations/components/added_integration_overview_page.tsx @@ -16,9 +16,6 @@ import { INTEGRATIONS_BASE } from '../../../../common/constants/shared'; export interface AppTableProps extends AppAnalyticsComponentDeps { loading: boolean; applications: ApplicationType[]; - fetchApplications: () => void; - renameApplication: (newAppName: string, appId: string) => void; - deleteApplication: (appList: string[], panelIdList: string[], toastMessage?: string) => void; clearStorage: () => void; moveToApp: (id: string, type: string) => void; } diff --git a/public/components/integrations/components/available_integration_overview_page.tsx b/public/components/integrations/components/available_integration_overview_page.tsx index 506a2879e5..74a03b541a 100644 --- a/public/components/integrations/components/available_integration_overview_page.tsx +++ b/public/components/integrations/components/available_integration_overview_page.tsx @@ -26,9 +26,6 @@ import { getAddIntegrationModal } from './add_integration_modal'; interface AppTableProps extends AppAnalyticsComponentDeps { loading: boolean; applications: ApplicationType[]; - fetchApplications: () => void; - renameApplication: (newAppName: string, appId: string) => void; - deleteApplication: (appList: string[], panelIdList: string[], toastMessage?: string) => void; clearStorage: () => void; moveToApp: (id: string, type: string) => void; } diff --git a/public/components/integrations/home.tsx b/public/components/integrations/home.tsx index c40cd1cf8b..fc5fbdf981 100644 --- a/public/components/integrations/home.tsx +++ b/public/components/integrations/home.tsx @@ -12,23 +12,14 @@ import SavedObjects from 'public/services/saved_objects/event_analytics/saved_ob import TimestampUtils from 'public/services/timestamp/timestamp'; import { EuiGlobalToastList, EuiLink } from '@elastic/eui'; import { Toast } from '@elastic/eui/src/components/toast/global_toast_list'; -import { isEmpty, last } from 'lodash'; +import { last } from 'lodash'; import { useDispatch } from 'react-redux'; -import { Application, Integration } from './components/integration'; +import { Integration } from './components/integration'; import { TraceAnalyticsComponentDeps, TraceAnalyticsCoreDeps } from '../trace_analytics/home'; import { FilterType } from '../trace_analytics/components/common/filters/filters'; import { handleDataPrepperIndicesExistRequest } from '../trace_analytics/requests/request_handler'; -import { ObservabilitySideBar } from '../common/side_nav'; import { ChromeBreadcrumb, NotificationsStart } from '../../../../../src/core/public'; -import { APP_ANALYTICS_API_PREFIX } from '../../../common/constants/application_analytics'; -import { - ApplicationRequestType, - ApplicationType, -} from '../../../common/types/application_analytics'; -import { - CUSTOM_PANELS_API_PREFIX, - CUSTOM_PANELS_DOCUMENTATION_URL, -} from '../../../common/constants/custom_panels'; +import { ApplicationType } from '../../../common/types/application_analytics'; import { QueryManager } from '../../../common/query_manager/ppl_query_manager'; import { AvailableIntegrationOverviewPage, @@ -160,219 +151,6 @@ export const Home = (props: HomeProps) => { } }; - const createPanelForApp = (applicationId: string, appName: string, type: string) => { - return http - .post(`${CUSTOM_PANELS_API_PREFIX}/panels`, { - body: JSON.stringify({ - panelName: `${appName}'s Panel`, - applicationId, - }), - }) - .then((res) => { - updateApp(applicationId, { panelId: res.newPanelId }, type); - }) - .catch((err) => { - setToast( - 'Please ask your administrator to enable Operational Panels for you.', - 'danger', - - Documentation - - ); - console.error(err); - }); - }; - - const deletePanelForApp = (appPanelId: string) => { - const concatList = [appPanelId].toString(); - return http.delete(`${CUSTOM_PANELS_API_PREFIX}/panelList/` + concatList).catch((err) => { - setToast( - 'Error occurred while deleting Operational Panels, please make sure you have the correct permission.', - 'danger' - ); - console.error(err.body.message); - }); - }; - - const deleteSavedVisualizationsForPanel = async (appPanelId: string) => { - const savedVizIdsToDelete = await fetchPanelsVizIdList(http, appPanelId); - if (!isEmpty(savedVizIdsToDelete)) { - savedObjects - .deleteSavedObjectsList({ objectIdList: savedVizIdsToDelete }) - .then((res) => { - deletePanelForApp(appPanelId); - }) - .catch((err) => { - setToast('Error occurred while deleting Saved Visualizations', 'danger'); - console.error(err); - }); - } - }; - - // Fetches all existing applications - const fetchApps = () => { - return http - .get(`${APP_ANALYTICS_API_PREFIX}/`) - .then(async (res) => { - // Want to calculate availability going down the table - const availabilityVisIdStore: Record = {}; - for (let i = 0; i < res.data.length; i++) { - availabilityVisIdStore[res.data[i].id] = res.data[i].availability.availabilityVisId; - res.data[i].availability = { name: '', color: 'loading', availabilityVisId: '' }; - } - setApplicationList(res.data); - for (let i = res.data.length - 1; i > -1; i--) { - res.data[i].availability = await calculateAvailability( - http, - pplService, - res.data[i], - availabilityVisIdStore[res.data[i].id], - () => {} - ); - // Need to set state with new object to trigger re-render - setApplicationList([ - ...res.data.filter((app: ApplicationType) => app.id !== res.data[i].id), - res.data[i], - ]); - } - }) - .catch((err) => { - setToast('Error occurred while fetching applications', 'danger'); - console.error(err); - }); - }; - - // Create a new application - const createApp = (application: ApplicationRequestType, type: string) => { - const toast = isNameValid( - application.name, - applicationList.map((obj) => obj.name) - ); - if (toast.length > 0) { - setToast(toast.join(', '), 'danger'); - return; - } - - const requestBody = { - name: application.name, - description: application.description || '', - baseQuery: application.baseQuery, - servicesEntities: application.servicesEntities, - traceGroups: application.traceGroups, - availabilityVisId: '', - }; - - return http - .post(`${APP_ANALYTICS_API_PREFIX}/`, { - body: JSON.stringify(requestBody), - }) - .then(async (res) => { - createPanelForApp(res.newAppId, application.name, type); - setToast(`Application "${application.name}" successfully created!`); - clearStorage(); - }) - .catch((err) => { - setToast(`Error occurred while creating new application "${application.name}"`, 'danger'); - console.error(err); - }); - }; - - // Rename an existing application - const renameApp = (newAppName: string, appId: string) => { - const toast = isNameValid( - newAppName, - applicationList.map((obj) => obj.name) - ); - if (toast.length > 0) { - setToast(toast.join(', '), 'danger'); - return; - } - - const requestBody = { - appId, - name: newAppName, - }; - - return http - .put(`${APP_ANALYTICS_API_PREFIX}/rename`, { - body: JSON.stringify(requestBody), - }) - .then((res) => { - setApplicationList((prevApplicationList) => { - const newApplicationData = [...prevApplicationList]; - const renamedApplication = newApplicationData.find( - (application) => application.id === appId - ); - if (renamedApplication) renamedApplication.name = newAppName; - return newApplicationData; - }); - setToast(`Application successfully renamed to "${newAppName}"`); - }) - .catch((err) => { - setToast('Error occurred while renaming application', 'danger'); - console.error(err); - }); - }; - - // Update existing application - const updateApp = ( - appId: string, - updateAppData: Partial, - type: string - ) => { - const requestBody = { - appId, - updateBody: updateAppData, - }; - - return http - .put(`${APP_ANALYTICS_API_PREFIX}/`, { - body: JSON.stringify(requestBody), - }) - .then((res) => { - if (type === 'update') { - setToast('Application successfully updated.'); - clearStorage(); - moveToApp(res.updatedAppId, type); - } - if (type.startsWith('create')) { - moveToApp(res.updatedAppId, type); - } - }) - .catch((err) => { - setToast('Error occurred while updating application', 'danger'); - console.error(err); - }); - }; - - // Delete existing applications - const deleteApp = (appList: string[], panelList: string[], toastMessage?: string) => { - return http - .delete(`${APP_ANALYTICS_API_PREFIX}/${appList.join(',')}`) - .then((res) => { - setApplicationList((prevApplicationList) => { - return prevApplicationList.filter((app) => !appList.includes(app.id)); - }); - - for (let i = 0; i < appList.length; i++) { - removeTabData(dispatch, appList[i], ''); - } - - for (let i = 0; i < panelList.length; i++) { - deleteSavedVisualizationsForPanel(panelList[i]); - } - - const message = - toastMessage || `Application${appList.length > 1 ? 's' : ''} successfully deleted!`; - setToast(message); - return res; - }) - .catch((err: any) => { - setToast('Error occured while deleting application', 'danger'); - console.error(err); - }); - }; - const callback = (childFunc: () => void) => { if (childFunc && triggerSwitchToEvent > 0) { childFunc(); @@ -399,9 +177,6 @@ export const Home = (props: HomeProps) => { { Date: Fri, 26 May 2023 10:37:25 -0700 Subject: [PATCH 082/190] Add tests for integration builder Signed-off-by: Simeon Widdis --- .../integrations/__test__/builder.test.ts | 105 ++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 server/adaptors/integrations/__test__/builder.test.ts diff --git a/server/adaptors/integrations/__test__/builder.test.ts b/server/adaptors/integrations/__test__/builder.test.ts new file mode 100644 index 0000000000..a08afb2116 --- /dev/null +++ b/server/adaptors/integrations/__test__/builder.test.ts @@ -0,0 +1,105 @@ +import { IntegrationInstanceBuilder } from '../integrations_builder'; +import { SavedObjectsClientContract } from '../../../../../../src/core/server'; + +describe('IntegrationInstanceBuilder', () => { + let mockClient: SavedObjectsClientContract; + let builder: IntegrationInstanceBuilder; + + beforeEach(() => { + // Create a mock instance for each test + mockClient = { + bulkCreate: jest.fn(), + } as any; + builder = new IntegrationInstanceBuilder(mockClient); + }); + + it('should build an integration instance', async () => { + const displayAssets = [ + { body: '{"type":"dashboard","title":"Dashboard 1"}' }, + { body: '{"type":"visualization","title":"Visualization 1"}' }, + ]; + const template = { + name: 'Template 1', + integrationType: 'type', + displayAssets, + } as IntegrationTemplate; + const options = { + name: 'Instance 1', + dataset: 'dataset', + namespace: 'namespace', + tags: ['tag1', 'tag2'], + }; + const mockResponse = { + saved_objects: [ + { type: 'dashboard', id: 'dashboard1' }, + { type: 'visualization', id: 'visualization1' }, + ], + }; + const expectedInstance = { + name: options.name, + templateName: template.name, + dataSource: { + sourceType: template.integrationType, + dataset: options.dataset, + namespace: options.namespace, + }, + tags: options.tags, + creationDate: expect.any(Date), + status: 'unknown', + assets: [ + { + assetType: 'dashboard', + assetId: 'dashboard1', + status: 'available', + isDefaultAsset: true, + }, + { + assetType: 'visualization', + assetId: 'visualization1', + status: 'available', + isDefaultAsset: false, + }, + ], + addedBy: 'unknown', + }; + + (mockClient.bulkCreate as jest.Mock).mockResolvedValue(mockResponse); + + const result = await builder.build(template, options); + + expect(mockClient.bulkCreate).toHaveBeenCalledWith( + displayAssets.map((asset) => JSON.parse(asset.body)) + ); + expect(result).toEqual(expectedInstance); + }); + + it('should reject when posting assets fails', async () => { + const displayAssets = [ + { body: '{"type":"dashboard","title":"Dashboard 1"}' }, + { body: '{"type":"visualization","title":"Visualization 1"}' }, + ]; + const template = { + name: 'Template 1', + integrationType: 'type', + displayAssets, + } as IntegrationTemplate; + const options = { name: 'Instance 1', dataset: 'dataset', namespace: 'namespace' }; + const errorMessage = 'An error occurred while posting assets'; + + (mockClient.bulkCreate as jest.Mock).mockRejectedValue(new Error(errorMessage)); + + await expect(builder.build(template, options)).rejects.toEqual(new Error(errorMessage)); + await expect(mockClient.bulkCreate).toHaveBeenCalledWith( + displayAssets.map((asset) => JSON.parse(asset.body)) + ); + }); + + it('should not reject on validation a valid template', async () => { + // Placeholder template for now -- fill in when validation is implemented + const template = { name: 'Template 1' } as IntegrationTemplate; + + const result = await builder.validate(template); + + expect(result).toBeUndefined(); + }); +}); From eb46a5be95a3f2271432262f98ab05b9104f7603 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Fri, 26 May 2023 10:44:37 -0700 Subject: [PATCH 083/190] Hotfix: Swap jest test to it Signed-off-by: Simeon Widdis --- .../adaptors/integrations/__test__/kibana_backend.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/adaptors/integrations/__test__/kibana_backend.test.ts b/server/adaptors/integrations/__test__/kibana_backend.test.ts index 5b74155b21..1ba117669f 100644 --- a/server/adaptors/integrations/__test__/kibana_backend.test.ts +++ b/server/adaptors/integrations/__test__/kibana_backend.test.ts @@ -21,7 +21,7 @@ describe('IntegrationsKibanaBackend', () => { backend = new IntegrationsKibanaBackend(mockClient, mockRepository); }); - test('should get integration templates from the repository', async () => { + it('should get integration templates from the repository', async () => { const templates = [{ name: 'Template 1' }, { name: 'Template 2' }]; (mockRepository.get as jest.Mock).mockResolvedValue(templates); @@ -31,7 +31,7 @@ describe('IntegrationsKibanaBackend', () => { expect(result).toEqual({ hits: templates }); }); - test('should get integration instances from the client', async () => { + it('should get integration instances from the client', async () => { const mockResult = { total: 2, saved_objects: [ @@ -50,7 +50,7 @@ describe('IntegrationsKibanaBackend', () => { }); }); - test('should load an integration instance', async () => { + it('should load an integration instance', async () => { const templateName = 'Template 1'; const template = { name: templateName }; const instance = { name: 'Instance 1' }; @@ -76,7 +76,7 @@ describe('IntegrationsKibanaBackend', () => { expect(result).toEqual(instance); }); - test('should reject when loading an integration instance fails', async () => { + it('should reject when loading an integration instance fails', async () => { const templateName = 'Template 1'; const template = { name: templateName }; const errorMessage = 'An error occurred during instance creation'; From 4434f92d97c9afa477148f69a8bafdf438f403f0 Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Fri, 26 May 2023 15:44:43 -0400 Subject: [PATCH 084/190] { "attributes": { "description": "Nginx dashboard with basic Observability on access / error logs", "hits": 0, "kibanaSavedObjectMeta": { "searchSourceJSON": "{\"query\":{\"language\":\"kuery\",\"query\":\"\"},\"filter\":[]}" }, "optionsJSON": "{\"hidePanelTitles\":false,\"useMargins\":true}", "panelsJSON": "[{\"version\":\"2.5.0\",\"gridData\":{\"h\":8,\"i\":\"1f31e50b-06e3-41e6-972e-e4e5fe1a9872\",\"w\":48,\"x\":0,\"y\":0},\"panelIndex\":\"1f31e50b-06e3-41e6-972e-e4e5fe1a9872\",\"embeddableConfig\":{},\"panelRefName\":\"panel_0\"},{\"version\":\"2.5.0\",\"gridData\":{\"h\":9,\"i\":\"d91a8da4-b34b-470a-aca6-9c76b47cd6fb\",\"w\":24,\"x\":0,\"y\":8},\"panelIndex\":\"d91a8da4-b34b-470a-aca6-9c76b47cd6fb\",\"embeddableConfig\":{},\"panelRefName\":\"panel_1\"},{\"version\":\"2.5.0\",\"gridData\":{\"h\":15,\"i\":\"27149e5a-3a77-4f3c-800e-8a160c3765f4\",\"w\":24,\"x\":24,\"y\":8},\"panelIndex\":\"27149e5a-3a77-4f3c-800e-8a160c3765f4\",\"embeddableConfig\":{},\"panelRefName\":\"panel_2\"},{\"version\":\"2.5.0\",\"gridData\":{\"x\":0,\"y\":17,\"w\":24,\"h\":15,\"i\":\"4d8c2aa7-159c-4a1a-80ff-00a9299056ce\"},\"panelIndex\":\"4d8c2aa7-159c-4a1a-80ff-00a9299056ce\",\"embeddableConfig\":{},\"panelRefName\":\"panel_3\"},{\"version\":\"2.5.0\",\"gridData\":{\"x\":24,\"y\":23,\"w\":24,\"h\":15,\"i\":\"800b7f19-f50c-417f-8987-21b930531cbe\"},\"panelIndex\":\"800b7f19-f50c-417f-8987-21b930531cbe\",\"embeddableConfig\":{},\"panelRefName\":\"panel_4\"}]", "timeRestore": false, "title": "[NGINX Core Logs 1.0] Overview", "version": 1 }, "id": "96847220-5261-44d0-89b4-65f3a659f13a", "migrationVersion": { "dashboard": "7.9.3" }, "references": [ { "id": "3b49a65d-54d8-483d-a8f0-3d7c855e1ecf", "name": "panel_0", "type": "visualization" }, { "id": "865e577b-634b-4a65-b9d6-7e324c395d18", "name": "panel_1", "type": "visualization" }, { "id": "dc1803f0-b478-11ed-9063-ebe46f9ac203", "name": "panel_2", "type": "visualization" }, { "id": "99acc580-b47a-11ed-9063-ebe46f9ac203", "name": "panel_3", "type": "visualization" }, { "id": "01ea64d0-b62f-11ed-a677-43d7aa86763b", "name": "panel_4", "type": "visualization" } ], "type": "dashboard", "updated_at": "2023-02-26T23:44:09.855Z", "version": "WzczLDdd" } Signed-off-by: Derek Ho --- .../components/added_integration.tsx | 33 +------------------ .../available_integration_card_view.tsx | 5 +++ .../integrations/components/integration.tsx | 33 +------------------ .../components/integration_assets_panel.tsx | 5 +++ .../components/integration_card.tsx | 5 +++ .../components/integration_details_panel.tsx | 5 +++ .../components/integration_fields_panel.tsx | 5 +++ .../components/integration_overview_panel.tsx | 5 +++ .../components/integration_side_nav.tsx | 3 -- public/components/integrations/home.tsx | 5 +-- 10 files changed, 33 insertions(+), 71 deletions(-) diff --git a/public/components/integrations/components/added_integration.tsx b/public/components/integrations/components/added_integration.tsx index cb2d672b09..64ec04fe5c 100644 --- a/public/components/integrations/components/added_integration.tsx +++ b/public/components/integrations/components/added_integration.tsx @@ -69,38 +69,7 @@ interface AppDetailProps extends AppAnalyticsComponentDeps { } export function AddedIntegration(props: AppDetailProps) { - const { - pplService, - dslService, - timestampUtils, - savedObjects, - http, - notifications, - appId, - chrome, - parentBreadcrumbs, - query, - filters, - appConfigs, - updateApp, - setAppConfigs, - setFilters, - callback, - queryManager, - mode, - } = props; - const [application, setApplication] = useState({ - id: '', - dateCreated: '', - dateModified: '', - name: '', - description: '', - baseQuery: '', - servicesEntities: [], - traceGroups: [], - panelId: '', - availability: { name: '', color: '', availabilityVisId: '' }, - }); + const { http, appId, chrome, parentBreadcrumbs } = props; const [toasts, setToasts] = useState([]); const [stateData, setData] = useState({ data: {} }); diff --git a/public/components/integrations/components/available_integration_card_view.tsx b/public/components/integrations/components/available_integration_card_view.tsx index 3cef7f30d3..4f62c3c72d 100644 --- a/public/components/integrations/components/available_integration_card_view.tsx +++ b/public/components/integrations/components/available_integration_card_view.tsx @@ -1,3 +1,8 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + import { EuiButton, EuiCard, EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui'; import _ from 'lodash'; import React from 'react'; diff --git a/public/components/integrations/components/integration.tsx b/public/components/integrations/components/integration.tsx index ca0fecaa2a..f94e839582 100644 --- a/public/components/integrations/components/integration.tsx +++ b/public/components/integrations/components/integration.tsx @@ -52,38 +52,7 @@ interface AppDetailProps extends AppAnalyticsComponentDeps { } export function Integration(props: AppDetailProps) { - const { - pplService, - dslService, - timestampUtils, - savedObjects, - http, - notifications, - appId, - chrome, - parentBreadcrumbs, - query, - filters, - appConfigs, - updateApp, - setAppConfigs, - setFilters, - callback, - queryManager, - mode, - } = props; - const [application, setApplication] = useState({ - id: '', - dateCreated: '', - dateModified: '', - name: '', - description: '', - baseQuery: '', - servicesEntities: [], - traceGroups: [], - panelId: '', - availability: { name: '', color: '', availabilityVisId: '' }, - }); + const { http, appId, chrome, parentBreadcrumbs } = props; const [isModalVisible, setIsModalVisible] = useState(false); const [modalLayout, setModalLayout] = useState(); diff --git a/public/components/integrations/components/integration_assets_panel.tsx b/public/components/integrations/components/integration_assets_panel.tsx index 30c3eea940..b244435738 100644 --- a/public/components/integrations/components/integration_assets_panel.tsx +++ b/public/components/integrations/components/integration_assets_panel.tsx @@ -1,3 +1,8 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + import { EuiInMemoryTable, EuiPanel, diff --git a/public/components/integrations/components/integration_card.tsx b/public/components/integrations/components/integration_card.tsx index b5415565c3..38f8c1e33c 100644 --- a/public/components/integrations/components/integration_card.tsx +++ b/public/components/integrations/components/integration_card.tsx @@ -1,3 +1,8 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + import { EuiButton, EuiCard, EuiIcon } from '@elastic/eui'; import React from 'react'; diff --git a/public/components/integrations/components/integration_details_panel.tsx b/public/components/integrations/components/integration_details_panel.tsx index 955ec6a062..be403cd328 100644 --- a/public/components/integrations/components/integration_details_panel.tsx +++ b/public/components/integrations/components/integration_details_panel.tsx @@ -1,3 +1,8 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + import { EuiFlexGroup, EuiPanel, EuiSpacer, EuiFlexItem, EuiText } from '@elastic/eui'; import React from 'react'; import { PanelTitle } from '../../trace_analytics/components/common/helper_functions'; diff --git a/public/components/integrations/components/integration_fields_panel.tsx b/public/components/integrations/components/integration_fields_panel.tsx index c7281f98f5..af72898790 100644 --- a/public/components/integrations/components/integration_fields_panel.tsx +++ b/public/components/integrations/components/integration_fields_panel.tsx @@ -1,3 +1,8 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + import { EuiInMemoryTable, EuiPanel, diff --git a/public/components/integrations/components/integration_overview_panel.tsx b/public/components/integrations/components/integration_overview_panel.tsx index ca0c80e544..4f5ccf2861 100644 --- a/public/components/integrations/components/integration_overview_panel.tsx +++ b/public/components/integrations/components/integration_overview_panel.tsx @@ -1,3 +1,8 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + import { EuiButton, EuiFlexGroup, diff --git a/public/components/integrations/components/integration_side_nav.tsx b/public/components/integrations/components/integration_side_nav.tsx index 40d925e7fa..6ac0223322 100644 --- a/public/components/integrations/components/integration_side_nav.tsx +++ b/public/components/integrations/components/integration_side_nav.tsx @@ -13,9 +13,6 @@ import { EuiSideNavItemType, } from '@elastic/eui'; import React from 'react'; -// import { useState } from 'react'; -// import { toMountPoint } from '../../../../../src/plugins/opensearch_dashboards_react/public'; -// import { uiSettingsService } from '../../../common/utils'; export const Sidebar = (props: { children: React.ReactNode }) => { const sidebarItems = [ diff --git a/public/components/integrations/home.tsx b/public/components/integrations/home.tsx index fc5fbdf981..0dc6c6f2db 100644 --- a/public/components/integrations/home.tsx +++ b/public/components/integrations/home.tsx @@ -21,10 +21,7 @@ import { handleDataPrepperIndicesExistRequest } from '../trace_analytics/request import { ChromeBreadcrumb, NotificationsStart } from '../../../../../src/core/public'; import { ApplicationType } from '../../../common/types/application_analytics'; import { QueryManager } from '../../../common/query_manager/ppl_query_manager'; -import { - AvailableIntegrationOverviewPage, - IntegrationOverviewPage, -} from './components/available_integration_overview_page'; +import { AvailableIntegrationOverviewPage } from './components/available_integration_overview_page'; import { Sidebar } from './components/integration_side_nav'; import { AddedIntegrationOverviewPage } from './components/added_integration_overview_page'; import { AddedIntegration } from './components/added_integration'; From 78efa6eee9bc55afd3823a995e2d5106fb71cec4 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Fri, 26 May 2023 14:44:50 -0700 Subject: [PATCH 085/190] Stub out sample integration data for front-end Signed-off-by: Simeon Widdis --- .../integrations/components/integration.tsx | 42 ++++++++++++++++++- .../components/integration_assets_panel.tsx | 4 +- .../components/integration_details_panel.tsx | 13 +----- .../components/integration_fields_panel.tsx | 4 +- .../components/integration_overview_panel.tsx | 12 +++--- 5 files changed, 53 insertions(+), 22 deletions(-) diff --git a/public/components/integrations/components/integration.tsx b/public/components/integrations/components/integration.tsx index ca0fecaa2a..f5a18a866f 100644 --- a/public/components/integrations/components/integration.tsx +++ b/public/components/integrations/components/integration.tsx @@ -88,7 +88,46 @@ export function Integration(props: AppDetailProps) { const [isModalVisible, setIsModalVisible] = useState(false); const [modalLayout, setModalLayout] = useState(); const [toasts, setToasts] = useState([]); - const [data, setData] = useState({ data: {} }); + const [data, setData] = useState({ + data: { + name: 'nginx', + author: 'John Doe', + sourceUrl: 'https://github.com/Swiddis/dashboards-observability', + version: '1.0.0', + integrationType: 'logs', + description: 'Nginx HTTP server collector', + assetUrl: '/api/integrations/repository/nginx/static/logo', + status: 'available', + license: 'Apache-2.0', + components: [ + { + name: 'communication', + type: 'schema', + category: 'observability', + }, + { + name: 'http', + type: 'schema', + category: 'observability', + }, + { + name: 'logs', + type: 'schema', + category: 'observability', + }, + ], + displayAssets: [ + { + name: 'Dashboard', + type: 'dashboard', + }, + { + name: 'Panel', + type: 'panel', + }, + ], + }, + }); const getModal = (name: string) => { setModalLayout( @@ -156,6 +195,7 @@ export function Integration(props: AppDetailProps) { ); } + console.log(data); return ( - + - + - - NginX [pronounced "Engine X"] is an HTTP and reverse proxy server that emphasizes - high concurrency, performance, and low memory usage. Nginx can also act as a mail proxy - server and a generic TCP proxy server. Nginx is available as open source and in a commercial - version (NginX Plus). As Nginx is a high-speed, lightweight HTTP server engine, more and - more web sites and applications are moving to Nginx. According to W3Techs, over 25 percent - of all known web servers use Nginx. The performance improvements for serving static content - can be significant. Especially at high loads, Nginx is faster than other solutions and - consumes less server resources. - + {props.data.data.description} diff --git a/public/components/integrations/components/integration_fields_panel.tsx b/public/components/integrations/components/integration_fields_panel.tsx index c7281f98f5..80eb6aaeeb 100644 --- a/public/components/integrations/components/integration_fields_panel.tsx +++ b/public/components/integrations/components/integration_fields_panel.tsx @@ -11,7 +11,7 @@ import { FILTER_OPTIONS } from '../../../../common/constants/explorer'; import { PanelTitle } from '../../trace_analytics/components/common/helper_functions'; export function IntegrationFields(props: any) { - const data = props.data.data.fields || []; + const data = props.data.data.components || []; const search = { box: { @@ -70,7 +70,7 @@ export function IntegrationFields(props: any) { return ( - + - {data.data.templateName} + {data.data.name} @@ -36,7 +36,7 @@ export function IntegrationOverview(props: any) { { - props.getModal(data.data.templateName); + props.getModal(data.data.name); }} > Add @@ -58,22 +58,22 @@ export function IntegrationOverview(props: any) {

Version

- {data.data.version?.resource} + {data.data.version}

Category

- {data.data.components?.join(', ')} + {data.data.components?.map((x: any) => x.name).join(', ')}

Contributer

- - {data.data.contributer?.name} + + {data.data.author}
From bac1f282e20c4b57b37d2ba698c7ad2eac76669a Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Fri, 26 May 2023 15:08:41 -0700 Subject: [PATCH 086/190] Use more realistic integration sample Signed-off-by: Simeon Widdis --- .../integrations/components/integration.tsx | 73 +++++++++++++++---- .../components/integration_assets_panel.tsx | 10 ++- .../components/integration_details_panel.tsx | 4 +- .../components/integration_fields_panel.tsx | 30 +++++++- .../components/integration_overview_panel.tsx | 7 +- 5 files changed, 100 insertions(+), 24 deletions(-) diff --git a/public/components/integrations/components/integration.tsx b/public/components/integrations/components/integration.tsx index f5a18a866f..d20f518aac 100644 --- a/public/components/integrations/components/integration.tsx +++ b/public/components/integrations/components/integration.tsx @@ -91,39 +91,82 @@ export function Integration(props: AppDetailProps) { const [data, setData] = useState({ data: { name: 'nginx', - author: 'John Doe', - sourceUrl: 'https://github.com/Swiddis/dashboards-observability', version: '1.0.0', + author: 'John Doe', + sourceUrl: 'https://github.com/Swiddis/dashboards-observability/tree/placeholder', + license: 'Apache-2.0', integrationType: 'logs', description: 'Nginx HTTP server collector', - assetUrl: '/api/integrations/repository/nginx/static/logo', - status: 'available', - license: 'Apache-2.0', + statics: { + mapping: { + logo: '/logo', + }, + }, components: [ { name: 'communication', - type: 'schema', - category: 'observability', + version: '1.0.0', + schemaBody: + '{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://opensearch.org/schemas/observability/Communication","title":"Communication","type":"object","properties":{"source":{"type":"object","properties":{"sock.family":{"type":"string"},"source":{"$ref":"#/definitions/Source"},"destination":{"$ref":"#/definitions/Destination"}}},"destination":{"type":"object","properties":{}}},"definitions":{"Source":{"$id":"#/definitions/Source","type":"object","additionalProperties":true,"properties":{"address":{"type":"string"},"domain":{"type":"string"},"bytes":{"type":"integer"},"ip":{"type":"string"},"port":{"type":"integer"},"mac":{"type":"string"},"packets":{"type":"integer"}},"title":"Source"},"Destination":{"$id":"#/definitions/Destination","type":"object","additionalProperties":true,"properties":{"address":{"type":"string"},"domain":{"type":"string"},"bytes":{"type":"integer"},"ip":{"type":"string"},"port":{"type":"integer"},"mac":{"type":"string"},"packets":{"type":"integer"}},"title":"Destination"}}}', + mappingBody: + '{"template":{"mappings":{"_meta":{"version":"1.0.0","catalog":"observability","type":"logs","component":"communication"},"properties":{"communication":{"properties":{"sock.family":{"type":"keyword","ignore_above":256},"source":{"type":"object","properties":{"address":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":1024}}},"domain":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":1024}}},"bytes":{"type":"long"},"ip":{"type":"ip"},"port":{"type":"long"},"mac":{"type":"keyword","ignore_above":1024},"packets":{"type":"long"}}},"destination":{"type":"object","properties":{"address":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":1024}}},"domain":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":1024}}},"bytes":{"type":"long"},"ip":{"type":"ip"},"port":{"type":"long"},"mac":{"type":"keyword","ignore_above":1024},"packets":{"type":"long"}}}}}}}}}', }, { name: 'http', - type: 'schema', - category: 'observability', + version: '1.0.0', + schemaBody: + '{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://opensearch.org/schemas/observability/Http","title":"Http","type":"object","properties":{"request":{"$ref":"#/definitions/Request"},"response":{"$ref":"#/definitions/Response"},"flavor":{"type":"string"},"user_agent":{"type":"string"},"url":{"type":"string"},"schema":{"type":"string"},"target":{"type":"string"},"route":{"type":"string"},"client_ip":{"type":"string"},"resent_count":{"type":"integer"}},"definitions":{"Request":{"$id":"#/definitions/Request","type":"object","additionalProperties":true,"properties":{"id":{"type":"string"},"body.content":{"type":"string"},"bytes":{"type":"integer"},"method":{"type":"string"},"referrer":{"type":"string"},"header":{"type":"string"},"mime_type":{"type":"object"}},"title":"Request"},"Response":{"$id":"#/definitions/Response","type":"object","additionalProperties":true,"properties":{"id":{"type":"string"},"body.content":{"type":"string"},"bytes":{"type":"integer"},"status_code":{"type":"integer"},"header":{"type":"object"}},"title":"Response"}}}', + mappingBody: + '{"template":{"mappings":{"_meta":{"version":"1.0.0","catalog":"observability","type":"logs","component":"http"},"dynamic_templates":[{"request_header_map":{"mapping":{"type":"keyword"},"path_match":"request.header.*"}},{"response_header_map":{"mapping":{"type":"keyword"},"path_match":"response.header.*"}}],"properties":{"http":{"properties":{"flavor":{"type":"keyword","ignore_above":256},"user_agent":{"type":"keyword","ignore_above":2048},"url":{"type":"keyword","ignore_above":2048},"schema":{"type":"keyword","ignore_above":1024},"target":{"type":"keyword","ignore_above":1024},"route":{"type":"keyword","ignore_above":1024},"client.ip":{"type":"ip"},"resent_count":{"type":"integer"},"request":{"type":"object","properties":{"id":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"body.content":{"type":"text"},"bytes":{"type":"long"},"method":{"type":"keyword","ignore_above":256},"referrer":{"type":"keyword","ignore_above":1024},"mime_type":{"type":"keyword","ignore_above":1024}}},"response":{"type":"object","properties":{"id":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"body.content":{"type":"text"},"bytes":{"type":"long"},"status_code":{"type":"integer"}}}}}}}}}', }, { name: 'logs', - type: 'schema', - category: 'observability', + version: '1.0.0', + schemaBody: + '{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://opensearch.org/schema/observability/Logs","title":"OpenTelemetry Logs","type":"object","properties":{"severity":{"$ref":"#/definitions/Severity"},"resource":{"type":"object"},"attributes":{"$ref":"#/definitions/Attributes"},"body":{"type":"string"},"@timestamp":{"type":"string","format":"date-time"},"observedTimestamp":{"type":"string","format":"date-time"},"traceId":{"$ref":"https://opensearch.org/schemas/observability/Span#/properties/traceId"},"spanId":{"$ref":"https://opensearch.org/schemas/observability/Span#/properties/spanId"},"schemaUrl":{"type":"string"},"instrumentationScope":{"$ref":"#/definitions/InstrumentationScope"},"event":{"$ref":"#/definitions/Event"}},"required":["body","@timestamp"],"definitions":{"InstrumentationScope":{"$id":"#/definitions/InstrumentationScope","type":"object","additionalProperties":true,"properties":{"name":{"type":"string"},"version":{"type":"string"},"schemaUrl":{"type":"string"}},"title":"InstrumentationScope"},"Severity":{"$id":"#/definitions/Severity","type":"object","additionalProperties":true,"properties":{"text":{"type":"string","enum":["TRACE","DEBUG","INFO","WARN","ERROR","FATAL"]},"number":{"type":"integer"}},"title":"Severity"},"Attributes":{"$id":"#/definitions/Attributes","type":"object","additionalProperties":true,"properties":{"data_stream":{"$ref":"#/definitions/Dataflow"}},"title":"Attributes"},"Dataflow":{"$id":"#/definitions/Dataflow","type":"object","additionalProperties":true,"properties":{"type":{"type":"string"},"namespace":{"type":"string"},"dataset":{"type":"string"}},"title":"Dataflow"},"Exception":{"$id":"#/definitions/Exception","type":"object","additionalProperties":true,"properties":{"message":{"type":"string"},"stacktrace":{"type":"string"},"type":{"type":"string"}},"title":"Exception"},"Event":{"$id":"#/definitions/Event","type":"object","additionalProperties":true,"properties":{"category":{"type":"string","enum":["authentication","configuration","database","driver","email","file","host","iam","intrusion_detection","malware","network","package","process","registry","session","threat","vulnerability","web"]},"kind":{"type":"string","enum":["alert","enrichment","event","metric","state","error","signal"]},"type":{"type":"string","enum":["access","admin","allowed","change","connection","creation","deletion","denied","end","error","group","indicator","info","installation","protocol","start","user"]},"domain":{"type":"string"},"name":{"type":"string"},"source":{"type":"string"},"result":{"type":"string","enum":["failure","success","pending","undetermined"]},"exception":{"$ref":"#/definitions/Exception"}},"title":"Event"}}}', + mappingBody: + '{"index_patterns":["sso_logs-*-*"],"data_stream":{},"template":{"mappings":{"_meta":{"version":"1.0.0","catalog":"observability","type":"logs","component":"log","correlations":[{"field":"spanId","foreign-schema":"traces","foreign-field":"spanId"},{"field":"traceId","foreign-schema":"traces","foreign-field":"traceId"}]},"_source":{"enabled":true},"dynamic_templates":[{"resources_map":{"mapping":{"type":"keyword"},"path_match":"resource.*"}},{"attributes_map":{"mapping":{"type":"keyword"},"path_match":"attributes.*"}},{"instrumentation_scope_attributes_map":{"mapping":{"type":"keyword"},"path_match":"instrumentationScope.attributes.*"}}],"properties":{"severity":{"properties":{"number":{"type":"long"},"text":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}},"attributes":{"type":"object","properties":{"data_stream":{"properties":{"dataset":{"ignore_above":128,"type":"keyword"},"namespace":{"ignore_above":128,"type":"keyword"},"type":{"ignore_above":56,"type":"keyword"}}}}},"body":{"type":"text"},"@timestamp":{"type":"date"},"observedTimestamp":{"type":"date"},"observerTime":{"type":"alias","path":"observedTimestamp"},"traceId":{"ignore_above":256,"type":"keyword"},"spanId":{"ignore_above":256,"type":"keyword"},"schemaUrl":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"instrumentationScope":{"properties":{"name":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":128}}},"version":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"dropped_attributes_count":{"type":"integer"},"schemaUrl":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}},"event":{"properties":{"domain":{"ignore_above":256,"type":"keyword"},"name":{"ignore_above":256,"type":"keyword"},"source":{"ignore_above":256,"type":"keyword"},"category":{"ignore_above":256,"type":"keyword"},"type":{"ignore_above":256,"type":"keyword"},"kind":{"ignore_above":256,"type":"keyword"},"result":{"ignore_above":256,"type":"keyword"},"exception":{"properties":{"message":{"ignore_above":1024,"type":"keyword"},"type":{"ignore_above":256,"type":"keyword"},"stacktrace":{"type":"text"}}}}}}},"settings":{"index":{"mapping":{"total_fields":{"limit":10000}},"refresh_interval":"5s"}}},"composed_of":["http_template","communication_template"],"version":1,"_meta":{"description":"Simple Schema For Observability","catalog":"observability","type":"logs","correlations":[{"field":"spanId","foreign-schema":"traces","foreign-field":"spanId"},{"field":"traceId","foreign-schema":"traces","foreign-field":"traceId"}]}}', }, ], displayAssets: [ { - name: 'Dashboard', - type: 'dashboard', + body: + '{"attributes":{"fields":"[{\\"count\\":0,\\"name\\":\\"@timestamp\\",\\"type\\":\\"date\\",\\"esTypes\\":[\\"date\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true},{\\"count\\":0,\\"name\\":\\"_id\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"_id\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"_index\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"_index\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"_score\\",\\"type\\":\\"number\\",\\"scripted\\":false,\\"searchable\\":false,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"_source\\",\\"type\\":\\"_source\\",\\"esTypes\\":[\\"_source\\"],\\"scripted\\":false,\\"searchable\\":false,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"_type\\",\\"type\\":\\"string\\",\\"scripted\\":false,\\"searchable\\":false,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"attributes.data_stream.dataset\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"attributes.data_stream.dataset.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"attributes.data_stream.dataset\\"}}},{\\"count\\":0,\\"name\\":\\"attributes.data_stream.namespace\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"attributes.data_stream.namespace.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"attributes.data_stream.namespace\\"}}},{\\"count\\":0,\\"name\\":\\"attributes.data_stream.type\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"attributes.data_stream.type.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"attributes.data_stream.type\\"}}},{\\"count\\":0,\\"name\\":\\"body\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"body.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"body\\"}}},{\\"count\\":0,\\"name\\":\\"communication.source.address\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"communication.source.address.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"communication.source.address\\"}}},{\\"count\\":0,\\"name\\":\\"communication.source.ip\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"communication.source.ip.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"communication.source.ip\\"}}},{\\"count\\":0,\\"name\\":\\"event.category\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"event.category.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"event.category\\"}}},{\\"count\\":0,\\"name\\":\\"event.domain\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"event.domain.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"event.domain\\"}}},{\\"count\\":0,\\"name\\":\\"event.kind\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"event.kind.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"event.kind\\"}}},{\\"count\\":0,\\"name\\":\\"event.name\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"event.name.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"event.name\\"}}},{\\"count\\":0,\\"name\\":\\"event.result\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"event.result.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"event.result\\"}}},{\\"count\\":0,\\"name\\":\\"event.type\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"event.type.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"event.type\\"}}},{\\"count\\":0,\\"name\\":\\"http.flavor\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"http.flavor.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"http.flavor\\"}}},{\\"count\\":0,\\"name\\":\\"http.request.method\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"http.request.method.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"http.request.method\\"}}},{\\"count\\":0,\\"name\\":\\"http.response.bytes\\",\\"type\\":\\"number\\",\\"esTypes\\":[\\"long\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true},{\\"count\\":0,\\"name\\":\\"http.response.status_code\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"http.response.status_code.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"http.response.status_code\\"}}},{\\"count\\":0,\\"name\\":\\"http.url\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"http.url\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"http.url\\"}}},{\\"count\\":0,\\"name\\":\\"observerTime\\",\\"type\\":\\"date\\",\\"esTypes\\":[\\"date\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true},{\\"count\\":0,\\"name\\":\\"span_id\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"span_id.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"span_id\\"}}},{\\"count\\":0,\\"name\\":\\"trace_id\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"trace_id.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"trace_id\\"}}}]","timeFieldName":"@timestamp","title":"sso_logs-*-*"},"id":"47892350-b495-11ed-af0a-cf5c93b5a3b6","migrationVersion":{"index-pattern":"7.6.0"},"references":[],"type":"index-pattern","updated_at":"2023-02-26T00:34:36.592Z","version":"WzYxLDdd"}', + }, + { + body: + '{"attributes":{"columns":["http.request.method","http.response.status_code"],"description":"","hits":0,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\\n \\"highlightAll\\": true,\\n \\"version\\": true,\\n \\"query\\": {\\n \\"query\\": \\"event.domain:nginx.access\\",\\n \\"language\\": \\"kuery\\"\\n },\\n \\"filter\\": [],\\n \\"indexRefName\\": \\"kibanaSavedObjectMeta.searchSourceJSON.index\\"\\n}"},"sort":[],"title":"[NGINX Core Logs 1.0] Nginx Access Logs","version":1},"id":"d80e05b2-518c-4c3d-9651-4c9d8632dce4","migrationVersion":{"search":"7.9.3"},"references":[{"id":"47892350-b495-11ed-af0a-cf5c93b5a3b6","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"search","updated_at":"2023-02-26T00:34:36.592Z","version":"WzYyLDdd"}', + }, + { + body: + '{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\\"query\\":{\\"query\\":\\"\\",\\"language\\":\\"lucene\\"},\\"filter\\":[]}"},"savedSearchRefName":"search_0","title":"[NGINX Core Logs 1.0] Response codes over time","uiStateJSON":"{}","version":1,"visState":"{\\"title\\":\\"[NGINX Core Logs 1.0] Response codes over time\\",\\"type\\":\\"histogram\\",\\"aggs\\":[{\\"id\\":\\"1\\",\\"enabled\\":true,\\"type\\":\\"count\\",\\"params\\":{},\\"schema\\":\\"metric\\"},{\\"id\\":\\"2\\",\\"enabled\\":true,\\"type\\":\\"date_histogram\\",\\"params\\":{\\"field\\":\\"@timestamp\\",\\"timeRange\\":{\\"from\\":\\"now-24h\\",\\"to\\":\\"now\\"},\\"useNormalizedOpenSearchInterval\\":true,\\"scaleMetricValues\\":false,\\"interval\\":\\"auto\\",\\"drop_partials\\":false,\\"min_doc_count\\":1,\\"extended_bounds\\":{}},\\"schema\\":\\"segment\\"},{\\"id\\":\\"3\\",\\"enabled\\":true,\\"type\\":\\"filters\\",\\"params\\":{\\"filters\\":[{\\"input\\":{\\"query\\":\\"http.response.status_code:[200 TO 299]\\",\\"language\\":\\"lucene\\"},\\"label\\":\\"200s\\"},{\\"input\\":{\\"query\\":\\"http.response.status_code:[300 TO 399]\\",\\"language\\":\\"lucene\\"},\\"label\\":\\"300s\\"},{\\"input\\":{\\"query\\":\\"http.response.status_code:[400 TO 499]\\",\\"language\\":\\"lucene\\"},\\"label\\":\\"400s\\"},{\\"input\\":{\\"query\\":\\"http.response.status_code:[500 TO 599]\\",\\"language\\":\\"lucene\\"},\\"label\\":\\"500s\\"},{\\"input\\":{\\"query\\":\\"http.response.status_code:0\\",\\"language\\":\\"lucene\\"},\\"label\\":\\"0\\"}]},\\"schema\\":\\"group\\"}],\\"params\\":{\\"type\\":\\"histogram\\",\\"grid\\":{\\"categoryLines\\":false},\\"categoryAxes\\":[{\\"id\\":\\"CategoryAxis-1\\",\\"type\\":\\"category\\",\\"position\\":\\"bottom\\",\\"show\\":true,\\"style\\":{},\\"scale\\":{\\"type\\":\\"linear\\"},\\"labels\\":{\\"show\\":true,\\"filter\\":true,\\"truncate\\":100},\\"title\\":{}}],\\"valueAxes\\":[{\\"id\\":\\"ValueAxis-1\\",\\"name\\":\\"LeftAxis-1\\",\\"type\\":\\"value\\",\\"position\\":\\"left\\",\\"show\\":true,\\"style\\":{},\\"scale\\":{\\"type\\":\\"linear\\",\\"mode\\":\\"normal\\"},\\"labels\\":{\\"show\\":true,\\"rotate\\":0,\\"filter\\":false,\\"truncate\\":100},\\"title\\":{\\"text\\":\\"Count\\"}}],\\"seriesParams\\":[{\\"show\\":true,\\"type\\":\\"histogram\\",\\"mode\\":\\"stacked\\",\\"data\\":{\\"label\\":\\"Count\\",\\"id\\":\\"1\\"},\\"valueAxis\\":\\"ValueAxis-1\\",\\"drawLinesBetweenPoints\\":true,\\"lineWidth\\":2,\\"showCircles\\":true}],\\"addTooltip\\":true,\\"addLegend\\":true,\\"legendPosition\\":\\"right\\",\\"times\\":[],\\"addTimeMarker\\":false,\\"labels\\":{\\"show\\":false},\\"thresholdLine\\":{\\"show\\":false,\\"value\\":10,\\"width\\":1,\\"style\\":\\"full\\",\\"color\\":\\"#E7664C\\"}}}"},"id":"3b49a65d-54d8-483d-a8f0-3d7c855e1ecf","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"d80e05b2-518c-4c3d-9651-4c9d8632dce4","name":"search_0","type":"search"}],"type":"visualization","updated_at":"2023-02-26T00:34:36.592Z","version":"WzYzLDdd"}', + }, + { + body: + '{"attributes":{"columns":["_source"],"description":"","hits":0,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\\n \\"highlightAll\\": true,\\n \\"query\\": {\\n \\"query\\": \\"http.response.status_code >= 300 and event.domain:nginx.access\\",\\n \\"language\\": \\"kuery\\"\\n },\\n \\"version\\": true,\\n \\"highlight\\": {\\n \\"post_tags\\": [\\n \\"@/kibana-highlighted-field@\\"\\n ],\\n \\"fields\\": {\\n \\"*\\": {}\\n },\\n \\"pre_tags\\": [\\n \\"@kibana-highlighted-field@\\"\\n ],\\n \\"require_field_match\\": false,\\n \\"fragment_size\\": 2147483647\\n },\\n \\"filter\\": [],\\n \\"indexRefName\\": \\"kibanaSavedObjectMeta.searchSourceJSON.index\\"\\n}"},"sort":[["@timestamp","desc"]],"title":"[NGINX Core Logs 1.0] Nginx Error Logs","version":1},"id":"9f820fbe-ddde-43a2-9402-30bd295c97f6","migrationVersion":{"search":"7.9.3"},"references":[{"id":"47892350-b495-11ed-af0a-cf5c93b5a3b6","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"search","updated_at":"2023-02-26T00:34:36.592Z","version":"WzY0LDdd"}', + }, + { + body: + '{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\\"query\\":{\\"query\\":\\"\\",\\"language\\":\\"lucene\\"},\\"filter\\":[]}"},"savedSearchRefName":"search_0","title":"[NGINX Core Logs 1.0] Errors over time","uiStateJSON":"{}","version":1,"visState":"{\\"title\\":\\"[NGINX Core Logs 1.0] Errors over time\\",\\"type\\":\\"histogram\\",\\"aggs\\":[{\\"id\\":\\"1\\",\\"enabled\\":true,\\"type\\":\\"count\\",\\"params\\":{},\\"schema\\":\\"metric\\"},{\\"id\\":\\"2\\",\\"enabled\\":true,\\"type\\":\\"date_histogram\\",\\"params\\":{\\"field\\":\\"@timestamp\\",\\"timeRange\\":{\\"from\\":\\"now-24h\\",\\"to\\":\\"now\\"},\\"useNormalizedOpenSearchInterval\\":true,\\"scaleMetricValues\\":false,\\"interval\\":\\"auto\\",\\"drop_partials\\":false,\\"min_doc_count\\":1,\\"extended_bounds\\":{}},\\"schema\\":\\"segment\\"}],\\"params\\":{\\"type\\":\\"histogram\\",\\"grid\\":{\\"categoryLines\\":false},\\"categoryAxes\\":[{\\"id\\":\\"CategoryAxis-1\\",\\"type\\":\\"category\\",\\"position\\":\\"bottom\\",\\"show\\":true,\\"style\\":{},\\"scale\\":{\\"type\\":\\"linear\\"},\\"labels\\":{\\"show\\":true,\\"filter\\":true,\\"truncate\\":100},\\"title\\":{}}],\\"valueAxes\\":[{\\"id\\":\\"ValueAxis-1\\",\\"name\\":\\"LeftAxis-1\\",\\"type\\":\\"value\\",\\"position\\":\\"left\\",\\"show\\":true,\\"style\\":{},\\"scale\\":{\\"type\\":\\"linear\\",\\"mode\\":\\"normal\\"},\\"labels\\":{\\"show\\":true,\\"rotate\\":0,\\"filter\\":false,\\"truncate\\":100},\\"title\\":{\\"text\\":\\"Count\\"}}],\\"seriesParams\\":[{\\"show\\":true,\\"type\\":\\"histogram\\",\\"mode\\":\\"stacked\\",\\"data\\":{\\"label\\":\\"Count\\",\\"id\\":\\"1\\"},\\"valueAxis\\":\\"ValueAxis-1\\",\\"drawLinesBetweenPoints\\":true,\\"lineWidth\\":2,\\"showCircles\\":true}],\\"addTooltip\\":true,\\"addLegend\\":true,\\"legendPosition\\":\\"right\\",\\"times\\":[],\\"addTimeMarker\\":false,\\"labels\\":{\\"show\\":false},\\"thresholdLine\\":{\\"show\\":false,\\"value\\":10,\\"width\\":1,\\"style\\":\\"full\\",\\"color\\":\\"#E7664C\\"}}}"},"id":"865e577b-634b-4a65-b9d6-7e324c395d18","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"9f820fbe-ddde-43a2-9402-30bd295c97f6","name":"search_0","type":"search"}],"type":"visualization","updated_at":"2023-02-26T00:34:36.592Z","version":"WzY1LDdd"}', + }, + { + body: + '{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\\"query\\":{\\"query\\":\\"\\",\\"language\\":\\"kuery\\"},\\"filter\\":[]}"},"savedSearchRefName":"search_0","title":"Top Paths","uiStateJSON":"{}","version":1,"visState":"{\\"title\\":\\"Top Paths\\",\\"type\\":\\"table\\",\\"aggs\\":[{\\"id\\":\\"1\\",\\"enabled\\":true,\\"type\\":\\"count\\",\\"params\\":{},\\"schema\\":\\"metric\\"},{\\"id\\":\\"2\\",\\"enabled\\":true,\\"type\\":\\"terms\\",\\"params\\":{\\"field\\":\\"http.url\\",\\"orderBy\\":\\"1\\",\\"order\\":\\"desc\\",\\"size\\":10,\\"otherBucket\\":false,\\"otherBucketLabel\\":\\"Other\\",\\"missingBucket\\":false,\\"missingBucketLabel\\":\\"Missing\\",\\"customLabel\\":\\"Paths\\"},\\"schema\\":\\"bucket\\"}],\\"params\\":{\\"perPage\\":10,\\"showPartialRows\\":false,\\"showMetricsAtAllLevels\\":false,\\"showTotal\\":false,\\"totalFunc\\":\\"sum\\",\\"percentageCol\\":\\"\\"}}"},"id":"dc1803f0-b478-11ed-9063-ebe46f9ac203","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"d80e05b2-518c-4c3d-9651-4c9d8632dce4","name":"search_0","type":"search"}],"type":"visualization","updated_at":"2023-02-26T00:34:36.592Z","version":"WzY2LDdd"}', + }, + { + body: + '{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\\"query\\":{\\"query\\":\\"\\",\\"language\\":\\"kuery\\"},\\"filter\\":[]}"},"savedSearchRefName":"search_0","title":"Data Volume","uiStateJSON":"{}","version":1,"visState":"{\\"title\\":\\"Data Volume\\",\\"type\\":\\"area\\",\\"aggs\\":[{\\"id\\":\\"1\\",\\"enabled\\":true,\\"type\\":\\"sum\\",\\"params\\":{\\"field\\":\\"http.response.bytes\\",\\"customLabel\\":\\"Response Bytes\\"},\\"schema\\":\\"metric\\"},{\\"id\\":\\"2\\",\\"enabled\\":true,\\"type\\":\\"date_histogram\\",\\"params\\":{\\"field\\":\\"observerTime\\",\\"timeRange\\":{\\"from\\":\\"now-15m\\",\\"to\\":\\"now\\"},\\"useNormalizedOpenSearchInterval\\":true,\\"scaleMetricValues\\":false,\\"interval\\":\\"auto\\",\\"drop_partials\\":false,\\"min_doc_count\\":1,\\"extended_bounds\\":{},\\"customLabel\\":\\"\\"},\\"schema\\":\\"segment\\"}],\\"params\\":{\\"type\\":\\"area\\",\\"grid\\":{\\"categoryLines\\":false},\\"categoryAxes\\":[{\\"id\\":\\"CategoryAxis-1\\",\\"type\\":\\"category\\",\\"position\\":\\"bottom\\",\\"show\\":true,\\"style\\":{},\\"scale\\":{\\"type\\":\\"linear\\"},\\"labels\\":{\\"show\\":true,\\"filter\\":true,\\"truncate\\":100},\\"title\\":{}}],\\"valueAxes\\":[{\\"id\\":\\"ValueAxis-1\\",\\"name\\":\\"LeftAxis-1\\",\\"type\\":\\"value\\",\\"position\\":\\"left\\",\\"show\\":true,\\"style\\":{},\\"scale\\":{\\"type\\":\\"linear\\",\\"mode\\":\\"normal\\"},\\"labels\\":{\\"show\\":true,\\"rotate\\":0,\\"filter\\":false,\\"truncate\\":100},\\"title\\":{\\"text\\":\\"Response Bytes\\"}}],\\"seriesParams\\":[{\\"show\\":true,\\"type\\":\\"area\\",\\"mode\\":\\"stacked\\",\\"data\\":{\\"label\\":\\"Response Bytes\\",\\"id\\":\\"1\\"},\\"drawLinesBetweenPoints\\":true,\\"lineWidth\\":2,\\"showCircles\\":true,\\"interpolate\\":\\"linear\\",\\"valueAxis\\":\\"ValueAxis-1\\"}],\\"addTooltip\\":true,\\"addLegend\\":true,\\"legendPosition\\":\\"right\\",\\"times\\":[],\\"addTimeMarker\\":false,\\"thresholdLine\\":{\\"show\\":false,\\"value\\":10,\\"width\\":1,\\"style\\":\\"full\\",\\"color\\":\\"#E7664C\\"},\\"labels\\":{}}}"},"id":"99acc580-b47a-11ed-9063-ebe46f9ac203","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"d80e05b2-518c-4c3d-9651-4c9d8632dce4","name":"search_0","type":"search"}],"type":"visualization","updated_at":"2023-02-26T00:34:36.592Z","version":"WzY3LDdd"}', + }, + { + body: + '{"attributes":{"description":"requests per minute aggregation","kibanaSavedObjectMeta":{"searchSourceJSON":"{\\"query\\":{\\"query\\":\\"\\",\\"language\\":\\"kuery\\"},\\"filter\\":[],\\"indexRefName\\":\\"kibanaSavedObjectMeta.searchSourceJSON.index\\"}"},"title":"Req-per-min","uiStateJSON":"{}","version":1,"visState":"{\\"title\\":\\"Req-per-min\\",\\"type\\":\\"table\\",\\"aggs\\":[{\\"id\\":\\"1\\",\\"enabled\\":true,\\"type\\":\\"moving_avg\\",\\"params\\":{\\"metricAgg\\":\\"custom\\",\\"customMetric\\":{\\"id\\":\\"1-metric\\",\\"enabled\\":true,\\"type\\":\\"count\\",\\"params\\":{}},\\"window\\":5,\\"script\\":\\"MovingFunctions.unweightedAvg(values)\\"},\\"schema\\":\\"metric\\"},{\\"id\\":\\"2\\",\\"enabled\\":true,\\"type\\":\\"date_histogram\\",\\"params\\":{\\"field\\":\\"@timestamp\\",\\"timeRange\\":{\\"from\\":\\"2023-02-24T17:25:00.000Z\\",\\"to\\":\\"2023-02-24T17:30:00.000Z\\"},\\"useNormalizedOpenSearchInterval\\":true,\\"scaleMetricValues\\":false,\\"interval\\":\\"m\\",\\"drop_partials\\":false,\\"min_doc_count\\":0,\\"extended_bounds\\":{},\\"customLabel\\":\\"Req/Min\\"},\\"schema\\":\\"bucket\\"}],\\"params\\":{\\"perPage\\":10,\\"showPartialRows\\":false,\\"showMetricsAtAllLevels\\":false,\\"showTotal\\":false,\\"totalFunc\\":\\"sum\\",\\"percentageCol\\":\\"\\"}}"},"id":"01ea64d0-b62f-11ed-a677-43d7aa86763b","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"47892350-b495-11ed-af0a-cf5c93b5a3b6","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"visualization","updated_at":"2023-02-26T23:40:53.020Z","version":"WzcyLDdd"}', + }, + { + body: + '{"attributes":{"description":"Nginx dashboard with basic Observability on access / error logs","hits":0,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\\"query\\":{\\"language\\":\\"kuery\\",\\"query\\":\\"\\"},\\"filter\\":[]}"},"optionsJSON":"{\\"hidePanelTitles\\":false,\\"useMargins\\":true}","panelsJSON":"[{\\"version\\":\\"2.5.0\\",\\"gridData\\":{\\"h\\":8,\\"i\\":\\"1f31e50b-06e3-41e6-972e-e4e5fe1a9872\\",\\"w\\":48,\\"x\\":0,\\"y\\":0},\\"panelIndex\\":\\"1f31e50b-06e3-41e6-972e-e4e5fe1a9872\\",\\"embeddableConfig\\":{},\\"panelRefName\\":\\"panel_0\\"},{\\"version\\":\\"2.5.0\\",\\"gridData\\":{\\"h\\":9,\\"i\\":\\"d91a8da4-b34b-470a-aca6-9c76b47cd6fb\\",\\"w\\":24,\\"x\\":0,\\"y\\":8},\\"panelIndex\\":\\"d91a8da4-b34b-470a-aca6-9c76b47cd6fb\\",\\"embeddableConfig\\":{},\\"panelRefName\\":\\"panel_1\\"},{\\"version\\":\\"2.5.0\\",\\"gridData\\":{\\"h\\":15,\\"i\\":\\"27149e5a-3a77-4f3c-800e-8a160c3765f4\\",\\"w\\":24,\\"x\\":24,\\"y\\":8},\\"panelIndex\\":\\"27149e5a-3a77-4f3c-800e-8a160c3765f4\\",\\"embeddableConfig\\":{},\\"panelRefName\\":\\"panel_2\\"},{\\"version\\":\\"2.5.0\\",\\"gridData\\":{\\"x\\":0,\\"y\\":17,\\"w\\":24,\\"h\\":15,\\"i\\":\\"4d8c2aa7-159c-4a1a-80ff-00a9299056ce\\"},\\"panelIndex\\":\\"4d8c2aa7-159c-4a1a-80ff-00a9299056ce\\",\\"embeddableConfig\\":{},\\"panelRefName\\":\\"panel_3\\"},{\\"version\\":\\"2.5.0\\",\\"gridData\\":{\\"x\\":24,\\"y\\":23,\\"w\\":24,\\"h\\":15,\\"i\\":\\"800b7f19-f50c-417f-8987-21b930531cbe\\"},\\"panelIndex\\":\\"800b7f19-f50c-417f-8987-21b930531cbe\\",\\"embeddableConfig\\":{},\\"panelRefName\\":\\"panel_4\\"}]","timeRestore":false,"title":"[NGINX Core Logs 1.0] Overview","version":1},"id":"96847220-5261-44d0-89b4-65f3a659f13a","migrationVersion":{"dashboard":"7.9.3"},"references":[{"id":"3b49a65d-54d8-483d-a8f0-3d7c855e1ecf","name":"panel_0","type":"visualization"},{"id":"865e577b-634b-4a65-b9d6-7e324c395d18","name":"panel_1","type":"visualization"},{"id":"dc1803f0-b478-11ed-9063-ebe46f9ac203","name":"panel_2","type":"visualization"},{"id":"99acc580-b47a-11ed-9063-ebe46f9ac203","name":"panel_3","type":"visualization"},{"id":"01ea64d0-b62f-11ed-a677-43d7aa86763b","name":"panel_4","type":"visualization"}],"type":"dashboard","updated_at":"2023-02-26T23:44:09.855Z","version":"WzczLDdd"}', }, { - name: 'Panel', - type: 'panel', + body: '{"exportedCount":9,"missingRefCount":0,"missingReferences":[]}', }, ], }, diff --git a/public/components/integrations/components/integration_assets_panel.tsx b/public/components/integrations/components/integration_assets_panel.tsx index 2128be198e..05c728f71c 100644 --- a/public/components/integrations/components/integration_assets_panel.tsx +++ b/public/components/integrations/components/integration_assets_panel.tsx @@ -11,7 +11,7 @@ import { FILTER_OPTIONS } from '../../../../common/constants/explorer'; import { PanelTitle } from '../../trace_analytics/components/common/helper_functions'; export function IntegrationAssets(props: any) { - const data = props.data.data.displayAssets || []; + const data = props.data.data.displayAssets.map((x: any) => JSON.parse(x.body)) || []; const search = { box: { @@ -39,8 +39,10 @@ export function IntegrationAssets(props: any) { sortable: true, truncateText: true, render: (value, record) => ( - - {_.truncate(record.name, { length: 100 })} + + {_.truncate(record.attributes.title ? record.attributes.title : '(Unnamed)', { + length: 100, + })} ), }, @@ -64,7 +66,7 @@ export function IntegrationAssets(props: any) { x.type !== undefined)} columns={tableColumns} pagination={{ initialPageSize: 10, diff --git a/public/components/integrations/components/integration_details_panel.tsx b/public/components/integrations/components/integration_details_panel.tsx index 30f7349895..8b2b056d08 100644 --- a/public/components/integrations/components/integration_details_panel.tsx +++ b/public/components/integrations/components/integration_details_panel.tsx @@ -4,8 +4,8 @@ import { PanelTitle } from '../../trace_analytics/components/common/helper_funct export function IntegrationDetails(props: any) { let screenshots; - if (props.data.data.screenshotUrls) { - screenshots = Object.values(props.data.data.screenshotUrls); + if (props.data.data.statics.mapping.gallery) { + screenshots = props.data.data.statics.gallery; } return ( diff --git a/public/components/integrations/components/integration_fields_panel.tsx b/public/components/integrations/components/integration_fields_panel.tsx index 80eb6aaeeb..ca33738d3f 100644 --- a/public/components/integrations/components/integration_fields_panel.tsx +++ b/public/components/integrations/components/integration_fields_panel.tsx @@ -11,7 +11,12 @@ import { FILTER_OPTIONS } from '../../../../common/constants/explorer'; import { PanelTitle } from '../../trace_analytics/components/common/helper_functions'; export function IntegrationFields(props: any) { - const data = props.data.data.components || []; + const data = + props.data.data.components.map((x: any) => ({ + name: x.name, + version: x.version, + mapping: JSON.parse(x.mappingBody), + })) || []; const search = { box: { @@ -75,7 +80,28 @@ export function IntegrationFields(props: any) { { + const properties = x.mapping.template.mappings.properties; + const result = []; + for (const p of Object.keys(properties)) { + if (properties[p].type) { + result.push({ + name: p, + type: properties[p].type, + category: 'observability', + }); + } else if (properties[p].properties) { + result.push({ + name: p, + type: 'nested', + category: 'observability', + }); + } + } + return result; + }) + .flat()} columns={tableColumns} pagination={{ initialPageSize: 10, diff --git a/public/components/integrations/components/integration_overview_panel.tsx b/public/components/integrations/components/integration_overview_panel.tsx index 19ec00e65f..17689806b0 100644 --- a/public/components/integrations/components/integration_overview_panel.tsx +++ b/public/components/integrations/components/integration_overview_panel.tsx @@ -11,6 +11,7 @@ import { EuiPageContentHeaderSection, } from '@elastic/eui'; import React from 'react'; +import { INTEGRATIONS_BASE } from '../../../../common/constants/shared'; const pageStyles: CSS.Properties = { width: '80%', @@ -20,7 +21,11 @@ export function IntegrationOverview(props: any) { const { data } = props; return ( - React Logo + React Logo From 8772f94112deb322239a551d88b64ddcfffce0a1 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Fri, 26 May 2023 15:28:52 -0700 Subject: [PATCH 087/190] Add full traversal to fields list Signed-off-by: Simeon Widdis --- .../components/integration_fields_panel.tsx | 49 ++++++++++++------- 1 file changed, 32 insertions(+), 17 deletions(-) diff --git a/public/components/integrations/components/integration_fields_panel.tsx b/public/components/integrations/components/integration_fields_panel.tsx index ca33738d3f..c5496fdbb5 100644 --- a/public/components/integrations/components/integration_fields_panel.tsx +++ b/public/components/integrations/components/integration_fields_panel.tsx @@ -73,6 +73,37 @@ export function IntegrationFields(props: any) { }, ] as Array>; + const traverseTypes = ( + properties: any, + category?: string, + prefix?: string + ): Array<{ + name: string; + type: string; + category: string; + }> => { + const result: any[] = []; + for (const p of Object.keys(properties)) { + if (properties[p].type) { + result.push({ + name: prefix ? prefix + '.' + p : p, + type: properties[p].type, + category: category ? category : 'None', + }); + } else if (properties[p].properties) { + result.push({ + name: prefix ? prefix + '.' + p : p, + type: 'nested', + category: category ? category : 'None', + }); + result.push( + ...traverseTypes(properties[p].properties, (prefix = prefix ? prefix + '.' + p : p)) + ); + } + } + return result; + }; + return ( @@ -83,23 +114,7 @@ export function IntegrationFields(props: any) { items={data .map((x: any) => { const properties = x.mapping.template.mappings.properties; - const result = []; - for (const p of Object.keys(properties)) { - if (properties[p].type) { - result.push({ - name: p, - type: properties[p].type, - category: 'observability', - }); - } else if (properties[p].properties) { - result.push({ - name: p, - type: 'nested', - category: 'observability', - }); - } - } - return result; + return traverseTypes(properties, x.name); }) .flat()} columns={tableColumns} From 0b58ff9562d95ec972e3b80a1118b98255d4e777 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Fri, 26 May 2023 15:30:53 -0700 Subject: [PATCH 088/190] Add license to integration template Signed-off-by: Simeon Widdis --- server/adaptors/integrations/__data__/repository.json | 1 + server/adaptors/integrations/types.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/server/adaptors/integrations/__data__/repository.json b/server/adaptors/integrations/__data__/repository.json index c0679fad86..a6a251590d 100644 --- a/server/adaptors/integrations/__data__/repository.json +++ b/server/adaptors/integrations/__data__/repository.json @@ -4,6 +4,7 @@ "version": "1.0.0", "integrationType": "logs", "description": "Nginx HTTP server collector", + "license": "Apache-2.0", "statics": { "mapping": { "logo": "/logo" diff --git a/server/adaptors/integrations/types.ts b/server/adaptors/integrations/types.ts index 05b9f63b48..f2e669731b 100644 --- a/server/adaptors/integrations/types.ts +++ b/server/adaptors/integrations/types.ts @@ -2,6 +2,7 @@ interface IntegrationTemplate { name: string; version: string; integrationType: string; + license: string; author?: string; description?: string; tags?: string[]; From e4f0b306a742cf85260983adbb2092945c2f6b06 Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Tue, 30 May 2023 10:21:09 -0400 Subject: [PATCH 089/190] add some unit testing framework Signed-off-by: Derek Ho --- ...ilable_integration_card_view.test.tsx.snap | 252 ++++++++++++++++++ .../integration_header.test.tsx.snap | 107 ++++++++ .../available_integration_card_view.test.tsx | 23 ++ .../__tests__/integration_header.test.tsx | 22 ++ .../components/__tests__/testing_constants.ts | 93 +++++++ .../available_integration_card_view.tsx | 2 - 6 files changed, 497 insertions(+), 2 deletions(-) create mode 100644 public/components/integrations/components/__tests__/__snapshots__/available_integration_card_view.test.tsx.snap create mode 100644 public/components/integrations/components/__tests__/__snapshots__/integration_header.test.tsx.snap create mode 100644 public/components/integrations/components/__tests__/available_integration_card_view.test.tsx create mode 100644 public/components/integrations/components/__tests__/integration_header.test.tsx create mode 100644 public/components/integrations/components/__tests__/testing_constants.ts diff --git a/public/components/integrations/components/__tests__/__snapshots__/available_integration_card_view.test.tsx.snap b/public/components/integrations/components/__tests__/__snapshots__/available_integration_card_view.test.tsx.snap new file mode 100644 index 0000000000..1a95b6e285 --- /dev/null +++ b/public/components/integrations/components/__tests__/__snapshots__/available_integration_card_view.test.tsx.snap @@ -0,0 +1,252 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Integration Header Test Renders integration header as expected 1`] = ` +Array [ + +
+ +
+ + + View Details + + + + Add + +
+ } + icon={ + + } + layout="vertical" + title="nginx" + titleSize="xs" + > + +
+
+ +
+
+ + + nginx + + + +
+

+ Nginx HTTP server collector +

+
+
+
+
+
+ + + + + + +
+ + + + + + +
+
+
+ + +
+
+
+
, + +
+ , +] +`; diff --git a/public/components/integrations/components/__tests__/__snapshots__/integration_header.test.tsx.snap b/public/components/integrations/components/__tests__/__snapshots__/integration_header.test.tsx.snap new file mode 100644 index 0000000000..7b85c8b385 --- /dev/null +++ b/public/components/integrations/components/__tests__/__snapshots__/integration_header.test.tsx.snap @@ -0,0 +1,107 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Integration Header Test Renders integration header as expected 1`] = ` + +
+ +
+ +
+ +

+ Integrations +

+
+
+
+
+
+ +
+ + +
+ +
+ View or add available integrations to use pre-canned assets immediately in your OpenSearch setup. + + + + Learn more + + + + + + + +
+
+
+
+ +
+ +
+ +`; diff --git a/public/components/integrations/components/__tests__/available_integration_card_view.test.tsx b/public/components/integrations/components/__tests__/available_integration_card_view.test.tsx new file mode 100644 index 0000000000..e0e8184c2c --- /dev/null +++ b/public/components/integrations/components/__tests__/available_integration_card_view.test.tsx @@ -0,0 +1,23 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { configure, mount } from 'enzyme'; +import Adapter from 'enzyme-adapter-react-16'; +import React from 'react'; +import { waitFor } from '@testing-library/react'; +import { AvailableIntegrationsCardView } from '../available_integration_card_view'; +import { data } from './testing_constants'; + +describe('Integration Header Test', () => { + configure({ adapter: new Adapter() }); + + it('Renders integration header as expected', async () => { + const wrapper = mount(AvailableIntegrationsCardView(data)); + + await waitFor(() => { + expect(wrapper).toMatchSnapshot(); + }); + }); +}); diff --git a/public/components/integrations/components/__tests__/integration_header.test.tsx b/public/components/integrations/components/__tests__/integration_header.test.tsx new file mode 100644 index 0000000000..6bbd44e4fe --- /dev/null +++ b/public/components/integrations/components/__tests__/integration_header.test.tsx @@ -0,0 +1,22 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { configure, mount } from 'enzyme'; +import Adapter from 'enzyme-adapter-react-16'; +import React from 'react'; +import { waitFor } from '@testing-library/react'; +import { IntegrationHeader } from '../integration_header'; + +describe('Integration Header Test', () => { + configure({ adapter: new Adapter() }); + + it('Renders integration header as expected', async () => { + const wrapper = mount(); + + await waitFor(() => { + expect(wrapper).toMatchSnapshot(); + }); + }); +}); diff --git a/public/components/integrations/components/__tests__/testing_constants.ts b/public/components/integrations/components/__tests__/testing_constants.ts new file mode 100644 index 0000000000..91fd2eaa9a --- /dev/null +++ b/public/components/integrations/components/__tests__/testing_constants.ts @@ -0,0 +1,93 @@ +export const data: AvailableIntegrationsCardViewProps = { + data: { + hits: [ + { + name: 'nginx', + version: '1.0.0', + integrationType: 'logs', + description: 'Nginx HTTP server collector', + statics: { + mapping: { + logo: '/logo', + }, + assets: { + '/logo': { + mimeType: 'image/png', + annotation: 'NginX Logo', + data: + 'iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAACXBIWXMAAAsSAAALEgHS3X78AAAfBklEQVR42u1dDYxc1XWe2dkNfzFEAVxh8LyZtU0LhoTYnvtmAacINWmJm+CmiRKoiBLRqH/8qE3URm2pLBqVUsC77834L5CSJqKhblOaQlMUEaKmSdSgNCSIokJL25QSURMiU6EAM7O7Pffcc++7b7y217vz3u7M+450NG9nZ3dm7rv3u+d85+eWSpCRlSAOS7Uo5Gv9GERhxf0uCjcHkXqEXvNoLVZvsc/XIlXRf2euG6Va3MRAQiDDtfCVXuAOBPoW/lm0yKfpsVvfPzWvlV7fo9fF9PzahYCAgIKAIMTAQiCrWap7L9cLt+Qt9jH6eYwX9MxlY/TzDaQvTN596Twt6Hm61gu/p6/1c3R9iK5vrrVURUCgHMjfW2DZGG/HQEMgq3rXj8Jy366/gxby4/VP0cLf09QLvUvPzemFz0AQqzn9XK3dnNevoevv0fPvSVsDqmzdggDWAAQyFH7+xbTwv1jfRwt73xQtdqUX/qxZ9BoAlAaBOXPNz81qINCv1UrXD9JrLgE/AIEMq5+vd/1YzWpz3+34kVv886JzfRYBuwb1A5eCH4BAhtzPd+a+7PT+wk9rpK0BAwwBX5NbAH4AAhl6P98t7EVqAgTgByCQoffz55eo4AcgkBHx85cOAuAHIJAR8fOXquAHIJCR8vOX4RaAH4BARsXPBz8AgRTczwc/AIEU3s8HPwCBwM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az4dAwA/Az4dAwA/Az4dAwA/Az4dAisoPwM+HQArKD8DPh0AKyA/Az4dACscPwM+HQArJD8DPh0AKyg/Az4dACsgPwM+HQArHD8DPh0AKyQ/Az4dACsoPwM+HQArMD8DPh0CKyA8EUcimPvx8CKSI/MB+MvX3T7GfX4OfD4EUih/YTAv7EbICHqWFfjH8/GLK/wNkczJMJgkn1AAAAABJRU5ErkJggg==', + }, + }, + }, + components: [ + { + name: 'communication', + version: '1.0.0', + schemaBody: + '{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://opensearch.org/schemas/observability/Communication","title":"Communication","type":"object","properties":{"source":{"type":"object","properties":{"sock.family":{"type":"string"},"source":{"$ref":"#/definitions/Source"},"destination":{"$ref":"#/definitions/Destination"}}},"destination":{"type":"object","properties":{}}},"definitions":{"Source":{"$id":"#/definitions/Source","type":"object","additionalProperties":true,"properties":{"address":{"type":"string"},"domain":{"type":"string"},"bytes":{"type":"integer"},"ip":{"type":"string"},"port":{"type":"integer"},"mac":{"type":"string"},"packets":{"type":"integer"}},"title":"Source"},"Destination":{"$id":"#/definitions/Destination","type":"object","additionalProperties":true,"properties":{"address":{"type":"string"},"domain":{"type":"string"},"bytes":{"type":"integer"},"ip":{"type":"string"},"port":{"type":"integer"},"mac":{"type":"string"},"packets":{"type":"integer"}},"title":"Destination"}}}', + mappingBody: + '{"template":{"mappings":{"_meta":{"version":"1.0.0","catalog":"observability","type":"logs","component":"communication"},"properties":{"communication":{"properties":{"sock.family":{"type":"keyword","ignore_above":256},"source":{"type":"object","properties":{"address":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":1024}}},"domain":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":1024}}},"bytes":{"type":"long"},"ip":{"type":"ip"},"port":{"type":"long"},"mac":{"type":"keyword","ignore_above":1024},"packets":{"type":"long"}}},"destination":{"type":"object","properties":{"address":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":1024}}},"domain":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":1024}}},"bytes":{"type":"long"},"ip":{"type":"ip"},"port":{"type":"long"},"mac":{"type":"keyword","ignore_above":1024},"packets":{"type":"long"}}}}}}}}}', + }, + { + name: 'http', + version: '1.0.0', + schemaBody: + '{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://opensearch.org/schemas/observability/Http","title":"Http","type":"object","properties":{"request":{"$ref":"#/definitions/Request"},"response":{"$ref":"#/definitions/Response"},"flavor":{"type":"string"},"user_agent":{"type":"string"},"url":{"type":"string"},"schema":{"type":"string"},"target":{"type":"string"},"route":{"type":"string"},"client_ip":{"type":"string"},"resent_count":{"type":"integer"}},"definitions":{"Request":{"$id":"#/definitions/Request","type":"object","additionalProperties":true,"properties":{"id":{"type":"string"},"body.content":{"type":"string"},"bytes":{"type":"integer"},"method":{"type":"string"},"referrer":{"type":"string"},"header":{"type":"string"},"mime_type":{"type":"object"}},"title":"Request"},"Response":{"$id":"#/definitions/Response","type":"object","additionalProperties":true,"properties":{"id":{"type":"string"},"body.content":{"type":"string"},"bytes":{"type":"integer"},"status_code":{"type":"integer"},"header":{"type":"object"}},"title":"Response"}}}', + mappingBody: + '{"template":{"mappings":{"_meta":{"version":"1.0.0","catalog":"observability","type":"logs","component":"http"},"dynamic_templates":[{"request_header_map":{"mapping":{"type":"keyword"},"path_match":"request.header.*"}},{"response_header_map":{"mapping":{"type":"keyword"},"path_match":"response.header.*"}}],"properties":{"http":{"properties":{"flavor":{"type":"keyword","ignore_above":256},"user_agent":{"type":"keyword","ignore_above":2048},"url":{"type":"keyword","ignore_above":2048},"schema":{"type":"keyword","ignore_above":1024},"target":{"type":"keyword","ignore_above":1024},"route":{"type":"keyword","ignore_above":1024},"client.ip":{"type":"ip"},"resent_count":{"type":"integer"},"request":{"type":"object","properties":{"id":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"body.content":{"type":"text"},"bytes":{"type":"long"},"method":{"type":"keyword","ignore_above":256},"referrer":{"type":"keyword","ignore_above":1024},"mime_type":{"type":"keyword","ignore_above":1024}}},"response":{"type":"object","properties":{"id":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"body.content":{"type":"text"},"bytes":{"type":"long"},"status_code":{"type":"integer"}}}}}}}}}', + }, + { + name: 'logs', + version: '1.0.0', + schemaBody: + '{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://opensearch.org/schema/observability/Logs","title":"OpenTelemetry Logs","type":"object","properties":{"severity":{"$ref":"#/definitions/Severity"},"resource":{"type":"object"},"attributes":{"$ref":"#/definitions/Attributes"},"body":{"type":"string"},"@timestamp":{"type":"string","format":"date-time"},"observedTimestamp":{"type":"string","format":"date-time"},"traceId":{"$ref":"https://opensearch.org/schemas/observability/Span#/properties/traceId"},"spanId":{"$ref":"https://opensearch.org/schemas/observability/Span#/properties/spanId"},"schemaUrl":{"type":"string"},"instrumentationScope":{"$ref":"#/definitions/InstrumentationScope"},"event":{"$ref":"#/definitions/Event"}},"required":["body","@timestamp"],"definitions":{"InstrumentationScope":{"$id":"#/definitions/InstrumentationScope","type":"object","additionalProperties":true,"properties":{"name":{"type":"string"},"version":{"type":"string"},"schemaUrl":{"type":"string"}},"title":"InstrumentationScope"},"Severity":{"$id":"#/definitions/Severity","type":"object","additionalProperties":true,"properties":{"text":{"type":"string","enum":["TRACE","DEBUG","INFO","WARN","ERROR","FATAL"]},"number":{"type":"integer"}},"title":"Severity"},"Attributes":{"$id":"#/definitions/Attributes","type":"object","additionalProperties":true,"properties":{"data_stream":{"$ref":"#/definitions/Dataflow"}},"title":"Attributes"},"Dataflow":{"$id":"#/definitions/Dataflow","type":"object","additionalProperties":true,"properties":{"type":{"type":"string"},"namespace":{"type":"string"},"dataset":{"type":"string"}},"title":"Dataflow"},"Exception":{"$id":"#/definitions/Exception","type":"object","additionalProperties":true,"properties":{"message":{"type":"string"},"stacktrace":{"type":"string"},"type":{"type":"string"}},"title":"Exception"},"Event":{"$id":"#/definitions/Event","type":"object","additionalProperties":true,"properties":{"category":{"type":"string","enum":["authentication","configuration","database","driver","email","file","host","iam","intrusion_detection","malware","network","package","process","registry","session","threat","vulnerability","web"]},"kind":{"type":"string","enum":["alert","enrichment","event","metric","state","error","signal"]},"type":{"type":"string","enum":["access","admin","allowed","change","connection","creation","deletion","denied","end","error","group","indicator","info","installation","protocol","start","user"]},"domain":{"type":"string"},"name":{"type":"string"},"source":{"type":"string"},"result":{"type":"string","enum":["failure","success","pending","undetermined"]},"exception":{"$ref":"#/definitions/Exception"}},"title":"Event"}}}', + mappingBody: + '{"index_patterns":["sso_logs-*-*"],"data_stream":{},"template":{"mappings":{"_meta":{"version":"1.0.0","catalog":"observability","type":"logs","component":"log","correlations":[{"field":"spanId","foreign-schema":"traces","foreign-field":"spanId"},{"field":"traceId","foreign-schema":"traces","foreign-field":"traceId"}]},"_source":{"enabled":true},"dynamic_templates":[{"resources_map":{"mapping":{"type":"keyword"},"path_match":"resource.*"}},{"attributes_map":{"mapping":{"type":"keyword"},"path_match":"attributes.*"}},{"instrumentation_scope_attributes_map":{"mapping":{"type":"keyword"},"path_match":"instrumentationScope.attributes.*"}}],"properties":{"severity":{"properties":{"number":{"type":"long"},"text":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}},"attributes":{"type":"object","properties":{"data_stream":{"properties":{"dataset":{"ignore_above":128,"type":"keyword"},"namespace":{"ignore_above":128,"type":"keyword"},"type":{"ignore_above":56,"type":"keyword"}}}}},"body":{"type":"text"},"@timestamp":{"type":"date"},"observedTimestamp":{"type":"date"},"observerTime":{"type":"alias","path":"observedTimestamp"},"traceId":{"ignore_above":256,"type":"keyword"},"spanId":{"ignore_above":256,"type":"keyword"},"schemaUrl":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"instrumentationScope":{"properties":{"name":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":128}}},"version":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"dropped_attributes_count":{"type":"integer"},"schemaUrl":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}},"event":{"properties":{"domain":{"ignore_above":256,"type":"keyword"},"name":{"ignore_above":256,"type":"keyword"},"source":{"ignore_above":256,"type":"keyword"},"category":{"ignore_above":256,"type":"keyword"},"type":{"ignore_above":256,"type":"keyword"},"kind":{"ignore_above":256,"type":"keyword"},"result":{"ignore_above":256,"type":"keyword"},"exception":{"properties":{"message":{"ignore_above":1024,"type":"keyword"},"type":{"ignore_above":256,"type":"keyword"},"stacktrace":{"type":"text"}}}}}}},"settings":{"index":{"mapping":{"total_fields":{"limit":10000}},"refresh_interval":"5s"}}},"composed_of":["http_template","communication_template"],"version":1,"_meta":{"description":"Simple Schema For Observability","catalog":"observability","type":"logs","correlations":[{"field":"spanId","foreign-schema":"traces","foreign-field":"spanId"},{"field":"traceId","foreign-schema":"traces","foreign-field":"traceId"}]}}', + }, + ], + displayAssets: [ + { + body: + '{"attributes":{"fields":"[{\\"count\\":0,\\"name\\":\\"@timestamp\\",\\"type\\":\\"date\\",\\"esTypes\\":[\\"date\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true},{\\"count\\":0,\\"name\\":\\"_id\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"_id\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"_index\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"_index\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"_score\\",\\"type\\":\\"number\\",\\"scripted\\":false,\\"searchable\\":false,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"_source\\",\\"type\\":\\"_source\\",\\"esTypes\\":[\\"_source\\"],\\"scripted\\":false,\\"searchable\\":false,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"_type\\",\\"type\\":\\"string\\",\\"scripted\\":false,\\"searchable\\":false,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"attributes.data_stream.dataset\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"attributes.data_stream.dataset.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"attributes.data_stream.dataset\\"}}},{\\"count\\":0,\\"name\\":\\"attributes.data_stream.namespace\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"attributes.data_stream.namespace.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"attributes.data_stream.namespace\\"}}},{\\"count\\":0,\\"name\\":\\"attributes.data_stream.type\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"attributes.data_stream.type.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"attributes.data_stream.type\\"}}},{\\"count\\":0,\\"name\\":\\"body\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"body.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"body\\"}}},{\\"count\\":0,\\"name\\":\\"communication.source.address\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"communication.source.address.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"communication.source.address\\"}}},{\\"count\\":0,\\"name\\":\\"communication.source.ip\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"communication.source.ip.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"communication.source.ip\\"}}},{\\"count\\":0,\\"name\\":\\"event.category\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"event.category.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"event.category\\"}}},{\\"count\\":0,\\"name\\":\\"event.domain\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"event.domain.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"event.domain\\"}}},{\\"count\\":0,\\"name\\":\\"event.kind\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"event.kind.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"event.kind\\"}}},{\\"count\\":0,\\"name\\":\\"event.name\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"event.name.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"event.name\\"}}},{\\"count\\":0,\\"name\\":\\"event.result\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"event.result.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"event.result\\"}}},{\\"count\\":0,\\"name\\":\\"event.type\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"event.type.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"event.type\\"}}},{\\"count\\":0,\\"name\\":\\"http.flavor\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"http.flavor.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"http.flavor\\"}}},{\\"count\\":0,\\"name\\":\\"http.request.method\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"http.request.method.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"http.request.method\\"}}},{\\"count\\":0,\\"name\\":\\"http.response.bytes\\",\\"type\\":\\"number\\",\\"esTypes\\":[\\"long\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true},{\\"count\\":0,\\"name\\":\\"http.response.status_code\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"http.response.status_code.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"http.response.status_code\\"}}},{\\"count\\":0,\\"name\\":\\"http.url\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"http.url\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"http.url\\"}}},{\\"count\\":0,\\"name\\":\\"observerTime\\",\\"type\\":\\"date\\",\\"esTypes\\":[\\"date\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true},{\\"count\\":0,\\"name\\":\\"span_id\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"span_id.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"span_id\\"}}},{\\"count\\":0,\\"name\\":\\"trace_id\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"trace_id.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"trace_id\\"}}}]","timeFieldName":"@timestamp","title":"sso_logs-*-*"},"id":"47892350-b495-11ed-af0a-cf5c93b5a3b6","migrationVersion":{"index-pattern":"7.6.0"},"references":[],"type":"index-pattern","updated_at":"2023-02-26T00:34:36.592Z","version":"WzYxLDdd"}', + }, + { + body: + '{"attributes":{"columns":["http.request.method","http.response.status_code"],"description":"","hits":0,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\\n \\"highlightAll\\": true,\\n \\"version\\": true,\\n \\"query\\": {\\n \\"query\\": \\"event.domain:nginx.access\\",\\n \\"language\\": \\"kuery\\"\\n },\\n \\"filter\\": [],\\n \\"indexRefName\\": \\"kibanaSavedObjectMeta.searchSourceJSON.index\\"\\n}"},"sort":[],"title":"[NGINX Core Logs 1.0] Nginx Access Logs","version":1},"id":"d80e05b2-518c-4c3d-9651-4c9d8632dce4","migrationVersion":{"search":"7.9.3"},"references":[{"id":"47892350-b495-11ed-af0a-cf5c93b5a3b6","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"search","updated_at":"2023-02-26T00:34:36.592Z","version":"WzYyLDdd"}', + }, + { + body: + '{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\\"query\\":{\\"query\\":\\"\\",\\"language\\":\\"lucene\\"},\\"filter\\":[]}"},"savedSearchRefName":"search_0","title":"[NGINX Core Logs 1.0] Response codes over time","uiStateJSON":"{}","version":1,"visState":"{\\"title\\":\\"[NGINX Core Logs 1.0] Response codes over time\\",\\"type\\":\\"histogram\\",\\"aggs\\":[{\\"id\\":\\"1\\",\\"enabled\\":true,\\"type\\":\\"count\\",\\"params\\":{},\\"schema\\":\\"metric\\"},{\\"id\\":\\"2\\",\\"enabled\\":true,\\"type\\":\\"date_histogram\\",\\"params\\":{\\"field\\":\\"@timestamp\\",\\"timeRange\\":{\\"from\\":\\"now-24h\\",\\"to\\":\\"now\\"},\\"useNormalizedOpenSearchInterval\\":true,\\"scaleMetricValues\\":false,\\"interval\\":\\"auto\\",\\"drop_partials\\":false,\\"min_doc_count\\":1,\\"extended_bounds\\":{}},\\"schema\\":\\"segment\\"},{\\"id\\":\\"3\\",\\"enabled\\":true,\\"type\\":\\"filters\\",\\"params\\":{\\"filters\\":[{\\"input\\":{\\"query\\":\\"http.response.status_code:[200 TO 299]\\",\\"language\\":\\"lucene\\"},\\"label\\":\\"200s\\"},{\\"input\\":{\\"query\\":\\"http.response.status_code:[300 TO 399]\\",\\"language\\":\\"lucene\\"},\\"label\\":\\"300s\\"},{\\"input\\":{\\"query\\":\\"http.response.status_code:[400 TO 499]\\",\\"language\\":\\"lucene\\"},\\"label\\":\\"400s\\"},{\\"input\\":{\\"query\\":\\"http.response.status_code:[500 TO 599]\\",\\"language\\":\\"lucene\\"},\\"label\\":\\"500s\\"},{\\"input\\":{\\"query\\":\\"http.response.status_code:0\\",\\"language\\":\\"lucene\\"},\\"label\\":\\"0\\"}]},\\"schema\\":\\"group\\"}],\\"params\\":{\\"type\\":\\"histogram\\",\\"grid\\":{\\"categoryLines\\":false},\\"categoryAxes\\":[{\\"id\\":\\"CategoryAxis-1\\",\\"type\\":\\"category\\",\\"position\\":\\"bottom\\",\\"show\\":true,\\"style\\":{},\\"scale\\":{\\"type\\":\\"linear\\"},\\"labels\\":{\\"show\\":true,\\"filter\\":true,\\"truncate\\":100},\\"title\\":{}}],\\"valueAxes\\":[{\\"id\\":\\"ValueAxis-1\\",\\"name\\":\\"LeftAxis-1\\",\\"type\\":\\"value\\",\\"position\\":\\"left\\",\\"show\\":true,\\"style\\":{},\\"scale\\":{\\"type\\":\\"linear\\",\\"mode\\":\\"normal\\"},\\"labels\\":{\\"show\\":true,\\"rotate\\":0,\\"filter\\":false,\\"truncate\\":100},\\"title\\":{\\"text\\":\\"Count\\"}}],\\"seriesParams\\":[{\\"show\\":true,\\"type\\":\\"histogram\\",\\"mode\\":\\"stacked\\",\\"data\\":{\\"label\\":\\"Count\\",\\"id\\":\\"1\\"},\\"valueAxis\\":\\"ValueAxis-1\\",\\"drawLinesBetweenPoints\\":true,\\"lineWidth\\":2,\\"showCircles\\":true}],\\"addTooltip\\":true,\\"addLegend\\":true,\\"legendPosition\\":\\"right\\",\\"times\\":[],\\"addTimeMarker\\":false,\\"labels\\":{\\"show\\":false},\\"thresholdLine\\":{\\"show\\":false,\\"value\\":10,\\"width\\":1,\\"style\\":\\"full\\",\\"color\\":\\"#E7664C\\"}}}"},"id":"3b49a65d-54d8-483d-a8f0-3d7c855e1ecf","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"d80e05b2-518c-4c3d-9651-4c9d8632dce4","name":"search_0","type":"search"}],"type":"visualization","updated_at":"2023-02-26T00:34:36.592Z","version":"WzYzLDdd"}', + }, + { + body: + '{"attributes":{"columns":["_source"],"description":"","hits":0,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\\n \\"highlightAll\\": true,\\n \\"query\\": {\\n \\"query\\": \\"http.response.status_code >= 300 and event.domain:nginx.access\\",\\n \\"language\\": \\"kuery\\"\\n },\\n \\"version\\": true,\\n \\"highlight\\": {\\n \\"post_tags\\": [\\n \\"@/kibana-highlighted-field@\\"\\n ],\\n \\"fields\\": {\\n \\"*\\": {}\\n },\\n \\"pre_tags\\": [\\n \\"@kibana-highlighted-field@\\"\\n ],\\n \\"require_field_match\\": false,\\n \\"fragment_size\\": 2147483647\\n },\\n \\"filter\\": [],\\n \\"indexRefName\\": \\"kibanaSavedObjectMeta.searchSourceJSON.index\\"\\n}"},"sort":[["@timestamp","desc"]],"title":"[NGINX Core Logs 1.0] Nginx Error Logs","version":1},"id":"9f820fbe-ddde-43a2-9402-30bd295c97f6","migrationVersion":{"search":"7.9.3"},"references":[{"id":"47892350-b495-11ed-af0a-cf5c93b5a3b6","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"search","updated_at":"2023-02-26T00:34:36.592Z","version":"WzY0LDdd"}', + }, + { + body: + '{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\\"query\\":{\\"query\\":\\"\\",\\"language\\":\\"lucene\\"},\\"filter\\":[]}"},"savedSearchRefName":"search_0","title":"[NGINX Core Logs 1.0] Errors over time","uiStateJSON":"{}","version":1,"visState":"{\\"title\\":\\"[NGINX Core Logs 1.0] Errors over time\\",\\"type\\":\\"histogram\\",\\"aggs\\":[{\\"id\\":\\"1\\",\\"enabled\\":true,\\"type\\":\\"count\\",\\"params\\":{},\\"schema\\":\\"metric\\"},{\\"id\\":\\"2\\",\\"enabled\\":true,\\"type\\":\\"date_histogram\\",\\"params\\":{\\"field\\":\\"@timestamp\\",\\"timeRange\\":{\\"from\\":\\"now-24h\\",\\"to\\":\\"now\\"},\\"useNormalizedOpenSearchInterval\\":true,\\"scaleMetricValues\\":false,\\"interval\\":\\"auto\\",\\"drop_partials\\":false,\\"min_doc_count\\":1,\\"extended_bounds\\":{}},\\"schema\\":\\"segment\\"}],\\"params\\":{\\"type\\":\\"histogram\\",\\"grid\\":{\\"categoryLines\\":false},\\"categoryAxes\\":[{\\"id\\":\\"CategoryAxis-1\\",\\"type\\":\\"category\\",\\"position\\":\\"bottom\\",\\"show\\":true,\\"style\\":{},\\"scale\\":{\\"type\\":\\"linear\\"},\\"labels\\":{\\"show\\":true,\\"filter\\":true,\\"truncate\\":100},\\"title\\":{}}],\\"valueAxes\\":[{\\"id\\":\\"ValueAxis-1\\",\\"name\\":\\"LeftAxis-1\\",\\"type\\":\\"value\\",\\"position\\":\\"left\\",\\"show\\":true,\\"style\\":{},\\"scale\\":{\\"type\\":\\"linear\\",\\"mode\\":\\"normal\\"},\\"labels\\":{\\"show\\":true,\\"rotate\\":0,\\"filter\\":false,\\"truncate\\":100},\\"title\\":{\\"text\\":\\"Count\\"}}],\\"seriesParams\\":[{\\"show\\":true,\\"type\\":\\"histogram\\",\\"mode\\":\\"stacked\\",\\"data\\":{\\"label\\":\\"Count\\",\\"id\\":\\"1\\"},\\"valueAxis\\":\\"ValueAxis-1\\",\\"drawLinesBetweenPoints\\":true,\\"lineWidth\\":2,\\"showCircles\\":true}],\\"addTooltip\\":true,\\"addLegend\\":true,\\"legendPosition\\":\\"right\\",\\"times\\":[],\\"addTimeMarker\\":false,\\"labels\\":{\\"show\\":false},\\"thresholdLine\\":{\\"show\\":false,\\"value\\":10,\\"width\\":1,\\"style\\":\\"full\\",\\"color\\":\\"#E7664C\\"}}}"},"id":"865e577b-634b-4a65-b9d6-7e324c395d18","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"9f820fbe-ddde-43a2-9402-30bd295c97f6","name":"search_0","type":"search"}],"type":"visualization","updated_at":"2023-02-26T00:34:36.592Z","version":"WzY1LDdd"}', + }, + { + body: + '{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\\"query\\":{\\"query\\":\\"\\",\\"language\\":\\"kuery\\"},\\"filter\\":[]}"},"savedSearchRefName":"search_0","title":"Top Paths","uiStateJSON":"{}","version":1,"visState":"{\\"title\\":\\"Top Paths\\",\\"type\\":\\"table\\",\\"aggs\\":[{\\"id\\":\\"1\\",\\"enabled\\":true,\\"type\\":\\"count\\",\\"params\\":{},\\"schema\\":\\"metric\\"},{\\"id\\":\\"2\\",\\"enabled\\":true,\\"type\\":\\"terms\\",\\"params\\":{\\"field\\":\\"http.url\\",\\"orderBy\\":\\"1\\",\\"order\\":\\"desc\\",\\"size\\":10,\\"otherBucket\\":false,\\"otherBucketLabel\\":\\"Other\\",\\"missingBucket\\":false,\\"missingBucketLabel\\":\\"Missing\\",\\"customLabel\\":\\"Paths\\"},\\"schema\\":\\"bucket\\"}],\\"params\\":{\\"perPage\\":10,\\"showPartialRows\\":false,\\"showMetricsAtAllLevels\\":false,\\"showTotal\\":false,\\"totalFunc\\":\\"sum\\",\\"percentageCol\\":\\"\\"}}"},"id":"dc1803f0-b478-11ed-9063-ebe46f9ac203","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"d80e05b2-518c-4c3d-9651-4c9d8632dce4","name":"search_0","type":"search"}],"type":"visualization","updated_at":"2023-02-26T00:34:36.592Z","version":"WzY2LDdd"}', + }, + { + body: + '{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\\"query\\":{\\"query\\":\\"\\",\\"language\\":\\"kuery\\"},\\"filter\\":[]}"},"savedSearchRefName":"search_0","title":"Data Volume","uiStateJSON":"{}","version":1,"visState":"{\\"title\\":\\"Data Volume\\",\\"type\\":\\"area\\",\\"aggs\\":[{\\"id\\":\\"1\\",\\"enabled\\":true,\\"type\\":\\"sum\\",\\"params\\":{\\"field\\":\\"http.response.bytes\\",\\"customLabel\\":\\"Response Bytes\\"},\\"schema\\":\\"metric\\"},{\\"id\\":\\"2\\",\\"enabled\\":true,\\"type\\":\\"date_histogram\\",\\"params\\":{\\"field\\":\\"observerTime\\",\\"timeRange\\":{\\"from\\":\\"now-15m\\",\\"to\\":\\"now\\"},\\"useNormalizedOpenSearchInterval\\":true,\\"scaleMetricValues\\":false,\\"interval\\":\\"auto\\",\\"drop_partials\\":false,\\"min_doc_count\\":1,\\"extended_bounds\\":{},\\"customLabel\\":\\"\\"},\\"schema\\":\\"segment\\"}],\\"params\\":{\\"type\\":\\"area\\",\\"grid\\":{\\"categoryLines\\":false},\\"categoryAxes\\":[{\\"id\\":\\"CategoryAxis-1\\",\\"type\\":\\"category\\",\\"position\\":\\"bottom\\",\\"show\\":true,\\"style\\":{},\\"scale\\":{\\"type\\":\\"linear\\"},\\"labels\\":{\\"show\\":true,\\"filter\\":true,\\"truncate\\":100},\\"title\\":{}}],\\"valueAxes\\":[{\\"id\\":\\"ValueAxis-1\\",\\"name\\":\\"LeftAxis-1\\",\\"type\\":\\"value\\",\\"position\\":\\"left\\",\\"show\\":true,\\"style\\":{},\\"scale\\":{\\"type\\":\\"linear\\",\\"mode\\":\\"normal\\"},\\"labels\\":{\\"show\\":true,\\"rotate\\":0,\\"filter\\":false,\\"truncate\\":100},\\"title\\":{\\"text\\":\\"Response Bytes\\"}}],\\"seriesParams\\":[{\\"show\\":true,\\"type\\":\\"area\\",\\"mode\\":\\"stacked\\",\\"data\\":{\\"label\\":\\"Response Bytes\\",\\"id\\":\\"1\\"},\\"drawLinesBetweenPoints\\":true,\\"lineWidth\\":2,\\"showCircles\\":true,\\"interpolate\\":\\"linear\\",\\"valueAxis\\":\\"ValueAxis-1\\"}],\\"addTooltip\\":true,\\"addLegend\\":true,\\"legendPosition\\":\\"right\\",\\"times\\":[],\\"addTimeMarker\\":false,\\"thresholdLine\\":{\\"show\\":false,\\"value\\":10,\\"width\\":1,\\"style\\":\\"full\\",\\"color\\":\\"#E7664C\\"},\\"labels\\":{}}}"},"id":"99acc580-b47a-11ed-9063-ebe46f9ac203","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"d80e05b2-518c-4c3d-9651-4c9d8632dce4","name":"search_0","type":"search"}],"type":"visualization","updated_at":"2023-02-26T00:34:36.592Z","version":"WzY3LDdd"}', + }, + { + body: + '{"attributes":{"description":"requests per minute aggregation","kibanaSavedObjectMeta":{"searchSourceJSON":"{\\"query\\":{\\"query\\":\\"\\",\\"language\\":\\"kuery\\"},\\"filter\\":[],\\"indexRefName\\":\\"kibanaSavedObjectMeta.searchSourceJSON.index\\"}"},"title":"Req-per-min","uiStateJSON":"{}","version":1,"visState":"{\\"title\\":\\"Req-per-min\\",\\"type\\":\\"table\\",\\"aggs\\":[{\\"id\\":\\"1\\",\\"enabled\\":true,\\"type\\":\\"moving_avg\\",\\"params\\":{\\"metricAgg\\":\\"custom\\",\\"customMetric\\":{\\"id\\":\\"1-metric\\",\\"enabled\\":true,\\"type\\":\\"count\\",\\"params\\":{}},\\"window\\":5,\\"script\\":\\"MovingFunctions.unweightedAvg(values)\\"},\\"schema\\":\\"metric\\"},{\\"id\\":\\"2\\",\\"enabled\\":true,\\"type\\":\\"date_histogram\\",\\"params\\":{\\"field\\":\\"@timestamp\\",\\"timeRange\\":{\\"from\\":\\"2023-02-24T17:25:00.000Z\\",\\"to\\":\\"2023-02-24T17:30:00.000Z\\"},\\"useNormalizedOpenSearchInterval\\":true,\\"scaleMetricValues\\":false,\\"interval\\":\\"m\\",\\"drop_partials\\":false,\\"min_doc_count\\":0,\\"extended_bounds\\":{},\\"customLabel\\":\\"Req/Min\\"},\\"schema\\":\\"bucket\\"}],\\"params\\":{\\"perPage\\":10,\\"showPartialRows\\":false,\\"showMetricsAtAllLevels\\":false,\\"showTotal\\":false,\\"totalFunc\\":\\"sum\\",\\"percentageCol\\":\\"\\"}}"},"id":"01ea64d0-b62f-11ed-a677-43d7aa86763b","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"47892350-b495-11ed-af0a-cf5c93b5a3b6","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"visualization","updated_at":"2023-02-26T23:40:53.020Z","version":"WzcyLDdd"}', + }, + { + body: + '{"attributes":{"description":"Nginx dashboard with basic Observability on access / error logs","hits":0,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\\"query\\":{\\"language\\":\\"kuery\\",\\"query\\":\\"\\"},\\"filter\\":[]}"},"optionsJSON":"{\\"hidePanelTitles\\":false,\\"useMargins\\":true}","panelsJSON":"[{\\"version\\":\\"2.5.0\\",\\"gridData\\":{\\"h\\":8,\\"i\\":\\"1f31e50b-06e3-41e6-972e-e4e5fe1a9872\\",\\"w\\":48,\\"x\\":0,\\"y\\":0},\\"panelIndex\\":\\"1f31e50b-06e3-41e6-972e-e4e5fe1a9872\\",\\"embeddableConfig\\":{},\\"panelRefName\\":\\"panel_0\\"},{\\"version\\":\\"2.5.0\\",\\"gridData\\":{\\"h\\":9,\\"i\\":\\"d91a8da4-b34b-470a-aca6-9c76b47cd6fb\\",\\"w\\":24,\\"x\\":0,\\"y\\":8},\\"panelIndex\\":\\"d91a8da4-b34b-470a-aca6-9c76b47cd6fb\\",\\"embeddableConfig\\":{},\\"panelRefName\\":\\"panel_1\\"},{\\"version\\":\\"2.5.0\\",\\"gridData\\":{\\"h\\":15,\\"i\\":\\"27149e5a-3a77-4f3c-800e-8a160c3765f4\\",\\"w\\":24,\\"x\\":24,\\"y\\":8},\\"panelIndex\\":\\"27149e5a-3a77-4f3c-800e-8a160c3765f4\\",\\"embeddableConfig\\":{},\\"panelRefName\\":\\"panel_2\\"},{\\"version\\":\\"2.5.0\\",\\"gridData\\":{\\"x\\":0,\\"y\\":17,\\"w\\":24,\\"h\\":15,\\"i\\":\\"4d8c2aa7-159c-4a1a-80ff-00a9299056ce\\"},\\"panelIndex\\":\\"4d8c2aa7-159c-4a1a-80ff-00a9299056ce\\",\\"embeddableConfig\\":{},\\"panelRefName\\":\\"panel_3\\"},{\\"version\\":\\"2.5.0\\",\\"gridData\\":{\\"x\\":24,\\"y\\":23,\\"w\\":24,\\"h\\":15,\\"i\\":\\"800b7f19-f50c-417f-8987-21b930531cbe\\"},\\"panelIndex\\":\\"800b7f19-f50c-417f-8987-21b930531cbe\\",\\"embeddableConfig\\":{},\\"panelRefName\\":\\"panel_4\\"}]","timeRestore":false,"title":"[NGINX Core Logs 1.0] Overview","version":1},"id":"96847220-5261-44d0-89b4-65f3a659f13a","migrationVersion":{"dashboard":"7.9.3"},"references":[{"id":"3b49a65d-54d8-483d-a8f0-3d7c855e1ecf","name":"panel_0","type":"visualization"},{"id":"865e577b-634b-4a65-b9d6-7e324c395d18","name":"panel_1","type":"visualization"},{"id":"dc1803f0-b478-11ed-9063-ebe46f9ac203","name":"panel_2","type":"visualization"},{"id":"99acc580-b47a-11ed-9063-ebe46f9ac203","name":"panel_3","type":"visualization"},{"id":"01ea64d0-b62f-11ed-a677-43d7aa86763b","name":"panel_4","type":"visualization"}],"type":"dashboard","updated_at":"2023-02-26T23:44:09.855Z","version":"WzczLDdd"}', + }, + { + body: '{"exportedCount":9,"missingRefCount":0,"missingReferences":[]}', + }, + ], + }, + ], + }, + records: 6, +}; diff --git a/public/components/integrations/components/available_integration_card_view.tsx b/public/components/integrations/components/available_integration_card_view.tsx index 4f62c3c72d..e6c29c6e1b 100644 --- a/public/components/integrations/components/available_integration_card_view.tsx +++ b/public/components/integrations/components/available_integration_card_view.tsx @@ -13,8 +13,6 @@ import { import { INTEGRATIONS_BASE } from '../../../../common/constants/shared'; export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardViewProps) { - const rowNumber = _.ceil(props.records / 5); - const getImage = (url?: string) => { let optionalImg; if (url) { From 372cac709707bac96ea7b8eb95b7633efd1335bf Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Tue, 30 May 2023 10:22:55 -0400 Subject: [PATCH 090/190] fix up the testing name Signed-off-by: Derek Ho --- .../available_integration_card_view.test.tsx.snap | 2 +- .../__tests__/available_integration_card_view.test.tsx | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/public/components/integrations/components/__tests__/__snapshots__/available_integration_card_view.test.tsx.snap b/public/components/integrations/components/__tests__/__snapshots__/available_integration_card_view.test.tsx.snap index 1a95b6e285..c918798d89 100644 --- a/public/components/integrations/components/__tests__/__snapshots__/available_integration_card_view.test.tsx.snap +++ b/public/components/integrations/components/__tests__/__snapshots__/available_integration_card_view.test.tsx.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Integration Header Test Renders integration header as expected 1`] = ` +exports[`Available Integration Card View Test Renders nginx integration card view using dummy data 1`] = ` Array [ { +describe('Available Integration Card View Test', () => { configure({ adapter: new Adapter() }); - it('Renders integration header as expected', async () => { + it('Renders nginx integration card view using dummy data', async () => { const wrapper = mount(AvailableIntegrationsCardView(data)); await waitFor(() => { From a350aec25b1170607d7313b55780a2c57c42da62 Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Tue, 30 May 2023 10:55:36 -0400 Subject: [PATCH 091/190] fix up table view and add a test Signed-off-by: Derek Ho --- ...lable_integration_table_view.test.tsx.snap | 1552 +++++++++++++++++ .../available_integration_card_view.test.tsx | 4 +- .../available_integration_table_view.test.tsx | 22 + .../components/__tests__/testing_constants.ts | 104 +- .../available_integration_overview_page.tsx | 12 +- .../available_integration_table.tsx | 8 +- 6 files changed, 1689 insertions(+), 13 deletions(-) create mode 100644 public/components/integrations/components/__tests__/__snapshots__/available_integration_table_view.test.tsx.snap create mode 100644 public/components/integrations/components/__tests__/available_integration_table_view.test.tsx diff --git a/public/components/integrations/components/__tests__/__snapshots__/available_integration_table_view.test.tsx.snap b/public/components/integrations/components/__tests__/__snapshots__/available_integration_table_view.test.tsx.snap new file mode 100644 index 0000000000..929c1c7c1b --- /dev/null +++ b/public/components/integrations/components/__tests__/__snapshots__/available_integration_table_view.test.tsx.snap @@ -0,0 +1,1552 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Available Integration Table View Test Renders nginx integration table view using dummy data 1`] = ` + + +
+ +
+ +

+ Availble Integrations +

+
+
+
+ +
+ + = 300 and event.domain:nginx.access\\\\\\",\\\\n \\\\\\"language\\\\\\": \\\\\\"kuery\\\\\\"\\\\n },\\\\n \\\\\\"version\\\\\\": true,\\\\n \\\\\\"highlight\\\\\\": {\\\\n \\\\\\"post_tags\\\\\\": [\\\\n \\\\\\"@/kibana-highlighted-field@\\\\\\"\\\\n ],\\\\n \\\\\\"fields\\\\\\": {\\\\n \\\\\\"*\\\\\\": {}\\\\n },\\\\n \\\\\\"pre_tags\\\\\\": [\\\\n \\\\\\"@kibana-highlighted-field@\\\\\\"\\\\n ],\\\\n \\\\\\"require_field_match\\\\\\": false,\\\\n \\\\\\"fragment_size\\\\\\": 2147483647\\\\n },\\\\n \\\\\\"filter\\\\\\": [],\\\\n \\\\\\"indexRefName\\\\\\": \\\\\\"kibanaSavedObjectMeta.searchSourceJSON.index\\\\\\"\\\\n}\\"},\\"sort\\":[[\\"@timestamp\\",\\"desc\\"]],\\"title\\":\\"[NGINX Core Logs 1.0] Nginx Error Logs\\",\\"version\\":1},\\"id\\":\\"9f820fbe-ddde-43a2-9402-30bd295c97f6\\",\\"migrationVersion\\":{\\"search\\":\\"7.9.3\\"},\\"references\\":[{\\"id\\":\\"47892350-b495-11ed-af0a-cf5c93b5a3b6\\",\\"name\\":\\"kibanaSavedObjectMeta.searchSourceJSON.index\\",\\"type\\":\\"index-pattern\\"}],\\"type\\":\\"search\\",\\"updated_at\\":\\"2023-02-26T00:34:36.592Z\\",\\"version\\":\\"WzY0LDdd\\"}", + }, + Object { + "body": "{\\"attributes\\":{\\"description\\":\\"\\",\\"kibanaSavedObjectMeta\\":{\\"searchSourceJSON\\":\\"{\\\\\\"query\\\\\\":{\\\\\\"query\\\\\\":\\\\\\"\\\\\\",\\\\\\"language\\\\\\":\\\\\\"lucene\\\\\\"},\\\\\\"filter\\\\\\":[]}\\"},\\"savedSearchRefName\\":\\"search_0\\",\\"title\\":\\"[NGINX Core Logs 1.0] Errors over time\\",\\"uiStateJSON\\":\\"{}\\",\\"version\\":1,\\"visState\\":\\"{\\\\\\"title\\\\\\":\\\\\\"[NGINX Core Logs 1.0] Errors over time\\\\\\",\\\\\\"type\\\\\\":\\\\\\"histogram\\\\\\",\\\\\\"aggs\\\\\\":[{\\\\\\"id\\\\\\":\\\\\\"1\\\\\\",\\\\\\"enabled\\\\\\":true,\\\\\\"type\\\\\\":\\\\\\"count\\\\\\",\\\\\\"params\\\\\\":{},\\\\\\"schema\\\\\\":\\\\\\"metric\\\\\\"},{\\\\\\"id\\\\\\":\\\\\\"2\\\\\\",\\\\\\"enabled\\\\\\":true,\\\\\\"type\\\\\\":\\\\\\"date_histogram\\\\\\",\\\\\\"params\\\\\\":{\\\\\\"field\\\\\\":\\\\\\"@timestamp\\\\\\",\\\\\\"timeRange\\\\\\":{\\\\\\"from\\\\\\":\\\\\\"now-24h\\\\\\",\\\\\\"to\\\\\\":\\\\\\"now\\\\\\"},\\\\\\"useNormalizedOpenSearchInterval\\\\\\":true,\\\\\\"scaleMetricValues\\\\\\":false,\\\\\\"interval\\\\\\":\\\\\\"auto\\\\\\",\\\\\\"drop_partials\\\\\\":false,\\\\\\"min_doc_count\\\\\\":1,\\\\\\"extended_bounds\\\\\\":{}},\\\\\\"schema\\\\\\":\\\\\\"segment\\\\\\"}],\\\\\\"params\\\\\\":{\\\\\\"type\\\\\\":\\\\\\"histogram\\\\\\",\\\\\\"grid\\\\\\":{\\\\\\"categoryLines\\\\\\":false},\\\\\\"categoryAxes\\\\\\":[{\\\\\\"id\\\\\\":\\\\\\"CategoryAxis-1\\\\\\",\\\\\\"type\\\\\\":\\\\\\"category\\\\\\",\\\\\\"position\\\\\\":\\\\\\"bottom\\\\\\",\\\\\\"show\\\\\\":true,\\\\\\"style\\\\\\":{},\\\\\\"scale\\\\\\":{\\\\\\"type\\\\\\":\\\\\\"linear\\\\\\"},\\\\\\"labels\\\\\\":{\\\\\\"show\\\\\\":true,\\\\\\"filter\\\\\\":true,\\\\\\"truncate\\\\\\":100},\\\\\\"title\\\\\\":{}}],\\\\\\"valueAxes\\\\\\":[{\\\\\\"id\\\\\\":\\\\\\"ValueAxis-1\\\\\\",\\\\\\"name\\\\\\":\\\\\\"LeftAxis-1\\\\\\",\\\\\\"type\\\\\\":\\\\\\"value\\\\\\",\\\\\\"position\\\\\\":\\\\\\"left\\\\\\",\\\\\\"show\\\\\\":true,\\\\\\"style\\\\\\":{},\\\\\\"scale\\\\\\":{\\\\\\"type\\\\\\":\\\\\\"linear\\\\\\",\\\\\\"mode\\\\\\":\\\\\\"normal\\\\\\"},\\\\\\"labels\\\\\\":{\\\\\\"show\\\\\\":true,\\\\\\"rotate\\\\\\":0,\\\\\\"filter\\\\\\":false,\\\\\\"truncate\\\\\\":100},\\\\\\"title\\\\\\":{\\\\\\"text\\\\\\":\\\\\\"Count\\\\\\"}}],\\\\\\"seriesParams\\\\\\":[{\\\\\\"show\\\\\\":true,\\\\\\"type\\\\\\":\\\\\\"histogram\\\\\\",\\\\\\"mode\\\\\\":\\\\\\"stacked\\\\\\",\\\\\\"data\\\\\\":{\\\\\\"label\\\\\\":\\\\\\"Count\\\\\\",\\\\\\"id\\\\\\":\\\\\\"1\\\\\\"},\\\\\\"valueAxis\\\\\\":\\\\\\"ValueAxis-1\\\\\\",\\\\\\"drawLinesBetweenPoints\\\\\\":true,\\\\\\"lineWidth\\\\\\":2,\\\\\\"showCircles\\\\\\":true}],\\\\\\"addTooltip\\\\\\":true,\\\\\\"addLegend\\\\\\":true,\\\\\\"legendPosition\\\\\\":\\\\\\"right\\\\\\",\\\\\\"times\\\\\\":[],\\\\\\"addTimeMarker\\\\\\":false,\\\\\\"labels\\\\\\":{\\\\\\"show\\\\\\":false},\\\\\\"thresholdLine\\\\\\":{\\\\\\"show\\\\\\":false,\\\\\\"value\\\\\\":10,\\\\\\"width\\\\\\":1,\\\\\\"style\\\\\\":\\\\\\"full\\\\\\",\\\\\\"color\\\\\\":\\\\\\"#E7664C\\\\\\"}}}\\"},\\"id\\":\\"865e577b-634b-4a65-b9d6-7e324c395d18\\",\\"migrationVersion\\":{\\"visualization\\":\\"7.10.0\\"},\\"references\\":[{\\"id\\":\\"9f820fbe-ddde-43a2-9402-30bd295c97f6\\",\\"name\\":\\"search_0\\",\\"type\\":\\"search\\"}],\\"type\\":\\"visualization\\",\\"updated_at\\":\\"2023-02-26T00:34:36.592Z\\",\\"version\\":\\"WzY1LDdd\\"}", + }, + Object { + "body": "{\\"attributes\\":{\\"description\\":\\"\\",\\"kibanaSavedObjectMeta\\":{\\"searchSourceJSON\\":\\"{\\\\\\"query\\\\\\":{\\\\\\"query\\\\\\":\\\\\\"\\\\\\",\\\\\\"language\\\\\\":\\\\\\"kuery\\\\\\"},\\\\\\"filter\\\\\\":[]}\\"},\\"savedSearchRefName\\":\\"search_0\\",\\"title\\":\\"Top Paths\\",\\"uiStateJSON\\":\\"{}\\",\\"version\\":1,\\"visState\\":\\"{\\\\\\"title\\\\\\":\\\\\\"Top Paths\\\\\\",\\\\\\"type\\\\\\":\\\\\\"table\\\\\\",\\\\\\"aggs\\\\\\":[{\\\\\\"id\\\\\\":\\\\\\"1\\\\\\",\\\\\\"enabled\\\\\\":true,\\\\\\"type\\\\\\":\\\\\\"count\\\\\\",\\\\\\"params\\\\\\":{},\\\\\\"schema\\\\\\":\\\\\\"metric\\\\\\"},{\\\\\\"id\\\\\\":\\\\\\"2\\\\\\",\\\\\\"enabled\\\\\\":true,\\\\\\"type\\\\\\":\\\\\\"terms\\\\\\",\\\\\\"params\\\\\\":{\\\\\\"field\\\\\\":\\\\\\"http.url\\\\\\",\\\\\\"orderBy\\\\\\":\\\\\\"1\\\\\\",\\\\\\"order\\\\\\":\\\\\\"desc\\\\\\",\\\\\\"size\\\\\\":10,\\\\\\"otherBucket\\\\\\":false,\\\\\\"otherBucketLabel\\\\\\":\\\\\\"Other\\\\\\",\\\\\\"missingBucket\\\\\\":false,\\\\\\"missingBucketLabel\\\\\\":\\\\\\"Missing\\\\\\",\\\\\\"customLabel\\\\\\":\\\\\\"Paths\\\\\\"},\\\\\\"schema\\\\\\":\\\\\\"bucket\\\\\\"}],\\\\\\"params\\\\\\":{\\\\\\"perPage\\\\\\":10,\\\\\\"showPartialRows\\\\\\":false,\\\\\\"showMetricsAtAllLevels\\\\\\":false,\\\\\\"showTotal\\\\\\":false,\\\\\\"totalFunc\\\\\\":\\\\\\"sum\\\\\\",\\\\\\"percentageCol\\\\\\":\\\\\\"\\\\\\"}}\\"},\\"id\\":\\"dc1803f0-b478-11ed-9063-ebe46f9ac203\\",\\"migrationVersion\\":{\\"visualization\\":\\"7.10.0\\"},\\"references\\":[{\\"id\\":\\"d80e05b2-518c-4c3d-9651-4c9d8632dce4\\",\\"name\\":\\"search_0\\",\\"type\\":\\"search\\"}],\\"type\\":\\"visualization\\",\\"updated_at\\":\\"2023-02-26T00:34:36.592Z\\",\\"version\\":\\"WzY2LDdd\\"}", + }, + Object { + "body": "{\\"attributes\\":{\\"description\\":\\"\\",\\"kibanaSavedObjectMeta\\":{\\"searchSourceJSON\\":\\"{\\\\\\"query\\\\\\":{\\\\\\"query\\\\\\":\\\\\\"\\\\\\",\\\\\\"language\\\\\\":\\\\\\"kuery\\\\\\"},\\\\\\"filter\\\\\\":[]}\\"},\\"savedSearchRefName\\":\\"search_0\\",\\"title\\":\\"Data Volume\\",\\"uiStateJSON\\":\\"{}\\",\\"version\\":1,\\"visState\\":\\"{\\\\\\"title\\\\\\":\\\\\\"Data Volume\\\\\\",\\\\\\"type\\\\\\":\\\\\\"area\\\\\\",\\\\\\"aggs\\\\\\":[{\\\\\\"id\\\\\\":\\\\\\"1\\\\\\",\\\\\\"enabled\\\\\\":true,\\\\\\"type\\\\\\":\\\\\\"sum\\\\\\",\\\\\\"params\\\\\\":{\\\\\\"field\\\\\\":\\\\\\"http.response.bytes\\\\\\",\\\\\\"customLabel\\\\\\":\\\\\\"Response Bytes\\\\\\"},\\\\\\"schema\\\\\\":\\\\\\"metric\\\\\\"},{\\\\\\"id\\\\\\":\\\\\\"2\\\\\\",\\\\\\"enabled\\\\\\":true,\\\\\\"type\\\\\\":\\\\\\"date_histogram\\\\\\",\\\\\\"params\\\\\\":{\\\\\\"field\\\\\\":\\\\\\"observerTime\\\\\\",\\\\\\"timeRange\\\\\\":{\\\\\\"from\\\\\\":\\\\\\"now-15m\\\\\\",\\\\\\"to\\\\\\":\\\\\\"now\\\\\\"},\\\\\\"useNormalizedOpenSearchInterval\\\\\\":true,\\\\\\"scaleMetricValues\\\\\\":false,\\\\\\"interval\\\\\\":\\\\\\"auto\\\\\\",\\\\\\"drop_partials\\\\\\":false,\\\\\\"min_doc_count\\\\\\":1,\\\\\\"extended_bounds\\\\\\":{},\\\\\\"customLabel\\\\\\":\\\\\\"\\\\\\"},\\\\\\"schema\\\\\\":\\\\\\"segment\\\\\\"}],\\\\\\"params\\\\\\":{\\\\\\"type\\\\\\":\\\\\\"area\\\\\\",\\\\\\"grid\\\\\\":{\\\\\\"categoryLines\\\\\\":false},\\\\\\"categoryAxes\\\\\\":[{\\\\\\"id\\\\\\":\\\\\\"CategoryAxis-1\\\\\\",\\\\\\"type\\\\\\":\\\\\\"category\\\\\\",\\\\\\"position\\\\\\":\\\\\\"bottom\\\\\\",\\\\\\"show\\\\\\":true,\\\\\\"style\\\\\\":{},\\\\\\"scale\\\\\\":{\\\\\\"type\\\\\\":\\\\\\"linear\\\\\\"},\\\\\\"labels\\\\\\":{\\\\\\"show\\\\\\":true,\\\\\\"filter\\\\\\":true,\\\\\\"truncate\\\\\\":100},\\\\\\"title\\\\\\":{}}],\\\\\\"valueAxes\\\\\\":[{\\\\\\"id\\\\\\":\\\\\\"ValueAxis-1\\\\\\",\\\\\\"name\\\\\\":\\\\\\"LeftAxis-1\\\\\\",\\\\\\"type\\\\\\":\\\\\\"value\\\\\\",\\\\\\"position\\\\\\":\\\\\\"left\\\\\\",\\\\\\"show\\\\\\":true,\\\\\\"style\\\\\\":{},\\\\\\"scale\\\\\\":{\\\\\\"type\\\\\\":\\\\\\"linear\\\\\\",\\\\\\"mode\\\\\\":\\\\\\"normal\\\\\\"},\\\\\\"labels\\\\\\":{\\\\\\"show\\\\\\":true,\\\\\\"rotate\\\\\\":0,\\\\\\"filter\\\\\\":false,\\\\\\"truncate\\\\\\":100},\\\\\\"title\\\\\\":{\\\\\\"text\\\\\\":\\\\\\"Response Bytes\\\\\\"}}],\\\\\\"seriesParams\\\\\\":[{\\\\\\"show\\\\\\":true,\\\\\\"type\\\\\\":\\\\\\"area\\\\\\",\\\\\\"mode\\\\\\":\\\\\\"stacked\\\\\\",\\\\\\"data\\\\\\":{\\\\\\"label\\\\\\":\\\\\\"Response Bytes\\\\\\",\\\\\\"id\\\\\\":\\\\\\"1\\\\\\"},\\\\\\"drawLinesBetweenPoints\\\\\\":true,\\\\\\"lineWidth\\\\\\":2,\\\\\\"showCircles\\\\\\":true,\\\\\\"interpolate\\\\\\":\\\\\\"linear\\\\\\",\\\\\\"valueAxis\\\\\\":\\\\\\"ValueAxis-1\\\\\\"}],\\\\\\"addTooltip\\\\\\":true,\\\\\\"addLegend\\\\\\":true,\\\\\\"legendPosition\\\\\\":\\\\\\"right\\\\\\",\\\\\\"times\\\\\\":[],\\\\\\"addTimeMarker\\\\\\":false,\\\\\\"thresholdLine\\\\\\":{\\\\\\"show\\\\\\":false,\\\\\\"value\\\\\\":10,\\\\\\"width\\\\\\":1,\\\\\\"style\\\\\\":\\\\\\"full\\\\\\",\\\\\\"color\\\\\\":\\\\\\"#E7664C\\\\\\"},\\\\\\"labels\\\\\\":{}}}\\"},\\"id\\":\\"99acc580-b47a-11ed-9063-ebe46f9ac203\\",\\"migrationVersion\\":{\\"visualization\\":\\"7.10.0\\"},\\"references\\":[{\\"id\\":\\"d80e05b2-518c-4c3d-9651-4c9d8632dce4\\",\\"name\\":\\"search_0\\",\\"type\\":\\"search\\"}],\\"type\\":\\"visualization\\",\\"updated_at\\":\\"2023-02-26T00:34:36.592Z\\",\\"version\\":\\"WzY3LDdd\\"}", + }, + Object { + "body": "{\\"attributes\\":{\\"description\\":\\"requests per minute aggregation\\",\\"kibanaSavedObjectMeta\\":{\\"searchSourceJSON\\":\\"{\\\\\\"query\\\\\\":{\\\\\\"query\\\\\\":\\\\\\"\\\\\\",\\\\\\"language\\\\\\":\\\\\\"kuery\\\\\\"},\\\\\\"filter\\\\\\":[],\\\\\\"indexRefName\\\\\\":\\\\\\"kibanaSavedObjectMeta.searchSourceJSON.index\\\\\\"}\\"},\\"title\\":\\"Req-per-min\\",\\"uiStateJSON\\":\\"{}\\",\\"version\\":1,\\"visState\\":\\"{\\\\\\"title\\\\\\":\\\\\\"Req-per-min\\\\\\",\\\\\\"type\\\\\\":\\\\\\"table\\\\\\",\\\\\\"aggs\\\\\\":[{\\\\\\"id\\\\\\":\\\\\\"1\\\\\\",\\\\\\"enabled\\\\\\":true,\\\\\\"type\\\\\\":\\\\\\"moving_avg\\\\\\",\\\\\\"params\\\\\\":{\\\\\\"metricAgg\\\\\\":\\\\\\"custom\\\\\\",\\\\\\"customMetric\\\\\\":{\\\\\\"id\\\\\\":\\\\\\"1-metric\\\\\\",\\\\\\"enabled\\\\\\":true,\\\\\\"type\\\\\\":\\\\\\"count\\\\\\",\\\\\\"params\\\\\\":{}},\\\\\\"window\\\\\\":5,\\\\\\"script\\\\\\":\\\\\\"MovingFunctions.unweightedAvg(values)\\\\\\"},\\\\\\"schema\\\\\\":\\\\\\"metric\\\\\\"},{\\\\\\"id\\\\\\":\\\\\\"2\\\\\\",\\\\\\"enabled\\\\\\":true,\\\\\\"type\\\\\\":\\\\\\"date_histogram\\\\\\",\\\\\\"params\\\\\\":{\\\\\\"field\\\\\\":\\\\\\"@timestamp\\\\\\",\\\\\\"timeRange\\\\\\":{\\\\\\"from\\\\\\":\\\\\\"2023-02-24T17:25:00.000Z\\\\\\",\\\\\\"to\\\\\\":\\\\\\"2023-02-24T17:30:00.000Z\\\\\\"},\\\\\\"useNormalizedOpenSearchInterval\\\\\\":true,\\\\\\"scaleMetricValues\\\\\\":false,\\\\\\"interval\\\\\\":\\\\\\"m\\\\\\",\\\\\\"drop_partials\\\\\\":false,\\\\\\"min_doc_count\\\\\\":0,\\\\\\"extended_bounds\\\\\\":{},\\\\\\"customLabel\\\\\\":\\\\\\"Req/Min\\\\\\"},\\\\\\"schema\\\\\\":\\\\\\"bucket\\\\\\"}],\\\\\\"params\\\\\\":{\\\\\\"perPage\\\\\\":10,\\\\\\"showPartialRows\\\\\\":false,\\\\\\"showMetricsAtAllLevels\\\\\\":false,\\\\\\"showTotal\\\\\\":false,\\\\\\"totalFunc\\\\\\":\\\\\\"sum\\\\\\",\\\\\\"percentageCol\\\\\\":\\\\\\"\\\\\\"}}\\"},\\"id\\":\\"01ea64d0-b62f-11ed-a677-43d7aa86763b\\",\\"migrationVersion\\":{\\"visualization\\":\\"7.10.0\\"},\\"references\\":[{\\"id\\":\\"47892350-b495-11ed-af0a-cf5c93b5a3b6\\",\\"name\\":\\"kibanaSavedObjectMeta.searchSourceJSON.index\\",\\"type\\":\\"index-pattern\\"}],\\"type\\":\\"visualization\\",\\"updated_at\\":\\"2023-02-26T23:40:53.020Z\\",\\"version\\":\\"WzcyLDdd\\"}", + }, + Object { + "body": "{\\"attributes\\":{\\"description\\":\\"Nginx dashboard with basic Observability on access / error logs\\",\\"hits\\":0,\\"kibanaSavedObjectMeta\\":{\\"searchSourceJSON\\":\\"{\\\\\\"query\\\\\\":{\\\\\\"language\\\\\\":\\\\\\"kuery\\\\\\",\\\\\\"query\\\\\\":\\\\\\"\\\\\\"},\\\\\\"filter\\\\\\":[]}\\"},\\"optionsJSON\\":\\"{\\\\\\"hidePanelTitles\\\\\\":false,\\\\\\"useMargins\\\\\\":true}\\",\\"panelsJSON\\":\\"[{\\\\\\"version\\\\\\":\\\\\\"2.5.0\\\\\\",\\\\\\"gridData\\\\\\":{\\\\\\"h\\\\\\":8,\\\\\\"i\\\\\\":\\\\\\"1f31e50b-06e3-41e6-972e-e4e5fe1a9872\\\\\\",\\\\\\"w\\\\\\":48,\\\\\\"x\\\\\\":0,\\\\\\"y\\\\\\":0},\\\\\\"panelIndex\\\\\\":\\\\\\"1f31e50b-06e3-41e6-972e-e4e5fe1a9872\\\\\\",\\\\\\"embeddableConfig\\\\\\":{},\\\\\\"panelRefName\\\\\\":\\\\\\"panel_0\\\\\\"},{\\\\\\"version\\\\\\":\\\\\\"2.5.0\\\\\\",\\\\\\"gridData\\\\\\":{\\\\\\"h\\\\\\":9,\\\\\\"i\\\\\\":\\\\\\"d91a8da4-b34b-470a-aca6-9c76b47cd6fb\\\\\\",\\\\\\"w\\\\\\":24,\\\\\\"x\\\\\\":0,\\\\\\"y\\\\\\":8},\\\\\\"panelIndex\\\\\\":\\\\\\"d91a8da4-b34b-470a-aca6-9c76b47cd6fb\\\\\\",\\\\\\"embeddableConfig\\\\\\":{},\\\\\\"panelRefName\\\\\\":\\\\\\"panel_1\\\\\\"},{\\\\\\"version\\\\\\":\\\\\\"2.5.0\\\\\\",\\\\\\"gridData\\\\\\":{\\\\\\"h\\\\\\":15,\\\\\\"i\\\\\\":\\\\\\"27149e5a-3a77-4f3c-800e-8a160c3765f4\\\\\\",\\\\\\"w\\\\\\":24,\\\\\\"x\\\\\\":24,\\\\\\"y\\\\\\":8},\\\\\\"panelIndex\\\\\\":\\\\\\"27149e5a-3a77-4f3c-800e-8a160c3765f4\\\\\\",\\\\\\"embeddableConfig\\\\\\":{},\\\\\\"panelRefName\\\\\\":\\\\\\"panel_2\\\\\\"},{\\\\\\"version\\\\\\":\\\\\\"2.5.0\\\\\\",\\\\\\"gridData\\\\\\":{\\\\\\"x\\\\\\":0,\\\\\\"y\\\\\\":17,\\\\\\"w\\\\\\":24,\\\\\\"h\\\\\\":15,\\\\\\"i\\\\\\":\\\\\\"4d8c2aa7-159c-4a1a-80ff-00a9299056ce\\\\\\"},\\\\\\"panelIndex\\\\\\":\\\\\\"4d8c2aa7-159c-4a1a-80ff-00a9299056ce\\\\\\",\\\\\\"embeddableConfig\\\\\\":{},\\\\\\"panelRefName\\\\\\":\\\\\\"panel_3\\\\\\"},{\\\\\\"version\\\\\\":\\\\\\"2.5.0\\\\\\",\\\\\\"gridData\\\\\\":{\\\\\\"x\\\\\\":24,\\\\\\"y\\\\\\":23,\\\\\\"w\\\\\\":24,\\\\\\"h\\\\\\":15,\\\\\\"i\\\\\\":\\\\\\"800b7f19-f50c-417f-8987-21b930531cbe\\\\\\"},\\\\\\"panelIndex\\\\\\":\\\\\\"800b7f19-f50c-417f-8987-21b930531cbe\\\\\\",\\\\\\"embeddableConfig\\\\\\":{},\\\\\\"panelRefName\\\\\\":\\\\\\"panel_4\\\\\\"}]\\",\\"timeRestore\\":false,\\"title\\":\\"[NGINX Core Logs 1.0] Overview\\",\\"version\\":1},\\"id\\":\\"96847220-5261-44d0-89b4-65f3a659f13a\\",\\"migrationVersion\\":{\\"dashboard\\":\\"7.9.3\\"},\\"references\\":[{\\"id\\":\\"3b49a65d-54d8-483d-a8f0-3d7c855e1ecf\\",\\"name\\":\\"panel_0\\",\\"type\\":\\"visualization\\"},{\\"id\\":\\"865e577b-634b-4a65-b9d6-7e324c395d18\\",\\"name\\":\\"panel_1\\",\\"type\\":\\"visualization\\"},{\\"id\\":\\"dc1803f0-b478-11ed-9063-ebe46f9ac203\\",\\"name\\":\\"panel_2\\",\\"type\\":\\"visualization\\"},{\\"id\\":\\"99acc580-b47a-11ed-9063-ebe46f9ac203\\",\\"name\\":\\"panel_3\\",\\"type\\":\\"visualization\\"},{\\"id\\":\\"01ea64d0-b62f-11ed-a677-43d7aa86763b\\",\\"name\\":\\"panel_4\\",\\"type\\":\\"visualization\\"}],\\"type\\":\\"dashboard\\",\\"updated_at\\":\\"2023-02-26T23:44:09.855Z\\",\\"version\\":\\"WzczLDdd\\"}", + }, + Object { + "body": "{\\"exportedCount\\":9,\\"missingRefCount\\":0,\\"missingReferences\\":[]}", + }, + ], + "integrationType": "logs", + "name": "nginx", + "statics": Object { + "assets": Object { + "/logo": Object { + "annotation": "NginX Logo", + "data": "iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAACXBIWXMAAAsSAAALEgHS3X78AAAfBklEQVR42u1dDYxc1XWe2dkNfzFEAVxh8LyZtU0LhoTYnvtmAacINWmJm+CmiRKoiBLRqH/8qE3URm2pLBqVUsC77834L5CSJqKhblOaQlMUEaKmSdSgNCSIokJL25QSURMiU6EAM7O7Pffcc++7b7y217vz3u7M+450NG9nZ3dm7rv3u+d85+eWSpCRlSAOS7Uo5Gv9GERhxf0uCjcHkXqEXvNoLVZvsc/XIlXRf2euG6Va3MRAQiDDtfCVXuAOBPoW/lm0yKfpsVvfPzWvlV7fo9fF9PzahYCAgIKAIMTAQiCrWap7L9cLt+Qt9jH6eYwX9MxlY/TzDaQvTN596Twt6Hm61gu/p6/1c3R9iK5vrrVURUCgHMjfW2DZGG/HQEMgq3rXj8Jy366/gxby4/VP0cLf09QLvUvPzemFz0AQqzn9XK3dnNevoevv0fPvSVsDqmzdggDWAAQyFH7+xbTwv1jfRwt73xQtdqUX/qxZ9BoAlAaBOXPNz81qINCv1UrXD9JrLgE/AIEMq5+vd/1YzWpz3+34kVv886JzfRYBuwb1A5eCH4BAhtzPd+a+7PT+wk9rpK0BAwwBX5NbAH4AAhl6P98t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+FDwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAisoPwM+HQArKD8DPh0AKyA/Az4dACscPwM+HQArJD8DPh0AKyg/Az4dACsgPwM+HQArHD8DPh0AKyQ/Az4dACsoPwM+HQArMD8DPh0CKyA8EUcimPvx8CKSI/MB+MvX3T7GfX4OfD4EUih/YTAv7EbICHqWFfjH8/GLK/wNkczJMJgkn1AAAAABJRU5ErkJggg==", + "mimeType": "image/png", + }, + }, + "mapping": Object { + "logo": "/logo", + }, + }, + "version": "1.0.0", + }, + ] + } + loading={false} + pagination={ + Object { + "initialPageSize": 10, + "pageSizeOptions": Array [ + 5, + 10, + 15, + ], + } + } + responsive={true} + search={ + Object { + "box": Object { + "incremental": true, + }, + "filters": Array [ + Object { + "field": "type", + "multiSelect": false, + "name": "Type", + "options": Array [ + Object { + "name": "Visualization", + "value": "Visualization", + "view": "Visualization", + }, + Object { + "name": "Query", + "value": "Query", + "view": "Query", + }, + Object { + "name": "Metric", + "value": "Metric", + "view": "Metric", + }, + ], + "type": "field_value_selection", + }, + ], + } + } + tableLayout="auto" + > +
+ + +
+ +
+ + + +
+
+ + + + +
+ + + + + +
+
+
+
+
+
+
+
+
+ +
+ + +
+ + + Type + + } + closePopover={[Function]} + display="inlineBlock" + hasArrow={true} + id="field_value_selection_0" + isOpen={false} + ownFocus={true} + panelClassName="euiFilterGroup__popoverPanel" + panelPaddingSize="none" + > +
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+ +
+ + = 300 and event.domain:nginx.access\\\\\\",\\\\n \\\\\\"language\\\\\\": \\\\\\"kuery\\\\\\"\\\\n },\\\\n \\\\\\"version\\\\\\": true,\\\\n \\\\\\"highlight\\\\\\": {\\\\n \\\\\\"post_tags\\\\\\": [\\\\n \\\\\\"@/kibana-highlighted-field@\\\\\\"\\\\n ],\\\\n \\\\\\"fields\\\\\\": {\\\\n \\\\\\"*\\\\\\": {}\\\\n },\\\\n \\\\\\"pre_tags\\\\\\": [\\\\n \\\\\\"@kibana-highlighted-field@\\\\\\"\\\\n ],\\\\n \\\\\\"require_field_match\\\\\\": false,\\\\n \\\\\\"fragment_size\\\\\\": 2147483647\\\\n },\\\\n \\\\\\"filter\\\\\\": [],\\\\n \\\\\\"indexRefName\\\\\\": \\\\\\"kibanaSavedObjectMeta.searchSourceJSON.index\\\\\\"\\\\n}\\"},\\"sort\\":[[\\"@timestamp\\",\\"desc\\"]],\\"title\\":\\"[NGINX Core Logs 1.0] Nginx Error Logs\\",\\"version\\":1},\\"id\\":\\"9f820fbe-ddde-43a2-9402-30bd295c97f6\\",\\"migrationVersion\\":{\\"search\\":\\"7.9.3\\"},\\"references\\":[{\\"id\\":\\"47892350-b495-11ed-af0a-cf5c93b5a3b6\\",\\"name\\":\\"kibanaSavedObjectMeta.searchSourceJSON.index\\",\\"type\\":\\"index-pattern\\"}],\\"type\\":\\"search\\",\\"updated_at\\":\\"2023-02-26T00:34:36.592Z\\",\\"version\\":\\"WzY0LDdd\\"}", + }, + Object { + "body": "{\\"attributes\\":{\\"description\\":\\"\\",\\"kibanaSavedObjectMeta\\":{\\"searchSourceJSON\\":\\"{\\\\\\"query\\\\\\":{\\\\\\"query\\\\\\":\\\\\\"\\\\\\",\\\\\\"language\\\\\\":\\\\\\"lucene\\\\\\"},\\\\\\"filter\\\\\\":[]}\\"},\\"savedSearchRefName\\":\\"search_0\\",\\"title\\":\\"[NGINX Core Logs 1.0] Errors over time\\",\\"uiStateJSON\\":\\"{}\\",\\"version\\":1,\\"visState\\":\\"{\\\\\\"title\\\\\\":\\\\\\"[NGINX Core Logs 1.0] Errors over time\\\\\\",\\\\\\"type\\\\\\":\\\\\\"histogram\\\\\\",\\\\\\"aggs\\\\\\":[{\\\\\\"id\\\\\\":\\\\\\"1\\\\\\",\\\\\\"enabled\\\\\\":true,\\\\\\"type\\\\\\":\\\\\\"count\\\\\\",\\\\\\"params\\\\\\":{},\\\\\\"schema\\\\\\":\\\\\\"metric\\\\\\"},{\\\\\\"id\\\\\\":\\\\\\"2\\\\\\",\\\\\\"enabled\\\\\\":true,\\\\\\"type\\\\\\":\\\\\\"date_histogram\\\\\\",\\\\\\"params\\\\\\":{\\\\\\"field\\\\\\":\\\\\\"@timestamp\\\\\\",\\\\\\"timeRange\\\\\\":{\\\\\\"from\\\\\\":\\\\\\"now-24h\\\\\\",\\\\\\"to\\\\\\":\\\\\\"now\\\\\\"},\\\\\\"useNormalizedOpenSearchInterval\\\\\\":true,\\\\\\"scaleMetricValues\\\\\\":false,\\\\\\"interval\\\\\\":\\\\\\"auto\\\\\\",\\\\\\"drop_partials\\\\\\":false,\\\\\\"min_doc_count\\\\\\":1,\\\\\\"extended_bounds\\\\\\":{}},\\\\\\"schema\\\\\\":\\\\\\"segment\\\\\\"}],\\\\\\"params\\\\\\":{\\\\\\"type\\\\\\":\\\\\\"histogram\\\\\\",\\\\\\"grid\\\\\\":{\\\\\\"categoryLines\\\\\\":false},\\\\\\"categoryAxes\\\\\\":[{\\\\\\"id\\\\\\":\\\\\\"CategoryAxis-1\\\\\\",\\\\\\"type\\\\\\":\\\\\\"category\\\\\\",\\\\\\"position\\\\\\":\\\\\\"bottom\\\\\\",\\\\\\"show\\\\\\":true,\\\\\\"style\\\\\\":{},\\\\\\"scale\\\\\\":{\\\\\\"type\\\\\\":\\\\\\"linear\\\\\\"},\\\\\\"labels\\\\\\":{\\\\\\"show\\\\\\":true,\\\\\\"filter\\\\\\":true,\\\\\\"truncate\\\\\\":100},\\\\\\"title\\\\\\":{}}],\\\\\\"valueAxes\\\\\\":[{\\\\\\"id\\\\\\":\\\\\\"ValueAxis-1\\\\\\",\\\\\\"name\\\\\\":\\\\\\"LeftAxis-1\\\\\\",\\\\\\"type\\\\\\":\\\\\\"value\\\\\\",\\\\\\"position\\\\\\":\\\\\\"left\\\\\\",\\\\\\"show\\\\\\":true,\\\\\\"style\\\\\\":{},\\\\\\"scale\\\\\\":{\\\\\\"type\\\\\\":\\\\\\"linear\\\\\\",\\\\\\"mode\\\\\\":\\\\\\"normal\\\\\\"},\\\\\\"labels\\\\\\":{\\\\\\"show\\\\\\":true,\\\\\\"rotate\\\\\\":0,\\\\\\"filter\\\\\\":false,\\\\\\"truncate\\\\\\":100},\\\\\\"title\\\\\\":{\\\\\\"text\\\\\\":\\\\\\"Count\\\\\\"}}],\\\\\\"seriesParams\\\\\\":[{\\\\\\"show\\\\\\":true,\\\\\\"type\\\\\\":\\\\\\"histogram\\\\\\",\\\\\\"mode\\\\\\":\\\\\\"stacked\\\\\\",\\\\\\"data\\\\\\":{\\\\\\"label\\\\\\":\\\\\\"Count\\\\\\",\\\\\\"id\\\\\\":\\\\\\"1\\\\\\"},\\\\\\"valueAxis\\\\\\":\\\\\\"ValueAxis-1\\\\\\",\\\\\\"drawLinesBetweenPoints\\\\\\":true,\\\\\\"lineWidth\\\\\\":2,\\\\\\"showCircles\\\\\\":true}],\\\\\\"addTooltip\\\\\\":true,\\\\\\"addLegend\\\\\\":true,\\\\\\"legendPosition\\\\\\":\\\\\\"right\\\\\\",\\\\\\"times\\\\\\":[],\\\\\\"addTimeMarker\\\\\\":false,\\\\\\"labels\\\\\\":{\\\\\\"show\\\\\\":false},\\\\\\"thresholdLine\\\\\\":{\\\\\\"show\\\\\\":false,\\\\\\"value\\\\\\":10,\\\\\\"width\\\\\\":1,\\\\\\"style\\\\\\":\\\\\\"full\\\\\\",\\\\\\"color\\\\\\":\\\\\\"#E7664C\\\\\\"}}}\\"},\\"id\\":\\"865e577b-634b-4a65-b9d6-7e324c395d18\\",\\"migrationVersion\\":{\\"visualization\\":\\"7.10.0\\"},\\"references\\":[{\\"id\\":\\"9f820fbe-ddde-43a2-9402-30bd295c97f6\\",\\"name\\":\\"search_0\\",\\"type\\":\\"search\\"}],\\"type\\":\\"visualization\\",\\"updated_at\\":\\"2023-02-26T00:34:36.592Z\\",\\"version\\":\\"WzY1LDdd\\"}", + }, + Object { + "body": "{\\"attributes\\":{\\"description\\":\\"\\",\\"kibanaSavedObjectMeta\\":{\\"searchSourceJSON\\":\\"{\\\\\\"query\\\\\\":{\\\\\\"query\\\\\\":\\\\\\"\\\\\\",\\\\\\"language\\\\\\":\\\\\\"kuery\\\\\\"},\\\\\\"filter\\\\\\":[]}\\"},\\"savedSearchRefName\\":\\"search_0\\",\\"title\\":\\"Top Paths\\",\\"uiStateJSON\\":\\"{}\\",\\"version\\":1,\\"visState\\":\\"{\\\\\\"title\\\\\\":\\\\\\"Top Paths\\\\\\",\\\\\\"type\\\\\\":\\\\\\"table\\\\\\",\\\\\\"aggs\\\\\\":[{\\\\\\"id\\\\\\":\\\\\\"1\\\\\\",\\\\\\"enabled\\\\\\":true,\\\\\\"type\\\\\\":\\\\\\"count\\\\\\",\\\\\\"params\\\\\\":{},\\\\\\"schema\\\\\\":\\\\\\"metric\\\\\\"},{\\\\\\"id\\\\\\":\\\\\\"2\\\\\\",\\\\\\"enabled\\\\\\":true,\\\\\\"type\\\\\\":\\\\\\"terms\\\\\\",\\\\\\"params\\\\\\":{\\\\\\"field\\\\\\":\\\\\\"http.url\\\\\\",\\\\\\"orderBy\\\\\\":\\\\\\"1\\\\\\",\\\\\\"order\\\\\\":\\\\\\"desc\\\\\\",\\\\\\"size\\\\\\":10,\\\\\\"otherBucket\\\\\\":false,\\\\\\"otherBucketLabel\\\\\\":\\\\\\"Other\\\\\\",\\\\\\"missingBucket\\\\\\":false,\\\\\\"missingBucketLabel\\\\\\":\\\\\\"Missing\\\\\\",\\\\\\"customLabel\\\\\\":\\\\\\"Paths\\\\\\"},\\\\\\"schema\\\\\\":\\\\\\"bucket\\\\\\"}],\\\\\\"params\\\\\\":{\\\\\\"perPage\\\\\\":10,\\\\\\"showPartialRows\\\\\\":false,\\\\\\"showMetricsAtAllLevels\\\\\\":false,\\\\\\"showTotal\\\\\\":false,\\\\\\"totalFunc\\\\\\":\\\\\\"sum\\\\\\",\\\\\\"percentageCol\\\\\\":\\\\\\"\\\\\\"}}\\"},\\"id\\":\\"dc1803f0-b478-11ed-9063-ebe46f9ac203\\",\\"migrationVersion\\":{\\"visualization\\":\\"7.10.0\\"},\\"references\\":[{\\"id\\":\\"d80e05b2-518c-4c3d-9651-4c9d8632dce4\\",\\"name\\":\\"search_0\\",\\"type\\":\\"search\\"}],\\"type\\":\\"visualization\\",\\"updated_at\\":\\"2023-02-26T00:34:36.592Z\\",\\"version\\":\\"WzY2LDdd\\"}", + }, + Object { + "body": "{\\"attributes\\":{\\"description\\":\\"\\",\\"kibanaSavedObjectMeta\\":{\\"searchSourceJSON\\":\\"{\\\\\\"query\\\\\\":{\\\\\\"query\\\\\\":\\\\\\"\\\\\\",\\\\\\"language\\\\\\":\\\\\\"kuery\\\\\\"},\\\\\\"filter\\\\\\":[]}\\"},\\"savedSearchRefName\\":\\"search_0\\",\\"title\\":\\"Data Volume\\",\\"uiStateJSON\\":\\"{}\\",\\"version\\":1,\\"visState\\":\\"{\\\\\\"title\\\\\\":\\\\\\"Data Volume\\\\\\",\\\\\\"type\\\\\\":\\\\\\"area\\\\\\",\\\\\\"aggs\\\\\\":[{\\\\\\"id\\\\\\":\\\\\\"1\\\\\\",\\\\\\"enabled\\\\\\":true,\\\\\\"type\\\\\\":\\\\\\"sum\\\\\\",\\\\\\"params\\\\\\":{\\\\\\"field\\\\\\":\\\\\\"http.response.bytes\\\\\\",\\\\\\"customLabel\\\\\\":\\\\\\"Response Bytes\\\\\\"},\\\\\\"schema\\\\\\":\\\\\\"metric\\\\\\"},{\\\\\\"id\\\\\\":\\\\\\"2\\\\\\",\\\\\\"enabled\\\\\\":true,\\\\\\"type\\\\\\":\\\\\\"date_histogram\\\\\\",\\\\\\"params\\\\\\":{\\\\\\"field\\\\\\":\\\\\\"observerTime\\\\\\",\\\\\\"timeRange\\\\\\":{\\\\\\"from\\\\\\":\\\\\\"now-15m\\\\\\",\\\\\\"to\\\\\\":\\\\\\"now\\\\\\"},\\\\\\"useNormalizedOpenSearchInterval\\\\\\":true,\\\\\\"scaleMetricValues\\\\\\":false,\\\\\\"interval\\\\\\":\\\\\\"auto\\\\\\",\\\\\\"drop_partials\\\\\\":false,\\\\\\"min_doc_count\\\\\\":1,\\\\\\"extended_bounds\\\\\\":{},\\\\\\"customLabel\\\\\\":\\\\\\"\\\\\\"},\\\\\\"schema\\\\\\":\\\\\\"segment\\\\\\"}],\\\\\\"params\\\\\\":{\\\\\\"type\\\\\\":\\\\\\"area\\\\\\",\\\\\\"grid\\\\\\":{\\\\\\"categoryLines\\\\\\":false},\\\\\\"categoryAxes\\\\\\":[{\\\\\\"id\\\\\\":\\\\\\"CategoryAxis-1\\\\\\",\\\\\\"type\\\\\\":\\\\\\"category\\\\\\",\\\\\\"position\\\\\\":\\\\\\"bottom\\\\\\",\\\\\\"show\\\\\\":true,\\\\\\"style\\\\\\":{},\\\\\\"scale\\\\\\":{\\\\\\"type\\\\\\":\\\\\\"linear\\\\\\"},\\\\\\"labels\\\\\\":{\\\\\\"show\\\\\\":true,\\\\\\"filter\\\\\\":true,\\\\\\"truncate\\\\\\":100},\\\\\\"title\\\\\\":{}}],\\\\\\"valueAxes\\\\\\":[{\\\\\\"id\\\\\\":\\\\\\"ValueAxis-1\\\\\\",\\\\\\"name\\\\\\":\\\\\\"LeftAxis-1\\\\\\",\\\\\\"type\\\\\\":\\\\\\"value\\\\\\",\\\\\\"position\\\\\\":\\\\\\"left\\\\\\",\\\\\\"show\\\\\\":true,\\\\\\"style\\\\\\":{},\\\\\\"scale\\\\\\":{\\\\\\"type\\\\\\":\\\\\\"linear\\\\\\",\\\\\\"mode\\\\\\":\\\\\\"normal\\\\\\"},\\\\\\"labels\\\\\\":{\\\\\\"show\\\\\\":true,\\\\\\"rotate\\\\\\":0,\\\\\\"filter\\\\\\":false,\\\\\\"truncate\\\\\\":100},\\\\\\"title\\\\\\":{\\\\\\"text\\\\\\":\\\\\\"Response Bytes\\\\\\"}}],\\\\\\"seriesParams\\\\\\":[{\\\\\\"show\\\\\\":true,\\\\\\"type\\\\\\":\\\\\\"area\\\\\\",\\\\\\"mode\\\\\\":\\\\\\"stacked\\\\\\",\\\\\\"data\\\\\\":{\\\\\\"label\\\\\\":\\\\\\"Response Bytes\\\\\\",\\\\\\"id\\\\\\":\\\\\\"1\\\\\\"},\\\\\\"drawLinesBetweenPoints\\\\\\":true,\\\\\\"lineWidth\\\\\\":2,\\\\\\"showCircles\\\\\\":true,\\\\\\"interpolate\\\\\\":\\\\\\"linear\\\\\\",\\\\\\"valueAxis\\\\\\":\\\\\\"ValueAxis-1\\\\\\"}],\\\\\\"addTooltip\\\\\\":true,\\\\\\"addLegend\\\\\\":true,\\\\\\"legendPosition\\\\\\":\\\\\\"right\\\\\\",\\\\\\"times\\\\\\":[],\\\\\\"addTimeMarker\\\\\\":false,\\\\\\"thresholdLine\\\\\\":{\\\\\\"show\\\\\\":false,\\\\\\"value\\\\\\":10,\\\\\\"width\\\\\\":1,\\\\\\"style\\\\\\":\\\\\\"full\\\\\\",\\\\\\"color\\\\\\":\\\\\\"#E7664C\\\\\\"},\\\\\\"labels\\\\\\":{}}}\\"},\\"id\\":\\"99acc580-b47a-11ed-9063-ebe46f9ac203\\",\\"migrationVersion\\":{\\"visualization\\":\\"7.10.0\\"},\\"references\\":[{\\"id\\":\\"d80e05b2-518c-4c3d-9651-4c9d8632dce4\\",\\"name\\":\\"search_0\\",\\"type\\":\\"search\\"}],\\"type\\":\\"visualization\\",\\"updated_at\\":\\"2023-02-26T00:34:36.592Z\\",\\"version\\":\\"WzY3LDdd\\"}", + }, + Object { + "body": "{\\"attributes\\":{\\"description\\":\\"requests per minute aggregation\\",\\"kibanaSavedObjectMeta\\":{\\"searchSourceJSON\\":\\"{\\\\\\"query\\\\\\":{\\\\\\"query\\\\\\":\\\\\\"\\\\\\",\\\\\\"language\\\\\\":\\\\\\"kuery\\\\\\"},\\\\\\"filter\\\\\\":[],\\\\\\"indexRefName\\\\\\":\\\\\\"kibanaSavedObjectMeta.searchSourceJSON.index\\\\\\"}\\"},\\"title\\":\\"Req-per-min\\",\\"uiStateJSON\\":\\"{}\\",\\"version\\":1,\\"visState\\":\\"{\\\\\\"title\\\\\\":\\\\\\"Req-per-min\\\\\\",\\\\\\"type\\\\\\":\\\\\\"table\\\\\\",\\\\\\"aggs\\\\\\":[{\\\\\\"id\\\\\\":\\\\\\"1\\\\\\",\\\\\\"enabled\\\\\\":true,\\\\\\"type\\\\\\":\\\\\\"moving_avg\\\\\\",\\\\\\"params\\\\\\":{\\\\\\"metricAgg\\\\\\":\\\\\\"custom\\\\\\",\\\\\\"customMetric\\\\\\":{\\\\\\"id\\\\\\":\\\\\\"1-metric\\\\\\",\\\\\\"enabled\\\\\\":true,\\\\\\"type\\\\\\":\\\\\\"count\\\\\\",\\\\\\"params\\\\\\":{}},\\\\\\"window\\\\\\":5,\\\\\\"script\\\\\\":\\\\\\"MovingFunctions.unweightedAvg(values)\\\\\\"},\\\\\\"schema\\\\\\":\\\\\\"metric\\\\\\"},{\\\\\\"id\\\\\\":\\\\\\"2\\\\\\",\\\\\\"enabled\\\\\\":true,\\\\\\"type\\\\\\":\\\\\\"date_histogram\\\\\\",\\\\\\"params\\\\\\":{\\\\\\"field\\\\\\":\\\\\\"@timestamp\\\\\\",\\\\\\"timeRange\\\\\\":{\\\\\\"from\\\\\\":\\\\\\"2023-02-24T17:25:00.000Z\\\\\\",\\\\\\"to\\\\\\":\\\\\\"2023-02-24T17:30:00.000Z\\\\\\"},\\\\\\"useNormalizedOpenSearchInterval\\\\\\":true,\\\\\\"scaleMetricValues\\\\\\":false,\\\\\\"interval\\\\\\":\\\\\\"m\\\\\\",\\\\\\"drop_partials\\\\\\":false,\\\\\\"min_doc_count\\\\\\":0,\\\\\\"extended_bounds\\\\\\":{},\\\\\\"customLabel\\\\\\":\\\\\\"Req/Min\\\\\\"},\\\\\\"schema\\\\\\":\\\\\\"bucket\\\\\\"}],\\\\\\"params\\\\\\":{\\\\\\"perPage\\\\\\":10,\\\\\\"showPartialRows\\\\\\":false,\\\\\\"showMetricsAtAllLevels\\\\\\":false,\\\\\\"showTotal\\\\\\":false,\\\\\\"totalFunc\\\\\\":\\\\\\"sum\\\\\\",\\\\\\"percentageCol\\\\\\":\\\\\\"\\\\\\"}}\\"},\\"id\\":\\"01ea64d0-b62f-11ed-a677-43d7aa86763b\\",\\"migrationVersion\\":{\\"visualization\\":\\"7.10.0\\"},\\"references\\":[{\\"id\\":\\"47892350-b495-11ed-af0a-cf5c93b5a3b6\\",\\"name\\":\\"kibanaSavedObjectMeta.searchSourceJSON.index\\",\\"type\\":\\"index-pattern\\"}],\\"type\\":\\"visualization\\",\\"updated_at\\":\\"2023-02-26T23:40:53.020Z\\",\\"version\\":\\"WzcyLDdd\\"}", + }, + Object { + "body": "{\\"attributes\\":{\\"description\\":\\"Nginx dashboard with basic Observability on access / error logs\\",\\"hits\\":0,\\"kibanaSavedObjectMeta\\":{\\"searchSourceJSON\\":\\"{\\\\\\"query\\\\\\":{\\\\\\"language\\\\\\":\\\\\\"kuery\\\\\\",\\\\\\"query\\\\\\":\\\\\\"\\\\\\"},\\\\\\"filter\\\\\\":[]}\\"},\\"optionsJSON\\":\\"{\\\\\\"hidePanelTitles\\\\\\":false,\\\\\\"useMargins\\\\\\":true}\\",\\"panelsJSON\\":\\"[{\\\\\\"version\\\\\\":\\\\\\"2.5.0\\\\\\",\\\\\\"gridData\\\\\\":{\\\\\\"h\\\\\\":8,\\\\\\"i\\\\\\":\\\\\\"1f31e50b-06e3-41e6-972e-e4e5fe1a9872\\\\\\",\\\\\\"w\\\\\\":48,\\\\\\"x\\\\\\":0,\\\\\\"y\\\\\\":0},\\\\\\"panelIndex\\\\\\":\\\\\\"1f31e50b-06e3-41e6-972e-e4e5fe1a9872\\\\\\",\\\\\\"embeddableConfig\\\\\\":{},\\\\\\"panelRefName\\\\\\":\\\\\\"panel_0\\\\\\"},{\\\\\\"version\\\\\\":\\\\\\"2.5.0\\\\\\",\\\\\\"gridData\\\\\\":{\\\\\\"h\\\\\\":9,\\\\\\"i\\\\\\":\\\\\\"d91a8da4-b34b-470a-aca6-9c76b47cd6fb\\\\\\",\\\\\\"w\\\\\\":24,\\\\\\"x\\\\\\":0,\\\\\\"y\\\\\\":8},\\\\\\"panelIndex\\\\\\":\\\\\\"d91a8da4-b34b-470a-aca6-9c76b47cd6fb\\\\\\",\\\\\\"embeddableConfig\\\\\\":{},\\\\\\"panelRefName\\\\\\":\\\\\\"panel_1\\\\\\"},{\\\\\\"version\\\\\\":\\\\\\"2.5.0\\\\\\",\\\\\\"gridData\\\\\\":{\\\\\\"h\\\\\\":15,\\\\\\"i\\\\\\":\\\\\\"27149e5a-3a77-4f3c-800e-8a160c3765f4\\\\\\",\\\\\\"w\\\\\\":24,\\\\\\"x\\\\\\":24,\\\\\\"y\\\\\\":8},\\\\\\"panelIndex\\\\\\":\\\\\\"27149e5a-3a77-4f3c-800e-8a160c3765f4\\\\\\",\\\\\\"embeddableConfig\\\\\\":{},\\\\\\"panelRefName\\\\\\":\\\\\\"panel_2\\\\\\"},{\\\\\\"version\\\\\\":\\\\\\"2.5.0\\\\\\",\\\\\\"gridData\\\\\\":{\\\\\\"x\\\\\\":0,\\\\\\"y\\\\\\":17,\\\\\\"w\\\\\\":24,\\\\\\"h\\\\\\":15,\\\\\\"i\\\\\\":\\\\\\"4d8c2aa7-159c-4a1a-80ff-00a9299056ce\\\\\\"},\\\\\\"panelIndex\\\\\\":\\\\\\"4d8c2aa7-159c-4a1a-80ff-00a9299056ce\\\\\\",\\\\\\"embeddableConfig\\\\\\":{},\\\\\\"panelRefName\\\\\\":\\\\\\"panel_3\\\\\\"},{\\\\\\"version\\\\\\":\\\\\\"2.5.0\\\\\\",\\\\\\"gridData\\\\\\":{\\\\\\"x\\\\\\":24,\\\\\\"y\\\\\\":23,\\\\\\"w\\\\\\":24,\\\\\\"h\\\\\\":15,\\\\\\"i\\\\\\":\\\\\\"800b7f19-f50c-417f-8987-21b930531cbe\\\\\\"},\\\\\\"panelIndex\\\\\\":\\\\\\"800b7f19-f50c-417f-8987-21b930531cbe\\\\\\",\\\\\\"embeddableConfig\\\\\\":{},\\\\\\"panelRefName\\\\\\":\\\\\\"panel_4\\\\\\"}]\\",\\"timeRestore\\":false,\\"title\\":\\"[NGINX Core Logs 1.0] Overview\\",\\"version\\":1},\\"id\\":\\"96847220-5261-44d0-89b4-65f3a659f13a\\",\\"migrationVersion\\":{\\"dashboard\\":\\"7.9.3\\"},\\"references\\":[{\\"id\\":\\"3b49a65d-54d8-483d-a8f0-3d7c855e1ecf\\",\\"name\\":\\"panel_0\\",\\"type\\":\\"visualization\\"},{\\"id\\":\\"865e577b-634b-4a65-b9d6-7e324c395d18\\",\\"name\\":\\"panel_1\\",\\"type\\":\\"visualization\\"},{\\"id\\":\\"dc1803f0-b478-11ed-9063-ebe46f9ac203\\",\\"name\\":\\"panel_2\\",\\"type\\":\\"visualization\\"},{\\"id\\":\\"99acc580-b47a-11ed-9063-ebe46f9ac203\\",\\"name\\":\\"panel_3\\",\\"type\\":\\"visualization\\"},{\\"id\\":\\"01ea64d0-b62f-11ed-a677-43d7aa86763b\\",\\"name\\":\\"panel_4\\",\\"type\\":\\"visualization\\"}],\\"type\\":\\"dashboard\\",\\"updated_at\\":\\"2023-02-26T23:44:09.855Z\\",\\"version\\":\\"WzczLDdd\\"}", + }, + Object { + "body": "{\\"exportedCount\\":9,\\"missingRefCount\\":0,\\"missingReferences\\":[]}", + }, + ], + "integrationType": "logs", + "name": "nginx", + "statics": Object { + "assets": Object { + "/logo": Object { + "annotation": "NginX Logo", + "data": "iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAACXBIWXMAAAsSAAALEgHS3X78AAAfBklEQVR42u1dDYxc1XWe2dkNfzFEAVxh8LyZtU0LhoTYnvtmAacINWmJm+CmiRKoiBLRqH/8qE3URm2pLBqVUsC77834L5CSJqKhblOaQlMUEaKmSdSgNCSIokJL25QSURMiU6EAM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6EtjK5eY25jmn9rPWiIhU/CS3fssrYK6s0udY+EFxMH+hv2DfbN2XdgmHnB6DQPP18PnBF1s+D9Pxb/U3XueCxyr2k+oiIQJIxp8pBCgjUDvqA3xklfgAKzdnPf7e3seqFz6nS9aixsgs/VQCzN52qqXu/2ZLLEecHoNDM/Xyd2eg3rNGb7sZ4e2nVSWDSMP0STPADUOgy/XyvmnH17PrgB6DQgvj54Aeg0IL7+eAHoFD4+eAHoFD4+eAHoFD4+eAHoFD4+eAHoPDz4eeDH4DCz4efD34ACj8ffj74ASj8fPj54Aeg8PPh54MfgMLPh4AfgMLPh4AfgMLPh4AfgMLPh4AfgMLPh4AfgMLPh4AfgMLPh4AfgMLPh4AfgMLPh4AfgMLPh4AfgMLPh4AfgMLPh4AfgMLPh4AfgMLPh4AfgJ8PPx8CfgB+Pvx8CPgB+Pnw8yHgB+DnY+FDwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAisoPwM+HQArKD8DPh0AKyA/Az4dACscPwM+HQArJD8DPh0AKyg/Az4dACsgPwM+HQArHD8DPh0AKyQ/Az4dACsoPwM+HQArMD8DPh0CKyA8EUcimPvx8CKSI/MB+MvX3T7GfX4OfD4EUih/YTAv7EbICHqWFfjH8/GLK/wNkczJMJgkn1AAAAABJRU5ErkJggg==", + "mimeType": "image/png", + }, + }, + "mapping": Object { + "logo": "/logo", + }, + }, + "version": "1.0.0", + }, + ] + } + loading={false} + noItemsMessage="No items found" + onChange={[Function]} + pagination={ + Object { + "hidePerPageOptions": undefined, + "pageIndex": 0, + "pageSize": 10, + "pageSizeOptions": Array [ + 5, + 10, + 15, + ], + "totalItemCount": 1, + } + } + responsive={true} + tableLayout="auto" + > +
+
+ +
+ +
+ +
+ + +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + Name + + + + + + + + + + + + Description + + + + + + + + + + + + Status + + + + + + + + + + + + Actions + + + + + +
+
+ Name +
+
+ + + nginx + + +
+
+
+ Description +
+
+ +
+ Nginx HTTP server collector +
+
+
+
+
+ Status +
+
+ +
+ +
+
+
+ Actions +
+
+ + + +
+
+
+
+ +
+ +
+ + + +
+ +
+ + + : + 10 + + } + closePopover={[Function]} + display="inlineBlock" + hasArrow={true} + isOpen={false} + ownFocus={true} + panelPaddingSize="none" + > +
+
+ + + +
+
+
+
+
+ +
+ + + +
+
+
+
+
+
+ +
+ +
+ +
+ + +`; diff --git a/public/components/integrations/components/__tests__/available_integration_card_view.test.tsx b/public/components/integrations/components/__tests__/available_integration_card_view.test.tsx index a90d648f1f..50499a6d57 100644 --- a/public/components/integrations/components/__tests__/available_integration_card_view.test.tsx +++ b/public/components/integrations/components/__tests__/available_integration_card_view.test.tsx @@ -7,13 +7,13 @@ import { configure, mount } from 'enzyme'; import Adapter from 'enzyme-adapter-react-16'; import { waitFor } from '@testing-library/react'; import { AvailableIntegrationsCardView } from '../available_integration_card_view'; -import { data } from './testing_constants'; +import { availableCardViewData } from './testing_constants'; describe('Available Integration Card View Test', () => { configure({ adapter: new Adapter() }); it('Renders nginx integration card view using dummy data', async () => { - const wrapper = mount(AvailableIntegrationsCardView(data)); + const wrapper = mount(AvailableIntegrationsCardView(availableCardViewData)); await waitFor(() => { expect(wrapper).toMatchSnapshot(); diff --git a/public/components/integrations/components/__tests__/available_integration_table_view.test.tsx b/public/components/integrations/components/__tests__/available_integration_table_view.test.tsx new file mode 100644 index 0000000000..40dcc24241 --- /dev/null +++ b/public/components/integrations/components/__tests__/available_integration_table_view.test.tsx @@ -0,0 +1,22 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { configure, mount } from 'enzyme'; +import Adapter from 'enzyme-adapter-react-16'; +import { waitFor } from '@testing-library/react'; +import { AvailableIntegrationsTable } from '../available_integration_table'; +import { availableTableViewData } from './testing_constants'; + +describe('Available Integration Table View Test', () => { + configure({ adapter: new Adapter() }); + + it('Renders nginx integration table view using dummy data', async () => { + const wrapper = mount(AvailableIntegrationsTable(availableTableViewData)); + + await waitFor(() => { + expect(wrapper).toMatchSnapshot(); + }); + }); +}); diff --git a/public/components/integrations/components/__tests__/testing_constants.ts b/public/components/integrations/components/__tests__/testing_constants.ts index 91fd2eaa9a..45c2aa8398 100644 --- a/public/components/integrations/components/__tests__/testing_constants.ts +++ b/public/components/integrations/components/__tests__/testing_constants.ts @@ -1,4 +1,9 @@ -export const data: AvailableIntegrationsCardViewProps = { +import { + AvailableIntegrationsCardViewProps, + AvailableIntegrationsTableProps, +} from '../available_integration_overview_page'; + +export const availableCardViewData: AvailableIntegrationsCardViewProps = { data: { hits: [ { @@ -89,5 +94,100 @@ export const data: AvailableIntegrationsCardViewProps = { }, ], }, - records: 6, + showModal: () => {}, +}; + +export const availableTableViewData: AvailableIntegrationsTableProps = { + data: { + hits: [ + { + name: 'nginx', + version: '1.0.0', + integrationType: 'logs', + description: 'Nginx HTTP server collector', + statics: { + mapping: { + logo: '/logo', + }, + assets: { + '/logo': { + mimeType: 'image/png', + annotation: 'NginX Logo', + data: + 'iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAACXBIWXMAAAsSAAALEgHS3X78AAAfBklEQVR42u1dDYxc1XWe2dkNfzFEAVxh8LyZtU0LhoTYnvtmAacINWmJm+CmiRKoiBLRqH/8qE3URm2pLBqVUsC77834L5CSJqKhblOaQlMUEaKmSdSgNCSIokJL25QSURMiU6EAM7O7Pffcc++7b7y217vz3u7M+450NG9nZ3dm7rv3u+d85+eWSpCRlSAOS7Uo5Gv9GERhxf0uCjcHkXqEXvNoLVZvsc/XIlXRf2euG6Va3MRAQiDDtfCVXuAOBPoW/lm0yKfpsVvfPzWvlV7fo9fF9PzahYCAgIKAIMTAQiCrWap7L9cLt+Qt9jH6eYwX9MxlY/TzDaQvTN596Twt6Hm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rgB6DQgvj54Aeg0IL7+eAHoFD4+eAHoFD4+eAHoFD4+eAHoFD4+eAHoPDz4eeDH4DCz4efD34ACj8ffj74ASj8fPj54Aeg8PPh54MfgMLPh4AfgMLPh4AfgMLPh4AfgMLPh4AfgMLPh4AfgMLPh4AfgMLPh4AfgMLPh4AfgMLPh4AfgMLPh4AfgMLPh4AfgMLPh4AfgMLPh4AfgMLPh4AfgJ8PPx8CfgB+Pvx8CPgB+Pnw8yHgB+DnY+FDwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAisoPwM+HQArKD8DPh0AKyA/Az4dACscPwM+HQArJD8DPh0AKyg/Az4dACsgPwM+HQArHD8DPh0AKyQ/Az4dACsoPwM+HQArMD8DPh0CKyA8EUcimPvx8CKSI/MB+MvX3T7GfX4OfD4EUih/YTAv7EbICHqWFfjH8/GLK/wNkczJMJgkn1AAAAABJRU5ErkJggg==', + }, + }, + }, + components: [ + { + name: 'communication', + version: '1.0.0', + schemaBody: + '{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://opensearch.org/schemas/observability/Communication","title":"Communication","type":"object","properties":{"source":{"type":"object","properties":{"sock.family":{"type":"string"},"source":{"$ref":"#/definitions/Source"},"destination":{"$ref":"#/definitions/Destination"}}},"destination":{"type":"object","properties":{}}},"definitions":{"Source":{"$id":"#/definitions/Source","type":"object","additionalProperties":true,"properties":{"address":{"type":"string"},"domain":{"type":"string"},"bytes":{"type":"integer"},"ip":{"type":"string"},"port":{"type":"integer"},"mac":{"type":"string"},"packets":{"type":"integer"}},"title":"Source"},"Destination":{"$id":"#/definitions/Destination","type":"object","additionalProperties":true,"properties":{"address":{"type":"string"},"domain":{"type":"string"},"bytes":{"type":"integer"},"ip":{"type":"string"},"port":{"type":"integer"},"mac":{"type":"string"},"packets":{"type":"integer"}},"title":"Destination"}}}', + mappingBody: + '{"template":{"mappings":{"_meta":{"version":"1.0.0","catalog":"observability","type":"logs","component":"communication"},"properties":{"communication":{"properties":{"sock.family":{"type":"keyword","ignore_above":256},"source":{"type":"object","properties":{"address":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":1024}}},"domain":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":1024}}},"bytes":{"type":"long"},"ip":{"type":"ip"},"port":{"type":"long"},"mac":{"type":"keyword","ignore_above":1024},"packets":{"type":"long"}}},"destination":{"type":"object","properties":{"address":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":1024}}},"domain":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":1024}}},"bytes":{"type":"long"},"ip":{"type":"ip"},"port":{"type":"long"},"mac":{"type":"keyword","ignore_above":1024},"packets":{"type":"long"}}}}}}}}}', + }, + { + name: 'http', + version: '1.0.0', + schemaBody: + '{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://opensearch.org/schemas/observability/Http","title":"Http","type":"object","properties":{"request":{"$ref":"#/definitions/Request"},"response":{"$ref":"#/definitions/Response"},"flavor":{"type":"string"},"user_agent":{"type":"string"},"url":{"type":"string"},"schema":{"type":"string"},"target":{"type":"string"},"route":{"type":"string"},"client_ip":{"type":"string"},"resent_count":{"type":"integer"}},"definitions":{"Request":{"$id":"#/definitions/Request","type":"object","additionalProperties":true,"properties":{"id":{"type":"string"},"body.content":{"type":"string"},"bytes":{"type":"integer"},"method":{"type":"string"},"referrer":{"type":"string"},"header":{"type":"string"},"mime_type":{"type":"object"}},"title":"Request"},"Response":{"$id":"#/definitions/Response","type":"object","additionalProperties":true,"properties":{"id":{"type":"string"},"body.content":{"type":"string"},"bytes":{"type":"integer"},"status_code":{"type":"integer"},"header":{"type":"object"}},"title":"Response"}}}', + mappingBody: + '{"template":{"mappings":{"_meta":{"version":"1.0.0","catalog":"observability","type":"logs","component":"http"},"dynamic_templates":[{"request_header_map":{"mapping":{"type":"keyword"},"path_match":"request.header.*"}},{"response_header_map":{"mapping":{"type":"keyword"},"path_match":"response.header.*"}}],"properties":{"http":{"properties":{"flavor":{"type":"keyword","ignore_above":256},"user_agent":{"type":"keyword","ignore_above":2048},"url":{"type":"keyword","ignore_above":2048},"schema":{"type":"keyword","ignore_above":1024},"target":{"type":"keyword","ignore_above":1024},"route":{"type":"keyword","ignore_above":1024},"client.ip":{"type":"ip"},"resent_count":{"type":"integer"},"request":{"type":"object","properties":{"id":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"body.content":{"type":"text"},"bytes":{"type":"long"},"method":{"type":"keyword","ignore_above":256},"referrer":{"type":"keyword","ignore_above":1024},"mime_type":{"type":"keyword","ignore_above":1024}}},"response":{"type":"object","properties":{"id":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"body.content":{"type":"text"},"bytes":{"type":"long"},"status_code":{"type":"integer"}}}}}}}}}', + }, + { + name: 'logs', + version: '1.0.0', + schemaBody: + '{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://opensearch.org/schema/observability/Logs","title":"OpenTelemetry Logs","type":"object","properties":{"severity":{"$ref":"#/definitions/Severity"},"resource":{"type":"object"},"attributes":{"$ref":"#/definitions/Attributes"},"body":{"type":"string"},"@timestamp":{"type":"string","format":"date-time"},"observedTimestamp":{"type":"string","format":"date-time"},"traceId":{"$ref":"https://opensearch.org/schemas/observability/Span#/properties/traceId"},"spanId":{"$ref":"https://opensearch.org/schemas/observability/Span#/properties/spanId"},"schemaUrl":{"type":"string"},"instrumentationScope":{"$ref":"#/definitions/InstrumentationScope"},"event":{"$ref":"#/definitions/Event"}},"required":["body","@timestamp"],"definitions":{"InstrumentationScope":{"$id":"#/definitions/InstrumentationScope","type":"object","additionalProperties":true,"properties":{"name":{"type":"string"},"version":{"type":"string"},"schemaUrl":{"type":"string"}},"title":"InstrumentationScope"},"Severity":{"$id":"#/definitions/Severity","type":"object","additionalProperties":true,"properties":{"text":{"type":"string","enum":["TRACE","DEBUG","INFO","WARN","ERROR","FATAL"]},"number":{"type":"integer"}},"title":"Severity"},"Attributes":{"$id":"#/definitions/Attributes","type":"object","additionalProperties":true,"properties":{"data_stream":{"$ref":"#/definitions/Dataflow"}},"title":"Attributes"},"Dataflow":{"$id":"#/definitions/Dataflow","type":"object","additionalProperties":true,"properties":{"type":{"type":"string"},"namespace":{"type":"string"},"dataset":{"type":"string"}},"title":"Dataflow"},"Exception":{"$id":"#/definitions/Exception","type":"object","additionalProperties":true,"properties":{"message":{"type":"string"},"stacktrace":{"type":"string"},"type":{"type":"string"}},"title":"Exception"},"Event":{"$id":"#/definitions/Event","type":"object","additionalProperties":true,"properties":{"category":{"type":"string","enum":["authentication","configuration","database","driver","email","file","host","iam","intrusion_detection","malware","network","package","process","registry","session","threat","vulnerability","web"]},"kind":{"type":"string","enum":["alert","enrichment","event","metric","state","error","signal"]},"type":{"type":"string","enum":["access","admin","allowed","change","connection","creation","deletion","denied","end","error","group","indicator","info","installation","protocol","start","user"]},"domain":{"type":"string"},"name":{"type":"string"},"source":{"type":"string"},"result":{"type":"string","enum":["failure","success","pending","undetermined"]},"exception":{"$ref":"#/definitions/Exception"}},"title":"Event"}}}', + mappingBody: + '{"index_patterns":["sso_logs-*-*"],"data_stream":{},"template":{"mappings":{"_meta":{"version":"1.0.0","catalog":"observability","type":"logs","component":"log","correlations":[{"field":"spanId","foreign-schema":"traces","foreign-field":"spanId"},{"field":"traceId","foreign-schema":"traces","foreign-field":"traceId"}]},"_source":{"enabled":true},"dynamic_templates":[{"resources_map":{"mapping":{"type":"keyword"},"path_match":"resource.*"}},{"attributes_map":{"mapping":{"type":"keyword"},"path_match":"attributes.*"}},{"instrumentation_scope_attributes_map":{"mapping":{"type":"keyword"},"path_match":"instrumentationScope.attributes.*"}}],"properties":{"severity":{"properties":{"number":{"type":"long"},"text":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}},"attributes":{"type":"object","properties":{"data_stream":{"properties":{"dataset":{"ignore_above":128,"type":"keyword"},"namespace":{"ignore_above":128,"type":"keyword"},"type":{"ignore_above":56,"type":"keyword"}}}}},"body":{"type":"text"},"@timestamp":{"type":"date"},"observedTimestamp":{"type":"date"},"observerTime":{"type":"alias","path":"observedTimestamp"},"traceId":{"ignore_above":256,"type":"keyword"},"spanId":{"ignore_above":256,"type":"keyword"},"schemaUrl":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"instrumentationScope":{"properties":{"name":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":128}}},"version":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"dropped_attributes_count":{"type":"integer"},"schemaUrl":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}},"event":{"properties":{"domain":{"ignore_above":256,"type":"keyword"},"name":{"ignore_above":256,"type":"keyword"},"source":{"ignore_above":256,"type":"keyword"},"category":{"ignore_above":256,"type":"keyword"},"type":{"ignore_above":256,"type":"keyword"},"kind":{"ignore_above":256,"type":"keyword"},"result":{"ignore_above":256,"type":"keyword"},"exception":{"properties":{"message":{"ignore_above":1024,"type":"keyword"},"type":{"ignore_above":256,"type":"keyword"},"stacktrace":{"type":"text"}}}}}}},"settings":{"index":{"mapping":{"total_fields":{"limit":10000}},"refresh_interval":"5s"}}},"composed_of":["http_template","communication_template"],"version":1,"_meta":{"description":"Simple Schema For Observability","catalog":"observability","type":"logs","correlations":[{"field":"spanId","foreign-schema":"traces","foreign-field":"spanId"},{"field":"traceId","foreign-schema":"traces","foreign-field":"traceId"}]}}', + }, + ], + displayAssets: [ + { + body: + '{"attributes":{"fields":"[{\\"count\\":0,\\"name\\":\\"@timestamp\\",\\"type\\":\\"date\\",\\"esTypes\\":[\\"date\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true},{\\"count\\":0,\\"name\\":\\"_id\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"_id\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"_index\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"_index\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"_score\\",\\"type\\":\\"number\\",\\"scripted\\":false,\\"searchable\\":false,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"_source\\",\\"type\\":\\"_source\\",\\"esTypes\\":[\\"_source\\"],\\"scripted\\":false,\\"searchable\\":false,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"_type\\",\\"type\\":\\"string\\",\\"scripted\\":false,\\"searchable\\":false,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"attributes.data_stream.dataset\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"attributes.data_stream.dataset.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"attributes.data_stream.dataset\\"}}},{\\"count\\":0,\\"name\\":\\"attributes.data_stream.namespace\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"attributes.data_stream.namespace.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"attributes.data_stream.namespace\\"}}},{\\"count\\":0,\\"name\\":\\"attributes.data_stream.type\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"attributes.data_stream.type.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"attributes.data_stream.type\\"}}},{\\"count\\":0,\\"name\\":\\"body\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"body.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"body\\"}}},{\\"count\\":0,\\"name\\":\\"communication.source.address\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"communication.source.address.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"communication.source.address\\"}}},{\\"count\\":0,\\"name\\":\\"communication.source.ip\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"communication.source.ip.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"communication.source.ip\\"}}},{\\"count\\":0,\\"name\\":\\"event.category\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"event.category.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"event.category\\"}}},{\\"count\\":0,\\"name\\":\\"event.domain\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"event.domain.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"event.domain\\"}}},{\\"count\\":0,\\"name\\":\\"event.kind\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"event.kind.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"event.kind\\"}}},{\\"count\\":0,\\"name\\":\\"event.name\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"event.name.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"event.name\\"}}},{\\"count\\":0,\\"name\\":\\"event.result\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"event.result.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"event.result\\"}}},{\\"count\\":0,\\"name\\":\\"event.type\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"event.type.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"event.type\\"}}},{\\"count\\":0,\\"name\\":\\"http.flavor\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"http.flavor.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"http.flavor\\"}}},{\\"count\\":0,\\"name\\":\\"http.request.method\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"http.request.method.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"http.request.method\\"}}},{\\"count\\":0,\\"name\\":\\"http.response.bytes\\",\\"type\\":\\"number\\",\\"esTypes\\":[\\"long\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true},{\\"count\\":0,\\"name\\":\\"http.response.status_code\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"http.response.status_code.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"http.response.status_code\\"}}},{\\"count\\":0,\\"name\\":\\"http.url\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"http.url\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"http.url\\"}}},{\\"count\\":0,\\"name\\":\\"observerTime\\",\\"type\\":\\"date\\",\\"esTypes\\":[\\"date\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true},{\\"count\\":0,\\"name\\":\\"span_id\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"span_id.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"span_id\\"}}},{\\"count\\":0,\\"name\\":\\"trace_id\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"trace_id.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"trace_id\\"}}}]","timeFieldName":"@timestamp","title":"sso_logs-*-*"},"id":"47892350-b495-11ed-af0a-cf5c93b5a3b6","migrationVersion":{"index-pattern":"7.6.0"},"references":[],"type":"index-pattern","updated_at":"2023-02-26T00:34:36.592Z","version":"WzYxLDdd"}', + }, + { + body: + '{"attributes":{"columns":["http.request.method","http.response.status_code"],"description":"","hits":0,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\\n \\"highlightAll\\": true,\\n \\"version\\": true,\\n \\"query\\": {\\n \\"query\\": \\"event.domain:nginx.access\\",\\n \\"language\\": \\"kuery\\"\\n },\\n \\"filter\\": [],\\n \\"indexRefName\\": \\"kibanaSavedObjectMeta.searchSourceJSON.index\\"\\n}"},"sort":[],"title":"[NGINX Core Logs 1.0] Nginx Access Logs","version":1},"id":"d80e05b2-518c-4c3d-9651-4c9d8632dce4","migrationVersion":{"search":"7.9.3"},"references":[{"id":"47892350-b495-11ed-af0a-cf5c93b5a3b6","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"search","updated_at":"2023-02-26T00:34:36.592Z","version":"WzYyLDdd"}', + }, + { + body: + '{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\\"query\\":{\\"query\\":\\"\\",\\"language\\":\\"lucene\\"},\\"filter\\":[]}"},"savedSearchRefName":"search_0","title":"[NGINX Core Logs 1.0] Response codes over time","uiStateJSON":"{}","version":1,"visState":"{\\"title\\":\\"[NGINX Core Logs 1.0] Response codes over time\\",\\"type\\":\\"histogram\\",\\"aggs\\":[{\\"id\\":\\"1\\",\\"enabled\\":true,\\"type\\":\\"count\\",\\"params\\":{},\\"schema\\":\\"metric\\"},{\\"id\\":\\"2\\",\\"enabled\\":true,\\"type\\":\\"date_histogram\\",\\"params\\":{\\"field\\":\\"@timestamp\\",\\"timeRange\\":{\\"from\\":\\"now-24h\\",\\"to\\":\\"now\\"},\\"useNormalizedOpenSearchInterval\\":true,\\"scaleMetricValues\\":false,\\"interval\\":\\"auto\\",\\"drop_partials\\":false,\\"min_doc_count\\":1,\\"extended_bounds\\":{}},\\"schema\\":\\"segment\\"},{\\"id\\":\\"3\\",\\"enabled\\":true,\\"type\\":\\"filters\\",\\"params\\":{\\"filters\\":[{\\"input\\":{\\"query\\":\\"http.response.status_code:[200 TO 299]\\",\\"language\\":\\"lucene\\"},\\"label\\":\\"200s\\"},{\\"input\\":{\\"query\\":\\"http.response.status_code:[300 TO 399]\\",\\"language\\":\\"lucene\\"},\\"label\\":\\"300s\\"},{\\"input\\":{\\"query\\":\\"http.response.status_code:[400 TO 499]\\",\\"language\\":\\"lucene\\"},\\"label\\":\\"400s\\"},{\\"input\\":{\\"query\\":\\"http.response.status_code:[500 TO 599]\\",\\"language\\":\\"lucene\\"},\\"label\\":\\"500s\\"},{\\"input\\":{\\"query\\":\\"http.response.status_code:0\\",\\"language\\":\\"lucene\\"},\\"label\\":\\"0\\"}]},\\"schema\\":\\"group\\"}],\\"params\\":{\\"type\\":\\"histogram\\",\\"grid\\":{\\"categoryLines\\":false},\\"categoryAxes\\":[{\\"id\\":\\"CategoryAxis-1\\",\\"type\\":\\"category\\",\\"position\\":\\"bottom\\",\\"show\\":true,\\"style\\":{},\\"scale\\":{\\"type\\":\\"linear\\"},\\"labels\\":{\\"show\\":true,\\"filter\\":true,\\"truncate\\":100},\\"title\\":{}}],\\"valueAxes\\":[{\\"id\\":\\"ValueAxis-1\\",\\"name\\":\\"LeftAxis-1\\",\\"type\\":\\"value\\",\\"position\\":\\"left\\",\\"show\\":true,\\"style\\":{},\\"scale\\":{\\"type\\":\\"linear\\",\\"mode\\":\\"normal\\"},\\"labels\\":{\\"show\\":true,\\"rotate\\":0,\\"filter\\":false,\\"truncate\\":100},\\"title\\":{\\"text\\":\\"Count\\"}}],\\"seriesParams\\":[{\\"show\\":true,\\"type\\":\\"histogram\\",\\"mode\\":\\"stacked\\",\\"data\\":{\\"label\\":\\"Count\\",\\"id\\":\\"1\\"},\\"valueAxis\\":\\"ValueAxis-1\\",\\"drawLinesBetweenPoints\\":true,\\"lineWidth\\":2,\\"showCircles\\":true}],\\"addTooltip\\":true,\\"addLegend\\":true,\\"legendPosition\\":\\"right\\",\\"times\\":[],\\"addTimeMarker\\":false,\\"labels\\":{\\"show\\":false},\\"thresholdLine\\":{\\"show\\":false,\\"value\\":10,\\"width\\":1,\\"style\\":\\"full\\",\\"color\\":\\"#E7664C\\"}}}"},"id":"3b49a65d-54d8-483d-a8f0-3d7c855e1ecf","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"d80e05b2-518c-4c3d-9651-4c9d8632dce4","name":"search_0","type":"search"}],"type":"visualization","updated_at":"2023-02-26T00:34:36.592Z","version":"WzYzLDdd"}', + }, + { + body: + '{"attributes":{"columns":["_source"],"description":"","hits":0,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\\n \\"highlightAll\\": true,\\n \\"query\\": {\\n \\"query\\": \\"http.response.status_code >= 300 and event.domain:nginx.access\\",\\n \\"language\\": \\"kuery\\"\\n },\\n \\"version\\": true,\\n \\"highlight\\": {\\n \\"post_tags\\": [\\n \\"@/kibana-highlighted-field@\\"\\n ],\\n \\"fields\\": {\\n \\"*\\": {}\\n },\\n \\"pre_tags\\": [\\n \\"@kibana-highlighted-field@\\"\\n ],\\n \\"require_field_match\\": false,\\n \\"fragment_size\\": 2147483647\\n },\\n \\"filter\\": [],\\n \\"indexRefName\\": \\"kibanaSavedObjectMeta.searchSourceJSON.index\\"\\n}"},"sort":[["@timestamp","desc"]],"title":"[NGINX Core Logs 1.0] Nginx Error Logs","version":1},"id":"9f820fbe-ddde-43a2-9402-30bd295c97f6","migrationVersion":{"search":"7.9.3"},"references":[{"id":"47892350-b495-11ed-af0a-cf5c93b5a3b6","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"search","updated_at":"2023-02-26T00:34:36.592Z","version":"WzY0LDdd"}', + }, + { + body: + '{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\\"query\\":{\\"query\\":\\"\\",\\"language\\":\\"lucene\\"},\\"filter\\":[]}"},"savedSearchRefName":"search_0","title":"[NGINX Core Logs 1.0] Errors over time","uiStateJSON":"{}","version":1,"visState":"{\\"title\\":\\"[NGINX Core Logs 1.0] Errors over time\\",\\"type\\":\\"histogram\\",\\"aggs\\":[{\\"id\\":\\"1\\",\\"enabled\\":true,\\"type\\":\\"count\\",\\"params\\":{},\\"schema\\":\\"metric\\"},{\\"id\\":\\"2\\",\\"enabled\\":true,\\"type\\":\\"date_histogram\\",\\"params\\":{\\"field\\":\\"@timestamp\\",\\"timeRange\\":{\\"from\\":\\"now-24h\\",\\"to\\":\\"now\\"},\\"useNormalizedOpenSearchInterval\\":true,\\"scaleMetricValues\\":false,\\"interval\\":\\"auto\\",\\"drop_partials\\":false,\\"min_doc_count\\":1,\\"extended_bounds\\":{}},\\"schema\\":\\"segment\\"}],\\"params\\":{\\"type\\":\\"histogram\\",\\"grid\\":{\\"categoryLines\\":false},\\"categoryAxes\\":[{\\"id\\":\\"CategoryAxis-1\\",\\"type\\":\\"category\\",\\"position\\":\\"bottom\\",\\"show\\":true,\\"style\\":{},\\"scale\\":{\\"type\\":\\"linear\\"},\\"labels\\":{\\"show\\":true,\\"filter\\":true,\\"truncate\\":100},\\"title\\":{}}],\\"valueAxes\\":[{\\"id\\":\\"ValueAxis-1\\",\\"name\\":\\"LeftAxis-1\\",\\"type\\":\\"value\\",\\"position\\":\\"left\\",\\"show\\":true,\\"style\\":{},\\"scale\\":{\\"type\\":\\"linear\\",\\"mode\\":\\"normal\\"},\\"labels\\":{\\"show\\":true,\\"rotate\\":0,\\"filter\\":false,\\"truncate\\":100},\\"title\\":{\\"text\\":\\"Count\\"}}],\\"seriesParams\\":[{\\"show\\":true,\\"type\\":\\"histogram\\",\\"mode\\":\\"stacked\\",\\"data\\":{\\"label\\":\\"Count\\",\\"id\\":\\"1\\"},\\"valueAxis\\":\\"ValueAxis-1\\",\\"drawLinesBetweenPoints\\":true,\\"lineWidth\\":2,\\"showCircles\\":true}],\\"addTooltip\\":true,\\"addLegend\\":true,\\"legendPosition\\":\\"right\\",\\"times\\":[],\\"addTimeMarker\\":false,\\"labels\\":{\\"show\\":false},\\"thresholdLine\\":{\\"show\\":false,\\"value\\":10,\\"width\\":1,\\"style\\":\\"full\\",\\"color\\":\\"#E7664C\\"}}}"},"id":"865e577b-634b-4a65-b9d6-7e324c395d18","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"9f820fbe-ddde-43a2-9402-30bd295c97f6","name":"search_0","type":"search"}],"type":"visualization","updated_at":"2023-02-26T00:34:36.592Z","version":"WzY1LDdd"}', + }, + { + body: + '{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\\"query\\":{\\"query\\":\\"\\",\\"language\\":\\"kuery\\"},\\"filter\\":[]}"},"savedSearchRefName":"search_0","title":"Top Paths","uiStateJSON":"{}","version":1,"visState":"{\\"title\\":\\"Top Paths\\",\\"type\\":\\"table\\",\\"aggs\\":[{\\"id\\":\\"1\\",\\"enabled\\":true,\\"type\\":\\"count\\",\\"params\\":{},\\"schema\\":\\"metric\\"},{\\"id\\":\\"2\\",\\"enabled\\":true,\\"type\\":\\"terms\\",\\"params\\":{\\"field\\":\\"http.url\\",\\"orderBy\\":\\"1\\",\\"order\\":\\"desc\\",\\"size\\":10,\\"otherBucket\\":false,\\"otherBucketLabel\\":\\"Other\\",\\"missingBucket\\":false,\\"missingBucketLabel\\":\\"Missing\\",\\"customLabel\\":\\"Paths\\"},\\"schema\\":\\"bucket\\"}],\\"params\\":{\\"perPage\\":10,\\"showPartialRows\\":false,\\"showMetricsAtAllLevels\\":false,\\"showTotal\\":false,\\"totalFunc\\":\\"sum\\",\\"percentageCol\\":\\"\\"}}"},"id":"dc1803f0-b478-11ed-9063-ebe46f9ac203","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"d80e05b2-518c-4c3d-9651-4c9d8632dce4","name":"search_0","type":"search"}],"type":"visualization","updated_at":"2023-02-26T00:34:36.592Z","version":"WzY2LDdd"}', + }, + { + body: + '{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\\"query\\":{\\"query\\":\\"\\",\\"language\\":\\"kuery\\"},\\"filter\\":[]}"},"savedSearchRefName":"search_0","title":"Data Volume","uiStateJSON":"{}","version":1,"visState":"{\\"title\\":\\"Data Volume\\",\\"type\\":\\"area\\",\\"aggs\\":[{\\"id\\":\\"1\\",\\"enabled\\":true,\\"type\\":\\"sum\\",\\"params\\":{\\"field\\":\\"http.response.bytes\\",\\"customLabel\\":\\"Response Bytes\\"},\\"schema\\":\\"metric\\"},{\\"id\\":\\"2\\",\\"enabled\\":true,\\"type\\":\\"date_histogram\\",\\"params\\":{\\"field\\":\\"observerTime\\",\\"timeRange\\":{\\"from\\":\\"now-15m\\",\\"to\\":\\"now\\"},\\"useNormalizedOpenSearchInterval\\":true,\\"scaleMetricValues\\":false,\\"interval\\":\\"auto\\",\\"drop_partials\\":false,\\"min_doc_count\\":1,\\"extended_bounds\\":{},\\"customLabel\\":\\"\\"},\\"schema\\":\\"segment\\"}],\\"params\\":{\\"type\\":\\"area\\",\\"grid\\":{\\"categoryLines\\":false},\\"categoryAxes\\":[{\\"id\\":\\"CategoryAxis-1\\",\\"type\\":\\"category\\",\\"position\\":\\"bottom\\",\\"show\\":true,\\"style\\":{},\\"scale\\":{\\"type\\":\\"linear\\"},\\"labels\\":{\\"show\\":true,\\"filter\\":true,\\"truncate\\":100},\\"title\\":{}}],\\"valueAxes\\":[{\\"id\\":\\"ValueAxis-1\\",\\"name\\":\\"LeftAxis-1\\",\\"type\\":\\"value\\",\\"position\\":\\"left\\",\\"show\\":true,\\"style\\":{},\\"scale\\":{\\"type\\":\\"linear\\",\\"mode\\":\\"normal\\"},\\"labels\\":{\\"show\\":true,\\"rotate\\":0,\\"filter\\":false,\\"truncate\\":100},\\"title\\":{\\"text\\":\\"Response Bytes\\"}}],\\"seriesParams\\":[{\\"show\\":true,\\"type\\":\\"area\\",\\"mode\\":\\"stacked\\",\\"data\\":{\\"label\\":\\"Response Bytes\\",\\"id\\":\\"1\\"},\\"drawLinesBetweenPoints\\":true,\\"lineWidth\\":2,\\"showCircles\\":true,\\"interpolate\\":\\"linear\\",\\"valueAxis\\":\\"ValueAxis-1\\"}],\\"addTooltip\\":true,\\"addLegend\\":true,\\"legendPosition\\":\\"right\\",\\"times\\":[],\\"addTimeMarker\\":false,\\"thresholdLine\\":{\\"show\\":false,\\"value\\":10,\\"width\\":1,\\"style\\":\\"full\\",\\"color\\":\\"#E7664C\\"},\\"labels\\":{}}}"},"id":"99acc580-b47a-11ed-9063-ebe46f9ac203","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"d80e05b2-518c-4c3d-9651-4c9d8632dce4","name":"search_0","type":"search"}],"type":"visualization","updated_at":"2023-02-26T00:34:36.592Z","version":"WzY3LDdd"}', + }, + { + body: + '{"attributes":{"description":"requests per minute aggregation","kibanaSavedObjectMeta":{"searchSourceJSON":"{\\"query\\":{\\"query\\":\\"\\",\\"language\\":\\"kuery\\"},\\"filter\\":[],\\"indexRefName\\":\\"kibanaSavedObjectMeta.searchSourceJSON.index\\"}"},"title":"Req-per-min","uiStateJSON":"{}","version":1,"visState":"{\\"title\\":\\"Req-per-min\\",\\"type\\":\\"table\\",\\"aggs\\":[{\\"id\\":\\"1\\",\\"enabled\\":true,\\"type\\":\\"moving_avg\\",\\"params\\":{\\"metricAgg\\":\\"custom\\",\\"customMetric\\":{\\"id\\":\\"1-metric\\",\\"enabled\\":true,\\"type\\":\\"count\\",\\"params\\":{}},\\"window\\":5,\\"script\\":\\"MovingFunctions.unweightedAvg(values)\\"},\\"schema\\":\\"metric\\"},{\\"id\\":\\"2\\",\\"enabled\\":true,\\"type\\":\\"date_histogram\\",\\"params\\":{\\"field\\":\\"@timestamp\\",\\"timeRange\\":{\\"from\\":\\"2023-02-24T17:25:00.000Z\\",\\"to\\":\\"2023-02-24T17:30:00.000Z\\"},\\"useNormalizedOpenSearchInterval\\":true,\\"scaleMetricValues\\":false,\\"interval\\":\\"m\\",\\"drop_partials\\":false,\\"min_doc_count\\":0,\\"extended_bounds\\":{},\\"customLabel\\":\\"Req/Min\\"},\\"schema\\":\\"bucket\\"}],\\"params\\":{\\"perPage\\":10,\\"showPartialRows\\":false,\\"showMetricsAtAllLevels\\":false,\\"showTotal\\":false,\\"totalFunc\\":\\"sum\\",\\"percentageCol\\":\\"\\"}}"},"id":"01ea64d0-b62f-11ed-a677-43d7aa86763b","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"47892350-b495-11ed-af0a-cf5c93b5a3b6","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"visualization","updated_at":"2023-02-26T23:40:53.020Z","version":"WzcyLDdd"}', + }, + { + body: + '{"attributes":{"description":"Nginx dashboard with basic Observability on access / error logs","hits":0,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\\"query\\":{\\"language\\":\\"kuery\\",\\"query\\":\\"\\"},\\"filter\\":[]}"},"optionsJSON":"{\\"hidePanelTitles\\":false,\\"useMargins\\":true}","panelsJSON":"[{\\"version\\":\\"2.5.0\\",\\"gridData\\":{\\"h\\":8,\\"i\\":\\"1f31e50b-06e3-41e6-972e-e4e5fe1a9872\\",\\"w\\":48,\\"x\\":0,\\"y\\":0},\\"panelIndex\\":\\"1f31e50b-06e3-41e6-972e-e4e5fe1a9872\\",\\"embeddableConfig\\":{},\\"panelRefName\\":\\"panel_0\\"},{\\"version\\":\\"2.5.0\\",\\"gridData\\":{\\"h\\":9,\\"i\\":\\"d91a8da4-b34b-470a-aca6-9c76b47cd6fb\\",\\"w\\":24,\\"x\\":0,\\"y\\":8},\\"panelIndex\\":\\"d91a8da4-b34b-470a-aca6-9c76b47cd6fb\\",\\"embeddableConfig\\":{},\\"panelRefName\\":\\"panel_1\\"},{\\"version\\":\\"2.5.0\\",\\"gridData\\":{\\"h\\":15,\\"i\\":\\"27149e5a-3a77-4f3c-800e-8a160c3765f4\\",\\"w\\":24,\\"x\\":24,\\"y\\":8},\\"panelIndex\\":\\"27149e5a-3a77-4f3c-800e-8a160c3765f4\\",\\"embeddableConfig\\":{},\\"panelRefName\\":\\"panel_2\\"},{\\"version\\":\\"2.5.0\\",\\"gridData\\":{\\"x\\":0,\\"y\\":17,\\"w\\":24,\\"h\\":15,\\"i\\":\\"4d8c2aa7-159c-4a1a-80ff-00a9299056ce\\"},\\"panelIndex\\":\\"4d8c2aa7-159c-4a1a-80ff-00a9299056ce\\",\\"embeddableConfig\\":{},\\"panelRefName\\":\\"panel_3\\"},{\\"version\\":\\"2.5.0\\",\\"gridData\\":{\\"x\\":24,\\"y\\":23,\\"w\\":24,\\"h\\":15,\\"i\\":\\"800b7f19-f50c-417f-8987-21b930531cbe\\"},\\"panelIndex\\":\\"800b7f19-f50c-417f-8987-21b930531cbe\\",\\"embeddableConfig\\":{},\\"panelRefName\\":\\"panel_4\\"}]","timeRestore":false,"title":"[NGINX Core Logs 1.0] Overview","version":1},"id":"96847220-5261-44d0-89b4-65f3a659f13a","migrationVersion":{"dashboard":"7.9.3"},"references":[{"id":"3b49a65d-54d8-483d-a8f0-3d7c855e1ecf","name":"panel_0","type":"visualization"},{"id":"865e577b-634b-4a65-b9d6-7e324c395d18","name":"panel_1","type":"visualization"},{"id":"dc1803f0-b478-11ed-9063-ebe46f9ac203","name":"panel_2","type":"visualization"},{"id":"99acc580-b47a-11ed-9063-ebe46f9ac203","name":"panel_3","type":"visualization"},{"id":"01ea64d0-b62f-11ed-a677-43d7aa86763b","name":"panel_4","type":"visualization"}],"type":"dashboard","updated_at":"2023-02-26T23:44:09.855Z","version":"WzczLDdd"}', + }, + { + body: '{"exportedCount":9,"missingRefCount":0,"missingReferences":[]}', + }, + ], + }, + ], + }, + showModal: () => {}, + loading: false, }; diff --git a/public/components/integrations/components/available_integration_overview_page.tsx b/public/components/integrations/components/available_integration_overview_page.tsx index 74a03b541a..9b5a68205c 100644 --- a/public/components/integrations/components/available_integration_overview_page.tsx +++ b/public/components/integrations/components/available_integration_overview_page.tsx @@ -33,14 +33,17 @@ interface AppTableProps extends AppAnalyticsComponentDeps { export interface AvailableIntegrationType { name: string; description: string; - status: string; assetUrl?: string | undefined; + version?: string | undefined; + integrationType: string; + statics: any; + components: any[]; + displayAssets: any[]; } export interface AvailableIntegrationsTableProps { loading: boolean; data: AvailableIntegrationsList; - records: number; showModal: (input: string) => void; } @@ -50,7 +53,6 @@ export interface AvailableIntegrationsList { export interface AvailableIntegrationsCardViewProps { data: AvailableIntegrationsList; - records: number; showModal: (input: string) => void; } @@ -148,8 +150,8 @@ export function AvailableIntegrationOverviewPage(props: AppTableProps) { /> {isCardView - ? AvailableIntegrationsCardView({ data, records: 6, showModal: getModal }) - : AvailableIntegrationsTable({ loading: false, data, records: 6, showModal: getModal })} + ? AvailableIntegrationsCardView({ data, showModal: getModal }) + : AvailableIntegrationsTable({ loading: false, data, showModal: getModal })} {isModalVisible && modalLayout} diff --git a/public/components/integrations/components/available_integration_table.tsx b/public/components/integrations/components/available_integration_table.tsx index 487cf07642..f2507ab6bd 100644 --- a/public/components/integrations/components/available_integration_table.tsx +++ b/public/components/integrations/components/available_integration_table.tsx @@ -18,7 +18,7 @@ import React from 'react'; import { AvailableIntegrationsTableProps } from './available_integration_overview_page'; export function AvailableIntegrationsTable(props: AvailableIntegrationsTableProps) { - const integrations = props.data.data; + const integrations = props.data.hits; const tableColumns = [ { @@ -28,10 +28,10 @@ export function AvailableIntegrationsTable(props: AvailableIntegrationsTableProp truncateText: true, render: (value, record) => ( - {_.truncate(record.templateName, { length: 100 })} + {_.truncate(record.name, { length: 100 })} ), }, From a41a40a9dc0c8f77f395dcb4b459c89828bd23e4 Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Tue, 30 May 2023 11:33:27 -0400 Subject: [PATCH 092/190] add an added integration table test using dummy data Signed-off-by: Derek Ho --- .../added_integration_table.test.tsx.snap | 2184 +++++++++++++++++ .../added_integration_table.test.tsx | 22 + .../components/__tests__/testing_constants.ts | 153 ++ .../added_integration_overview_page.tsx | 8 +- 4 files changed, 2366 insertions(+), 1 deletion(-) create mode 100644 public/components/integrations/components/__tests__/__snapshots__/added_integration_table.test.tsx.snap create mode 100644 public/components/integrations/components/__tests__/added_integration_table.test.tsx diff --git a/public/components/integrations/components/__tests__/__snapshots__/added_integration_table.test.tsx.snap b/public/components/integrations/components/__tests__/__snapshots__/added_integration_table.test.tsx.snap new file mode 100644 index 0000000000..f602b04ddf --- /dev/null +++ b/public/components/integrations/components/__tests__/__snapshots__/added_integration_table.test.tsx.snap @@ -0,0 +1,2184 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Added Integration Table View Test Renders added integration table view using dummy data 1`] = ` + + +
+ +
+ +

+ Added Integrations +

+
+
+
+ +
+ + +
+ + +
+ +
+ + + +
+
+ + + + +
+ + + + + +
+
+
+
+
+
+
+
+
+ +
+ + +
+ + + Type + + } + closePopover={[Function]} + display="inlineBlock" + hasArrow={true} + id="field_value_selection_0" + isOpen={false} + ownFocus={true} + panelClassName="euiFilterGroup__popoverPanel" + panelPaddingSize="none" + > +
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+ + +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + Asset name + + + + + + + + + + + + Source + + + + + + + + + + + + Type + + + + + + + + + + + + Date Added + + + + + + + + + + + + Added By + + + + + + + + + + + + Status + + + + + +
+
+ Asset name +
+ +
+
+ Source +
+
+ + + nginx + + +
+
+
+ Type +
+
+ +
+ +
+
+
+ Date Added +
+
+ +
+ 2023-05-30T14:56:30.139Z +
+
+
+
+
+ Added By +
+
+ +
+ unknown +
+
+
+
+
+ Status +
+
+ +
+ unknown +
+
+
+
+
+ Asset name +
+ +
+
+ Source +
+
+ + + nginx + + +
+
+
+ Type +
+
+ +
+ +
+
+
+ Date Added +
+
+ +
+ 2023-05-30T14:56:35.137Z +
+
+
+
+
+ Added By +
+
+ +
+ unknown +
+
+
+
+
+ Status +
+
+ +
+ unknown +
+
+
+
+
+
+ +
+ +
+ + + +
+ +
+ + + : + 10 + + } + closePopover={[Function]} + display="inlineBlock" + hasArrow={true} + isOpen={false} + ownFocus={true} + panelPaddingSize="none" + > +
+
+ + + +
+
+
+
+
+ +
+ + + +
+
+
+
+
+
+ +
+ +
+ +
+ + +`; diff --git a/public/components/integrations/components/__tests__/added_integration_table.test.tsx b/public/components/integrations/components/__tests__/added_integration_table.test.tsx new file mode 100644 index 0000000000..15b415c0db --- /dev/null +++ b/public/components/integrations/components/__tests__/added_integration_table.test.tsx @@ -0,0 +1,22 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { configure, mount } from 'enzyme'; +import Adapter from 'enzyme-adapter-react-16'; +import { waitFor } from '@testing-library/react'; +import { AddedIntegrationsTable } from '../added_integration_table'; +import { addedIntegrationData } from './testing_constants'; + +describe('Added Integration Table View Test', () => { + configure({ adapter: new Adapter() }); + + it('Renders added integration table view using dummy data', async () => { + const wrapper = mount(AddedIntegrationsTable(addedIntegrationData)); + + await waitFor(() => { + expect(wrapper).toMatchSnapshot(); + }); + }); +}); diff --git a/public/components/integrations/components/__tests__/testing_constants.ts b/public/components/integrations/components/__tests__/testing_constants.ts index 45c2aa8398..d5ec90dd4c 100644 --- a/public/components/integrations/components/__tests__/testing_constants.ts +++ b/public/components/integrations/components/__tests__/testing_constants.ts @@ -1,3 +1,4 @@ +import { AddedIntegrationsTableProps } from '../added_integration_overview_page'; import { AvailableIntegrationsCardViewProps, AvailableIntegrationsTableProps, @@ -191,3 +192,155 @@ export const availableTableViewData: AvailableIntegrationsTableProps = { showModal: () => {}, loading: false, }; + +export const addedIntegrationData: AddedIntegrationsTableProps = { + data: { + hits: [ + { + name: 'Placeholder Nginx Integration', + templateName: 'nginx', + dataSource: { + sourceType: 'logs', + dataset: 'nginx', + namespace: 'prod', + }, + creationDate: '2023-05-30T14:56:30.139Z', + status: 'unknown', + assets: [ + { + assetType: 'index-pattern', + assetId: '47892350-b495-11ed-af0a-cf5c93b5a3b6', + status: 'available', + isDefaultAsset: false, + }, + { + assetType: 'search', + assetId: 'd80e05b2-518c-4c3d-9651-4c9d8632dce4', + status: 'available', + isDefaultAsset: false, + }, + { + assetType: 'visualization', + assetId: '3b49a65d-54d8-483d-a8f0-3d7c855e1ecf', + status: 'available', + isDefaultAsset: false, + }, + { + assetType: 'search', + assetId: '9f820fbe-ddde-43a2-9402-30bd295c97f6', + status: 'available', + isDefaultAsset: false, + }, + { + assetType: 'visualization', + assetId: '865e577b-634b-4a65-b9d6-7e324c395d18', + status: 'available', + isDefaultAsset: false, + }, + { + assetType: 'visualization', + assetId: 'dc1803f0-b478-11ed-9063-ebe46f9ac203', + status: 'available', + isDefaultAsset: false, + }, + { + assetType: 'visualization', + assetId: '99acc580-b47a-11ed-9063-ebe46f9ac203', + status: 'available', + isDefaultAsset: false, + }, + { + assetType: 'visualization', + assetId: '01ea64d0-b62f-11ed-a677-43d7aa86763b', + status: 'available', + isDefaultAsset: false, + }, + { + assetType: 'dashboard', + assetId: '96847220-5261-44d0-89b4-65f3a659f13a', + status: 'available', + isDefaultAsset: true, + }, + { + status: 'available', + isDefaultAsset: false, + }, + ], + addedBy: 'unknown', + }, + { + name: 'Placeholder Nginx Integration', + templateName: 'nginx', + dataSource: { + sourceType: 'logs', + dataset: 'nginx', + namespace: 'prod', + }, + creationDate: '2023-05-30T14:56:35.137Z', + status: 'unknown', + assets: [ + { + assetType: 'index-pattern', + assetId: '47892350-b495-11ed-af0a-cf5c93b5a3b6', + status: 'available', + isDefaultAsset: false, + }, + { + assetType: 'search', + assetId: 'd80e05b2-518c-4c3d-9651-4c9d8632dce4', + status: 'available', + isDefaultAsset: false, + }, + { + assetType: 'visualization', + assetId: '3b49a65d-54d8-483d-a8f0-3d7c855e1ecf', + status: 'available', + isDefaultAsset: false, + }, + { + assetType: 'search', + assetId: '9f820fbe-ddde-43a2-9402-30bd295c97f6', + status: 'available', + isDefaultAsset: false, + }, + { + assetType: 'visualization', + assetId: '865e577b-634b-4a65-b9d6-7e324c395d18', + status: 'available', + isDefaultAsset: false, + }, + { + assetType: 'visualization', + assetId: 'dc1803f0-b478-11ed-9063-ebe46f9ac203', + status: 'available', + isDefaultAsset: false, + }, + { + assetType: 'visualization', + assetId: '99acc580-b47a-11ed-9063-ebe46f9ac203', + status: 'available', + isDefaultAsset: false, + }, + { + assetType: 'visualization', + assetId: '01ea64d0-b62f-11ed-a677-43d7aa86763b', + status: 'available', + isDefaultAsset: false, + }, + { + assetType: 'dashboard', + assetId: '96847220-5261-44d0-89b4-65f3a659f13a', + status: 'available', + isDefaultAsset: true, + }, + { + status: 'available', + isDefaultAsset: false, + }, + ], + addedBy: 'unknown', + }, + ], + }, + loading: false, +}; diff --git a/public/components/integrations/components/added_integration_overview_page.tsx b/public/components/integrations/components/added_integration_overview_page.tsx index e1b953e61d..49a4cb8942 100644 --- a/public/components/integrations/components/added_integration_overview_page.tsx +++ b/public/components/integrations/components/added_integration_overview_page.tsx @@ -30,7 +30,13 @@ export interface AddedIntegrationsList { } export interface AddedIntegrationType { - dashboardUrl: string; + name: string; + templateName: string; + dataSource: any; + creationDate: string; + status: string; + assets: any[]; + addedBy: string; } export function AddedIntegrationOverviewPage(props: AppTableProps) { From b09395cf727214694356bed6edbfe19b836f4138 Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Tue, 30 May 2023 12:00:44 -0400 Subject: [PATCH 093/190] add integration specific types and clean up code Signed-off-by: Derek Ho --- .../added_integration_overview_page.tsx | 12 +--- .../available_integration_overview_page.tsx | 12 +--- .../components/integration_card.tsx | 65 ------------------- .../components/integration_types.ts | 15 +++++ public/components/integrations/home.tsx | 37 +---------- 5 files changed, 22 insertions(+), 119 deletions(-) delete mode 100644 public/components/integrations/components/integration_card.tsx create mode 100644 public/components/integrations/components/integration_types.ts diff --git a/public/components/integrations/components/added_integration_overview_page.tsx b/public/components/integrations/components/added_integration_overview_page.tsx index 49a4cb8942..735c1a8ad3 100644 --- a/public/components/integrations/components/added_integration_overview_page.tsx +++ b/public/components/integrations/components/added_integration_overview_page.tsx @@ -7,18 +7,10 @@ import { EuiPage, EuiPageBody } from '@elastic/eui'; import _ from 'lodash'; import React, { useEffect, useState } from 'react'; -import { AppAnalyticsComponentDeps } from '../home'; -import { ApplicationType } from '../../../../common/types/application_analytics'; import { IntegrationHeader } from './integration_header'; import { AddedIntegrationsTable } from './added_integration_table'; import { INTEGRATIONS_BASE } from '../../../../common/constants/shared'; - -export interface AppTableProps extends AppAnalyticsComponentDeps { - loading: boolean; - applications: ApplicationType[]; - clearStorage: () => void; - moveToApp: (id: string, type: string) => void; -} +import { AddedIntegrationOverviewPageProps } from './integration_types'; export interface AddedIntegrationsTableProps { loading: boolean; @@ -39,7 +31,7 @@ export interface AddedIntegrationType { addedBy: string; } -export function AddedIntegrationOverviewPage(props: AppTableProps) { +export function AddedIntegrationOverviewPage(props: AddedIntegrationOverviewPageProps) { const { chrome, parentBreadcrumbs, http } = props; const [data, setData] = useState({ hits: [] }); diff --git a/public/components/integrations/components/available_integration_overview_page.tsx b/public/components/integrations/components/available_integration_overview_page.tsx index 9b5a68205c..b613963e23 100644 --- a/public/components/integrations/components/available_integration_overview_page.tsx +++ b/public/components/integrations/components/available_integration_overview_page.tsx @@ -15,20 +15,12 @@ import { import _ from 'lodash'; import React, { ReactChild, useEffect, useState } from 'react'; import { Toast } from '@elastic/eui/src/components/toast/global_toast_list'; -import { AppAnalyticsComponentDeps } from '../home'; -import { ApplicationType } from '../../../../common/types/application_analytics'; import { IntegrationHeader } from './integration_header'; import { AvailableIntegrationsTable } from './available_integration_table'; import { AvailableIntegrationsCardView } from './available_integration_card_view'; import { INTEGRATIONS_BASE } from '../../../../common/constants/shared'; import { getAddIntegrationModal } from './add_integration_modal'; - -interface AppTableProps extends AppAnalyticsComponentDeps { - loading: boolean; - applications: ApplicationType[]; - clearStorage: () => void; - moveToApp: (id: string, type: string) => void; -} +import { AvailableIntegrationOverviewPageProps } from './integration_types'; export interface AvailableIntegrationType { name: string; @@ -56,7 +48,7 @@ export interface AvailableIntegrationsCardViewProps { showModal: (input: string) => void; } -export function AvailableIntegrationOverviewPage(props: AppTableProps) { +export function AvailableIntegrationOverviewPage(props: AvailableIntegrationOverviewPageProps) { const { chrome, parentBreadcrumbs, http } = props; const [isCardView, setCardView] = useState(true); diff --git a/public/components/integrations/components/integration_card.tsx b/public/components/integrations/components/integration_card.tsx deleted file mode 100644 index 38f8c1e33c..0000000000 --- a/public/components/integrations/components/integration_card.tsx +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -import { EuiButton, EuiCard, EuiIcon } from '@elastic/eui'; -import React from 'react'; - -export function Synopsis({ - id, - description, - iconUrl, - iconType, - title, - url, - wrapInPanel, - onClick, - isBeta, -}) { - let optionalImg; - if (iconUrl) { - optionalImg = ; - } else if (iconType) { - optionalImg = ; - } - - // const classes = classNames('homSynopsis__card', { - // 'homSynopsis__card--noPanel': !wrapInPanel, - // }); - - return ( - - Choice One -
- } - /> - ); -} - -// Synopsis.propTypes = { -// description: PropTypes.string.isRequired, -// iconUrl: PropTypes.string, -// iconType: PropTypes.string, -// title: PropTypes.string.isRequired, -// url: PropTypes.string, -// onClick: PropTypes.func, -// isBeta: PropTypes.bool, -// }; - -// Synopsis.defaultProps = { -// isBeta: false, -// }; diff --git a/public/components/integrations/components/integration_types.ts b/public/components/integrations/components/integration_types.ts new file mode 100644 index 0000000000..0ae64fa81e --- /dev/null +++ b/public/components/integrations/components/integration_types.ts @@ -0,0 +1,15 @@ +import { ChromeBreadcrumb, ChromeStart, HttpStart } from '../../../../../../src/core/public'; + +export interface AvailableIntegrationOverviewPageProps { + parentBreadcrumb: ChromeBreadcrumb; + http: HttpStart; + chrome: ChromeStart; + parentBreadcrumbs: ChromeBreadcrumb[]; +} + +export interface AddedIntegrationOverviewPageProps { + parentBreadcrumb: ChromeBreadcrumb; + http: HttpStart; + chrome: ChromeStart; + parentBreadcrumbs: ChromeBreadcrumb[]; +} diff --git a/public/components/integrations/home.tsx b/public/components/integrations/home.tsx index 0dc6c6f2db..e1982627c3 100644 --- a/public/components/integrations/home.tsx +++ b/public/components/integrations/home.tsx @@ -10,16 +10,13 @@ import DSLService from 'public/services/requests/dsl'; import PPLService from 'public/services/requests/ppl'; import SavedObjects from 'public/services/saved_objects/event_analytics/saved_objects'; import TimestampUtils from 'public/services/timestamp/timestamp'; -import { EuiGlobalToastList, EuiLink } from '@elastic/eui'; +import { EuiGlobalToastList } from '@elastic/eui'; import { Toast } from '@elastic/eui/src/components/toast/global_toast_list'; -import { last } from 'lodash'; -import { useDispatch } from 'react-redux'; import { Integration } from './components/integration'; import { TraceAnalyticsComponentDeps, TraceAnalyticsCoreDeps } from '../trace_analytics/home'; import { FilterType } from '../trace_analytics/components/common/filters/filters'; import { handleDataPrepperIndicesExistRequest } from '../trace_analytics/requests/request_handler'; import { ChromeBreadcrumb, NotificationsStart } from '../../../../../src/core/public'; -import { ApplicationType } from '../../../common/types/application_analytics'; import { QueryManager } from '../../../common/query_manager/ppl_query_manager'; import { AvailableIntegrationOverviewPage } from './components/available_integration_overview_page'; import { Sidebar } from './components/integration_side_nav'; @@ -62,8 +59,6 @@ export const Home = (props: HomeProps) => { queryManager, } = props; const [triggerSwitchToEvent, setTriggerSwitchToEvent] = useState(0); - const dispatch = useDispatch(); - const [applicationList, setApplicationList] = useState([]); const [toasts, setToasts] = useState([]); const [indicesExist, setIndicesExist] = useState(true); const [appConfigs, setAppConfigs] = useState([]); @@ -134,20 +129,6 @@ export const Home = (props: HomeProps) => { setToasts([...toasts, { id: new Date().toISOString(), title, text, color } as Toast]); }; - const clearStorage = () => { - setNameWithStorage(''); - setDescriptionWithStorage(''); - setFiltersWithStorage([]); - setQueryWithStorage(''); - }; - - const moveToApp = (id: string, type: string) => { - window.location.assign(`${last(parentBreadcrumbs)!.href}application_analytics/${id}`); - if (type === 'createSetAvailability') { - setTriggerSwitchToEvent(2); - } - }; - const callback = (childFunc: () => void) => { if (childFunc && triggerSwitchToEvent > 0) { childFunc(); @@ -171,13 +152,7 @@ export const Home = (props: HomeProps) => { path={['/', '/available']} render={() => ( - + )} /> @@ -186,13 +161,7 @@ export const Home = (props: HomeProps) => { path={'/added'} render={() => ( - + )} /> From fd802b092fa3fb504046ec2e2003d33c1c2be439 Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Tue, 30 May 2023 12:20:59 -0400 Subject: [PATCH 094/190] clean up code and use integration specific types Signed-off-by: Derek Ho --- .../components/added_integration.tsx | 48 +----- .../integrations/components/integration.tsx | 47 +----- .../components/integration_types.ts | 22 ++- public/components/integrations/home.tsx | 139 +----------------- 4 files changed, 40 insertions(+), 216 deletions(-) diff --git a/public/components/integrations/components/added_integration.tsx b/public/components/integrations/components/added_integration.tsx index 64ec04fe5c..256a02353f 100644 --- a/public/components/integrations/components/added_integration.tsx +++ b/public/components/integrations/components/added_integration.tsx @@ -24,52 +24,18 @@ import { EuiText, EuiTitle, } from '@elastic/eui'; -import DSLService from 'public/services/requests/dsl'; -import PPLService from 'public/services/requests/ppl'; -import SavedObjects from 'public/services/saved_objects/event_analytics/saved_objects'; -import TimestampUtils from 'public/services/timestamp/timestamp'; import React, { ReactChild, useEffect, useState } from 'react'; import { last } from 'lodash'; import { Toast } from '@elastic/eui/src/components/toast/global_toast_list'; import _ from 'lodash'; import { PanelTitle } from '../../trace_analytics/components/common/helper_functions'; -import { TAB_EVENT_ID, TAB_CHART_ID, FILTER_OPTIONS } from '../../../../common/constants/explorer'; -import { NotificationsStart } from '../../../../../../src/core/public'; -import { AppAnalyticsComponentDeps } from '../home'; -import { - ApplicationRequestType, - ApplicationType, -} from '../../../../common/types/application_analytics'; -import { QueryManager } from '../../../../common/query_manager/ppl_query_manager'; +import { FILTER_OPTIONS } from '../../../../common/constants/explorer'; import { OBSERVABILITY_BASE } from '../../../../common/constants/shared'; import { DeleteModal } from '../../common/helpers/delete_modal'; +import { AddedIntegrationProps } from './integration_types'; -const searchBarConfigs = { - [TAB_EVENT_ID]: { - showSaveButton: false, - showSavePanelOptionsList: false, - }, - [TAB_CHART_ID]: { - showSaveButton: true, - showSavePanelOptionsList: false, - }, -}; - -interface AppDetailProps extends AppAnalyticsComponentDeps { - disabled?: boolean; - appId: string; - pplService: PPLService; - dslService: DSLService; - savedObjects: SavedObjects; - timestampUtils: TimestampUtils; - notifications: NotificationsStart; - queryManager: QueryManager; - updateApp: (appId: string, updateAppData: Partial, type: string) => void; - callback: (childfunction: () => void) => void; -} - -export function AddedIntegration(props: AppDetailProps) { - const { http, appId, chrome, parentBreadcrumbs } = props; +export function AddedIntegration(props: AddedIntegrationProps) { + const { http, integrationInstanceId, chrome, parentBreadcrumbs } = props; const [toasts, setToasts] = useState([]); const [stateData, setData] = useState({ data: {} }); @@ -86,12 +52,12 @@ export function AddedIntegration(props: AppDetailProps) { href: '#/added', }, { - text: appId, - href: `${last(parentBreadcrumbs)!.href}integrations/added/${appId}`, + text: integrationInstanceId, + href: `${last(parentBreadcrumbs)!.href}integrations/added/${integrationInstanceId}`, }, ]); handleDataRequest(); - }, [appId]); + }, [integrationInstanceId]); const [isModalVisible, setIsModalVisible] = useState(false); const [modalLayout, setModalLayout] = useState(); diff --git a/public/components/integrations/components/integration.tsx b/public/components/integrations/components/integration.tsx index f94e839582..7b96b4262d 100644 --- a/public/components/integrations/components/integration.tsx +++ b/public/components/integrations/components/integration.tsx @@ -5,54 +5,19 @@ /* eslint-disable react-hooks/exhaustive-deps */ import { EuiGlobalToastList, EuiOverlayMask, EuiPage, EuiPageBody, EuiSpacer } from '@elastic/eui'; -import DSLService from 'public/services/requests/dsl'; -import PPLService from 'public/services/requests/ppl'; -import SavedObjects from 'public/services/saved_objects/event_analytics/saved_objects'; -import TimestampUtils from 'public/services/timestamp/timestamp'; import React, { ReactChild, useEffect, useState } from 'react'; import { last } from 'lodash'; import { Toast } from '@elastic/eui/src/components/toast/global_toast_list'; -import { TAB_EVENT_ID, TAB_CHART_ID, NEW_TAB } from '../../../../common/constants/explorer'; -import { NotificationsStart } from '../../../../../../src/core/public'; -import { AppAnalyticsComponentDeps } from '../home'; -import { - ApplicationRequestType, - ApplicationType, -} from '../../../../common/types/application_analytics'; -import { QueryManager } from '../../../../common/query_manager/ppl_query_manager'; import { IntegrationOverview } from './integration_overview_panel'; import { IntegrationDetails } from './integration_details_panel'; import { IntegrationFields } from './integration_fields_panel'; import { IntegrationAssets } from './integration_assets_panel'; import { getAddIntegrationModal } from './add_integration_modal'; import { OBSERVABILITY_BASE } from '../../../../common/constants/shared'; +import { AvailableIntegrationProps } from './integration_types'; -const searchBarConfigs = { - [TAB_EVENT_ID]: { - showSaveButton: false, - showSavePanelOptionsList: false, - }, - [TAB_CHART_ID]: { - showSaveButton: true, - showSavePanelOptionsList: false, - }, -}; - -interface AppDetailProps extends AppAnalyticsComponentDeps { - disabled?: boolean; - appId: string; - pplService: PPLService; - dslService: DSLService; - savedObjects: SavedObjects; - timestampUtils: TimestampUtils; - notifications: NotificationsStart; - queryManager: QueryManager; - updateApp: (appId: string, updateAppData: Partial, type: string) => void; - callback: (childfunction: () => void) => void; -} - -export function Integration(props: AppDetailProps) { - const { http, appId, chrome, parentBreadcrumbs } = props; +export function Integration(props: AvailableIntegrationProps) { + const { http, integrationTemplateId, chrome, parentBreadcrumbs } = props; const [isModalVisible, setIsModalVisible] = useState(false); const [modalLayout, setModalLayout] = useState(); @@ -91,12 +56,12 @@ export function Integration(props: AppDetailProps) { href: '#/integrations', }, { - text: appId, - href: `${last(parentBreadcrumbs)!.href}integrations/${appId}`, + text: integrationTemplateId, + href: `${last(parentBreadcrumbs)!.href}integrations/${integrationTemplateId}`, }, ]); handleDataRequest(); - }, [appId]); + }, [integrationTemplateId]); async function handleDataRequest() { http.get(`${OBSERVABILITY_BASE}/repository/id`).then((exists) => setData(exists)); diff --git a/public/components/integrations/components/integration_types.ts b/public/components/integrations/components/integration_types.ts index 0ae64fa81e..cbea6869d2 100644 --- a/public/components/integrations/components/integration_types.ts +++ b/public/components/integrations/components/integration_types.ts @@ -1,15 +1,33 @@ import { ChromeBreadcrumb, ChromeStart, HttpStart } from '../../../../../../src/core/public'; export interface AvailableIntegrationOverviewPageProps { - parentBreadcrumb: ChromeBreadcrumb; http: HttpStart; chrome: ChromeStart; parentBreadcrumbs: ChromeBreadcrumb[]; } export interface AddedIntegrationOverviewPageProps { - parentBreadcrumb: ChromeBreadcrumb; http: HttpStart; chrome: ChromeStart; parentBreadcrumbs: ChromeBreadcrumb[]; } + +export interface AvailableIntegrationProps { + http: HttpStart; + chrome: ChromeStart; + parentBreadcrumbs: ChromeBreadcrumb[]; +} + +export interface AddedIntegrationProps { + http: HttpStart; + chrome: ChromeStart; + parentBreadcrumbs: ChromeBreadcrumb[]; + integrationInstanceId: string; +} + +export interface AvailableIntegrationProps { + http: HttpStart; + chrome: ChromeStart; + parentBreadcrumbs: ChromeBreadcrumb[]; + integrationTemplateId: string; +} diff --git a/public/components/integrations/home.tsx b/public/components/integrations/home.tsx index e1982627c3..919e9c5081 100644 --- a/public/components/integrations/home.tsx +++ b/public/components/integrations/home.tsx @@ -2,22 +2,14 @@ * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ -/* eslint-disable react-hooks/exhaustive-deps */ -import React, { ReactChild, useEffect, useState } from 'react'; +import React, { useState } from 'react'; import { HashRouter, Route, RouteComponentProps, Switch } from 'react-router-dom'; -import DSLService from 'public/services/requests/dsl'; -import PPLService from 'public/services/requests/ppl'; -import SavedObjects from 'public/services/saved_objects/event_analytics/saved_objects'; -import TimestampUtils from 'public/services/timestamp/timestamp'; import { EuiGlobalToastList } from '@elastic/eui'; import { Toast } from '@elastic/eui/src/components/toast/global_toast_list'; import { Integration } from './components/integration'; -import { TraceAnalyticsComponentDeps, TraceAnalyticsCoreDeps } from '../trace_analytics/home'; -import { FilterType } from '../trace_analytics/components/common/filters/filters'; -import { handleDataPrepperIndicesExistRequest } from '../trace_analytics/requests/request_handler'; -import { ChromeBreadcrumb, NotificationsStart } from '../../../../../src/core/public'; -import { QueryManager } from '../../../common/query_manager/ppl_query_manager'; +import { TraceAnalyticsCoreDeps } from '../trace_analytics/home'; +import { ChromeBreadcrumb } from '../../../../../src/core/public'; import { AvailableIntegrationOverviewPage } from './components/available_integration_overview_page'; import { Sidebar } from './components/integration_side_nav'; import { AddedIntegrationOverviewPage } from './components/added_integration_overview_page'; @@ -26,114 +18,17 @@ import { AddedIntegration } from './components/added_integration'; export type AppAnalyticsCoreDeps = TraceAnalyticsCoreDeps; interface HomeProps extends RouteComponentProps, AppAnalyticsCoreDeps { - pplService: PPLService; - dslService: DSLService; - savedObjects: SavedObjects; - timestampUtils: TimestampUtils; - notifications: NotificationsStart; - queryManager: QueryManager; - parentBreadcrumbs: ChromeBreadcrumb[]; -} - -export interface AppAnalyticsComponentDeps extends TraceAnalyticsComponentDeps { - name: string; - description: string; - setNameWithStorage: (newName: string) => void; - setDescriptionWithStorage: (newDescription: string) => void; - setQueryWithStorage: (newQuery: string) => void; - setFiltersWithStorage: (newFilters: FilterType[]) => void; - setAppConfigs: (newAppConfigs: FilterType[]) => void; parentBreadcrumbs: ChromeBreadcrumb[]; } export const Home = (props: HomeProps) => { - const { - pplService, - dslService, - timestampUtils, - savedObjects, - parentBreadcrumbs, - http, - chrome, - notifications, - queryManager, - } = props; - const [triggerSwitchToEvent, setTriggerSwitchToEvent] = useState(0); + const { parentBreadcrumbs, http, chrome } = props; const [toasts, setToasts] = useState([]); - const [indicesExist, setIndicesExist] = useState(true); - const [appConfigs, setAppConfigs] = useState([]); - const storedFilters = sessionStorage.getItem('AppAnalyticsFilters'); - const [filters, setFilters] = useState( - storedFilters ? JSON.parse(storedFilters) : [] - ); - const [name, setName] = useState(sessionStorage.getItem('AppAnalyticsName') || ''); - const [description, setDescription] = useState( - sessionStorage.getItem('AppAnalyticsDescription') || '' - ); - const [query, setQuery] = useState(sessionStorage.getItem('AppAnalyticsQuery') || ''); - const [startTime, setStartTime] = useState( - sessionStorage.getItem('AppAnalyticsStartTime') || 'now-24h' - ); - const [endTime, setEndTime] = useState( - sessionStorage.getItem('AppAnalyticsEndTime') || 'now' - ); - // Setting state with storage to save input when user refreshes page - const setFiltersWithStorage = (newFilters: FilterType[]) => { - setFilters(newFilters); - sessionStorage.setItem('AppAnalyticsFilters', JSON.stringify(newFilters)); - }; - const setNameWithStorage = (newName: string) => { - setName(newName); - sessionStorage.setItem('AppAnalyticsName', newName); - }; - const setDescriptionWithStorage = (newDescription: string) => { - setDescription(newDescription); - sessionStorage.setItem('AppAnalyticsDescription', newDescription); - }; - const setQueryWithStorage = (newQuery: string) => { - setQuery(newQuery); - sessionStorage.setItem('AppAnalyticsQuery', newQuery); - }; - - useEffect(() => { - handleDataPrepperIndicesExistRequest(http, setIndicesExist); - }, []); - - const commonProps: AppAnalyticsComponentDeps = { + const commonProps = { parentBreadcrumbs, http, chrome, - name, - setNameWithStorage, - description, - setDescriptionWithStorage, - query, - setQuery, - setQueryWithStorage, - appConfigs, - setAppConfigs, - filters, - setFilters, - setFiltersWithStorage, - startTime, - setStartTime, - endTime, - setEndTime, - mode: 'data_prepper', - dataPrepperIndicesExist: indicesExist, - }; - - const setToast = (title: string, color = 'success', text?: ReactChild) => { - if (!text) text = ''; - setToasts([...toasts, { id: new Date().toISOString(), title, text, color } as Toast]); - }; - - const callback = (childFunc: () => void) => { - if (childFunc && triggerSwitchToEvent > 0) { - childFunc(); - setTriggerSwitchToEvent(triggerSwitchToEvent - 1); - } }; return ( @@ -171,17 +66,7 @@ export const Home = (props: HomeProps) => { render={(routerProps) => ( @@ -193,17 +78,7 @@ export const Home = (props: HomeProps) => { render={(routerProps) => ( From 1ecf4cbfd769e8667f8f07a237fe7b9f0a3c4efd Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Tue, 30 May 2023 10:54:08 -0700 Subject: [PATCH 095/190] Route integrations page to actual repository Signed-off-by: Simeon Widdis --- .../integrations/components/integration.tsx | 95 ++----------------- .../components/integration_details_panel.tsx | 2 +- .../integrations_kibana_backend.ts | 12 ++- server/adaptors/integrations/types.ts | 2 +- .../integrations/integrations_router.ts | 31 +++--- 5 files changed, 34 insertions(+), 108 deletions(-) diff --git a/public/components/integrations/components/integration.tsx b/public/components/integrations/components/integration.tsx index d20f518aac..3b18bfcb7e 100644 --- a/public/components/integrations/components/integration.tsx +++ b/public/components/integrations/components/integration.tsx @@ -25,7 +25,7 @@ import { IntegrationDetails } from './integration_details_panel'; import { IntegrationFields } from './integration_fields_panel'; import { IntegrationAssets } from './integration_assets_panel'; import { getAddIntegrationModal } from './add_integration_modal'; -import { OBSERVABILITY_BASE } from '../../../../common/constants/shared'; +import { INTEGRATIONS_BASE, OBSERVABILITY_BASE } from '../../../../common/constants/shared'; const searchBarConfigs = { [TAB_EVENT_ID]: { @@ -89,87 +89,7 @@ export function Integration(props: AppDetailProps) { const [modalLayout, setModalLayout] = useState(); const [toasts, setToasts] = useState([]); const [data, setData] = useState({ - data: { - name: 'nginx', - version: '1.0.0', - author: 'John Doe', - sourceUrl: 'https://github.com/Swiddis/dashboards-observability/tree/placeholder', - license: 'Apache-2.0', - integrationType: 'logs', - description: 'Nginx HTTP server collector', - statics: { - mapping: { - logo: '/logo', - }, - }, - components: [ - { - name: 'communication', - version: '1.0.0', - schemaBody: - '{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://opensearch.org/schemas/observability/Communication","title":"Communication","type":"object","properties":{"source":{"type":"object","properties":{"sock.family":{"type":"string"},"source":{"$ref":"#/definitions/Source"},"destination":{"$ref":"#/definitions/Destination"}}},"destination":{"type":"object","properties":{}}},"definitions":{"Source":{"$id":"#/definitions/Source","type":"object","additionalProperties":true,"properties":{"address":{"type":"string"},"domain":{"type":"string"},"bytes":{"type":"integer"},"ip":{"type":"string"},"port":{"type":"integer"},"mac":{"type":"string"},"packets":{"type":"integer"}},"title":"Source"},"Destination":{"$id":"#/definitions/Destination","type":"object","additionalProperties":true,"properties":{"address":{"type":"string"},"domain":{"type":"string"},"bytes":{"type":"integer"},"ip":{"type":"string"},"port":{"type":"integer"},"mac":{"type":"string"},"packets":{"type":"integer"}},"title":"Destination"}}}', - mappingBody: - '{"template":{"mappings":{"_meta":{"version":"1.0.0","catalog":"observability","type":"logs","component":"communication"},"properties":{"communication":{"properties":{"sock.family":{"type":"keyword","ignore_above":256},"source":{"type":"object","properties":{"address":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":1024}}},"domain":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":1024}}},"bytes":{"type":"long"},"ip":{"type":"ip"},"port":{"type":"long"},"mac":{"type":"keyword","ignore_above":1024},"packets":{"type":"long"}}},"destination":{"type":"object","properties":{"address":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":1024}}},"domain":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":1024}}},"bytes":{"type":"long"},"ip":{"type":"ip"},"port":{"type":"long"},"mac":{"type":"keyword","ignore_above":1024},"packets":{"type":"long"}}}}}}}}}', - }, - { - name: 'http', - version: '1.0.0', - schemaBody: - '{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://opensearch.org/schemas/observability/Http","title":"Http","type":"object","properties":{"request":{"$ref":"#/definitions/Request"},"response":{"$ref":"#/definitions/Response"},"flavor":{"type":"string"},"user_agent":{"type":"string"},"url":{"type":"string"},"schema":{"type":"string"},"target":{"type":"string"},"route":{"type":"string"},"client_ip":{"type":"string"},"resent_count":{"type":"integer"}},"definitions":{"Request":{"$id":"#/definitions/Request","type":"object","additionalProperties":true,"properties":{"id":{"type":"string"},"body.content":{"type":"string"},"bytes":{"type":"integer"},"method":{"type":"string"},"referrer":{"type":"string"},"header":{"type":"string"},"mime_type":{"type":"object"}},"title":"Request"},"Response":{"$id":"#/definitions/Response","type":"object","additionalProperties":true,"properties":{"id":{"type":"string"},"body.content":{"type":"string"},"bytes":{"type":"integer"},"status_code":{"type":"integer"},"header":{"type":"object"}},"title":"Response"}}}', - mappingBody: - '{"template":{"mappings":{"_meta":{"version":"1.0.0","catalog":"observability","type":"logs","component":"http"},"dynamic_templates":[{"request_header_map":{"mapping":{"type":"keyword"},"path_match":"request.header.*"}},{"response_header_map":{"mapping":{"type":"keyword"},"path_match":"response.header.*"}}],"properties":{"http":{"properties":{"flavor":{"type":"keyword","ignore_above":256},"user_agent":{"type":"keyword","ignore_above":2048},"url":{"type":"keyword","ignore_above":2048},"schema":{"type":"keyword","ignore_above":1024},"target":{"type":"keyword","ignore_above":1024},"route":{"type":"keyword","ignore_above":1024},"client.ip":{"type":"ip"},"resent_count":{"type":"integer"},"request":{"type":"object","properties":{"id":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"body.content":{"type":"text"},"bytes":{"type":"long"},"method":{"type":"keyword","ignore_above":256},"referrer":{"type":"keyword","ignore_above":1024},"mime_type":{"type":"keyword","ignore_above":1024}}},"response":{"type":"object","properties":{"id":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"body.content":{"type":"text"},"bytes":{"type":"long"},"status_code":{"type":"integer"}}}}}}}}}', - }, - { - name: 'logs', - version: '1.0.0', - schemaBody: - '{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://opensearch.org/schema/observability/Logs","title":"OpenTelemetry Logs","type":"object","properties":{"severity":{"$ref":"#/definitions/Severity"},"resource":{"type":"object"},"attributes":{"$ref":"#/definitions/Attributes"},"body":{"type":"string"},"@timestamp":{"type":"string","format":"date-time"},"observedTimestamp":{"type":"string","format":"date-time"},"traceId":{"$ref":"https://opensearch.org/schemas/observability/Span#/properties/traceId"},"spanId":{"$ref":"https://opensearch.org/schemas/observability/Span#/properties/spanId"},"schemaUrl":{"type":"string"},"instrumentationScope":{"$ref":"#/definitions/InstrumentationScope"},"event":{"$ref":"#/definitions/Event"}},"required":["body","@timestamp"],"definitions":{"InstrumentationScope":{"$id":"#/definitions/InstrumentationScope","type":"object","additionalProperties":true,"properties":{"name":{"type":"string"},"version":{"type":"string"},"schemaUrl":{"type":"string"}},"title":"InstrumentationScope"},"Severity":{"$id":"#/definitions/Severity","type":"object","additionalProperties":true,"properties":{"text":{"type":"string","enum":["TRACE","DEBUG","INFO","WARN","ERROR","FATAL"]},"number":{"type":"integer"}},"title":"Severity"},"Attributes":{"$id":"#/definitions/Attributes","type":"object","additionalProperties":true,"properties":{"data_stream":{"$ref":"#/definitions/Dataflow"}},"title":"Attributes"},"Dataflow":{"$id":"#/definitions/Dataflow","type":"object","additionalProperties":true,"properties":{"type":{"type":"string"},"namespace":{"type":"string"},"dataset":{"type":"string"}},"title":"Dataflow"},"Exception":{"$id":"#/definitions/Exception","type":"object","additionalProperties":true,"properties":{"message":{"type":"string"},"stacktrace":{"type":"string"},"type":{"type":"string"}},"title":"Exception"},"Event":{"$id":"#/definitions/Event","type":"object","additionalProperties":true,"properties":{"category":{"type":"string","enum":["authentication","configuration","database","driver","email","file","host","iam","intrusion_detection","malware","network","package","process","registry","session","threat","vulnerability","web"]},"kind":{"type":"string","enum":["alert","enrichment","event","metric","state","error","signal"]},"type":{"type":"string","enum":["access","admin","allowed","change","connection","creation","deletion","denied","end","error","group","indicator","info","installation","protocol","start","user"]},"domain":{"type":"string"},"name":{"type":"string"},"source":{"type":"string"},"result":{"type":"string","enum":["failure","success","pending","undetermined"]},"exception":{"$ref":"#/definitions/Exception"}},"title":"Event"}}}', - mappingBody: - '{"index_patterns":["sso_logs-*-*"],"data_stream":{},"template":{"mappings":{"_meta":{"version":"1.0.0","catalog":"observability","type":"logs","component":"log","correlations":[{"field":"spanId","foreign-schema":"traces","foreign-field":"spanId"},{"field":"traceId","foreign-schema":"traces","foreign-field":"traceId"}]},"_source":{"enabled":true},"dynamic_templates":[{"resources_map":{"mapping":{"type":"keyword"},"path_match":"resource.*"}},{"attributes_map":{"mapping":{"type":"keyword"},"path_match":"attributes.*"}},{"instrumentation_scope_attributes_map":{"mapping":{"type":"keyword"},"path_match":"instrumentationScope.attributes.*"}}],"properties":{"severity":{"properties":{"number":{"type":"long"},"text":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}},"attributes":{"type":"object","properties":{"data_stream":{"properties":{"dataset":{"ignore_above":128,"type":"keyword"},"namespace":{"ignore_above":128,"type":"keyword"},"type":{"ignore_above":56,"type":"keyword"}}}}},"body":{"type":"text"},"@timestamp":{"type":"date"},"observedTimestamp":{"type":"date"},"observerTime":{"type":"alias","path":"observedTimestamp"},"traceId":{"ignore_above":256,"type":"keyword"},"spanId":{"ignore_above":256,"type":"keyword"},"schemaUrl":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"instrumentationScope":{"properties":{"name":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":128}}},"version":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"dropped_attributes_count":{"type":"integer"},"schemaUrl":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}},"event":{"properties":{"domain":{"ignore_above":256,"type":"keyword"},"name":{"ignore_above":256,"type":"keyword"},"source":{"ignore_above":256,"type":"keyword"},"category":{"ignore_above":256,"type":"keyword"},"type":{"ignore_above":256,"type":"keyword"},"kind":{"ignore_above":256,"type":"keyword"},"result":{"ignore_above":256,"type":"keyword"},"exception":{"properties":{"message":{"ignore_above":1024,"type":"keyword"},"type":{"ignore_above":256,"type":"keyword"},"stacktrace":{"type":"text"}}}}}}},"settings":{"index":{"mapping":{"total_fields":{"limit":10000}},"refresh_interval":"5s"}}},"composed_of":["http_template","communication_template"],"version":1,"_meta":{"description":"Simple Schema For Observability","catalog":"observability","type":"logs","correlations":[{"field":"spanId","foreign-schema":"traces","foreign-field":"spanId"},{"field":"traceId","foreign-schema":"traces","foreign-field":"traceId"}]}}', - }, - ], - displayAssets: [ - { - body: - '{"attributes":{"fields":"[{\\"count\\":0,\\"name\\":\\"@timestamp\\",\\"type\\":\\"date\\",\\"esTypes\\":[\\"date\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true},{\\"count\\":0,\\"name\\":\\"_id\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"_id\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"_index\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"_index\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"_score\\",\\"type\\":\\"number\\",\\"scripted\\":false,\\"searchable\\":false,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"_source\\",\\"type\\":\\"_source\\",\\"esTypes\\":[\\"_source\\"],\\"scripted\\":false,\\"searchable\\":false,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"_type\\",\\"type\\":\\"string\\",\\"scripted\\":false,\\"searchable\\":false,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"attributes.data_stream.dataset\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"attributes.data_stream.dataset.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"attributes.data_stream.dataset\\"}}},{\\"count\\":0,\\"name\\":\\"attributes.data_stream.namespace\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"attributes.data_stream.namespace.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"attributes.data_stream.namespace\\"}}},{\\"count\\":0,\\"name\\":\\"attributes.data_stream.type\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"attributes.data_stream.type.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"attributes.data_stream.type\\"}}},{\\"count\\":0,\\"name\\":\\"body\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"body.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"body\\"}}},{\\"count\\":0,\\"name\\":\\"communication.source.address\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"communication.source.address.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"communication.source.address\\"}}},{\\"count\\":0,\\"name\\":\\"communication.source.ip\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"communication.source.ip.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"communication.source.ip\\"}}},{\\"count\\":0,\\"name\\":\\"event.category\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"event.category.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"event.category\\"}}},{\\"count\\":0,\\"name\\":\\"event.domain\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"event.domain.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"event.domain\\"}}},{\\"count\\":0,\\"name\\":\\"event.kind\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"event.kind.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"event.kind\\"}}},{\\"count\\":0,\\"name\\":\\"event.name\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"event.name.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"event.name\\"}}},{\\"count\\":0,\\"name\\":\\"event.result\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"event.result.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"event.result\\"}}},{\\"count\\":0,\\"name\\":\\"event.type\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"event.type.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"event.type\\"}}},{\\"count\\":0,\\"name\\":\\"http.flavor\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"http.flavor.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"http.flavor\\"}}},{\\"count\\":0,\\"name\\":\\"http.request.method\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"http.request.method.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"http.request.method\\"}}},{\\"count\\":0,\\"name\\":\\"http.response.bytes\\",\\"type\\":\\"number\\",\\"esTypes\\":[\\"long\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true},{\\"count\\":0,\\"name\\":\\"http.response.status_code\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"http.response.status_code.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"http.response.status_code\\"}}},{\\"count\\":0,\\"name\\":\\"http.url\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"http.url\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"http.url\\"}}},{\\"count\\":0,\\"name\\":\\"observerTime\\",\\"type\\":\\"date\\",\\"esTypes\\":[\\"date\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true},{\\"count\\":0,\\"name\\":\\"span_id\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"span_id.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"span_id\\"}}},{\\"count\\":0,\\"name\\":\\"trace_id\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"trace_id.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"trace_id\\"}}}]","timeFieldName":"@timestamp","title":"sso_logs-*-*"},"id":"47892350-b495-11ed-af0a-cf5c93b5a3b6","migrationVersion":{"index-pattern":"7.6.0"},"references":[],"type":"index-pattern","updated_at":"2023-02-26T00:34:36.592Z","version":"WzYxLDdd"}', - }, - { - body: - '{"attributes":{"columns":["http.request.method","http.response.status_code"],"description":"","hits":0,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\\n \\"highlightAll\\": true,\\n \\"version\\": true,\\n \\"query\\": {\\n \\"query\\": \\"event.domain:nginx.access\\",\\n \\"language\\": \\"kuery\\"\\n },\\n \\"filter\\": [],\\n \\"indexRefName\\": \\"kibanaSavedObjectMeta.searchSourceJSON.index\\"\\n}"},"sort":[],"title":"[NGINX Core Logs 1.0] Nginx Access Logs","version":1},"id":"d80e05b2-518c-4c3d-9651-4c9d8632dce4","migrationVersion":{"search":"7.9.3"},"references":[{"id":"47892350-b495-11ed-af0a-cf5c93b5a3b6","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"search","updated_at":"2023-02-26T00:34:36.592Z","version":"WzYyLDdd"}', - }, - { - body: - '{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\\"query\\":{\\"query\\":\\"\\",\\"language\\":\\"lucene\\"},\\"filter\\":[]}"},"savedSearchRefName":"search_0","title":"[NGINX Core Logs 1.0] Response codes over time","uiStateJSON":"{}","version":1,"visState":"{\\"title\\":\\"[NGINX Core Logs 1.0] Response codes over time\\",\\"type\\":\\"histogram\\",\\"aggs\\":[{\\"id\\":\\"1\\",\\"enabled\\":true,\\"type\\":\\"count\\",\\"params\\":{},\\"schema\\":\\"metric\\"},{\\"id\\":\\"2\\",\\"enabled\\":true,\\"type\\":\\"date_histogram\\",\\"params\\":{\\"field\\":\\"@timestamp\\",\\"timeRange\\":{\\"from\\":\\"now-24h\\",\\"to\\":\\"now\\"},\\"useNormalizedOpenSearchInterval\\":true,\\"scaleMetricValues\\":false,\\"interval\\":\\"auto\\",\\"drop_partials\\":false,\\"min_doc_count\\":1,\\"extended_bounds\\":{}},\\"schema\\":\\"segment\\"},{\\"id\\":\\"3\\",\\"enabled\\":true,\\"type\\":\\"filters\\",\\"params\\":{\\"filters\\":[{\\"input\\":{\\"query\\":\\"http.response.status_code:[200 TO 299]\\",\\"language\\":\\"lucene\\"},\\"label\\":\\"200s\\"},{\\"input\\":{\\"query\\":\\"http.response.status_code:[300 TO 399]\\",\\"language\\":\\"lucene\\"},\\"label\\":\\"300s\\"},{\\"input\\":{\\"query\\":\\"http.response.status_code:[400 TO 499]\\",\\"language\\":\\"lucene\\"},\\"label\\":\\"400s\\"},{\\"input\\":{\\"query\\":\\"http.response.status_code:[500 TO 599]\\",\\"language\\":\\"lucene\\"},\\"label\\":\\"500s\\"},{\\"input\\":{\\"query\\":\\"http.response.status_code:0\\",\\"language\\":\\"lucene\\"},\\"label\\":\\"0\\"}]},\\"schema\\":\\"group\\"}],\\"params\\":{\\"type\\":\\"histogram\\",\\"grid\\":{\\"categoryLines\\":false},\\"categoryAxes\\":[{\\"id\\":\\"CategoryAxis-1\\",\\"type\\":\\"category\\",\\"position\\":\\"bottom\\",\\"show\\":true,\\"style\\":{},\\"scale\\":{\\"type\\":\\"linear\\"},\\"labels\\":{\\"show\\":true,\\"filter\\":true,\\"truncate\\":100},\\"title\\":{}}],\\"valueAxes\\":[{\\"id\\":\\"ValueAxis-1\\",\\"name\\":\\"LeftAxis-1\\",\\"type\\":\\"value\\",\\"position\\":\\"left\\",\\"show\\":true,\\"style\\":{},\\"scale\\":{\\"type\\":\\"linear\\",\\"mode\\":\\"normal\\"},\\"labels\\":{\\"show\\":true,\\"rotate\\":0,\\"filter\\":false,\\"truncate\\":100},\\"title\\":{\\"text\\":\\"Count\\"}}],\\"seriesParams\\":[{\\"show\\":true,\\"type\\":\\"histogram\\",\\"mode\\":\\"stacked\\",\\"data\\":{\\"label\\":\\"Count\\",\\"id\\":\\"1\\"},\\"valueAxis\\":\\"ValueAxis-1\\",\\"drawLinesBetweenPoints\\":true,\\"lineWidth\\":2,\\"showCircles\\":true}],\\"addTooltip\\":true,\\"addLegend\\":true,\\"legendPosition\\":\\"right\\",\\"times\\":[],\\"addTimeMarker\\":false,\\"labels\\":{\\"show\\":false},\\"thresholdLine\\":{\\"show\\":false,\\"value\\":10,\\"width\\":1,\\"style\\":\\"full\\",\\"color\\":\\"#E7664C\\"}}}"},"id":"3b49a65d-54d8-483d-a8f0-3d7c855e1ecf","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"d80e05b2-518c-4c3d-9651-4c9d8632dce4","name":"search_0","type":"search"}],"type":"visualization","updated_at":"2023-02-26T00:34:36.592Z","version":"WzYzLDdd"}', - }, - { - body: - '{"attributes":{"columns":["_source"],"description":"","hits":0,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\\n \\"highlightAll\\": true,\\n \\"query\\": {\\n \\"query\\": \\"http.response.status_code >= 300 and event.domain:nginx.access\\",\\n \\"language\\": \\"kuery\\"\\n },\\n \\"version\\": true,\\n \\"highlight\\": {\\n \\"post_tags\\": [\\n \\"@/kibana-highlighted-field@\\"\\n ],\\n \\"fields\\": {\\n \\"*\\": {}\\n },\\n \\"pre_tags\\": [\\n \\"@kibana-highlighted-field@\\"\\n ],\\n \\"require_field_match\\": false,\\n \\"fragment_size\\": 2147483647\\n },\\n \\"filter\\": [],\\n \\"indexRefName\\": \\"kibanaSavedObjectMeta.searchSourceJSON.index\\"\\n}"},"sort":[["@timestamp","desc"]],"title":"[NGINX Core Logs 1.0] Nginx Error Logs","version":1},"id":"9f820fbe-ddde-43a2-9402-30bd295c97f6","migrationVersion":{"search":"7.9.3"},"references":[{"id":"47892350-b495-11ed-af0a-cf5c93b5a3b6","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"search","updated_at":"2023-02-26T00:34:36.592Z","version":"WzY0LDdd"}', - }, - { - body: - '{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\\"query\\":{\\"query\\":\\"\\",\\"language\\":\\"lucene\\"},\\"filter\\":[]}"},"savedSearchRefName":"search_0","title":"[NGINX Core Logs 1.0] Errors over time","uiStateJSON":"{}","version":1,"visState":"{\\"title\\":\\"[NGINX Core Logs 1.0] Errors over time\\",\\"type\\":\\"histogram\\",\\"aggs\\":[{\\"id\\":\\"1\\",\\"enabled\\":true,\\"type\\":\\"count\\",\\"params\\":{},\\"schema\\":\\"metric\\"},{\\"id\\":\\"2\\",\\"enabled\\":true,\\"type\\":\\"date_histogram\\",\\"params\\":{\\"field\\":\\"@timestamp\\",\\"timeRange\\":{\\"from\\":\\"now-24h\\",\\"to\\":\\"now\\"},\\"useNormalizedOpenSearchInterval\\":true,\\"scaleMetricValues\\":false,\\"interval\\":\\"auto\\",\\"drop_partials\\":false,\\"min_doc_count\\":1,\\"extended_bounds\\":{}},\\"schema\\":\\"segment\\"}],\\"params\\":{\\"type\\":\\"histogram\\",\\"grid\\":{\\"categoryLines\\":false},\\"categoryAxes\\":[{\\"id\\":\\"CategoryAxis-1\\",\\"type\\":\\"category\\",\\"position\\":\\"bottom\\",\\"show\\":true,\\"style\\":{},\\"scale\\":{\\"type\\":\\"linear\\"},\\"labels\\":{\\"show\\":true,\\"filter\\":true,\\"truncate\\":100},\\"title\\":{}}],\\"valueAxes\\":[{\\"id\\":\\"ValueAxis-1\\",\\"name\\":\\"LeftAxis-1\\",\\"type\\":\\"value\\",\\"position\\":\\"left\\",\\"show\\":true,\\"style\\":{},\\"scale\\":{\\"type\\":\\"linear\\",\\"mode\\":\\"normal\\"},\\"labels\\":{\\"show\\":true,\\"rotate\\":0,\\"filter\\":false,\\"truncate\\":100},\\"title\\":{\\"text\\":\\"Count\\"}}],\\"seriesParams\\":[{\\"show\\":true,\\"type\\":\\"histogram\\",\\"mode\\":\\"stacked\\",\\"data\\":{\\"label\\":\\"Count\\",\\"id\\":\\"1\\"},\\"valueAxis\\":\\"ValueAxis-1\\",\\"drawLinesBetweenPoints\\":true,\\"lineWidth\\":2,\\"showCircles\\":true}],\\"addTooltip\\":true,\\"addLegend\\":true,\\"legendPosition\\":\\"right\\",\\"times\\":[],\\"addTimeMarker\\":false,\\"labels\\":{\\"show\\":false},\\"thresholdLine\\":{\\"show\\":false,\\"value\\":10,\\"width\\":1,\\"style\\":\\"full\\",\\"color\\":\\"#E7664C\\"}}}"},"id":"865e577b-634b-4a65-b9d6-7e324c395d18","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"9f820fbe-ddde-43a2-9402-30bd295c97f6","name":"search_0","type":"search"}],"type":"visualization","updated_at":"2023-02-26T00:34:36.592Z","version":"WzY1LDdd"}', - }, - { - body: - '{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\\"query\\":{\\"query\\":\\"\\",\\"language\\":\\"kuery\\"},\\"filter\\":[]}"},"savedSearchRefName":"search_0","title":"Top Paths","uiStateJSON":"{}","version":1,"visState":"{\\"title\\":\\"Top Paths\\",\\"type\\":\\"table\\",\\"aggs\\":[{\\"id\\":\\"1\\",\\"enabled\\":true,\\"type\\":\\"count\\",\\"params\\":{},\\"schema\\":\\"metric\\"},{\\"id\\":\\"2\\",\\"enabled\\":true,\\"type\\":\\"terms\\",\\"params\\":{\\"field\\":\\"http.url\\",\\"orderBy\\":\\"1\\",\\"order\\":\\"desc\\",\\"size\\":10,\\"otherBucket\\":false,\\"otherBucketLabel\\":\\"Other\\",\\"missingBucket\\":false,\\"missingBucketLabel\\":\\"Missing\\",\\"customLabel\\":\\"Paths\\"},\\"schema\\":\\"bucket\\"}],\\"params\\":{\\"perPage\\":10,\\"showPartialRows\\":false,\\"showMetricsAtAllLevels\\":false,\\"showTotal\\":false,\\"totalFunc\\":\\"sum\\",\\"percentageCol\\":\\"\\"}}"},"id":"dc1803f0-b478-11ed-9063-ebe46f9ac203","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"d80e05b2-518c-4c3d-9651-4c9d8632dce4","name":"search_0","type":"search"}],"type":"visualization","updated_at":"2023-02-26T00:34:36.592Z","version":"WzY2LDdd"}', - }, - { - body: - '{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\\"query\\":{\\"query\\":\\"\\",\\"language\\":\\"kuery\\"},\\"filter\\":[]}"},"savedSearchRefName":"search_0","title":"Data Volume","uiStateJSON":"{}","version":1,"visState":"{\\"title\\":\\"Data Volume\\",\\"type\\":\\"area\\",\\"aggs\\":[{\\"id\\":\\"1\\",\\"enabled\\":true,\\"type\\":\\"sum\\",\\"params\\":{\\"field\\":\\"http.response.bytes\\",\\"customLabel\\":\\"Response Bytes\\"},\\"schema\\":\\"metric\\"},{\\"id\\":\\"2\\",\\"enabled\\":true,\\"type\\":\\"date_histogram\\",\\"params\\":{\\"field\\":\\"observerTime\\",\\"timeRange\\":{\\"from\\":\\"now-15m\\",\\"to\\":\\"now\\"},\\"useNormalizedOpenSearchInterval\\":true,\\"scaleMetricValues\\":false,\\"interval\\":\\"auto\\",\\"drop_partials\\":false,\\"min_doc_count\\":1,\\"extended_bounds\\":{},\\"customLabel\\":\\"\\"},\\"schema\\":\\"segment\\"}],\\"params\\":{\\"type\\":\\"area\\",\\"grid\\":{\\"categoryLines\\":false},\\"categoryAxes\\":[{\\"id\\":\\"CategoryAxis-1\\",\\"type\\":\\"category\\",\\"position\\":\\"bottom\\",\\"show\\":true,\\"style\\":{},\\"scale\\":{\\"type\\":\\"linear\\"},\\"labels\\":{\\"show\\":true,\\"filter\\":true,\\"truncate\\":100},\\"title\\":{}}],\\"valueAxes\\":[{\\"id\\":\\"ValueAxis-1\\",\\"name\\":\\"LeftAxis-1\\",\\"type\\":\\"value\\",\\"position\\":\\"left\\",\\"show\\":true,\\"style\\":{},\\"scale\\":{\\"type\\":\\"linear\\",\\"mode\\":\\"normal\\"},\\"labels\\":{\\"show\\":true,\\"rotate\\":0,\\"filter\\":false,\\"truncate\\":100},\\"title\\":{\\"text\\":\\"Response Bytes\\"}}],\\"seriesParams\\":[{\\"show\\":true,\\"type\\":\\"area\\",\\"mode\\":\\"stacked\\",\\"data\\":{\\"label\\":\\"Response Bytes\\",\\"id\\":\\"1\\"},\\"drawLinesBetweenPoints\\":true,\\"lineWidth\\":2,\\"showCircles\\":true,\\"interpolate\\":\\"linear\\",\\"valueAxis\\":\\"ValueAxis-1\\"}],\\"addTooltip\\":true,\\"addLegend\\":true,\\"legendPosition\\":\\"right\\",\\"times\\":[],\\"addTimeMarker\\":false,\\"thresholdLine\\":{\\"show\\":false,\\"value\\":10,\\"width\\":1,\\"style\\":\\"full\\",\\"color\\":\\"#E7664C\\"},\\"labels\\":{}}}"},"id":"99acc580-b47a-11ed-9063-ebe46f9ac203","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"d80e05b2-518c-4c3d-9651-4c9d8632dce4","name":"search_0","type":"search"}],"type":"visualization","updated_at":"2023-02-26T00:34:36.592Z","version":"WzY3LDdd"}', - }, - { - body: - '{"attributes":{"description":"requests per minute aggregation","kibanaSavedObjectMeta":{"searchSourceJSON":"{\\"query\\":{\\"query\\":\\"\\",\\"language\\":\\"kuery\\"},\\"filter\\":[],\\"indexRefName\\":\\"kibanaSavedObjectMeta.searchSourceJSON.index\\"}"},"title":"Req-per-min","uiStateJSON":"{}","version":1,"visState":"{\\"title\\":\\"Req-per-min\\",\\"type\\":\\"table\\",\\"aggs\\":[{\\"id\\":\\"1\\",\\"enabled\\":true,\\"type\\":\\"moving_avg\\",\\"params\\":{\\"metricAgg\\":\\"custom\\",\\"customMetric\\":{\\"id\\":\\"1-metric\\",\\"enabled\\":true,\\"type\\":\\"count\\",\\"params\\":{}},\\"window\\":5,\\"script\\":\\"MovingFunctions.unweightedAvg(values)\\"},\\"schema\\":\\"metric\\"},{\\"id\\":\\"2\\",\\"enabled\\":true,\\"type\\":\\"date_histogram\\",\\"params\\":{\\"field\\":\\"@timestamp\\",\\"timeRange\\":{\\"from\\":\\"2023-02-24T17:25:00.000Z\\",\\"to\\":\\"2023-02-24T17:30:00.000Z\\"},\\"useNormalizedOpenSearchInterval\\":true,\\"scaleMetricValues\\":false,\\"interval\\":\\"m\\",\\"drop_partials\\":false,\\"min_doc_count\\":0,\\"extended_bounds\\":{},\\"customLabel\\":\\"Req/Min\\"},\\"schema\\":\\"bucket\\"}],\\"params\\":{\\"perPage\\":10,\\"showPartialRows\\":false,\\"showMetricsAtAllLevels\\":false,\\"showTotal\\":false,\\"totalFunc\\":\\"sum\\",\\"percentageCol\\":\\"\\"}}"},"id":"01ea64d0-b62f-11ed-a677-43d7aa86763b","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"47892350-b495-11ed-af0a-cf5c93b5a3b6","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"visualization","updated_at":"2023-02-26T23:40:53.020Z","version":"WzcyLDdd"}', - }, - { - body: - '{"attributes":{"description":"Nginx dashboard with basic Observability on access / error logs","hits":0,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\\"query\\":{\\"language\\":\\"kuery\\",\\"query\\":\\"\\"},\\"filter\\":[]}"},"optionsJSON":"{\\"hidePanelTitles\\":false,\\"useMargins\\":true}","panelsJSON":"[{\\"version\\":\\"2.5.0\\",\\"gridData\\":{\\"h\\":8,\\"i\\":\\"1f31e50b-06e3-41e6-972e-e4e5fe1a9872\\",\\"w\\":48,\\"x\\":0,\\"y\\":0},\\"panelIndex\\":\\"1f31e50b-06e3-41e6-972e-e4e5fe1a9872\\",\\"embeddableConfig\\":{},\\"panelRefName\\":\\"panel_0\\"},{\\"version\\":\\"2.5.0\\",\\"gridData\\":{\\"h\\":9,\\"i\\":\\"d91a8da4-b34b-470a-aca6-9c76b47cd6fb\\",\\"w\\":24,\\"x\\":0,\\"y\\":8},\\"panelIndex\\":\\"d91a8da4-b34b-470a-aca6-9c76b47cd6fb\\",\\"embeddableConfig\\":{},\\"panelRefName\\":\\"panel_1\\"},{\\"version\\":\\"2.5.0\\",\\"gridData\\":{\\"h\\":15,\\"i\\":\\"27149e5a-3a77-4f3c-800e-8a160c3765f4\\",\\"w\\":24,\\"x\\":24,\\"y\\":8},\\"panelIndex\\":\\"27149e5a-3a77-4f3c-800e-8a160c3765f4\\",\\"embeddableConfig\\":{},\\"panelRefName\\":\\"panel_2\\"},{\\"version\\":\\"2.5.0\\",\\"gridData\\":{\\"x\\":0,\\"y\\":17,\\"w\\":24,\\"h\\":15,\\"i\\":\\"4d8c2aa7-159c-4a1a-80ff-00a9299056ce\\"},\\"panelIndex\\":\\"4d8c2aa7-159c-4a1a-80ff-00a9299056ce\\",\\"embeddableConfig\\":{},\\"panelRefName\\":\\"panel_3\\"},{\\"version\\":\\"2.5.0\\",\\"gridData\\":{\\"x\\":24,\\"y\\":23,\\"w\\":24,\\"h\\":15,\\"i\\":\\"800b7f19-f50c-417f-8987-21b930531cbe\\"},\\"panelIndex\\":\\"800b7f19-f50c-417f-8987-21b930531cbe\\",\\"embeddableConfig\\":{},\\"panelRefName\\":\\"panel_4\\"}]","timeRestore":false,"title":"[NGINX Core Logs 1.0] Overview","version":1},"id":"96847220-5261-44d0-89b4-65f3a659f13a","migrationVersion":{"dashboard":"7.9.3"},"references":[{"id":"3b49a65d-54d8-483d-a8f0-3d7c855e1ecf","name":"panel_0","type":"visualization"},{"id":"865e577b-634b-4a65-b9d6-7e324c395d18","name":"panel_1","type":"visualization"},{"id":"dc1803f0-b478-11ed-9063-ebe46f9ac203","name":"panel_2","type":"visualization"},{"id":"99acc580-b47a-11ed-9063-ebe46f9ac203","name":"panel_3","type":"visualization"},{"id":"01ea64d0-b62f-11ed-a677-43d7aa86763b","name":"panel_4","type":"visualization"}],"type":"dashboard","updated_at":"2023-02-26T23:44:09.855Z","version":"WzczLDdd"}', - }, - { - body: '{"exportedCount":9,"missingRefCount":0,"missingReferences":[]}', - }, - ], - }, + data: null, }); const getModal = (name: string) => { @@ -212,7 +132,10 @@ export function Integration(props: AppDetailProps) { }, [appId]); async function handleDataRequest() { - http.get(`${OBSERVABILITY_BASE}/repository/id`).then((exists) => setData(exists)); + // TODO fill in ID request here + http.get(`${INTEGRATIONS_BASE}/repository/nginx`).then((exists) => { + setData(exists.data); + }); } const setToast = (title: string, color = 'success', text?: ReactChild) => { @@ -222,7 +145,7 @@ export function Integration(props: AppDetailProps) { async function addIntegrationRequest(name: string) { http - .post(`${OBSERVABILITY_BASE}/store`) + .post(`${INTEGRATIONS_BASE}/store`) .then((res) => { setToast( `${name} integration successfully added!`, @@ -238,7 +161,9 @@ export function Integration(props: AppDetailProps) { ); } - console.log(data); + if (!data.data) { + return Loading...; + } return ( => { - const repo = await this.repository.get(); - console.log(`Retrieving ${repo.length} templates from catalog`); + if (query?.name) { + const result = await this.repository.getByName(query.name); + return Promise.resolve({ hits: [result] }); + } + const result = await this.repository.get(); + console.log(`Retrieving ${result.length} templates from catalog`); return Promise.resolve({ - hits: repo, + hits: result, }); }; diff --git a/server/adaptors/integrations/types.ts b/server/adaptors/integrations/types.ts index f2e669731b..4bf1dfc4d6 100644 --- a/server/adaptors/integrations/types.ts +++ b/server/adaptors/integrations/types.ts @@ -46,7 +46,7 @@ interface IntegrationTemplateSearchResult { } interface IntegrationTemplateQuery { - tags?: string[]; + name?: string; } interface IntegrationInstance { diff --git a/server/routes/integrations/integrations_router.ts b/server/routes/integrations/integrations_router.ts index c68e774f6f..0104b0a261 100644 --- a/server/routes/integrations/integrations_router.ts +++ b/server/routes/integrations/integrations_router.ts @@ -89,13 +89,23 @@ export function registerIntegrationsRoute(router: IRouter) { router.get( { - path: `${OBSERVABILITY_BASE}/repository/id`, - validate: false, + path: `${INTEGRATIONS_BASE}/repository/{name}`, + validate: { + params: schema.object({ + name: schema.string(), + }), + }, }, async (context, request, response): Promise => { const adaptor = getAdaptor(context, request); - return handleWithCallback(adaptor, response, async (_a: IntegrationsAdaptor) => { - return (await fetch('http://127.0.0.1:4010/repository/id', {})).json(); + return handleWithCallback(adaptor, response, async (a: IntegrationsAdaptor) => { + return { + data: ( + await a.getIntegrationTemplates({ + name: request.params.name, + }) + ).hits[0], + }; }); } ); @@ -129,19 +139,6 @@ export function registerIntegrationsRoute(router: IRouter) { } ); - router.get( - { - path: `${OBSERVABILITY_BASE}/store`, - validate: false, - }, - async (context, request, response): Promise => { - const adaptor = getAdaptor(context, request); - return handleWithCallback(adaptor, response, async (_a: IntegrationsAdaptor) => { - return (await fetch('http://127.0.0.1:4010/store?limit=24', {})).json(); - }); - } - ); - router.get( { path: `${INTEGRATIONS_BASE}/store`, From ccadd7588fb39202af97b2899a6fcc031069ec5d Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Tue, 30 May 2023 11:17:39 -0700 Subject: [PATCH 096/190] Hotfix: Remove unused import Signed-off-by: Simeon Widdis --- server/routes/integrations/integrations_router.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/routes/integrations/integrations_router.ts b/server/routes/integrations/integrations_router.ts index 2bf5bdfd8a..43fb3f8e0d 100644 --- a/server/routes/integrations/integrations_router.ts +++ b/server/routes/integrations/integrations_router.ts @@ -5,7 +5,7 @@ import { schema } from '@osd/config-schema'; import { IRouter, RequestHandlerContext } from '../../../../../src/core/server'; -import { INTEGRATIONS_BASE, OBSERVABILITY_BASE } from '../../../common/constants/shared'; +import { INTEGRATIONS_BASE } from '../../../common/constants/shared'; import { IntegrationsAdaptor } from '../../adaptors/integrations/integrations_adaptor'; import { OpenSearchDashboardsRequest, From 3596ce876bf74a6c6a2ccac4483736b05dc9ccf9 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Tue, 30 May 2023 11:20:53 -0700 Subject: [PATCH 097/190] Hotfix: Use loading spinner Signed-off-by: Simeon Widdis --- .../integrations/components/integration.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/public/components/integrations/components/integration.tsx b/public/components/integrations/components/integration.tsx index 6273f8d7ff..9449539cb2 100644 --- a/public/components/integrations/components/integration.tsx +++ b/public/components/integrations/components/integration.tsx @@ -4,7 +4,14 @@ */ /* eslint-disable react-hooks/exhaustive-deps */ -import { EuiGlobalToastList, EuiOverlayMask, EuiPage, EuiPageBody, EuiSpacer } from '@elastic/eui'; +import { + EuiGlobalToastList, + EuiLoadingSpinner, + EuiOverlayMask, + EuiPage, + EuiPageBody, + EuiSpacer, +} from '@elastic/eui'; import React, { ReactChild, useEffect, useState } from 'react'; import { last } from 'lodash'; import { Toast } from '@elastic/eui/src/components/toast/global_toast_list'; @@ -96,7 +103,7 @@ export function Integration(props: AvailableIntegrationProps) { } if (!data.data) { - return Loading...; + return ; } return ( From 09642ea5510e7ba2e0ebd39b499421ce75accd28 Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Tue, 30 May 2023 15:30:24 -0400 Subject: [PATCH 098/190] add some changes to UI according to figma Signed-off-by: Derek Ho --- .../components/added_integration.tsx | 10 ++--- .../added_integration_overview_page.tsx | 8 ++-- .../available_integration_card_view.tsx | 40 +++++++------------ .../available_integration_overview_page.tsx | 4 +- .../integrations/components/integration.tsx | 4 +- .../components/integration_overview_panel.tsx | 1 + .../components/integration_side_nav.tsx | 4 +- public/components/integrations/home.tsx | 4 +- 8 files changed, 32 insertions(+), 43 deletions(-) diff --git a/public/components/integrations/components/added_integration.tsx b/public/components/integrations/components/added_integration.tsx index 256a02353f..c0f9148447 100644 --- a/public/components/integrations/components/added_integration.tsx +++ b/public/components/integrations/components/added_integration.tsx @@ -44,16 +44,16 @@ export function AddedIntegration(props: AddedIntegrationProps) { chrome.setBreadcrumbs([ ...parentBreadcrumbs, { - text: 'Placeholder', - href: '#/integrations', + text: 'Integrations', + href: '#/', }, { - text: 'Added Integration', - href: '#/added', + text: 'Installed Integration', + href: '#/installed', }, { text: integrationInstanceId, - href: `${last(parentBreadcrumbs)!.href}integrations/added/${integrationInstanceId}`, + href: `${last(parentBreadcrumbs)!.href}integrations/installed/${integrationInstanceId}`, }, ]); handleDataRequest(); diff --git a/public/components/integrations/components/added_integration_overview_page.tsx b/public/components/integrations/components/added_integration_overview_page.tsx index 735c1a8ad3..80cb92913c 100644 --- a/public/components/integrations/components/added_integration_overview_page.tsx +++ b/public/components/integrations/components/added_integration_overview_page.tsx @@ -40,12 +40,12 @@ export function AddedIntegrationOverviewPage(props: AddedIntegrationOverviewPage chrome.setBreadcrumbs([ ...parentBreadcrumbs, { - text: 'Placeholder', - href: '#/integrations', + text: 'Integrations', + href: '#/', }, { - text: 'Added Integrations', - href: '#/integrations/added', + text: 'Installed Integrations', + href: '#//installed', }, ]); handleDataRequest(); diff --git a/public/components/integrations/components/available_integration_card_view.tsx b/public/components/integrations/components/available_integration_card_view.tsx index e6c29c6e1b..ebf37ec842 100644 --- a/public/components/integrations/components/available_integration_card_view.tsx +++ b/public/components/integrations/components/available_integration_card_view.tsx @@ -32,35 +32,23 @@ export function AvailableIntegrationsCardView(props: AvailableIntegrationsCardVi return ( - { - window.location.assign(`#/available/${i.name}`); - }} - > - View Details - - - { - props.showModal(i.name); - }} - size="s" - > - Add - -
- } + data-test-subj={`integration_card_${i.name.toLowerCase()}`} + titleElement="span" + // footer={ + // { + // props.showModal(i.name); + // }} + // size="s" + // > + // Add + // + // } + onClick={() => (window.location.hash = `#/available/${i.name}`)} /> ); diff --git a/public/components/integrations/components/available_integration_overview_page.tsx b/public/components/integrations/components/available_integration_overview_page.tsx index b613963e23..dfdccc1289 100644 --- a/public/components/integrations/components/available_integration_overview_page.tsx +++ b/public/components/integrations/components/available_integration_overview_page.tsx @@ -86,8 +86,8 @@ export function AvailableIntegrationOverviewPage(props: AvailableIntegrationOver chrome.setBreadcrumbs([ ...parentBreadcrumbs, { - text: 'Placeholder', - href: '#/integrations', + text: 'Integrations', + href: '#/', }, ]); handleDataRequest(); diff --git a/public/components/integrations/components/integration.tsx b/public/components/integrations/components/integration.tsx index 9449539cb2..a1b227d78d 100644 --- a/public/components/integrations/components/integration.tsx +++ b/public/components/integrations/components/integration.tsx @@ -61,8 +61,8 @@ export function Integration(props: AvailableIntegrationProps) { chrome.setBreadcrumbs([ ...parentBreadcrumbs, { - text: 'Placeholder', - href: '#/integrations', + text: 'Integrations', + href: '#/', }, { text: integrationTemplateId, diff --git a/public/components/integrations/components/integration_overview_panel.tsx b/public/components/integrations/components/integration_overview_panel.tsx index d24b430d5a..c031bed2fa 100644 --- a/public/components/integrations/components/integration_overview_panel.tsx +++ b/public/components/integrations/components/integration_overview_panel.tsx @@ -48,6 +48,7 @@ export function IntegrationOverview(props: any) { onClick={() => { props.getModal(data.data.name); }} + fill > Add diff --git a/public/components/integrations/components/integration_side_nav.tsx b/public/components/integrations/components/integration_side_nav.tsx index 6ac0223322..5905596744 100644 --- a/public/components/integrations/components/integration_side_nav.tsx +++ b/public/components/integrations/components/integration_side_nav.tsx @@ -26,9 +26,9 @@ export const Sidebar = (props: { children: React.ReactNode }) => { href: '#/available', }, { - name: 'Added integrations', + name: 'Installed integrations', id: 2, - href: '#/added', + href: '#/installed', }, ], }, diff --git a/public/components/integrations/home.tsx b/public/components/integrations/home.tsx index 919e9c5081..1608fac276 100644 --- a/public/components/integrations/home.tsx +++ b/public/components/integrations/home.tsx @@ -53,7 +53,7 @@ export const Home = (props: HomeProps) => { /> ( @@ -62,7 +62,7 @@ export const Home = (props: HomeProps) => { /> ( Date: Wed, 31 May 2023 11:51:08 -0400 Subject: [PATCH 099/190] add license headers and hook up get to specific instance for added page Signed-off-by: Derek Ho --- .../__tests__/integration_details.test.tsx | 22 +++++ .../components/__tests__/testing_constants.ts | 92 +++++++++++++++++++ .../components/added_integration.tsx | 47 +++------- .../added_integration_overview_page.tsx | 1 + .../components/added_integration_table.tsx | 7 +- .../integrations/components/integration.tsx | 5 +- .../components/integration_details_panel.tsx | 17 +--- .../components/integration_overview_panel.tsx | 4 +- .../integration_screenshots_panel.tsx | 36 ++++++++ .../integrations/__data__/repository.json | 6 +- .../integrations/__test__/builder.test.ts | 5 + .../__test__/kibana_backend.test.ts | 5 + .../integrations/__test__/repository.test.ts | 5 + .../integrations/integrations_adaptor.ts | 6 +- .../integrations/integrations_builder.ts | 6 ++ .../integrations_kibana_backend.ts | 31 ++++++- .../integrations/integrations_repository.ts | 5 + server/adaptors/integrations/types.ts | 26 +++++- .../integrations/integrations_router.ts | 49 +++++++++- 19 files changed, 311 insertions(+), 64 deletions(-) create mode 100644 public/components/integrations/components/__tests__/integration_details.test.tsx create mode 100644 public/components/integrations/components/integration_screenshots_panel.tsx diff --git a/public/components/integrations/components/__tests__/integration_details.test.tsx b/public/components/integrations/components/__tests__/integration_details.test.tsx new file mode 100644 index 0000000000..91808953dc --- /dev/null +++ b/public/components/integrations/components/__tests__/integration_details.test.tsx @@ -0,0 +1,22 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { configure, mount } from 'enzyme'; +import Adapter from 'enzyme-adapter-react-16'; +import { waitFor } from '@testing-library/react'; +import { IntegrationDetails } from '../integration_details_panel'; +import { nginxIntegrationData } from './testing_constants'; + +describe('Available Integration Table View Test', () => { + configure({ adapter: new Adapter() }); + + it('Renders nginx integration table view using dummy data', async () => { + const wrapper = mount(IntegrationDetails(nginxIntegrationData)); + + await waitFor(() => { + expect(wrapper).toMatchSnapshot(); + }); + }); +}); diff --git a/public/components/integrations/components/__tests__/testing_constants.ts b/public/components/integrations/components/__tests__/testing_constants.ts index d5ec90dd4c..9220fef220 100644 --- a/public/components/integrations/components/__tests__/testing_constants.ts +++ b/public/components/integrations/components/__tests__/testing_constants.ts @@ -344,3 +344,95 @@ export const addedIntegrationData: AddedIntegrationsTableProps = { }, loading: false, }; + +export const nginxIntegrationData = { + data: { + data: { + name: 'nginx', + version: '1.0.0', + integrationType: 'logs', + description: 'Nginx HTTP server collector', + license: 'Apache-2.0', + statics: { + mapping: { + logo: '/logo', + }, + assets: { + '/logo': { + mimeType: 'image/png', + annotation: 'NginX Logo', + data: + 'iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAACXBIWXMAAAsSAAALEgHS3X78AAAfBklEQVR42u1dDYxc1XWe2dkNfzFEAVxh8LyZtU0LhoTYnvtmAacINWmJm+CmiRKoiBLRqH/8qE3URm2pLBqVUsC77834L5CSJqKhblOaQlMUEaKmSdSgNCSIokJL25QSURMiU6EAM7O7Pffcc++7b7y217vz3u7M+450NG9nZ3dm7rv3u+d85+eWSpCRlSAOS7Uo5Gv9GERhxf0uCjcHkXqEXvNo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ueCxyr2k+oiIQJIxp8pBCgjUDvqA3xklfgAKzdnPf7e3seqFz6nS9aixsgs/VQCzN52qqXu/2ZLLEecHoNDM/Xyd2eg3rNGb7sZ4e2nVSWDSMP0STPADUOgy/XyvmnH17PrgB6DQgvj54Aeg0IL7+eAHoFD4+eAHoFD4+eAHoFD4+eAHoFD4+eAHoPDz4eeDH4DCz4efD34ACj8ffj74ASj8fPj54Aeg8PPh54MfgMLPh4AfgMLPh4AfgMLPh4AfgMLPh4AfgMLPh4AfgMLPh4AfgMLPh4AfgMLPh4AfgMLPh4AfgMLPh4AfgMLPh4AfgMLPh4AfgMLPh4AfgMLPh4AfgJ8PPx8CfgB+Pvx8CPgB+Pnw8yHgB+DnY+FDwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAwA/Az4dAisoPwM+HQArKD8DPh0AKyA/Az4dACscPwM+HQArJD8DPh0AKyg/Az4dACsgPwM+HQArHD8DPh0AKyQ/Az4dACsoPwM+HQArMD8DPh0CKyA8EUcimPvx8CKSI/MB+MvX3T7GfX4OfD4EUih/YTAv7EbICHqWFfjH8/GLK/wNkczJMJgkn1AAAAABJRU5ErkJggg==', + }, + }, + }, + components: [ + { + name: 'communication', + version: '1.0.0', + schemaBody: + '{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://opensearch.org/schemas/observability/Communication","title":"Communication","type":"object","properties":{"source":{"type":"object","properties":{"sock.family":{"type":"string"},"source":{"$ref":"#/definitions/Source"},"destination":{"$ref":"#/definitions/Destination"}}},"destination":{"type":"object","properties":{}}},"definitions":{"Source":{"$id":"#/definitions/Source","type":"object","additionalProperties":true,"properties":{"address":{"type":"string"},"domain":{"type":"string"},"bytes":{"type":"integer"},"ip":{"type":"string"},"port":{"type":"integer"},"mac":{"type":"string"},"packets":{"type":"integer"}},"title":"Source"},"Destination":{"$id":"#/definitions/Destination","type":"object","additionalProperties":true,"properties":{"address":{"type":"string"},"domain":{"type":"string"},"bytes":{"type":"integer"},"ip":{"type":"string"},"port":{"type":"integer"},"mac":{"type":"string"},"packets":{"type":"integer"}},"title":"Destination"}}}', + mappingBody: + '{"template":{"mappings":{"_meta":{"version":"1.0.0","catalog":"observability","type":"logs","component":"communication"},"properties":{"communication":{"properties":{"sock.family":{"type":"keyword","ignore_above":256},"source":{"type":"object","properties":{"address":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":1024}}},"domain":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":1024}}},"bytes":{"type":"long"},"ip":{"type":"ip"},"port":{"type":"long"},"mac":{"type":"keyword","ignore_above":1024},"packets":{"type":"long"}}},"destination":{"type":"object","properties":{"address":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":1024}}},"domain":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":1024}}},"bytes":{"type":"long"},"ip":{"type":"ip"},"port":{"type":"long"},"mac":{"type":"keyword","ignore_above":1024},"packets":{"type":"long"}}}}}}}}}', + }, + { + name: 'http', + version: '1.0.0', + schemaBody: + '{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://opensearch.org/schemas/observability/Http","title":"Http","type":"object","properties":{"request":{"$ref":"#/definitions/Request"},"response":{"$ref":"#/definitions/Response"},"flavor":{"type":"string"},"user_agent":{"type":"string"},"url":{"type":"string"},"schema":{"type":"string"},"target":{"type":"string"},"route":{"type":"string"},"client_ip":{"type":"string"},"resent_count":{"type":"integer"}},"definitions":{"Request":{"$id":"#/definitions/Request","type":"object","additionalProperties":true,"properties":{"id":{"type":"string"},"body.content":{"type":"string"},"bytes":{"type":"integer"},"method":{"type":"string"},"referrer":{"type":"string"},"header":{"type":"string"},"mime_type":{"type":"object"}},"title":"Request"},"Response":{"$id":"#/definitions/Response","type":"object","additionalProperties":true,"properties":{"id":{"type":"string"},"body.content":{"type":"string"},"bytes":{"type":"integer"},"status_code":{"type":"integer"},"header":{"type":"object"}},"title":"Response"}}}', + mappingBody: + '{"template":{"mappings":{"_meta":{"version":"1.0.0","catalog":"observability","type":"logs","component":"http"},"dynamic_templates":[{"request_header_map":{"mapping":{"type":"keyword"},"path_match":"request.header.*"}},{"response_header_map":{"mapping":{"type":"keyword"},"path_match":"response.header.*"}}],"properties":{"http":{"properties":{"flavor":{"type":"keyword","ignore_above":256},"user_agent":{"type":"keyword","ignore_above":2048},"url":{"type":"keyword","ignore_above":2048},"schema":{"type":"keyword","ignore_above":1024},"target":{"type":"keyword","ignore_above":1024},"route":{"type":"keyword","ignore_above":1024},"client.ip":{"type":"ip"},"resent_count":{"type":"integer"},"request":{"type":"object","properties":{"id":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"body.content":{"type":"text"},"bytes":{"type":"long"},"method":{"type":"keyword","ignore_above":256},"referrer":{"type":"keyword","ignore_above":1024},"mime_type":{"type":"keyword","ignore_above":1024}}},"response":{"type":"object","properties":{"id":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"body.content":{"type":"text"},"bytes":{"type":"long"},"status_code":{"type":"integer"}}}}}}}}}', + }, + { + name: 'logs', + version: '1.0.0', + schemaBody: + '{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://opensearch.org/schema/observability/Logs","title":"OpenTelemetry Logs","type":"object","properties":{"severity":{"$ref":"#/definitions/Severity"},"resource":{"type":"object"},"attributes":{"$ref":"#/definitions/Attributes"},"body":{"type":"string"},"@timestamp":{"type":"string","format":"date-time"},"observedTimestamp":{"type":"string","format":"date-time"},"traceId":{"$ref":"https://opensearch.org/schemas/observability/Span#/properties/traceId"},"spanId":{"$ref":"https://opensearch.org/schemas/observability/Span#/properties/spanId"},"schemaUrl":{"type":"string"},"instrumentationScope":{"$ref":"#/definitions/InstrumentationScope"},"event":{"$ref":"#/definitions/Event"}},"required":["body","@timestamp"],"definitions":{"InstrumentationScope":{"$id":"#/definitions/InstrumentationScope","type":"object","additionalProperties":true,"properties":{"name":{"type":"string"},"version":{"type":"string"},"schemaUrl":{"type":"string"}},"title":"InstrumentationScope"},"Severity":{"$id":"#/definitions/Severity","type":"object","additionalProperties":true,"properties":{"text":{"type":"string","enum":["TRACE","DEBUG","INFO","WARN","ERROR","FATAL"]},"number":{"type":"integer"}},"title":"Severity"},"Attributes":{"$id":"#/definitions/Attributes","type":"object","additionalProperties":true,"properties":{"data_stream":{"$ref":"#/definitions/Dataflow"}},"title":"Attributes"},"Dataflow":{"$id":"#/definitions/Dataflow","type":"object","additionalProperties":true,"properties":{"type":{"type":"string"},"namespace":{"type":"string"},"dataset":{"type":"string"}},"title":"Dataflow"},"Exception":{"$id":"#/definitions/Exception","type":"object","additionalProperties":true,"properties":{"message":{"type":"string"},"stacktrace":{"type":"string"},"type":{"type":"string"}},"title":"Exception"},"Event":{"$id":"#/definitions/Event","type":"object","additionalProperties":true,"properties":{"category":{"type":"string","enum":["authentication","configuration","database","driver","email","file","host","iam","intrusion_detection","malware","network","package","process","registry","session","threat","vulnerability","web"]},"kind":{"type":"string","enum":["alert","enrichment","event","metric","state","error","signal"]},"type":{"type":"string","enum":["access","admin","allowed","change","connection","creation","deletion","denied","end","error","group","indicator","info","installation","protocol","start","user"]},"domain":{"type":"string"},"name":{"type":"string"},"source":{"type":"string"},"result":{"type":"string","enum":["failure","success","pending","undetermined"]},"exception":{"$ref":"#/definitions/Exception"}},"title":"Event"}}}', + mappingBody: + '{"index_patterns":["sso_logs-*-*"],"data_stream":{},"template":{"mappings":{"_meta":{"version":"1.0.0","catalog":"observability","type":"logs","component":"log","correlations":[{"field":"spanId","foreign-schema":"traces","foreign-field":"spanId"},{"field":"traceId","foreign-schema":"traces","foreign-field":"traceId"}]},"_source":{"enabled":true},"dynamic_templates":[{"resources_map":{"mapping":{"type":"keyword"},"path_match":"resource.*"}},{"attributes_map":{"mapping":{"type":"keyword"},"path_match":"attributes.*"}},{"instrumentation_scope_attributes_map":{"mapping":{"type":"keyword"},"path_match":"instrumentationScope.attributes.*"}}],"properties":{"severity":{"properties":{"number":{"type":"long"},"text":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}},"attributes":{"type":"object","properties":{"data_stream":{"properties":{"dataset":{"ignore_above":128,"type":"keyword"},"namespace":{"ignore_above":128,"type":"keyword"},"type":{"ignore_above":56,"type":"keyword"}}}}},"body":{"type":"text"},"@timestamp":{"type":"date"},"observedTimestamp":{"type":"date"},"observerTime":{"type":"alias","path":"observedTimestamp"},"traceId":{"ignore_above":256,"type":"keyword"},"spanId":{"ignore_above":256,"type":"keyword"},"schemaUrl":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"instrumentationScope":{"properties":{"name":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":128}}},"version":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"dropped_attributes_count":{"type":"integer"},"schemaUrl":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}},"event":{"properties":{"domain":{"ignore_above":256,"type":"keyword"},"name":{"ignore_above":256,"type":"keyword"},"source":{"ignore_above":256,"type":"keyword"},"category":{"ignore_above":256,"type":"keyword"},"type":{"ignore_above":256,"type":"keyword"},"kind":{"ignore_above":256,"type":"keyword"},"result":{"ignore_above":256,"type":"keyword"},"exception":{"properties":{"message":{"ignore_above":1024,"type":"keyword"},"type":{"ignore_above":256,"type":"keyword"},"stacktrace":{"type":"text"}}}}}}},"settings":{"index":{"mapping":{"total_fields":{"limit":10000}},"refresh_interval":"5s"}}},"composed_of":["http_template","communication_template"],"version":1,"_meta":{"description":"Simple Schema For Observability","catalog":"observability","type":"logs","correlations":[{"field":"spanId","foreign-schema":"traces","foreign-field":"spanId"},{"field":"traceId","foreign-schema":"traces","foreign-field":"traceId"}]}}', + }, + ], + displayAssets: [ + { + body: + '{"attributes":{"fields":"[{\\"count\\":0,\\"name\\":\\"@timestamp\\",\\"type\\":\\"date\\",\\"esTypes\\":[\\"date\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true},{\\"count\\":0,\\"name\\":\\"_id\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"_id\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"_index\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"_index\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"_score\\",\\"type\\":\\"number\\",\\"scripted\\":false,\\"searchable\\":false,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"_source\\",\\"type\\":\\"_source\\",\\"esTypes\\":[\\"_source\\"],\\"scripted\\":false,\\"searchable\\":false,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"_type\\",\\"type\\":\\"string\\",\\"scripted\\":false,\\"searchable\\":false,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"attributes.data_stream.dataset\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"attributes.data_stream.dataset.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"attributes.data_stream.dataset\\"}}},{\\"count\\":0,\\"name\\":\\"attributes.data_stream.namespace\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"attributes.data_stream.namespace.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"attributes.data_stream.namespace\\"}}},{\\"count\\":0,\\"name\\":\\"attributes.data_stream.type\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"attributes.data_stream.type.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"attributes.data_stream.type\\"}}},{\\"count\\":0,\\"name\\":\\"body\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"body.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"body\\"}}},{\\"count\\":0,\\"name\\":\\"communication.source.address\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"communication.source.address.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"communication.source.address\\"}}},{\\"count\\":0,\\"name\\":\\"communication.source.ip\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"communication.source.ip.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"communication.source.ip\\"}}},{\\"count\\":0,\\"name\\":\\"event.category\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"event.category.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"event.category\\"}}},{\\"count\\":0,\\"name\\":\\"event.domain\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"event.domain.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"event.domain\\"}}},{\\"count\\":0,\\"name\\":\\"event.kind\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"event.kind.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"event.kind\\"}}},{\\"count\\":0,\\"name\\":\\"event.name\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"event.name.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"event.name\\"}}},{\\"count\\":0,\\"name\\":\\"event.result\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"event.result.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"event.result\\"}}},{\\"count\\":0,\\"name\\":\\"event.type\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"event.type.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"event.type\\"}}},{\\"count\\":0,\\"name\\":\\"http.flavor\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"http.flavor.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"http.flavor\\"}}},{\\"count\\":0,\\"name\\":\\"http.request.method\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"http.request.method.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"http.request.method\\"}}},{\\"count\\":0,\\"name\\":\\"http.response.bytes\\",\\"type\\":\\"number\\",\\"esTypes\\":[\\"long\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true},{\\"count\\":0,\\"name\\":\\"http.response.status_code\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"http.response.status_code.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"http.response.status_code\\"}}},{\\"count\\":0,\\"name\\":\\"http.url\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"http.url\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"http.url\\"}}},{\\"count\\":0,\\"name\\":\\"observerTime\\",\\"type\\":\\"date\\",\\"esTypes\\":[\\"date\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true},{\\"count\\":0,\\"name\\":\\"span_id\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"span_id.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"span_id\\"}}},{\\"count\\":0,\\"name\\":\\"trace_id\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"text\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":false,\\"readFromDocValues\\":false},{\\"count\\":0,\\"name\\":\\"trace_id.keyword\\",\\"type\\":\\"string\\",\\"esTypes\\":[\\"keyword\\"],\\"scripted\\":false,\\"searchable\\":true,\\"aggregatable\\":true,\\"readFromDocValues\\":true,\\"subType\\":{\\"multi\\":{\\"parent\\":\\"trace_id\\"}}}]","timeFieldName":"@timestamp","title":"sso_logs-*-*"},"id":"47892350-b495-11ed-af0a-cf5c93b5a3b6","migrationVersion":{"index-pattern":"7.6.0"},"references":[],"type":"index-pattern","updated_at":"2023-02-26T00:34:36.592Z","version":"WzYxLDdd"}', + }, + { + body: + '{"attributes":{"columns":["http.request.method","http.response.status_code"],"description":"","hits":0,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\\n \\"highlightAll\\": true,\\n \\"version\\": true,\\n \\"query\\": {\\n \\"query\\": \\"event.domain:nginx.access\\",\\n \\"language\\": \\"kuery\\"\\n },\\n \\"filter\\": [],\\n \\"indexRefName\\": \\"kibanaSavedObjectMeta.searchSourceJSON.index\\"\\n}"},"sort":[],"title":"[NGINX Core Logs 1.0] Nginx Access Logs","version":1},"id":"d80e05b2-518c-4c3d-9651-4c9d8632dce4","migrationVersion":{"search":"7.9.3"},"references":[{"id":"47892350-b495-11ed-af0a-cf5c93b5a3b6","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"search","updated_at":"2023-02-26T00:34:36.592Z","version":"WzYyLDdd"}', + }, + { + body: + '{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\\"query\\":{\\"query\\":\\"\\",\\"language\\":\\"lucene\\"},\\"filter\\":[]}"},"savedSearchRefName":"search_0","title":"[NGINX Core Logs 1.0] Response codes over time","uiStateJSON":"{}","version":1,"visState":"{\\"title\\":\\"[NGINX Core Logs 1.0] Response codes over time\\",\\"type\\":\\"histogram\\",\\"aggs\\":[{\\"id\\":\\"1\\",\\"enabled\\":true,\\"type\\":\\"count\\",\\"params\\":{},\\"schema\\":\\"metric\\"},{\\"id\\":\\"2\\",\\"enabled\\":true,\\"type\\":\\"date_histogram\\",\\"params\\":{\\"field\\":\\"@timestamp\\",\\"timeRange\\":{\\"from\\":\\"now-24h\\",\\"to\\":\\"now\\"},\\"useNormalizedOpenSearchInterval\\":true,\\"scaleMetricValues\\":false,\\"interval\\":\\"auto\\",\\"drop_partials\\":false,\\"min_doc_count\\":1,\\"extended_bounds\\":{}},\\"schema\\":\\"segment\\"},{\\"id\\":\\"3\\",\\"enabled\\":true,\\"type\\":\\"filters\\",\\"params\\":{\\"filters\\":[{\\"input\\":{\\"query\\":\\"http.response.status_code:[200 TO 299]\\",\\"language\\":\\"lucene\\"},\\"label\\":\\"200s\\"},{\\"input\\":{\\"query\\":\\"http.response.status_code:[300 TO 399]\\",\\"language\\":\\"lucene\\"},\\"label\\":\\"300s\\"},{\\"input\\":{\\"query\\":\\"http.response.status_code:[400 TO 499]\\",\\"language\\":\\"lucene\\"},\\"label\\":\\"400s\\"},{\\"input\\":{\\"query\\":\\"http.response.status_code:[500 TO 599]\\",\\"language\\":\\"lucene\\"},\\"label\\":\\"500s\\"},{\\"input\\":{\\"query\\":\\"http.response.status_code:0\\",\\"language\\":\\"lucene\\"},\\"label\\":\\"0\\"}]},\\"schema\\":\\"group\\"}],\\"params\\":{\\"type\\":\\"histogram\\",\\"grid\\":{\\"categoryLines\\":false},\\"categoryAxes\\":[{\\"id\\":\\"CategoryAxis-1\\",\\"type\\":\\"category\\",\\"position\\":\\"bottom\\",\\"show\\":true,\\"style\\":{},\\"scale\\":{\\"type\\":\\"linear\\"},\\"labels\\":{\\"show\\":true,\\"filter\\":true,\\"truncate\\":100},\\"title\\":{}}],\\"valueAxes\\":[{\\"id\\":\\"ValueAxis-1\\",\\"name\\":\\"LeftAxis-1\\",\\"type\\":\\"value\\",\\"position\\":\\"left\\",\\"show\\":true,\\"style\\":{},\\"scale\\":{\\"type\\":\\"linear\\",\\"mode\\":\\"normal\\"},\\"labels\\":{\\"show\\":true,\\"rotate\\":0,\\"filter\\":false,\\"truncate\\":100},\\"title\\":{\\"text\\":\\"Count\\"}}],\\"seriesParams\\":[{\\"show\\":true,\\"type\\":\\"histogram\\",\\"mode\\":\\"stacked\\",\\"data\\":{\\"label\\":\\"Count\\",\\"id\\":\\"1\\"},\\"valueAxis\\":\\"ValueAxis-1\\",\\"drawLinesBetweenPoints\\":true,\\"lineWidth\\":2,\\"showCircles\\":true}],\\"addTooltip\\":true,\\"addLegend\\":true,\\"legendPosition\\":\\"right\\",\\"times\\":[],\\"addTimeMarker\\":false,\\"labels\\":{\\"show\\":false},\\"thresholdLine\\":{\\"show\\":false,\\"value\\":10,\\"width\\":1,\\"style\\":\\"full\\",\\"color\\":\\"#E7664C\\"}}}"},"id":"3b49a65d-54d8-483d-a8f0-3d7c855e1ecf","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"d80e05b2-518c-4c3d-9651-4c9d8632dce4","name":"search_0","type":"search"}],"type":"visualization","updated_at":"2023-02-26T00:34:36.592Z","version":"WzYzLDdd"}', + }, + { + body: + '{"attributes":{"columns":["_source"],"description":"","hits":0,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\\n \\"highlightAll\\": true,\\n \\"query\\": {\\n \\"query\\": \\"http.response.status_code >= 300 and event.domain:nginx.access\\",\\n \\"language\\": \\"kuery\\"\\n },\\n \\"version\\": true,\\n \\"highlight\\": {\\n \\"post_tags\\": [\\n \\"@/kibana-highlighted-field@\\"\\n ],\\n \\"fields\\": {\\n \\"*\\": {}\\n },\\n \\"pre_tags\\": [\\n \\"@kibana-highlighted-field@\\"\\n ],\\n \\"require_field_match\\": false,\\n \\"fragment_size\\": 2147483647\\n },\\n \\"filter\\": [],\\n \\"indexRefName\\": \\"kibanaSavedObjectMeta.searchSourceJSON.index\\"\\n}"},"sort":[["@timestamp","desc"]],"title":"[NGINX Core Logs 1.0] Nginx Error Logs","version":1},"id":"9f820fbe-ddde-43a2-9402-30bd295c97f6","migrationVersion":{"search":"7.9.3"},"references":[{"id":"47892350-b495-11ed-af0a-cf5c93b5a3b6","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"search","updated_at":"2023-02-26T00:34:36.592Z","version":"WzY0LDdd"}', + }, + { + body: + '{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\\"query\\":{\\"query\\":\\"\\",\\"language\\":\\"lucene\\"},\\"filter\\":[]}"},"savedSearchRefName":"search_0","title":"[NGINX Core Logs 1.0] Errors over time","uiStateJSON":"{}","version":1,"visState":"{\\"title\\":\\"[NGINX Core Logs 1.0] Errors over time\\",\\"type\\":\\"histogram\\",\\"aggs\\":[{\\"id\\":\\"1\\",\\"enabled\\":true,\\"type\\":\\"count\\",\\"params\\":{},\\"schema\\":\\"metric\\"},{\\"id\\":\\"2\\",\\"enabled\\":true,\\"type\\":\\"date_histogram\\",\\"params\\":{\\"field\\":\\"@timestamp\\",\\"timeRange\\":{\\"from\\":\\"now-24h\\",\\"to\\":\\"now\\"},\\"useNormalizedOpenSearchInterval\\":true,\\"scaleMetricValues\\":false,\\"interval\\":\\"auto\\",\\"drop_partials\\":false,\\"min_doc_count\\":1,\\"extended_bounds\\":{}},\\"schema\\":\\"segment\\"}],\\"params\\":{\\"type\\":\\"histogram\\",\\"grid\\":{\\"categoryLines\\":false},\\"categoryAxes\\":[{\\"id\\":\\"CategoryAxis-1\\",\\"type\\":\\"category\\",\\"position\\":\\"bottom\\",\\"show\\":true,\\"style\\":{},\\"scale\\":{\\"type\\":\\"linear\\"},\\"labels\\":{\\"show\\":true,\\"filter\\":true,\\"truncate\\":100},\\"title\\":{}}],\\"valueAxes\\":[{\\"id\\":\\"ValueAxis-1\\",\\"name\\":\\"LeftAxis-1\\",\\"type\\":\\"value\\",\\"position\\":\\"left\\",\\"show\\":true,\\"style\\":{},\\"scale\\":{\\"type\\":\\"linear\\",\\"mode\\":\\"normal\\"},\\"labels\\":{\\"show\\":true,\\"rotate\\":0,\\"filter\\":false,\\"truncate\\":100},\\"title\\":{\\"text\\":\\"Count\\"}}],\\"seriesParams\\":[{\\"show\\":true,\\"type\\":\\"histogram\\",\\"mode\\":\\"stacked\\",\\"data\\":{\\"label\\":\\"Count\\",\\"id\\":\\"1\\"},\\"valueAxis\\":\\"ValueAxis-1\\",\\"drawLinesBetweenPoints\\":true,\\"lineWidth\\":2,\\"showCircles\\":true}],\\"addTooltip\\":true,\\"addLegend\\":true,\\"legendPosition\\":\\"right\\",\\"times\\":[],\\"addTimeMarker\\":false,\\"labels\\":{\\"show\\":false},\\"thresholdLine\\":{\\"show\\":false,\\"value\\":10,\\"width\\":1,\\"style\\":\\"full\\",\\"color\\":\\"#E7664C\\"}}}"},"id":"865e577b-634b-4a65-b9d6-7e324c395d18","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"9f820fbe-ddde-43a2-9402-30bd295c97f6","name":"search_0","type":"search"}],"type":"visualization","updated_at":"2023-02-26T00:34:36.592Z","version":"WzY1LDdd"}', + }, + { + body: + '{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\\"query\\":{\\"query\\":\\"\\",\\"language\\":\\"kuery\\"},\\"filter\\":[]}"},"savedSearchRefName":"search_0","title":"Top Paths","uiStateJSON":"{}","version":1,"visState":"{\\"title\\":\\"Top Paths\\",\\"type\\":\\"table\\",\\"aggs\\":[{\\"id\\":\\"1\\",\\"enabled\\":true,\\"type\\":\\"count\\",\\"params\\":{},\\"schema\\":\\"metric\\"},{\\"id\\":\\"2\\",\\"enabled\\":true,\\"type\\":\\"terms\\",\\"params\\":{\\"field\\":\\"http.url\\",\\"orderBy\\":\\"1\\",\\"order\\":\\"desc\\",\\"size\\":10,\\"otherBucket\\":false,\\"otherBucketLabel\\":\\"Other\\",\\"missingBucket\\":false,\\"missingBucketLabel\\":\\"Missing\\",\\"customLabel\\":\\"Paths\\"},\\"schema\\":\\"bucket\\"}],\\"params\\":{\\"perPage\\":10,\\"showPartialRows\\":false,\\"showMetricsAtAllLevels\\":false,\\"showTotal\\":false,\\"totalFunc\\":\\"sum\\",\\"percentageCol\\":\\"\\"}}"},"id":"dc1803f0-b478-11ed-9063-ebe46f9ac203","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"d80e05b2-518c-4c3d-9651-4c9d8632dce4","name":"search_0","type":"search"}],"type":"visualization","updated_at":"2023-02-26T00:34:36.592Z","version":"WzY2LDdd"}', + }, + { + body: + '{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\\"query\\":{\\"query\\":\\"\\",\\"language\\":\\"kuery\\"},\\"filter\\":[]}"},"savedSearchRefName":"search_0","title":"Data Volume","uiStateJSON":"{}","version":1,"visState":"{\\"title\\":\\"Data Volume\\",\\"type\\":\\"area\\",\\"aggs\\":[{\\"id\\":\\"1\\",\\"enabled\\":true,\\"type\\":\\"sum\\",\\"params\\":{\\"field\\":\\"http.response.bytes\\",\\"customLabel\\":\\"Response Bytes\\"},\\"schema\\":\\"metric\\"},{\\"id\\":\\"2\\",\\"enabled\\":true,\\"type\\":\\"date_histogram\\",\\"params\\":{\\"field\\":\\"observerTime\\",\\"timeRange\\":{\\"from\\":\\"now-15m\\",\\"to\\":\\"now\\"},\\"useNormalizedOpenSearchInterval\\":true,\\"scaleMetricValues\\":false,\\"interval\\":\\"auto\\",\\"drop_partials\\":false,\\"min_doc_count\\":1,\\"extended_bounds\\":{},\\"customLabel\\":\\"\\"},\\"schema\\":\\"segment\\"}],\\"params\\":{\\"type\\":\\"area\\",\\"grid\\":{\\"categoryLines\\":false},\\"categoryAxes\\":[{\\"id\\":\\"CategoryAxis-1\\",\\"type\\":\\"category\\",\\"position\\":\\"bottom\\",\\"show\\":true,\\"style\\":{},\\"scale\\":{\\"type\\":\\"linear\\"},\\"labels\\":{\\"show\\":true,\\"filter\\":true,\\"truncate\\":100},\\"title\\":{}}],\\"valueAxes\\":[{\\"id\\":\\"ValueAxis-1\\",\\"name\\":\\"LeftAxis-1\\",\\"type\\":\\"value\\",\\"position\\":\\"left\\",\\"show\\":true,\\"style\\":{},\\"scale\\":{\\"type\\":\\"linear\\",\\"mode\\":\\"normal\\"},\\"labels\\":{\\"show\\":true,\\"rotate\\":0,\\"filter\\":false,\\"truncate\\":100},\\"title\\":{\\"text\\":\\"Response Bytes\\"}}],\\"seriesParams\\":[{\\"show\\":true,\\"type\\":\\"area\\",\\"mode\\":\\"stacked\\",\\"data\\":{\\"label\\":\\"Response Bytes\\",\\"id\\":\\"1\\"},\\"drawLinesBetweenPoints\\":true,\\"lineWidth\\":2,\\"showCircles\\":true,\\"interpolate\\":\\"linear\\",\\"valueAxis\\":\\"ValueAxis-1\\"}],\\"addTooltip\\":true,\\"addLegend\\":true,\\"legendPosition\\":\\"right\\",\\"times\\":[],\\"addTimeMarker\\":false,\\"thresholdLine\\":{\\"show\\":false,\\"value\\":10,\\"width\\":1,\\"style\\":\\"full\\",\\"color\\":\\"#E7664C\\"},\\"labels\\":{}}}"},"id":"99acc580-b47a-11ed-9063-ebe46f9ac203","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"d80e05b2-518c-4c3d-9651-4c9d8632dce4","name":"search_0","type":"search"}],"type":"visualization","updated_at":"2023-02-26T00:34:36.592Z","version":"WzY3LDdd"}', + }, + { + body: + '{"attributes":{"description":"requests per minute aggregation","kibanaSavedObjectMeta":{"searchSourceJSON":"{\\"query\\":{\\"query\\":\\"\\",\\"language\\":\\"kuery\\"},\\"filter\\":[],\\"indexRefName\\":\\"kibanaSavedObjectMeta.searchSourceJSON.index\\"}"},"title":"Req-per-min","uiStateJSON":"{}","version":1,"visState":"{\\"title\\":\\"Req-per-min\\",\\"type\\":\\"table\\",\\"aggs\\":[{\\"id\\":\\"1\\",\\"enabled\\":true,\\"type\\":\\"moving_avg\\",\\"params\\":{\\"metricAgg\\":\\"custom\\",\\"customMetric\\":{\\"id\\":\\"1-metric\\",\\"enabled\\":true,\\"type\\":\\"count\\",\\"params\\":{}},\\"window\\":5,\\"script\\":\\"MovingFunctions.unweightedAvg(values)\\"},\\"schema\\":\\"metric\\"},{\\"id\\":\\"2\\",\\"enabled\\":true,\\"type\\":\\"date_histogram\\",\\"params\\":{\\"field\\":\\"@timestamp\\",\\"timeRange\\":{\\"from\\":\\"2023-02-24T17:25:00.000Z\\",\\"to\\":\\"2023-02-24T17:30:00.000Z\\"},\\"useNormalizedOpenSearchInterval\\":true,\\"scaleMetricValues\\":false,\\"interval\\":\\"m\\",\\"drop_partials\\":false,\\"min_doc_count\\":0,\\"extended_bounds\\":{},\\"customLabel\\":\\"Req/Min\\"},\\"schema\\":\\"bucket\\"}],\\"params\\":{\\"perPage\\":10,\\"showPartialRows\\":false,\\"showMetricsAtAllLevels\\":false,\\"showTotal\\":false,\\"totalFunc\\":\\"sum\\",\\"percentageCol\\":\\"\\"}}"},"id":"01ea64d0-b62f-11ed-a677-43d7aa86763b","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"47892350-b495-11ed-af0a-cf5c93b5a3b6","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"visualization","updated_at":"2023-02-26T23:40:53.020Z","version":"WzcyLDdd"}', + }, + { + body: + '{"attributes":{"description":"Nginx dashboard with basic Observability on access / error logs","hits":0,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\\"query\\":{\\"language\\":\\"kuery\\",\\"query\\":\\"\\"},\\"filter\\":[]}"},"optionsJSON":"{\\"hidePanelTitles\\":false,\\"useMargins\\":true}","panelsJSON":"[{\\"version\\":\\"2.5.0\\",\\"gridData\\":{\\"h\\":8,\\"i\\":\\"1f31e50b-06e3-41e6-972e-e4e5fe1a9872\\",\\"w\\":48,\\"x\\":0,\\"y\\":0},\\"panelIndex\\":\\"1f31e50b-06e3-41e6-972e-e4e5fe1a9872\\",\\"embeddableConfig\\":{},\\"panelRefName\\":\\"panel_0\\"},{\\"version\\":\\"2.5.0\\",\\"gridData\\":{\\"h\\":9,\\"i\\":\\"d91a8da4-b34b-470a-aca6-9c76b47cd6fb\\",\\"w\\":24,\\"x\\":0,\\"y\\":8},\\"panelIndex\\":\\"d91a8da4-b34b-470a-aca6-9c76b47cd6fb\\",\\"embeddableConfig\\":{},\\"panelRefName\\":\\"panel_1\\"},{\\"version\\":\\"2.5.0\\",\\"gridData\\":{\\"h\\":15,\\"i\\":\\"27149e5a-3a77-4f3c-800e-8a160c3765f4\\",\\"w\\":24,\\"x\\":24,\\"y\\":8},\\"panelIndex\\":\\"27149e5a-3a77-4f3c-800e-8a160c3765f4\\",\\"embeddableConfig\\":{},\\"panelRefName\\":\\"panel_2\\"},{\\"version\\":\\"2.5.0\\",\\"gridData\\":{\\"x\\":0,\\"y\\":17,\\"w\\":24,\\"h\\":15,\\"i\\":\\"4d8c2aa7-159c-4a1a-80ff-00a9299056ce\\"},\\"panelIndex\\":\\"4d8c2aa7-159c-4a1a-80ff-00a9299056ce\\",\\"embeddableConfig\\":{},\\"panelRefName\\":\\"panel_3\\"},{\\"version\\":\\"2.5.0\\",\\"gridData\\":{\\"x\\":24,\\"y\\":23,\\"w\\":24,\\"h\\":15,\\"i\\":\\"800b7f19-f50c-417f-8987-21b930531cbe\\"},\\"panelIndex\\":\\"800b7f19-f50c-417f-8987-21b930531cbe\\",\\"embeddableConfig\\":{},\\"panelRefName\\":\\"panel_4\\"}]","timeRestore":false,"title":"[NGINX Core Logs 1.0] Overview","version":1},"id":"96847220-5261-44d0-89b4-65f3a659f13a","migrationVersion":{"dashboard":"7.9.3"},"references":[{"id":"3b49a65d-54d8-483d-a8f0-3d7c855e1ecf","name":"panel_0","type":"visualization"},{"id":"865e577b-634b-4a65-b9d6-7e324c395d18","name":"panel_1","type":"visualization"},{"id":"dc1803f0-b478-11ed-9063-ebe46f9ac203","name":"panel_2","type":"visualization"},{"id":"99acc580-b47a-11ed-9063-ebe46f9ac203","name":"panel_3","type":"visualization"},{"id":"01ea64d0-b62f-11ed-a677-43d7aa86763b","name":"panel_4","type":"visualization"}],"type":"dashboard","updated_at":"2023-02-26T23:44:09.855Z","version":"WzczLDdd"}', + }, + { + body: '{"exportedCount":9,"missingRefCount":0,"missingReferences":[]}', + }, + ], + }, + }, +}; diff --git a/public/components/integrations/components/added_integration.tsx b/public/components/integrations/components/added_integration.tsx index c0f9148447..6598e8fc02 100644 --- a/public/components/integrations/components/added_integration.tsx +++ b/public/components/integrations/components/added_integration.tsx @@ -30,7 +30,7 @@ import { Toast } from '@elastic/eui/src/components/toast/global_toast_list'; import _ from 'lodash'; import { PanelTitle } from '../../trace_analytics/components/common/helper_functions'; import { FILTER_OPTIONS } from '../../../../common/constants/explorer'; -import { OBSERVABILITY_BASE } from '../../../../common/constants/shared'; +import { INTEGRATIONS_BASE, OBSERVABILITY_BASE } from '../../../../common/constants/shared'; import { DeleteModal } from '../../common/helpers/delete_modal'; import { AddedIntegrationProps } from './integration_types'; @@ -53,7 +53,7 @@ export function AddedIntegration(props: AddedIntegrationProps) { }, { text: integrationInstanceId, - href: `${last(parentBreadcrumbs)!.href}integrations/installed/${integrationInstanceId}`, + href: `#/installed/${integrationInstanceId}`, }, ]); handleDataRequest(); @@ -79,30 +79,9 @@ export function AddedIntegration(props: AddedIntegrationProps) { }; async function handleDataRequest() { - http.get(`${OBSERVABILITY_BASE}/store/id`).then((exists) => setData(exists)); - } - - const setToast = (title: string, color = 'success', text?: ReactChild) => { - if (!text) text = ''; - setToasts([...toasts, { id: new Date().toISOString(), title, text, color } as Toast]); - }; - - async function addIntegrationRequest(name: string) { http - .post(`${OBSERVABILITY_BASE}/store`) - .then((res) => { - setToast( - `${name} integration successfully added!`, - 'success', - `View the added assets from ${name} in the Added Integrations list` - ); - }) - .catch((err) => - setToast( - 'Failed to load integration. Check Added Integrations table for more details', - 'danger' - ) - ); + .get(`${INTEGRATIONS_BASE}/store/${integrationInstanceId}`) + .then((exists) => setData(exists)); } function AddedOverview(overviewProps: any) { @@ -116,7 +95,7 @@ export function AddedIntegration(props: AddedIntegrationProps) { - {data.data.id} + {data?.data?.id} @@ -138,8 +117,8 @@ export function AddedIntegration(props: AddedIntegrationProps) {

Template

- - {data.data.templateName} + + {data?.data?.templateName}
@@ -147,28 +126,28 @@ export function AddedIntegration(props: AddedIntegrationProps) {

Date Added

- {data.data.creationDate?.split('T')[0]} + {data?.data?.creationDate?.split('T')[0]}

Status

- {data.data.status} + {data?.data?.status}

Added By

- {data.data.author} + {data?.data?.author}

Tags

- {data.data.license} + {data?.data?.license}
@@ -177,7 +156,7 @@ export function AddedIntegration(props: AddedIntegrationProps) { } function AddedAssets(assetProps: any) { - const data = assetProps.data.data.assets || []; + const data = assetProps.data?.data?.assets || []; const search = { box: { @@ -257,7 +236,7 @@ export function AddedIntegration(props: AddedIntegrationProps) { } function AddedIntegrationFields(fieldProps: any) { - const data = fieldProps.data.data.fields || []; + const data = fieldProps.data?.data?.fields || []; const search = { box: { diff --git a/public/components/integrations/components/added_integration_overview_page.tsx b/public/components/integrations/components/added_integration_overview_page.tsx index 80cb92913c..cb799be89c 100644 --- a/public/components/integrations/components/added_integration_overview_page.tsx +++ b/public/components/integrations/components/added_integration_overview_page.tsx @@ -29,6 +29,7 @@ export interface AddedIntegrationType { status: string; assets: any[]; addedBy: string; + id: string; } export function AddedIntegrationOverviewPage(props: AddedIntegrationOverviewPageProps) { diff --git a/public/components/integrations/components/added_integration_table.tsx b/public/components/integrations/components/added_integration_table.tsx index dc301b602c..86fd00035f 100644 --- a/public/components/integrations/components/added_integration_table.tsx +++ b/public/components/integrations/components/added_integration_table.tsx @@ -31,9 +31,7 @@ export function AddedIntegrationsTable(props: AddedIntegrationsTableProps) { asset.isDefaultAsset)[0].assetId - }`} + href={`#/installed/${record.id}`} > {_.truncate(record.name, { length: 100 })} @@ -60,7 +58,7 @@ export function AddedIntegrationsTable(props: AddedIntegrationsTableProps) { truncateText: true, render: (value, record) => ( - {_.truncate(record.type, { length: 100 })} + {_.truncate(record.dataSource.sourceType, { length: 100 })} ), }, @@ -119,6 +117,7 @@ export function AddedIntegrationsTable(props: AddedIntegrationsTableProps) { }, ], }; + console.log(integrations); return ( diff --git a/public/components/integrations/components/integration.tsx b/public/components/integrations/components/integration.tsx index a1b227d78d..d521c83c20 100644 --- a/public/components/integrations/components/integration.tsx +++ b/public/components/integrations/components/integration.tsx @@ -22,6 +22,7 @@ import { IntegrationAssets } from './integration_assets_panel'; import { getAddIntegrationModal } from './add_integration_modal'; import { AvailableIntegrationProps } from './integration_types'; import { INTEGRATIONS_BASE } from '../../../../common/constants/shared'; +import { IntegrationScreenshots } from './integration_screenshots_panel'; export function Integration(props: AvailableIntegrationProps) { const { http, integrationTemplateId, chrome, parentBreadcrumbs } = props; @@ -74,7 +75,7 @@ export function Integration(props: AvailableIntegrationProps) { async function handleDataRequest() { // TODO fill in ID request here - http.get(`${INTEGRATIONS_BASE}/repository/nginx`).then((exists) => { + http.get(`${INTEGRATIONS_BASE}/repository/${integrationTemplateId}`).then((exists) => { setData(exists.data); }); } @@ -120,6 +121,8 @@ export function Integration(props: AvailableIntegrationProps) { {IntegrationDetails({ data })} + {IntegrationScreenshots({ data })} + {IntegrationAssets({ data })} {IntegrationFields({ data })} diff --git a/public/components/integrations/components/integration_details_panel.tsx b/public/components/integrations/components/integration_details_panel.tsx index c5798dd6ea..c88f0d865a 100644 --- a/public/components/integrations/components/integration_details_panel.tsx +++ b/public/components/integrations/components/integration_details_panel.tsx @@ -3,14 +3,14 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { EuiFlexGroup, EuiPanel, EuiSpacer, EuiFlexItem, EuiText } from '@elastic/eui'; +import { EuiPanel, EuiSpacer, EuiText } from '@elastic/eui'; import React from 'react'; import { PanelTitle } from '../../trace_analytics/components/common/helper_functions'; export function IntegrationDetails(props: any) { let screenshots; - if (props.data.data.statics.mapping.gallery) { - screenshots = props.data.data.data.statics.gallery; + if (props.data.data.statics.gallery) { + screenshots = props.data.data.statics.gallery; } return ( @@ -18,17 +18,6 @@ export function IntegrationDetails(props: any) { {props.data.data.description} - - - - {screenshots?.map((i, v) => { - return ( - - - - ); - })} - ); } diff --git a/public/components/integrations/components/integration_overview_panel.tsx b/public/components/integrations/components/integration_overview_panel.tsx index c031bed2fa..304d70698b 100644 --- a/public/components/integrations/components/integration_overview_panel.tsx +++ b/public/components/integrations/components/integration_overview_panel.tsx @@ -27,7 +27,7 @@ export function IntegrationOverview(props: any) { return ( React Logo @@ -44,7 +44,7 @@ export function IntegrationOverview(props: any) { { props.getModal(data.data.name); }} diff --git a/public/components/integrations/components/integration_screenshots_panel.tsx b/public/components/integrations/components/integration_screenshots_panel.tsx new file mode 100644 index 0000000000..368afbae3c --- /dev/null +++ b/public/components/integrations/components/integration_screenshots_panel.tsx @@ -0,0 +1,36 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { EuiFlexGroup, EuiPanel, EuiFlexItem } from '@elastic/eui'; +import React from 'react'; +import { PanelTitle } from '../../trace_analytics/components/common/helper_functions'; +import { INTEGRATIONS_BASE } from '../../../../common/constants/shared'; + +export function IntegrationScreenshots(props: any) { + let screenshots; + if (props.data.data.statics.gallery) { + screenshots = props.data.data.statics.gallery; + } + + return ( + + + + {screenshots?.map((i, v) => { + return ( + + + + ); + })} + + + ); +} diff --git a/server/adaptors/integrations/__data__/repository.json b/server/adaptors/integrations/__data__/repository.json index a6a251590d..f01958d5e9 100644 --- a/server/adaptors/integrations/__data__/repository.json +++ b/server/adaptors/integrations/__data__/repository.json @@ -5,6 +5,7 @@ "integrationType": "logs", "description": "Nginx HTTP server collector", "license": "Apache-2.0", + "link": "https://www.nginx.com/", "statics": { "mapping": { "logo": "/logo" @@ -15,7 +16,10 @@ "annotation": "NginX Logo", "data": "iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAACXBIWXMAAAsSAAALEgHS3X78AAAfBklEQVR42u1dDYxc1XWe2dkNfzFEAVxh8LyZtU0LhoTYnvtmAacINWmJm+CmiRKoiBLRqH/8qE3URm2pLBqVUsC77834L5CSJqKhblOaQlMUEaKmSdSgNCSIokJL25QSURMiU6EAM7O7Pffcc++7b7y217vz3u7M+450NG9nZ3dm7rv3u+d85+eWSpCRlSAOS7Uo5Gv9GERhxf0uCjcHkXqEXvNoLVZvsc/XIlXRf2euG6Va3MRAQiDDtfCVXuAOBPoW/lm0yKfpsVvfPzWvlV7fo9fF9PzahYCAgIKAIMTAQiCrWap7L9cLt+Qt9jH6eYwX9MxlY/TzDaQvTN596Twt6Hm61gu/p6/1c3R9iK5vrrVURUCgHMjfW2DZGG/HQEMgq3rXj8Jy366/gxby4/VP0cLf09QLvUvPzemFz0AQqzn9XK3dnNevoevv0fPvSVsDqmzdggDWAAQyFH7+xbTwv1jfRwt73xQtdqUX/qxZ9BoAlAaBOXPNz81qINCv1UrXD9JrLgE/AIEMq5+vd/1YzWpz3+34kVv886JzfRYBuwb1A5eCH4BAhtzPd+a+7PT+wk9rpK0BAwwBX5NbAH4AAhl6P98t7EVqAgTgByCQoffz55eo4AcgkBHx85cOAuAHIJAR8fOXquAHIJCR8vOX4RaAH4BARsXPBz8AgRTczwc/AIEU3s8HPwCBwM8HPwCBwM8HPwCBwM8HPwCBwM8HPwCBwM8HPwCBwM8HPwCBwM8HPwCBnw8/H/wABH4+/HzwAxD4+fDzwQ9A4OfDzwc/AIGfDz8f/AAEfj4U/AAEfj4U/AAEfj4U/AAEfj4U/AAEfj4U/AAEfj4U/AAEfj4U/AAEfj4U/AAEfj4U/AAEfj4U/AAEfj4U/AAEf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ptors/integrations/__test__/builder.test.ts index a08afb2116..ab40eec953 100644 --- a/server/adaptors/integrations/__test__/builder.test.ts +++ b/server/adaptors/integrations/__test__/builder.test.ts @@ -1,3 +1,8 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + import { IntegrationInstanceBuilder } from '../integrations_builder'; import { SavedObjectsClientContract } from '../../../../../../src/core/server'; diff --git a/server/adaptors/integrations/__test__/kibana_backend.test.ts b/server/adaptors/integrations/__test__/kibana_backend.test.ts index 1ba117669f..47bda3c081 100644 --- a/server/adaptors/integrations/__test__/kibana_backend.test.ts +++ b/server/adaptors/integrations/__test__/kibana_backend.test.ts @@ -1,3 +1,8 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + import { IntegrationsKibanaBackend } from '../integrations_kibana_backend'; import { SavedObjectsClientContract } from '../../../../../../src/core/server/types'; import { IntegrationInstanceBuilder } from '../integrations_builder'; diff --git a/server/adaptors/integrations/__test__/repository.test.ts b/server/adaptors/integrations/__test__/repository.test.ts index 935f36ccc6..a6f8252376 100644 --- a/server/adaptors/integrations/__test__/repository.test.ts +++ b/server/adaptors/integrations/__test__/repository.test.ts @@ -1,3 +1,8 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + import * as fs from 'fs'; import { IntegrationsRepository } from '../integrations_repository'; diff --git a/server/adaptors/integrations/integrations_adaptor.ts b/server/adaptors/integrations/integrations_adaptor.ts index 554f310af2..87e5994c99 100644 --- a/server/adaptors/integrations/integrations_adaptor.ts +++ b/server/adaptors/integrations/integrations_adaptor.ts @@ -3,8 +3,6 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { SavedObjectsBulkCreateObject } from '../../../../../src/core/server'; - export interface IntegrationsAdaptor { getIntegrationTemplates: ( query?: IntegrationTemplateQuery @@ -12,7 +10,9 @@ export interface IntegrationsAdaptor { getIntegrationInstances: ( query?: IntegrationInstanceQuery - ) => Promise; + ) => Promise; + + getIntegrationInstance: (query?: IntegrationInstanceQuery) => Promise; loadIntegrationInstance: (templateName: string) => Promise; diff --git a/server/adaptors/integrations/integrations_builder.ts b/server/adaptors/integrations/integrations_builder.ts index cc410d033c..d6e4a2c7e2 100644 --- a/server/adaptors/integrations/integrations_builder.ts +++ b/server/adaptors/integrations/integrations_builder.ts @@ -1,3 +1,9 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { v4 as uuidv4 } from 'uuid'; import { SavedObjectsClientContract } from '../../../../../src/core/server'; interface BuilderOptions { diff --git a/server/adaptors/integrations/integrations_kibana_backend.ts b/server/adaptors/integrations/integrations_kibana_backend.ts index aa625803ef..995354936e 100644 --- a/server/adaptors/integrations/integrations_kibana_backend.ts +++ b/server/adaptors/integrations/integrations_kibana_backend.ts @@ -1,7 +1,13 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + import { IntegrationsAdaptor } from './integrations_adaptor'; import { SavedObjectsClientContract } from '../../../../../src/core/server/types'; import { IntegrationInstanceBuilder } from './integrations_builder'; import { IntegrationsRepository } from './integrations_repository'; +import { SimpleSavedObject } from '../../../../../src/core/public'; export class IntegrationsKibanaBackend implements IntegrationsAdaptor { client: SavedObjectsClientContract; @@ -28,14 +34,27 @@ export class IntegrationsKibanaBackend implements IntegrationsAdaptor { getIntegrationInstances = async ( _query?: IntegrationInstanceQuery - ): Promise => { + ): Promise => { const result = await this.client.find({ type: 'integration-instance' }); + console.log(result); return Promise.resolve({ total: result.total, - hits: result.saved_objects.map((x) => x.attributes) as IntegrationInstance[], + hits: result.saved_objects?.map((x) => ({ + ...x.attributes!, + id: x.id, + })) as IntegrationInstanceResult[], }); }; + getIntegrationInstance = async ( + _query?: IntegrationInstanceQuery + ): Promise => { + console.log(`id:${_query!.id}`); + const result = await this.client.get('integration-instance', `${_query!.id}`); + console.log(savedObjectToIntegrationInstance(result)); + return Promise.resolve(savedObjectToIntegrationInstance(result)); + }; + loadIntegrationInstance = async (templateName: string): Promise => { const template = await this.repository.getByName(templateName); try { @@ -66,3 +85,11 @@ export class IntegrationsKibanaBackend implements IntegrationsAdaptor { return Promise.resolve(data); }; } + +/* + ** UTILITY FUNCTIONS + */ +const savedObjectToIntegrationInstance = (so: any): IntegrationInstanceResult => ({ + id: so.id, + ...so.attributes, +}); diff --git a/server/adaptors/integrations/integrations_repository.ts b/server/adaptors/integrations/integrations_repository.ts index f08d36dd8a..ac055bfe90 100644 --- a/server/adaptors/integrations/integrations_repository.ts +++ b/server/adaptors/integrations/integrations_repository.ts @@ -1,3 +1,8 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + import * as fs from 'fs'; const DEFAULT_REPOSITORY_PATH: string = __dirname + '/__data__/repository.json'; diff --git a/server/adaptors/integrations/types.ts b/server/adaptors/integrations/types.ts index 4bf1dfc4d6..83d9df0e8f 100644 --- a/server/adaptors/integrations/types.ts +++ b/server/adaptors/integrations/types.ts @@ -1,3 +1,8 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + interface IntegrationTemplate { name: string; version: string; @@ -64,6 +69,22 @@ interface IntegrationInstance { assets: AssetReference[]; } +interface IntegrationInstanceResult { + name: string; + templateName: string; + dataSource: { + sourceType: string; + dataset: string; + namespace: string; + }; + creationDate: Date; + tags?: string[]; + status: string; + addedBy?: string; + assets: AssetReference[]; + id: string; +} + interface AssetReference { assetType: string; assetId: string; @@ -71,10 +92,11 @@ interface AssetReference { isDefaultAsset: boolean; } -interface IntegrationInstanceSearchResult { - hits: IntegrationInstance[]; +interface IntegrationInstancesSearchResult { + hits: IntegrationInstanceResult[]; } interface IntegrationInstanceQuery { added?: boolean; + id?: string; } diff --git a/server/routes/integrations/integrations_router.ts b/server/routes/integrations/integrations_router.ts index 43fb3f8e0d..de3fb91af7 100644 --- a/server/routes/integrations/integrations_router.ts +++ b/server/routes/integrations/integrations_router.ts @@ -36,7 +36,7 @@ export const handleWithCallback = async ( ): Promise => { try { const data = await callback(adaptor); - console.log(`handleWithCallback: callback returned ${data.toString().length} bytes`); + // console.log(`handleWithCallback: callback returned ${data.toString().length} bytes`); return response.ok({ body: { data, @@ -164,4 +164,51 @@ export function registerIntegrationsRoute(router: IRouter) { }); } ); + + router.get( + { + path: `${INTEGRATIONS_BASE}/store/{id}`, + validate: { + params: schema.object({ + id: schema.string(), + }), + }, + }, + async (context, request, response): Promise => { + const adaptor = getAdaptor(context, request); + console.log(request); + console.log(request.params.id); + return handleWithCallback(adaptor, response, async (a: IntegrationsAdaptor) => { + return { + data: await a.getIntegrationInstance({ + added, + id: request.params.id, + }), + }; + }); + } + ); + + // router.get( + // { + // path: `${INTEGRATIONS_BASE}/repository/{name}`, + // validate: { + // params: schema.object({ + // name: schema.string(), + // }), + // }, + // }, + // async (context, request, response): Promise => { + // const adaptor = getAdaptor(context, request); + // return handleWithCallback(adaptor, response, async (a: IntegrationsAdaptor) => { + // return { + // data: ( + // await a.getIntegrationTemplates({ + // name: request.params.name, + // }) + // ).hits[0], + // }; + // }); + // } + // ); } From 3c9863c31ab63ce36890c2a6876dc6a273f81d05 Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Wed, 31 May 2023 14:35:37 -0400 Subject: [PATCH 100/190] add screenshots and fix up mappings and breadcrumbs Signed-off-by: Derek Ho --- .../integrations/components/added_integration.tsx | 9 +++++---- .../components/added_integration_overview_page.tsx | 2 +- .../integrations/components/added_integration_table.tsx | 3 +-- .../integrations/components/integration_assets_panel.tsx | 3 ++- .../components/integration_overview_panel.tsx | 2 +- .../components/integration_screenshots_panel.tsx | 2 +- server/adaptors/integrations/__data__/repository.json | 5 +++++ 7 files changed, 16 insertions(+), 10 deletions(-) diff --git a/public/components/integrations/components/added_integration.tsx b/public/components/integrations/components/added_integration.tsx index 6598e8fc02..37e20a2983 100644 --- a/public/components/integrations/components/added_integration.tsx +++ b/public/components/integrations/components/added_integration.tsx @@ -38,7 +38,7 @@ export function AddedIntegration(props: AddedIntegrationProps) { const { http, integrationInstanceId, chrome, parentBreadcrumbs } = props; const [toasts, setToasts] = useState([]); - const [stateData, setData] = useState({ data: {} }); + const [stateData, setData] = useState({ data: {} }); useEffect(() => { chrome.setBreadcrumbs([ @@ -52,12 +52,12 @@ export function AddedIntegration(props: AddedIntegrationProps) { href: '#/installed', }, { - text: integrationInstanceId, - href: `#/installed/${integrationInstanceId}`, + text: `${stateData.data.data?.name}`, + href: `#/installed/${stateData.data.data?.id}`, }, ]); handleDataRequest(); - }, [integrationInstanceId]); + }, [integrationInstanceId, stateData.data.data?.name]); const [isModalVisible, setIsModalVisible] = useState(false); const [modalLayout, setModalLayout] = useState(); @@ -100,6 +100,7 @@ export function AddedIntegration(props: AddedIntegrationProps) { { getModal(); diff --git a/public/components/integrations/components/added_integration_overview_page.tsx b/public/components/integrations/components/added_integration_overview_page.tsx index cb799be89c..719b4af99b 100644 --- a/public/components/integrations/components/added_integration_overview_page.tsx +++ b/public/components/integrations/components/added_integration_overview_page.tsx @@ -46,7 +46,7 @@ export function AddedIntegrationOverviewPage(props: AddedIntegrationOverviewPage }, { text: 'Installed Integrations', - href: '#//installed', + href: '#/installed', }, ]); handleDataRequest(); diff --git a/public/components/integrations/components/added_integration_table.tsx b/public/components/integrations/components/added_integration_table.tsx index 86fd00035f..133e95639f 100644 --- a/public/components/integrations/components/added_integration_table.tsx +++ b/public/components/integrations/components/added_integration_table.tsx @@ -97,7 +97,7 @@ export function AddedIntegrationsTable(props: AddedIntegrationsTableProps) { }, ] as Array>; - const FILTER_OPTIONS = ['Visualization', 'Query', 'Metric']; + const FILTER_OPTIONS = ['logs']; const search = { box: { @@ -117,7 +117,6 @@ export function AddedIntegrationsTable(props: AddedIntegrationsTableProps) { }, ], }; - console.log(integrations); return ( diff --git a/public/components/integrations/components/integration_assets_panel.tsx b/public/components/integrations/components/integration_assets_panel.tsx index bc5bc8ed58..f7ef3f67e1 100644 --- a/public/components/integrations/components/integration_assets_panel.tsx +++ b/public/components/integrations/components/integration_assets_panel.tsx @@ -12,9 +12,10 @@ import { } from '@elastic/eui'; import React from 'react'; import _ from 'lodash'; -import { FILTER_OPTIONS } from '../../../../common/constants/explorer'; import { PanelTitle } from '../../trace_analytics/components/common/helper_functions'; +const FILTER_OPTIONS = ['index-pattern', 'search', 'visualization', 'dashboard']; + export function IntegrationAssets(props: any) { const data = props.data.data.displayAssets.map((x: any) => JSON.parse(x.body)) || []; diff --git a/public/components/integrations/components/integration_overview_panel.tsx b/public/components/integrations/components/integration_overview_panel.tsx index 304d70698b..8d9dd10021 100644 --- a/public/components/integrations/components/integration_overview_panel.tsx +++ b/public/components/integrations/components/integration_overview_panel.tsx @@ -42,7 +42,7 @@ export function IntegrationOverview(props: any) { - + { diff --git a/public/components/integrations/components/integration_screenshots_panel.tsx b/public/components/integrations/components/integration_screenshots_panel.tsx index 368afbae3c..3fb6164b82 100644 --- a/public/components/integrations/components/integration_screenshots_panel.tsx +++ b/public/components/integrations/components/integration_screenshots_panel.tsx @@ -22,7 +22,7 @@ export function IntegrationScreenshots(props: any) { return ( Date: Wed, 31 May 2023 15:15:28 -0700 Subject: [PATCH 101/190] Add failing test case for empty object Signed-off-by: Simeon Widdis --- server/adaptors/integrations/__test__/builder.test.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/adaptors/integrations/__test__/builder.test.ts b/server/adaptors/integrations/__test__/builder.test.ts index a08afb2116..b533ef87b6 100644 --- a/server/adaptors/integrations/__test__/builder.test.ts +++ b/server/adaptors/integrations/__test__/builder.test.ts @@ -94,7 +94,7 @@ describe('IntegrationInstanceBuilder', () => { ); }); - it('should not reject on validation a valid template', async () => { + it('should not reject validating a valid template', async () => { // Placeholder template for now -- fill in when validation is implemented const template = { name: 'Template 1' } as IntegrationTemplate; @@ -102,4 +102,9 @@ describe('IntegrationInstanceBuilder', () => { expect(result).toBeUndefined(); }); + + it('should reject an empty object', async () => { + const template = {} as IntegrationTemplate; + await expect(builder.validate(template)).rejects.toBeTruthy(); + }); }); From 2f0c14044c11c9eebdf5627734d00f69b85e4a4a Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Wed, 31 May 2023 15:20:10 -0700 Subject: [PATCH 102/190] Make template test pass Signed-off-by: Simeon Widdis --- server/adaptors/integrations/integrations_builder.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/server/adaptors/integrations/integrations_builder.ts b/server/adaptors/integrations/integrations_builder.ts index cc410d033c..bbcd9b300f 100644 --- a/server/adaptors/integrations/integrations_builder.ts +++ b/server/adaptors/integrations/integrations_builder.ts @@ -24,11 +24,20 @@ export class IntegrationInstanceBuilder { return result; } - async validate(_template: IntegrationTemplate): Promise { + async validate(template: IntegrationTemplate): Promise { // Assuming everything is valid for now + if (!this.is_integration_template(template)) { + return Promise.reject( + 'Provided template does not have the parameters of a valid IntegrationTemplate' + ); + } return Promise.resolve(); } + is_integration_template(template: any): template is IntegrationTemplate { + return template && template.name && typeof template.name === 'string'; + } + async post_assets(assets: DisplayAsset[]): Promise { try { const deserializedAssets = assets.map((asset) => JSON.parse(asset.body)); From 14804afbae19c095343e80111ac8f02802b5879d Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Thu, 1 Jun 2023 11:31:42 -0400 Subject: [PATCH 103/190] use flyout according to figma and connect flyout input to backend creation Signed-off-by: Derek Ho --- .../components/add_integration_flyout.tsx | 103 ++++++++++++++++++ .../components/added_integration.tsx | 2 +- .../integrations/components/integration.tsx | 80 +++++++++----- .../components/integration_overview_panel.tsx | 2 +- .../__test__/kibana_backend.test.ts | 7 +- .../integrations/integrations_adaptor.ts | 2 +- .../integrations_kibana_backend.ts | 7 +- .../integrations/integrations_router.ts | 13 ++- 8 files changed, 177 insertions(+), 39 deletions(-) create mode 100644 public/components/integrations/components/add_integration_flyout.tsx diff --git a/public/components/integrations/components/add_integration_flyout.tsx b/public/components/integrations/components/add_integration_flyout.tsx new file mode 100644 index 0000000000..df340eeea5 --- /dev/null +++ b/public/components/integrations/components/add_integration_flyout.tsx @@ -0,0 +1,103 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import _ from 'lodash'; +import { + EuiButton, + EuiFieldText, + EuiFlexGroup, + EuiFlexItem, + EuiFlyout, + EuiFlyoutBody, + EuiFlyoutFooter, + EuiFlyoutHeader, + EuiForm, + EuiFormRow, + EuiSpacer, + EuiTitle, +} from '@elastic/eui'; +import React, { useState } from 'react'; + +interface IntegrationFlyoutProps { + onClose: () => void; + onCreate: (name: string, namespace: string, tags: string) => void; + integrationName: string; +} + +export function AddIntegrationFlyout(props: IntegrationFlyoutProps) { + const { onClose, onCreate, integrationName } = props; + + const [name, setName] = useState(integrationName || ''); // sets input value + + const onNameChange = (e: React.ChangeEvent) => { + setName(e.target.value); + }; + + const [namespace, setNamespace] = useState(''); // sets input value + + const onNamespaceChange = (e: React.ChangeEvent) => { + setNamespace(e.target.value); + }; + const [tags, setTags] = useState(''); // sets input value + + const onTagsChange = (e: React.ChangeEvent) => { + setTags(e.target.value); + }; + + const renderContent = () => { + return ( + <> + + + onNameChange(e)} value={name} /> + + + + onNamespaceChange(e)} value={namespace} /> + + + + onTagsChange(e)} value={tags} /> + + + + + ); + }; + + return ( + + + +

Add Integration

+
+
+ {renderContent()} + + + + onClose()} color="danger"> + Cancel + + + + { + onCreate(name, namespace, tags); + onClose(); + }} + fill + > + Add Integration + + + + +
+ ); +} diff --git a/public/components/integrations/components/added_integration.tsx b/public/components/integrations/components/added_integration.tsx index 37e20a2983..5370ab7edd 100644 --- a/public/components/integrations/components/added_integration.tsx +++ b/public/components/integrations/components/added_integration.tsx @@ -106,7 +106,7 @@ export function AddedIntegration(props: AddedIntegrationProps) { getModal(); }} > - Delete + Remove Integration
diff --git a/public/components/integrations/components/integration.tsx b/public/components/integrations/components/integration.tsx index d521c83c20..adb98a27f1 100644 --- a/public/components/integrations/components/integration.tsx +++ b/public/components/integrations/components/integration.tsx @@ -23,40 +23,40 @@ import { getAddIntegrationModal } from './add_integration_modal'; import { AvailableIntegrationProps } from './integration_types'; import { INTEGRATIONS_BASE } from '../../../../common/constants/shared'; import { IntegrationScreenshots } from './integration_screenshots_panel'; +import { AddIntegrationFlyout } from './add_integration_flyout'; export function Integration(props: AvailableIntegrationProps) { const { http, integrationTemplateId, chrome, parentBreadcrumbs } = props; - const [isModalVisible, setIsModalVisible] = useState(false); - const [modalLayout, setModalLayout] = useState(); + const [isFlyoutVisible, setIsFlyoutVisible] = useState(false); const [toasts, setToasts] = useState([]); const [data, setData] = useState({ data: null, }); - const getModal = (name: string) => { - setModalLayout( - getAddIntegrationModal( - () => { - addIntegrationRequest(name); - setIsModalVisible(false); - }, - () => { - setIsModalVisible(false); - }, - 'Name', - 'Namespace', - 'Tags (optional)', - name, - 'prod', - 'Add Integration Options', - 'Cancel', - 'Add', - 'test' - ) - ); - setIsModalVisible(true); - }; + // const getModal = (name: string) => { + // setModalLayout( + // getAddIntegrationModal( + // () => { + // addIntegrationRequest(name); + // setIsModalVisible(false); + // }, + // () => { + // setIsModalVisible(false); + // }, + // 'Name', + // 'Namespace', + // 'Tags (optional)', + // name, + // 'prod', + // 'Add Integration Options', + // 'Cancel', + // 'Add', + // 'test' + // ) + // ); + // setIsModalVisible(true); + // }; useEffect(() => { chrome.setBreadcrumbs([ @@ -85,9 +85,12 @@ export function Integration(props: AvailableIntegrationProps) { setToasts([...toasts, { id: new Date().toISOString(), title, text, color } as Toast]); }; - async function addIntegrationRequest(name: string) { + async function addIntegrationRequest(templateName: string, name: string) { + console.log(name); http - .post(`${INTEGRATIONS_BASE}/store`) + .post(`${INTEGRATIONS_BASE}/store/${templateName}`, { + body: JSON.stringify({ name }), + }) .then((res) => { setToast( `${name} integration successfully added!`, @@ -103,6 +106,10 @@ export function Integration(props: AvailableIntegrationProps) { ); } + // return await http.post(TRACE_ANALYTICS_DSL_ROUTE, { + // body: JSON.stringify(body), + // }); + if (!data.data) { return ; } @@ -117,7 +124,12 @@ export function Integration(props: AvailableIntegrationProps) { /> - {IntegrationOverview({ data, getModal })} + {IntegrationOverview({ + data, + showFlyout: () => { + setIsFlyoutVisible(true); + }, + })} {IntegrationDetails({ data })} @@ -128,7 +140,17 @@ export function Integration(props: AvailableIntegrationProps) { {IntegrationFields({ data })} - {isModalVisible && modalLayout} + {isFlyoutVisible && ( + { + setIsFlyoutVisible(false); + }} + onCreate={(name) => { + addIntegrationRequest(integrationTemplateId, name); + }} + integrationName={integrationTemplateId} + /> + )} ); } diff --git a/public/components/integrations/components/integration_overview_panel.tsx b/public/components/integrations/components/integration_overview_panel.tsx index 8d9dd10021..1f8ccf81c5 100644 --- a/public/components/integrations/components/integration_overview_panel.tsx +++ b/public/components/integrations/components/integration_overview_panel.tsx @@ -46,7 +46,7 @@ export function IntegrationOverview(props: any) { { - props.getModal(data.data.name); + props.showFlyout(data.data.name); }} fill > diff --git a/server/adaptors/integrations/__test__/kibana_backend.test.ts b/server/adaptors/integrations/__test__/kibana_backend.test.ts index 47bda3c081..63051e74c4 100644 --- a/server/adaptors/integrations/__test__/kibana_backend.test.ts +++ b/server/adaptors/integrations/__test__/kibana_backend.test.ts @@ -69,7 +69,10 @@ describe('IntegrationsKibanaBackend', () => { .spyOn(IntegrationInstanceBuilder.prototype, 'build') .mockImplementationOnce(builderMock.build); - const result = await backend.loadIntegrationInstance(templateName); + const result = await backend.loadIntegrationInstance( + templateName, + 'Placeholder Nginx Integration' + ); expect(mockRepository.getByName).toHaveBeenCalledWith(templateName); expect(builderMock.build).toHaveBeenCalledWith(template, { @@ -93,7 +96,7 @@ describe('IntegrationsKibanaBackend', () => { .spyOn(IntegrationInstanceBuilder.prototype, 'build') .mockImplementationOnce(builderMock.build); - await expect(backend.loadIntegrationInstance(templateName)).rejects.toEqual({ + await expect(backend.loadIntegrationInstance(templateName, 'test')).rejects.toEqual({ message: errorMessage, statusCode: 500, }); diff --git a/server/adaptors/integrations/integrations_adaptor.ts b/server/adaptors/integrations/integrations_adaptor.ts index 87e5994c99..c4670cf4e7 100644 --- a/server/adaptors/integrations/integrations_adaptor.ts +++ b/server/adaptors/integrations/integrations_adaptor.ts @@ -14,7 +14,7 @@ export interface IntegrationsAdaptor { getIntegrationInstance: (query?: IntegrationInstanceQuery) => Promise; - loadIntegrationInstance: (templateName: string) => Promise; + loadIntegrationInstance: (templateName: string, name: string) => Promise; getStatic: (templateName: string, path: string) => Promise; } diff --git a/server/adaptors/integrations/integrations_kibana_backend.ts b/server/adaptors/integrations/integrations_kibana_backend.ts index 995354936e..d09352eb33 100644 --- a/server/adaptors/integrations/integrations_kibana_backend.ts +++ b/server/adaptors/integrations/integrations_kibana_backend.ts @@ -55,11 +55,14 @@ export class IntegrationsKibanaBackend implements IntegrationsAdaptor { return Promise.resolve(savedObjectToIntegrationInstance(result)); }; - loadIntegrationInstance = async (templateName: string): Promise => { + loadIntegrationInstance = async ( + templateName: string, + name: string + ): Promise => { const template = await this.repository.getByName(templateName); try { const result = await new IntegrationInstanceBuilder(this.client).build(template, { - name: 'Placeholder Nginx Integration', + name, dataset: 'nginx', namespace: 'prod', }); diff --git a/server/routes/integrations/integrations_router.ts b/server/routes/integrations/integrations_router.ts index de3fb91af7..e69d971d7e 100644 --- a/server/routes/integrations/integrations_router.ts +++ b/server/routes/integrations/integrations_router.ts @@ -74,13 +74,20 @@ export function registerIntegrationsRoute(router: IRouter) { router.post( { - path: `${INTEGRATIONS_BASE}/store`, - validate: false, + path: `${INTEGRATIONS_BASE}/store/{templateName}`, + validate: { + params: schema.object({ + templateName: schema.string(), + }), + body: schema.object({ + name: schema.string(), + }), + }, }, async (context, request, response): Promise => { const adaptor = getAdaptor(context, request); return handleWithCallback(adaptor, response, async (a: IntegrationsAdaptor) => { - return a.loadIntegrationInstance('nginx'); + return a.loadIntegrationInstance(request.params.templateName, request.body.name); }); } ); From 37d70fc03dbb16cde4d79e782bcbac558d3f0816 Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Thu, 1 Jun 2023 11:51:10 -0400 Subject: [PATCH 104/190] implement delete Signed-off-by: Derek Ho --- .../components/added_integration.tsx | 19 +++++++++------- .../integrations/integrations_adaptor.ts | 2 ++ .../integrations_kibana_backend.ts | 4 ++++ .../integrations/integrations_router.ts | 22 ++++++++++++------- 4 files changed, 31 insertions(+), 16 deletions(-) diff --git a/public/components/integrations/components/added_integration.tsx b/public/components/integrations/components/added_integration.tsx index 5370ab7edd..2cdaf0e588 100644 --- a/public/components/integrations/components/added_integration.tsx +++ b/public/components/integrations/components/added_integration.tsx @@ -33,11 +33,13 @@ import { FILTER_OPTIONS } from '../../../../common/constants/explorer'; import { INTEGRATIONS_BASE, OBSERVABILITY_BASE } from '../../../../common/constants/shared'; import { DeleteModal } from '../../common/helpers/delete_modal'; import { AddedIntegrationProps } from './integration_types'; +import { useToast } from '../../../../public/components/common/toast'; export function AddedIntegration(props: AddedIntegrationProps) { const { http, integrationInstanceId, chrome, parentBreadcrumbs } = props; - const [toasts, setToasts] = useState([]); + const { setToast } = useToast(); + const [stateData, setData] = useState({ data: {} }); useEffect(() => { @@ -67,6 +69,7 @@ export function AddedIntegration(props: AddedIntegrationProps) { { setIsModalVisible(false); + deleteAddedIntegration(integrationInstanceId); }} onCancel={() => { setIsModalVisible(false); @@ -78,6 +81,13 @@ export function AddedIntegration(props: AddedIntegrationProps) { setIsModalVisible(true); }; + async function deleteAddedIntegration(integrationInstance: string) { + http.delete(`${INTEGRATIONS_BASE}/store/${integrationInstance}`).then(() => { + setToast(`${stateData.data.data?.name} integration successfully deleted!`, 'success'); + window.location.hash = '#/installed'; + }); + } + async function handleDataRequest() { http .get(`${INTEGRATIONS_BASE}/store/${integrationInstanceId}`) @@ -315,13 +325,6 @@ export function AddedIntegration(props: AddedIntegrationProps) { return ( - { - setToasts(toasts.filter((toast) => toast.id !== removedToast.id)); - }} - toastLifeTimeMs={6000} - /> {AddedOverview({ stateData })} diff --git a/server/adaptors/integrations/integrations_adaptor.ts b/server/adaptors/integrations/integrations_adaptor.ts index c4670cf4e7..e2aba76eed 100644 --- a/server/adaptors/integrations/integrations_adaptor.ts +++ b/server/adaptors/integrations/integrations_adaptor.ts @@ -16,5 +16,7 @@ export interface IntegrationsAdaptor { loadIntegrationInstance: (templateName: string, name: string) => Promise; + deleteIntegrationInstance: (id: string) => Promise; + getStatic: (templateName: string, path: string) => Promise; } diff --git a/server/adaptors/integrations/integrations_kibana_backend.ts b/server/adaptors/integrations/integrations_kibana_backend.ts index d09352eb33..fa9305b8df 100644 --- a/server/adaptors/integrations/integrations_kibana_backend.ts +++ b/server/adaptors/integrations/integrations_kibana_backend.ts @@ -17,6 +17,10 @@ export class IntegrationsKibanaBackend implements IntegrationsAdaptor { this.client = client; this.repository = repository ?? new IntegrationsRepository(); } + deleteIntegrationInstance = async (id: string): Promise => { + const result = await this.client.delete('integration-instance', id); + return Promise.resolve(result); + }; getIntegrationTemplates = async ( query?: IntegrationTemplateQuery diff --git a/server/routes/integrations/integrations_router.ts b/server/routes/integrations/integrations_router.ts index e69d971d7e..13e32331f5 100644 --- a/server/routes/integrations/integrations_router.ts +++ b/server/routes/integrations/integrations_router.ts @@ -146,28 +146,34 @@ export function registerIntegrationsRoute(router: IRouter) { router.get( { - path: `${INTEGRATIONS_BASE}/store`, + path: `${INTEGRATIONS_BASE}/store/list_added`, validate: false, }, async (context, request, response): Promise => { const adaptor = getAdaptor(context, request); return handleWithCallback(adaptor, response, async (a: IntegrationsAdaptor) => { - return await a.getIntegrationTemplates(); + return await a.getIntegrationInstances({ + added, + }); }); } ); - router.get( + router.delete( { - path: `${INTEGRATIONS_BASE}/store/list_added`, - validate: false, + path: `${INTEGRATIONS_BASE}/store/{id}`, + validate: { + params: schema.object({ + id: schema.string(), + }), + }, }, async (context, request, response): Promise => { const adaptor = getAdaptor(context, request); return handleWithCallback(adaptor, response, async (a: IntegrationsAdaptor) => { - return await a.getIntegrationInstances({ - added, - }); + return { + data: await a.deleteIntegrationInstance(request.params.id), + }; }); } ); From 3ff7345dfea0010d0eee0917ad9d08cce7f24648 Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Thu, 1 Jun 2023 13:16:35 -0400 Subject: [PATCH 105/190] fix up tests for changes Signed-off-by: Derek Ho --- .../added_integration_table.test.tsx.snap | 80 +++------ ...ilable_integration_card_view.test.tsx.snap | 154 +++--------------- .../integration_details.test.tsx.snap | 39 +++++ .../components/added_integration.tsx | 11 +- .../__test__/kibana_backend.test.ts | 2 +- 5 files changed, 89 insertions(+), 197 deletions(-) create mode 100644 public/components/integrations/components/__tests__/__snapshots__/integration_details.test.tsx.snap diff --git a/public/components/integrations/components/__tests__/__snapshots__/added_integration_table.test.tsx.snap b/public/components/integrations/components/__tests__/__snapshots__/added_integration_table.test.tsx.snap index f602b04ddf..c46fbc4f45 100644 --- a/public/components/integrations/components/__tests__/__snapshots__/added_integration_table.test.tsx.snap +++ b/public/components/integrations/components/__tests__/__snapshots__/added_integration_table.test.tsx.snap @@ -259,19 +259,9 @@ exports[`Added Integration Table View Test Renders added integration table view "name": "Type", "options": Array [ Object { - "name": "Visualization", - "value": "Visualization", - "view": "Visualization", - }, - Object { - "name": "Query", - "value": "Query", - "view": "Query", - }, - Object { - "name": "Metric", - "value": "Metric", - "view": "Metric", + "name": "logs", + "value": "logs", + "view": "logs", }, ], "type": "field_value_selection", @@ -296,19 +286,9 @@ exports[`Added Integration Table View Test Renders added integration table view "name": "Type", "options": Array [ Object { - "name": "Visualization", - "value": "Visualization", - "view": "Visualization", - }, - Object { - "name": "Query", - "value": "Query", - "view": "Query", - }, - Object { - "name": "Metric", - "value": "Metric", - "view": "Metric", + "name": "logs", + "value": "logs", + "view": "logs", }, ], "type": "field_value_selection", @@ -444,19 +424,9 @@ exports[`Added Integration Table View Test Renders added integration table view "name": "Type", "options": Array [ Object { - "name": "Visualization", - "value": "Visualization", - "view": "Visualization", - }, - Object { - "name": "Query", - "value": "Query", - "view": "Query", - }, - Object { - "name": "Metric", - "value": "Metric", - "view": "Metric", + "name": "logs", + "value": "logs", + "view": "logs", }, ], "type": "field_value_selection", @@ -496,19 +466,9 @@ exports[`Added Integration Table View Test Renders added integration table view "name": "Type", "options": Array [ Object { - "name": "Visualization", - "value": "Visualization", - "view": "Visualization", - }, - Object { - "name": "Query", - "value": "Query", - "view": "Query", - }, - Object { - "name": "Metric", - "value": "Metric", - "view": "Metric", + "name": "logs", + "value": "logs", + "view": "logs", }, ], "type": "field_value_selection", @@ -1260,13 +1220,13 @@ exports[`Added Integration Table View Test Renders added integration table view Placeholder Nginx Integration @@ -1359,7 +1319,9 @@ exports[`Added Integration Table View Test Renders added integration table view
+ > + logs +
@@ -1537,13 +1499,13 @@ exports[`Added Integration Table View Test Renders added integration table view Placeholder Nginx Integration @@ -1636,7 +1598,9 @@ exports[`Added Integration Table View Test Renders added integration table view
+ > + logs +
diff --git a/public/components/integrations/components/__tests__/__snapshots__/available_integration_card_view.test.tsx.snap b/public/components/integrations/components/__tests__/__snapshots__/available_integration_card_view.test.tsx.snap index c918798d89..f9998b2997 100644 --- a/public/components/integrations/components/__tests__/__snapshots__/available_integration_card_view.test.tsx.snap +++ b/public/components/integrations/components/__tests__/__snapshots__/available_integration_card_view.test.tsx.snap @@ -37,26 +37,8 @@ Array [ } > - - View Details - - - - Add - -
- } icon={ } - layout="vertical" + onClick={[Function]} title="nginx" - titleSize="xs" + titleElement="span" >
- nginx +
-
-
- - - - - - -
- - - - - - -
-
diff --git a/public/components/integrations/components/__tests__/__snapshots__/integration_details.test.tsx.snap b/public/components/integrations/components/__tests__/__snapshots__/integration_details.test.tsx.snap new file mode 100644 index 0000000000..98de19d4ee --- /dev/null +++ b/public/components/integrations/components/__tests__/__snapshots__/integration_details.test.tsx.snap @@ -0,0 +1,39 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Available Integration Table View Test Renders nginx integration table view using dummy data 1`] = ` + +
+ + +
+ + nginx Details + +
+
+
+ +
+ + +
+ Nginx HTTP server collector +
+
+
+ +`; diff --git a/public/components/integrations/components/added_integration.tsx b/public/components/integrations/components/added_integration.tsx index 2cdaf0e588..e14fc016f1 100644 --- a/public/components/integrations/components/added_integration.tsx +++ b/public/components/integrations/components/added_integration.tsx @@ -95,7 +95,11 @@ export function AddedIntegration(props: AddedIntegrationProps) { } function AddedOverview(overviewProps: any) { - const { data } = overviewProps; + let data: any = {}; + if (overviewProps?.data?.data) { + data = overviewProps.data.data; + } + console.log(data); return ( @@ -105,13 +109,14 @@ export function AddedIntegration(props: AddedIntegrationProps) { - {data?.data?.id} + {data?.id} - + { getModal(); }} diff --git a/server/adaptors/integrations/__test__/kibana_backend.test.ts b/server/adaptors/integrations/__test__/kibana_backend.test.ts index 63051e74c4..663754e79a 100644 --- a/server/adaptors/integrations/__test__/kibana_backend.test.ts +++ b/server/adaptors/integrations/__test__/kibana_backend.test.ts @@ -103,7 +103,7 @@ describe('IntegrationsKibanaBackend', () => { expect(mockRepository.getByName).toHaveBeenCalledWith(templateName); expect(builderMock.build).toHaveBeenCalledWith(template, { - name: 'Placeholder Nginx Integration', + name: 'test', dataset: 'nginx', namespace: 'prod', }); From ebab4dbbe701f7ddae5e58d7a439181f600f0d32 Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Thu, 1 Jun 2023 16:24:47 -0400 Subject: [PATCH 106/190] get added page to working order Signed-off-by: Derek Ho --- .../components/added_integration.tsx | 46 +++++++++++-------- .../integrations/__data__/repository.json | 3 -- .../integrations/integrations_builder.ts | 4 +- server/adaptors/integrations/types.ts | 1 + 4 files changed, 30 insertions(+), 24 deletions(-) diff --git a/public/components/integrations/components/added_integration.tsx b/public/components/integrations/components/added_integration.tsx index e14fc016f1..f5703caedf 100644 --- a/public/components/integrations/components/added_integration.tsx +++ b/public/components/integrations/components/added_integration.tsx @@ -95,11 +95,7 @@ export function AddedIntegration(props: AddedIntegrationProps) { } function AddedOverview(overviewProps: any) { - let data: any = {}; - if (overviewProps?.data?.data) { - data = overviewProps.data.data; - } - console.log(data); + const { data } = overviewProps.data; return ( @@ -109,7 +105,7 @@ export function AddedIntegration(props: AddedIntegrationProps) { - {data?.id} +

{data?.data?.name}

@@ -156,7 +152,7 @@ export function AddedIntegration(props: AddedIntegrationProps) {

Added By

- {data?.data?.author} + {data?.data?.addedBy}
@@ -172,7 +168,10 @@ export function AddedIntegration(props: AddedIntegrationProps) { } function AddedAssets(assetProps: any) { - const data = assetProps.data?.data?.assets || []; + const { data } = assetProps.data; + + const assets = data?.data?.assets || []; + console.log(assets); const search = { box: { @@ -199,11 +198,20 @@ export function AddedIntegration(props: AddedIntegrationProps) { name: 'Name', sortable: true, truncateText: true, - render: (value, record) => ( - - {_.truncate(record.name, { length: 100 })} - - ), + render: (value, record) => { + return record.isDefaultAsset ? ( + window.location.assign(`dashboards#/view/${record.assetId}`)} + > + {_.truncate(record.description, { length: 100 })} + + ) : ( + + {_.truncate(record.description, { length: 100 })} + + ); + }, }, { field: 'type', @@ -212,7 +220,7 @@ export function AddedIntegration(props: AddedIntegrationProps) { truncateText: true, render: (value, record) => ( - {_.truncate(record.type, { length: 100 })} + {_.truncate(record.assetType, { length: 100 })} ), }, @@ -239,7 +247,7 @@ export function AddedIntegration(props: AddedIntegrationProps) { ( - {_.truncate(record.name, { length: 100 })} + {_.truncate(record.description, { length: 100 })} ), }, @@ -332,11 +340,9 @@ export function AddedIntegration(props: AddedIntegrationProps) { - {AddedOverview({ stateData })} - - {AddedAssets({ stateData })} + {AddedOverview({ data: stateData })} - {AddedIntegrationFields({ stateData })} + {AddedAssets({ data: stateData })} {isModalVisible && modalLayout} diff --git a/server/adaptors/integrations/__data__/repository.json b/server/adaptors/integrations/__data__/repository.json index 5ea2917b06..5dae083d62 100644 --- a/server/adaptors/integrations/__data__/repository.json +++ b/server/adaptors/integrations/__data__/repository.json @@ -73,9 +73,6 @@ }, { "body": "{\"attributes\":{\"description\":\"Nginx dashboard with basic Observability on access / error logs\",\"hits\":0,\"kibanaSavedObjectMeta\":{\"searchSourceJSON\":\"{\\\"query\\\":{\\\"language\\\":\\\"kuery\\\",\\\"query\\\":\\\"\\\"},\\\"filter\\\":[]}\"},\"optionsJSON\":\"{\\\"hidePanelTitles\\\":false,\\\"useMargins\\\":true}\",\"panelsJSON\":\"[{\\\"version\\\":\\\"2.5.0\\\",\\\"gridData\\\":{\\\"h\\\":8,\\\"i\\\":\\\"1f31e50b-06e3-41e6-972e-e4e5fe1a9872\\\",\\\"w\\\":48,\\\"x\\\":0,\\\"y\\\":0},\\\"panelIndex\\\":\\\"1f31e50b-06e3-41e6-972e-e4e5fe1a9872\\\",\\\"embeddableConfig\\\":{},\\\"panelRefName\\\":\\\"panel_0\\\"},{\\\"version\\\":\\\"2.5.0\\\",\\\"gridData\\\":{\\\"h\\\":9,\\\"i\\\":\\\"d91a8da4-b34b-470a-aca6-9c76b47cd6fb\\\",\\\"w\\\":24,\\\"x\\\":0,\\\"y\\\":8},\\\"panelIndex\\\":\\\"d91a8da4-b34b-470a-aca6-9c76b47cd6fb\\\",\\\"embeddableConfig\\\":{},\\\"panelRefName\\\":\\\"panel_1\\\"},{\\\"version\\\":\\\"2.5.0\\\",\\\"gridData\\\":{\\\"h\\\":15,\\\"i\\\":\\\"27149e5a-3a77-4f3c-800e-8a160c3765f4\\\",\\\"w\\\":24,\\\"x\\\":24,\\\"y\\\":8},\\\"panelIndex\\\":\\\"27149e5a-3a77-4f3c-800e-8a160c3765f4\\\",\\\"embeddableConfig\\\":{},\\\"panelRefName\\\":\\\"panel_2\\\"},{\\\"version\\\":\\\"2.5.0\\\",\\\"gridData\\\":{\\\"x\\\":0,\\\"y\\\":17,\\\"w\\\":24,\\\"h\\\":15,\\\"i\\\":\\\"4d8c2aa7-159c-4a1a-80ff-00a9299056ce\\\"},\\\"panelIndex\\\":\\\"4d8c2aa7-159c-4a1a-80ff-00a9299056ce\\\",\\\"embeddableConfig\\\":{},\\\"panelRefName\\\":\\\"panel_3\\\"},{\\\"version\\\":\\\"2.5.0\\\",\\\"gridData\\\":{\\\"x\\\":24,\\\"y\\\":23,\\\"w\\\":24,\\\"h\\\":15,\\\"i\\\":\\\"800b7f19-f50c-417f-8987-21b930531cbe\\\"},\\\"panelIndex\\\":\\\"800b7f19-f50c-417f-8987-21b930531cbe\\\",\\\"embeddableConfig\\\":{},\\\"panelRefName\\\":\\\"panel_4\\\"}]\",\"timeRestore\":false,\"title\":\"[NGINX Core Logs 1.0] Overview\",\"version\":1},\"id\":\"96847220-5261-44d0-89b4-65f3a659f13a\",\"migrationVersion\":{\"dashboard\":\"7.9.3\"},\"references\":[{\"id\":\"3b49a65d-54d8-483d-a8f0-3d7c855e1ecf\",\"name\":\"panel_0\",\"type\":\"visualization\"},{\"id\":\"865e577b-634b-4a65-b9d6-7e324c395d18\",\"name\":\"panel_1\",\"type\":\"visualization\"},{\"id\":\"dc1803f0-b478-11ed-9063-ebe46f9ac203\",\"name\":\"panel_2\",\"type\":\"visualization\"},{\"id\":\"99acc580-b47a-11ed-9063-ebe46f9ac203\",\"name\":\"panel_3\",\"type\":\"visualization\"},{\"id\":\"01ea64d0-b62f-11ed-a677-43d7aa86763b\",\"name\":\"panel_4\",\"type\":\"visualization\"}],\"type\":\"dashboard\",\"updated_at\":\"2023-02-26T23:44:09.855Z\",\"version\":\"WzczLDdd\"}" - }, - { - "body": "{\"exportedCount\":9,\"missingRefCount\":0,\"missingReferences\":[]}" } ] } diff --git a/server/adaptors/integrations/integrations_builder.ts b/server/adaptors/integrations/integrations_builder.ts index d6e4a2c7e2..a4b22b4f53 100644 --- a/server/adaptors/integrations/integrations_builder.ts +++ b/server/adaptors/integrations/integrations_builder.ts @@ -39,12 +39,14 @@ export class IntegrationInstanceBuilder { try { const deserializedAssets = assets.map((asset) => JSON.parse(asset.body)); const response = await this.client.bulkCreate(deserializedAssets); - const refs: AssetReference[] = response.saved_objects.map((obj) => { + console.log('bAWIEHIOGHIAORHGIOAEHRG' + JSON.stringify(response)); + const refs: AssetReference[] = response.saved_objects.map((obj: any) => { return { assetType: obj.type, assetId: obj.id, status: 'available', // Assuming a successfully created object is available isDefaultAsset: obj.type === 'dashboard', // Assuming for now that dashboards are default + description: obj.attributes.title, }; }); return Promise.resolve(refs); diff --git a/server/adaptors/integrations/types.ts b/server/adaptors/integrations/types.ts index 83d9df0e8f..cb5e66be70 100644 --- a/server/adaptors/integrations/types.ts +++ b/server/adaptors/integrations/types.ts @@ -90,6 +90,7 @@ interface AssetReference { assetId: string; status: string; isDefaultAsset: boolean; + description: string; } interface IntegrationInstancesSearchResult { From 5f8ad0a85da05436a8f74ba4e6750b1e0beb5b33 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Thu, 1 Jun 2023 13:46:30 -0700 Subject: [PATCH 107/190] Add template validator via Ajv Signed-off-by: Simeon Widdis --- package.json | 3 +- .../integrations/integrations_builder.ts | 16 ++-- server/adaptors/integrations/validators.ts | 87 +++++++++++++++++++ yarn.lock | 45 +++++++--- 4 files changed, 134 insertions(+), 17 deletions(-) create mode 100644 server/adaptors/integrations/validators.ts diff --git a/package.json b/package.json index 3eaa148895..b0d8bbc014 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "@reduxjs/toolkit": "^1.6.1", "ag-grid-community": "^27.3.0", "ag-grid-react": "^27.3.0", + "ajv": "^8.12.0", "antlr4": "4.8.0", "antlr4ts": "^0.5.0-alpha.4", "performance-now": "^2.1.0", @@ -70,4 +71,4 @@ "node_modules/*", "target/*" ] -} \ No newline at end of file +} diff --git a/server/adaptors/integrations/integrations_builder.ts b/server/adaptors/integrations/integrations_builder.ts index bbcd9b300f..72b4d86bc3 100644 --- a/server/adaptors/integrations/integrations_builder.ts +++ b/server/adaptors/integrations/integrations_builder.ts @@ -1,4 +1,5 @@ import { SavedObjectsClientContract } from '../../../../../src/core/server'; +import { templateValidator } from './validators'; interface BuilderOptions { name: string; @@ -25,13 +26,16 @@ export class IntegrationInstanceBuilder { } async validate(template: IntegrationTemplate): Promise { - // Assuming everything is valid for now - if (!this.is_integration_template(template)) { - return Promise.reject( - 'Provided template does not have the parameters of a valid IntegrationTemplate' - ); + if (templateValidator(template)) { + return Promise.resolve(); } - return Promise.resolve(); + return Promise.reject({ + status: 400, + message: templateValidator.errors + ?.filter((e) => e.message) + .map((e) => e.message) + .join(', '), + }); } is_integration_template(template: any): template is IntegrationTemplate { diff --git a/server/adaptors/integrations/validators.ts b/server/adaptors/integrations/validators.ts new file mode 100644 index 0000000000..d463fb29ac --- /dev/null +++ b/server/adaptors/integrations/validators.ts @@ -0,0 +1,87 @@ +import Ajv, { JSONSchemaType } from 'ajv'; + +const ajv = new Ajv(); + +const templateSchema: JSONSchemaType = { + type: 'object', + properties: { + name: { type: 'string' }, + version: { type: 'string' }, + integrationType: { type: 'string' }, + license: { type: 'string' }, + author: { type: 'string', nullable: true }, + description: { type: 'string', nullable: true }, + tags: { + type: 'array', + items: { + type: 'string', + }, + nullable: true, + }, + sourceUrl: { type: 'string', nullable: true }, + statics: { + type: 'object', + properties: { + mapping: { + type: 'object', + properties: { + logo: { type: 'string', nullable: true }, + gallery: { type: 'array', items: { type: 'string' }, nullable: true }, + darkModeLogo: { type: 'string', nullable: true }, + darkModeGallery: { type: 'array', items: { type: 'string' }, nullable: true }, + }, + additionalProperties: false, + nullable: true, + }, + assets: { + type: 'object', + patternProperties: { + '^.*$': { + type: 'object', + properties: { + mimeType: { type: 'string' }, + annotation: { type: 'string', nullable: true }, + data: { type: 'string' }, + }, + required: ['mimeType', 'data'], + additionalProperties: false, + }, + }, + required: [], + nullable: true, + }, + }, + additionalProperties: false, + nullable: true, + }, + components: { + type: 'array', + items: { + type: 'object', + properties: { + name: { type: 'string' }, + version: { type: 'string' }, + description: { type: 'string', nullable: true }, + sourceUrl: { type: 'string', nullable: true }, + schemaBody: { type: 'string' }, + mappingBody: { type: 'string' }, + }, + required: ['name', 'version', 'schemaBody', 'mappingBody'], + }, + }, + displayAssets: { + type: 'array', + items: { + type: 'object', + properties: { + body: { type: 'string' }, + }, + required: ['body'], + }, + }, + }, + required: ['name', 'version', 'integrationType', 'license', 'components', 'displayAssets'], + additionalProperties: false, +}; + +export const templateValidator = ajv.compile(templateSchema); diff --git a/yarn.lock b/yarn.lock index 1b225471c5..52aa13831f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -413,6 +413,16 @@ ajv@^6.10.0, ajv@^6.10.2: json-schema-traverse "^0.4.1" uri-js "^4.2.2" +ajv@^8.12.0: + version "8.12.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" + integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== + dependencies: + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" + anser@^1.4.1: version "1.4.10" resolved "https://registry.yarnpkg.com/anser/-/anser-1.4.10.tgz#befa3eddf282684bd03b63dcda3927aef8c2e35b" @@ -809,10 +819,10 @@ comma-separated-tokens@^1.0.0: resolved "https://registry.yarnpkg.com/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz#632b80b6117867a158f1080ad498b2fbe7e3f5ea" integrity sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw== -commander@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae" - integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg== +commander@^6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" + integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== commander@^9.4.1: version "9.5.0" @@ -868,10 +878,10 @@ cypress-watch-and-reload@^1.10.6: chokidar "3.5.3" ws "8.13.0" -cypress@12.8.1: - version "12.8.1" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-12.8.1.tgz#0c6e67f34554d553138697aaf349b637d80004eb" - integrity sha512-lIFbKdaSYAOarNLHNFa2aPZu6YSF+8UY4VRXMxJrFUnk6RvfG0AWsZ7/qle/aIz30TNUD4aOihz2ZgS4vuQVSA== +cypress@^12.8.1: + version "12.13.0" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-12.13.0.tgz#725b6617ea19e41e5c59cc509fc3e08097142b01" + integrity sha512-QJlSmdPk+53Zhy69woJMySZQJoWfEWun3X5OOenGsXjRPVfByVTHorxNehbzhZrEzH9RDUDqVcck0ahtlS+N/Q== dependencies: "@cypress/request" "^2.88.10" "@cypress/xvfb" "^1.2.4" @@ -887,7 +897,7 @@ cypress@12.8.1: check-more-types "^2.24.0" cli-cursor "^3.1.0" cli-table3 "~0.6.1" - commander "^5.1.0" + commander "^6.2.1" common-tags "^1.8.0" dayjs "^1.10.4" debug "^4.3.4" @@ -905,7 +915,7 @@ cypress@12.8.1: listr2 "^3.8.3" lodash "^4.17.21" log-symbols "^4.0.0" - minimist "^1.2.6" + minimist "^1.2.8" ospath "^1.2.2" pretty-bytes "^5.6.0" proxy-from-env "1.0.0" @@ -1839,6 +1849,11 @@ json-schema-traverse@^0.4.1: resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== +json-schema-traverse@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" + integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== + json-schema@0.4.0, json-schema@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" @@ -2082,6 +2097,11 @@ minimist@^1.2.5, minimist@^1.2.6: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== +minimist@^1.2.8: + version "1.2.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== + mkdirp@^0.5.1: version "0.5.6" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" @@ -2590,6 +2610,11 @@ request-progress@^3.0.0: dependencies: throttleit "^1.0.0" +require-from-string@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + reselect@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/reselect/-/reselect-4.0.0.tgz#f2529830e5d3d0e021408b246a206ef4ea4437f7" From fd2f153b47df2e045d46001f5004b37c5bcaaaf3 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Thu, 1 Jun 2023 13:48:43 -0700 Subject: [PATCH 108/190] Fix builder tests for new validation Signed-off-by: Simeon Widdis --- .../integrations/__test__/builder.test.ts | 32 +++++++++++++------ 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/server/adaptors/integrations/__test__/builder.test.ts b/server/adaptors/integrations/__test__/builder.test.ts index b533ef87b6..9d4fed04cc 100644 --- a/server/adaptors/integrations/__test__/builder.test.ts +++ b/server/adaptors/integrations/__test__/builder.test.ts @@ -18,11 +18,14 @@ describe('IntegrationInstanceBuilder', () => { { body: '{"type":"dashboard","title":"Dashboard 1"}' }, { body: '{"type":"visualization","title":"Visualization 1"}' }, ]; - const template = { - name: 'Template 1', - integrationType: 'type', + const template: IntegrationTemplate = { + name: 'test-template', + version: '1.0', + integrationType: 'logs', + license: 'Apache-2.0', + components: [], displayAssets, - } as IntegrationTemplate; + }; const options = { name: 'Instance 1', dataset: 'dataset', @@ -78,11 +81,14 @@ describe('IntegrationInstanceBuilder', () => { { body: '{"type":"dashboard","title":"Dashboard 1"}' }, { body: '{"type":"visualization","title":"Visualization 1"}' }, ]; - const template = { - name: 'Template 1', - integrationType: 'type', + const template: IntegrationTemplate = { + name: 'test-template', + version: '1.0', + integrationType: 'logs', + license: 'Apache-2.0', + components: [], displayAssets, - } as IntegrationTemplate; + }; const options = { name: 'Instance 1', dataset: 'dataset', namespace: 'namespace' }; const errorMessage = 'An error occurred while posting assets'; @@ -95,8 +101,14 @@ describe('IntegrationInstanceBuilder', () => { }); it('should not reject validating a valid template', async () => { - // Placeholder template for now -- fill in when validation is implemented - const template = { name: 'Template 1' } as IntegrationTemplate; + const template: IntegrationTemplate = { + name: 'test-template', + version: '1.0', + integrationType: 'logs', + license: 'Apache-2.0', + components: [], + displayAssets: [], + }; const result = await builder.validate(template); From d751c0d9e82a9fc4ffb12ad0d3d7c8e0d0cc33a9 Mon Sep 17 00:00:00 2001 From: Derek Ho Date: Fri, 2 Jun 2023 16:00:07 -0400 Subject: [PATCH 109/190] add unit test coverage Signed-off-by: Derek Ho --- .../added_integration.test.tsx.snap | 1144 ++++++ .../added_integration_flyout.test.tsx.snap | 1949 ++++++++++ .../added_integration_table.test.tsx.snap | 485 +-- .../integration_fields.test.tsx.snap | 3141 +++++++++++++++++ .../__tests__/added_integration.test.tsx | 43 + .../added_integration_flyout.test.tsx | 24 + .../__tests__/integration_fields.test.tsx | 22 + .../components/__tests__/testing_constants.ts | 174 +- .../integrations/__test__/builder.test.ts | 6 +- .../__test__/kibana_backend.test.ts | 9 + 10 files changed, 6469 insertions(+), 528 deletions(-) create mode 100644 public/components/integrations/components/__tests__/__snapshots__/added_integration.test.tsx.snap create mode 100644 public/components/integrations/components/__tests__/__snapshots__/added_integration_flyout.test.tsx.snap create mode 100644 public/components/integrations/components/__tests__/__snapshots__/integration_fields.test.tsx.snap create mode 100644 public/components/integrations/components/__tests__/added_integration.test.tsx create mode 100644 public/components/integrations/components/__tests__/added_integration_flyout.test.tsx create mode 100644 public/components/integrations/components/__tests__/integration_fields.test.tsx diff --git a/public/components/integrations/components/__tests__/__snapshots__/added_integration.test.tsx.snap b/public/components/integrations/components/__tests__/__snapshots__/added_integration.test.tsx.snap new file mode 100644 index 0000000000..2c68e3062c --- /dev/null +++ b/public/components/integrations/components/__tests__/__snapshots__/added_integration.test.tsx.snap @@ -0,0 +1,1144 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Added Integration View Test Renders added integration view using dummy data 1`] = ` + + +
+ +
+ +
+ + +
+ +
+ + +
+ + +
+ + +
+ + Assets List + +
+
+
+ +
+ + +
+ + +
+ +
+ + + +
+
+ + + + +
+ + + + + +
+
+
+
+
+
+
+
+
+ +
+ + +
+ + + Type + + } + closePopover={[Function]} + display="inlineBlock" + hasArrow={true} + id="field_value_selection_0" + isOpen={false} + ownFocus={true} + panelClassName="euiFilterGroup__popoverPanel" + panelPaddingSize="none" + > +
+
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+ + +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + Name + + + + + + + + + + + + Type + + + + + + + + + + + + Actions + + + + + +
+
+ + No items found + +
+
+
+
+
+ +
+ +
+ + +
+ +
+ +
+ + +`; diff --git a/public/components/integrations/components/__tests__/__snapshots__/added_integration_flyout.test.tsx.snap b/public/components/integrations/components/__tests__/__snapshots__/added_integration_flyout.test.tsx.snap new file mode 100644 index 0000000000..470bce7d47 --- /dev/null +++ b/public/components/integrations/components/__tests__/__snapshots__/added_integration_flyout.test.tsx.snap @@ -0,0 +1,1949 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Add Integration Flyout Test Renders add integration flyout with dummy integration name 1`] = ` + + + + + +