Skip to content

Commit

Permalink
feat(admin-ui): fix issues with material list #43
Browse files Browse the repository at this point in the history
  • Loading branch information
syntrydy committed Feb 15, 2022
1 parent 87eb557 commit 0a98d9e
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ function ScriptListTable({ scripts, loading, dispatch, permissions }) {
actionsColumnIndex: -1,
}}
detailPanel={(rowData) => {
return <CustomScriptDetailPage row={rowData} />
return <CustomScriptDetailPage row={rowData.rowData} />
}}
/>
</GluuViewWrapper>
Expand Down
2 changes: 1 addition & 1 deletion admin-ui/plugins/admin/components/Roles/UiRoleListPage.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useEffect, useState } from 'react'
import MaterialTable from '@material-table/core';
import MaterialTable from '@material-table/core'
import { Paper } from '@material-ui/core'
import UiRoleDetailPage from './UiRoleDetailPage'
import RoleAddDialogForm from './RoleAddDialogForm'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ function ClientListPage({ clients, permissions, scopes, loading, dispatch }) {
actionsColumnIndex: -1,
}}
detailPanel={(rowData) => {
return <ClientDetailPage row={rowData} scopes={scopes} />
return <ClientDetailPage row={rowData.rowData} scopes={scopes} />
}}
/>
</GluuViewWrapper>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { SCOPE } from '../../../../app/utils/ApiResources'
import { useTranslation } from 'react-i18next'

function ScopeDetailPage({ row }) {
console.log("========================="+JSON.stringify(row))
const { t } = useTranslation()
function getBadgeTheme(status) {
if (status) {
Expand Down Expand Up @@ -76,7 +77,7 @@ function ScopeDetailPage({ row }) {
<Row>
<Col sm={3}>{t('fields.attributes')}:</Col>
<Col sm={9}>
{Object.keys(row.attributes).map((item, key) => (
{Object.keys(row.attributes || []).map((item, key) => (
<GluuFormDetailRow
key={key}
label={item}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ function ScopeListPage({ scopes, permissions, loading, dispatch }) {
{
title: `${t('fields.scope_type')}`,
field: 'scopeType',
render: (rowData) => <Badge color="primary">{rowData.scopeType}</Badge>,
render: (rowData) => (
<Badge key={rowData.inum} color="primary">
{rowData.scopeType}
</Badge>
),
},
]

Expand Down Expand Up @@ -188,7 +192,7 @@ function ScopeListPage({ scopes, permissions, loading, dispatch }) {
actionsColumnIndex: -1,
}}
detailPanel={(rowData) => {
return <ScopeDetailPage row={rowData} />
return <ScopeDetailPage row={rowData.rowData} />
}}
/>
</GluuViewWrapper>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ function AttributeListPage({ attributes, permissions, loading, dispatch }) {
actionsColumnIndex: -1,
}}
detailPanel={(rowData) => {
return <AttributeDetailPage row={rowData} />
return <AttributeDetailPage row={rowData.rowData} />
}}
/>
</GluuViewWrapper>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ function LdapListPage({
detailPanel={(rowData) => {
return (
<LdapDetailPage
row={rowData}
row={rowData.rowData}
testLdapConnection={testLdapConnect}
/>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ function SqlListPage({
detailPanel={(rowData) => {
return (
<SqlDetailPage
row={rowData}
row={rowData.rowData}
testSqlConnection={testSqlConnect}
/>
)
Expand Down

0 comments on commit 0a98d9e

Please sign in to comment.