Repository: aurora Updated Branches: refs/heads/master 21a371c4f -> b94c7c57f
Add PartitionPolicy to config summary when defined Reviewed at https://reviews.apache.org/r/65476/ Project: http://git-wip-us.apache.org/repos/asf/aurora/repo Commit: http://git-wip-us.apache.org/repos/asf/aurora/commit/b94c7c57 Tree: http://git-wip-us.apache.org/repos/asf/aurora/tree/b94c7c57 Diff: http://git-wip-us.apache.org/repos/asf/aurora/diff/b94c7c57 Branch: refs/heads/master Commit: b94c7c57fa4f36d5c179263bf39cf6f1b419f74c Parents: 21a371c Author: David McLaughlin <[email protected]> Authored: Fri Feb 2 10:05:04 2018 -0800 Committer: David McLaughlin <[email protected]> Committed: Fri Feb 2 10:05:04 2018 -0800 ---------------------------------------------------------------------- ui/src/main/js/components/TaskConfigSummary.js | 22 +++++++++++++++++++++ 1 file changed, 22 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/aurora/blob/b94c7c57/ui/src/main/js/components/TaskConfigSummary.js ---------------------------------------------------------------------- diff --git a/ui/src/main/js/components/TaskConfigSummary.js b/ui/src/main/js/components/TaskConfigSummary.js index 01902cd..64880f4 100644 --- a/ui/src/main/js/components/TaskConfigSummary.js +++ b/ui/src/main/js/components/TaskConfigSummary.js @@ -3,6 +3,7 @@ import React from 'react'; import { RelativeTime } from 'components/Time'; +import { isNully } from 'utils/Common'; import { formatMb } from 'utils/Quota'; import { constraintToString, getResource, getResources, instanceRangeToString } from 'utils/Task'; import { COLLISION_POLICY } from 'utils/Thrift'; @@ -52,6 +53,25 @@ function Metadata({ config }) { </tr>); } +// ESLint doesn't like React's new adjacent elements, so we need to disable it here +/* eslint-disable */ +function PartitionPolicy({ config }) { + if (isNully(config.partitionPolicy)) { + return null; + } + + return [<tr> + <th rowSpan='2'>Partition Policy</th> + <td>reschedule</td> + <td>{'' + config.partitionPolicy.reschedule}</td> + </tr>, + <tr> + <td>delay secs</td> + <td>{config.partitionPolicy.delaySecs}</td> + </tr>]; +} +/* eslint-enable */ + export function CronConfigSummary({ cronJob }) { const config = cronJob.job.taskConfig; return (<table className='table table-bordered task-config-summary cron-config-summary'> @@ -87,6 +107,7 @@ export function CronConfigSummary({ cronJob }) { <td colSpan='2'>{config.tier}</td> </tr> <Metadata config={config} /> + <PartitionPolicy config={config} /> <tr> <th>Contact</th> <td colSpan='2'>{config.contactEmail}</td> @@ -114,6 +135,7 @@ export default function TaskConfigSummary({ config, instances }) { <td colSpan='2'>{config.isService ? 'true' : 'false'}</td> </tr> <Metadata config={config} /> + <PartitionPolicy config={config} /> <tr> <th>Contact</th> <td colSpan='2'>{config.contactEmail}</td>
