Differential D15352 Diff 37023 src/applications/harbormaster/controller/HarbormasterPlanViewController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/harbormaster/controller/HarbormasterPlanViewController.php
Show First 20 Lines • Show All 99 Lines • ▼ Show 20 Lines | foreach ($run_order as $run_ref) { | ||||
$depth = $run_ref['depth'] + 1; | $depth = $run_ref['depth'] + 1; | ||||
if ($last_depth !== $depth) { | if ($last_depth !== $depth) { | ||||
$last_depth = $depth; | $last_depth = $depth; | ||||
$i = 1; | $i = 1; | ||||
} else { | } else { | ||||
$i++; | $i++; | ||||
} | } | ||||
$step_id = $step->getID(); | |||||
$view_uri = $this->getApplicationURI("step/view/{$step_id}/"); | |||||
$item = id(new PHUIObjectItemView()) | |||||
->setObjectName(pht('Step %d.%d', $depth, $i)) | |||||
->setHeader($step->getName()) | |||||
->setHref($view_uri); | |||||
$step_list->addItem($item); | |||||
$implementation = null; | $implementation = null; | ||||
try { | try { | ||||
$implementation = $step->getStepImplementation(); | $implementation = $step->getStepImplementation(); | ||||
} catch (Exception $ex) { | } catch (Exception $ex) { | ||||
// We can't initialize the implementation. This might be because | // We can't initialize the implementation. This might be because | ||||
// it's been renamed or no longer exists. | // it's been renamed or no longer exists. | ||||
$item = id(new PHUIObjectItemView()) | $item | ||||
->setObjectName(pht('Step %d.%d', $depth, $i)) | |||||
->setHeader(pht('Unknown Implementation')) | |||||
->setStatusIcon('fa-warning red') | ->setStatusIcon('fa-warning red') | ||||
->addAttribute(pht( | ->addAttribute(pht( | ||||
'This step has an invalid implementation (%s).', | 'This step has an invalid implementation (%s).', | ||||
$step->getClassName())); | $step->getClassName())); | ||||
$step_list->addItem($item); | |||||
continue; | continue; | ||||
} | } | ||||
$item = id(new PHUIObjectItemView()) | |||||
->setObjectName(pht('Step %d.%d', $depth, $i)) | |||||
->setHeader($step->getName()); | |||||
$item->addAttribute($implementation->getDescription()); | $item->addAttribute($implementation->getDescription()); | ||||
$step_id = $step->getID(); | |||||
$view_uri = $this->getApplicationURI("step/view/{$step_id}/"); | |||||
$item->setHref($view_uri); | $item->setHref($view_uri); | ||||
$depends = $step->getStepImplementation()->getDependencies($step); | $depends = $step->getStepImplementation()->getDependencies($step); | ||||
$inputs = $step->getStepImplementation()->getArtifactInputs(); | $inputs = $step->getStepImplementation()->getArtifactInputs(); | ||||
$outputs = $step->getStepImplementation()->getArtifactOutputs(); | $outputs = $step->getStepImplementation()->getArtifactOutputs(); | ||||
$has_conflicts = false; | $has_conflicts = false; | ||||
if ($depends || $inputs || $outputs) { | if ($depends || $inputs || $outputs) { | ||||
▲ Show 20 Lines • Show All 317 Lines • Show Last 20 Lines |