Differential D15368 Diff 37061 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 107 Lines • ▼ Show 20 Lines | foreach ($run_order as $run_ref) { | ||||
$step_id = $step->getID(); | $step_id = $step->getID(); | ||||
$view_uri = $this->getApplicationURI("step/view/{$step_id}/"); | $view_uri = $this->getApplicationURI("step/view/{$step_id}/"); | ||||
$item = id(new PHUIObjectItemView()) | $item = id(new PHUIObjectItemView()) | ||||
->setObjectName(pht('Step %d.%d', $depth, $i)) | ->setObjectName(pht('Step %d.%d', $depth, $i)) | ||||
->setHeader($step->getName()) | ->setHeader($step->getName()) | ||||
->setHref($view_uri); | ->setHref($view_uri); | ||||
$step_list->addItem($item); | $step_list->addItem($item); | ||||
tycho.tatitscheff: Surely my missunderstanding but why isn't this $step_list->addItem()` deleted insead.
Or maybe… | |||||
$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 | $item | ||||
->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())); | ||||
continue; | continue; | ||||
epriestleyAuthorUnsubmitted Not Done Inline ActionsThe second one does not execute for invalid steps. epriestley: The second one does not execute for invalid steps. | |||||
} | } | ||||
$item->addAttribute($implementation->getDescription()); | $item->addAttribute($implementation->getDescription()); | ||||
$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(); | ||||
▲ Show 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | foreach ($run_order as $run_ref) { | ||||
if ($run_ref['cycle']) { | if ($run_ref['cycle']) { | ||||
$is_deadlocking = true; | $is_deadlocking = true; | ||||
} | } | ||||
if ($is_deadlocking) { | if ($is_deadlocking) { | ||||
$item->setStatusIcon('fa-warning red'); | $item->setStatusIcon('fa-warning red'); | ||||
} | } | ||||
$step_list->addItem($item); | |||||
} | } | ||||
$step_list->setFlush(true); | $step_list->setFlush(true); | ||||
$plan_id = $plan->getID(); | $plan_id = $plan->getID(); | ||||
$header = id(new PHUIHeaderView()) | $header = id(new PHUIHeaderView()) | ||||
->setHeader(pht('Build Steps')) | ->setHeader(pht('Build Steps')) | ||||
▲ Show 20 Lines • Show All 258 Lines • Show Last 20 Lines |
Surely my missunderstanding but why isn't this $step_list->addItem()` deleted insead.
Or maybe it is the same ?