A Dashing widget to show Slack user presence on a dashboard.
Add the following to your dashing Gemfile
gem 'slack-api'
gem 'emoji_data'
And run bundle install
Copy the slack_presence.coffee
, slack_presence.html
and slack_presence.scss
file to into /widgets/slack_presence
directory and the slack_presence.rb
into the /jobs
directory.
Then to include widgets on the dashboard, add one or more of the following items to your dashboard file:
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1">
<div data-id="slack-presence-user1" data-view="SlackPresence"></div>
</li>
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1">
<div data-id="slack-presence-user2" data-view="SlackPresence"></div>
</li>
The data-id
attribute should be in the form of slack-presence-<slack username>
. You can have as many different widgets representing users as you want. Just make sure the slack username used in the data attribute matches the users slack mention name.
The following options need to be set in the /jobs/slack_presence.rb
file in the options
hash:
:api_token
- Your slack API token.