mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-24 06:20:56 +01:00
Change "Stop" to "Pause" in Harbormaster build UI
Summary: Resolves T5814. Ref T1049. This changes "Stop" to "Pause" in the UI (internally it's still referred to as Stop). Test Plan: Viewed builds and saw the intended wording. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: epriestley, Korvin Maniphest Tasks: T1049, T5814 Differential Revision: https://secure.phabricator.com/D10172
This commit is contained in:
parent
27d44594dc
commit
bc116d7e02
4 changed files with 44 additions and 69 deletions
|
@ -93,28 +93,28 @@ final class HarbormasterBuildActionController
|
|||
break;
|
||||
case HarbormasterBuildCommand::COMMAND_STOP:
|
||||
if ($can_issue) {
|
||||
$title = pht('Really stop build?');
|
||||
$title = pht('Really pause build?');
|
||||
$body = pht(
|
||||
'If you stop 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.');
|
||||
$submit = pht('Stop Build');
|
||||
$submit = pht('Pause Build');
|
||||
} else {
|
||||
$title = pht('Unable to Stop Build');
|
||||
$title = pht('Unable to Pause Build');
|
||||
if ($build->isComplete()) {
|
||||
$body = pht(
|
||||
'This build is already complete. You can not stop a completed '.
|
||||
'This build is already complete. You can not pause a completed '.
|
||||
'build.');
|
||||
} else if ($build->isStopped()) {
|
||||
$body = pht(
|
||||
'This build is already stopped. You can not stop a build which '.
|
||||
'has already been stopped.');
|
||||
'This build is already paused. You can not pause a build which '.
|
||||
'has already been paused.');
|
||||
} else if ($build->isStopping()) {
|
||||
$body = pht(
|
||||
'This build is already stopping. You can not reissue a stop '.
|
||||
'command to a stopping build.');
|
||||
'This build is already pausing. You can not reissue a pause '.
|
||||
'command to a pausing build.');
|
||||
} else {
|
||||
$body = pht(
|
||||
'This build can not be stopped.');
|
||||
'This build can not be paused.');
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -35,7 +35,7 @@ final class HarbormasterBuildViewController
|
|||
if ($build->isRestarting()) {
|
||||
$header->setStatus('fa-exclamation-triangle', 'red', pht('Restarting'));
|
||||
} else if ($build->isStopping()) {
|
||||
$header->setStatus('fa-exclamation-triangle', 'red', pht('Stopping'));
|
||||
$header->setStatus('fa-exclamation-triangle', 'red', pht('Pausing'));
|
||||
} else if ($build->isResuming()) {
|
||||
$header->setStatus('fa-exclamation-triangle', 'red', pht('Resuming'));
|
||||
}
|
||||
|
@ -355,19 +355,12 @@ final class HarbormasterBuildViewController
|
|||
$list->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName(pht('Restart Build'))
|
||||
->setIcon('fa-backward')
|
||||
->setIcon('fa-repeat')
|
||||
->setHref($this->getApplicationURI('/build/restart/'.$id.'/'))
|
||||
->setDisabled(!$can_restart)
|
||||
->setWorkflow(true));
|
||||
|
||||
$list->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName(pht('Stop Build'))
|
||||
->setIcon('fa-stop')
|
||||
->setHref($this->getApplicationURI('/build/stop/'.$id.'/'))
|
||||
->setDisabled(!$can_stop)
|
||||
->setWorkflow(true));
|
||||
|
||||
if ($build->canResumeBuild()) {
|
||||
$list->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName(pht('Resume Build'))
|
||||
|
@ -375,6 +368,15 @@ final class HarbormasterBuildViewController
|
|||
->setHref($this->getApplicationURI('/build/resume/'.$id.'/'))
|
||||
->setDisabled(!$can_resume)
|
||||
->setWorkflow(true));
|
||||
} else {
|
||||
$list->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setName(pht('Pause Build'))
|
||||
->setIcon('fa-pause')
|
||||
->setHref($this->getApplicationURI('/build/stop/'.$id.'/'))
|
||||
->setDisabled(!$can_stop)
|
||||
->setWorkflow(true));
|
||||
}
|
||||
|
||||
return $list;
|
||||
}
|
||||
|
@ -419,7 +421,7 @@ final class HarbormasterBuildViewController
|
|||
$item = new PHUIStatusItemView();
|
||||
|
||||
if ($build->isStopping()) {
|
||||
$status_name = pht('Stopping');
|
||||
$status_name = pht('Pausing');
|
||||
$icon = PHUIStatusItemView::ICON_RIGHT;
|
||||
$color = 'dark';
|
||||
} else {
|
||||
|
|
|
@ -110,7 +110,7 @@ final class HarbormasterBuildableViewController
|
|||
|
||||
$list->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setIcon('fa-backward')
|
||||
->setIcon('fa-repeat')
|
||||
->setName(pht('Restart All Builds'))
|
||||
->setHref($this->getApplicationURI($restart_uri))
|
||||
->setWorkflow(true)
|
||||
|
@ -118,8 +118,8 @@ final class HarbormasterBuildableViewController
|
|||
|
||||
$list->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setIcon('fa-stop')
|
||||
->setName(pht('Stop All Builds'))
|
||||
->setIcon('fa-pause')
|
||||
->setName(pht('Pause All Builds'))
|
||||
->setHref($this->getApplicationURI($stop_uri))
|
||||
->setWorkflow(true)
|
||||
->setDisabled(!$can_stop || !$can_edit));
|
||||
|
@ -184,9 +184,9 @@ final class HarbormasterBuildableViewController
|
|||
$item->addAttribute(HarbormasterBuild::getBuildStatusName($status));
|
||||
|
||||
if ($build->isRestarting()) {
|
||||
$item->addIcon('fa-backward', pht('Restarting'));
|
||||
$item->addIcon('fa-repeat', pht('Restarting'));
|
||||
} else if ($build->isStopping()) {
|
||||
$item->addIcon('fa-stop', pht('Stopping'));
|
||||
$item->addIcon('fa-pause', pht('Pausing'));
|
||||
} else if ($build->isResuming()) {
|
||||
$item->addIcon('fa-play', pht('Resuming'));
|
||||
}
|
||||
|
@ -199,7 +199,7 @@ final class HarbormasterBuildableViewController
|
|||
|
||||
$item->addAction(
|
||||
id(new PHUIListItemView())
|
||||
->setIcon('fa-backward')
|
||||
->setIcon('fa-repeat')
|
||||
->setName(pht('Restart'))
|
||||
->setHref($this->getApplicationURI($restart_uri))
|
||||
->setWorkflow(true)
|
||||
|
@ -215,8 +215,8 @@ final class HarbormasterBuildableViewController
|
|||
} else {
|
||||
$item->addAction(
|
||||
id(new PHUIListItemView())
|
||||
->setIcon('fa-stop')
|
||||
->setName(pht('Stop'))
|
||||
->setIcon('fa-pause')
|
||||
->setName(pht('Pause'))
|
||||
->setHref($this->getApplicationURI($stop_uri))
|
||||
->setWorkflow(true)
|
||||
->setDisabled(!$build->canStopBuild()));
|
||||
|
@ -227,38 +227,11 @@ final class HarbormasterBuildableViewController
|
|||
if ($targets) {
|
||||
$target_list = id(new PHUIStatusListView());
|
||||
foreach ($targets as $target) {
|
||||
switch ($target->getTargetStatus()) {
|
||||
case HarbormasterBuildTarget::STATUS_PENDING:
|
||||
$icon = PHUIStatusItemView::ICON_CLOCK;
|
||||
$color = 'green';
|
||||
$status_name = pht('Pending');
|
||||
break;
|
||||
case HarbormasterBuildTarget::STATUS_BUILDING:
|
||||
$icon = PHUIStatusItemView::ICON_RIGHT;
|
||||
$color = 'green';
|
||||
$status_name = pht('Building');
|
||||
break;
|
||||
case HarbormasterBuildTarget::STATUS_WAITING:
|
||||
$icon = PHUIStatusItemView::ICON_CLOCK;
|
||||
$color = 'orange';
|
||||
$status_name = pht('Waiting');
|
||||
break;
|
||||
case HarbormasterBuildTarget::STATUS_PASSED:
|
||||
$icon = PHUIStatusItemView::ICON_ACCEPT;
|
||||
$color = 'green';
|
||||
$status_name = pht('Passed');
|
||||
break;
|
||||
case HarbormasterBuildTarget::STATUS_FAILED:
|
||||
$icon = PHUIStatusItemView::ICON_REJECT;
|
||||
$color = 'red';
|
||||
$status_name = pht('Failed');
|
||||
break;
|
||||
default:
|
||||
$icon = PHUIStatusItemView::ICON_QUESTION;
|
||||
$color = 'bluegrey';
|
||||
$status_name = pht('Unknown');
|
||||
break;
|
||||
}
|
||||
$status = $target->getTargetStatus();
|
||||
$icon = HarbormasterBuildTarget::getBuildTargetStatusIcon($status);
|
||||
$color = HarbormasterBuildTarget::getBuildTargetStatusColor($status);
|
||||
$status_name =
|
||||
HarbormasterBuildTarget::getBuildTargetStatusName($status);
|
||||
|
||||
$name = $target->getName();
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ final class HarbormasterBuild extends HarbormasterDAO
|
|||
case self::STATUS_ERROR:
|
||||
return pht('Unexpected Error');
|
||||
case self::STATUS_STOPPED:
|
||||
return pht('Stopped');
|
||||
return pht('Paused');
|
||||
case self::STATUS_DEADLOCKED:
|
||||
return pht('Deadlocked');
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue