Skip to content

Commit 4db4057

Browse files
authored
convert policy item to string label (stolostron#4014)
Signed-off-by: Randy Bruno Piverger <rbrunopi@redhat.com>
1 parent dd91b8b commit 4db4057

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

frontend/src/routes/Governance/policies/Policies.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,11 @@ export default function PoliciesPage() {
228228
isDefault: false,
229229
isFirstVisitChecked: true,
230230
exportContent: (item) => {
231-
return item.source ?? '-'
231+
let type = item.source ? item.source : '-'
232+
if (typeof item.source === 'object') {
233+
type = getResourceLabel(item.source.props?.appRepos[0]?.type?.toLowerCase() ?? '', 1, t)
234+
}
235+
return type
232236
},
233237
},
234238
{

0 commit comments

Comments
 (0)