Commit Graph

681 Commits

Author SHA1 Message Date
axel7083 e137ae7fac
Fix(frontend): content is not available (#9720)
* Using display name instead of taskname

* Creating dedicated function for extracting task label

* Propagating fix to side panel

* Adding backward compatibility and unit test

* running prettier

Signed-off-by: STEFANINI Axel (INTERN) <42176370+axel7083@users.noreply.github.com>

---------

Signed-off-by: STEFANINI Axel (INTERN) <42176370+axel7083@users.noreply.github.com>
2023-09-15 20:43:30 +00:00
James Liu a39980a337
chore(frontend): Improve structure of NewExperimentFC. (#9951)
* chore(frontend): Improve structure of NewExperimentFC.

* fix condition

* extend timeout for one test
2023-09-13 21:04:29 +00:00
Joe Li 6b7739d8b6
chore(frontend): Refactor NewExperiment to functional component (#9948)
* Add an alternative component for new experiment page.

* Add unit tests.
Assign default values for useState().

* Move the files to functional_components folder.
Update the imported files from absolute path.

* Move handing experiemnt creation error to useEffect
rename the create helper to createExperiment.

* Move redirection logic after createExperiment() is succeed to
useEffect().

* Fix dependency array for handling createExperiment() succeed case.

* Remove pipeline id in dependency array.
2023-09-01 17:39:35 +00:00
Joe Li bc5fe57378
chore(frontend): Refactor RecurringRunDetails to functional component (#9939)
* Add alternative functional component for recurring run v2 details.

* Remove unnecessary recurringRunDetailsV2FCProps

* Add unit tests.
Move the file to FC folder.
Add updatebanner logic for error case
Simplify the getInitialToolBar() helper.

* Add new feature key "functional" to enable rendering functional
component. (only for validation test now)

* Remove handling error in useQuery.
Change feature flags.
Rename folder.

* Resolve eslint warning

* Avoid use recurringRun and experiment (object) as trigger for
useEffect().

* Remove unused import.

* Extract set() logic from useQuery.
Add documentation for error handle useEffect().
2023-08-30 20:28:07 +00:00
James Liu eaec515812
chore(mlmd): Upgrade ML Metadata to 1.14.0. (#9856)
* chore(mlmd): Upgrade ML Metadata to 1.14.0.

* fix requirements, skip visualization.

* go mod tidy

* mlmd new enum in frontend

* mlmd license

* mlmd license again, using the failure test diff

* again
2023-08-22 17:18:09 +00:00
James Liu e8fefc90b1
chore(frontend): Update caniuse-lite in package-lock.json (#9857) 2023-08-21 22:45:08 +00:00
James Liu 83d7e719d0
fix(frontend): Introduce ALLOWED_ARTIFACT_DOMAIN_REGEX flag to prevent accessing undesired domains. Remove user input string from server response. (#9844)
* fix(frontend): Introduce ALLOWED_ARTIFACT_DOMAIN_REGEX flag to prevent accessing undesired domains. Remove user input string from server response.

1. Remove user query parameter string from server response.
2. Introduce ALLOWED_ARTIFACT_DOMAIN_REGEX to allow configuration of allowed domains querying.
3. By default, ALLOWED_ARTIFACT_DOMAIN_REGEX is match all. Default configuration is meant to be demo purpose and not for production.
4. Users can provide ALLOWED_ARTIFACT_DOMAIN_REGEX environment variable to restrict object storage endpoint querying domains.

* add test
2023-08-11 18:44:33 +00:00
Joe Li 443a67438a
test(frontend): Improve v1 frontend-integration-test (#9811)
* test: access specific field via "id".

* test: access specific field via "id".

* update snapshots.

* Add test to validata description changes.

* Change id def for input tag.

* Skip unit tests

* Add unit tests back and change id

* Add a helper for clear default value in input field.
Remove unnecessary 'tab' command

* Add comment to explain the parameter name for tests
Remove default value for runName before typing new value
2023-08-08 21:16:33 +00:00
Joe Li 0153430206
fix(frontend): Missing pipeline version name in new run page. (#9799) 2023-08-02 21:10:18 +00:00
Joe Li e5b3652616
chore(frontend): Avoid redundant v2 API call in PipelineDetails. (#9728)
* Change not put the versionId in URL to avoid redundant API call.

* Remove unnecessary setStateSafe()

* Add an unit tests to varify that the latest version is used if more than
one version are existing in the response of listPipelineVersions().
2023-07-20 18:21:24 +00:00
dependabot[bot] e532039d57
chore(deps): bump semver from 5.7.1 to 5.7.2 in /frontend/server (#9729)
Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v5.7.1...v5.7.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-13 18:25:25 +00:00
Joe Li 283f74b4ac
chore(frontend): Remove unnecessary getVersionTemplate() call in PipelineDetails (#9712)
* Remove unnecessary getVersionTemplate() api call in pipeline details
router.

* Add an unit test.

* Update unit tests.

* Separate the unit test for 2 cases (undefined and invalid pipeline_spec)

* Add log error for undefined pipeline_spec case.
2023-07-12 16:28:08 +00:00
dependabot[bot] 4f74148343
chore(deps): bump fast-xml-parser and @aws-sdk/credential-providers in /frontend/server (#9685)
Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) to 4.2.5 and updates ancestor dependency [@aws-sdk/credential-providers](https://github.com/aws/aws-sdk-js-v3/tree/HEAD/packages/credential-providers). These dependencies need to be updated together.


Updates `fast-xml-parser` from 4.2.4 to 4.2.5
- [Release notes](https://github.com/NaturalIntelligence/fast-xml-parser/releases)
- [Changelog](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/NaturalIntelligence/fast-xml-parser/compare/v4.2.4...v4.2.5)

Updates `@aws-sdk/credential-providers` from 3.348.0 to 3.359.0
- [Release notes](https://github.com/aws/aws-sdk-js-v3/releases)
- [Changelog](https://github.com/aws/aws-sdk-js-v3/blob/main/packages/credential-providers/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js-v3/commits/v3.359.0/packages/credential-providers)

---
updated-dependencies:
- dependency-name: fast-xml-parser
  dependency-type: indirect
- dependency-name: "@aws-sdk/credential-providers"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-10 22:55:06 +00:00
Joe Li ba322abb01
chore(frontend): Refactor resource selector for sharable usage in both v1 and v2 (#9693)
* Change the logic of ResourceSelector to make it is able to be used in
both v1 and v2.
Remove ResourceSelectorV2.

* Remove snapshot.
2023-07-08 00:17:53 +00:00
Joe Li d1be1d9ffd
fix(frontend): Recurring run card in experiment details page (#9697) 2023-07-06 00:39:57 +00:00
Joe Li 5ea193c2a8
chore(frontend): Remove redundant handleVersionSelected helper function (#9694)
* Remove redundant handleVersionSelected helper.

* Unify variable name in handleVersionSelected() helper.
2023-07-06 00:39:50 +00:00
dependabot[bot] 35f750703d
chore(deps): bump fast-xml-parser and @aws-sdk/credential-providers in /frontend/server (#9592)
Bumps [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser) to 4.2.4 and updates ancestor dependency [@aws-sdk/credential-providers](https://github.com/aws/aws-sdk-js-v3/tree/HEAD/packages/credential-providers). These dependencies need to be updated together.


Updates `fast-xml-parser` from 4.0.11 to 4.2.4
- [Release notes](https://github.com/NaturalIntelligence/fast-xml-parser/releases)
- [Changelog](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/NaturalIntelligence/fast-xml-parser/compare/v4.0.11...v4.2.4)

Updates `@aws-sdk/credential-providers` from 3.241.0 to 3.348.0
- [Release notes](https://github.com/aws/aws-sdk-js-v3/releases)
- [Changelog](https://github.com/aws/aws-sdk-js-v3/blob/main/packages/credential-providers/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-js-v3/commits/v3.348.0/packages/credential-providers)

---
updated-dependencies:
- dependency-name: fast-xml-parser
  dependency-type: indirect
- dependency-name: "@aws-sdk/credential-providers"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-26 19:22:14 +00:00
axel7083 536d93a1bf
fix(frontend): Splitting logsDetails into lines based on CR and LF. Fixes #9593 (#9594) 2023-06-22 23:48:08 +00:00
Chen Sun a727783abd
chore: remove 'dummy_root' in test samples (#9640)
* remove 'dummy_root' in test samples

* more cleanup
2023-06-21 23:51:41 +00:00
Joe Li 5d779e5a84
fix(frontend): Display experiment name if experiment is selected (#9599) 2023-06-09 21:13:59 +00:00
Joe Li c0e170d61d
fix(frontend): Choose version button should be disabled if no pipeline is selected (#9596)
selected.
2023-06-09 00:29:58 +00:00
Joe Li a029a73a58
fix(frontend): Choose version button is greyed out after closing pipeline selector (#9585)
pipeline selector.
2023-06-08 17:16:58 +00:00
Joe Li d1b7d98c2f
chore(frontend): Direct to v2 new run page by default (#9588)
* Direct to new run v2 page by default.

* Update parameter titleMessage

* Add error message for the case that no pipeline is selected

* Add unit test

* Resolve hook warning.

* Remove TODO
2023-06-07 22:07:04 +00:00
Chen Sun ee2102a9b5
chore(samples/backend/frontend): Update preload control-flow and data-passing pipelines to v2 (#9563)
* Update preload samples to v2 pipelines

* address review comments

* fix frontend test

* format frontend code

* update comment
2023-06-07 22:06:57 +00:00
Joe Li 5c15ee51b3
feature(frontend): Support pipeline root in clone run (#9582)
* fill the pipeline root field if it is existing clonedRuntimConfig.

* Add unit test.
Update the logic of setting pipelineRoot.

* Change the example pipeline root to another dummy root ('gs://dummy_pipeline_root')

* Change the clone root in NewRunParameterV2.test
2023-06-07 17:55:57 +00:00
Joe Li ee63f9187c
fix(frontend): Pipeline version is not updated in new run page (#9578) 2023-06-07 01:02:56 +00:00
Joe Li 8613a4504a
fix(frontend): Parameter is missing after upload pipeline in pipeline selector (#9579)
After uploading a pipeline in pipeline selector, call the helper as
well.
2023-06-07 00:05:56 +00:00
Joe Li 745e2a6e0b
fix(frontend): Mismatched error text in new run page (#9569)
Update unit tests and snapshots.
2023-06-06 18:18:32 +00:00
Joe Li a303e033c9
fix(frontend): Incorrect page text for empty pipeline. (#9560) 2023-06-06 01:31:31 +00:00
Joe Li 23739e9be3
fix(frontend): Pipeline Root is not used when provided during New Run creation (#9561) 2023-06-02 22:59:20 +00:00
Joe Li a2fa55f96c
fix(frontend): Missing pipeline info for "Clone recurring run" after viewing pipeline (#9559) 2023-06-02 20:40:07 +00:00
Chen Sun 10880f03d8
chore(frontend): restore yarn-licenses (#9541) 2023-05-31 20:16:05 +00:00
Joe Li 10e639ed4f
fix(frontend): Unexpected page crash when clicking artifact node. (#9519)
* Catch the error thrown by parseStoragePath().
Directly render unsupported URI rather than showing banner error.

* Change back to render banner but not error mode. Use info mode instead.
2023-05-26 22:00:59 +00:00
Joe Li ef9781b35a
fix(frontend): Make pipeline definition in YAML tab more readable (#9511)
* Make the text in YAML tab preview in v1 pipeline details more readable.

* Add documentation.

* Fix the logic in PipelineSpecTabContent rather than convert the v1
template to yaml in the parent component <PipelineDetailsV1>

* Remove the v2 template check in PipelineSpecTabContent.

* Remove unused import
2023-05-26 17:26:21 +00:00
Joe Li 9e5e6c6250
fix(frontend): Choose button is disable even if pipeline is already selected (after uploading a new pipeline) (#9499)
* Fix greyed choose button for pipeline version after pipeline is already
selected.

* Add unit test.
2023-05-25 22:32:28 +00:00
Joe Li c28d41bbc0
fix(frontend): Incorrect selected version in summary card (#9463)
* Fix incorrect selected version

* Add unit tests
2023-05-25 22:32:20 +00:00
Joe Li 43cbb7eec4
fix(frontend): Toolbar in pipeline details (from run) should only have "Clone run" button (#9467)
* Fix the toolbars button for pipeline details (from run)
Create run -> Clone run
Upload pipeline is removed

* Update unit test.
2023-05-25 21:37:27 +00:00
Joe Li fda2c5c62f
feature(frontend): Support non-English characters and special characters in pipeline "display" name (#9461)
* Remove naming precheck for uploading / creating pipeline.

* Remove unit test for invalid name.
2023-05-25 21:37:20 +00:00
Joe Li 70219b56de
fix(frontend): Run name should be empty if no pipeline is selected (#9497) 2023-05-25 20:17:20 +00:00
Chen Sun b757ef5293
chore: temporarily disable frontend license tool (#9509)
* temporarily disable frontend license tool

* Update Dockerfile
2023-05-25 18:35:21 +00:00
Joe Li 2623574cd8
feature(frontent): Support both "Flat" and "Grouped" view for Artifact list (#9470)
render.
Change the router for artifact list to artifact list router component.
Add group artifact list logic back to artifact list implementation.
2023-05-23 19:00:37 +00:00
Joe Li aa93e59fb5
fix(frontend): Parameter is missing in run creation page. Closes #9441 (#9458) 2023-05-19 19:02:47 +00:00
Joe Li 5cf4f1969e
fix(frontend): Incorrect page title after switching to another pipeline version. (#9450) 2023-05-18 23:38:53 +00:00
Lingqing Gan 724445064b
chore: change sample PVC access modes to ReadWriteOnce (#9425)
* change sample access modes to ReadWriteOnce

* change test data

* change samples to use ReadWriteOnce
2023-05-18 01:22:06 +00:00
Yihong Wang bb9dc67572
feat(frontend): make container name configurable (#9433)
* feat(frontend): make container name configurable

Add an UIConfig param to specify the container name in a pod
where logs are retrieved. The default container name for
the Argo is `main`. However, in Tekton, the main container name
contains the `step-` prefix. Make this configurable to support
other orchestrations.

Signed-off-by: Yihong Wang <yh.wang@ibm.com>

* fix test case error

add `undefined` as the expected `logContainerName` param

Signed-off-by: Yihong Wang <yh.wang@ibm.com>

* address the comment

use default value `main` in `getPodLogsStreamFromK8s`
same as `getPodLogs`

Signed-off-by: Yihong Wang <yh.wang@ibm.com>

* only pass podLogContainerName

Signed-off-by: Yihong Wang <yh.wang@ibm.com>

---------

Signed-off-by: Yihong Wang <yh.wang@ibm.com>
2023-05-17 23:37:06 +00:00
Joe Li f915195446
feature(frontent): Support both "Flat" and "Group" view for Execution list (#9440)
* Create ExecutionListRouter.tsx to determine which type of view to
render.
Change the router for execution list to execution list router component.
Add group execution list logic back to execution list implementation.

* Change name to ExecutionListSwitcher.
Add unit tests for execution list switcher.

* Change props name to isGroupView

* Rename tabs to "Default" and "Grouped".
Fix typos.
Add isGroupView in ExecutionList props (ExecutionList.test.tsx).
2023-05-17 20:59:06 +00:00
Chen Sun 6d8f7b8672
chore: add license field to frontend/package.json (#9408) 2023-05-12 14:06:37 -07:00
Joe Li 260e5ebe50
fix(frontend): Show summary button and summary card in pipeline details is disappeared. (#9404)
* Fix summary button is disappeared.

* Fix comment
2023-05-12 20:36:32 +00:00
Joe Li 66ff81e5f2
fix(frontend) Format container information in pipeline details side panel (#9387)
* Use PipelineDeploymentConfig and PipelineDeploymentConfig_ExecutorSpec
in WorkflowUtils.
Format the "command" in pipeline details side panel.

* Fix unit tests

* Remove unnecessary export

* Fix logic in WorkflowUtils to avoid unexpected errors.
Add comment to explain why 2 'sh' are found.
Add pre-wrap style for arg as well.

* Rename ts_pipelinespec to pipelineSpec.

* Fix comment in unit test.
Remove unnecessary checking item in if condition.
2023-05-12 19:36:39 +00:00
Joe Li ff146e4014
feature(frontend): Flatten and paginate the artifact list (#9370)
* Enable pagination of artifact list (add listOperationOpts) in
getArtifact() call).

* Add return value (nextPageToken) for reload()
remove console.

* Abstract the logic of getting "flattened" row from artifacts.
Change getRowsFromArtifacts() to getGroupedRowsFromArtifacts()
Render flattend rows rather than grouped rows.

* Add unit tests to validate the implementation of pagination.
Add TODO.

* Change to absolute path.

* Fix unit tests.
Remove unnecessary if condition.

* Disable sort functionality (incompleted).
Add TODO.

* Remove unused import

* Fix unit tests

* Add testBestPractices().
2023-05-12 19:36:32 +00:00