/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
var view = 0;
function renderStatusLine() {
$("#plugin_content").append( "
" );
}
function renderView( /* Array of String */ columns, /* String */ buttons ) {
renderStatusLine();
renderButtons(buttons);
var txt = "
";
for ( var name in columns ) {
txt = txt + "
" + columns[name] + "
";
}
txt = txt + "
";
$("#plugin_content").append( txt );
renderButtons(buttons);
renderStatusLine();
}
function renderButtons( buttons ) {
$("#plugin_content").append( "" );
}
function renderData( eventData ) {
$(".statusline").empty().append(eventData.status);
$("#plugin_table > tbody > tr").remove();
for ( var idx in eventData.data ) {
entry( eventData.data[idx] );
}
$("#plugin_table").trigger("update");
if ( view == 1 ) {
$("#timeline").remove();
$("div.table").append( "" );
for ( var idx in eventData.data ) {
entryTimeline( eventData.data[idx] );
}
}
}
function entry( /* Object */ dataEntry ) {
var trElement = tr( null, { id: "entry" + dataEntry.id } );
entryInternal( trElement, dataEntry );
$("#plugin_table > tbody").append(trElement);
}
function entryTimeline( /* Object */ dataEntry ) {
var txt = "