// Copyright 2015 Peter Williams
// Distributed under the terms of the Modified BSD License.
//
// This JavaScript is loaded in Notebook Server tree views. It inserts the
// dashboard tab into the view. It would be nice not to construct all of our
// HTML here ... but the extensibility story for the server is not ideal right
// now.

require ([
    'jquery',
    'base/js/namespace',
], function ($, Jupyter) {
    "use strict";
    
    $('#tabs').prepend ('<li><a href="#pwkit-dashboard" data-toggle="tab">Dashboard</a></li>');
    $('.tab-content').append ('<div id="pwkit-dashboard" class="tab-pane"><p>Hello, world.</p></div>');

    $(document).ready (function () {
	$('#tabs').find ('a[href=#pwkit-dashboard]').click ();
    });
});
