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

[2.18] Fix missing imports in report_settings #464

Merged
merged 2 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ exports[`<Main /> panel render component 1`] = `
/>
<div>
<div
class="euiFlexGroup euiFlexGroup--gutterMedium euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow euiFlexGroup--responsive euiFlexGroup--wrap"
class="euiFlexGroup euiFlexGroup--gutterSmall euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow euiFlexGroup--responsive euiFlexGroup--wrap"
>
<div
class="euiFlexItem euiSearchBar__searchHolder"
Expand Down Expand Up @@ -212,7 +212,7 @@ exports[`<Main /> panel render component 1`] = `
</div>
</div>
<div
class="euiSpacer euiSpacer--l"
class="euiSpacer euiSpacer--m"
/>
<div
class="euiBasicTable"
Expand Down Expand Up @@ -1017,7 +1017,7 @@ exports[`<Main /> panel render component after create success 1`] = `
/>
<div>
<div
class="euiFlexGroup euiFlexGroup--gutterMedium euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow euiFlexGroup--responsive euiFlexGroup--wrap"
class="euiFlexGroup euiFlexGroup--gutterSmall euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow euiFlexGroup--responsive euiFlexGroup--wrap"
>
<div
class="euiFlexItem euiSearchBar__searchHolder"
Expand Down Expand Up @@ -1158,7 +1158,7 @@ exports[`<Main /> panel render component after create success 1`] = `
</div>
</div>
<div
class="euiSpacer euiSpacer--l"
class="euiSpacer euiSpacer--m"
/>
<div
class="euiBasicTable"
Expand Down Expand Up @@ -2020,7 +2020,7 @@ exports[`<Main /> panel render component after delete success 1`] = `
/>
<div>
<div
class="euiFlexGroup euiFlexGroup--gutterMedium euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow euiFlexGroup--responsive euiFlexGroup--wrap"
class="euiFlexGroup euiFlexGroup--gutterSmall euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow euiFlexGroup--responsive euiFlexGroup--wrap"
>
<div
class="euiFlexItem euiSearchBar__searchHolder"
Expand Down Expand Up @@ -2161,7 +2161,7 @@ exports[`<Main /> panel render component after delete success 1`] = `
</div>
</div>
<div
class="euiSpacer euiSpacer--l"
class="euiSpacer euiSpacer--m"
/>
<div
class="euiBasicTable"
Expand Down Expand Up @@ -3024,7 +3024,7 @@ exports[`<Main /> panel render component after edit success 1`] = `
/>
<div>
<div
class="euiFlexGroup euiFlexGroup--gutterMedium euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow euiFlexGroup--responsive euiFlexGroup--wrap"
class="euiFlexGroup euiFlexGroup--gutterSmall euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow euiFlexGroup--responsive euiFlexGroup--wrap"
>
<div
class="euiFlexItem euiSearchBar__searchHolder"
Expand Down Expand Up @@ -3165,7 +3165,7 @@ exports[`<Main /> panel render component after edit success 1`] = `
</div>
</div>
<div
class="euiSpacer euiSpacer--l"
class="euiSpacer euiSpacer--m"
/>
<div
class="euiBasicTable"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exports[`<ReportsTable /> panel render component 1`] = `
<div>
<div
class="euiFlexGroup euiFlexGroup--gutterMedium euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow euiFlexGroup--responsive euiFlexGroup--wrap"
class="euiFlexGroup euiFlexGroup--gutterSmall euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow euiFlexGroup--responsive euiFlexGroup--wrap"
>
<div
class="euiFlexItem euiSearchBar__searchHolder"
Expand Down Expand Up @@ -142,7 +142,7 @@ exports[`<ReportsTable /> panel render component 1`] = `
</div>
</div>
<div
class="euiSpacer euiSpacer--l"
class="euiSpacer euiSpacer--m"
/>
<div
class="euiBasicTable"
Expand Down Expand Up @@ -628,7 +628,7 @@ exports[`<ReportsTable /> panel render component 1`] = `
exports[`<ReportsTable /> panel render empty component 1`] = `
<div>
<div
class="euiFlexGroup euiFlexGroup--gutterMedium euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow euiFlexGroup--responsive euiFlexGroup--wrap"
class="euiFlexGroup euiFlexGroup--gutterSmall euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow euiFlexGroup--responsive euiFlexGroup--wrap"
>
<div
class="euiFlexItem euiSearchBar__searchHolder"
Expand Down Expand Up @@ -769,7 +769,7 @@ exports[`<ReportsTable /> panel render empty component 1`] = `
</div>
</div>
<div
class="euiSpacer euiSpacer--l"
class="euiSpacer euiSpacer--m"
/>
<div
class="euiBasicTable"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@
EuiComboBox,
EuiFormRow,
EuiCallOut,
EuiFlexItem,
EuiFlexGroup,
EuiTextArea,
EuiPageContentBody,
EuiPageContent,
EuiHorizontalRule,
EuiPageHeader,
EuiTitle,
EuiFieldText,
} from '@elastic/eui';
import {
REPORT_SOURCE_RADIOS,
Expand All @@ -21,8 +30,8 @@
REPORT_SOURCE_TYPES,
SAVED_SEARCH_FORMAT_OPTIONS,
} from './report_settings_constants';
import Showdown from 'showdown';

Check failure on line 33 in public/components/report_definitions/report_settings/report_settings.tsx

View workflow job for this annotation

GitHub Actions / Lint

`showdown` import should occur before import of `./report_settings_constants`

Check failure on line 33 in public/components/report_definitions/report_settings/report_settings.tsx

View workflow job for this annotation

GitHub Actions / Lint

'Showdown' is defined but never used. Allowed unused vars must match /^_/u
import ReactMde from 'react-mde';

Check failure on line 34 in public/components/report_definitions/report_settings/report_settings.tsx

View workflow job for this annotation

GitHub Actions / Lint

`react-mde` import should occur before import of `./report_settings_constants`
import 'react-mde/lib/styles/css/react-mde-all.css';
import {
reportDefinitionParams,
Expand All @@ -43,14 +52,14 @@
} from './report_settings_helpers';
import { TimeRangeSelect } from './time_range';
import { converter } from '../utils';
import { ReportDefinitionSchemaType } from 'server/model';

Check failure on line 55 in public/components/report_definitions/report_settings/report_settings.tsx

View workflow job for this annotation

GitHub Actions / Lint

`server/model` import should occur before import of `./report_settings_constants`
import { ReportTrigger } from '../report_trigger';

type ReportSettingProps = {

Check failure on line 58 in public/components/report_definitions/report_settings/report_settings.tsx

View workflow job for this annotation

GitHub Actions / Lint

Use an `interface` instead of a `type`
edit: boolean;
editDefinitionId: string;
reportDefinitionRequest: reportDefinitionParams;
httpClientProps: any;

Check warning on line 62 in public/components/report_definitions/report_settings/report_settings.tsx

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type
timeRange: timeRangeParams;
showSettingsReportNameError: boolean;
settingsReportNameErrorMessage: string;
Expand Down Expand Up @@ -81,22 +90,22 @@
const [reportDescription, setReportDescription] = useState('');
const [reportSourceId, setReportSourceId] = useState('dashboardReportSource');

const [dashboardSourceSelect, setDashboardSourceSelect] = useState([] as any);

Check warning on line 93 in public/components/report_definitions/report_settings/report_settings.tsx

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type
const [dashboards, setDashboards] = useState([] as any);

Check warning on line 94 in public/components/report_definitions/report_settings/report_settings.tsx

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type

const [visualizationSourceSelect, setVisualizationSourceSelect] = useState(
[] as any

Check warning on line 97 in public/components/report_definitions/report_settings/report_settings.tsx

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type
);
const [visualizations, setVisualizations] = useState([] as any);

Check warning on line 99 in public/components/report_definitions/report_settings/report_settings.tsx

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type

const [savedSearchSourceSelect, setSavedSearchSourceSelect] = useState(
[] as any

Check warning on line 102 in public/components/report_definitions/report_settings/report_settings.tsx

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type
);
const [savedSearches, setSavedSearches] = useState([] as any);

Check warning on line 104 in public/components/report_definitions/report_settings/report_settings.tsx

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type
const [savedSearchRecordLimit, setSavedSearchRecordLimit] = useState(10000);

const [notebooksSourceSelect, setNotebooksSourceSelect] = useState([] as any);

Check warning on line 107 in public/components/report_definitions/report_settings/report_settings.tsx

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type
const [notebooks, setNotebooks] = useState([] as any);

Check warning on line 108 in public/components/report_definitions/report_settings/report_settings.tsx

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type

const [fileFormat, setFileFormat] = useState('pdf');

Expand Down Expand Up @@ -176,7 +185,7 @@
}
};

const handleDashboardSelect = (e: string | any[]) => {

Check warning on line 188 in public/components/report_definitions/report_settings/report_settings.tsx

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type
setDashboardSourceSelect(e);

let fromInContext = false;
Expand Down Expand Up @@ -387,7 +396,7 @@
response.report_definition;
const {
report_params: {
core_params: { header, footer },

Check failure on line 399 in public/components/report_definitions/report_settings/report_settings.tsx

View workflow job for this annotation

GitHub Actions / Lint

'header' is already declared in the upper scope

Check failure on line 399 in public/components/report_definitions/report_settings/report_settings.tsx

View workflow job for this annotation

GitHub Actions / Lint

'footer' is already declared in the upper scope
},
} = reportDefinition;
// set header/footer default
Expand Down Expand Up @@ -488,7 +497,7 @@
}
};

const setDefaultFileFormat = (fileFormat) => {

Check failure on line 500 in public/components/report_definitions/report_settings/report_settings.tsx

View workflow job for this annotation

GitHub Actions / Lint

'fileFormat' is already declared in the upper scope
let index = 0;
for (index = 0; index < PDF_PNG_FILE_FORMAT_OPTIONS.length; ++index) {
if (
Expand Down Expand Up @@ -594,7 +603,7 @@
}
});

if (reportSource == REPORT_SOURCE_TYPES.savedSearch) {

Check failure on line 606 in public/components/report_definitions/report_settings/report_settings.tsx

View workflow job for this annotation

GitHub Actions / Lint

Expected '===' and instead saw '=='
setSavedSearchRecordLimit(
response.report_definition.report_params.core_params.limit
);
Expand All @@ -610,7 +619,7 @@
);
};

const defaultConfigurationEdit = async (httpClientProps) => {

Check failure on line 622 in public/components/report_definitions/report_settings/report_settings.tsx

View workflow job for this annotation

GitHub Actions / Lint

'httpClientProps' is already declared in the upper scope
let editData = {};
await httpClientProps
.get(`../api/reporting/reportDefinitions/${editDefinitionId}`)
Expand Down
Loading