/InteractionTimeline

Interaction Timeline

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

Interaction Timeline

Build Status

The Interaction Timeline is a feature the Anti-Harassment Tools team is planning to build in late 2017. The goal of the feature is to help administrators understand the sequence of events between two users so they can confidently make a decision about how to best resolve a user conduct dispute.

Non-GitHub Resources

Description Title
Live instance Interaction Timeline
Project documentation Community health initiative/Interaction Timeline - Meta
Project Workboard InteractionTimeline · Workboard

Contributing

Dev access to Toolforge is required.

  • Copy ./.env.dist to ./.env and customize.
  • You can find DB_USER and DB_PASS in replica.my.cnf in your home directory after you ssh into toolforge.
  • Open an ssh tunnel to toolforge on your machine.
    • On Linux, ensure that your tunnel is bound to 0.0.0.0 rather than just localhost:
      ssh -N yourusername@tools-dev.wmflabs.org -L 0.0.0.0:3306:enwiki.analytics.db.svc.eqiad.wmflabs:3306
  • Run the Interaction Timeline locally:
    docker-compose up

The app should be accessible at http://127.0.0.1:8888 and http://127.0.0.1:8888/api/hello

Deploy

Interaction Timeline is hosted on Toolforge

ssh login.tools.wmflabs.org;
become interaction-timeline;
cd tool;

Pull

git pull origin master

Build

Toolforge provides Node.js 0.11 by default, but Node.js 6.11 is available via the Kubernetes backend.

webservice --backend=kubernetes nodejs shell;
cd tool/client;
./bin/build;
exit;

Start

webservice --backend=kubernetes php7.2 start

Stop

webservice --backend=kubernetes stop

Restart

webservice --backend=kubernetes restart

API Endpoints

Interaction

/api/{wiki}/interaction?user={username1|username2}&start_date={timestamp}&end_date={timestamp}&limit={50}&continue={continue_string}

Parameters

  • wiki: Wiki project we want to check the interactions on. Ex: enwiki, eswiki, testwiki
  • user: List of usernames involved in the interactions joined by a |. No less than 2
  • start_date: The start timestamp to return from
  • end_date: The end timestamp to return to
  • limit: Maximum amount of interactions to list. Default to 50
  • continue: When more results are available, use the returned continue string to fetch the next page

Example

/api/testwiki/interaction?user=Test-bananas|Test-apples&start_date=1509508800&end_date=1512104400&limit=10&continue=MzM4NTEy

Alternatives