Skip to content

Commit

Permalink
Fix [Artifacts] add partition-by if Tag filter is set to "all" (#3042)
Browse files Browse the repository at this point in the history
  • Loading branch information
Taras-Hlukhovetskyi authored Jan 21, 2025
1 parent 0d68d84 commit 985bde8
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 8 deletions.
4 changes: 4 additions & 0 deletions src/common/HistoryBackLink/historyBackLink.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,9 @@
flex-shrink: 0;
color: $topaz;
}

svg {
min-width: 18px;
}
}
}
6 changes: 4 additions & 2 deletions src/components/Datasets/Datasets.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ import {
BE_PAGE,
BE_PAGE_SIZE,
ITERATIONS_FILTER,
SHOW_ITERATIONS
SHOW_ITERATIONS,
TAG_FILTER,
TAG_FILTER_ALL_ITEMS
} from '../../constants'
import { fetchArtifactTags, fetchDataSets, removeDataSets } from '../../reducers/artifactsReducer'
import {
Expand Down Expand Up @@ -117,7 +119,7 @@ const Datasets = ({ isAllVersions = false }) => {
requestParams.name = params.datasetName
setDatasetVersions([])
} else {
if (filters[ITERATIONS_FILTER] !== SHOW_ITERATIONS) {
if (filters[ITERATIONS_FILTER] !== SHOW_ITERATIONS || filters[TAG_FILTER] === TAG_FILTER_ALL_ITEMS) {
requestParams['partition-by'] = 'project_and_name'
requestParams['partition-sort-by'] = 'updated'
}
Expand Down
6 changes: 4 additions & 2 deletions src/components/Documents/Documents.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ import {
GROUP_BY_NONE,
ITERATIONS_FILTER,
REQUEST_CANCELED,
SHOW_ITERATIONS
SHOW_ITERATIONS,
TAG_FILTER,
TAG_FILTER_ALL_ITEMS
} from '../../constants'
import { fetchArtifactTags, fetchDocuments, removeDocuments } from '../../reducers/artifactsReducer'
import { getFilterTagOptions, setFilters } from '../../reducers/filtersReducer'
Expand Down Expand Up @@ -111,7 +113,7 @@ const Documents = ({ isAllVersions = false }) => {
requestParams.name = params.documentName
setDocumentVersions([])
} else {
if (filters[ITERATIONS_FILTER] !== SHOW_ITERATIONS) {
if (filters[ITERATIONS_FILTER] !== SHOW_ITERATIONS || filters[TAG_FILTER] === TAG_FILTER_ALL_ITEMS) {
requestParams['partition-by'] = 'project_and_name'
requestParams['partition-sort-by'] = 'updated'
}
Expand Down
6 changes: 4 additions & 2 deletions src/components/Files/Files.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ import {
GROUP_BY_NONE,
ITERATIONS_FILTER,
REQUEST_CANCELED,
SHOW_ITERATIONS
SHOW_ITERATIONS,
TAG_FILTER,
TAG_FILTER_ALL_ITEMS
} from '../../constants'
import {
checkForSelectedFile,
Expand Down Expand Up @@ -113,7 +115,7 @@ const Files = ({ isAllVersions = false }) => {
requestParams.name = params.fileName
setFileVersions([])
} else {
if (filters[ITERATIONS_FILTER] !== SHOW_ITERATIONS) {
if (filters[ITERATIONS_FILTER] !== SHOW_ITERATIONS || filters[TAG_FILTER] === TAG_FILTER_ALL_ITEMS) {
requestParams['partition-by'] = 'project_and_name'
requestParams['partition-sort-by'] = 'updated'
}
Expand Down
6 changes: 4 additions & 2 deletions src/components/ModelsPage/Models/Models.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ import {
BE_PAGE,
BE_PAGE_SIZE,
ITERATIONS_FILTER,
SHOW_ITERATIONS
SHOW_ITERATIONS,
TAG_FILTER,
TAG_FILTER_ALL_ITEMS
} from '../../../constants'
import {
checkForSelectedModel,
Expand Down Expand Up @@ -129,7 +131,7 @@ const Models = ({ fetchModelFeatureVector, isAllVersions }) => {
requestParams.name = params.modelName
setModelVersions([])
} else {
if (filters[ITERATIONS_FILTER] !== SHOW_ITERATIONS) {
if (filters[ITERATIONS_FILTER] !== SHOW_ITERATIONS || filters[TAG_FILTER] === TAG_FILTER_ALL_ITEMS) {
requestParams['partition-by'] = 'project_and_name'
requestParams['partition-sort-by'] = 'updated'
}
Expand Down

0 comments on commit 985bde8

Please sign in to comment.