Differential D11870 Diff 32666 src/applications/harbormaster/controller/HarbormasterBuildActionController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/harbormaster/controller/HarbormasterBuildActionController.php
Show All 35 Lines | switch ($command) { | ||||
$can_issue = $build->canRestartBuild(); | $can_issue = $build->canRestartBuild(); | ||||
break; | break; | ||||
case HarbormasterBuildCommand::COMMAND_STOP: | case HarbormasterBuildCommand::COMMAND_STOP: | ||||
$can_issue = $build->canStopBuild(); | $can_issue = $build->canStopBuild(); | ||||
break; | break; | ||||
case HarbormasterBuildCommand::COMMAND_RESUME: | case HarbormasterBuildCommand::COMMAND_RESUME: | ||||
$can_issue = $build->canResumeBuild(); | $can_issue = $build->canResumeBuild(); | ||||
break; | break; | ||||
case HarbormasterBuildCommand::COMMAND_ABORT: | |||||
$can_issue = $build->canAbortBuild(); | |||||
break; | |||||
default: | default: | ||||
return new Aphront400Response(); | return new Aphront400Response(); | ||||
} | } | ||||
switch ($this->via) { | switch ($this->via) { | ||||
case 'buildable': | case 'buildable': | ||||
$return_uri = '/'.$build->getBuildable()->getMonogram(); | $return_uri = '/'.$build->getBuildable()->getMonogram(); | ||||
break; | break; | ||||
Show All 33 Lines | switch ($command) { | ||||
$body = pht( | $body = pht( | ||||
'This build is already restarting. You can not reissue a '. | 'This build is already restarting. You can not reissue a '. | ||||
'restart command to a restarting build.'); | 'restart command to a restarting build.'); | ||||
} else { | } else { | ||||
$body = pht('You can not restart this build.'); | $body = pht('You can not restart this build.'); | ||||
} | } | ||||
} | } | ||||
break; | break; | ||||
case HarbormasterBuildCommand::COMMAND_ABORT: | |||||
if ($can_issue) { | |||||
$title = pht('Really abort build?'); | |||||
$body = pht( | |||||
'Progress on this build will be discarded. Really '. | |||||
epriestley: Prefer single space after period. | |||||
'abort build?'); | |||||
$submit = pht('Abort Build'); | |||||
} else { | |||||
$title = pht('Unable to Abort Build'); | |||||
$body = pht('You can not abort this build.'); | |||||
} | |||||
break; | |||||
case HarbormasterBuildCommand::COMMAND_STOP: | case HarbormasterBuildCommand::COMMAND_STOP: | ||||
if ($can_issue) { | if ($can_issue) { | ||||
$title = pht('Really pause build?'); | $title = pht('Really pause build?'); | ||||
$body = pht( | $body = pht( | ||||
'If you pause this build, work will halt once the current steps '. | 'If you pause this build, work will halt once the current steps '. | ||||
'complete. You can resume the build later.'); | 'complete. You can resume the build later.'); | ||||
$submit = pht('Pause Build'); | $submit = pht('Pause Build'); | ||||
} else { | } else { | ||||
▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines |
Prefer single space after period.