Show coverage percentages in table of contents

Summary:
Rough cut -- this needs style / color / tooltips, etc. Show raw coverage and "modified coverage" (coverage on lines you touched) in the table of contents.

https://secure.phabricator.com/file/data/id3apce5p5gevkee6tg2/PHID-FILE-kxcxlbsej454t4xiht2o/Screen_Shot_2012-03-12_at_3.30.30_PM.png

Test Plan: See screenshot above.

Reviewers: tuomaspelkonen, btrahan, zeeg

Reviewed By: tuomaspelkonen

CC: aran, epriestley

Maniphest Tasks: T965

Differential Revision: https://secure.phabricator.com/D1864
This commit is contained in:
epriestley
2012-03-12 17:06:55 -07:00
parent 09c1bd34f1
commit 85bdcbdd43
8 changed files with 217 additions and 56 deletions

View File

@@ -208,9 +208,17 @@ final class DifferentialChangesetViewController extends DifferentialController {
$output = $parser->render($range_s, $range_e, $mask);
$mcov = $parser->renderModifiedCoverage();
if ($request->isAjax()) {
$content = array(
'coverage' => array(
'differential-mcoverage-'.md5($changeset->getFilename()) => $mcov,
),
'changeset' => $output,
);
return id(new AphrontAjaxResponse())
->setContent($output);
->setContent($content);
}
Javelin::initBehavior('differential-show-more', array(