Opened 11 months ago

Closed 6 months ago

#23518 closed enhancement (fixed)

Turn Atlas into page on Tor Metrics

Reported by: karsten Owned by: irl
Priority: Medium Milestone:
Component: Metrics/Relay Search Version:
Severity: Normal Keywords: metrics-2018
Cc: metrics-team Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description (last modified by irl)

We briefly discussed this before, but I didn't find a ticket for it, so I made this one.

Let's consider turning Atlas into a page on Tor Metrics. It could live under "Home >> Services >> Atlas".

From a technical perspective I think we could add Atlas as Git submodule and copy its index.html into a JSP, so that we can include the Tor Metrics banner and footer. And we'd copy over all required JS files.

It would certainly help to get rid of Atlas' navbar and footer and make sure that it works well with Metrics' style file.

Child Tickets

TicketTypeStatusOwnerSummary
#25077defectclosedmetrics-teamAtlas onion service calls clearnet metrics.torproject.org
#25254defectclosedirlReplace the getPosition function in metrics-web's bootstrap JS from bootstrap 3.3.5
#25255enhancementclosedirlModify top.jsp to allow the inclusion of additional stylesheets
#25256enhancementclosedmetrics-teamCreate an index.jsp based on the index.html to use metrics-web styles
#25258enhancementclosedirlInclude Relay Search in metrics-web
#25280defectclosedirlUpdate all Relay Search URLs to new location on metrics.torproject.org
#25281enhancementclosedirlDeploy a redirect from atlas.tpo to metrics.tpo/rs.html

Change History (22)

comment:1 Changed 11 months ago by irl

karsten: I'm going to need to have some idea of how to set up a dev environment for this. Will things just work if I tell Eclipse to do Tomcat things with metrics-web?

comment:2 Changed 11 months ago by karsten

irl: It's complicated! :) I'd say don't worry about the technical integration part. Better import Metrics' CSS file into Atlas and make sure the page looks okay there (though without banner and footer). I'll happily do the rest.

comment:3 Changed 11 months ago by karsten

Keywords: metrics-2018 added

comment:4 Changed 11 months ago by karsten

Keywords: metrics-2017 added; metrics-2018 removed

comment:5 Changed 9 months ago by irl

Status: newassigned

Moving this into my queue.

comment:6 Changed 9 months ago by irl

Description: modified (diff)
Status: assignedaccepted

I've now merged the metrics theme with Atlas and rebranded it as Relay Search. For now we can display a message at the top of the page to explain to users about the rebranding. This will be merged and continue to be served by the static mirrors for now, waiting for embedded Jetty in metrics-web before merging into the metrics-web codebase.

Javascript libraries have been updated for compatibility with the versions used by metrics-web, including jQuery and bootstrap.

The only issue that has been found with compatibility is the "return to top" button used on the website which uses a URL fragment, conflicting with the URL routing for the javascript application.

Many resources are now loaded from metrics.torproject.org instead of being local to the Atlas codebase, which is something we should be aware of but is not a large problem as that's where we'll want them to be loaded from in the future anyway.

Currently services.html has:

<li><a href="https://atlas.torproject.org/" target="_blank">Atlas</a> displays data about single relays and bridges in the Tor network.</li>

Let's change this to:

<li><a href="https://atlas.torproject.org/">Relay Search</a> displays data about single relays and bridges in the Tor Network.</li>

(The omission of the _blank target is deliberate, as Relay Search now matches the Metrics branding this should be seamless for users.)

comment:7 in reply to:  6 Changed 9 months ago by karsten

Replying to irl:

Currently services.html has:

<li><a href="https://atlas.torproject.org/" target="_blank">Atlas</a> displays data about single relays and bridges in the Tor network.</li>

Let's change this to:

<li><a href="https://atlas.torproject.org/">Relay Search</a> displays data about single relays and bridges in the Tor Network.</li>

(The omission of the _blank target is deliberate, as Relay Search now matches the Metrics branding this should be seamless for users.)

