Policies let you automatically perform administrative operations on indices.
32 |35 | Policies let you automatically perform administrative operations on indices. 36 |
37 |Create a policy with a JSON configuration file. This can be added directly in the code editor below.
60 |{getMessagePrompt(props)}
59 | 60 | } 61 | actions={getActions(props)} 62 | /> 63 | ); 64 | 65 | export default IndexEmptyPrompt; 66 | -------------------------------------------------------------------------------- /public/pages/Indices/components/IndexEmptyPrompt/__snapshots__/IndexEmptyPrompt.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`18 | There are no existing indices. Create an index to view it here. 19 |
20 |{getMessagePrompt(props)}
62 | 63 | } 64 | actions={getActions(props)} 65 | /> 66 | ); 67 | 68 | export default ManagedIndexEmptyPrompt; 69 | -------------------------------------------------------------------------------- /public/pages/ManagedIndices/components/ManagedIndexEmptyPrompt/__snapshots__/ManagedIndexEmptyPrompt.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`18 | There are no existing managed indices. Create a policy to add to an index. 19 |
20 |{getMessagePrompt(props)}
63 | 64 | } 65 | actions={getActions(props)} 66 | /> 67 | ); 68 | 69 | export default PolicyEmptyPrompt; 70 | -------------------------------------------------------------------------------- /public/pages/Policies/components/PolicyEmptyPrompt/__snapshots__/PolicyEmptyPrompt.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`18 | There are no existing policies. Create a policy to apply to your indices. 19 |
20 |{getMessagePrompt(props)}
64 | 65 | } 66 | actions={getActions(props)} 67 | /> 68 | ); 69 | 70 | export default RollupEmptyPrompt; 71 | -------------------------------------------------------------------------------- /public/pages/Rollups/components/RollupEmptyPrompt/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). 5 | * You may not use this file except in compliance with the License. 6 | * A copy of the License is located at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | import RollupEmptyPrompt from "./RollupEmptyPrompt"; 17 | 18 | export default RollupEmptyPrompt; 19 | -------------------------------------------------------------------------------- /public/pages/Rollups/containers/Rollups/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). 5 | * You may not use this file except in compliance with the License. 6 | * A copy of the License is located at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | import Rollups from "./Rollups"; 17 | 18 | export default Rollups; 19 | -------------------------------------------------------------------------------- /public/pages/Rollups/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). 5 | * You may not use this file except in compliance with the License. 6 | * A copy of the License is located at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | import Rollups from "./containers/Rollups"; 17 | 18 | export default Rollups; 19 | -------------------------------------------------------------------------------- /public/pages/Rollups/models/interfaces.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). 5 | * You may not use this file except in compliance with the License. 6 | * A copy of the License is located at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | import { Direction } from "@elastic/eui"; 17 | import { DocumentRollup } from "../../../../models/interfaces"; 18 | 19 | export interface RollupQueryParams { 20 | from: number; 21 | size: number; 22 | search: string; 23 | sortField: keyof DocumentRollup; 24 | sortDirection: Direction; 25 | } 26 | -------------------------------------------------------------------------------- /public/pages/Rollups/utils/constants.tsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). 5 | * You may not use this file except in compliance with the License. 6 | * A copy of the License is located at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | import { SortDirection } from "../../../utils/constants"; 17 | 18 | export const DEFAULT_PAGE_SIZE_OPTIONS = [5, 10, 20, 50]; 19 | 20 | export const DEFAULT_QUERY_PARAMS = { 21 | from: 0, 22 | size: 20, 23 | search: "", 24 | sortField: "_id", 25 | sortDirection: SortDirection.DESC, 26 | }; 27 | -------------------------------------------------------------------------------- /public/pages/Rollups/utils/helpers.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"). 5 | * You may not use this file except in compliance with the License. 6 | * A copy of the License is located at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * or in the "license" file accompanying this file. This file is distributed 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | * express or implied. See the License for the specific language governing 13 | * permissions and limitations under the License. 14 | */ 15 | 16 | import queryString from "query-string"; 17 | // @ts-ignore 18 | import moment from "moment"; 19 | import { DEFAULT_QUERY_PARAMS } from "./constants"; 20 | import { RollupQueryParams } from "../models/interfaces"; 21 | 22 | export function getURLQueryParams(location: { search: string }): RollupQueryParams { 23 | const { from, size, search, sortField, sortDirection } = queryString.parse(location.search); 24 | 25 | return