Skip to content

Commit

Permalink
Merge branch 'main' into i18n/ru-RU
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-by-step-logic committed Nov 10, 2022
2 parents 3c1cead + 4fd67de commit 70e9d27
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
17 changes: 16 additions & 1 deletion packages/osd-opensearch/src/cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -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"
/>
</EuiFormRow>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,7 @@ export class EditDataSourceForm extends React.Component<EditDataSourceProps, Edi
: this.state.auth.credentials.password
}
isInvalid={!!this.state.formErrorsByField.createCredential?.password?.length}
spellCheck={false}
onChange={this.onChangePassword}
onBlur={this.validatePassword}
disabled={this.props.existingDataSource.auth.type !== AuthType.NoAuth}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ export const UpdatePasswordModal = ({
type={'dual'}
value={newPassword}
isInvalid={!isNewPasswordValid}
spellCheck={false}
onChange={(e) => setNewPassword(e.target.value)}
onBlur={validateNewPassword}
/>
Expand All @@ -149,6 +150,7 @@ export const UpdatePasswordModal = ({
type={'dual'}
value={confirmNewPassword}
isInvalid={!!isConfirmNewPasswordValid.length}
spellCheck={false}
onChange={(e) => setConfirmNewPassword(e.target.value)}
onBlur={validateConfirmNewPassword}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]);

Expand All @@ -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]);

Expand Down

0 comments on commit 70e9d27

Please sign in to comment.