Skip to content
This repository has been archived by the owner on Aug 9, 2022. It is now read-only.

Commit

Permalink
Add Search box to Report Source Selection (#286)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcui1225 authored Jan 6, 2021
1 parent 66164c3 commit 1bf159c
Show file tree
Hide file tree
Showing 10 changed files with 2,034 additions and 339 deletions.
3 changes: 3 additions & 0 deletions kibana-reports/.cypress/integration/01-create.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ describe('Cypress', () => {
// enter a report description
cy.get('#reportSettingsDescription').type('Description for cypress test');

// select a report source
cy.get('.euiComboBox').click({ force: true });

// create an on-demand report definition
cy.get('#createNewReportDefinition').click({ force: true });
});
Expand Down
2 changes: 1 addition & 1 deletion kibana-reports/.cypress/integration/04-download.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ describe('Cypress', () => {
// create an on-demand report definition
cy.get('#createNewReportDefinition').click({ force: true });

cy.wait(5000);
cy.wait(10000);

// visit the details page of the newly created on-demand definition
cy.get('#reportDefinitionDetailsLink').first().click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,14 @@ export function CreateReport(props) {
settingsReportNameErrorMessage,
setSettingsReportNameErrorMessage,
] = useState('');
const [
showSettingsReportSourceError,
setShowSettingsReportSourceError
] = useState(false);
const [
settingsReportSourceErrorMessage,
setSettingsReportSourceErrorMessage
] = useState('');
const [
showTriggerIntervalNaNError,
setShowTriggerIntervalNaNError,
Expand Down Expand Up @@ -213,7 +221,6 @@ export function CreateReport(props) {
timeRange: timeRangeParams
) => {
const { httpClient } = props;

//TODO: need better handle
if (
metadata.trigger.trigger_type === 'On demand' &&
Expand All @@ -228,6 +235,8 @@ export function CreateReport(props) {
error,
setShowSettingsReportNameError,
setSettingsReportNameErrorMessage,
setShowSettingsReportSourceError,
setSettingsReportSourceErrorMessage,
setShowTriggerIntervalNaNError,
timeRange,
setShowTimeRangeError,
Expand Down Expand Up @@ -307,6 +316,8 @@ export function CreateReport(props) {
timeRange={timeRange}
showSettingsReportNameError={showSettingsReportNameError}
settingsReportNameErrorMessage={settingsReportNameErrorMessage}
showSettingsReportSourceError={showSettingsReportSourceError}
settingsReportSourceErrorMessage={settingsReportSourceErrorMessage}
showTimeRangeError={showTimeRangeError}
/>
<EuiSpacer />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ export function EditReportDefinition(props) {
settingsReportNameErrorMessage,
setSettingsReportNameErrorMessage,
] = useState('');
const [
showSettingsReportSourceError,
setShowSettingsReportSourceError
] = useState(false);
const [
settingsReportSourceErrorMessage,
setSettingsReportSourceErrorMessage
] = useState('');
const [
showTriggerIntervalNaNError,
setShowTriggerIntervalNaNError,
Expand Down Expand Up @@ -216,6 +224,8 @@ export function EditReportDefinition(props) {
error,
setShowSettingsReportNameError,
setSettingsReportNameErrorMessage,
setShowSettingsReportSourceError,
setSettingsReportSourceErrorMessage,
setShowTriggerIntervalNaNError,
timeRange,
setShowTimeRangeError,
Expand Down Expand Up @@ -294,6 +304,8 @@ export function EditReportDefinition(props) {
timeRange={timeRange}
showSettingsReportNameError={showSettingsReportNameError}
settingsReportNameErrorMessage={settingsReportNameErrorMessage}
showSettingsReportSourceError={showSettingsReportSourceError}
settingsReportSourceErrorMessage={settingsReportSourceErrorMessage}
showTimeRangeError={showTimeRangeError}
/>
<EuiSpacer />
Expand Down
Loading

0 comments on commit 1bf159c

Please sign in to comment.