Skip to content

Commit b143cb0

Browse files
authored
Merge pull request #1242 from yaacov/add-status-to-jobs
🐾 Add status column to jobs and pvcs tables
2 parents 62640bb + 1ad4701 commit b143cb0

File tree

1 file changed

+26
-34
lines changed

1 file changed

+26
-34
lines changed

packages/forklift-console-plugin/src/modules/Plans/views/details/tabs/VirtualMachines/Migration/MigrationVirtualMachinesRowExtended.tsx

Lines changed: 26 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ import { ResourceLink } from '@openshift-console/dynamic-plugin-sdk';
1717
import Status from '@openshift-console/dynamic-plugin-sdk/lib/app/components/status/Status';
1818
import {
1919
Button,
20-
Flex,
21-
FlexItem,
2220
PageSection,
2321
ProgressStep,
2422
ProgressStepper,
@@ -107,9 +105,9 @@ export const MigrationVirtualMachinesRowExtended: React.FC<RowProps<VMData>> = (
107105
<Thead>
108106
<Tr>
109107
<Th width={20}>{t('Pod')}</Th>
110-
<Th width={10}>{t('Status')}</Th>
111-
<Th width={10}>{t('Pod logs')}</Th>
112-
<Th width={10}>{t('Created at')}</Th>
108+
<Th>{t('Status')}</Th>
109+
<Th>{t('Pod logs')}</Th>
110+
<Th>{t('Created at')}</Th>
113111
</Tr>
114112
</Thead>
115113
<Tbody>
@@ -146,24 +144,21 @@ export const MigrationVirtualMachinesRowExtended: React.FC<RowProps<VMData>> = (
146144
<Thead>
147145
<Tr>
148146
<Th width={20}>{t('Name')}</Th>
147+
<Th>{t('Status')}</Th>
149148
</Tr>
150149
</Thead>
151150
<Tbody>
152151
{(jobs || []).map((job) => (
153152
<Tr key={job.metadata.uid}>
154153
<Td>
155-
<Flex>
156-
<FlexItem>
157-
<ResourceLink
158-
groupVersionKind={{ group: 'batch', version: 'v1', kind: 'Job' }}
159-
name={job?.metadata?.name}
160-
namespace={job?.metadata?.namespace}
161-
/>
162-
</FlexItem>
163-
<FlexItem>
164-
<Status status={getJobPhase(job)}></Status>
165-
</FlexItem>
166-
</Flex>
154+
<ResourceLink
155+
groupVersionKind={{ group: 'batch', version: 'v1', kind: 'Job' }}
156+
name={job?.metadata?.name}
157+
namespace={job?.metadata?.namespace}
158+
/>
159+
</Td>
160+
<Td>
161+
<Status status={getJobPhase(job)}></Status>
167162
</Td>
168163
</Tr>
169164
))}
@@ -182,24 +177,21 @@ export const MigrationVirtualMachinesRowExtended: React.FC<RowProps<VMData>> = (
182177
<Thead>
183178
<Tr>
184179
<Th width={20}>{t('Name')}</Th>
180+
<Th>{t('Status')}</Th>
185181
</Tr>
186182
</Thead>
187183
<Tbody>
188184
{(pvcs || []).map((pvc) => (
189185
<Tr key={pvc.metadata.uid}>
190186
<Td>
191-
<Flex>
192-
<FlexItem>
193-
<ResourceLink
194-
groupVersionKind={{ version: 'v1', kind: 'PersistentVolumeClaim' }}
195-
name={pvc?.metadata?.name}
196-
namespace={pvc?.metadata?.namespace}
197-
/>
198-
</FlexItem>
199-
<FlexItem>
200-
<Status status={pvc.status.phase}></Status>
201-
</FlexItem>
202-
</Flex>
187+
<ResourceLink
188+
groupVersionKind={{ version: 'v1', kind: 'PersistentVolumeClaim' }}
189+
name={pvc?.metadata?.name}
190+
namespace={pvc?.metadata?.namespace}
191+
/>
192+
</Td>
193+
<Td>
194+
<Status status={pvc.status.phase}></Status>
203195
</Td>
204196
</Tr>
205197
))}
@@ -217,10 +209,10 @@ export const MigrationVirtualMachinesRowExtended: React.FC<RowProps<VMData>> = (
217209
<TableComposable aria-label="Expandable table" variant="compact">
218210
<Thead>
219211
<Tr>
220-
<Th width={10}>{t('Type')}</Th>
221-
<Th width={10}>{t('Status')}</Th>
222-
<Th width={20}>{t('Updated')}</Th>
223-
<Th width={10}>{t('Reason')}</Th>
212+
<Th width={20}>{t('Type')}</Th>
213+
<Th>{t('Status')}</Th>
214+
<Th>{t('Updated')}</Th>
215+
<Th>{t('Reason')}</Th>
224216
<Th> {t('Message')}</Th>
225217
</Tr>
226218
</Thead>
@@ -248,7 +240,7 @@ export const MigrationVirtualMachinesRowExtended: React.FC<RowProps<VMData>> = (
248240
<TableComposable variant="compact">
249241
<Thead>
250242
<Tr>
251-
<Th>{t('Name')}</Th>
243+
<Th width={20}>{t('Name')}</Th>
252244
<Th>{t('Description')}</Th>
253245
<Th>{t('Tasks')}</Th>
254246
<Th>{t('Started at')}</Th>

0 commit comments

Comments
 (0)