Commit Graph

66 Commits

Author SHA1 Message Date
Ian Wienand 0e2f3d0a9d ptgbot-web: add simple service to serve static pages
This serves the static pages from the container directly

Change-Id: I86f3f5002f88005760e00c5714b0891c1892a6f2
2021-10-05 14:38:56 +11:00
Kendall Nelson c081b3fdc2 Use Opendev Etherpad site
To make it friendlier to non-openstack projects, use the opendev
instance of etherpad instead of the openstack one.

Change-Id: I30385d0ca0145994d21832769510a3a9b627e40d
2021-04-16 13:25:02 +00:00
Thierry Carrez 011c7c7ed7 Bot is now openinfraptg on #openinfra-events
Channel for PTG discussion was moved to #openinfra-events, and
the bot was renames "openinfraptg" to match the extended scope
of the event.

Depends-On: https://review.opendev.org/c/opendev/system-config/+/774862

Change-Id: I5f1cc7867273c82a836ab238e5c2b2352bbf02ff
2021-02-10 14:56:51 +01:00
Thierry Carrez 2f8c18d9c1 Refactor processing of user commands
User commands in PTGbot can be called from privmsg or pubmsg.
Create a usercommands.py file to separate their processing.

This introduces a new '+' prefix for user commands, while preserving
the old '#' calls (which should really only be used for track
commands) for people that got used to them.

Change-Id: Ifab12fa27c6147ba9e9ff51f2b7f9e30a8ed0076
2020-12-08 14:35:48 +01:00
Thierry Carrez 415ae5a05e Make URLs in MOTD messages clickable
A long-wanted feature! Since the MOTD can only be controlled by an
admin, the risk of abuse is very limited.

Change-Id: Iff6263059d76c9b75ae26e029e3063992ab7cb76
2020-11-20 14:38:25 +01:00
Thierry Carrez 9e052b1625 Turn MOTD into a list of messages
The message of the day used to be a single message with an importance
level. It's actually useful to be able to have several distinct
messages and add/remove them separately.

In preparation for that change, turn the motd entry in the json DB into
an array of messages. Gracefully migrate previous format DB into the
new one. Commands stay unchanged for now and just manipulate the first
entry.

Change-Id: Id98281dba0c6b3cffe1a359d6e0c250b99084bb1
2020-11-13 17:39:19 +01:00
Thierry Carrez 9e1b414bec No longer display location
The location code was created to allow for emergency relocation of
meetings, however in a virtual setting that is tracked using the "url"
feature. When location and urls differ it can create a lot of confusion.

It's better to stop displaying location for virtual PTGs. As an
emergency fix, let's stop displaying the location.

Change-Id: Ibb9d96e1fa7f686e31cc8d9b51e3826af8c4b015
2020-10-28 15:31:48 +01:00
Thierry Carrez 7ae6c6cc55 Fix issue in case unknown location is provided
Using the "location" command to point to an unknown location
would cause the Javascript displaying the schedule to crash.

It's a bit useless to use that command in a virtual PTG with
meeting URLs, however the page should handle that case and fail
more gracefully.

Change-Id: I271e2ead0094d407274cbb22e499d7b2c49631b4
2020-10-27 16:24:14 +01:00
Thierry Carrez 8f00364211 Make it clearer how to join the meeting
When a meeting URL is provided, use the tooltip to explain that you
can click to join the meeting, rather than confusingly mention that
no one is checked in.

Change-Id: Id0dacd065ce28ed817fd142105cb728392d0efe4
2020-10-23 11:41:59 +02:00
Thierry Carrez fc5a649df2 Mark current time on the schedule
Add a grey background on cells matching the current time, to make
it clearer where we are in the day.

Change-Id: Id2d13ae59f63c7059bba8abdf762b25e6339720e
2020-09-14 14:27:59 +02:00
Thierry Carrez 673d5375cd Make clickable badges more button-like
Make it clearer that certain badges are meant to be clicked on.
Also replace the darkblue badge color that was too close to the
hover color.

Change-Id: I84617dbd442cfd557155400a65bd87679fe2825a
2020-09-14 13:50:02 +02:00
Sean McGinnis 4f32e1fbf7
Fix minor typo in subscribe command example
Change-Id: I2c16f475918ac786e41635b9524654f00685a5db
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-06-01 14:00:15 -05:00
Thierry Carrez be84818a14 Do not fail if track is not scheduled today
The new track badge logic (which builds in a link to the
videoconference room if one is specified) is failing in case
the track is not scheduled in any location today.

Fix it so that we do not display any link in this precise case.

