Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F100683413
PhabricatorNotificationStatusView.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Feb 1, 20:37
Size
1 KB
Mime Type
text/x-php
Expires
Mon, Feb 3, 20:37 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
24012347
Attached To
rPH Phabricator
PhabricatorNotificationStatusView.php
View Options
<?php
final
class
PhabricatorNotificationStatusView
extends
AphrontTagView
{
protected
function
getTagAttributes
()
{
if
(!
$this
->
getID
())
{
$this
->
setID
(
celerity_generate_unique_node_id
());
}
Javelin
::
initBehavior
(
'aphlict-status'
,
array
(
'nodeID'
=>
$this
->
getID
(),
'pht'
=>
array
(
'setup'
=>
pht
(
'Setting Up Client'
),
'open'
=>
pht
(
'Connected'
),
'closed'
=>
pht
(
'Disconnected'
),
),
'icon'
=>
array
(
'open'
=>
array
(
'icon'
=>
'fa-circle'
,
'color'
=>
'green'
,
),
'setup'
=>
array
(
'icon'
=>
'fa-circle'
,
'color'
=>
'yellow'
,
),
'closed'
=>
array
(
'icon'
=>
'fa-circle'
,
'color'
=>
'red'
,
),
),
));
return
array
(
'class'
=>
'aphlict-connection-status'
,
);
}
protected
function
getTagContent
()
{
$have
=
PhabricatorEnv
::
getEnvConfig
(
'notification.servers'
);
if
(
$have
)
{
$icon
=
id
(
new
PHUIIconView
())
->
setIcon
(
'fa-circle-o yellow'
);
$text
=
pht
(
'Connecting...'
);
return
phutil_tag
(
'span'
,
array
(
'class'
=>
'connection-status-text '
.
'aphlict-connection-status-connecting'
,
),
array
(
$icon
,
$text
,
));
}
else
{
$text
=
pht
(
'Notification server not enabled'
);
$icon
=
id
(
new
PHUIIconView
())
->
setIcon
(
'fa-circle-o grey'
);
return
phutil_tag
(
'span'
,
array
(
'class'
=>
'connection-status-text '
.
'aphlict-connection-status-notenabled'
,
),
array
(
$icon
,
$text
,
));
}
}
}
Event Timeline
Log In to Comment