Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/dashboard/controller/PhabricatorDashboardConsoleController.php
12242 views
1
<?php
2
3
final class PhabricatorDashboardConsoleController
4
extends PhabricatorDashboardController {
5
6
public function shouldAllowPublic() {
7
return true;
8
}
9
10
public function handleRequest(AphrontRequest $request) {
11
$viewer = $request->getViewer();
12
13
$menu = id(new PHUIObjectItemListView())
14
->setUser($viewer)
15
->setBig(true);
16
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.')));
28
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.')));
39
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.')));
50
51
$crumbs = $this->buildApplicationCrumbs();
52
$crumbs->addTextCrumb(pht('Console'));
53
$crumbs->setBorder(true);
54
55
$title = pht('Dashboard Console');
56
57
$box = id(new PHUIObjectBoxView())
58
->setHeaderText($title)
59
->setBackground(PHUIObjectBoxView::WHITE_CONFIG)
60
->setObjectList($menu);
61
62
$launch_view = id(new PHUILauncherView())
63
->appendChild($box);
64
65
$view = id(new PHUITwoColumnView())
66
->setFooter($launch_view);
67
68
return $this->newPage()
69
->setTitle($title)
70
->setCrumbs($crumbs)
71
->appendChild($view);
72
}
73
74
}
75
76