Differential D11870 Diff 32666 src/applications/harbormaster/controller/HarbormasterBuildableActionController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/harbormaster/controller/HarbormasterBuildableActionController.php
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | foreach ($buildable->getBuilds() as $build) { | ||||
$issuable[] = $build; | $issuable[] = $build; | ||||
} | } | ||||
break; | break; | ||||
case HarbormasterBuildCommand::COMMAND_RESUME: | case HarbormasterBuildCommand::COMMAND_RESUME: | ||||
if ($build->canResumeBuild()) { | if ($build->canResumeBuild()) { | ||||
$issuable[] = $build; | $issuable[] = $build; | ||||
} | } | ||||
break; | break; | ||||
case HarbormasterBuildCommand::COMMAND_ABORT: | |||||
if ($build->canAbortBuild()) { | |||||
$issuable[] = $build; | |||||
} | |||||
break; | |||||
default: | default: | ||||
return new Aphront400Response(); | return new Aphront400Response(); | ||||
} | } | ||||
} | } | ||||
$return_uri = '/'.$buildable->getMonogram(); | $return_uri = '/'.$buildable->getMonogram(); | ||||
if ($request->isDialogFormPost() && $issuable) { | if ($request->isDialogFormPost() && $issuable) { | ||||
$editor = id(new HarbormasterBuildableTransactionEditor()) | $editor = id(new HarbormasterBuildableTransactionEditor()) | ||||
▲ Show 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | switch ($command) { | ||||
'If you stop all build, work will halt once the current steps '. | 'If you stop all build, work will halt once the current steps '. | ||||
'complete. You can resume the builds later.'); | 'complete. You can resume the builds later.'); | ||||
$submit = pht('Stop All Builds'); | $submit = pht('Stop All Builds'); | ||||
} else { | } else { | ||||
$title = pht('Unable to Stop Build'); | $title = pht('Unable to Stop Build'); | ||||
$body = pht('No builds can be stopped.'); | $body = pht('No builds can be stopped.'); | ||||
} | } | ||||
break; | break; | ||||
case HarbormasterBuildCommand::COMMAND_ABORT: | |||||
if ($issuable) { | |||||
$title = pht('Really abort all builds?'); | |||||
$body = pht( | |||||
'If you abort all builds, work will halt immediately.'); | |||||
epriestley: and work will be discarded and builds can not be resumed and must be completely restarted | |||||
$submit = pht('Abort All Builds'); | |||||
} else { | |||||
$title = pht('Unable to Abort Builds'); | |||||
$body = pht('No builds can be aborted.'); | |||||
} | |||||
break; | |||||
case HarbormasterBuildCommand::COMMAND_RESUME: | case HarbormasterBuildCommand::COMMAND_RESUME: | ||||
if ($issuable) { | if ($issuable) { | ||||
$title = pht('Really resume all builds?'); | $title = pht('Really resume all builds?'); | ||||
$body = pht('Work will continue on all builds. Really resume?'); | $body = pht('Work will continue on all builds. Really resume?'); | ||||
$submit = pht('Resume All Builds'); | $submit = pht('Resume All Builds'); | ||||
} else { | } else { | ||||
$title = pht('Unable to Resume Build'); | $title = pht('Unable to Resume Build'); | ||||
$body = pht('No builds can be resumed.'); | $body = pht('No builds can be resumed.'); | ||||
Show All 18 Lines |
and work will be discarded and builds can not be resumed and must be completely restarted