-
Notifications
You must be signed in to change notification settings - Fork 0
Pages
Nothing on this page is shown by the installed version yet. Every view below is written and under test, and none of them is declared to the server. They arrive with release 0.2.0.0 and this page says so at each one until they do.
The only page the installed plugin shows is its settings page, under Dashboard > Plugins > Playback Statistics. It shows settings and no stored row, and Configuration is what it is about.
The dashboard translates a plugin page before it inserts it into the document:
it walks the page for ${, takes the text up to the next }, and replaces the
whole marker with a translation lookup. The view modules are written as
template literals from end to end, so what reached the browser was a script with
its markers cut out, which is a syntax error. The script never ran and the call
that would have drawn the view had nothing to call.
Declaring a view in that state puts a blank page in front of an administrator, so the plugin declares its settings page and nothing else until it serves the view code itself, from a route of its own, as markup that carries no code at all. That is issue #335, and drawing the views legibly and putting them in the dashboard menu is issue #336.
A view never draws an empty picture and leaves the reader to guess what it means. Four situations are distinguished by name, and three of them are what a reader meets on a page that has settled:
- ready, the answer arrived and carries rows.
- empty, the answer arrived and the range holds nothing. A range nobody played anything in is a fact, not a fault.
- failed, the answer could not be fetched or the store could not be read.
- loading, the request is in flight. It is the transient one.
A day the server reported nothing about is drawn as a gap and never as a nought, because nought is a claim that nothing happened and what is true is that nothing was said.
They answer about the server and name nobody.
Usage over time. How much the server was used, a day at a time, as two figures rather than one: how many plays and how long was watched, because an evening of many short plays and an evening of one long film are different facts about the same server. Under it, the plays the server had to re-encode, drawn under the day they fell on rather than as a share of it. The zone the days were counted in is stated on the view, because a day is not the same interval for everybody. The delivery figures are about the moment a play began, and the caption says so.
Clients and devices. Which clients and which devices the plays came from, and how many of them the server had to re-encode, drawn as its own figure under the plays it came out of rather than as a percentage. The plays the server named no client for are their own group, labelled with a phrase rather than the word unknown, so a client that actually calls itself Unknown is not folded in with them.
Why the server transcodes. Why plays were not passed through as they were. The reason names are the server's own, unchanged, because an administrator meets those words in the server log and a plugin that renamed them would print something that cannot be looked up. The counts here add up to more than the plays, and Transcode reasons is why that is the right answer.
Usage by hour and weekday. The shape of a week: when the server is busy, by hour of day and by day of week, which is what says when a maintenance task will hurt. It refuses to draw the grid without the zone the figures were counted in, because a cell at midnight is somebody's midnight and the picture cannot say whose.
Where these appear in the dashboard is decided in issue #336, which puts them in the dashboard drawer under one section.
Today the two views built for a person are plugin configuration pages, and the dashboard serves those to administrators only, so the person they are about cannot open them. That is the opposite of what they are for, and issue #337 moves them to a page the plugin serves itself, outside the administrator's dashboard, at an address an administrator can hand out.
Your statistics. That account's own plays, watched time, what it watched most and how much of it it finished, over one of three windows: the last thirty days, the last twelve months, or all time. It never names the reader, because the reader already knows who they are, and it shows no server total.
Your year. That account's own calendar year. The window the figures were computed over is stated before any figure is drawn, in the view itself and not in a footnote, because a year computed from rows a retention sweep has been through is a shorter year wearing a yearly title.
Your privacy choices. The consent control and the deletion control, with the words that say what each does before it is used. They are a view of their own, so a reader whose figures could not be read still has both controls in front of them. Privacy, consent and deletion has the wording and what each control does.
Both personal views are cut to what the account asking may still see: an item that account may no longer see is dropped from the lists and still counted in the totals, so no figure moves for a reason the reader cannot see. An item the library no longer holds is named, because a play of something since deleted is still that account's own play.
Getting started
What it keeps
Releases