Skip to content

Commit

Permalink
Add name field
Browse files Browse the repository at this point in the history
  • Loading branch information
jakemcdermott committed Feb 22, 2021
1 parent dd016ab commit 45af71d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import OrganizationExecEnvListItem from './OrganizationExecEnvListItem';
const QS_CONFIG = getQSConfig('organizations', {
page: 1,
page_size: 20,
order_by: 'image',
order_by: 'name',
});

function OrganizationExecEnvList({ i18n, organization }) {
Expand Down Expand Up @@ -79,10 +79,15 @@ function OrganizationExecEnvList({ i18n, organization }) {
toolbarSearchableKeys={searchableKeys}
toolbarRelatedSearchableKeys={relatedSearchableKeys}
toolbarSearchColumns={[
{
name: i18n._(t`Name`),
key: 'name__icontains',
isDefault: true,
},
{
name: i18n._(t`Image`),
key: 'image__icontains',
isDefault: true,
isDefault: false,
},
{
name: i18n._(t`Created By (Username)`),
Expand All @@ -94,6 +99,10 @@ function OrganizationExecEnvList({ i18n, organization }) {
},
]}
toolbarSortColumns={[
{
name: i18n._(t`Name`),
key: 'name',
},
{
name: i18n._(t`Image`),
key: 'image',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,19 @@ function OrganizationExecEnvListItem({
<DataListItemCells
dataListCells={[
<DataListCell
key="image"
aria-label={i18n._(t`Execution environment image`)}
key="name"
aria-label={i18n._(t`Execution environment name`)}
>
<Link to={`${detailUrl}`}>
<b>{executionEnvironment.image}</b>
<b>{executionEnvironment.name}</b>
</Link>
</DataListCell>,
<DataListCell
key="image"
aria-label={i18n._(t`Execution environment image`)}
>
{executionEnvironment.image}
</DataListCell>,
]}
/>
</DataListItemRow>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ describe('<OrganizationExecEnvListItem/>', () => {
const executionEnvironment = {
id: 1,
image: 'https://registry.com/r/image/manifest',
name: 'foo',
organization: 1,
credential: null,
};
Expand Down

0 comments on commit 45af71d

Please sign in to comment.