Change-Id: Ib6d93336e7c5d7c3494d442f95295442a8169a4d
2020-05-29 13:54:43 +02:00
Zuul 220832e547 Merge "UTC times can be confusing, explain times better" 2020-05-11 16:47:58 +00:00
Zuul fa1ed9ca1f Merge "Support for room and track URLs" 2020-05-11 16:04:59 +00:00
Thierry Carrez 9339e42cae UTC times can be confusing, explain times better
If real time equivalents for the time slots are provided, add
a link to timeanddate.com corresponding to the time, and display
browser local time equivalent for the time displayed.

Also make sure that the day tab corresponds to the UTC day (until
01 UTC the next day) whatever your timezone is.

Change-Id: I7847e0ac68fc6fcd176d40cc94d4e21c3c6e03e0
2020-05-06 16:01:51 +02:00
Thierry Carrez acf550e1a2 Update PTG logo
Use official PTG logo rather than the summit arrows logo.

Change-Id: Ie837d2eaa890556722a43800fb9bca55974b3039
2020-05-06 14:59:16 +02:00
Thierry Carrez 5538127768 Support for room and track URLs
Allow to associate a URL to a room, for example a link to a video
conference room. Tracks assigned to this room will automatically inherit
the link. The link for a given track can be overridden using the "url"
command.

This allows organizers to provide video links for each room, while still
enabling teams to link to whatever they end up really using.

Change-Id: I633eb83c579e4093ae769bcd053e4d2ec2fe4bc3
2020-05-05 12:17:51 +02:00
Thierry Carrez e361c20008 Add common navbar and display MOTD on all pages
Now that we have a page for etherpads, navigation between the various
page is a bit awkward. This change introduces a common navbar across
all pages, and makes sure the MOTD displays on all of them.

This makes some of the links redundant, so we remove them.

Change-Id: I57d02c505ced355d53bc79e0d8240ea63737eae3
2019-11-14 16:09:58 +01:00
Thierry Carrez 198570abdf Add update instructions to etherpads page
It is unclear that the etherpads page is driven by the ptgbot.
Add instructions on the page pointing to the ptgbot doc.

Change-Id: I42eee55d01da20a6e6bdc17081b99473ceb44c41
2019-11-06 02:21:37 +00:00
Thierry Carrez c360e15043 Generate etherpad links automatically
With this change, the ptgbot will generate links for each track
etherpad, display them on a specific page (etherpads.html) and
allow track moderators to override the autogenerated link using
the #track etherpad command.

It requires the database to contain an 'eventid' key which serves
as a unique etherpads prefix.

Change-Id: Iaa524530e9f2506369f180588a2b6f98f4cad3d1
2019-08-23 17:21:04 +02:00
Thierry Carrez 7e1f5c3715 Display room capabilities
It is sometimes useful to mark certain rooms as having specific
capabilities like videoprojection. This change adds the possibility
to assign a glyphicon (cap_icon) and a mouseover description
(cap_desc) for the rooms in the schedule dictionary.

Change-Id: I343c28acc3ad6015d3382d526511f153bf38a0e6
2019-08-05 16:51:10 +02:00
Thierry Carrez a6e3c0bbbf Use a badge to show check-ins in "now" display
To reduce waste of horizontal space, show check-ins as a badge
instead of a full text column.

Change-Id: Ia769d21d5402b97568bfe796bff2f11f02105dac
2019-05-13 13:45:44 +02:00
Adam Spiers 8a4910d904 Display count of attendees in each room on web page
Currently it's not obvious that you can see who's checked into a room
by hovering the mouse over one of the room badges. This in turn makes
it less likely for people to check in, since they either won't be
aware of the feature, or will forget about it.

So game-ify check-ins by adding a new column to the "Current
discussion topics" table which displays the number of check-ins within
that room.

Story: 2005657
Task: 30945
Change-Id: I8d2bc716d39c70ff096f17b4da9ccf0a26bfc34f
2019-05-10 23:26:37 +01:00
Zuul 21a616df07 Merge "Add attendees tooltip to now/next track badges" 2019-05-10 09:47:45 +00:00
Adam Spiers bfbf795109 Fix missing space after hyperlinked topics
If a topic contains a URL, the URL gets auto-hyperlinked in ptg.html.
However this code forgot to add a trailing space, so if there was a
word after the URL, the space in between them got swallowed.

So add a space after each word, and do it outside the if/else
conditional to avoid any else clauses which might be added in the
future making the same mistake.

Change-Id: I3b5789387ead52945ae599aa0b80768642388269
2019-05-02 12:14:38 -06:00
Adam Spiers 66f261c710 Add attendees tooltip to now/next track badges
Add the attendees tooltip to the now/next track badges, not just the
ones in the schedule timetable lower down.

