forked from phacility/phabricator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPhabricatorDashboardConsoleController.php
72 lines (59 loc) · 1.96 KB
/
PhabricatorDashboardConsoleController.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
final class PhabricatorDashboardConsoleController
extends PhabricatorDashboardController {
public function shouldAllowPublic() {
return true;
}
public function handleRequest(AphrontRequest $request) {
$viewer = $request->getViewer();
$menu = id(new PHUIObjectItemListView())
->setUser($viewer)
->setBig(true);
$menu->addItem(
id(new PHUIObjectItemView())
->setHeader(pht('Portals'))
->setImageIcon('fa-compass')
->setHref('/portal/')
->setClickable(true)
->addAttribute(
pht(
'Portals are collections of dashboards, links, and other '.
'resources that can provide a high-level overview of a '.
'project.')));
$menu->addItem(
id(new PHUIObjectItemView())
->setHeader(pht('Dashboards'))
->setImageIcon('fa-dashboard')
->setHref($this->getApplicationURI('/'))
->setClickable(true)
->addAttribute(
pht(
'Dashboards organize panels, creating a cohesive page for '.
'analysis or action.')));
$menu->addItem(
id(new PHUIObjectItemView())
->setHeader(pht('Panels'))
->setImageIcon('fa-line-chart')
->setHref($this->getApplicationURI('panel/'))
->setClickable(true)
->addAttribute(
pht(
'Panels show queries, charts, and other information to provide '.
'insight on a particular topic.')));
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(pht('Console'));
$crumbs->setBorder(true);
$title = pht('Dashboard Console');
$box = id(new PHUIObjectBoxView())
->setHeaderText($title)
->setBackground(PHUIObjectBoxView::WHITE_CONFIG)
->setObjectList($menu);
$view = id(new PHUITwoColumnView())
->setFixed(true)
->setFooter($box);
return $this->newPage()
->setTitle($title)
->setCrumbs($crumbs)
->appendChild($view);
}
}