diff --git a/config/opensearch_dashboards.yml b/config/opensearch_dashboards.yml index 4f23dc42c050..d0bc5412bc07 100644 --- a/config/opensearch_dashboards.yml +++ b/config/opensearch_dashboards.yml @@ -226,9 +226,9 @@ # Set the value of this setting to true to enables the experimental multiple data source # support feature. Use with caution. -#data_source.enabled: false +data_source.enabled: true # Set the value of these settings to custermize crypto materials to encryption saved credentials # in data sources. -#data_source.encryption.wrappingKeyName: 'changeme' -#data_source.encryption.wrappingKeyNamespace: 'changeme' -#data_source.encryption.wrappingKey: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] +data_source.encryption.wrappingKeyName: 'changeme' +data_source.encryption.wrappingKeyNamespace: 'changeme' +data_source.encryption.wrappingKey: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] diff --git a/package.json b/package.json index e87881fdb400..c68a540efdff 100644 --- a/package.json +++ b/package.json @@ -151,6 +151,7 @@ "angular-elastic": "^2.5.1", "angular-sanitize": "^1.8.0", "bluebird": "3.5.5", + "caniuse-lite": "^1.0.30001397", "chalk": "^4.1.0", "chokidar": "^3.4.2", "color": "1.0.3", @@ -212,6 +213,7 @@ "type-detect": "^4.0.8", "uuid": "3.3.2", "whatwg-fetch": "^3.0.0", + "yarn": "^1.22.19", "yauzl": "^2.10.0" }, "devDependencies": { @@ -461,4 +463,4 @@ "node": "14.20.0", "yarn": "^1.21.1" } -} \ No newline at end of file +} diff --git a/plugins/my_plugin_name/.eslintrc.js b/plugins/my_plugin_name/.eslintrc.js new file mode 100644 index 000000000000..b16a8b23a08e --- /dev/null +++ b/plugins/my_plugin_name/.eslintrc.js @@ -0,0 +1,7 @@ +module.exports = { + root: true, + extends: ['@elastic/eslint-config-kibana', 'plugin:@elastic/eui/recommended'], + rules: { + '@osd/eslint/require-license-header': 'off', + }, +}; diff --git a/plugins/my_plugin_name/.gitignore b/plugins/my_plugin_name/.gitignore new file mode 100644 index 000000000000..c3dca1b96fcc --- /dev/null +++ b/plugins/my_plugin_name/.gitignore @@ -0,0 +1,2 @@ +/build +/target diff --git a/plugins/my_plugin_name/.i18nrc.json b/plugins/my_plugin_name/.i18nrc.json new file mode 100644 index 000000000000..5eca5da3da69 --- /dev/null +++ b/plugins/my_plugin_name/.i18nrc.json @@ -0,0 +1,7 @@ +{ + "prefix": "myPluginName", + "paths": { + "myPluginName": "." + }, + "translations": ["translations/ja-JP.json"] +} diff --git a/plugins/my_plugin_name/README.md b/plugins/my_plugin_name/README.md new file mode 100755 index 000000000000..bed33a073d2f --- /dev/null +++ b/plugins/my_plugin_name/README.md @@ -0,0 +1,22 @@ +# my_plugin_name + +A OpenSearch Dashboards plugin + +--- + +## Development + +See the [OpenSearch Dashboards contributing +guide](https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/CONTRIBUTING.md) for instructions +setting up your development environment. + + ## Scripts +
+
yarn osd bootstrap
+
Execute this to install node_modules and setup the dependencies in your plugin and in OpenSearch Dashboards +
+ +
yarn plugin-helpers build
+
Execute this to create a distributable version of this plugin that can be installed in OpenSearch Dashboards +
+
diff --git a/plugins/my_plugin_name/common/index.ts b/plugins/my_plugin_name/common/index.ts new file mode 100644 index 000000000000..6d778247f55e --- /dev/null +++ b/plugins/my_plugin_name/common/index.ts @@ -0,0 +1,3 @@ +export const PLUGIN_ID = 'myPluginName'; +export const PLUGIN_NAME = 'my_plugin_name'; +export const CREATE_POINT_IN_TIME_PATH = '/api/create_point_in_time'; diff --git a/plugins/my_plugin_name/components/point_in_time_flyout/index.ts b/plugins/my_plugin_name/components/point_in_time_flyout/index.ts new file mode 100644 index 000000000000..471aa98a8184 --- /dev/null +++ b/plugins/my_plugin_name/components/point_in_time_flyout/index.ts @@ -0,0 +1,2 @@ +export { PointInTimeFlyout } from './point_in_time_flyout'; + diff --git a/plugins/my_plugin_name/components/point_in_time_flyout/point_in_time_flyout copy.tsx b/plugins/my_plugin_name/components/point_in_time_flyout/point_in_time_flyout copy.tsx new file mode 100644 index 000000000000..3f21b1530e66 --- /dev/null +++ b/plugins/my_plugin_name/components/point_in_time_flyout/point_in_time_flyout copy.tsx @@ -0,0 +1,297 @@ +import React, { Component, Fragment, ReactNode, useEffect, useState } from 'react'; +import { take, get as getField } from 'lodash'; +import { + EuiFlyout, + EuiFlyoutBody, + EuiFlyoutFooter, + EuiFlyoutHeader, + EuiButtonEmpty, + EuiButton, + EuiText, + EuiTitle, + EuiForm, + EuiFormRow, + EuiFilePicker, + EuiInMemoryTable, + EuiSelect, + EuiFlexGroup, + EuiFlexItem, + EuiLoadingSpinner, + EuiCallOut, + EuiSpacer, + EuiLink, + EuiCodeBlock, + EuiFieldText, + EuiTextArea, + EuiRange, + EuiCheckbox, + EuiFormLabel, +} from '@elastic/eui'; +import { i18n } from '@osd/i18n'; +import { FormattedMessage } from '@osd/i18n/react'; +// import { IIndexPattern } from 'src/plugins/data/public'; +// import { useOpenSearchDashboards } from '../../../../src/plugins/opensearch_dashboards_react/public'; + +export interface PointInTimeFlyoutItem { + id: string; + title: string; + sort: string; +}; +// export async function getIndexPatterns( +// savedObjectsClient +// ) { +// return ( +// savedObjectsClient +// .find({ +// type: 'index-pattern', +// fields: ['title', 'type'], +// perPage: 10000, +// }) +// .then((response) => +// response.savedObjects +// .map((pattern) => { +// const id = pattern.id; +// const title = pattern.get('title'); + + +// return { +// id, +// title, +// // the prepending of 0 at the default pattern takes care of prioritization +// // so the sorting will but the default index on top +// // or on bottom of a the table +// sort: `${title}`, +// }; +// }) +// .sort((a, b) => { +// if (a.sort < b.sort) { +// return -1; +// } else if (a.sort > b.sort) { +// return 1; +// } else { +// return 0; +// } +// }) +// ) || [] +// ); +// } + +export const PointInTimeFlyout = async () => { + + const [isFlyoutVisible, setIsFlyoutVisible] = useState(false); + const [showErrors, setShowErrors] = useState(false); + const [value, setValue] = useState('24'); + const [checked, setChecked] = useState(false); + // const [indexPatterns, setIndexPatterns] = useState([] as PointInTimeFlyoutItem[]); + const onChange = (e) => { + setValue(e.target.value); + }; + + // const { + // savedObjects, + // } = useOpenSearchDashboards().services; + + // useEffect(() => { + // (async function () { + // const gettedIndexPatterns: PointInTimeFlyoutItem[] = await getIndexPatterns( + // savedObjects.client + // ); + // setIndexPatterns(gettedIndexPatterns); + + // console.log(gettedIndexPatterns); + // })(); + // } , [ + // savedObjects.client, + // ]); + + + + const renderBody = ({ data, isLoading, hasPrivilegeToRead }: any) => { + if (isLoading) { + return ( + + + + + + ); + } + + if (!hasPrivilegeToRead) { + return ( + + } + color="danger" + iconType="cross" + > + + + ); + } + + if (data === null) { + return ( + + } + color="danger" + iconType="cross" + > + + + ); + } + + + const onButtonClick = () => { + setShowErrors(!showErrors); + }; + + // const button = ( + // + // Toggle errors + // + // ); + + + const onCheckboxChange = (e) => { + setChecked(e.target.checked); + }; + let errors; + return + + + +

+ Create point in time search based on existing index pattern +

+
+
+ + + + + + + + + + + + + + onCheckboxChange(e)} + /> + + + + + + {/* {button} */} +
+
+ + //return {JSON.stringify(data, null, 2)}; + } + + let flyout; + if (isFlyoutVisible) { + flyout = ( setIsFlyoutVisible(false)} size="m" paddingSize="m" > + + +

+ +

