public function handleRequest(AphrontRequest $request)
 {
     $viewer = $request->getViewer();
     $nav = $this->buildSideNavView();
     $nav->selectFilter('application/');
     $groups = PhabricatorApplicationConfigOptions::loadAll();
     $apps_list = $this->buildConfigOptionsList($groups, 'apps');
     $title = pht('Application Settings');
     $header = id(new PHUIHeaderView())->setHeader($title)->setProfileHeader(true);
     $crumbs = $this->buildApplicationCrumbs()->addTextCrumb(pht('Applications'))->setBorder(true);
     $content = id(new PhabricatorConfigPageView())->setHeader($header)->setContent($apps_list);
     return $this->newPage()->setTitle($title)->setCrumbs($crumbs)->setNavigation($nav)->appendChild($content)->addClass('white-background');
 }
 protected function executeChecks()
 {
     $groups = PhabricatorApplicationConfigOptions::loadAll();
     foreach ($groups as $group) {
         $options = $group->getOptions();
         foreach ($options as $option) {
             try {
                 $group->validateOption($option, PhabricatorEnv::getUnrepairedEnvConfig($option->getKey()));
             } catch (PhabricatorConfigValidationException $ex) {
                 $this->newIssue('config.invalid.' . $option->getKey())->setName(pht("Config '%s' Invalid", $option->getKey()))->setMessage(pht("Configuration option '%s' has invalid value and " . "was restored to the default: %s", $option->getKey(), $ex->getMessage()))->addPhabricatorConfig($option->getKey());
             }
         }
     }
 }
 public function processRequest()
 {
     $request = $this->getRequest();
     $user = $request->getUser();
     $groups = PhabricatorApplicationConfigOptions::loadAll();
     $options = idx($groups, $this->groupKey);
     if (!$options) {
         return new Aphront404Response();
     }
     $title = pht('%s Configuration', $options->getName());
     $list = $this->buildOptionList($options->getOptions());
     $box = id(new PHUIObjectBoxView())->setHeaderText($title)->setObjectList($list);
     $crumbs = $this->buildApplicationCrumbs()->addTextCrumb(pht('Config'), $this->getApplicationURI())->addTextCrumb($options->getName(), $this->getApplicationURI());
     return $this->buildApplicationPage(array($crumbs, $box), array('title' => $title));
 }
 public function processRequest()
 {
     $request = $this->getRequest();
     $user = $request->getUser();
     $nav = $this->buildSideNavView();
     $nav->selectFilter('/');
     $groups = PhabricatorApplicationConfigOptions::loadAll();
     $list = $this->buildConfigOptionsList($groups);
     $title = pht('Phabricator Configuration');
     $box = id(new PHUIObjectBoxView())->setHeaderText($title)->appendChild($list);
     $nav->appendChild(array($box));
     $crumbs = $this->buildApplicationCrumbs()->addTextCrumb(pht('Config'), $this->getApplicationURI());
     $nav->setCrumbs($crumbs);
     return $this->buildApplicationPage($nav, array('title' => $title));
 }
 public function handleRequest(AphrontRequest $request)
 {
     $viewer = $request->getViewer();
     $nav = $this->buildSideNavView();
     $nav->selectFilter('/');
     $groups = PhabricatorApplicationConfigOptions::loadAll();
     $core_list = $this->buildConfigOptionsList($groups, 'core');
     $apps_list = $this->buildConfigOptionsList($groups, 'apps');
     $title = pht('Phabricator Configuration');
     $core = id(new PHUIObjectBoxView())->setHeaderText($title)->setObjectList($core_list);
     $apps = id(new PHUIObjectBoxView())->setHeaderText(pht('Applications Configuration'))->setObjectList($apps_list);
     $crumbs = $this->buildApplicationCrumbs()->addTextCrumb(pht('Config'), $this->getApplicationURI());
     $view = id(new PHUITwoColumnView())->setNavigation($nav)->setMainColumn(array($core, $apps));
     return $this->newPage()->setTitle($title)->setCrumbs($crumbs)->appendChild($view);
 }
 public function handleRequest(AphrontRequest $request)
 {
     $viewer = $request->getViewer();
     $group_key = $request->getURIData('key');
     $groups = PhabricatorApplicationConfigOptions::loadAll();
     $options = idx($groups, $group_key);
     if (!$options) {
         return new Aphront404Response();
     }
     $title = pht('%s Configuration', $options->getName());
     $list = $this->buildOptionList($options->getOptions());
     $box = id(new PHUIObjectBoxView())->setObjectList($list);
     $crumbs = $this->buildApplicationCrumbs()->addTextCrumb(pht('Config'), $this->getApplicationURI())->addTextCrumb($options->getName(), $this->getApplicationURI())->setBorder(true);
     $header = id(new PHUIHeaderView())->setHeader($title)->setHeaderIcon('fa-sliders');
     $view = id(new PHUITwoColumnView())->setHeader($header)->setFooter($box);
     return $this->newPage()->setTitle($title)->setCrumbs($crumbs)->appendChild($view);
 }
 public function handleRequest(AphrontRequest $request)
 {
     $viewer = $request->getViewer();
     $group_key = $request->getURIData('key');
     $groups = PhabricatorApplicationConfigOptions::loadAll();
     $options = idx($groups, $group_key);
     if (!$options) {
         return new Aphront404Response();
     }
     $group_uri = PhabricatorConfigGroupConstants::getGroupURI($options->getGroup());
     $group_name = PhabricatorConfigGroupConstants::getGroupShortName($options->getGroup());
     $nav = $this->buildSideNavView();
     $nav->selectFilter($group_uri);
     $title = pht('%s Configuration', $options->getName());
     $list = $this->buildOptionList($options->getOptions());
     $crumbs = $this->buildApplicationCrumbs()->addTextCrumb($group_name, $this->getApplicationURI($group_uri))->addTextCrumb($options->getName())->setBorder(true);
     $header = id(new PHUIHeaderView())->setHeader($title)->setProfileHeader(true);
     $content = id(new PhabricatorConfigPageView())->setHeader($header)->setContent($list);
     return $this->newPage()->setTitle($title)->setCrumbs($crumbs)->setNavigation($nav)->appendChild($content)->addClass('white-background');
 }