Changeset View
Changeset View
Standalone View
Standalone View
src/applications/herald/controller/HeraldTranscriptController.php
Show All 36 Lines | public function processRequest() { | ||||
} | } | ||||
require_celerity_resource('herald-test-css'); | require_celerity_resource('herald-test-css'); | ||||
$nav = $this->buildSideNav(); | $nav = $this->buildSideNav(); | ||||
$object_xscript = $xscript->getObjectTranscript(); | $object_xscript = $xscript->getObjectTranscript(); | ||||
if (!$object_xscript) { | if (!$object_xscript) { | ||||
$notice = id(new PHUIErrorView()) | $notice = id(new PHUIInfoView()) | ||||
->setSeverity(PHUIErrorView::SEVERITY_NOTICE) | ->setSeverity(PHUIInfoView::SEVERITY_NOTICE) | ||||
->setTitle(pht('Old Transcript')) | ->setTitle(pht('Old Transcript')) | ||||
->appendChild(phutil_tag( | ->appendChild(phutil_tag( | ||||
'p', | 'p', | ||||
array(), | array(), | ||||
pht('Details of this transcript have been garbage collected.'))); | pht('Details of this transcript have been garbage collected.'))); | ||||
$nav->appendChild($notice); | $nav->appendChild($notice); | ||||
} else { | } else { | ||||
$map = HeraldAdapter::getEnabledAdapterMap($viewer); | $map = HeraldAdapter::getEnabledAdapterMap($viewer); | ||||
Show All 15 Lines | if (!$object_xscript) { | ||||
$phids = array_merge($filter, $this->getTranscriptPHIDs($xscript)); | $phids = array_merge($filter, $this->getTranscriptPHIDs($xscript)); | ||||
$phids = array_unique($phids); | $phids = array_unique($phids); | ||||
$phids = array_filter($phids); | $phids = array_filter($phids); | ||||
$handles = $this->loadViewerHandles($phids); | $handles = $this->loadViewerHandles($phids); | ||||
$this->handles = $handles; | $this->handles = $handles; | ||||
if ($xscript->getDryRun()) { | if ($xscript->getDryRun()) { | ||||
$notice = new PHUIErrorView(); | $notice = new PHUIInfoView(); | ||||
$notice->setSeverity(PHUIErrorView::SEVERITY_NOTICE); | $notice->setSeverity(PHUIInfoView::SEVERITY_NOTICE); | ||||
$notice->setTitle(pht('Dry Run')); | $notice->setTitle(pht('Dry Run')); | ||||
$notice->appendChild(pht('This was a dry run to test Herald '. | $notice->appendChild(pht('This was a dry run to test Herald '. | ||||
'rules, no actions were executed.')); | 'rules, no actions were executed.')); | ||||
$nav->appendChild($notice); | $nav->appendChild($notice); | ||||
} | } | ||||
$warning_panel = $this->buildWarningPanel($xscript); | $warning_panel = $this->buildWarningPanel($xscript); | ||||
$nav->appendChild($warning_panel); | $nav->appendChild($warning_panel); | ||||
▲ Show 20 Lines • Show All 226 Lines • ▼ Show 20 Lines | if ($xscript->getObjectTranscript()) { | ||||
$title = pht( | $title = pht( | ||||
'The %s repository is not tracked.', | 'The %s repository is not tracked.', | ||||
$repository->getMonogram()); | $repository->getMonogram()); | ||||
$body = pht( | $body = pht( | ||||
'Herald rules will not trigger until tracking is enabled.'); | 'Herald rules will not trigger until tracking is enabled.'); | ||||
} else { | } else { | ||||
return $panel; | return $panel; | ||||
} | } | ||||
$panel = id(new PHUIErrorView()) | $panel = id(new PHUIInfoView()) | ||||
->setSeverity(PHUIErrorView::SEVERITY_WARNING) | ->setSeverity(PHUIInfoView::SEVERITY_WARNING) | ||||
->setTitle($title) | ->setTitle($title) | ||||
->appendChild($body); | ->appendChild($body); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
return $panel; | return $panel; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 221 Lines • Show Last 20 Lines |