+
+
+ + + {renderBody({ data: "", isLoading: false, hasPrivilegeToRead: true })} + + + + + setIsFlyoutVisible(false)} + flush="left" + > + Close + + + + setIsFlyoutVisible(false)} fill> + Save + + + + + {/* {renderFooter()} */} + {/* {confirmOverwriteModal} */} +
); + } + + return ( +
+ setIsFlyoutVisible(true)} + iconType="plusInCircle" + fill={true} + > + Create point in time + + {flyout} +
+ ); +}; + +function useGeneratedHtmlId(arg0: { prefix: string; }) { + throw new Error('Function not implemented.'); +} + diff --git a/plugins/my_plugin_name/components/point_in_time_flyout/point_in_time_flyout.tsx b/plugins/my_plugin_name/components/point_in_time_flyout/point_in_time_flyout.tsx new file mode 100644 index 000000000000..66247cd07fc8 --- /dev/null +++ b/plugins/my_plugin_name/components/point_in_time_flyout/point_in_time_flyout.tsx @@ -0,0 +1,445 @@ +import React, { Component, Fragment, ReactNode, useEffect, useState } from 'react'; +import { take, get as getField } from 'lodash'; +import { + EuiFlyout, + EuiFlyoutBody, + EuiFlyoutFooter, + EuiFlyoutHeader, + EuiButtonEmpty, + EuiButton, + EuiText, + EuiTitle, + EuiForm, + EuiFormRow, + EuiFilePicker, + EuiInMemoryTable, + EuiSelect, + EuiFlexGroup, + EuiFlexItem, + EuiLoadingSpinner, + EuiCallOut, + EuiSpacer, + EuiLink, + EuiCodeBlock, + EuiFieldText, + EuiTextArea, + EuiRange, + EuiCheckbox, + EuiFormLabel, +} from '@elastic/eui'; +import { i18n } from '@osd/i18n'; +import { FormattedMessage } from '@osd/i18n/react'; +import { useOpenSearchDashboards } from '../../../../src/plugins/opensearch_dashboards_react/public'; +import { ChromeStart, ApplicationStart, SavedObjectsStart, NotificationsStart, OverlayStart, HttpSetup, DocLinksStart } from 'opensearch-dashboards/public'; +import { IUiSettingsClient } from 'opensearch-dashboards/server'; +import { DataPublicPluginStart } from 'src/plugins/data/public'; +import { ManagementAppMountParams } from 'src/plugins/management/public'; +import { CoreStart, HttpFetchError } from 'opensearch-dashboards/public'; +import {CREATE_POINT_IN_TIME_PATH} from "../../common"; +import { RouteComponentProps } from 'react-router-dom'; + +export interface IndexPatternManagmentContext { + chrome: ChromeStart; + application: ApplicationStart; + savedObjects: SavedObjectsStart; + uiSettings: IUiSettingsClient; + notifications: NotificationsStart; + overlays: OverlayStart; + http: HttpSetup; + docLinks: DocLinksStart; + data: DataPublicPluginStart; + setBreadcrumbs: ManagementAppMountParams['setBreadcrumbs']; +}; + +export interface PointInTimeFlyoutItem { + id: string; + title: string; + sort: string; +}; +export interface SavedObjectReference { + name?: string; + id: string; + type: string; +} +export interface PointInTime { + name: string, + keepAlive: string, + id: string, + title: string +} +export async function getIndexPatterns(savedObjectsClient) { + return ( + savedObjectsClient + .find({ + type: 'index-pattern', + fields: ['title', 'type'], + perPage: 10000, + }) + .then((response) => + response.savedObjects + .map((pattern) => { + const id = pattern.id; + const title = pattern.get('title'); + + + return { + id, + title, + // the prepending of 0 at the default pattern takes care of prioritization + // so the sorting will but the default index on top + // or on bottom of a the table + sort: `${title}`, + }; + }) + .sort((a, b) => { + if (a.sort < b.sort) { + return -1; + } else if (a.sort > b.sort) { + return 1; + } else { + return 0; + } + }) + ) || [] + ); +} + +export async function getPits(client, title: string) { + if (title) { + const savedObjects = await client.find({ + type: 'point-in-time', + perPage: 1000, + fields: ['id'] + }); + + return savedObjects.savedObjects; + } +} + + +export async function findByTitle(client, title: string) { + if (title) { + const savedObjects = await client.find({ + type: 'point-in-time', + perPage: 1000, + fields: ['id'] + }); + + return savedObjects.savedObjects.find((obj) => obj.attributes.id.toLowerCase() === title.toLowerCase()); + } +} + + +interface Props extends RouteComponentProps { + setIsFlyoutVisible: (isFlyoutVisible: boolean) => void; + isFlyoutVisible: boolean; +} +export const PointInTimeFlyout = (props:Props) => { + + const [isFlyoutVisible, setIsFlyoutVisible] = useState(false); + const [showErrors, setShowErrors] = useState(false); + const [keepAlive, setKeepAlive] = useState('24'); + const [checked, setChecked] = useState(false); + const [loading, setLoading] = useState(true); + + const [indexPatterns, setIndexPatterns] = useState([] as PointInTimeFlyoutItem[]); + const[selectedIndexPattern, setSelectedIndexPattern] = useState(""); + const[pitName, setPitName] = useState(""); + + const { + setBreadcrumbs, + savedObjects, + uiSettings, + chrome, + docLinks, + application, + http, + data, + } = useOpenSearchDashboards().services; + + const onChange = (e) => { + setKeepAlive(e.target.value); + }; + const onDropDownChange = (e) => { + setSelectedIndexPattern(e.target.value); + } + console.log(useOpenSearchDashboards().services); + console.log(savedObjects); + useEffect(() => { + (async function () { + const gettedIndexPatterns: PointInTimeFlyoutItem[] = await getIndexPatterns( + savedObjects.client + ); + var names = gettedIndexPatterns.map(function (item) { + return item['title']; + }); + setIndexPatterns(gettedIndexPatterns); + setSelectedIndexPattern(gettedIndexPatterns[0].id); + console.log(gettedIndexPatterns); + setLoading(false); + })(); + }, [ + savedObjects.client, + ]); + + const createPointInTime = async () => { + console.log('keep alive :' + keepAlive); + console.log("name : " + pitName); + console.log("index pattern : " + selectedIndexPattern); + setLoading(true); + const pattern = indexPatterns.find((r)=>r.id); + + //setIsFlyoutVisible(false); + const index = pattern.title + const response = await http.post(`${CREATE_POINT_IN_TIME_PATH}/${index}`); + const pit:PointInTime = { + name: pitName, + title: pitName, + keepAlive: keepAlive, + id: response.pit_id // Todo create pit and fill the pit id + } + + const reference:SavedObjectReference = { + id: pattern.id, + type: 'index-pattern', + name: pattern.title + } + createSavedObject(pit, savedObjects.client,reference, http) + } + + async function createSavedObject(pointintime, client, reference,) { + const dupe = await findByTitle(client, pointintime.id); + console.log(dupe); + if(dupe) { + throw new Error(`Duplicate Point in time: ${pointintime.id}`); + } + // if (dupe) { + // if (override) { + // await this.delete(dupe.id); + // } else { + // throw new DuplicateIndexPatternError(`Duplicate index pattern: ${indexPattern.title}`); + // } + // } + + const body = pointintime; + const references = [{...reference}]; + const savedObjectType = "point-in-time"; + const response = await client.create(savedObjectType, body, { + id: pointintime.id, + references, + }); + console.log(response); + pointintime.id = response.id; + setLoading(false); + setIsFlyoutVisible(false); + props.setIsFlyoutVisible(!props.isFlyoutVisible); + return pointintime; + } + + + // useEffect(() => { + // const gettedIndexPatterns: PointInTimeFlyoutItem[] = getIndexPatterns( + // savedObjects.client + // ); + + // console.log(gettedIndexPatterns); + // }); + const renderBody = ({ data, isLoading, hasPrivilegeToRead }: any) => { + console.log(savedObjects); + if (isLoading) { + return ( + + + + + + ); + } + + if (!hasPrivilegeToRead) { + return ( + + } + color="danger" + iconType="cross" + > + + + ); + } + + if (data === null) { + return ( + + } + color="danger" + iconType="cross" + > + + + ); + } + + + const onButtonClick = () => { + setShowErrors(!showErrors); + }; + + // const button = ( + // + // Toggle errors + // + // ); + + const onTextChange = (e) => { + setPitName(e.target.value); + } + const onCheckboxChange = (e) => { + setChecked(e.target.checked); + }; + const onDropDownChange = (e) => { + setSelectedIndexPattern(e.target.value); + } + let errors; + return + + + +

+ Create point in time search based on existing index pattern +

+
+
+ + + { + return { + text: option.title, + value: option.id, + }; + })} + isInvalid={showErrors} + isLoading={loading} + value={selectedIndexPattern} + onChange={onDropDownChange} + /> + + + + + + + + + + + onCheckboxChange(e)} + /> + + + + + + {/* {button} */} +
+
+ + //return {JSON.stringify(data, null, 2)}; + } + + let flyout; + if (isFlyoutVisible) { + flyout = ( setIsFlyoutVisible(false)} size="m" paddingSize="m" > + + +

+ +

+
+
+ + + {renderBody({ data: "", isLoading: false, hasPrivilegeToRead: true })} + + + + + setIsFlyoutVisible(false)} + flush="left" + > + Close + + + + + Save + + + + + {/* {renderFooter()} */} + {/* {confirmOverwriteModal} */} +
); + } + + return ( +
+ setIsFlyoutVisible(true)} + iconType="plusInCircle" + fill={true} + > + Create point in time + + {isFlyoutVisible && flyout} +
+ ); +}; + +function useGeneratedHtmlId(arg0: { prefix: string; }) { + throw new Error('Function not implemented.'); +} + diff --git a/plugins/my_plugin_name/components/point_in_time_table/index.ts b/plugins/my_plugin_name/components/point_in_time_table/index.ts new file mode 100644 index 000000000000..7f97df7ce907 --- /dev/null +++ b/plugins/my_plugin_name/components/point_in_time_table/index.ts @@ -0,0 +1 @@ +export { PointInTimeTableWithRouter } from './point_in_time_table'; \ No newline at end of file diff --git a/plugins/my_plugin_name/components/point_in_time_table/point_in_time_table.tsx b/plugins/my_plugin_name/components/point_in_time_table/point_in_time_table.tsx new file mode 100644 index 000000000000..f9d8b548be60 --- /dev/null +++ b/plugins/my_plugin_name/components/point_in_time_table/point_in_time_table.tsx @@ -0,0 +1,438 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + * Any modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +import { + EuiBadge, + EuiButtonEmpty, + EuiFlexGroup, + EuiFlexItem, + EuiInMemoryTable, + EuiSpacer, + EuiText, + EuiBadgeGroup, + EuiPageContent, + EuiTitle, + EuiButton, +} from '@elastic/eui'; +import { + ChromeStart, + ApplicationStart, + IUiSettingsClient, + OverlayStart, + SavedObjectsStart, + NotificationsStart, + DocLinksStart, + HttpSetup, +} from '../../../../src/core/public'; +import { DataPublicPluginStart } from '../../../../src/plugins/data/public'; +import { FormattedMessage } from '@osd/i18n/react'; +import { withRouter, RouteComponentProps } from 'react-router-dom'; +import React, { useState, useEffect, useRef } from 'react'; +import { i18n } from '@osd/i18n'; +import { + reactRouterNavigate, + useOpenSearchDashboards, +} from '../../../../src/plugins/opensearch_dashboards_react/public'; +import { PointInTimeFlyout } from '../point_in_time_flyout'; +import { IndexPatternManagmentContext } from '../point_in_time_flyout/point_in_time_flyout'; +import moment from 'moment'; + + +const pagination = { + initialPageSize: 10, + pageSizeOptions: [5, 10, 25, 50], +}; + +const sorting = { + sort: { + field: 'title', + direction: 'asc' as const, + }, +}; + + + + +const ariaRegion = i18n.translate('indexPatternManagement.editIndexPatternLiveRegionAriaLabel', { + defaultMessage: 'Point in time', +}); + +const title = i18n.translate('indexPatternManagement.indexPatternTable.title', { + defaultMessage: 'Point in time', +}); + + + +interface Props extends RouteComponentProps { + canSave: boolean; +} + +interface PointInTimeTableItem { + id: string; + title: string; + default: boolean; + tag?: string[]; + sort: string; + keepAlive: string; + source: string; + creation: string; + expiration: string; +} + +interface PointInTimeManagmentContext { + chrome: ChromeStart; + application: ApplicationStart; + savedObjects: SavedObjectsStart; + uiSettings: IUiSettingsClient; + notifications: NotificationsStart; + overlays: OverlayStart; + http: HttpSetup; + docLinks: DocLinksStart; + data: DataPublicPluginStart; +} + +const item1: PointInTimeTableItem = { + id: 'id1', + title: 'pit1', + default: false, + sort: '0pit1', + keepAlive: "24", + source: "ind-1", + creation: "24", + expiration: "24" +}; +const item2: PointInTimeTableItem = { + id: 'id2', + title: 'pit2', + default: false, + sort: '1pit2', + keepAlive: "24", + source: "ind-2", + creation: "24", + expiration: "24" +}; + +export async function getPits(savedObjects) { + return savedObjects + .find({ + type: 'point-in-time', + perPage: 10000, + }).then((response) => + response.savedObjects + .map((pattern) => { + console.log(pattern) + const id = pattern.id; + const name = pattern.get('name'); + const keepAlive = pattern.get('keepAlive'); + const source = pattern.references[0].name; + const creation = moment(pattern.updated_at).format("YYYYMMDD HH:mm:ss"); + var date1 = new Date(); + var date2 = new Date(pattern.updated_at); + var diff = new Date(date1.getTime() - date2.getTime()); + console.log(diff); + let expiration = "0"; + if(keepAlive < diff.getUTCHours() + 1) + expiration = "Expired"; + else + expiration = (24 - (diff.getUTCHours() + 1)).toString(); + + return { + id, + title: name, + // the prepending of 0 at the default pattern takes care of prioritization + // so the sorting will but the default index on top + // or on bottom of a the table + sort: `${name}`, + default: false, + keepAlive: keepAlive, + source: source, + creation: creation, + expiration: expiration + }; + }) + .sort((a, b) => { + if (a.sort < b.sort) { + return -1; + } else if (a.sort > b.sort) { + return 1; + } else { + return 0; + } + }) + ) || []; +} +export const PointInTimeTable = ({ canSave, history }: Props) => { + + const [error, setError] = useState(); + const tableRef = useRef(); + const [pits, setPits] = useState([item1, item2]); + const [selection, setSelection] = useState([]); + const [isFlyoutVisible, setIsFlyoutVisible] = useState(false); + const { + setBreadcrumbs, + savedObjects, + uiSettings, + chrome, + docLinks, + application, + http, + data, + } = useOpenSearchDashboards().services; + + useEffect(() => { + (async function () { + const pits1:PointInTimeTableItem[] = await getPits(savedObjects.client); + setPits(pits1); + var names = gettedIndexPatterns.map(function (item) { + return item['title']; + }); + setIndexPatterns(gettedIndexPatterns); + + console.log(gettedIndexPatterns); + setLoading(false); + })(); + }, [ + savedObjects.client, isFlyoutVisible, + ]); + + // const renderToolsLeft = () => { + // if (selection.length === 0) { + // return; + // } + + // const onClick = () => { + // //store.deleteUsers(...selection.map((user) => user.id)); + // for(const id of selection) { + // const findIndex = pits.findIndex(a => a.id === id.id) + + // findIndex !== -1 && pits.splice(findIndex , 1) + // setPits(pits); + // console.log(id); + // } + // setSelection([]); + // }; + + // return ( + // + // Delete {selection.length} point in time searches + // + // ); + // }; + + const renderToolsRight = () => { + const onClick = () => { + //store.deleteUsers(...selection.map((user) => user.id)); + for (const id of selection) { + const findIndex = pits.findIndex(a => a.id === id.id) + + findIndex !== -1 && pits.splice(findIndex, 1) + setPits(pits); + console.log(id); + } + setSelection([]); + }; + return ( + + Delete + + ); + // return [ + // { + // //loadUsers(); + // }} + // isDisabled={selection.length === 0} + // > + // Load Users + // , + // { + // //loadUsersWithError(); + // }} + // isDisabled={false} + // > + // Load Users (Error) + // , + // ]; + }; + + const search = { + toolsRight: renderToolsRight(), + box: { + incremental: true, + schema: { + fields: { title: { type: 'string' } }, + }, + }, + }; + + + + const selectionValue = { + selectable: () => true, + selectableMessage: (selectable: any) => + !selectable ? 'User is currently offline' : undefined, + onSelectionChange: (selection: any) => setSelection(selection), + initialSelected: [], + }; + + // const { + // savedObjects, + // uiSettings, + // chrome, + // docLinks, + // application, + // http, + // data, + // } = useOpenSearchDashboards().services; + + + // useEffect(() => { + + // }, []); + + + // const loadSources = () => { + // }; + + // useEffect(() => { + // }, []); + + const columns = [ + { + field: 'title', + name: 'Name', + render: (title: string, object: PointInTimeTableItem) => { + + return {object.title}; + }, + dataType: 'string' as const, + sortable: ({ sort }: { sort: string }) => sort, + }, + { + field: 'source', + name: 'Source', + render: (title: string, object: PointInTimeTableItem) => { + + return {object.source}; + }, + dataType: 'string' as const + }, + { + field: 'keepalive', + name: 'Keep alive', + render: (title: string, object: PointInTimeTableItem) => { + + return {object.keepAlive}; + }, + dataType: 'string' as const + }, + { + field: 'creation', + name: 'Created at', + render: (title: string, object: PointInTimeTableItem) => { + + return {object.creation}; + }, + dataType: 'string' as const + }, + { + field: 'expiration', + name: 'Expiration in', + render: (title: string, object: PointInTimeTableItem) => { + + return {object.expiration}; + }, + dataType: 'string' as const + }, + ]; + + // return ( + // + // + // + // + //

{title}

+ //
+ // + // + //

+ // + //

+ //
+ //
+ // + //
+ // + // + //
+ // ); + + + return ( + + + + +

{title}

+
+ + +

+ +

+
+
+ + + + +
+ + +
+ ); +}; + +export const PointInTimeTableWithRouter = withRouter(PointInTimeTable); diff --git a/plugins/my_plugin_name/opensearch_dashboards.json b/plugins/my_plugin_name/opensearch_dashboards.json new file mode 100644 index 000000000000..972dc3c73386 --- /dev/null +++ b/plugins/my_plugin_name/opensearch_dashboards.json @@ -0,0 +1,9 @@ +{ + "id": "myPluginName", + "version": "1.0.0", + "opensearchDashboardsVersion": "opensearchDashboards", + "server": true, + "ui": true, + "requiredPlugins": ["navigation", "management", "data", "urlForwarding"], + "requiredBundles": ["opensearchDashboardsReact"] +} diff --git a/plugins/my_plugin_name/package.json b/plugins/my_plugin_name/package.json new file mode 100644 index 000000000000..e7b294f69129 --- /dev/null +++ b/plugins/my_plugin_name/package.json @@ -0,0 +1,10 @@ +{ + "name": "myPluginName", + "version": "0.0.0", + "private": true, + "scripts": { + "build": "yarn plugin-helpers build", + "plugin-helpers": "node ../../scripts/plugin_helpers", + "osd": "node ../../scripts/osd" + } +} diff --git a/plugins/my_plugin_name/public/application.tsx b/plugins/my_plugin_name/public/application.tsx new file mode 100644 index 000000000000..42c1ce7f4b99 --- /dev/null +++ b/plugins/my_plugin_name/public/application.tsx @@ -0,0 +1,23 @@ +import React from 'react'; +import ReactDOM from 'react-dom'; +import { AppMountParameters, CoreStart } from '../../../src/core/public'; +import { AppPluginStartDependencies } from './types'; +import { MyPluginNameApp } from './components/app'; + +export const renderApp = ( + { notifications, http }: CoreStart, + { navigation }: AppPluginStartDependencies, + { appBasePath, element }: AppMountParameters +) => { + ReactDOM.render( + , + element + ); + + return () => ReactDOM.unmountComponentAtNode(element); +}; diff --git a/plugins/my_plugin_name/public/components/app.tsx b/plugins/my_plugin_name/public/components/app.tsx new file mode 100644 index 000000000000..e35ceac3669f --- /dev/null +++ b/plugins/my_plugin_name/public/components/app.tsx @@ -0,0 +1,153 @@ +import React, { useState } from 'react'; +import { i18n } from '@osd/i18n'; +import { FormattedMessage, I18nProvider } from '@osd/i18n/react'; +import { BrowserRouter as Router } from 'react-router-dom'; + +import { + EuiButton, + EuiHorizontalRule, + EuiPage, + EuiPageBody, + EuiPageContent, + EuiPageContentBody, + EuiPageContentHeader, + EuiPageHeader, + EuiTitle, + EuiText, + EuiFlexGroup, + EuiFlexItem, + EuiSpacer, +} from '@elastic/eui'; + +import { CoreStart } from '../../../../src/core/public'; +import { NavigationPublicPluginStart } from '../../../../src/plugins/navigation/public'; + +import { PointInTimeTableWithRouter } from '../../components/point_in_time_table' + +import { PointInTimeFlyout } from '../../components/point_in_time_flyout'; + +import { PLUGIN_ID, PLUGIN_NAME } from '../../common'; +import { OpenSearchDashboardsContextProvider } from '../../../../src/plugins/opensearch_dashboards_react/public'; +import { DataPublicPluginStart } from '../../../../src/plugins/data/public'; + +interface MyPluginNameAppDeps { + basename: string; + notifications: CoreStart['notifications']; + http: CoreStart['http']; + navigation: NavigationPublicPluginStart; + savedObjects: CoreStart['savedObjects']; + data: DataPublicPluginStart; +} + +export const MyPluginNameApp = ({ + basename, + notifications, + http, + navigation, + savedObjects, + data +}: MyPluginNameAppDeps) => { + // Use React hooks to manage state. + const [timestamp, setTimestamp] = useState(); + + const onClickHandler = () => { + // Use the core http service to make a response to the server API. + http.get('/api/my_plugin_name/example').then((res) => { + setTimestamp(res.time); + // Use the core notifications service to display a success message. + notifications.toasts.addSuccess( + i18n.translate('myPluginName.dataUpdated', { + defaultMessage: 'Data updated', + }) + ); + }); + }; + + const deps: MyPluginNameAppDeps = { + savedObjects, + notifications, + http, + data, + }; + // Render the application DOM. + // Note that `navigation.ui.TopNavMenu` is a stateful component exported on the `navigation` plugin's start contract. + // return ( + // + // + // <> + // + // + // + // + // + //

+ // + //

+ //
+ //
+ // + // + // + //

+ // + //

+ //
+ //
+ // + // + //

+ // + //

+ // + //

+ // + //

+ // + // + // + //
+ //
+ //
+ //
+ //
+ // + //
+ //
+ // ); + + return ( + + + + + <> + {/* */} + + + + + + ); +}; diff --git a/plugins/my_plugin_name/public/index.scss b/plugins/my_plugin_name/public/index.scss new file mode 100644 index 000000000000..ff7112406eac --- /dev/null +++ b/plugins/my_plugin_name/public/index.scss @@ -0,0 +1 @@ +/* stylelint-disable no-empty-source */ diff --git a/plugins/my_plugin_name/public/index.ts b/plugins/my_plugin_name/public/index.ts new file mode 100644 index 000000000000..1f1db78dca15 --- /dev/null +++ b/plugins/my_plugin_name/public/index.ts @@ -0,0 +1,10 @@ +import './index.scss'; + +import { MyPluginNamePlugin } from './plugin'; + +// This exports static code and TypeScript types, +// as well as, OpenSearch Dashboards Platform `plugin()` initializer. +export function plugin() { + return new MyPluginNamePlugin(); +} +export { MyPluginNamePluginSetup, MyPluginNamePluginStart } from './types'; diff --git a/plugins/my_plugin_name/public/management_app/index.tsx b/plugins/my_plugin_name/public/management_app/index.tsx new file mode 100644 index 000000000000..9efa49b6e2b7 --- /dev/null +++ b/plugins/my_plugin_name/public/management_app/index.tsx @@ -0,0 +1,31 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + * Any modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export { mountManagementSection } from './mount_management_section'; diff --git a/plugins/my_plugin_name/public/management_app/mount_management_section.tsx b/plugins/my_plugin_name/public/management_app/mount_management_section.tsx new file mode 100644 index 000000000000..a780b3afd967 --- /dev/null +++ b/plugins/my_plugin_name/public/management_app/mount_management_section.tsx @@ -0,0 +1,59 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + * Any modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import React from 'react'; +import ReactDOM from 'react-dom'; +import { CoreStart } from '../../../../src/core/public'; +import { AppPluginStartDependencies } from '../types'; +import { MyPluginNameApp } from '../components/app'; +import { ManagementAppMountParams } from '../../../../src/plugins/management/public'; + + +export const mountManagementSection = async( + { notifications, http, savedObjects }: CoreStart, + { navigation, data }: AppPluginStartDependencies, + { basePath,element }: ManagementAppMountParams +) => { + ReactDOM.render( + , + element + ); + + return () => { + ReactDOM.unmountComponentAtNode(element); + } +}; diff --git a/plugins/my_plugin_name/public/plugin.ts b/plugins/my_plugin_name/public/plugin.ts new file mode 100644 index 000000000000..df1f800ba07c --- /dev/null +++ b/plugins/my_plugin_name/public/plugin.ts @@ -0,0 +1,63 @@ +import { i18n } from '@osd/i18n'; +import { AppMountParameters, CoreSetup, CoreStart, Plugin } from '../../../src/core/public'; +import { + MyPluginNamePluginSetup, + MyPluginNamePluginStart, + AppPluginStartDependencies, + SetupDependencies +} from './types'; +import { PLUGIN_NAME } from '../common'; + +export class MyPluginNamePlugin + implements Plugin { + public setup(core: CoreSetup, {management} : SetupDependencies ): MyPluginNamePluginSetup { + + // Register an application into the side navigation menu + core.application.register({ + id: 'myPluginName', + title: PLUGIN_NAME, + async mount(params: AppMountParameters) { + // Load application bundle + const { renderApp } = await import('./application'); + // Get start services as specified in opensearch_dashboards.json + const [coreStart, depsStart] = await core.getStartServices(); + // Render the application + return renderApp(coreStart, depsStart as AppPluginStartDependencies, params); + }, + }); + + const opensearchDashboardsSection = management.sections.section.opensearchDashboards; + + opensearchDashboardsSection.registerApp({ + id: 'point_in_time', + title: i18n.translate('pointInTime.managementSectionLabel', { + defaultMessage: 'Point in time', + }), + order: 1, + mount: async (mountParams) => { + const { mountManagementSection } = await import('./management_app'); + const [coreStart, depsStart] = await core.getStartServices(); + return mountManagementSection(coreStart, depsStart as AppPluginStartDependencies, mountParams + ); + }, + }); + + // Return methods that should be available to other plugins + return { + getGreeting() { + return i18n.translate('myPluginName.greetingText', { + defaultMessage: 'Hello from {name}!', + values: { + name: PLUGIN_NAME, + }, + }); + }, + }; + } + + public start(core: CoreStart): MyPluginNamePluginStart { + return {}; + } + + public stop() {} +} diff --git a/plugins/my_plugin_name/public/types.ts b/plugins/my_plugin_name/public/types.ts new file mode 100644 index 000000000000..1d263dea872a --- /dev/null +++ b/plugins/my_plugin_name/public/types.ts @@ -0,0 +1,20 @@ +import { NavigationPublicPluginStart } from '../../../src/plugins/navigation/public'; +import { HomePublicPluginSetup } from '../../../src/plugins/home/public'; + +import { ManagementSetup } from '../../../src/plugins/management/public'; +import { DataPublicPluginStart } from 'src/plugins/data/public'; + +export interface MyPluginNamePluginSetup { + getGreeting: () => string; +} +// eslint-disable-next-line @typescript-eslint/no-empty-interface +export interface MyPluginNamePluginStart {} + +export interface AppPluginStartDependencies { + navigation: NavigationPublicPluginStart; + data: DataPublicPluginStart +} + +export interface SetupDependencies { + management: ManagementSetup; +} \ No newline at end of file diff --git a/plugins/my_plugin_name/server/index.ts b/plugins/my_plugin_name/server/index.ts new file mode 100644 index 000000000000..25d6be9480de --- /dev/null +++ b/plugins/my_plugin_name/server/index.ts @@ -0,0 +1,11 @@ +import { PluginInitializerContext } from '../../../src/core/server'; +import { MyPluginNamePlugin } from './plugin'; + +// This exports static code and TypeScript types, +// as well as, OpenSearch Dashboards Platform `plugin()` initializer. + +export function plugin(initializerContext: PluginInitializerContext) { + return new MyPluginNamePlugin(initializerContext); +} + +export { MyPluginNamePluginSetup, MyPluginNamePluginStart } from './types'; diff --git a/plugins/my_plugin_name/server/plugin.ts b/plugins/my_plugin_name/server/plugin.ts new file mode 100644 index 000000000000..ecd14dffcc16 --- /dev/null +++ b/plugins/my_plugin_name/server/plugin.ts @@ -0,0 +1,40 @@ +import { + PluginInitializerContext, + CoreSetup, + CoreStart, + Plugin, + Logger, +} from '../../../src/core/server'; + +import { MyPluginNamePluginSetup, MyPluginNamePluginStart } from './types'; +import { defineRoutes } from './routes'; +import {pointInTime} from '../server/saved_objects/point_in_time'; +import {createPointInTimeRoute} from "./routes/create_point_in_time"; + +export class MyPluginNamePlugin + implements Plugin { + private readonly logger: Logger; + + constructor(initializerContext: PluginInitializerContext) { + this.logger = initializerContext.logger.get(); + } + + public setup(core: CoreSetup) { + this.logger.debug('my_plugin_name: Setup'); + const router = core.http.createRouter(); + + // Register server side APIs + defineRoutes(router); + createPointInTimeRoute(router, core.http); + core.savedObjects.registerType(pointInTime); + + return {}; + } + + public start(core: CoreStart) { + this.logger.debug('my_plugin_name: Started'); + return {}; + } + + public stop() {} +} diff --git a/plugins/my_plugin_name/server/routes/create_point_in_time.ts b/plugins/my_plugin_name/server/routes/create_point_in_time.ts new file mode 100644 index 000000000000..291d9650ec33 --- /dev/null +++ b/plugins/my_plugin_name/server/routes/create_point_in_time.ts @@ -0,0 +1,35 @@ +import { schema } from '@osd/config-schema'; +import { HttpResources, HttpServiceSetup, IRouter } from '../../../../src/core/server'; +import { CREATE_POINT_IN_TIME_PATH } from '../../common'; + +export function createPointInTimeRoute( + router: IRouter, + http: HttpServiceSetup & { resources: HttpResources } +) { + router.post( + { + path: `${CREATE_POINT_IN_TIME_PATH}/{index}`, + validate: { + params: schema.object({ + index: schema.string(), + }), + }, + }, + async (context, request, response) => { + const { index } = request.params; + const respLocal = await context.core.opensearch.client.asCurrentUser.create_pit( + { + index, + keep_alive: '12h', + }, + {} + ); + return response.ok({ + body: { + pit_id: respLocal.body.pit_id, + creation_time: respLocal.body.creation_time, + }, + }); + } + ); +} diff --git a/plugins/my_plugin_name/server/routes/index.ts b/plugins/my_plugin_name/server/routes/index.ts new file mode 100644 index 000000000000..128526ab7e8d --- /dev/null +++ b/plugins/my_plugin_name/server/routes/index.ts @@ -0,0 +1,17 @@ +import { IRouter } from '../../../../src/core/server'; + +export function defineRoutes(router: IRouter) { + router.get( + { + path: '/api/my_plugin_name/example', + validate: false, + }, + async (context, request, response) => { + return response.ok({ + body: { + time: new Date().toISOString(), + }, + }); + } + ); +} diff --git a/plugins/my_plugin_name/server/saved_objects/point_in_time.ts b/plugins/my_plugin_name/server/saved_objects/point_in_time.ts new file mode 100644 index 000000000000..ae5df1ab21e1 --- /dev/null +++ b/plugins/my_plugin_name/server/saved_objects/point_in_time.ts @@ -0,0 +1,38 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { SavedObjectsType } from 'opensearch-dashboards/server'; + +export const pointInTime: SavedObjectsType = { + name: 'point-in-time', + namespaceType: 'agnostic', + hidden: false, + management: { + icon: 'apps', // todo: pending ux #2034 + defaultSearchField: 'title', + importableAndExportable: true, + getTitle(obj) { + return obj.attributes.name; + }, + // getEditUrl(obj) { + // return `/management/opensearch-dashboards/dataSources/${encodeURIComponent(obj.id)}`; + // }, + // getInAppUrl(obj) { + // return { + // path: `/app/management/opensearch-dashboards/dataSources/${encodeURIComponent(obj.id)}`, + // uiCapabilitiesPath: 'management.opensearchDashboards.dataSources', + // }; + // }, + }, + mappings: { + dynamic: false, + properties: { + title: { + type: 'text', + }, + }, + }, +}; + diff --git a/plugins/my_plugin_name/server/saved_objects/point_in_time_saved_objects_client_wrapper.ts b/plugins/my_plugin_name/server/saved_objects/point_in_time_saved_objects_client_wrapper.ts new file mode 100644 index 000000000000..9af81a73e513 --- /dev/null +++ b/plugins/my_plugin_name/server/saved_objects/point_in_time_saved_objects_client_wrapper.ts @@ -0,0 +1,264 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { + SavedObjectsBulkCreateObject, + SavedObjectsBulkResponse, + SavedObjectsBulkUpdateObject, + SavedObjectsBulkUpdateOptions, + SavedObjectsBulkUpdateResponse, + SavedObjectsClientWrapperFactory, + SavedObjectsCreateOptions, + SavedObjectsUpdateOptions, + SavedObjectsUpdateResponse, + } from 'opensearch-dashboards/server'; + + import { SavedObjectsErrorHelpers } from '../../../../src/core/server'; + + /** + * Describes the Credential Saved Objects Client Wrapper class, + * which contains the factory used to create Saved Objects Client Wrapper instances + */ + export class PointInTimeSavedObjectsClientWrapper { + + /** + * Describes the factory used to create instances of Saved Objects Client Wrappers + * for data source spcific operations such as credntials encryption + */ + public wrapperFactory: SavedObjectsClientWrapperFactory = (wrapperOptions) => { + const POINT_IN_TIME_SAVED_OBJECT_TYPE = "point-in-time"; + const createWithCredentialsEncryption = async ( + type: string, + attributes: T, + options?: SavedObjectsCreateOptions + ) => { + if (POINT_IN_TIME_SAVED_OBJECT_TYPE !== type) { + return await wrapperOptions.client.create(type, attributes, options); + } + + const encryptedAttributes = await this.validateAndEncryptAttributes(attributes); + + return await wrapperOptions.client.create(type, encryptedAttributes, options); + }; + + const bulkCreateWithCredentialsEncryption = async ( + objects: Array>, + options?: SavedObjectsCreateOptions + ): Promise> => { + objects = await Promise.all( + objects.map(async (object) => { + const { type, attributes } = object; + + if (DATA_SOURCE_SAVED_OBJECT_TYPE !== type) { + return object; + } + + return { + ...object, + attributes: await this.validateAndEncryptAttributes(attributes), + }; + }) + ); + return await wrapperOptions.client.bulkCreate(objects, options); + }; + + const updateWithCredentialsEncryption = async ( + type: string, + id: string, + attributes: Partial, + options: SavedObjectsUpdateOptions = {} + ): Promise> => { + if (DATA_SOURCE_SAVED_OBJECT_TYPE !== type) { + return await wrapperOptions.client.update(type, id, attributes, options); + } + + const encryptedAttributes: Partial = await this.validateAndUpdatePartialAttributes( + attributes + ); + + return await wrapperOptions.client.update(type, id, encryptedAttributes, options); + }; + + const bulkUpdateWithCredentialsEncryption = async ( + objects: Array>, + options?: SavedObjectsBulkUpdateOptions + ): Promise> => { + objects = await Promise.all( + objects.map(async (object) => { + const { type, attributes } = object; + + if (DATA_SOURCE_SAVED_OBJECT_TYPE !== type) { + return object; + } + + const encryptedAttributes: Partial = await this.validateAndUpdatePartialAttributes( + attributes + ); + + return { + ...object, + attributes: encryptedAttributes, + }; + }) + ); + + return await wrapperOptions.client.bulkUpdate(objects, options); + }; + + return { + ...wrapperOptions.client, + create: createWithCredentialsEncryption, + bulkCreate: bulkCreateWithCredentialsEncryption, + checkConflicts: wrapperOptions.client.checkConflicts, + delete: wrapperOptions.client.delete, + find: wrapperOptions.client.find, + bulkGet: wrapperOptions.client.bulkGet, + get: wrapperOptions.client.get, + update: updateWithCredentialsEncryption, + bulkUpdate: bulkUpdateWithCredentialsEncryption, + errors: wrapperOptions.client.errors, + addToNamespaces: wrapperOptions.client.addToNamespaces, + deleteFromNamespaces: wrapperOptions.client.deleteFromNamespaces, + }; + }; + + private isValidUrl(endpoint: string) { + try { + const url = new URL(endpoint); + return Boolean(url) && (url.protocol === 'http:' || url.protocol === 'https:'); + } catch (e) { + return false; + } + } + + private async validateAndEncryptAttributes(attributes: T) { + this.validateAttributes(attributes); + + const { auth } = attributes; + + switch (auth.type) { + case AuthType.NoAuth: + return { + ...attributes, + // Drop the credentials attribute for no_auth + credentials: undefined, + }; + case AuthType.UsernamePasswordType: + return { + ...attributes, + auth: await this.encryptCredentials(auth), + }; + default: + throw SavedObjectsErrorHelpers.createBadRequestError(`Invalid auth type: '${type}'`); + } + } + + private async validateAndUpdatePartialAttributes(attributes: T) { + const { auth, endpoint } = attributes; + + if (endpoint) { + throw SavedObjectsErrorHelpers.createBadRequestError( + `Updating a dataSource endpoint is not supported` + ); + } + + if (auth === undefined) { + return attributes; + } + + const { type, credentials } = auth; + + switch (type) { + case AuthType.NoAuth: + return { + ...attributes, + // Drop the credentials attribute for no_auth + credentials: undefined, + }; + case AuthType.UsernamePasswordType: + if (credentials?.password) { + return { + ...attributes, + auth: await this.encryptCredentials(auth), + }; + } else { + return attributes; + } + default: + throw SavedObjectsErrorHelpers.createBadRequestError(`Invalid credentials type: '${type}'`); + } + } + + private validateAttributes(attributes: T) { + const { title, endpoint, auth } = attributes; + if (!title?.trim?.().length) { + throw SavedObjectsErrorHelpers.createBadRequestError( + '"title" attribute must be a non-empty string' + ); + } + + if (!this.isValidUrl(endpoint)) { + throw SavedObjectsErrorHelpers.createBadRequestError('"endpoint" attribute is not valid'); + } + + if (auth === undefined) { + throw SavedObjectsErrorHelpers.createBadRequestError('"auth" attribute is required'); + } + + this.validateAuth(auth); + } + + private validateAuth(auth: T) { + const { type, credentials } = auth; + + if (!type) { + throw SavedObjectsErrorHelpers.createBadRequestError('"auth.type" attribute is required'); + } + + switch (type) { + case AuthType.NoAuth: + break; + case AuthType.UsernamePasswordType: + if (credentials === undefined) { + throw SavedObjectsErrorHelpers.createBadRequestError( + '"auth.credentials" attribute is required' + ); + } + + const { username, password } = credentials; + + if (!username) { + throw SavedObjectsErrorHelpers.createBadRequestError( + '"auth.credentials.username" attribute is required' + ); + } + + if (!password) { + throw SavedObjectsErrorHelpers.createBadRequestError( + '"auth.credentials.password" attribute is required' + ); + } + + break; + default: + throw SavedObjectsErrorHelpers.createBadRequestError(`Invalid auth type: '${type}'`); + } + } + + private async encryptCredentials(auth: T) { + const { + credentials: { username, password }, + } = auth; + + return { + ...auth, + credentials: { + username, + password: await this.cryptographyClient.encryptAndEncode(password), + }, + }; + } + } + \ No newline at end of file diff --git a/plugins/my_plugin_name/server/types.ts b/plugins/my_plugin_name/server/types.ts new file mode 100644 index 000000000000..680cea02ba8c --- /dev/null +++ b/plugins/my_plugin_name/server/types.ts @@ -0,0 +1,4 @@ +// eslint-disable-next-line @typescript-eslint/no-empty-interface +export interface MyPluginNamePluginSetup {} +// eslint-disable-next-line @typescript-eslint/no-empty-interface +export interface MyPluginNamePluginStart {} diff --git a/plugins/my_plugin_name/target/public/.osd-optimizer-cache b/plugins/my_plugin_name/target/public/.osd-optimizer-cache new file mode 100644 index 000000000000..e3f70cb91b0f --- /dev/null +++ b/plugins/my_plugin_name/target/public/.osd-optimizer-cache @@ -0,0 +1,162 @@ +{ + "bundleRefExportIds": [ + "plugin/opensearchDashboardsReact/public" + ], + "optimizerCacheKey": { + "lastCommit": "9f7ba5b8a10d03dfdc723d140787435a1ed915b0", + "bootstrap": "# this is only human readable for debugging, please don't try to parse this\n@osd/babel-preset:3c3249ac1f89295e2fcbbfe6c0d2cc6f92e59833\n@osd/config-schema:e8447b1193db8481aa8ff61aa5df5a0048a4d88c\n@osd/dev-utils:955467add63fa1a86d39001535103474694a2ba9\n@osd/expect:6cba2164a2c06247ac6e0b642afd65a26e62f89a\n@osd/i18n:f50e22057fdf97aa1b815d08f91f3e99869d3afc\n@osd/monaco:d855ae2c0ff88991e309594c4da41bbf39342c7d\n@osd/optimizer:748f60e89c9ceeac819fe2b90ac2579daeef759b\n@osd/std:0ef7d9157911bd43179bcbcbcb7e532a93cd151c\n@osd/ui-shared-deps:7373f3528ac7025fce0f7b910f6c08b71810acea\n@osd/utility-types:bbf127b5ed91787a5dfac6d9d67acebce790606f\n@osd/utils:acd70e315b86681cbbe0c8bf2745702332b42afd", + "deletedPaths": [], + "modifiedTimes": {}, + "workerConfig": { + "dist": false, + "repoRoot": "/Users/abandeji/Public/workplace/OpenSearch-Dashboards", + "optimizerCacheKey": "â™»", + "themeTags": [ + "v7dark", + "v7light" + ], + "browserslistEnv": "dev" + } + }, + "cacheKey": { + "spec": { + "type": "plugin", + "id": "myPluginName", + "publicDirNames": [ + "public" + ], + "contextDir": "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/plugins/my_plugin_name", + "sourceRoot": "/Users/abandeji/Public/workplace/OpenSearch-Dashboards", + "outputDir": "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/plugins/my_plugin_name/target/public", + "manifestPath": "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/plugins/my_plugin_name/opensearch_dashboards.json" + }, + "mtimes": { + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/functions/_colors.scss": 1663010983861, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/functions/_index.scss": 1663010983861, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/functions/_math.scss": 1663010983861, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/mixins/_beta_badge.scss": 1663010983861, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/mixins/_button.scss": 1663010983861, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/mixins/_form.scss": 1663010983861, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/mixins/_header.scss": 1663010983861, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/mixins/_helpers.scss": 1663010983861, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/mixins/_icons.scss": 1663010983861, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/mixins/_index.scss": 1663010983861, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/mixins/_loading.scss": 1663010983861, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/mixins/_panel.scss": 1663010983861, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/mixins/_popover.scss": 1663010983861, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/mixins/_range.scss": 1663010983861, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/mixins/_responsive.scss": 1663010983861, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/mixins/_shadow.scss": 1663010983861, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/mixins/_size.scss": 1663010983861, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/mixins/_states.scss": 1663010983861, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/mixins/_tool_tip.scss": 1663010983861, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/mixins/_typography.scss": 1663010983861, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/variables/_animations.scss": 1663010983861, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/variables/_borders.scss": 1663010983861, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/variables/_buttons.scss": 1663010983861, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/variables/_colors.scss": 1663010983861, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/variables/_form.scss": 1663010983861, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/variables/_header.scss": 1663010983861, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/variables/_index.scss": 1663010983861, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/variables/_page.scss": 1663010983861, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/variables/_panel.scss": 1663010983861, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/variables/_responsive.scss": 1663010983861, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/variables/_shadows.scss": 1663010983861, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/variables/_size.scss": 1663010983861, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/variables/_states.scss": 1663010983861, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/variables/_tool_tip.scss": 1663010983861, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/variables/_typography.scss": 1663010983861, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/variables/_z_index.scss": 1663010983861, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/themes/eui/eui_colors_dark.scss": 1663086368977.4006, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/themes/eui/eui_colors_light.scss": 1663086368978.1084, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/themes/eui/eui_globals.scss": 1663086368978.832, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/css-loader/package.json": 1663011008403, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/style-loader/package.json": 1663011008467.999, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/packages/osd-optimizer/postcss.config.js": 1663005816609.9639, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/packages/osd-optimizer/target/worker/entry_point_creator.js": 1665044170167.9504, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/packages/osd-ui-shared-deps/public_path_module_creator.js": 1663005816686.4434, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/plugins/my_plugin_name/common/index.ts": 1665582400759.5645, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/plugins/my_plugin_name/components/point_in_time_flyout/index.ts": 1665582400759.737, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/plugins/my_plugin_name/components/point_in_time_flyout/point_in_time_flyout.tsx": 1666078515506.8296, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/plugins/my_plugin_name/components/point_in_time_table/index.ts": 1665582400760.4114, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/plugins/my_plugin_name/components/point_in_time_table/point_in_time_table.tsx": 1666078515507.27, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/plugins/my_plugin_name/opensearch_dashboards.json": 1665582400760.7676, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/plugins/my_plugin_name/public/application.tsx": 1665582400761.0154, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/plugins/my_plugin_name/public/components/app.tsx": 1665582400761.1565, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/plugins/my_plugin_name/public/index.scss": 1665582400761.4487, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/plugins/my_plugin_name/public/index.ts": 1665582400761.545, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/plugins/my_plugin_name/public/management_app/index.tsx": 1665582400761.678, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/plugins/my_plugin_name/public/management_app/mount_management_section.tsx": 1665582400761.7688, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/plugins/my_plugin_name/public/plugin.ts": 1665582400761.8606, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/plugins/my_plugin_name/public/types.ts": 1665582400761.9526, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/src/core/public/core_app/styles/_globals_v7dark.scss": 1663005816721.7495, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/src/core/public/core_app/styles/_globals_v7light.scss": 1663005816721.8167, + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/src/core/public/core_app/styles/_mixins.scss": 1663005816722.0398 + } + }, + "moduleCount": 22, + "workUnits": 562, + "files": [ + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/functions/_colors.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/functions/_index.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/functions/_math.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/mixins/_beta_badge.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/mixins/_button.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/mixins/_form.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/mixins/_header.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/mixins/_helpers.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/mixins/_icons.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/mixins/_index.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/mixins/_loading.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/mixins/_panel.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/mixins/_popover.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/mixins/_range.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/mixins/_responsive.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/mixins/_shadow.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/mixins/_size.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/mixins/_states.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/mixins/_tool_tip.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/mixins/_typography.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/variables/_animations.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/variables/_borders.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/variables/_buttons.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/variables/_colors.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/variables/_form.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/variables/_header.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/variables/_index.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/variables/_page.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/variables/_panel.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/variables/_responsive.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/variables/_shadows.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/variables/_size.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/variables/_states.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/variables/_tool_tip.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/variables/_typography.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/global_styling/variables/_z_index.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/themes/eui/eui_colors_dark.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/themes/eui/eui_colors_light.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/@elastic/eui/src/themes/eui/eui_globals.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/css-loader/package.json", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/style-loader/package.json", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/packages/osd-optimizer/postcss.config.js", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/packages/osd-optimizer/target/worker/entry_point_creator.js", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/packages/osd-ui-shared-deps/public_path_module_creator.js", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/plugins/my_plugin_name/common/index.ts", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/plugins/my_plugin_name/components/point_in_time_flyout/index.ts", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/plugins/my_plugin_name/components/point_in_time_flyout/point_in_time_flyout.tsx", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/plugins/my_plugin_name/components/point_in_time_table/index.ts", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/plugins/my_plugin_name/components/point_in_time_table/point_in_time_table.tsx", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/plugins/my_plugin_name/opensearch_dashboards.json", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/plugins/my_plugin_name/public/application.tsx", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/plugins/my_plugin_name/public/components/app.tsx", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/plugins/my_plugin_name/public/index.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/plugins/my_plugin_name/public/index.ts", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/plugins/my_plugin_name/public/management_app/index.tsx", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/plugins/my_plugin_name/public/management_app/mount_management_section.tsx", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/plugins/my_plugin_name/public/plugin.ts", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/plugins/my_plugin_name/public/types.ts", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/src/core/public/core_app/styles/_globals_v7dark.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/src/core/public/core_app/styles/_globals_v7light.scss", + "/Users/abandeji/Public/workplace/OpenSearch-Dashboards/src/core/public/core_app/styles/_mixins.scss" + ] +} \ No newline at end of file diff --git a/plugins/my_plugin_name/target/public/myPluginName.chunk.0.js b/plugins/my_plugin_name/target/public/myPluginName.chunk.0.js new file mode 100644 index 000000000000..255cad8576fa --- /dev/null +++ b/plugins/my_plugin_name/target/public/myPluginName.chunk.0.js @@ -0,0 +1,875 @@ +(window["myPluginName_bundle_jsonpfunction"] = window["myPluginName_bundle_jsonpfunction"] || []).push([[0],{ + +/***/ "./components/point_in_time_flyout/index.ts": +/*!**************************************************!*\ + !*** ./components/point_in_time_flyout/index.ts ***! + \**************************************************/ +/*! exports provided: PointInTimeFlyout */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _point_in_time_flyout__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./point_in_time_flyout */ "./components/point_in_time_flyout/point_in_time_flyout.tsx"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PointInTimeFlyout", function() { return _point_in_time_flyout__WEBPACK_IMPORTED_MODULE_0__["PointInTimeFlyout"]; }); + + + +/***/ }), + +/***/ "./components/point_in_time_flyout/point_in_time_flyout.tsx": +/*!******************************************************************!*\ + !*** ./components/point_in_time_flyout/point_in_time_flyout.tsx ***! + \******************************************************************/ +/*! exports provided: getIndexPatterns, getPits, findByTitle, PointInTimeFlyout */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getIndexPatterns", function() { return getIndexPatterns; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPits", function() { return getPits; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findByTitle", function() { return findByTitle; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PointInTimeFlyout", function() { return PointInTimeFlyout; }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _elastic_eui__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @elastic/eui */ "@elastic/eui"); +/* harmony import */ var _elastic_eui__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _osd_i18n_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @osd/i18n/react */ "@osd/i18n/react"); +/* harmony import */ var _osd_i18n_react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_osd_i18n_react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _src_plugins_opensearch_dashboards_react_public__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../src/plugins/opensearch_dashboards_react/public */ "plugin/opensearchDashboardsReact/public"); +/* harmony import */ var _src_plugins_opensearch_dashboards_react_public__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_src_plugins_opensearch_dashboards_react_public__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common */ "./common/index.ts"); + + + + + +; +; +async function getIndexPatterns(savedObjectsClient) { + return savedObjectsClient.find({ + type: 'index-pattern', + fields: ['title', 'type'], + perPage: 10000 + }).then(response => response.savedObjects.map(pattern => { + const id = pattern.id; + const title = pattern.get('title'); + return { + id, + title, + // the prepending of 0 at the default pattern takes care of prioritization + // so the sorting will but the default index on top + // or on bottom of a the table + sort: `${title}` + }; + }).sort((a, b) => { + if (a.sort < b.sort) { + return -1; + } else if (a.sort > b.sort) { + return 1; + } else { + return 0; + } + })) || []; +} +async function getPits(client, title) { + if (title) { + const savedObjects = await client.find({ + type: 'point-in-time', + perPage: 1000, + fields: ['id'] + }); + return savedObjects.savedObjects; + } +} +async function findByTitle(client, title) { + if (title) { + const savedObjects = await client.find({ + type: 'point-in-time', + perPage: 1000, + fields: ['id'] + }); + return savedObjects.savedObjects.find(obj => obj.attributes.id.toLowerCase() === title.toLowerCase()); + } +} +const PointInTimeFlyout = props => { + const [isFlyoutVisible, setIsFlyoutVisible] = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])(false); + const [showErrors, setShowErrors] = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])(false); + const [keepAlive, setKeepAlive] = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])('24'); + const [checked, setChecked] = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])(false); + const [loading, setLoading] = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])(true); + const [indexPatterns, setIndexPatterns] = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])([]); + const [selectedIndexPattern, setSelectedIndexPattern] = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])(""); + const [pitName, setPitName] = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])(""); + const { + setBreadcrumbs, + savedObjects, + uiSettings, + chrome, + docLinks, + application, + http, + data + } = Object(_src_plugins_opensearch_dashboards_react_public__WEBPACK_IMPORTED_MODULE_3__["useOpenSearchDashboards"])().services; + + const onChange = e => { + setKeepAlive(e.target.value); + }; + + const onDropDownChange = e => { + setSelectedIndexPattern(e.target.value); + }; + + console.log(Object(_src_plugins_opensearch_dashboards_react_public__WEBPACK_IMPORTED_MODULE_3__["useOpenSearchDashboards"])().services); + console.log(savedObjects); + Object(react__WEBPACK_IMPORTED_MODULE_0__["useEffect"])(() => { + (async function () { + const gettedIndexPatterns = await getIndexPatterns(savedObjects.client); + var names = gettedIndexPatterns.map(function (item) { + return item['title']; + }); + setIndexPatterns(gettedIndexPatterns); + setSelectedIndexPattern(gettedIndexPatterns[0].id); + console.log(gettedIndexPatterns); + setLoading(false); + })(); + }, [savedObjects.client]); + + const createPointInTime = async () => { + console.log('keep alive :' + keepAlive); + console.log("name : " + pitName); + console.log("index pattern : " + selectedIndexPattern); + setLoading(true); + const pattern = indexPatterns.find(r => r.id); //setIsFlyoutVisible(false); + + const index = pattern.title; + const response = await http.post(`${_common__WEBPACK_IMPORTED_MODULE_4__["CREATE_POINT_IN_TIME_PATH"]}/${index}`); + const pit = { + name: pitName, + title: pitName, + keepAlive: keepAlive, + id: response.pit_id // Todo create pit and fill the pit id + + }; + const reference = { + id: pattern.id, + type: 'index-pattern', + name: pattern.title + }; + createSavedObject(pit, savedObjects.client, reference, http); + }; + + async function createSavedObject(pointintime, client, reference) { + const dupe = await findByTitle(client, pointintime.id); + console.log(dupe); + + if (dupe) { + throw new Error(`Duplicate Point in time: ${pointintime.id}`); + } // if (dupe) { + // if (override) { + // await this.delete(dupe.id); + // } else { + // throw new DuplicateIndexPatternError(`Duplicate index pattern: ${indexPattern.title}`); + // } + // } + + + const body = pointintime; + const references = [{ ...reference + }]; + const savedObjectType = "point-in-time"; + const response = await client.create(savedObjectType, body, { + id: pointintime.id, + references + }); + console.log(response); + pointintime.id = response.id; + setLoading(false); + setIsFlyoutVisible(false); + props.setIsFlyoutVisible(!props.isFlyoutVisible); + return pointintime; + } // useEffect(() => { + // const gettedIndexPatterns: PointInTimeFlyoutItem[] = getIndexPatterns( + // savedObjects.client + // ); + // console.log(gettedIndexPatterns); + // }); + + + const renderBody = _ref => { + let { + data, + isLoading, + hasPrivilegeToRead + } = _ref; + console.log(savedObjects); + + if (isLoading) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__["EuiFlexGroup"], { + justifyContent: "spaceAround" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__["EuiFlexItem"], { + grow: false + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__["EuiLoadingSpinner"], { + size: "xl" + }))); + } + + if (!hasPrivilegeToRead) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__["EuiCallOut"], { + title: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_osd_i18n_react__WEBPACK_IMPORTED_MODULE_2__["FormattedMessage"], { + id: "telemetry.callout.errorUnprivilegedUserTitle", + defaultMessage: "Error displaying cluster statistics" + }), + color: "danger", + iconType: "cross" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_osd_i18n_react__WEBPACK_IMPORTED_MODULE_2__["FormattedMessage"], { + id: "telemetry.callout.errorUnprivilegedUserDescription", + defaultMessage: "You do not have access to see unencrypted cluster statistics." + })); + } + + if (data === null) { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__["EuiCallOut"], { + title: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_osd_i18n_react__WEBPACK_IMPORTED_MODULE_2__["FormattedMessage"], { + id: "telemetry.callout.errorLoadingClusterStatisticsTitle", + defaultMessage: "Error loading cluster statistics" + }), + color: "danger", + iconType: "cross" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_osd_i18n_react__WEBPACK_IMPORTED_MODULE_2__["FormattedMessage"], { + id: "telemetry.callout.errorLoadingClusterStatisticsDescription", + defaultMessage: "An unexpected error occured while attempting to fetch the cluster statistics. This can occur because OpenSearch failed, OpenSearch Dashboards failed, or there is a network error. Check OpenSearch Dashboards, then reload the page and try again." + })); + } + + const onButtonClick = () => { + setShowErrors(!showErrors); + }; // const button = ( + // + // Toggle errors + // + // ); + + + const onTextChange = e => { + setPitName(e.target.value); + }; + + const onCheckboxChange = e => { + setChecked(e.target.checked); + }; + + const onDropDownChange = e => { + setSelectedIndexPattern(e.target.value); + }; + + let errors; + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__["EuiForm"], { + isInvalid: showErrors, + error: errors, + component: "form" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__["EuiFormRow"], { + isInvalid: showErrors, + fullWidth: true + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__["EuiText"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p", null, "Create point in time search based on existing index pattern"))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__["EuiFormRow"], { + label: "Data source", + isInvalid: showErrors, + fullWidth: true + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__["EuiSelect"], { + fullWidth: true, + options: indexPatterns.map(option => { + return { + text: option.title, + value: option.id + }; + }), + isInvalid: showErrors, + isLoading: loading, + value: selectedIndexPattern, + onChange: onDropDownChange + })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__["EuiFormRow"], { + label: "Custom Point in time name", + isInvalid: showErrors, + fullWidth: true + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__["EuiFieldText"], { + fullWidth: true, + name: "name", + isInvalid: showErrors, + onChange: onTextChange + })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__["EuiFormRow"], { + label: "Expiration in", + isInvalid: showErrors, + fullWidth: true + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__["EuiRange"] // min={100} + , { + max: 24, + step: 0.05, + fullWidth: true, + value: keepAlive, + onChange: onChange, + showLabels: true, + showValue: true, + "aria-label": "An example of EuiRange with showLabels prop" + })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__["EuiFormRow"], { + isInvalid: showErrors, + fullWidth: true + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__["EuiCheckbox"], { + id: "checkbox", + label: "The PIT will be automatically deleted at the expiry time", + checked: checked, + onChange: e => onCheckboxChange(e) + })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__["EuiSpacer"], null))); //return {JSON.stringify(data, null, 2)}; + }; + + let flyout; + + if (isFlyoutVisible) { + flyout = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__["EuiFlyout"], { + ownFocus: true, + onClose: () => setIsFlyoutVisible(false), + size: "m", + paddingSize: "m" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__["EuiFlyoutHeader"], { + hasBorder: true + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__["EuiTitle"], { + size: "m" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("h2", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_osd_i18n_react__WEBPACK_IMPORTED_MODULE_2__["FormattedMessage"], { + id: "savedObjectsManagement.objectsTable.flyout.importSavedObjectTitle", + defaultMessage: "Create point in time" + })))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__["EuiFlyoutBody"], null, renderBody({ + data: "", + isLoading: false, + hasPrivilegeToRead: true + })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__["EuiFlyoutFooter"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__["EuiFlexGroup"], { + justifyContent: "spaceBetween" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__["EuiFlexItem"], { + grow: false + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__["EuiButtonEmpty"], { + iconType: "cross", + onClick: () => setIsFlyoutVisible(false), + flush: "left" + }, "Close")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__["EuiFlexItem"], { + grow: false + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__["EuiButton"], { + onClick: createPointInTime, + fill: true, + isLoading: loading + }, "Save"))))); + } + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_1__["EuiButton"], { + onClick: () => setIsFlyoutVisible(true), + iconType: "plusInCircle", + fill: true + }, "Create point in time"), isFlyoutVisible && flyout); +}; + +function useGeneratedHtmlId(arg0) { + throw new Error('Function not implemented.'); +} + +/***/ }), + +/***/ "./components/point_in_time_table/index.ts": +/*!*************************************************!*\ + !*** ./components/point_in_time_table/index.ts ***! + \*************************************************/ +/*! exports provided: PointInTimeTableWithRouter */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _point_in_time_table__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./point_in_time_table */ "./components/point_in_time_table/point_in_time_table.tsx"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PointInTimeTableWithRouter", function() { return _point_in_time_table__WEBPACK_IMPORTED_MODULE_0__["PointInTimeTableWithRouter"]; }); + + + +/***/ }), + +/***/ "./components/point_in_time_table/point_in_time_table.tsx": +/*!****************************************************************!*\ + !*** ./components/point_in_time_table/point_in_time_table.tsx ***! + \****************************************************************/ +/*! exports provided: getPits, PointInTimeTable, PointInTimeTableWithRouter */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPits", function() { return getPits; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PointInTimeTable", function() { return PointInTimeTable; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PointInTimeTableWithRouter", function() { return PointInTimeTableWithRouter; }); +/* harmony import */ var _elastic_eui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @elastic/eui */ "@elastic/eui"); +/* harmony import */ var _elastic_eui__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_elastic_eui__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _osd_i18n_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @osd/i18n/react */ "@osd/i18n/react"); +/* harmony import */ var _osd_i18n_react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_osd_i18n_react__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-router-dom */ "react-router-dom"); +/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_router_dom__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _osd_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @osd/i18n */ "@osd/i18n"); +/* harmony import */ var _osd_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_osd_i18n__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _src_plugins_opensearch_dashboards_react_public__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../src/plugins/opensearch_dashboards_react/public */ "plugin/opensearchDashboardsReact/public"); +/* harmony import */ var _src_plugins_opensearch_dashboards_react_public__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_src_plugins_opensearch_dashboards_react_public__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var _point_in_time_flyout__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../point_in_time_flyout */ "./components/point_in_time_flyout/index.ts"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! moment */ "moment"); +/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_7__); +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + * Any modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + + + + + + + + +const pagination = { + initialPageSize: 10, + pageSizeOptions: [5, 10, 25, 50] +}; +const sorting = { + sort: { + field: 'title', + direction: 'asc' + } +}; +const ariaRegion = _osd_i18n__WEBPACK_IMPORTED_MODULE_4__["i18n"].translate('indexPatternManagement.editIndexPatternLiveRegionAriaLabel', { + defaultMessage: 'Point in time' +}); +const title = _osd_i18n__WEBPACK_IMPORTED_MODULE_4__["i18n"].translate('indexPatternManagement.indexPatternTable.title', { + defaultMessage: 'Point in time' +}); +const item1 = { + id: 'id1', + title: 'pit1', + default: false, + sort: '0pit1', + keepAlive: "24", + source: "ind-1", + creation: "24", + expiration: "24" +}; +const item2 = { + id: 'id2', + title: 'pit2', + default: false, + sort: '1pit2', + keepAlive: "24", + source: "ind-2", + creation: "24", + expiration: "24" +}; +async function getPits(savedObjects) { + return savedObjects.find({ + type: 'point-in-time', + perPage: 10000 + }).then(response => response.savedObjects.map(pattern => { + console.log(pattern); + const id = pattern.id; + const name = pattern.get('name'); + const keepAlive = pattern.get('keepAlive'); + const source = pattern.references[0].name; + const creation = moment__WEBPACK_IMPORTED_MODULE_7___default()(pattern.updated_at).format("YYYYMMDD HH:mm:ss"); + var date1 = new Date(); + var date2 = new Date(pattern.updated_at); + var diff = new Date(date1.getTime() - date2.getTime()); + console.log(diff); + let expiration = "0"; + if (keepAlive < diff.getUTCHours() + 1) expiration = "Expired";else expiration = (24 - (diff.getUTCHours() + 1)).toString(); + return { + id, + title: name, + // the prepending of 0 at the default pattern takes care of prioritization + // so the sorting will but the default index on top + // or on bottom of a the table + sort: `${name}`, + default: false, + keepAlive: keepAlive, + source: source, + creation: creation, + expiration: expiration + }; + }).sort((a, b) => { + if (a.sort < b.sort) { + return -1; + } else if (a.sort > b.sort) { + return 1; + } else { + return 0; + } + })) || []; +} +const PointInTimeTable = _ref => { + let { + canSave, + history + } = _ref; + const [error, setError] = Object(react__WEBPACK_IMPORTED_MODULE_3__["useState"])(); + const tableRef = Object(react__WEBPACK_IMPORTED_MODULE_3__["useRef"])(); + const [pits, setPits] = Object(react__WEBPACK_IMPORTED_MODULE_3__["useState"])([item1, item2]); + const [selection, setSelection] = Object(react__WEBPACK_IMPORTED_MODULE_3__["useState"])([]); + const [isFlyoutVisible, setIsFlyoutVisible] = Object(react__WEBPACK_IMPORTED_MODULE_3__["useState"])(false); + const { + setBreadcrumbs, + savedObjects, + uiSettings, + chrome, + docLinks, + application, + http, + data + } = Object(_src_plugins_opensearch_dashboards_react_public__WEBPACK_IMPORTED_MODULE_5__["useOpenSearchDashboards"])().services; + Object(react__WEBPACK_IMPORTED_MODULE_3__["useEffect"])(() => { + (async function () { + const pits1 = await getPits(savedObjects.client); + setPits(pits1); + var names = gettedIndexPatterns.map(function (item) { + return item['title']; + }); + setIndexPatterns(gettedIndexPatterns); + console.log(gettedIndexPatterns); + setLoading(false); + })(); + }, [savedObjects.client, isFlyoutVisible]); // const renderToolsLeft = () => { + // if (selection.length === 0) { + // return; + // } + // const onClick = () => { + // //store.deleteUsers(...selection.map((user) => user.id)); + // for(const id of selection) { + // const findIndex = pits.findIndex(a => a.id === id.id) + // findIndex !== -1 && pits.splice(findIndex , 1) + // setPits(pits); + // console.log(id); + // } + // setSelection([]); + // }; + // return ( + // + // Delete {selection.length} point in time searches + // + // ); + // }; + + const renderToolsRight = () => { + const onClick = () => { + //store.deleteUsers(...selection.map((user) => user.id)); + for (const id of selection) { + const findIndex = pits.findIndex(a => a.id === id.id); + findIndex !== -1 && pits.splice(findIndex, 1); + setPits(pits); + console.log(id); + } + + setSelection([]); + }; + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_0__["EuiButton"], { + color: "danger", + iconType: "trash", + onClick: onClick, + isDisabled: selection.length === 0 + }, "Delete"); // return [ + // { + // //loadUsers(); + // }} + // isDisabled={selection.length === 0} + // > + // Load Users + // , + // { + // //loadUsersWithError(); + // }} + // isDisabled={false} + // > + // Load Users (Error) + // , + // ]; + }; + + const search = { + toolsRight: renderToolsRight(), + box: { + incremental: true, + schema: { + fields: { + title: { + type: 'string' + } + } + } + } + }; + const selectionValue = { + selectable: () => true, + selectableMessage: selectable => !selectable ? 'User is currently offline' : undefined, + onSelectionChange: selection => setSelection(selection), + initialSelected: [] + }; // const { + // savedObjects, + // uiSettings, + // chrome, + // docLinks, + // application, + // http, + // data, + // } = useOpenSearchDashboards().services; + // useEffect(() => { + // }, []); + // const loadSources = () => { + // }; + // useEffect(() => { + // }, []); + + const columns = [{ + field: 'title', + name: 'Name', + render: (title, object) => { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement("span", null, object.title); + }, + dataType: 'string', + sortable: _ref2 => { + let { + sort + } = _ref2; + return sort; + } + }, { + field: 'source', + name: 'Source', + render: (title, object) => { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement("span", null, object.source); + }, + dataType: 'string' + }, { + field: 'keepalive', + name: 'Keep alive', + render: (title, object) => { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement("span", null, object.keepAlive); + }, + dataType: 'string' + }, { + field: 'creation', + name: 'Created at', + render: (title, object) => { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement("span", null, object.creation); + }, + dataType: 'string' + }, { + field: 'expiration', + name: 'Expiration in', + render: (title, object) => { + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement("span", null, object.expiration); + }, + dataType: 'string' + }]; // return ( + // + // + // + // + //

{title}

+ //
+ // + // + //

+ // + //

+ //
+ //
+ // + //
+ // + // + //
+ // ); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_0__["EuiPageContent"], { + "data-test-subj": "pointInTimeTable", + role: "region", + "aria-label": ariaRegion + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_0__["EuiFlexGroup"], { + justifyContent: "spaceBetween" + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_0__["EuiFlexItem"], { + grow: false + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_0__["EuiTitle"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement("h2", null, title)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_0__["EuiSpacer"], { + size: "s" + }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_0__["EuiText"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement("p", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(_osd_i18n_react__WEBPACK_IMPORTED_MODULE_1__["FormattedMessage"], { + id: "indexPatternManagement.indexPatternTable.indexPatternExplanation", + defaultMessage: "Create and manage the point in time searches that help you retrieve your data from OpenSearch." + })))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_0__["EuiFlexItem"], { + grow: false + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(_point_in_time_flyout__WEBPACK_IMPORTED_MODULE_6__["PointInTimeFlyout"], { + setIsFlyoutVisible: setIsFlyoutVisible, + isFlyoutVisible: isFlyoutVisible + }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_0__["EuiSpacer"], null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(_elastic_eui__WEBPACK_IMPORTED_MODULE_0__["EuiInMemoryTable"], { + allowNeutralSort: false, + itemId: "id", + isSelectable: true, + items: pits, + columns: columns, + pagination: pagination, + sorting: sorting, + search: search, + selection: selectionValue + })); +}; +const PointInTimeTableWithRouter = Object(react_router_dom__WEBPACK_IMPORTED_MODULE_2__["withRouter"])(PointInTimeTable); + +/***/ }), + +/***/ "./public/components/app.tsx": +/*!***********************************!*\ + !*** ./public/components/app.tsx ***! + \***********************************/ +/*! exports provided: MyPluginNameApp */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MyPluginNameApp", function() { return MyPluginNameApp; }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _osd_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @osd/i18n */ "@osd/i18n"); +/* harmony import */ var _osd_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_osd_i18n__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _osd_i18n_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @osd/i18n/react */ "@osd/i18n/react"); +/* harmony import */ var _osd_i18n_react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_osd_i18n_react__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-router-dom */ "react-router-dom"); +/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_router_dom__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _components_point_in_time_table__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../components/point_in_time_table */ "./components/point_in_time_table/index.ts"); +/* harmony import */ var _src_plugins_opensearch_dashboards_react_public__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../src/plugins/opensearch_dashboards_react/public */ "plugin/opensearchDashboardsReact/public"); +/* harmony import */ var _src_plugins_opensearch_dashboards_react_public__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_src_plugins_opensearch_dashboards_react_public__WEBPACK_IMPORTED_MODULE_5__); + + + + + + +const MyPluginNameApp = _ref => { + let { + basename, + notifications, + http, + navigation, + savedObjects, + data + } = _ref; + // Use React hooks to manage state. + const [timestamp, setTimestamp] = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])(); + + const onClickHandler = () => { + // Use the core http service to make a response to the server API. + http.get('/api/my_plugin_name/example').then(res => { + setTimestamp(res.time); // Use the core notifications service to display a success message. + + notifications.toasts.addSuccess(_osd_i18n__WEBPACK_IMPORTED_MODULE_1__["i18n"].translate('myPluginName.dataUpdated', { + defaultMessage: 'Data updated' + })); + }); + }; + + const deps = { + savedObjects, + notifications, + http, + data + }; // Render the application DOM. + // Note that `navigation.ui.TopNavMenu` is a stateful component exported on the `navigation` plugin's start contract. + // return ( + // + // + // <> + // + // + // + // + // + //

+ // + //

+ //
+ //
+ // + // + // + //

+ // + //

+ //
+ //
+ // + // + //

+ // + //

+ // + //

+ // + //

+ // + // + // + //
+ //
+ //
+ //
+ //
+ // + //
+ //
+ // ); + + return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_3__["BrowserRouter"], { + basename: basename + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_src_plugins_opensearch_dashboards_react_public__WEBPACK_IMPORTED_MODULE_5__["OpenSearchDashboardsContextProvider"], { + services: deps + }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_osd_i18n_react__WEBPACK_IMPORTED_MODULE_2__["I18nProvider"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_components_point_in_time_table__WEBPACK_IMPORTED_MODULE_4__["PointInTimeTableWithRouter"], { + canSave: true + }))))); +}; + +/***/ }) + +}]); +//# sourceMappingURL=myPluginName.chunk.0.js.map \ No newline at end of file diff --git a/plugins/my_plugin_name/target/public/myPluginName.chunk.0.js.map b/plugins/my_plugin_name/target/public/myPluginName.chunk.0.js.map new file mode 100644 index 000000000000..986578a6e863 --- /dev/null +++ b/plugins/my_plugin_name/target/public/myPluginName.chunk.0.js.map @@ -0,0 +1 @@ +{"version":3,"file":"myPluginName.chunk.0.js","sources":["/plugin:myPluginName/plugins/my_plugin_name/components/point_in_time_flyout/index.ts","/plugin:myPluginName/plugins/my_plugin_name/components/point_in_time_flyout/point_in_time_flyout.tsx","/plugin:myPluginName/plugins/my_plugin_name/components/point_in_time_table/index.ts","/plugin:myPluginName/plugins/my_plugin_name/components/point_in_time_table/point_in_time_table.tsx","/plugin:myPluginName/plugins/my_plugin_name/public/components/app.tsx"],"sourcesContent":["export { PointInTimeFlyout } from './point_in_time_flyout';","import React, { Fragment, useEffect, useState } from 'react';\nimport { EuiFlyout, EuiFlyoutBody, EuiFlyoutFooter, EuiFlyoutHeader, EuiButtonEmpty, EuiButton, EuiText, EuiTitle, EuiForm, EuiFormRow, EuiSelect, EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner, EuiCallOut, EuiSpacer, EuiFieldText, EuiRange, EuiCheckbox } from '@elastic/eui';\nimport { FormattedMessage } from '@osd/i18n/react';\nimport { useOpenSearchDashboards } from '../../../../src/plugins/opensearch_dashboards_react/public';\nimport { CREATE_POINT_IN_TIME_PATH } from \"../../common\";\n;\n;\nexport async function getIndexPatterns(savedObjectsClient) {\n return savedObjectsClient.find({\n type: 'index-pattern',\n fields: ['title', 'type'],\n perPage: 10000\n }).then(response => response.savedObjects.map(pattern => {\n const id = pattern.id;\n const title = pattern.get('title');\n return {\n id,\n title,\n // the prepending of 0 at the default pattern takes care of prioritization\n // so the sorting will but the default index on top\n // or on bottom of a the table\n sort: `${title}`\n };\n }).sort((a, b) => {\n if (a.sort < b.sort) {\n return -1;\n } else if (a.sort > b.sort) {\n return 1;\n } else {\n return 0;\n }\n })) || [];\n}\nexport async function getPits(client, title) {\n if (title) {\n const savedObjects = await client.find({\n type: 'point-in-time',\n perPage: 1000,\n fields: ['id']\n });\n return savedObjects.savedObjects;\n }\n}\nexport async function findByTitle(client, title) {\n if (title) {\n const savedObjects = await client.find({\n type: 'point-in-time',\n perPage: 1000,\n fields: ['id']\n });\n return savedObjects.savedObjects.find(obj => obj.attributes.id.toLowerCase() === title.toLowerCase());\n }\n}\nexport const PointInTimeFlyout = props => {\n const [isFlyoutVisible, setIsFlyoutVisible] = useState(false);\n const [showErrors, setShowErrors] = useState(false);\n const [keepAlive, setKeepAlive] = useState('24');\n const [checked, setChecked] = useState(false);\n const [loading, setLoading] = useState(true);\n const [indexPatterns, setIndexPatterns] = useState([]);\n const [selectedIndexPattern, setSelectedIndexPattern] = useState(\"\");\n const [pitName, setPitName] = useState(\"\");\n const {\n setBreadcrumbs,\n savedObjects,\n uiSettings,\n chrome,\n docLinks,\n application,\n http,\n data\n } = useOpenSearchDashboards().services;\n\n const onChange = e => {\n setKeepAlive(e.target.value);\n };\n\n const onDropDownChange = e => {\n setSelectedIndexPattern(e.target.value);\n };\n\n console.log(useOpenSearchDashboards().services);\n console.log(savedObjects);\n useEffect(() => {\n (async function () {\n const gettedIndexPatterns = await getIndexPatterns(savedObjects.client);\n var names = gettedIndexPatterns.map(function (item) {\n return item['title'];\n });\n setIndexPatterns(gettedIndexPatterns);\n setSelectedIndexPattern(gettedIndexPatterns[0].id);\n console.log(gettedIndexPatterns);\n setLoading(false);\n })();\n }, [savedObjects.client]);\n\n const createPointInTime = async () => {\n console.log('keep alive :' + keepAlive);\n console.log(\"name : \" + pitName);\n console.log(\"index pattern : \" + selectedIndexPattern);\n setLoading(true);\n const pattern = indexPatterns.find(r => r.id); //setIsFlyoutVisible(false);\n\n const index = pattern.title;\n const response = await http.post(`${CREATE_POINT_IN_TIME_PATH}/${index}`);\n const pit = {\n name: pitName,\n title: pitName,\n keepAlive: keepAlive,\n id: response.pit_id // Todo create pit and fill the pit id\n\n };\n const reference = {\n id: pattern.id,\n type: 'index-pattern',\n name: pattern.title\n };\n createSavedObject(pit, savedObjects.client, reference, http);\n };\n\n async function createSavedObject(pointintime, client, reference) {\n const dupe = await findByTitle(client, pointintime.id);\n console.log(dupe);\n\n if (dupe) {\n throw new Error(`Duplicate Point in time: ${pointintime.id}`);\n } // if (dupe) {\n // if (override) {\n // await this.delete(dupe.id);\n // } else {\n // throw new DuplicateIndexPatternError(`Duplicate index pattern: ${indexPattern.title}`);\n // }\n // }\n\n\n const body = pointintime;\n const references = [{ ...reference\n }];\n const savedObjectType = \"point-in-time\";\n const response = await client.create(savedObjectType, body, {\n id: pointintime.id,\n references\n });\n console.log(response);\n pointintime.id = response.id;\n setLoading(false);\n setIsFlyoutVisible(false);\n props.setIsFlyoutVisible(!props.isFlyoutVisible);\n return pointintime;\n } // useEffect(() => {\n // const gettedIndexPatterns: PointInTimeFlyoutItem[] = getIndexPatterns(\n // savedObjects.client\n // );\n // console.log(gettedIndexPatterns);\n // });\n\n\n const renderBody = _ref => {\n let {\n data,\n isLoading,\n hasPrivilegeToRead\n } = _ref;\n console.log(savedObjects);\n\n if (isLoading) {\n return /*#__PURE__*/React.createElement(EuiFlexGroup, {\n justifyContent: \"spaceAround\"\n }, /*#__PURE__*/React.createElement(EuiFlexItem, {\n grow: false\n }, /*#__PURE__*/React.createElement(EuiLoadingSpinner, {\n size: \"xl\"\n })));\n }\n\n if (!hasPrivilegeToRead) {\n return /*#__PURE__*/React.createElement(EuiCallOut, {\n title: /*#__PURE__*/React.createElement(FormattedMessage, {\n id: \"telemetry.callout.errorUnprivilegedUserTitle\",\n defaultMessage: \"Error displaying cluster statistics\"\n }),\n color: \"danger\",\n iconType: \"cross\"\n }, /*#__PURE__*/React.createElement(FormattedMessage, {\n id: \"telemetry.callout.errorUnprivilegedUserDescription\",\n defaultMessage: \"You do not have access to see unencrypted cluster statistics.\"\n }));\n }\n\n if (data === null) {\n return /*#__PURE__*/React.createElement(EuiCallOut, {\n title: /*#__PURE__*/React.createElement(FormattedMessage, {\n id: \"telemetry.callout.errorLoadingClusterStatisticsTitle\",\n defaultMessage: \"Error loading cluster statistics\"\n }),\n color: \"danger\",\n iconType: \"cross\"\n }, /*#__PURE__*/React.createElement(FormattedMessage, {\n id: \"telemetry.callout.errorLoadingClusterStatisticsDescription\",\n defaultMessage: \"An unexpected error occured while attempting to fetch the cluster statistics. This can occur because OpenSearch failed, OpenSearch Dashboards failed, or there is a network error. Check OpenSearch Dashboards, then reload the page and try again.\"\n }));\n }\n\n const onButtonClick = () => {\n setShowErrors(!showErrors);\n }; // const button = (\n // \n // Toggle errors\n // \n // );\n\n\n const onTextChange = e => {\n setPitName(e.target.value);\n };\n\n const onCheckboxChange = e => {\n setChecked(e.target.checked);\n };\n\n const onDropDownChange = e => {\n setSelectedIndexPattern(e.target.value);\n };\n\n let errors;\n return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(EuiForm, {\n isInvalid: showErrors,\n error: errors,\n component: \"form\"\n }, /*#__PURE__*/React.createElement(EuiFormRow, {\n isInvalid: showErrors,\n fullWidth: true\n }, /*#__PURE__*/React.createElement(EuiText, null, /*#__PURE__*/React.createElement(\"p\", null, \"Create point in time search based on existing index pattern\"))), /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Data source\",\n isInvalid: showErrors,\n fullWidth: true\n }, /*#__PURE__*/React.createElement(EuiSelect, {\n fullWidth: true,\n options: indexPatterns.map(option => {\n return {\n text: option.title,\n value: option.id\n };\n }),\n isInvalid: showErrors,\n isLoading: loading,\n value: selectedIndexPattern,\n onChange: onDropDownChange\n })), /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Custom Point in time name\",\n isInvalid: showErrors,\n fullWidth: true\n }, /*#__PURE__*/React.createElement(EuiFieldText, {\n fullWidth: true,\n name: \"name\",\n isInvalid: showErrors,\n onChange: onTextChange\n })), /*#__PURE__*/React.createElement(EuiFormRow, {\n label: \"Expiration in\",\n isInvalid: showErrors,\n fullWidth: true\n }, /*#__PURE__*/React.createElement(EuiRange // min={100}\n , {\n max: 24,\n step: 0.05,\n fullWidth: true,\n value: keepAlive,\n onChange: onChange,\n showLabels: true,\n showValue: true,\n \"aria-label\": \"An example of EuiRange with showLabels prop\"\n })), /*#__PURE__*/React.createElement(EuiFormRow, {\n isInvalid: showErrors,\n fullWidth: true\n }, /*#__PURE__*/React.createElement(EuiCheckbox, {\n id: \"checkbox\",\n label: \"The PIT will be automatically deleted at the expiry time\",\n checked: checked,\n onChange: e => onCheckboxChange(e)\n })), /*#__PURE__*/React.createElement(EuiSpacer, null))); //return {JSON.stringify(data, null, 2)};\n };\n\n let flyout;\n\n if (isFlyoutVisible) {\n flyout = /*#__PURE__*/React.createElement(EuiFlyout, {\n ownFocus: true,\n onClose: () => setIsFlyoutVisible(false),\n size: \"m\",\n paddingSize: \"m\"\n }, /*#__PURE__*/React.createElement(EuiFlyoutHeader, {\n hasBorder: true\n }, /*#__PURE__*/React.createElement(EuiTitle, {\n size: \"m\"\n }, /*#__PURE__*/React.createElement(\"h2\", null, /*#__PURE__*/React.createElement(FormattedMessage, {\n id: \"savedObjectsManagement.objectsTable.flyout.importSavedObjectTitle\",\n defaultMessage: \"Create point in time\"\n })))), /*#__PURE__*/React.createElement(EuiFlyoutBody, null, renderBody({\n data: \"\",\n isLoading: false,\n hasPrivilegeToRead: true\n })), /*#__PURE__*/React.createElement(EuiFlyoutFooter, null, /*#__PURE__*/React.createElement(EuiFlexGroup, {\n justifyContent: \"spaceBetween\"\n }, /*#__PURE__*/React.createElement(EuiFlexItem, {\n grow: false\n }, /*#__PURE__*/React.createElement(EuiButtonEmpty, {\n iconType: \"cross\",\n onClick: () => setIsFlyoutVisible(false),\n flush: \"left\"\n }, \"Close\")), /*#__PURE__*/React.createElement(EuiFlexItem, {\n grow: false\n }, /*#__PURE__*/React.createElement(EuiButton, {\n onClick: createPointInTime,\n fill: true,\n isLoading: loading\n }, \"Save\")))));\n }\n\n return /*#__PURE__*/React.createElement(\"div\", null, /*#__PURE__*/React.createElement(EuiButton, {\n onClick: () => setIsFlyoutVisible(true),\n iconType: \"plusInCircle\",\n fill: true\n }, \"Create point in time\"), isFlyoutVisible && flyout);\n};\n\nfunction useGeneratedHtmlId(arg0) {\n throw new Error('Function not implemented.');\n}","export { PointInTimeTableWithRouter } from './point_in_time_table';","/*\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Any modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\nimport { EuiFlexGroup, EuiFlexItem, EuiInMemoryTable, EuiSpacer, EuiText, EuiPageContent, EuiTitle, EuiButton } from '@elastic/eui';\nimport { FormattedMessage } from '@osd/i18n/react';\nimport { withRouter } from 'react-router-dom';\nimport React, { useState, useEffect, useRef } from 'react';\nimport { i18n } from '@osd/i18n';\nimport { useOpenSearchDashboards } from '../../../../src/plugins/opensearch_dashboards_react/public';\nimport { PointInTimeFlyout } from '../point_in_time_flyout';\nimport moment from 'moment';\nconst pagination = {\n initialPageSize: 10,\n pageSizeOptions: [5, 10, 25, 50]\n};\nconst sorting = {\n sort: {\n field: 'title',\n direction: 'asc'\n }\n};\nconst ariaRegion = i18n.translate('indexPatternManagement.editIndexPatternLiveRegionAriaLabel', {\n defaultMessage: 'Point in time'\n});\nconst title = i18n.translate('indexPatternManagement.indexPatternTable.title', {\n defaultMessage: 'Point in time'\n});\nconst item1 = {\n id: 'id1',\n title: 'pit1',\n default: false,\n sort: '0pit1',\n keepAlive: \"24\",\n source: \"ind-1\",\n creation: \"24\",\n expiration: \"24\"\n};\nconst item2 = {\n id: 'id2',\n title: 'pit2',\n default: false,\n sort: '1pit2',\n keepAlive: \"24\",\n source: \"ind-2\",\n creation: \"24\",\n expiration: \"24\"\n};\nexport async function getPits(savedObjects) {\n return savedObjects.find({\n type: 'point-in-time',\n perPage: 10000\n }).then(response => response.savedObjects.map(pattern => {\n console.log(pattern);\n const id = pattern.id;\n const name = pattern.get('name');\n const keepAlive = pattern.get('keepAlive');\n const source = pattern.references[0].name;\n const creation = moment(pattern.updated_at).format(\"YYYYMMDD HH:mm:ss\");\n var date1 = new Date();\n var date2 = new Date(pattern.updated_at);\n var diff = new Date(date1.getTime() - date2.getTime());\n console.log(diff);\n let expiration = \"0\";\n if (keepAlive < diff.getUTCHours() + 1) expiration = \"Expired\";else expiration = (24 - (diff.getUTCHours() + 1)).toString();\n return {\n id,\n title: name,\n // the prepending of 0 at the default pattern takes care of prioritization\n // so the sorting will but the default index on top\n // or on bottom of a the table\n sort: `${name}`,\n default: false,\n keepAlive: keepAlive,\n source: source,\n creation: creation,\n expiration: expiration\n };\n }).sort((a, b) => {\n if (a.sort < b.sort) {\n return -1;\n } else if (a.sort > b.sort) {\n return 1;\n } else {\n return 0;\n }\n })) || [];\n}\nexport const PointInTimeTable = _ref => {\n let {\n canSave,\n history\n } = _ref;\n const [error, setError] = useState();\n const tableRef = useRef();\n const [pits, setPits] = useState([item1, item2]);\n const [selection, setSelection] = useState([]);\n const [isFlyoutVisible, setIsFlyoutVisible] = useState(false);\n const {\n setBreadcrumbs,\n savedObjects,\n uiSettings,\n chrome,\n docLinks,\n application,\n http,\n data\n } = useOpenSearchDashboards().services;\n useEffect(() => {\n (async function () {\n const pits1 = await getPits(savedObjects.client);\n setPits(pits1);\n var names = gettedIndexPatterns.map(function (item) {\n return item['title'];\n });\n setIndexPatterns(gettedIndexPatterns);\n console.log(gettedIndexPatterns);\n setLoading(false);\n })();\n }, [savedObjects.client, isFlyoutVisible]); // const renderToolsLeft = () => {\n // if (selection.length === 0) {\n // return;\n // }\n // const onClick = () => {\n // //store.deleteUsers(...selection.map((user) => user.id));\n // for(const id of selection) {\n // const findIndex = pits.findIndex(a => a.id === id.id)\n // findIndex !== -1 && pits.splice(findIndex , 1)\n // setPits(pits);\n // console.log(id);\n // }\n // setSelection([]);\n // };\n // return (\n // \n // Delete {selection.length} point in time searches\n // \n // );\n // };\n\n const renderToolsRight = () => {\n const onClick = () => {\n //store.deleteUsers(...selection.map((user) => user.id));\n for (const id of selection) {\n const findIndex = pits.findIndex(a => a.id === id.id);\n findIndex !== -1 && pits.splice(findIndex, 1);\n setPits(pits);\n console.log(id);\n }\n\n setSelection([]);\n };\n\n return /*#__PURE__*/React.createElement(EuiButton, {\n color: \"danger\",\n iconType: \"trash\",\n onClick: onClick,\n isDisabled: selection.length === 0\n }, \"Delete\"); // return [\n // {\n // //loadUsers();\n // }}\n // isDisabled={selection.length === 0}\n // >\n // Load Users\n // ,\n // {\n // //loadUsersWithError();\n // }}\n // isDisabled={false}\n // >\n // Load Users (Error)\n // ,\n // ];\n };\n\n const search = {\n toolsRight: renderToolsRight(),\n box: {\n incremental: true,\n schema: {\n fields: {\n title: {\n type: 'string'\n }\n }\n }\n }\n };\n const selectionValue = {\n selectable: () => true,\n selectableMessage: selectable => !selectable ? 'User is currently offline' : undefined,\n onSelectionChange: selection => setSelection(selection),\n initialSelected: []\n }; // const {\n // savedObjects,\n // uiSettings,\n // chrome,\n // docLinks,\n // application,\n // http,\n // data,\n // } = useOpenSearchDashboards().services;\n // useEffect(() => {\n // }, []);\n // const loadSources = () => {\n // };\n // useEffect(() => {\n // }, []);\n\n const columns = [{\n field: 'title',\n name: 'Name',\n render: (title, object) => {\n return /*#__PURE__*/React.createElement(\"span\", null, object.title);\n },\n dataType: 'string',\n sortable: _ref2 => {\n let {\n sort\n } = _ref2;\n return sort;\n }\n }, {\n field: 'source',\n name: 'Source',\n render: (title, object) => {\n return /*#__PURE__*/React.createElement(\"span\", null, object.source);\n },\n dataType: 'string'\n }, {\n field: 'keepalive',\n name: 'Keep alive',\n render: (title, object) => {\n return /*#__PURE__*/React.createElement(\"span\", null, object.keepAlive);\n },\n dataType: 'string'\n }, {\n field: 'creation',\n name: 'Created at',\n render: (title, object) => {\n return /*#__PURE__*/React.createElement(\"span\", null, object.creation);\n },\n dataType: 'string'\n }, {\n field: 'expiration',\n name: 'Expiration in',\n render: (title, object) => {\n return /*#__PURE__*/React.createElement(\"span\", null, object.expiration);\n },\n dataType: 'string'\n }]; // return (\n // \n // \n // \n // \n //

{title}

\n //
\n // \n // \n //

\n // \n //

\n //
\n //
\n // \n //
\n // \n // \n //
\n // );\n\n return /*#__PURE__*/React.createElement(EuiPageContent, {\n \"data-test-subj\": \"pointInTimeTable\",\n role: \"region\",\n \"aria-label\": ariaRegion\n }, /*#__PURE__*/React.createElement(EuiFlexGroup, {\n justifyContent: \"spaceBetween\"\n }, /*#__PURE__*/React.createElement(EuiFlexItem, {\n grow: false\n }, /*#__PURE__*/React.createElement(EuiTitle, null, /*#__PURE__*/React.createElement(\"h2\", null, title)), /*#__PURE__*/React.createElement(EuiSpacer, {\n size: \"s\"\n }), /*#__PURE__*/React.createElement(EuiText, null, /*#__PURE__*/React.createElement(\"p\", null, /*#__PURE__*/React.createElement(FormattedMessage, {\n id: \"indexPatternManagement.indexPatternTable.indexPatternExplanation\",\n defaultMessage: \"Create and manage the point in time searches that help you retrieve your data from OpenSearch.\"\n })))), /*#__PURE__*/React.createElement(EuiFlexItem, {\n grow: false\n }, /*#__PURE__*/React.createElement(PointInTimeFlyout, {\n setIsFlyoutVisible: setIsFlyoutVisible,\n isFlyoutVisible: isFlyoutVisible\n }))), /*#__PURE__*/React.createElement(EuiSpacer, null), /*#__PURE__*/React.createElement(EuiInMemoryTable, {\n allowNeutralSort: false,\n itemId: \"id\",\n isSelectable: true,\n items: pits,\n columns: columns,\n pagination: pagination,\n sorting: sorting,\n search: search,\n selection: selectionValue\n }));\n};\nexport const PointInTimeTableWithRouter = withRouter(PointInTimeTable);","import React, { useState } from 'react';\nimport { i18n } from '@osd/i18n';\nimport { I18nProvider } from '@osd/i18n/react';\nimport { BrowserRouter as Router } from 'react-router-dom';\nimport { PointInTimeTableWithRouter } from '../../components/point_in_time_table';\nimport { OpenSearchDashboardsContextProvider } from '../../../../src/plugins/opensearch_dashboards_react/public';\nexport const MyPluginNameApp = _ref => {\n let {\n basename,\n notifications,\n http,\n navigation,\n savedObjects,\n data\n } = _ref;\n // Use React hooks to manage state.\n const [timestamp, setTimestamp] = useState();\n\n const onClickHandler = () => {\n // Use the core http service to make a response to the server API.\n http.get('/api/my_plugin_name/example').then(res => {\n setTimestamp(res.time); // Use the core notifications service to display a success message.\n\n notifications.toasts.addSuccess(i18n.translate('myPluginName.dataUpdated', {\n defaultMessage: 'Data updated'\n }));\n });\n };\n\n const deps = {\n savedObjects,\n notifications,\n http,\n data\n }; // Render the application DOM.\n // Note that `navigation.ui.TopNavMenu` is a stateful component exported on the `navigation` plugin's start contract.\n // return (\n // \n // \n // <>\n // \n // \n // \n // \n // \n //

\n // \n //

\n //
\n //
\n // \n // \n // \n //

\n // \n //

\n //
\n //
\n // \n // \n //

\n // \n //

\n // \n //

\n // \n //

\n // \n // \n // \n //
\n //
\n //
\n //
\n //
\n // \n //
\n //
\n // );\n\n return /*#__PURE__*/React.createElement(Router, {\n basename: basename\n }, /*#__PURE__*/React.createElement(OpenSearchDashboardsContextProvider, {\n services: deps\n }, /*#__PURE__*/React.createElement(I18nProvider, null, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(PointInTimeTableWithRouter, {\n canSave: true\n })))));\n};"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvUA;AAAA;AAAA;AAAA;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrUA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;A","sourceRoot":""} \ No newline at end of file diff --git a/plugins/my_plugin_name/target/public/myPluginName.chunk.1.js b/plugins/my_plugin_name/target/public/myPluginName.chunk.1.js new file mode 100644 index 000000000000..06437d711910 --- /dev/null +++ b/plugins/my_plugin_name/target/public/myPluginName.chunk.1.js @@ -0,0 +1,125 @@ +(window["myPluginName_bundle_jsonpfunction"] = window["myPluginName_bundle_jsonpfunction"] || []).push([[1],{ + +/***/ "./public/management_app/index.tsx": +/*!*****************************************!*\ + !*** ./public/management_app/index.tsx ***! + \*****************************************/ +/*! exports provided: mountManagementSection */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _mount_management_section__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mount_management_section */ "./public/management_app/mount_management_section.tsx"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mountManagementSection", function() { return _mount_management_section__WEBPACK_IMPORTED_MODULE_0__["mountManagementSection"]; }); + +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + * Any modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + + +/***/ }), + +/***/ "./public/management_app/mount_management_section.tsx": +/*!************************************************************!*\ + !*** ./public/management_app/mount_management_section.tsx ***! + \************************************************************/ +/*! exports provided: mountManagementSection */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mountManagementSection", function() { return mountManagementSection; }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ "react-dom"); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _components_app__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../components/app */ "./public/components/app.tsx"); +/* + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + * Any modifications Copyright OpenSearch Contributors. See + * GitHub history for details. + */ + +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + + + +const mountManagementSection = async (_ref, _ref2, _ref3) => { + let { + notifications, + http, + savedObjects + } = _ref; + let { + navigation, + data + } = _ref2; + let { + basePath, + element + } = _ref3; + react_dom__WEBPACK_IMPORTED_MODULE_1___default.a.render( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_components_app__WEBPACK_IMPORTED_MODULE_2__["MyPluginNameApp"], { + basename: basePath, + notifications: notifications, + http: http, + navigation: navigation, + savedObjects: savedObjects, + data: data + }), element); + return () => { + react_dom__WEBPACK_IMPORTED_MODULE_1___default.a.unmountComponentAtNode(element); + }; +}; + +/***/ }) + +}]); +//# sourceMappingURL=myPluginName.chunk.1.js.map \ No newline at end of file diff --git a/plugins/my_plugin_name/target/public/myPluginName.chunk.1.js.map b/plugins/my_plugin_name/target/public/myPluginName.chunk.1.js.map new file mode 100644 index 000000000000..72e0592ee138 --- /dev/null +++ b/plugins/my_plugin_name/target/public/myPluginName.chunk.1.js.map @@ -0,0 +1 @@ +{"version":3,"file":"myPluginName.chunk.1.js","sources":["/plugin:myPluginName/plugins/my_plugin_name/public/management_app/index.tsx","/plugin:myPluginName/plugins/my_plugin_name/public/management_app/mount_management_section.tsx"],"sourcesContent":["/*\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Any modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n/*\n * Licensed to Elasticsearch B.V. under one or more contributor\n * license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright\n * ownership. Elasticsearch B.V. licenses this file to you under\n * the Apache License, Version 2.0 (the \"License\"); you may\n * not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nexport { mountManagementSection } from './mount_management_section';","/*\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Any modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */\n\n/*\n * Licensed to Elasticsearch B.V. under one or more contributor\n * license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright\n * ownership. Elasticsearch B.V. licenses this file to you under\n * the Apache License, Version 2.0 (the \"License\"); you may\n * not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { MyPluginNameApp } from '../components/app';\nexport const mountManagementSection = async (_ref, _ref2, _ref3) => {\n let {\n notifications,\n http,\n savedObjects\n } = _ref;\n let {\n navigation,\n data\n } = _ref2;\n let {\n basePath,\n element\n } = _ref3;\n ReactDOM.render( /*#__PURE__*/React.createElement(MyPluginNameApp, {\n basename: basePath,\n notifications: notifications,\n http: http,\n navigation: navigation,\n savedObjects: savedObjects,\n data: data\n }), element);\n return () => {\n ReactDOM.unmountComponentAtNode(element);\n };\n};"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC5BA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;A","sourceRoot":""} \ No newline at end of file diff --git a/plugins/my_plugin_name/target/public/myPluginName.chunk.2.js b/plugins/my_plugin_name/target/public/myPluginName.chunk.2.js new file mode 100644 index 000000000000..6ee9dc7a6e92 --- /dev/null +++ b/plugins/my_plugin_name/target/public/myPluginName.chunk.2.js @@ -0,0 +1,45 @@ +(window["myPluginName_bundle_jsonpfunction"] = window["myPluginName_bundle_jsonpfunction"] || []).push([[2],{ + +/***/ "./public/application.tsx": +/*!********************************!*\ + !*** ./public/application.tsx ***! + \********************************/ +/*! exports provided: renderApp */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "renderApp", function() { return renderApp; }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ "react-dom"); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _components_app__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components/app */ "./public/components/app.tsx"); + + + +const renderApp = (_ref, _ref2, _ref3) => { + let { + notifications, + http + } = _ref; + let { + navigation + } = _ref2; + let { + appBasePath, + element + } = _ref3; + react_dom__WEBPACK_IMPORTED_MODULE_1___default.a.render( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_components_app__WEBPACK_IMPORTED_MODULE_2__["MyPluginNameApp"], { + basename: appBasePath, + notifications: notifications, + http: http, + navigation: navigation + }), element); + return () => react_dom__WEBPACK_IMPORTED_MODULE_1___default.a.unmountComponentAtNode(element); +}; + +/***/ }) + +}]); +//# sourceMappingURL=myPluginName.chunk.2.js.map \ No newline at end of file diff --git a/plugins/my_plugin_name/target/public/myPluginName.chunk.2.js.map b/plugins/my_plugin_name/target/public/myPluginName.chunk.2.js.map new file mode 100644 index 000000000000..54fd46b2acea --- /dev/null +++ b/plugins/my_plugin_name/target/public/myPluginName.chunk.2.js.map @@ -0,0 +1 @@ +{"version":3,"file":"myPluginName.chunk.2.js","sources":["/plugin:myPluginName/plugins/my_plugin_name/public/application.tsx"],"sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { MyPluginNameApp } from './components/app';\nexport const renderApp = (_ref, _ref2, _ref3) => {\n let {\n notifications,\n http\n } = _ref;\n let {\n navigation\n } = _ref2;\n let {\n appBasePath,\n element\n } = _ref3;\n ReactDOM.render( /*#__PURE__*/React.createElement(MyPluginNameApp, {\n basename: appBasePath,\n notifications: notifications,\n http: http,\n navigation: navigation\n }), element);\n return () => ReactDOM.unmountComponentAtNode(element);\n};"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;A","sourceRoot":""} \ No newline at end of file diff --git a/plugins/my_plugin_name/target/public/myPluginName.plugin.js b/plugins/my_plugin_name/target/public/myPluginName.plugin.js new file mode 100644 index 000000000000..304252942f4e --- /dev/null +++ b/plugins/my_plugin_name/target/public/myPluginName.plugin.js @@ -0,0 +1,997 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ // install a JSONP callback for chunk loading +/******/ function webpackJsonpCallback(data) { +/******/ var chunkIds = data[0]; +/******/ var moreModules = data[1]; +/******/ +/******/ +/******/ // add "moreModules" to the modules object, +/******/ // then flag all "chunkIds" as loaded and fire callback +/******/ var moduleId, chunkId, i = 0, resolves = []; +/******/ for(;i < chunkIds.length; i++) { +/******/ chunkId = chunkIds[i]; +/******/ if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { +/******/ resolves.push(installedChunks[chunkId][0]); +/******/ } +/******/ installedChunks[chunkId] = 0; +/******/ } +/******/ for(moduleId in moreModules) { +/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { +/******/ modules[moduleId] = moreModules[moduleId]; +/******/ } +/******/ } +/******/ if(parentJsonpFunction) parentJsonpFunction(data); +/******/ +/******/ while(resolves.length) { +/******/ resolves.shift()(); +/******/ } +/******/ +/******/ }; +/******/ +/******/ +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // object to store loaded and loading chunks +/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched +/******/ // Promise = chunk loading, 0 = chunk loaded +/******/ var installedChunks = { +/******/ "myPluginName": 0 +/******/ }; +/******/ +/******/ +/******/ +/******/ // script path function +/******/ function jsonpScriptSrc(chunkId) { +/******/ return __webpack_require__.p + "myPluginName.chunk." + chunkId + ".js" +/******/ } +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ // This file contains only the entry chunk. +/******/ // The chunk loading function for additional chunks +/******/ __webpack_require__.e = function requireEnsure(chunkId) { +/******/ var promises = []; +/******/ +/******/ +/******/ // JSONP chunk loading for javascript +/******/ +/******/ var installedChunkData = installedChunks[chunkId]; +/******/ if(installedChunkData !== 0) { // 0 means "already installed". +/******/ +/******/ // a Promise means "currently loading". +/******/ if(installedChunkData) { +/******/ promises.push(installedChunkData[2]); +/******/ } else { +/******/ // setup Promise in chunk cache +/******/ var promise = new Promise(function(resolve, reject) { +/******/ installedChunkData = installedChunks[chunkId] = [resolve, reject]; +/******/ }); +/******/ promises.push(installedChunkData[2] = promise); +/******/ +/******/ // start chunk loading +/******/ var script = document.createElement('script'); +/******/ var onScriptComplete; +/******/ +/******/ script.charset = 'utf-8'; +/******/ script.timeout = 120; +/******/ if (__webpack_require__.nc) { +/******/ script.setAttribute("nonce", __webpack_require__.nc); +/******/ } +/******/ script.src = jsonpScriptSrc(chunkId); +/******/ +/******/ // create error before stack unwound to get useful stacktrace later +/******/ var error = new Error(); +/******/ onScriptComplete = function (event) { +/******/ // avoid mem leaks in IE. +/******/ script.onerror = script.onload = null; +/******/ clearTimeout(timeout); +/******/ var chunk = installedChunks[chunkId]; +/******/ if(chunk !== 0) { +/******/ if(chunk) { +/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type); +/******/ var realSrc = event && event.target && event.target.src; +/******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')'; +/******/ error.name = 'ChunkLoadError'; +/******/ error.type = errorType; +/******/ error.request = realSrc; +/******/ chunk[1](error); +/******/ } +/******/ installedChunks[chunkId] = undefined; +/******/ } +/******/ }; +/******/ var timeout = setTimeout(function(){ +/******/ onScriptComplete({ type: 'timeout', target: script }); +/******/ }, 120000); +/******/ script.onerror = script.onload = onScriptComplete; +/******/ document.head.appendChild(script); +/******/ } +/******/ } +/******/ return Promise.all(promises); +/******/ }; +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // on error function for async loading +/******/ __webpack_require__.oe = function(err) { console.error(err); throw err; }; +/******/ +/******/ var jsonpArray = window["myPluginName_bundle_jsonpfunction"] = window["myPluginName_bundle_jsonpfunction"] || []; +/******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); +/******/ jsonpArray.push = webpackJsonpCallback; +/******/ jsonpArray = jsonpArray.slice(); +/******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); +/******/ var parentJsonpFunction = oldJsonpFunction; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = "../../packages/osd-optimizer/target/worker/entry_point_creator.js"); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ "../../node_modules/css-loader/dist/cjs.js?!../../node_modules/postcss-loader/dist/cjs.js?!../../node_modules/sass-loader/dist/cjs.js?!./public/index.scss?v7dark": +/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** /Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-0-1!/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/postcss-loader/dist/cjs.js??ref--6-oneOf-0-2!/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/sass-loader/dist/cjs.js??ref--6-oneOf-0-3!./public/index.scss?v7dark ***! + \******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js */ "../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); +/* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "../../node_modules/css-loader/dist/runtime/api.js"); +/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); +// Imports + + +var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); +// Module +___CSS_LOADER_EXPORT___.push([module.i, "/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */", "",{"version":3,"sources":["webpack://./public/index.scss"],"names":[],"mappings":"AAAA;;;;;;;;;EASE,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD","sourcesContent":["/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */"],"sourceRoot":""}]); +// Exports +/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); + + +/***/ }), + +/***/ "../../node_modules/css-loader/dist/cjs.js?!../../node_modules/postcss-loader/dist/cjs.js?!../../node_modules/sass-loader/dist/cjs.js?!./public/index.scss?v7light": +/*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** /Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/postcss-loader/dist/cjs.js??ref--6-oneOf-1-2!/Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/sass-loader/dist/cjs.js??ref--6-oneOf-1-3!./public/index.scss?v7light ***! + \*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js */ "../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js"); +/* harmony import */ var _node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "../../node_modules/css-loader/dist/runtime/api.js"); +/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); +// Imports + + +var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()(_node_modules_css_loader_dist_runtime_cssWithMappingToString_js__WEBPACK_IMPORTED_MODULE_0___default.a); +// Module +___CSS_LOADER_EXPORT___.push([module.i, "/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */", "",{"version":3,"sources":["webpack://./public/index.scss"],"names":[],"mappings":"AAAA;;;;;;;;;EASE,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD,CAAC;;;;;;;;;EASD","sourcesContent":["/*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n *//*!\n * SPDX-License-Identifier: Apache-2.0\n *\n * The OpenSearch Contributors require contributions made to\n * this file be licensed under the Apache-2.0 license or a\n * compatible open source license.\n *\n * Modifications Copyright OpenSearch Contributors. See\n * GitHub history for details.\n */"],"sourceRoot":""}]); +// Exports +/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); + + +/***/ }), + +/***/ "../../node_modules/css-loader/dist/runtime/api.js": +/*!**********************************************************************************************************!*\ + !*** /Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/css-loader/dist/runtime/api.js ***! + \**********************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +// css base code, injected by the css-loader +// eslint-disable-next-line func-names +module.exports = function (cssWithMappingToString) { + var list = []; // return the list of modules as css string + + list.toString = function toString() { + return this.map(function (item) { + var content = cssWithMappingToString(item); + + if (item[2]) { + return "@media ".concat(item[2], " {").concat(content, "}"); + } + + return content; + }).join(""); + }; // import a list of modules into the list + // eslint-disable-next-line func-names + + + list.i = function (modules, mediaQuery, dedupe) { + if (typeof modules === "string") { + // eslint-disable-next-line no-param-reassign + modules = [[null, modules, ""]]; + } + + var alreadyImportedModules = {}; + + if (dedupe) { + for (var i = 0; i < this.length; i++) { + // eslint-disable-next-line prefer-destructuring + var id = this[i][0]; + + if (id != null) { + alreadyImportedModules[id] = true; + } + } + } + + for (var _i = 0; _i < modules.length; _i++) { + var item = [].concat(modules[_i]); + + if (dedupe && alreadyImportedModules[item[0]]) { + // eslint-disable-next-line no-continue + continue; + } + + if (mediaQuery) { + if (!item[2]) { + item[2] = mediaQuery; + } else { + item[2] = "".concat(mediaQuery, " and ").concat(item[2]); + } + } + + list.push(item); + } + }; + + return list; +}; + +/***/ }), + +/***/ "../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js": +/*!*****************************************************************************************************************************!*\ + !*** /Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/css-loader/dist/runtime/cssWithMappingToString.js ***! + \*****************************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } + +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function _iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + +module.exports = function cssWithMappingToString(item) { + var _item = _slicedToArray(item, 4), + content = _item[1], + cssMapping = _item[3]; + + if (!cssMapping) { + return content; + } + + if (typeof btoa === "function") { + // eslint-disable-next-line no-undef + var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping)))); + var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64); + var sourceMapping = "/*# ".concat(data, " */"); + var sourceURLs = cssMapping.sources.map(function (source) { + return "/*# sourceURL=".concat(cssMapping.sourceRoot || "").concat(source, " */"); + }); + return [content].concat(sourceURLs).concat([sourceMapping]).join("\n"); + } + + return [content].join("\n"); +}; + +/***/ }), + +/***/ "../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js": +/*!*********************************************************************************************************************************!*\ + !*** /Users/abandeji/Public/workplace/OpenSearch-Dashboards/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***! + \*********************************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var isOldIE = function isOldIE() { + var memo; + return function memorize() { + if (typeof memo === 'undefined') { + // Test for IE <= 9 as proposed by Browserhacks + // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805 + // Tests for existence of standard globals is to allow style-loader + // to operate correctly into non-standard environments + // @see https://github.com/webpack-contrib/style-loader/issues/177 + memo = Boolean(window && document && document.all && !window.atob); + } + + return memo; + }; +}(); + +var getTarget = function getTarget() { + var memo = {}; + return function memorize(target) { + if (typeof memo[target] === 'undefined') { + var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself + + if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) { + try { + // This will throw an exception if access to iframe is blocked + // due to cross-origin restrictions + styleTarget = styleTarget.contentDocument.head; + } catch (e) { + // istanbul ignore next + styleTarget = null; + } + } + + memo[target] = styleTarget; + } + + return memo[target]; + }; +}(); + +var stylesInDom = []; + +function getIndexByIdentifier(identifier) { + var result = -1; + + for (var i = 0; i < stylesInDom.length; i++) { + if (stylesInDom[i].identifier === identifier) { + result = i; + break; + } + } + + return result; +} + +function modulesToDom(list, options) { + var idCountMap = {}; + var identifiers = []; + + for (var i = 0; i < list.length; i++) { + var item = list[i]; + var id = options.base ? item[0] + options.base : item[0]; + var count = idCountMap[id] || 0; + var identifier = "".concat(id, " ").concat(count); + idCountMap[id] = count + 1; + var index = getIndexByIdentifier(identifier); + var obj = { + css: item[1], + media: item[2], + sourceMap: item[3] + }; + + if (index !== -1) { + stylesInDom[index].references++; + stylesInDom[index].updater(obj); + } else { + stylesInDom.push({ + identifier: identifier, + updater: addStyle(obj, options), + references: 1 + }); + } + + identifiers.push(identifier); + } + + return identifiers; +} + +function insertStyleElement(options) { + var style = document.createElement('style'); + var attributes = options.attributes || {}; + + if (typeof attributes.nonce === 'undefined') { + var nonce = true ? __webpack_require__.nc : undefined; + + if (nonce) { + attributes.nonce = nonce; + } + } + + Object.keys(attributes).forEach(function (key) { + style.setAttribute(key, attributes[key]); + }); + + if (typeof options.insert === 'function') { + options.insert(style); + } else { + var target = getTarget(options.insert || 'head'); + + if (!target) { + throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid."); + } + + target.appendChild(style); + } + + return style; +} + +function removeStyleElement(style) { + // istanbul ignore if + if (style.parentNode === null) { + return false; + } + + style.parentNode.removeChild(style); +} +/* istanbul ignore next */ + + +var replaceText = function replaceText() { + var textStore = []; + return function replace(index, replacement) { + textStore[index] = replacement; + return textStore.filter(Boolean).join('\n'); + }; +}(); + +function applyToSingletonTag(style, index, remove, obj) { + var css = remove ? '' : obj.media ? "@media ".concat(obj.media, " {").concat(obj.css, "}") : obj.css; // For old IE + + /* istanbul ignore if */ + + if (style.styleSheet) { + style.styleSheet.cssText = replaceText(index, css); + } else { + var cssNode = document.createTextNode(css); + var childNodes = style.childNodes; + + if (childNodes[index]) { + style.removeChild(childNodes[index]); + } + + if (childNodes.length) { + style.insertBefore(cssNode, childNodes[index]); + } else { + style.appendChild(cssNode); + } + } +} + +function applyToTag(style, options, obj) { + var css = obj.css; + var media = obj.media; + var sourceMap = obj.sourceMap; + + if (media) { + style.setAttribute('media', media); + } else { + style.removeAttribute('media'); + } + + if (sourceMap && typeof btoa !== 'undefined') { + css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */"); + } // For old IE + + /* istanbul ignore if */ + + + if (style.styleSheet) { + style.styleSheet.cssText = css; + } else { + while (style.firstChild) { + style.removeChild(style.firstChild); + } + + style.appendChild(document.createTextNode(css)); + } +} + +var singleton = null; +var singletonCounter = 0; + +function addStyle(obj, options) { + var style; + var update; + var remove; + + if (options.singleton) { + var styleIndex = singletonCounter++; + style = singleton || (singleton = insertStyleElement(options)); + update = applyToSingletonTag.bind(null, style, styleIndex, false); + remove = applyToSingletonTag.bind(null, style, styleIndex, true); + } else { + style = insertStyleElement(options); + update = applyToTag.bind(null, style, options); + + remove = function remove() { + removeStyleElement(style); + }; + } + + update(obj); + return function updateStyle(newObj) { + if (newObj) { + if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) { + return; + } + + update(obj = newObj); + } else { + remove(); + } + }; +} + +module.exports = function (list, options) { + options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of