Skip to content

Commit

Permalink
Merge branch '2.x' into backport/backport-6395-to-2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
BionIT authored Jun 5, 2024
2 parents ae0dbb4 + 3fa2501 commit d2acb46
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 20 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/6492.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
security:
- [CVE-2024-28863] Bump tar from 6.1.11 to 6.2.1 ([#6492](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6492))
2 changes: 2 additions & 0 deletions changelogs/fragments/6811.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- Bug Fixes for Vis Builder ([#6811](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6811))
2 changes: 2 additions & 0 deletions changelogs/fragments/6908.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- Fix not setting the default data source when creating data source bug ([#6908](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6908))
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
"**/qs": "^6.11.0",
"**/semver": "^7.5.3",
"**/set-value": "^4.1.0",
"**/tar":"^6.2.1",
"**/topo/hoek": "npm:@amoo-miki/[email protected]",
"**/trim": "^0.0.3",
"**/typescript": "4.0.2",
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/saved_objects/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export interface SavedObjectsFindOptions {
/**
* An array of fields to include in the results
* @example
* SavedObjects.find({type: 'dashboard', fields: ['attributes.name', 'attributes.location']})
* SavedObjects.find({type: 'dashboard', fields: ['name', 'location']})
*/
fields?: string[];
/** Search documents using the OpenSearch Simple Query String syntax. See OpenSearch Simple Query String `query` argument for more information */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,12 @@ describe('DataSourceManagement: Utils.ts', () => {
await handleSetDefaultDatasource(savedObjects.client, uiSettings);
expect(uiSettings.set).toHaveBeenCalled();
});
test('should set default datasource when returned default datasource id is empty string', async () => {
mockUiSettingsCalls(uiSettings, 'get', '');
mockResponseForSavedObjectsCalls(savedObjects.client, 'find', getDataSourcesResponse);
await handleSetDefaultDatasource(savedObjects.client, uiSettings);
expect(uiSettings.set).toHaveBeenCalled();
});
test('should not set default datasource when it has default datasouce', async () => {
mockUiSettingsCalls(uiSettings, 'get', 'test');
mockResponseForSavedObjectsCalls(savedObjects.client, 'find', getDataSourcesResponse);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export async function handleSetDefaultDatasource(
savedObjectsClient: SavedObjectsClientContract,
uiSettings: IUiSettingsClient
) {
if (getDefaultDataSourceId(uiSettings) === null) {
if (!getDefaultDataSourceId(uiSettings)) {
return await setFirstDataSourceAsDefault(savedObjectsClient, uiSettings, false);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
padding: calc($euiSizeS - ($euiSizeXS / 2)) $euiSizeS $euiSizeS $euiSizeS;
background-color: $euiColorLightShade;
border-radius: $euiBorderRadius;
overflow-x: hidden;
}

&__field {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ export class PersistedState extends EventEmitter {
}

// update the merged state value
const targetObj = this._mergedState || cloneDeep(this._defaultState);
const targetObj = cloneDeep(this._mergedState) || cloneDeep(this._defaultState);
const sourceObj = merge({}, this._changedState);

// handler arguments are (targetValue, sourceValue, key, target, source)
Expand Down
27 changes: 10 additions & 17 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12665,6 +12665,11 @@ minipass@^4.0.0:
resolved "https://registry.yarnpkg.com/minipass/-/minipass-4.2.8.tgz#f0010f64393ecfc1d1ccb5f582bcaf45f48e1a3a"
integrity sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==

minipass@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d"
integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==

minizlib@^2.1.1:
version "2.1.2"
resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931"
Expand Down Expand Up @@ -16821,26 +16826,14 @@ tar-stream@^2.1.4, tar-stream@^2.2.0:
inherits "^2.0.3"
readable-stream "^3.1.1"

[email protected]:
version "6.1.11"
resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621"
integrity sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==
dependencies:
chownr "^2.0.0"
fs-minipass "^2.0.0"
minipass "^3.0.0"
minizlib "^2.1.1"
mkdirp "^1.0.3"
yallist "^4.0.0"

tar@^6.0.2, tar@^6.1.11:
version "6.1.13"
resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.13.tgz#46e22529000f612180601a6fe0680e7da508847b"
integrity sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==
[email protected], tar@^6.0.2, tar@^6.1.11, tar@^6.2.1:
version "6.2.1"
resolved "https://registry.yarnpkg.com/tar/-/tar-6.2.1.tgz#717549c541bc3c2af15751bea94b1dd068d4b03a"
integrity sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==
dependencies:
chownr "^2.0.0"
fs-minipass "^2.0.0"
minipass "^4.0.0"
minipass "^5.0.0"
minizlib "^2.1.1"
mkdirp "^1.0.3"
yallist "^4.0.0"
Expand Down

0 comments on commit d2acb46

Please sign in to comment.