Skip to content

Commit

Permalink
Add share button in experiment view (#4936)
Browse files Browse the repository at this point in the history
* Add share button in experiment view

Signed-off-by: Marijn Valk <marijncv@hotmail.com>

* wrapper updateUrlWithViewState

Signed-off-by: Marijn Valk <marijncv@hotmail.com>

* Added lifecycle & modelVersions to urlstate

Signed-off-by: Marijn Valk <marijncv@hotmail.com>

* Updated share button placement

Signed-off-by: Marijn Valk <marijncv@hotmail.com>

* Fix tooltip

Signed-off-by: Marijn Valk <marijncv@hotmail.com>

* Update url to current state before copy

Signed-off-by: Marijn Valk <marijncv@hotmail.com>

* urlState in ExperimentPage

Signed-off-by: Marijn Valk <marijncv@hotmail.com>

* Lift urlstate into experimentpage

Signed-off-by: Marijn Valk <marijncv@hotmail.com>

* lint fix

Signed-off-by: Marijn Valk <marijncv@hotmail.com>

* fix tests

Signed-off-by: Marijn Valk <marijncv@hotmail.com>

* Tests added

Signed-off-by: Marijn Valk <marijncv@hotmail.com>

* extract-i18n:base

Signed-off-by: Marijn Valk <marijncv@hotmail.com>

* direct ref to prop

Signed-off-by: Marijn Valk <marijncv@hotmail.com>

* revert headerbutton export

Signed-off-by: Marijn Valk <marijncv@hotmail.com>

* refactor getDerivedStateFromProps

Signed-off-by: Marijn Valk <marijncv@hotmail.com>

* local style for sharebutton

Signed-off-by: Marijn Valk <marijncv@hotmail.com>

* Kick CI

Signed-off-by: dbczumar <corey.zumar@databricks.com>

Co-authored-by: dbczumar <corey.zumar@databricks.com>
  • Loading branch information
marijncv and dbczumar committed Nov 24, 2021
1 parent 36b56cf commit de01531
Show file tree
Hide file tree
Showing 9 changed files with 1,129 additions and 458 deletions.
5 changes: 2 additions & 3 deletions mlflow/server/js/src/common/utils/Utils.js
Expand Up @@ -711,10 +711,9 @@ class Utils {

static getSearchParamsFromUrl(search) {
const params = qs.parse(search, { ignoreQueryPrefix: true });
const str = JSON.stringify(params, function replaceUndefined(key, value) {
return value === undefined ? '' : value;
const str = JSON.stringify(params, function replaceUndefinedAndBools(key, value) {
return value === undefined ? '' : value === 'true' ? true : value === 'false' ? false : value;
});

return params ? JSON.parse(str) : [];
}

Expand Down
5 changes: 5 additions & 0 deletions mlflow/server/js/src/common/utils/Utils.test.js
Expand Up @@ -462,6 +462,7 @@ test('getSearchParamsFromUrl', () => {
const url1 = '?p=&q=&r=';
const url2 = '?';
const url3 = '?searchInput=some-Input';
const url4 = '?boolVal1=true&boolVal2=false';
expect(Utils.getSearchParamsFromUrl(url0)).toEqual({
searchInput: '',
});
Expand All @@ -470,6 +471,10 @@ test('getSearchParamsFromUrl', () => {
expect(Utils.getSearchParamsFromUrl(url3)).toEqual({
searchInput: 'some-Input',
});
expect(Utils.getSearchParamsFromUrl(url4)).toEqual({
boolVal1: true,
boolVal2: false,
});
});

test('getSearchUrlFromState', () => {
Expand Down

0 comments on commit de01531

Please sign in to comment.