Diffusion: rough cut of history view

Summary:
Very very rough approximation of history view. I left out all the
log parsing stuff for now since we should be able to just look it up in
a Repository table and I think that'll be a bit faster, although we can
muck around and see.

Test Plan:
Looked at history of a path

Reviewed By: jwilson
Reviewers: aran, jwilson
CC: epriestley, jwilson
Differential Revision: 66
This commit is contained in:
epriestley
2011-03-08 17:31:44 -08:00
parent 958b00c010
commit c82cab35e2
19 changed files with 361 additions and 18 deletions

View File

@@ -0,0 +1,51 @@
<?php
/*
* Copyright 2011 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
class DiffusionHistoryController extends DiffusionController {
public function processRequest() {
$drequest = $this->diffusionRequest;
$history_query = DiffusionHistoryQuery::newFromDiffusionRequest(
$drequest);
$history = $history_query->loadHistory();
$content = array();
$history_table = new DiffusionHistoryTableView();
$history_table->setDiffusionRequest($drequest);
$history_table->setHistory($history);
$history_panel = new AphrontPanelView();
$history_panel->setHeader($drequest->getPath());
$history_panel->appendChild($history_table);
$content[] = $history_panel;
// TODO: Crumbs
// TODO: Side nav
return $this->buildStandardPageResponse(
$content,
array(
'title' => 'history',
));
}
}

View File

@@ -0,0 +1,15 @@
<?php
/**
* This file is automatically generated. Lint this module to rebuild it.
* @generated
*/
phutil_require_module('phabricator', 'applications/diffusion/controller/base');
phutil_require_module('phabricator', 'applications/diffusion/query/history/base');
phutil_require_module('phabricator', 'applications/diffusion/view/historytable');
phutil_require_module('phabricator', 'view/layout/panel');
phutil_require_source('DiffusionHistoryController.php');