Skip to content

Commit

Permalink
Merge pull request #1610 from SciCatProject/fix-ui-bugs
Browse files Browse the repository at this point in the history
fix: fixed issues with public/my data view buttons, sorting, and metadataKeys list on dataset table
  • Loading branch information
nitrosx authored Oct 13, 2024
2 parents f19016b + ea95b5f commit dd59049
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/app/datasets/dataset-table/dataset-table.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
dataset.size >= 4000000000
? 35 + (5 * dataset.size) / 40000000000
: 5 + (15 * dataset.size) / 4000000000,
background: dataset.size >= 4000000000 ? 'red' : 'green'
background: dataset.size >= 4000000000 ? 'red' : 'green',
}"
>
 
Expand Down Expand Up @@ -292,7 +292,7 @@
[matTooltip]="
[
(dataset.datasetlifecycle || {}).archiveStatusMessage,
(dataset.datasetlifecycle || {}).retrieveStatus
(dataset.datasetlifecycle || {}).retrieveStatus,
].join('\n')
"
>
Expand Down
15 changes: 12 additions & 3 deletions src/app/state-management/effects/datasets.effects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ export class DatasetEffects {

fetchDatasets$ = createEffect(() => {
return this.actions$.pipe(
ofType(fromActions.fetchDatasetsAction),
ofType(
fromActions.fetchDatasetsAction,
fromActions.setPublicViewModeAction,
fromActions.sortByColumnAction,
),
concatLatestFrom(() => this.fullqueryParams$),
map(([action, params]) => params),
mergeMap(({ query, limits }) =>
Expand All @@ -63,7 +67,11 @@ export class DatasetEffects {

fetchFacetCounts$ = createEffect(() => {
return this.actions$.pipe(
ofType(fromActions.fetchFacetCountsAction),
ofType(
fromActions.fetchFacetCountsAction,
fromActions.setPublicViewModeAction,
fromActions.sortByColumnAction,
),
concatLatestFrom(() => this.fullfacetParams$),
map(([action, params]) => params),
mergeMap(({ fields, facets }) =>
Expand All @@ -89,7 +97,8 @@ export class DatasetEffects {
map(([action, params]) => params),
mergeMap(({ query }) => {
const parsedQuery = JSON.parse(query);
parsedQuery.metadataKey = "";
// TODO: remove this line below after metadataKey endpoint is refactored in the backend
// parsedQuery.metadataKey = "";
return this.datasetApi.metadataKeys(JSON.stringify(parsedQuery)).pipe(
map((metadataKeys) =>
fromActions.fetchMetadataKeysCompleteAction({ metadataKeys }),
Expand Down
2 changes: 1 addition & 1 deletion src/app/users/user-settings/user-settings.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ mat-card {
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
max-width: 30vw;
max-width: 10em;
}

.config-button {
Expand Down

0 comments on commit dd59049

Please sign in to comment.