Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/console/plugin/DarkConsoleRealtimePlugin.php
13402 views
1
<?php
2
3
final class DarkConsoleRealtimePlugin extends DarkConsolePlugin {
4
5
public function getName() {
6
return pht('Realtime');
7
}
8
9
public function getColor() {
10
return null;
11
}
12
13
public function getDescription() {
14
return pht('Debugging console for real-time notifications.');
15
}
16
17
public function renderPanel() {
18
$frame = phutil_tag(
19
'div',
20
array(
21
'id' => 'dark-console-realtime-log',
22
'class' => 'dark-console-log-frame',
23
));
24
25
$reconnect_label = pht('Reconnect');
26
$replay_label = pht('Replay');
27
$repaint_label = pht('Repaint');
28
29
$buttons = phutil_tag(
30
'div',
31
array(
32
'class' => 'dark-console-realtime-actions',
33
),
34
array(
35
id(new PHUIButtonView())
36
->setIcon('fa-refresh')
37
->setColor(PHUIButtonView::GREY)
38
->setText($reconnect_label)
39
->addSigil('dark-console-realtime-action')
40
->setMetadata(
41
array(
42
'action' => 'reconnect',
43
'label' => $reconnect_label,
44
)),
45
id(new PHUIButtonView())
46
->setIcon('fa-backward')
47
->setColor(PHUIButtonView::GREY)
48
->setText($replay_label)
49
->addSigil('dark-console-realtime-action')
50
->setMetadata(
51
array(
52
'action' => 'replay',
53
'label' => $replay_label,
54
)),
55
id(new PHUIButtonView())
56
->setIcon('fa-paint-brush')
57
->setColor(PHUIButtonView::GREY)
58
->setText($repaint_label)
59
->addSigil('dark-console-realtime-action')
60
->setMetadata(
61
array(
62
'action' => 'repaint',
63
'label' => $repaint_label,
64
)),
65
));
66
67
return phutil_tag(
68
'div',
69
array(
70
'class' => 'dark-console-realtime',
71
),
72
array(
73
$buttons,
74
$frame,
75
));
76
}
77
78
}
79
80