Change-Id: Ibb92b1c520c6eebf78dabc0a052dd52fc5a40855
2019-05-02 12:10:12 -06:00
Zuul 4fbaf41725 Merge "Add subscribe command for automatic notifications of topics" 2019-04-30 21:49:16 +00:00
Adam Spiers e8f88b2ee1 Add subscribe command for automatic notifications of topics
Add a new 'subscribe' command which allows people to subscribe for
automatic notifications via direct message of topics which match the
subscription regex they provide.  With no regex argument it shows the
user's current subscription (if any).  Also add a new 'unsubscribe'
command for clearing the regex.

Example use cases:

1. I know that nova is planning to discuss $TOPIC some time tomorrow
   but they don't know exactly when, and I want to spend most of the
   day in another room whilst ensuring I don't miss that particular
   discussion on $TOPIC => "/msg ptgbot subscribe $TOPIC" will give me
   notifications when the PTL types "#nova next $TOPIC" and "#nova now
   $TOPIC".

2. I'm interested in *all* discussion on Python 3.  I don't know which
   projects are planning to discuss it, let alone when, but that
   doesn't matter, because I can type "/msg ptgbot subscribe python ?3"
   and get notified of all Python 3 discussions.

As with the presence tracking commands, these commands can be used in
public channels by preceding them with a '#' character.

Change-Id: I3f51acc318ecf31d435768640cef6c46d8ca136c
2019-04-30 13:06:58 -06:00
Adam Spiers a495d3011b Show check-ins per room in "Currently at the PTG" page
Include tooltips on the "Currently at the PTG" page, so that hovering
the mouse over a particular track will show IRC nicks for everyone
currently checked into that track.  If noone has checked in to the
track yet, give a hint about how to do it.

Thanks a lot to Jay Bryant for giving me the idea for this after we
bumped into each other on the plane to Denver ;-)

Change-Id: I1b86c1f403981b066ad096548a1754fadd6b72ad
2019-04-28 11:30:52 -06:00
Adam Spiers 946d69b140 Add presence tracking commands
Add in/out/seen commands to let people voluntarily check in and out of
tracks and other arbitrary locations, to make it easy for others to
find them.  Of course this is entirely optional.

It's designed to cope gracefully with people forgetting to check out
of locations they previously checked into.

Change-Id: I0d88a540ad7a333841c208dd7f2a7247897eb238
2019-04-26 19:07:07 +01:00
Thierry Carrez 98811703f6 Remove last GitHub links for help
Now that we have beautified RST in OpenDev, just link to that
instead of to GitHub for help links.

Change-Id: Ia57a3ce71a26520b3a3b7c5392bd8ef880a68674
2019-04-15 16:34:04 +02:00
Thierry Carrez 3194bfedbc Update links to point to gitea
Links to ptgbot documentation should point to the nicely
rendered page at opendev.org.

Change-Id: I10871f1dc68b6469da7df89b0f4125165753dfab
2019-03-11 17:17:44 +01:00
Thierry Carrez 390f1de3ea The PTG is no longer OpenStack-specific
Remove mentions to "OpenStack PTG" as we invite much more
teams to the PTG than just OpenStack teams.

Change-Id: I85b0125b669c0ed970463efd98574480de1469a7
2019-03-11 17:16:57 +01:00
Thierry Carrez cb0e38cd12 Generate PTGbot index page dynamically
Current system (where the index page is specified in the
puppet-ptgbot module) requires that (some) links on the page
are updated in puppet-ptgbot at the start of every event.

That page should be dynamically generated from JSON data.
That way the list of links can be provided in the JSON database
and dynamically imported and updated using the ~fetchdb command.

Change-Id: I7d82b38cba495e5837ba54fbe7a9b7e9c8e14259
2018-12-21 15:35:30 +01:00
Thierry Carrez 3b59f982f8 Add emergency messages (~motd and ~cleanmotd)
Add admin command to add (and clean) a message of the day (motd)
to the rendered page. Can be used for emergency messages (using
level 'danger') or more general information.

Change-Id: Ie84d1a826c2f84a7ccdafd08176eef9aa2c5a3f1
2018-11-26 14:34:31 +01:00
Thierry Carrez 21d77e09f8 Handle all schedule in a single table
The bookable rooms functionality was bolted on top of the "normal"
schedule table using a separate table in the JSON and the config.

Now that bookable rooms are shown together with "regular" rooms,
we can merge the two concept and pay back that technical debt.

