Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR] SLM create and edit policies #43390

Merged
merged 36 commits into from
Aug 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
6eecf34
add buttons and links to create/edit policy
jen-huang Jul 16, 2019
d1de1a4
set up add policy form
jen-huang Jul 17, 2019
985a689
start create policy form, including loading/error states and redirect…
jen-huang Jul 17, 2019
45243fc
add snapshot name field
jen-huang Jul 17, 2019
516c3ef
Change page title upon app navigation, improve breadcrumbs
jen-huang Jul 19, 2019
7429cf9
Add on cancel to policy form, reorder fields
jen-huang Jul 22, 2019
5bbb120
Add simple cron field
jen-huang Jul 24, 2019
6e01b70
Merge remote-tracking branch 'upstream/master' into feature/slm-create
jen-huang Aug 1, 2019
bc24450
First pass at create/edit policy functionality
jen-huang Aug 6, 2019
6a2813c
Merge remote-tracking branch 'upstream/master' into feature/slm-create
jen-huang Aug 6, 2019
dbff38b
Adjust permissions for SLM tab
jen-huang Aug 7, 2019
d3c708e
Adjust no snapshots prompt based on if policies exist or not
jen-huang Aug 7, 2019
2af6315
Add selectable indices to policy form
jen-huang Aug 7, 2019
90cfd2c
Merge remote-tracking branch 'upstream/master' into feature/slm-create
jen-huang Aug 12, 2019
58e0f35
Move cron editor from rollup jobs to ES UI shared folder
jen-huang Aug 14, 2019
dabd4d9
Used shared cron editor for slm policy create/edit
jen-huang Aug 14, 2019
bc05c7f
Adjust copies; add duplicate schedule warning callout
jen-huang Aug 14, 2019
4700566
Surface in progress information
jen-huang Aug 15, 2019
0b56d7d
Fix doc link for 7.x
jen-huang Aug 15, 2019
44c4c4e
Fix rollup tests
jen-huang Aug 20, 2019
e828599
Merge remote-tracking branch 'upstream/master' into feature/slm-create
jen-huang Aug 20, 2019
0d0987d
Copy edits from review
jen-huang Aug 20, 2019
cf2e381
Add ES endpoint to request review
jen-huang Aug 20, 2019
3552bdb
Remove unused imports
jen-huang Aug 20, 2019
923489d
Fix i18n by cleaning up typo'd text
jen-huang Aug 21, 2019
b1ebffd
Remove unused import
jen-huang Aug 21, 2019
0f1b766
Fix permissions and i18n
jen-huang Aug 21, 2019
d6e4dfa
Revert change to Logistics copy
jen-huang Aug 21, 2019
14565cb
Merge remote-tracking branch 'upstream/master' into feature/slm-create
jen-huang Aug 26, 2019
79d2952
Fix bugs and PR feedback
jen-huang Aug 26, 2019
495c301
Add cancel button to form and add comment for list
jen-huang Aug 26, 2019
7eea3f4
Adjust timeout comment
jen-huang Aug 26, 2019
9787825
Merge remote-tracking branch 'upstream/master' into feature/slm-create
jen-huang Aug 26, 2019
281cc47
Fix bug with list of indices in detail panel when clicking through table
jen-huang Aug 27, 2019
8fbe492
Add comment about EUI bug
jen-huang Aug 27, 2019
aaa8c67
Merge remote-tracking branch 'upstream/master' into feature/slm-create
jen-huang Aug 27, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"tsvb": "src/legacy/core_plugins/metrics",
"kbnESQuery": "packages/kbn-es-query",
"inspector": "src/plugins/inspector",
"kibana-react": "src/plugins/kibana_react"
"kibana-react": "src/plugins/kibana_react",
"esUi": "src/plugins/es_ui_shared"
},
"exclude": ["src/legacy/ui/ui_render/ui_render_mixin.js"],
"translations": []
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
* 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, { Fragment } from 'react';
Expand All @@ -27,12 +40,12 @@ export const CronDaily = ({
<EuiFormRow
label={(
<FormattedMessage
id="xpack.rollupJobs.cronEditor.cronDaily.fieldTimeLabel"
id="esUi.cronEditor.cronDaily.fieldTimeLabel"
defaultMessage="Time"
/>
)}
fullWidth
data-test-subj="rollupCronFrequencyConfiguration"
data-test-subj="cronFrequencyConfiguration"
>
<EuiFlexGroup gutterSize="xs">
<EuiFlexItem grow={false}>
Expand All @@ -45,13 +58,13 @@ export const CronDaily = ({
<EuiText size="xs">
<strong>
<FormattedMessage
id="xpack.rollupJobs.cronEditor.cronDaily.fieldHour.textAtLabel"
id="esUi.cronEditor.cronDaily.fieldHour.textAtLabel"
defaultMessage="At"
/>
</strong>
</EuiText>
)}
data-test-subj="rollupJobCreateFrequencyDailyHourSelect"
data-test-subj="cronFrequencyDailyHourSelect"
/>
</EuiFlexItem>

Expand All @@ -68,7 +81,7 @@ export const CronDaily = ({
</strong>
</EuiText>
)}
data-test-subj="rollupJobCreateFrequencyDailyMinuteSelect"
data-test-subj="cronFrequencyDailyMinuteSelect"
/>
</EuiFlexItem>
</EuiFlexGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
* 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, { Component, Fragment } from 'react';
Expand All @@ -27,7 +40,7 @@ import {
WEEK,
MONTH,
YEAR,
} from '../../../../../services';
} from './services';

import { CronHourly } from './cron_hourly';
import { CronDaily } from './cron_daily';
Expand Down Expand Up @@ -331,7 +344,7 @@ export class CronEditor extends Component {
<EuiFormRow
label={(
<FormattedMessage
id="xpack.rollupJobs.cronEditor.fieldFrequencyLabel"
id="esUi.cronEditor.fieldFrequencyLabel"
defaultMessage="Frequency"
/>
)}
Expand All @@ -346,13 +359,13 @@ export class CronEditor extends Component {
<EuiText size="xs">
<strong>
<FormattedMessage
id="xpack.rollupJobs.cronEditor.textEveryLabel"
id="esUi.cronEditor.textEveryLabel"
defaultMessage="Every"
/>
</strong>
</EuiText>
)}
data-test-subj="rollupJobCreateFrequencySelect"
data-test-subj="cronFrequencySelect"
/>
</EuiFormRow>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/*
* 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, { Fragment } from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from '@kbn/i18n/react';

import {
EuiFormRow,
EuiSelect,
EuiText,
} from '@elastic/eui';

export const CronHourly = ({
minute,
minuteOptions,
onChange,
}) => (
<Fragment>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Fragment not needed

<EuiFormRow
label={(
<FormattedMessage
id="esUi.cronEditor.cronHourly.fieldTimeLabel"
defaultMessage="Minute"
/>
)}
fullWidth
data-test-subj="cronFrequencyConfiguration"
>
<EuiSelect
options={minuteOptions}
value={minute}
onChange={e => onChange({ minute: e.target.value })}
fullWidth
prepend={(
<EuiText size="xs">
<strong>
<FormattedMessage
id="esUi.cronEditor.cronHourly.fieldMinute.textAtLabel"
defaultMessage="At"
/>
</strong>
</EuiText>
)}
data-test-subj="cronFrequencyHourlyMinuteSelect"
/>
</EuiFormRow>
</Fragment>
);

CronHourly.propTypes = {
minute: PropTypes.string.isRequired,
minuteOptions: PropTypes.array.isRequired,
onChange: PropTypes.func.isRequired,
};
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
* 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, { Fragment } from 'react';
Expand Down Expand Up @@ -29,12 +42,12 @@ export const CronMonthly = ({
<EuiFormRow
label={(
<FormattedMessage
id="xpack.rollupJobs.cronEditor.cronMonthly.fieldDateLabel"
id="esUi.cronEditor.cronMonthly.fieldDateLabel"
defaultMessage="Date"
/>
)}
fullWidth
data-test-subj="rollupCronFrequencyConfiguration"
data-test-subj="cronFrequencyConfiguration"
>
<EuiSelect
options={dateOptions}
Expand All @@ -45,25 +58,25 @@ export const CronMonthly = ({
<EuiText size="xs">
<strong>
<FormattedMessage
id="xpack.rollupJobs.cronEditor.cronMonthly.textOnTheLabel"
id="esUi.cronEditor.cronMonthly.textOnTheLabel"
defaultMessage="On the"
/>
</strong>
</EuiText>
)}
data-test-subj="rollupJobCreateFrequencyMonthlyDateSelect"
data-test-subj="cronFrequencyMonthlyDateSelect"
/>
</EuiFormRow>

<EuiFormRow
label={(
<FormattedMessage
id="xpack.rollupJobs.cronEditor.cronMonthly.fieldTimeLabel"
id="esUi.cronEditor.cronMonthly.fieldTimeLabel"
defaultMessage="Time"
/>
)}
fullWidth
data-test-subj="rollupCronFrequencyConfiguration"
data-test-subj="cronFrequencyConfiguration"
>
<EuiFlexGroup gutterSize="xs">
<EuiFlexItem grow={false}>
Expand All @@ -76,13 +89,13 @@ export const CronMonthly = ({
<EuiText size="xs">
<strong>
<FormattedMessage
id="xpack.rollupJobs.cronEditor.cronMonthly.fieldHour.textAtLabel"
id="esUi.cronEditor.cronMonthly.fieldHour.textAtLabel"
defaultMessage="At"
/>
</strong>
</EuiText>
)}
data-test-subj="rollupJobCreateFrequencyMonthlyHourSelect"
data-test-subj="cronFrequencyMonthlyHourSelect"
/>
</EuiFlexItem>

Expand All @@ -99,7 +112,7 @@ export const CronMonthly = ({
</strong>
</EuiText>
)}
data-test-subj="rollupJobCreateFrequencyMonthlyMinuteSelect"
data-test-subj="cronFrequencyMonthlyMinuteSelect"
/>
</EuiFlexItem>
</EuiFlexGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
* 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, { Fragment } from 'react';
Expand Down Expand Up @@ -29,12 +42,12 @@ export const CronWeekly = ({
<EuiFormRow
label={(
<FormattedMessage
id="xpack.rollupJobs.cronEditor.cronWeekly.fieldDateLabel"
id="esUi.cronEditor.cronWeekly.fieldDateLabel"
defaultMessage="Day"
/>
)}
fullWidth
data-test-subj="rollupCronFrequencyConfiguration"
data-test-subj="cronFrequencyConfiguration"
>
<EuiSelect
options={dayOptions}
Expand All @@ -45,25 +58,25 @@ export const CronWeekly = ({
<EuiText size="xs">
<strong>
<FormattedMessage
id="xpack.rollupJobs.cronEditor.cronWeekly.textOnLabel"
id="esUi.cronEditor.cronWeekly.textOnLabel"
defaultMessage="On"
/>
</strong>
</EuiText>
)}
data-test-subj="rollupJobCreateFrequencyWeeklyDaySelect"
data-test-subj="cronFrequencyWeeklyDaySelect"
/>
</EuiFormRow>

<EuiFormRow
label={(
<FormattedMessage
id="xpack.rollupJobs.cronEditor.cronWeekly.fieldTimeLabel"
id="esUi.cronEditor.cronWeekly.fieldTimeLabel"
defaultMessage="Time"
/>
)}
fullWidth
data-test-subj="rollupCronFrequencyConfiguration"
data-test-subj="cronFrequencyConfiguration"
>
<EuiFlexGroup gutterSize="xs">
<EuiFlexItem grow={false}>
Expand All @@ -76,13 +89,13 @@ export const CronWeekly = ({
<EuiText size="xs">
<strong>
<FormattedMessage
id="xpack.rollupJobs.cronEditor.cronWeekly.fieldHour.textAtLabel"
id="esUi.cronEditor.cronWeekly.fieldHour.textAtLabel"
defaultMessage="At"
/>
</strong>
</EuiText>
)}
data-test-subj="rollupJobCreateFrequencyWeeklyHourSelect"
data-test-subj="cronFrequencyWeeklyHourSelect"
/>
</EuiFlexItem>

Expand All @@ -99,7 +112,7 @@ export const CronWeekly = ({
</strong>
</EuiText>
)}
data-test-subj="rollupJobCreateFrequencyWeeklyMinuteSelect"
data-test-subj="cronFrequencyWeeklyMinuteSelect"
/>
</EuiFlexItem>
</EuiFlexGroup>
Expand Down
Loading