Changed, merged, and deployed!

Thanks for making all the changes on the Atlas/Relay Search side!

comment:8 Changed 9 months ago by irl

Thanks. (:

comment:9 Changed 9 months ago by atagar

Hi Karsten, hi irl. I'm a bit curious: what is the long term plan around this? Do you plan to rewrite Atlas or keep it as a frame?

comment:10 Changed 9 months ago by irl

The index.html will become a JSP, and the JavaScript application will be loaded as it currently is, just with the codebase merged into the metrics-web codebase.

Later there is a possibility that portions will be rewritten in Java, but this will depend on a Java Onionoo client (metrics-bot kind of has one, but it's not anywhere near complete).

comment:11 Changed 9 months ago by teor

Is there any chance of getting the search box back on every Relay Search page?
It was really useful on Atlas.

comment:12 Changed 9 months ago by irl

teor: See #24274

comment:13 Changed 9 months ago by irl

We should dynamically generate the fallback_dir.js script from tor's source code in order to have it automatically kept up to date. Alternatively, this could be added to Onionoo.

If metrics-lib does not already have a parser for this file format, it would probably also be a good idea to add one.

comment:14 Changed 9 months ago by irl

The SVG tooltips used in the graphs are broken with bootstrap 3.3.7 but work with 3.3.5. The fix appears to be to replace the getPosition function from 3.3.5 in 3.3.7 and we should ensure we do this. For now, Relay Search is hosting its own bootstrap js.

comment:15 Changed 8 months ago by irl

Things to be done:

  • Replace the getPosition function in metrics.tpo's bootstrap JS from bootstrap 3.3.5 (#25254)
  • Modify src/main/resources/web/jsps/top.jsp to allow inclusion of extra stylesheets (#25255)
  • Create a JSP based on RS's index.html at src/main/resources/web/jsps/rs.jsp (#25256)
  • Include Relay Search in metrics-web (#25258)
Last edited 6 months ago by irl (previous) (diff)

comment:16 Changed 8 months ago by irl

Keywords: metrics-2018 added; metrics-2017 removed

We have made very good progress on this, and it's nearly complete, but it's not going to happen this year.

comment:17 Changed 6 months ago by irl

I have updated comment:15 to have the set of remaining tasks to do the actual inclusion work, and created child tickets for each of the individual tasks.

comment:18 Changed 6 months ago by irl

Once #25255 and #25258 are merged, the next steps would be:

  • replace static mirror hosted version with redirect to metrics.tpo (needs to be done in JavaScript due to the use of the URL fragment) (#25281)
  • update the link from the metrics.tpo services page (karsten already did)
  • update the links generated by metrics-bot (#25280)

Longer term and final steps:

  • identify any documentation that would need to be updated with new links
  • shut down atlas.tpo
Last edited 6 months ago by irl (previous) (diff)

comment:19 in reply to:  18 ; Changed 6 months ago by karsten

Replying to irl:

  • update the link from the metrics.tpo services page

I already did this as part of merging #25255 and #25258, because I thought it was an oversight. Looks like it wasn't. Anyway, it's already done now.

comment:20 in reply to:  19 Changed 6 months ago by irl

Replying to karsten:

Replying to irl:

  • update the link from the metrics.tpo services page

I already did this as part of merging #25255 and #25258, because I thought it was an oversight. Looks like it wasn't. Anyway, it's already done now.

That's ok. I just wanted to click around a bit first to make sure nothing broke between my dev environment and deployment but it's all looking good.

I'll next make child tickets for the remaining tasks and start to tackle those.

comment:21 Changed 6 months ago by irl

Remaining tasks:

  • identify any documentation that would need to be updated with new links
  • shut down atlas.tpo

comment:22 Changed 6 months ago by irl

Resolution: fixed
Status: acceptedclosed

I've created #25283 for deciding when we would be able to turn off atlas.tpo. The task as described in the summary is completed however, so I'll mark this ticket as fixed now. (:

Note: See TracTickets for help on using tickets.