forked from Katello/katello
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BZ #1924265 - Custom subscriptions showing entitlements as -1 on Subs…
…criptions page Fixes #31864 - Add cell formatter for entitlements column (Katello#9163) * Fixes #31864 - Add cell formatter for entitlements column * Refs #31864 - Make Unlimited and NA not editable * Refs #31864 - update editable check (cherry picked from commit 18a7153)
- Loading branch information
1 parent
27ec9d8
commit 55fe8a0
Showing
5 changed files
with
61 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
webpack/components/pf3Table/formatters/entitlementsValueFormatter.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import React from 'react'; | ||
import { Table as PfTable } from 'patternfly-react'; | ||
import { getEntitlementsDisplayValue } from '../../../scenes/Subscriptions/components/SubscriptionsTable/SubscriptionsTableHelpers.js'; | ||
|
||
export default (rawValue, additionalData) => { | ||
const { available, upstream_pool_id: upstreamPoolId, collapsible } = additionalData.rowData; | ||
const value = getEntitlementsDisplayValue({ | ||
rawValue, available, collapsible, upstreamPoolId, | ||
}); | ||
|
||
return ( | ||
<PfTable.Cell> | ||
{value} | ||
</PfTable.Cell> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters