Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / dashboard / controller / PhabricatorDashboardConsoleController.php
blobe63cedb1da07a30403a1085570da566554247314
1 <?php
3 final class PhabricatorDashboardConsoleController
4 extends PhabricatorDashboardController {
6 public function shouldAllowPublic() {
7 return true;
10 public function handleRequest(AphrontRequest $request) {
11 $viewer = $request->getViewer();
13 $menu = id(new PHUIObjectItemListView())
14 ->setUser($viewer)
15 ->setBig(true);
17 $menu->addItem(
18 id(new PHUIObjectItemView())
19 ->setHeader(pht('Portals'))
20 ->setImageIcon('fa-compass')
21 ->setHref('/portal/')
22 ->setClickable(true)
23 ->addAttribute(
24 pht(
25 'Portals are collections of dashboards, links, and other '.
26 'resources that can provide a high-level overview of a '.
27 'project.')));
29 $menu->addItem(
30 id(new PHUIObjectItemView())
31 ->setHeader(pht('Dashboards'))
32 ->setImageIcon('fa-dashboard')
33 ->setHref($this->getApplicationURI('/'))
34 ->setClickable(true)
35 ->addAttribute(
36 pht(
37 'Dashboards organize panels, creating a cohesive page for '.
38 'analysis or action.')));
40 $menu->addItem(
41 id(new PHUIObjectItemView())
42 ->setHeader(pht('Panels'))
43 ->setImageIcon('fa-line-chart')
44 ->setHref($this->getApplicationURI('panel/'))
45 ->setClickable(true)
46 ->addAttribute(
47 pht(
48 'Panels show queries, charts, and other information to provide '.
49 'insight on a particular topic.')));
51 $crumbs = $this->buildApplicationCrumbs();
52 $crumbs->addTextCrumb(pht('Console'));
53 $crumbs->setBorder(true);
55 $title = pht('Dashboard Console');
57 $box = id(new PHUIObjectBoxView())
58 ->setHeaderText($title)
59 ->setBackground(PHUIObjectBoxView::WHITE_CONFIG)
60 ->setObjectList($menu);
62 $launch_view = id(new PHUILauncherView())
63 ->appendChild($box);
65 $view = id(new PHUITwoColumnView())
66 ->setFooter($launch_view);
68 return $this->newPage()
69 ->setTitle($title)
70 ->setCrumbs($crumbs)
71 ->appendChild($view);