diff --git a/CHANGELOG.md b/CHANGELOG.md index e9b0df7bf81c..057874a3e17b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - [Legacy Maps Plugin] Prevent reverse-tabnabbing ([#2540](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2540)) - Eliminate dependency on `got` versions older than 11.8.5 ([#2801](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2801)) +- [Multi DataSource] Add explicit no spellcheck on password fields ([#2818](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2818)) ### 📈 Features/Enhancements @@ -63,6 +64,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Removes Add Integration button ([#2723](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2723)) - Change geckodriver version to make consistency ([#2772](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2772)) - [Multi DataSource] Update default audit log path ([#2793](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2793)) +- [Table Visualization] Fix first column sort issue ([#2828](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2828)) +- Temporary workaround for task-kill exceptions on Windows when it is passed a pid for a process that is already dead ([#2842](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2842)) ### 🚞 Infrastructure diff --git a/packages/osd-opensearch/src/cluster.js b/packages/osd-opensearch/src/cluster.js index 7b11b4edbbc5..b4912d677359 100644 --- a/packages/osd-opensearch/src/cluster.js +++ b/packages/osd-opensearch/src/cluster.js @@ -229,7 +229,22 @@ exports.Cluster = class Cluster { throw new Error('OpenSearch has not been started'); } - await treeKillAsync(this._process.pid); + /* Temporary fix for https://github.com/opensearch-project/OpenSearch-Dashboards/issues/2811 + * + * `tree-kill` behaves differently on Windows, where it throws if `pid` is already dead, when + * compared to other operating systems, where it silently returns. + */ + try { + await treeKillAsync(this._process.pid); + } catch (ex) { + console.log('ex.message', ex.message); + if ( + process.platform === 'win32' && + !ex.message?.includes(`The process "${this._process.pid}" not found`) + ) { + throw ex; + } + } await this._outcome; } diff --git a/src/plugins/data_source_management/public/components/create_data_source_wizard/__snapshots__/create_data_source_wizard.test.tsx.snap b/src/plugins/data_source_management/public/components/create_data_source_wizard/__snapshots__/create_data_source_wizard.test.tsx.snap index b4331e26f79d..c7e3152fca99 100644 --- a/src/plugins/data_source_management/public/components/create_data_source_wizard/__snapshots__/create_data_source_wizard.test.tsx.snap +++ b/src/plugins/data_source_management/public/components/create_data_source_wizard/__snapshots__/create_data_source_wizard.test.tsx.snap @@ -775,6 +775,7 @@ exports[`Datasource Management: Create Datasource Wizard case1: should load reso onChange={[Function]} onFocus={[Function]} placeholder="Password to connect to data source" + spellCheck={false} type="dual" value="" > @@ -811,6 +812,7 @@ exports[`Datasource Management: Create Datasource Wizard case1: should load reso onChange={[Function]} onFocus={[Function]} placeholder="Password to connect to data source" + spellCheck={false} type="password" value="" /> @@ -1749,6 +1751,7 @@ exports[`Datasource Management: Create Datasource Wizard case2: should fail to l onChange={[Function]} onFocus={[Function]} placeholder="Password to connect to data source" + spellCheck={false} type="dual" value="" > @@ -1785,6 +1788,7 @@ exports[`Datasource Management: Create Datasource Wizard case2: should fail to l onChange={[Function]} onFocus={[Function]} placeholder="Password to connect to data source" + spellCheck={false} type="password" value="" /> diff --git a/src/plugins/data_source_management/public/components/create_data_source_wizard/components/create_form/__snapshots__/create_data_source_form.test.tsx.snap b/src/plugins/data_source_management/public/components/create_data_source_wizard/components/create_form/__snapshots__/create_data_source_form.test.tsx.snap index fcd197cc0827..0e8dc0a57a62 100644 --- a/src/plugins/data_source_management/public/components/create_data_source_wizard/components/create_form/__snapshots__/create_data_source_form.test.tsx.snap +++ b/src/plugins/data_source_management/public/components/create_data_source_wizard/components/create_form/__snapshots__/create_data_source_form.test.tsx.snap @@ -1537,6 +1537,7 @@ exports[`Datasource Management: Create Datasource form should create data source onChange={[Function]} onFocus={[Function]} placeholder="Password to connect to data source" + spellCheck={false} type="dual" value="test123" > @@ -1573,6 +1574,7 @@ exports[`Datasource Management: Create Datasource form should create data source onChange={[Function]} onFocus={[Function]} placeholder="Password to connect to data source" + spellCheck={false} type="password" value="test123" /> @@ -2469,6 +2471,7 @@ exports[`Datasource Management: Create Datasource form should render normally 1` onChange={[Function]} onFocus={[Function]} placeholder="Password to connect to data source" + spellCheck={false} type="dual" value="" > @@ -2505,6 +2508,7 @@ exports[`Datasource Management: Create Datasource form should render normally 1` onChange={[Function]} onFocus={[Function]} placeholder="Password to connect to data source" + spellCheck={false} type="password" value="" /> @@ -3418,6 +3422,7 @@ exports[`Datasource Management: Create Datasource form should throw validation e onChange={[Function]} onFocus={[Function]} placeholder="Password to connect to data source" + spellCheck={false} type="dual" value="test123" > @@ -3454,6 +3459,7 @@ exports[`Datasource Management: Create Datasource form should throw validation e onChange={[Function]} onFocus={[Function]} placeholder="Password to connect to data source" + spellCheck={false} type="password" value="test123" /> diff --git a/src/plugins/data_source_management/public/components/create_data_source_wizard/components/create_form/create_data_source_form.tsx b/src/plugins/data_source_management/public/components/create_data_source_wizard/components/create_form/create_data_source_form.tsx index 429790231a5c..b159065822df 100644 --- a/src/plugins/data_source_management/public/components/create_data_source_wizard/components/create_form/create_data_source_form.tsx +++ b/src/plugins/data_source_management/public/components/create_data_source_wizard/components/create_form/create_data_source_form.tsx @@ -276,6 +276,7 @@ export class CreateDataSourceForm extends React.Component< value={this.state.auth.credentials.password || ''} onChange={this.onChangePassword} onBlur={this.validatePassword} + spellCheck={false} data-test-subj="createDataSourceFormPasswordField" /> diff --git a/src/plugins/data_source_management/public/components/edit_data_source/__snapshots__/edit_data_source.test.tsx.snap b/src/plugins/data_source_management/public/components/edit_data_source/__snapshots__/edit_data_source.test.tsx.snap index a3d004457a78..2858167a08c0 100644 --- a/src/plugins/data_source_management/public/components/edit_data_source/__snapshots__/edit_data_source.test.tsx.snap +++ b/src/plugins/data_source_management/public/components/edit_data_source/__snapshots__/edit_data_source.test.tsx.snap @@ -1018,6 +1018,7 @@ exports[`Datasource Management: Edit Datasource Wizard should load resources suc onBlur={[Function]} onChange={[Function]} placeholder="Password to connect to data source" + spellCheck={false} type="dual" value="********" > @@ -1054,6 +1055,7 @@ exports[`Datasource Management: Edit Datasource Wizard should load resources suc onBlur={[Function]} onChange={[Function]} placeholder="Password to connect to data source" + spellCheck={false} type="password" value="********" /> diff --git a/src/plugins/data_source_management/public/components/edit_data_source/components/edit_form/__snapshots__/edit_data_source_form.test.tsx.snap b/src/plugins/data_source_management/public/components/edit_data_source/components/edit_form/__snapshots__/edit_data_source_form.test.tsx.snap index 1ce16bf131c2..84c105d68eef 100644 --- a/src/plugins/data_source_management/public/components/edit_data_source/components/edit_form/__snapshots__/edit_data_source_form.test.tsx.snap +++ b/src/plugins/data_source_management/public/components/edit_data_source/components/edit_form/__snapshots__/edit_data_source_form.test.tsx.snap @@ -965,6 +965,7 @@ exports[`Datasource Management: Edit Datasource Form Case 1: With Username & Pas onBlur={[Function]} onChange={[Function]} placeholder="Password to connect to data source" + spellCheck={false} type="dual" value="********" > @@ -1001,6 +1002,7 @@ exports[`Datasource Management: Edit Datasource Form Case 1: With Username & Pas onBlur={[Function]} onChange={[Function]} placeholder="Password to connect to data source" + spellCheck={false} type="password" value="********" /> diff --git a/src/plugins/data_source_management/public/components/edit_data_source/components/edit_form/edit_data_source_form.tsx b/src/plugins/data_source_management/public/components/edit_data_source/components/edit_form/edit_data_source_form.tsx index bda8709cf509..46c91ad540c8 100644 --- a/src/plugins/data_source_management/public/components/edit_data_source/components/edit_form/edit_data_source_form.tsx +++ b/src/plugins/data_source_management/public/components/edit_data_source/components/edit_form/edit_data_source_form.tsx @@ -585,6 +585,7 @@ export class EditDataSourceForm extends React.Component @@ -205,6 +206,7 @@ exports[`Datasource Management: Update Stored Password Modal should render norma id="generated-id" name="confirmUpdatedPassword" placeholder="Confirm Updated password" + spellcheck="false" type="password" value="" /> @@ -529,6 +531,7 @@ exports[`Datasource Management: Update Stored Password Modal should render norma onChange={[Function]} onFocus={[Function]} placeholder="Updated password" + spellCheck={false} type="dual" value="" > @@ -566,6 +569,7 @@ exports[`Datasource Management: Update Stored Password Modal should render norma onChange={[Function]} onFocus={[Function]} placeholder="Updated password" + spellCheck={false} type="password" value="" /> @@ -691,6 +695,7 @@ exports[`Datasource Management: Update Stored Password Modal should render norma onChange={[Function]} onFocus={[Function]} placeholder="Confirm Updated password" + spellCheck={false} type="dual" value="" > @@ -728,6 +733,7 @@ exports[`Datasource Management: Update Stored Password Modal should render norma onChange={[Function]} onFocus={[Function]} placeholder="Confirm Updated password" + spellCheck={false} type="password" value="" /> diff --git a/src/plugins/data_source_management/public/components/edit_data_source/components/update_password_modal/update_password_modal.tsx b/src/plugins/data_source_management/public/components/edit_data_source/components/update_password_modal/update_password_modal.tsx index 95ca0abe6e90..693a8a84234e 100644 --- a/src/plugins/data_source_management/public/components/edit_data_source/components/update_password_modal/update_password_modal.tsx +++ b/src/plugins/data_source_management/public/components/edit_data_source/components/update_password_modal/update_password_modal.tsx @@ -125,6 +125,7 @@ export const UpdatePasswordModal = ({ type={'dual'} value={newPassword} isInvalid={!isNewPasswordValid} + spellCheck={false} onChange={(e) => setNewPassword(e.target.value)} onBlur={validateNewPassword} /> @@ -149,6 +150,7 @@ export const UpdatePasswordModal = ({ type={'dual'} value={confirmNewPassword} isInvalid={!!isConfirmNewPasswordValid.length} + spellCheck={false} onChange={(e) => setConfirmNewPassword(e.target.value)} onBlur={validateConfirmNewPassword} /> diff --git a/src/plugins/vis_type_table_new/public/components/table_vis_component.tsx b/src/plugins/vis_type_table_new/public/components/table_vis_component.tsx index e24784d9eb1a..4a25395703b0 100644 --- a/src/plugins/vis_type_table_new/public/components/table_vis_component.tsx +++ b/src/plugins/vis_type_table_new/public/components/table_vis_component.tsx @@ -38,8 +38,10 @@ export const TableVisComponent = ({ const pagination = usePagination(visConfig, rows.length); const sortedRows = useMemo(() => { - return uiState.sort?.colIndex && uiState.sort.direction - ? orderBy(rows, columns[uiState.sort.colIndex]?.id, uiState.sort.direction) + return uiState.sort.colIndex !== null && + columns[uiState.sort.colIndex].id && + uiState.sort.direction + ? orderBy(rows, columns[uiState.sort.colIndex].id, uiState.sort.direction) : rows; }, [columns, rows, uiState]); @@ -58,8 +60,10 @@ export const TableVisComponent = ({ const dataGridColumns = getDataGridColumns(sortedRows, columns, table, event, uiState.width); const sortedColumns = useMemo(() => { - return uiState.sort?.colIndex && uiState.sort.direction - ? [{ id: dataGridColumns[uiState.sort.colIndex]?.id, direction: uiState.sort.direction }] + return uiState.sort.colIndex !== null && + dataGridColumns[uiState.sort.colIndex].id && + uiState.sort.direction + ? [{ id: dataGridColumns[uiState.sort.colIndex].id, direction: uiState.sort.direction }] : []; }, [dataGridColumns, uiState]);