From 6c95a762031de3e5c7b434d2112de2329262cae0 Mon Sep 17 00:00:00 2001 From: illia-prokopchuk <78905712+illia-prokopchuk@users.noreply.github.com> Date: Tue, 7 Nov 2023 18:18:45 +0200 Subject: [PATCH] Impl [Batch Run] Model Training (#2066) --- src/actions/functions.js | 4 +- src/common/NameFilter/nameFilter.scss | 2 + src/common/TargetPath/targetPath.util.js | 2 +- .../ArtifactsActionBar/ArtifactsActionBar.js | 39 ++++++++++------- src/components/Datasets/Datasets.js | 8 ++-- src/components/Datasets/DatasetsView.js | 14 ++++--- src/components/Datasets/datasets.util.js | 29 ++++++++++++- src/components/Files/FilesView.js | 14 ++++--- src/components/JobWizard/JobWizard.js | 24 ++++++++++- src/components/JobWizard/JobWizard.util.js | 28 +++++++++++-- .../JobWizardFunctionSelection.js | 42 ++++++++++++------- .../jobWizardFunctionSelection.util.js | 18 ++++++++ .../JobWizardRunDetails.js | 4 +- src/components/ModelsPage/Models/Models.js | 10 +++++ .../ModelsPage/Models/ModelsView.js | 28 +++++++++---- .../ProjectOverview/ProjectOverview.util.js | 5 +-- src/scss/main.scss | 6 ++- src/utils/generateTemplatesCategories.js | 16 ++++--- src/utils/panelPathScheme.js | 2 +- 19 files changed, 217 insertions(+), 78 deletions(-) diff --git a/src/actions/functions.js b/src/actions/functions.js index 42cbe89cd..01ccb07ee 100644 --- a/src/actions/functions.js +++ b/src/actions/functions.js @@ -287,13 +287,13 @@ const functionsActions = { type: FETCH_HUB_FUNCTION_TEMPLATE_FAILURE, payload: err }), - fetchHubFunctions: () => dispatch => { + fetchHubFunctions: allowedHubFunctions => dispatch => { dispatch(functionsActions.fetchHubFunctionsBegin()) return functionsApi .getHubFunctions() .then(({ data: functionTemplates }) => { - const templatesData = generateHubCategories(functionTemplates.catalog) + const templatesData = generateHubCategories(functionTemplates.catalog, allowedHubFunctions) dispatch(functionsActions.setHubFunctions(templatesData)) diff --git a/src/common/NameFilter/nameFilter.scss b/src/common/NameFilter/nameFilter.scss index 54382f0c9..fe294be76 100644 --- a/src/common/NameFilter/nameFilter.scss +++ b/src/common/NameFilter/nameFilter.scss @@ -16,6 +16,8 @@ such restriction. */ .name-filter { + min-width: 180px; + &__icon { cursor: pointer; } diff --git a/src/common/TargetPath/targetPath.util.js b/src/common/TargetPath/targetPath.util.js index b21f46d96..16def23a2 100644 --- a/src/common/TargetPath/targetPath.util.js +++ b/src/common/TargetPath/targetPath.util.js @@ -275,7 +275,7 @@ export const generateComboboxMatchesList = ( export const generateArtifactsList = artifacts => { const generatedArtifacts = artifacts .map(artifact => { - const key = artifact.link_iteration ? artifact.link_iteration.db_key : artifact.key ?? '' + const key = artifact.link_iteration?.db_key || artifact.db_key || artifact.key || '' return { label: key, id: key diff --git a/src/components/ArtifactsActionBar/ArtifactsActionBar.js b/src/components/ArtifactsActionBar/ArtifactsActionBar.js index da408556c..894298281 100644 --- a/src/components/ArtifactsActionBar/ArtifactsActionBar.js +++ b/src/components/ArtifactsActionBar/ArtifactsActionBar.js @@ -40,7 +40,7 @@ import detailsActions from '../../actions/details' import { ReactComponent as RefreshIcon } from 'igz-controls/images/refresh.svg' function ArtifactsActionBar({ - actionButton, + actionButtons, cancelRequest, filterMenuName, handleRefresh, @@ -154,13 +154,18 @@ function ArtifactsActionBar({