Skip to content

Commit

Permalink
fix(config): sw-106 disable category, metric sort (#1038)
Browse files Browse the repository at this point in the history
* config, rhel disable sort, metric dash display
* rhsmSchemas, lowercase response, allow empty
  • Loading branch information
cdcabrera authored Jan 23, 2023
1 parent 17b739c commit 6f7e745
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/config/__tests__/__snapshots__/product.rhel.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ exports[`Product RHEL config should apply hosts inventory configuration: filtere
</React.Fragment>,
},
{
"title": "",
"title": "--",
},
{
"title": <DateFormat
Expand Down Expand Up @@ -343,7 +343,7 @@ exports[`Product RHEL config should apply hosts inventory configuration: filtere
</React.Fragment>,
},
{
"title": "",
"title": "--",
},
{
"title": "",
Expand Down
5 changes: 3 additions & 2 deletions src/config/product.rhel.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,13 @@ const config = {
''}
</React.Fragment>
),
isSortable: true,
isSortable: false,
cellWidth: 20
},
{
id: RHSM_API_PATH_METRIC_TYPES.SOCKETS,
isSortable: true,
cell: ({ [RHSM_API_PATH_METRIC_TYPES.SOCKETS]: sockets } = {}) => sockets?.value || '--',
isSortable: false,
isWrappable: true,
cellWidth: 15
},
Expand Down
4 changes: 2 additions & 2 deletions src/services/rhsm/rhsmSchemas.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ const instancesMetaSchema = metaResponseSchema
*/
const instancesItem = Joi.object({
inventory_id: Joi.string().optional().allow(null),
category: Joi.string().optional().allow(null),
category: Joi.string().lowercase().optional().allow(null),
display_name: Joi.string().optional().allow(null),
billing_provider: Joi.string().optional().allow(null),
billing_provider: Joi.string().lowercase().optional().allow(null, ''),
billing_account_id: Joi.string().optional().allow(null),
measurements: Joi.array().default([]),
number_of_guests: Joi.number().integer().default(0),
Expand Down

0 comments on commit 6f7e745

Please sign in to comment.