This is an incompatible JSON change so the database will have to
be ~reload-ed from configuration.

Change-Id: Ia37b6202b363614418b562b693b3dd807621aa97
2018-10-04 16:06:05 +02:00
Adam Spiers 3c53707b4c Add more usage hints
Since there's already a hint on how to tell the bot to book a room,
and some people have been slightly struggling with updating track
info, add a couple of hints making it more obvious how to do this
without having to consult a larger README.rst.  This should hopefully
encourage more people to help keep track info up to date.

Also include a link to the nicely rendered version of README.rst on
GitHub, so that if people are looking for more detailed help, they can
easily find it.

Change-Id: I3596d69dc84b635bc3a67ff7223a7ccfad27308e
2018-02-28 13:58:01 +00:00
Zuul 1b7c9c851e Merge "Auto-hyperlink URLs" 2018-02-28 12:24:49 +00:00
Adam Spiers 7303f62f5e Add a couple of useful hyperlinks to the footer
Link to the bot README and to the IRC channel logs so that people can
more easily discover details of the process behind the generation of
this page.

Change-Id: I91347f7b9732ead934d56e4d1c84d94e08910a13
2018-02-28 00:01:57 +00:00
Adam Spiers 4cac60ff37 Auto-hyperlink URLs
If someone issues a command like

    #upgrades now Upgrades SIG https://etherpad.openstack.org/p/ffu-ptg-rocky

then make the URL a hyperlink so that viewers of the webpage can
easily jump to the etherpad to learn about the topic being discussed
and make a quick but informed decision whether it's worth them going
to that room.

To avoid duplicating the word iteration logic, we do this by extending
the existing "hashtag" helper; however this widens its scope beyond
merely formatting hashtags, so also rename the helper to reflect this.

Change-Id: I8e21ab9a1966a09a7b4ec1742eeb578cfd0a3f49
2018-02-27 23:23:51 +00:00
Thierry Carrez b6ea7e45a2 Refresh every 3 minutes instead of 1
With the larger page to read, the refresh can be a bit painful.
Set it to once every 3 minutes instead of every 60 seconds.

Change-Id: Ic1d698e3d9287a6bc9935d541ce2196094ea67c2
2018-02-15 09:39:06 +01:00
Thierry Carrez 16b0d1d7b1 Remove leftover console.log
A console.log was left in a .js file, leading to noisy
debug messages in the JavaScript console.

Change-Id: Ieb8a6ee70ffe26df5d2bba0e013f01e709504edf
2018-02-14 15:01:31 +01:00
Thierry Carrez 5a6e0ffa8a Increase label size on signage page
Label size is barely readable from a distance, so
let's increase it.

Change-Id: I536aeff2751f8641147a2ef9a8c057c52d504d6f
2018-02-12 12:37:48 +01:00
Thierry Carrez 55956246a2 Add page for digital PTG signage
This renders the same ptg.json data in a specific page
that will be used for digital signage at the event.

Change-Id: I126799a40b2b753096c8366d6fde93d1fbf2ae3d
2018-02-08 14:38:15 +01:00
Thierry Carrez adbd5e4957 Single table for scheduled and additional rooms
Collapse the "scheduled" and "additional" tracks tables into
a single table. This extends the "roomcode" helper to be
smart enough to guess what the cell should contain.

Change-Id: I60887d5da0878820817f17c9f4fd1aa20f546aac
2018-02-08 14:08:12 +01:00
Thierry Carrez 5575015e33 Do not display room if not reservable on the day
Stop displaying a line for a room in "additional tracks"
if it's actually not reservable at all during that day.

Change-Id: If7063b8bf00531cd154f49c3a3fbc88b1e16fa3f
2018-02-02 13:30:05 +01:00
Thierry Carrez 3781e486f7 Do not display slotrefs for unreservable slots
Stop displaying slot reference codes in the "additional tracks"
table if the slot is actually not bookable

Change-Id: I367d75bcfc289475d28df2bbd524adda059f4b05
2018-02-02 13:10:36 +01:00
Thierry Carrez 750bcebbd4 Select current day tab by default
On the room tables, preselect the tabs corresponding to the current
day, rather than always Monday. If the day doesn't exist, find the
first available day tab and select those.

Change-Id: I3c0bc58f35cd39a8c5291d1d6da4547283479e2d
2017-12-21 14:56:23 +01:00
Thierry Carrez c637840754 Add ability to book a room
Available room slots can be booked for any track through
the ptgbot new #book command, referencing the slot code.

Change-Id: I0c661e448568c7f2f26fb296e3f2506ba1ed44ba
2017-12-21 14:55:29 +01:00