<commit_before><?php

final class NuanceConsoleController extends NuanceController {

  public function shouldAllowPublic() {
    return true;
  }

  public function handleRequest(AphrontRequest $request) {
    $viewer = $request->getViewer();

    $menu = id(new PHUIObjectItemListView())
      ->setUser($viewer);

    $menu->addItem(
      id(new PHUIObjectItemView())
        ->setHeader(pht('Queues'))
        ->setHref($this->getApplicationURI('queue/'))
        ->setIcon('fa-align-left')
        ->addAttribute(pht('Manage Nuance queues.')));

    $menu->addItem(
      id(new PHUIObjectItemView())
        ->setHeader(pht('Sources'))
        ->setHref($this->getApplicationURI('source/'))
        ->setIcon('fa-filter')
        ->addAttribute(pht('Manage Nuance sources.')));

    $menu->addItem(
      id(new PHUIObjectItemView())
        ->setHeader(pht('Items'))
        ->setHref($this->getApplicationURI('item/'))
        ->setIcon('fa-clone')
        ->addAttribute(pht('Manage Nuance items.')));

    $crumbs = $this->buildApplicationCrumbs();
    $crumbs->addTextCrumb(pht('Console'));

    $box = id(new PHUIObjectBoxView())
      ->setHeaderText(pht('Console'))
      ->setObjectList($menu);

    return $this->buildApplicationPage(
      array(
        $crumbs,
        $box,
      ),
      array(
        'title'  => pht('Nuance Console'),
      ));
  }

}
<commit_msg>Modernize Nuance Console page<commit_after><?php

final class NuanceConsoleController extends NuanceController {

  public function shouldAllowPublic() {
    return true;
  }

  public function handleRequest(AphrontRequest $request) {
    $viewer = $request->getViewer();

    $menu = id(new PHUIObjectItemListView())
      ->setUser($viewer);

    $menu->addItem(
      id(new PHUIObjectItemView())
        ->setHeader(pht('Queues'))
        ->setHref($this->getApplicationURI('queue/'))
        ->setIcon('fa-align-left')
        ->addAttribute(pht('Manage Nuance queues.')));

    $menu->addItem(
      id(new PHUIObjectItemView())
        ->setHeader(pht('Sources'))
        ->setHref($this->getApplicationURI('source/'))
        ->setIcon('fa-filter')
        ->addAttribute(pht('Manage Nuance sources.')));

    $menu->addItem(
      id(new PHUIObjectItemView())
        ->setHeader(pht('Items'))
        ->setHref($this->getApplicationURI('item/'))
        ->setIcon('fa-clone')
        ->addAttribute(pht('Manage Nuance items.')));

    $crumbs = $this->buildApplicationCrumbs();
    $crumbs->addTextCrumb(pht('Console'));
    $crumbs->setBorder(true);

    $box = id(new PHUIObjectBoxView())
      ->setObjectList($menu);

    $header = id(new PHUIHeaderView())
      ->setHeader(pht('Nuance Console'))
      ->setHeaderIcon('fa-fax');

    $view = id(new PHUITwoColumnView())
      ->setHeader($header)
      ->setFooter(array(
        $box,
      ));

    return $this->newPage()
      ->setTitle(pht('Nuance Console'))
      ->setCrumbs($crumbs)
      ->appendChild($view);
  }

}

{'fraction_non_alphanumeric': 0.17298022125377138, 'fraction_numerical': 0.0, 'mean_word_length': 3.0215633423180592, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 61, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '936398', 'n_tokens_mistral': 966, 'n_tokens_neox': 944, 'n_words': 142}