Skip to content

Commit

Permalink
feat(config): sw-2353 activate json export for products
Browse files Browse the repository at this point in the history
  • Loading branch information
cdcabrera committed Jun 22, 2024
1 parent ae7e250 commit 05f2c71
Show file tree
Hide file tree
Showing 12 changed files with 45 additions and 6 deletions.
4 changes: 4 additions & 0 deletions src/config/product.openshiftContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,10 @@ const config = {
id: RHSM_API_QUERY_SET_TYPES.GRANULARITY,
isSecondary: true,
position: SelectPosition.right
},
{
id: 'export',
isItem: true
}
]
};
Expand Down
4 changes: 4 additions & 0 deletions src/config/product.openshiftDedicated.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,10 @@ const config = {
id: 'rangedMonthly',
isSecondary: true,
position: SelectPosition.right
},
{
id: 'export',
isItem: true
}
]
};
Expand Down
4 changes: 4 additions & 0 deletions src/config/product.openshiftMetrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,10 @@ const config = {
id: 'rangedMonthly',
isSecondary: true,
position: SelectPosition.right
},
{
id: 'export',
isItem: true
}
]
};
Expand Down
4 changes: 4 additions & 0 deletions src/config/product.rhacs.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,10 @@ const config = {
id: 'rangedMonthly',
isSecondary: true,
position: SelectPosition.right
},
{
id: 'export',
isItem: true
}
]
};
Expand Down
4 changes: 4 additions & 0 deletions src/config/product.rhel.js
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,10 @@ const config = {
},
{
id: RHSM_API_QUERY_SET_TYPES.CATEGORY
},
{
id: 'export',
isItem: true
}
]
};
Expand Down
4 changes: 4 additions & 0 deletions src/config/product.rhelElsPayg.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,10 @@ const config = {
id: 'rangedMonthly',
isSecondary: true,
position: SelectPosition.right
},
{
id: 'export',
isItem: true
}
]
};
Expand Down
4 changes: 4 additions & 0 deletions src/config/product.rhods.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,10 @@ const config = {
id: 'rangedMonthly',
isSecondary: true,
position: SelectPosition.right
},
{
id: 'export',
isItem: true
}
]
};
Expand Down
4 changes: 4 additions & 0 deletions src/config/product.rosa.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,10 @@ const config = {
id: 'rangedMonthly',
isSecondary: true,
position: SelectPosition.right
},
{
id: 'export',
isItem: true
}
]
};
Expand Down
4 changes: 4 additions & 0 deletions src/config/product.satellite.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,10 @@ const config = {
},
{
id: RHSM_API_QUERY_SET_TYPES.CATEGORY
},
{
id: 'export',
isItem: true
}
]
};
Expand Down
6 changes: 3 additions & 3 deletions src/redux/hooks/useReactRedux.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ const useSelectors = (
idMultiSelectorResponse[id] = listMultiSelectorResponse[index];
});

return idMultiSelectorResponse;
return idMultiSelectorResponse || {};
}

return listMultiSelectorResponse;
return listMultiSelectorResponse || [];
};

/**
Expand Down Expand Up @@ -174,7 +174,7 @@ const useSelectorsResponse = (selectors, { useSelectors: useAliasSelectors = use
updatedSelectorResponse.forEach(response => {
const id = (!isSelectorResponseArray && response?.[0]) || null;

const updatedResponse = (isSelectorResponseArray && response) || response?.[1] || response;
const updatedResponse = (isSelectorResponseArray && response) || response?.[1] || response || {};
const isServiceResponse =
typeof updatedResponse.cancelled === 'boolean' ||
typeof updatedResponse.error === 'boolean' ||
Expand Down
7 changes: 4 additions & 3 deletions tests/__snapshots__/code.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ exports[`General code checks should only have specific console.[warn|log|info|er
"services/common/helpers.js:105: console.error(",
"services/common/serviceConfig.js:155: console.warn(normalizeError);",
"services/common/serviceConfig.js:179: console.warn(normalizeError);",
"services/common/serviceConfig.js:263: console.error(err);",
"services/common/serviceConfig.js:277: console.error(err);",
"services/common/serviceConfig.js:308: console.error(err);",
"services/common/serviceConfig.js:277: console.error(err);",
"services/common/serviceConfig.js:291: console.error(err);",
"services/common/serviceConfig.js:320: console.error(err);",
"services/common/serviceConfig.js:336: console.error(err);",
"services/common/serviceConfig.js:348: console.error(err);",
]
`;
2 changes: 2 additions & 0 deletions tests/__snapshots__/dist.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,7 @@ exports[`Build distribution should match a specific file output 1`] = `
"./dist/js/8795*js",
"./dist/js/8803*js",
"./dist/js/8923*js",
"./dist/js/9006*js",
"./dist/js/9026*js",
"./dist/js/9067*js",
"./dist/js/9205*js",
Expand Down Expand Up @@ -950,6 +951,7 @@ exports[`Build distribution should match a specific file output 1`] = `
"./dist/sourcemaps/8795*map",
"./dist/sourcemaps/8803*map",
"./dist/sourcemaps/8923*map",
"./dist/sourcemaps/9006*map",
"./dist/sourcemaps/9026*map",
"./dist/sourcemaps/9205*map",
"./dist/sourcemaps/9387*map",
Expand Down

0 comments on commit 05f2c71

Please sign in to comment.