1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-19 13:22:42 +01:00

Put Drydock build steps into their own group in Harbormaster

Summary: Ref T9252. Move these into a new "Drydock" group.

Test Plan: Clicked "Add Build Step", saw Drydock steps in a Drydock group.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9252

Differential Revision: https://secure.phabricator.com/D14237
This commit is contained in:
epriestley 2015-10-05 15:59:35 -07:00
parent ee937e99fb
commit 4d5278af11
5 changed files with 30 additions and 3 deletions

View file

@ -1011,6 +1011,7 @@ phutil_register_library_map(array(
'HarbormasterController' => 'applications/harbormaster/controller/HarbormasterController.php',
'HarbormasterCreateArtifactConduitAPIMethod' => 'applications/harbormaster/conduit/HarbormasterCreateArtifactConduitAPIMethod.php',
'HarbormasterDAO' => 'applications/harbormaster/storage/HarbormasterDAO.php',
'HarbormasterDrydockBuildStepGroup' => 'applications/harbormaster/stepgroup/HarbormasterDrydockBuildStepGroup.php',
'HarbormasterDrydockCommandBuildStepImplementation' => 'applications/harbormaster/step/HarbormasterDrydockCommandBuildStepImplementation.php',
'HarbormasterDrydockLeaseArtifact' => 'applications/harbormaster/artifact/HarbormasterDrydockLeaseArtifact.php',
'HarbormasterExecFuture' => 'applications/harbormaster/future/HarbormasterExecFuture.php',
@ -4813,6 +4814,7 @@ phutil_register_library_map(array(
'HarbormasterController' => 'PhabricatorController',
'HarbormasterCreateArtifactConduitAPIMethod' => 'HarbormasterConduitAPIMethod',
'HarbormasterDAO' => 'PhabricatorLiskDAO',
'HarbormasterDrydockBuildStepGroup' => 'HarbormasterBuildStepGroup',
'HarbormasterDrydockCommandBuildStepImplementation' => 'HarbormasterBuildStepImplementation',
'HarbormasterDrydockLeaseArtifact' => 'HarbormasterArtifact',
'HarbormasterExecFuture' => 'Future',

View file

@ -61,7 +61,7 @@ final class HarbormasterPlanEditController extends HarbormasterPlanController {
$is_new = (!$plan->getID());
if ($is_new) {
$title = pht('New Build Plan');
$cancel_uri = $this->getApplicationURI();
$cancel_uri = $this->getApplicationURI('plan/');
$save_button = pht('Create Build Plan');
} else {
$id = $plan->getID();

View file

@ -12,7 +12,7 @@ final class HarbormasterDrydockCommandBuildStepImplementation
}
public function getBuildStepGroupKey() {
return HarbormasterPrototypeBuildStepGroup::GROUPKEY;
return HarbormasterDrydockBuildStepGroup::GROUPKEY;
}
public function getDescription() {

View file

@ -12,7 +12,7 @@ final class HarbormasterLeaseWorkingCopyBuildStepImplementation
}
public function getBuildStepGroupKey() {
return HarbormasterPrototypeBuildStepGroup::GROUPKEY;
return HarbormasterDrydockBuildStepGroup::GROUPKEY;
}
public function execute(

View file

@ -0,0 +1,25 @@
<?php
final class HarbormasterDrydockBuildStepGroup
extends HarbormasterBuildStepGroup {
const GROUPKEY = 'harbormaster.drydock';
public function getGroupName() {
return pht('Drydock');
}
public function getGroupOrder() {
return 3000;
}
public function isEnabled() {
$drydock_class = 'PhabricatorDrydockApplication';
return PhabricatorApplication::isClassInstalled($drydock_class);
}
public function shouldShowIfEmpty() {
return false;
}
}