Page MenuHomeSoftware Heritage

T286: Add a calendar-like UI to the origin page
ClosedPublic

Authored by jbertran on Jul 13 2016, 12:13 PM.

Details

Summary

Backend: get origin visit stats from storage
Service: add origin visit stats from backend
API: open /api/1/stat/visits/<int:origin>/
Browse: add SWH visit timeline to origin browsing

WARNING:

This does not work in its current state, we need to work out how to make the plugin available.

apt-get install libjs-jquery-flot installs everything this needs EXCEPT the tooltip plugin for flot, which is necessary. Do we just accept that symlinks in static/lib works for everything but tooltip, and bundle tooltip in static/lib separately?

Diff Detail

Repository
rDWAPPS Web applications
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

jbertran retitled this revision from to T286: Add a calendar-like UI to the origin page.
jbertran updated this object.
jbertran edited the test plan for this revision. (Show Details)
jbertran edited edge metadata.
ardumont added inline comments.
swh/web/ui/static/js/calendar.js
48 ↗(On Diff #247)

Can you please add a comment on this, something like 'circumvent the closure issue on overriden this in function...' or something?

I'm pretty sure i won't remember this kind of detail later.
As this thing is a deal breaker if absent, i think it's worth a comment ^^.

80 ↗(On Diff #247)

Missed 'javascriptdoc'?

swh/web/ui/static/js/calendar.js
69 ↗(On Diff #247)

Excuse me for asking but does this work on say... safari?
^^

88 ↗(On Diff #247)

This looks like the previous function, maybe you could reuse some code?

122 ↗(On Diff #247)

Maybe extract this value in a variable and reuse it.

127 ↗(On Diff #247)

Barf, please, take a look at your formatter.
This seems to be messed up again ^^

jbertran added inline comments.
swh/web/ui/static/js/calendar.js
69 ↗(On Diff #247)

Not working on konqueror at any rate ><

swh/web/ui/static/js/calendar.js
174 ↗(On Diff #247)

Some reuse is possible between this and function date_to_tooltip_static below.

swh/web/ui/templates/origin.html
15 ↗(On Diff #247)

If i understood right your first comment, this is the one not packaged, am i right?

Well, looks like to me, something awesome this way comes!

jbertran added inline comments.
swh/web/ui/templates/origin.html
15 ↗(On Diff #247)

Yup.

jbertran marked an inline comment as done.
  • Temporarily add flot libraries, update calendar

This does not work in its current state, we need to work out how to make the plugin available.
apt-get install libjs-jquery-flot installs everything this needs EXCEPT the tooltip plugin for flot, which is necessary. Do we just accept that symlinks in static/lib works for everything but tooltip, and bundle tooltip in static/lib separately?

T490 for the flot plugin package issue.

jbertran edited edge metadata.

Change to symlinks in static/lib for flot inclusion

This revision is now accepted and ready to land.Jul 13 2016, 3:40 PM
This revision was automatically updated to reflect the committed changes.