Skip to content
JavaScript PHP CSS Other
Branch: master
Clone or download
dayllanmaza Merge pull request #116 from wikimedia/T185785
T185785 Ensure that the noscript content is viewable
Latest commit 1fe1aeb Sep 16, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
client
etc
i18n
server Fix test and update travis ci to use php 7.2 May 31, 2019
.editorconfig Initial commit Oct 25, 2017
.env.dist T197148 Add documentation for DB_HOST vs DB_CLUSTER Aug 10, 2018
.gitignore
.travis.yml
Dockerfile Fix revision queries with actor columns May 30, 2019
LICENSE
README.md
docker-compose.yml T199235 Put system dependencies in a Dockerfile Aug 1, 2018
toolinfo.json

README.md

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

You can’t perform that action at this time.