Remove obsolete/broken timeline feature

This commit is contained in:
Eelco Dolstra 2013-11-06 15:20:30 +01:00
parent e8d92445d7
commit 60e7e4fbe9
2 changed files with 0 additions and 78 deletions

View file

@ -76,20 +76,6 @@ sub queue_GET {
} }
sub timeline :Local {
my ($self, $c) = @_;
my $pit = time();
$c->stash->{pit} = $pit;
$pit = $pit-(24*60*60)-1;
$c->stash->{template} = 'timeline.tt';
$c->stash->{builds} = [ $c->model('DB::Builds')->search
( { finished => 1, stoptime => { '>' => $pit } }
, { order_by => ["starttime"] }
) ];
}
sub status :Local :Args(0) :ActionClass('REST') { } sub status :Local :Args(0) :ActionClass('REST') { }
sub status_GET { sub status_GET {

View file

@ -1,64 +0,0 @@
[% USE date %]
[% WRAPPER layout.tt title="Timeline" %]
[% PROCESS common.tt %]
<script type="text/javascript">
Timeline_urlPrefix="http://simile.mit.edu/timeline/api/";
</script>
<script src="http://simile.mit.edu/timeline/api/timeline-api.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
doItNow()
});
var tl;
function doItNow() {
var eventSource = new Timeline.DefaultEventSource();
var bandInfos = [
Timeline.createBandInfo({
eventSource: eventSource,
width: "100%",
intervalUnit: Timeline.DateTime.HOUR,
intervalPixels: 200
})
];
tl = Timeline.create(document.getElementById("my-timeline"), bandInfos);
var centerd = Timeline.DateTime.parseIso8601DateTime("[% date.format(pit, '%Y-%m-%dT%H:%M:%S') %]");
tl.getBand(0).setCenterVisibleDate( centerd );
var event_data =
{ "dateTimeFormat": "iso8601", "events":[
{ "start": "[% date.format(pit, '%Y-%m-%dT%H:%M:%S') %]",
"end": "[% date.format(pit, '%Y-%m-%dT%H:%M:%S') %]",
"title": "Now"
}
[% FOREACH build IN builds %]
, { "start": "[% date.format(build.get_column("starttime"), '%Y-%m-%dT%H:%M:%S') %]",
"end": "[% date.format(build.get_column("stoptime"), '%Y-%m-%dT%H:%M:%S') %]",
"isDuration": "true",
"title": "[% build.id %]",
"link": "[% c.uri_for('/build' build.id) %]",
"color": "[% IF build.get_column("buildstatus") == 0 %]green[%ELSE%]red[% END%]"
}
[% END %]
]};
eventSource.loadJSON(event_data, document.location.href);
}
</script>
<div id="my-timeline" style="height: 700px; width: 100%;border: 1px solid #aaa"></div>
<noscript>
This page uses Javascript to show you a Timeline. Please enable Javascript in your browser to see the full page. Thank you.
</noscript>
[% END %]