diff --git a/web/src/pages/Tenants.jsx b/web/src/pages/Tenants.jsx
index 3b98d03edb..1ca2c35a7d 100644
--- a/web/src/pages/Tenants.jsx
+++ b/web/src/pages/Tenants.jsx
@@ -16,12 +16,26 @@ import * as React from 'react'
import { connect } from 'react-redux'
import PropTypes from 'prop-types'
import { Link } from 'react-router-dom'
-import { Table } from 'patternfly-react'
-import { PageSection, PageSectionVariants } from '@patternfly/react-core'
-
+import {
+ BuildIcon,
+ CubeIcon,
+ CubesIcon,
+ DesktopIcon,
+ FolderIcon,
+ HomeIcon,
+ RepositoryIcon,
+ TrendUpIcon
+} from '@patternfly/react-icons'
+import {
+ Table,
+ TableHeader,
+ TableBody,
+ TableVariant,
+} from '@patternfly/react-table'
import { Fetching } from '../containers/Fetching'
import { fetchTenantsIfNeeded } from '../actions/tenants'
-
+import { PageSection, PageSectionVariants } from '@patternfly/react-core'
+import { IconProperty } from '../containers/build/Misc'
class TenantsPage extends React.Component {
static propTypes = {
@@ -47,54 +61,65 @@ class TenantsPage extends React.Component {
return
}
- const tenants = remoteData.tenants
- const headerFormat = value =>
{value}
- const cellFormat = (value) => (
- {value})
- const columns = []
- const myColumns = [
- 'name', 'status', 'projects', 'jobs', 'builds', 'buildsets',
- 'projects count', 'queue']
- myColumns.forEach(column => {
- let prop = column
- if (column === 'projects count') {
- prop = 'projects'
- } else if (column === 'projects') {
- prop = 'projects_link'
+ const tenants = remoteData.tenants.map((tenant) => {
+ return {
+ cells: [
+ {title: ({tenant.name})},
+ {title: (Status)},
+ {title: (Projects)},
+ {title: (Jobs)},
+ {title: (Builds)},
+ {title: (Buildsets)},
+ tenant.projects,
+ tenant.queue
+ ]}})
+ const columns = [
+ {
+ title: } value="Name"/>,
+ dataLabel: 'Name',
+ },
+ {
+ title: } value="Status"/>,
+ dataLabel: 'Status',
+ },
+ {
+ title: } value="Projects"/>,
+ dataLabel: 'Projects',
+ },
+ {
+ title: } value="Jobs"/>,
+ dataLabel: 'Jobs',
+ },
+ {
+ title: } value="Builds"/>,
+ dataLabel: 'Builds',
+ },
+ {
+ title: } value="Buildsets"/>,
+ dataLabel: 'Buildsets',
+ },
+ {
+ title: } value="Project count"/>,
+ dataLabel: 'Project count',
+ },
+ {
+ title: } value="Queue"/>,
+ dataLabel: 'Queue',
}
- columns.push({
- header: {label: column,
- formatters: [headerFormat]},
- property: prop,
- cell: {formatters: [cellFormat]}
- })
- })
- tenants.forEach(tenant => {
- tenant.status = (
- Status)
- tenant.projects_link = (
- Projects)
- tenant.jobs = (
- Jobs)
- tenant.builds = (
- Builds)
- tenant.buildsets = (
- Buildsets)
- })
+ ]
+
return (
-
-
-
-
+
)
}