/* XXX Events */
this.elmt().on('show', this, this.on_show);
// TODO in destructor
- // $(window).unbind('Hazelnut');
+ // $(window).unbind('QueryTable');
var query = manifold.query_store.find_analyzed_query(this.options.query_uuid);
this.object = query.object;
//return this.escape_id(key_value).replace(/\\/g, '');
// however this sequence removes backslashes from hrn's and as a result
// resources_selected was getting all mixed up
- // hazelnut does publish hrn's with backslashes and that seems like the thing to do
+ // querytable does publish hrn's with backslashes and that seems like the thing to do
return key_value;
},
},
/* PLUGIN EVENTS */
- // on_show like in hazelnut
+ // on_show like in querytable
/* GUI EVENTS */
from unfold.plugin import Plugin
-class Hazelnut (Plugin):
+class QueryTable (Plugin):
# set checkboxes if a final column with checkboxes is desired
# pass columns as the initial set of columns
if self.checkboxes:
# we use aoColumnDefs rather than aoColumns -- ignore user-provided aoColumns
if 'aoColumns' in self.datatables_options:
- print 'WARNING: hazelnut uses aoColumnDefs, your aoColumns spec. is discarded'
+ print 'WARNING: querytable uses aoColumnDefs, your aoColumns spec. is discarded'
del self.datatables_options['aoColumns']
# set aoColumnDefs in datatables_options - might already have stuff in there
aoColumnDefs = self.datatables_options.setdefault ('aoColumnDefs',[])
# here 'checkbox' is the class that we give to the <th> dom elem
- # dom-checkbox is a sorting type that we define in hazelnut.js
+ # dom-checkbox is a sorting type that we define in querytable.js
aoColumnDefs.append ( {'aTargets': ['checkbox'], 'sSortDataType': 'dom-checkbox' } )
def template_file (self):
- return "hazelnut.html"
+ return "querytable.html"
def template_env (self, request):
env={}
"js/dataTables.js", "js/dataTables.bootstrap.js", "js/with-datatables.js",
"js/manifold.js", "js/manifold-query.js",
"js/unfold-helper.js",
- # hazelnut.js needs to be loaded after dataTables.js as it extends
+ # querytable.js needs to be loaded after dataTables.js as it extends
# dataTableExt.afnSortData
- "js/hazelnut.js",
+ "js/querytable.js",
] ,
'css_files': [ "css/dataTables.bootstrap.css",
# hopefully temporary, when/if datatables supports sPaginationType=bootstrap3
# for now we use full_numbers, with our own ad hoc css
"css/dataTables.full_numbers.css",
- "css/hazelnut.css" ,
+ "css/querytable.css" ,
],
}
return reqs
/* the bottom of the datatable needs more space */
-div.hazelnut-spacer { padding: 8px 4px 15px 4px; }
+div.querytable-spacer { padding: 8px 4px 15px 4px; }
-div.Hazelnut table.dataTable th {
+div.QueryTable table.dataTable th {
font: bold 12px/22px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
color: #4f6b72;
border-right: 1px solid #C1DAD7;
/* background: #CAE8EA url(../img/tablesort-header.jpg) no-repeat; */
}
-div.Hazelnut table.dataTable th.checkbox {
+div.QueryTable table.dataTable th.checkbox {
padding-left: 14px;
}
-div.Hazelnut table.dataTable td, div.Hazelnut table.dataTable textarea, div.Hazelnut table.dataTable input [type="text"] {
+div.QueryTable table.dataTable td, div.QueryTable table.dataTable textarea, div.QueryTable table.dataTable input [type="text"] {
font: normal 12px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
border-right: 1px solid #C1DAD7;
border-bottom: 1px solid #C1DAD7;
}
-div.Hazelnut table.dataTable td {
+div.QueryTable table.dataTable td {
padding: 4px 8px 4px 8px;
/* this applies on even rows only, odd ones have a setting in bootstrap of rbg 249.249.249 */
background-color: #f4f4f4;
}
-div.Hazelnut table.dataTable td a {
+div.QueryTable table.dataTable td a {
font-weight:normal;
}
/* these come from bootstrap */
-div.Hazelnut div.dataTables_info {
+div.QueryTable div.dataTables_info {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
* which would look less conspicuous in case of overflow
*/
-div.Hazelnut table.dataTable thead .sorting { background: url('../img/tablesort-header-sortable.png') no-repeat; }
-div.Hazelnut table.dataTable thead .sorting_asc { background: url('../img/tablesort-header-up.png') no-repeat; }
-div.Hazelnut table.dataTable thead .sorting_desc { background: url('../img/tablesort-header-down.png') no-repeat; }
+div.QueryTable table.dataTable thead .sorting { background: url('../img/tablesort-header-sortable.png') no-repeat; }
+div.QueryTable table.dataTable thead .sorting_asc { background: url('../img/tablesort-header-up.png') no-repeat; }
+div.QueryTable table.dataTable thead .sorting_desc { background: url('../img/tablesort-header-down.png') no-repeat; }
/* this icons set does not have that exact equivalent - using an approximation for now */
-div.Hazelnut table.dataTable thead .sorting_asc_disabled { background: url('../img/tablesort-header.png') repeat-x; }
-div.Hazelnut table.dataTable thead .sorting_desc_disabled { background: url('../img/tablesort-header.png') repeat-x; }
+div.QueryTable table.dataTable thead .sorting_asc_disabled { background: url('../img/tablesort-header.png') repeat-x; }
+div.QueryTable table.dataTable thead .sorting_desc_disabled { background: url('../img/tablesort-header.png') repeat-x; }
/* the footers are not active */
-div.Hazelnut table.dataTable tfoot {
+div.QueryTable table.dataTable tfoot {
background: url('../img/tablesort-header.png') repeat-x;
background-color: #caebea;
}
/* and when sorting is turned off it's useful to set this on header too */
-div.Hazelnut table.dataTable thead {
+div.QueryTable table.dataTable thead {
background: url('../img/tablesort-header.png') repeat-x;
background-color: #caebea;
}
var debug=false;
// debug=true
- var Hazelnut = Plugin.extend({
+ var QueryTable = Plugin.extend({
init: function(options, element)
{
this.elmt().on('show', this, this.on_show);
// Unbind all events using namespacing
// TODO in destructor
- // $(window).unbind('Hazelnut');
+ // $(window).unbind('QueryTable');
var query = manifold.query_store.find_analyzed_query(this.options.query_uuid);
this.method = query.object;
/* temp disabled... useful ? -- jordan
$(this).each(function(i,elt) {
if (jQuery(elt).hasClass('dataTables')) {
- var myDiv=jQuery('#hazelnut-' + this.id).parent();
+ var myDiv=jQuery('#querytable-' + this.id).parent();
if(myDiv.height()==0) {
- var oTable=$('#hazelnut-' + this.id).dataTable();
+ var oTable=$('#querytable-' + this.id).dataTable();
oTable.fnDraw();
}
}
// WARNING: this one causes tables in a 'tabs' that are not exposed at the time this is run to show up empty
// sScrollX: '100%', /* Horizontal scrolling */
bProcessing: true, /* Loading */
- fnDrawCallback: function() { self._hazelnut_draw_callback.call(self); }
+ fnDrawCallback: function() { self._querytable_draw_callback.call(self); }
// XXX use $.proxy here !
};
// the intention here is that options.datatables_options as coming from the python object take precedence
/* No filtering if the table does not match */
if (oSettings.nTable.id != self.options.plugin_uuid + '__table')
return true;
- return self._hazelnut_filter.call(self, oSettings, aData, iDataIndex);
+ return self._querytable_filter.call(self, oSettings, aData, iDataIndex);
});
/* Processing hidden_columns */
var result="";
// Prefix id with plugin_uuid
result += "<input";
- result += " class='hazelnut-checkbox'";
+ result += " class='querytable-checkbox'";
result += " id='" + this.flat_id(this.id('checkbox', value)) + "'";
result += " name='" + key + "'";
result += " type='checkbox'";
on_field_clear: function()
{
- alert('Hazelnut::clear_fields() not implemented');
+ alert('QueryTable::clear_fields() not implemented');
},
/* XXX TODO: make this generic a plugin has to subscribe to a set of Queries to avoid duplicated code ! */
on_all_field_clear: function()
{
- alert('Hazelnut::clear_fields() not implemented');
+ alert('QueryTable::clear_fields() not implemented');
},
/************************** PRIVATE METHODS ***************************/
/**
- * @brief Hazelnut filtering function
+ * @brief QueryTable filtering function
*/
- _hazelnut_filter: function(oSettings, aData, iDataIndex)
+ _querytable_filter: function(oSettings, aData, iDataIndex)
{
var ret = true;
$.each (this.filters, function(index, filter) {
return ret;
},
- _hazelnut_draw_callback: function()
+ _querytable_draw_callback: function()
{
/*
* Handle clicks on checkboxes: reassociate checkbox click every time
* the table is redrawn
*/
- this.elts('hazelnut-checkbox').unbind('click').click(this, this._check_click);
+ this.elts('querytable-checkbox').unbind('click').click(this, this._check_click);
if (!this.table)
return;
var minRowsPerPage = this.table.fnSettings().aLengthMenu[0];
if ( rowsToShow <= rowsPerPage || rowsPerPage == -1 ) {
- $('.hazelnut_paginate', wrapper).css('visibility', 'hidden');
+ $('.querytable_paginate', wrapper).css('visibility', 'hidden');
} else {
- $('.hazelnut_paginate', wrapper).css('visibility', 'visible');
+ $('.querytable_paginate', wrapper).css('visibility', 'visible');
}
if ( rowsToShow <= minRowsPerPage ) {
- $('.hazelnut_length', wrapper).css('visibility', 'hidden');
+ $('.querytable_length', wrapper).css('visibility', 'hidden');
} else {
- $('.hazelnut_length', wrapper).css('visibility', 'visible');
+ $('.querytable_length', wrapper).css('visibility', 'visible');
}
},
var self = e.data;
// XXX this.value = key of object to be added... what about multiple keys ?
- if (debug) messages.debug("hazelnut click handler checked=" + this.checked + " hrn=" + this.value);
+ if (debug) messages.debug("querytable click handler checked=" + this.checked + " hrn=" + this.value);
manifold.raise_event(self.options.query_uuid, this.checked?SET_ADD:SET_REMOVED, this.value);
//return false; // prevent checkbox to be checked, waiting response from manifold plugin api
{
// requires jQuery id
var uuid=this.id.split("-");
- var oTable=$("#hazelnut-"+uuid[1]).dataTable();
- // Function available in Hazelnut 1.9.x
+ var oTable=$("#querytable-"+uuid[1]).dataTable();
+ // Function available in QueryTable 1.9.x
// Filter : displayed data only
var filterData = oTable._('tr', {"filter":"applied"});
/* TODO: WARNING if too many nodes selected, use filters to reduce nuber of nodes */
});
- $.plugin('Hazelnut', Hazelnut);
+ $.plugin('QueryTable', QueryTable);
/* define the 'dom-checkbox' type for sorting in datatables
http://datatables.net/examples/plug-ins/dom_sort.html
-<div id='main-{{ domid }}' class='hazelnut-spacer'>
+<div id='main-{{ domid }}' class='querytable-spacer'>
<table class='table table-striped table-bordered dataTable' id='{{domid}}__table'>
<thead>
<tr>
from unfold.plugin import Plugin
-class ResourcesSelected(Plugin):
+class QueryUpdater(Plugin):
def template_file (self):
return "resources_selected.html"
/*
- Document : ResourcesSelected
+ Document : QueryUpdater
Created on : 9 aout 2012, 11:54:41
Author : loicbaron
Description:
/**
- * MySlice ResourcesSelected plugin
+ * MySlice QueryUpdater plugin
* Version: 0.1.0
* URL: http://www.myslice.info
* Description: display of selected resources
// Record state through the query cycle
- var ResourcesSelected = Plugin.extend({
+ var QueryUpdater = Plugin.extend({
init: function(options, element)
{
var self = this;
this.table = this.elmt('table').dataTable({
-// the original hazelnut layout was
+// the original querytable layout was
// sDom: "<'row'<'col-xs-5'l><'col-xs-1'r><'col-xs-6'f>>t<'row'<'col-xs-5'i><'col-xs-7'p>>",
// however the bottom line with 'showing blabla...' and the navigation widget are not really helpful
sDom: "<'row'<'col-xs-5'l><'col-xs-1'r><'col-xs-6'f>>t>",
button
];
if (!row) {
- // XXX second parameter refresh = false can improve performance. todo in hazelnut also
+ // XXX second parameter refresh = false can improve performance. todo in querytable also
this.table.fnAddData(newline);
row = this.find_row(data.value);
} else {
});
- $.plugin('ResourcesSelected', ResourcesSelected);
+ $.plugin('QueryUpdater', QueryUpdater);
})(jQuery);
},
/* PLUGIN EVENTS */
- // on_show like in hazelnut
+ // on_show like in querytable
/* GUI EVENTS */
# . a django User in case of success
# . or None if the backend could be reached but the authentication failed
auth_result = authenticate(token=token)
+ # use one or two columns for the layout - not logged in users will see the login prompt
+ env['layout_1_or_2']="layout-unfold2.html" if not username else "layout-unfold1.html"
# high-level errors, like connection refused or the like
if isinstance (auth_result, ManifoldResult):
manifoldresult = auth_result
env['topmenu_items'] = topmenu_items(None, request)
if state: env['state'] = state
elif not env['username']: env['state'] = "Please sign in"
+ # use one or two columns for the layout - not logged in users will see the login prompt
+ env['layout_1_or_2']="layout-unfold2.html" if not env['username'] else "layout-unfold1.html"
return render_to_response('home-view.html',env, context_instance=RequestContext(request))
from unfold.loginrequired import FreeAccessView
from ui.topmenu import topmenu_items, the_user
-from plugins.hazelnut import Hazelnut
+from plugins.querytable import QueryTable
# View for platforms
class PlatformsView(FreeAccessView):
page.expose_js_metadata()
page.expose_queries()
- platformlist = Hazelnut(
+ platformlist = QueryTable(
page = page,
title = 'List',
domid = 'checkboxes',
context.update(page.prelude_env())
+ context['layout_1_or_2']="layout-unfold2.html" if not context['username'] else "layout-unfold1.html"
+
return context
from unfold.loginrequired import FreeAccessView
from ui.topmenu import topmenu_items, the_user
-from plugins.hazelnut import Hazelnut
+from plugins.querytable import QueryTable
# View for 1 platform and its details
class PlatformView(FreeAccessView):
page.expose_js_metadata()
page.expose_queries()
- networklist = Hazelnut(
+ networklist = QueryTable(
page = page,
title = 'List',
domid = 'checkboxes',
def render(self):
template_env = {}
- # define 'unfold1_main' to the template engine - the main contents
- template_env [ 'unfold1_main' ] = "\n".join(self._content)
+ # define 'unfold_main' to the template engine - the main contents
+ template_env [ 'unfold_main' ] = "\n".join(self._content)
# more general variables expected in the template
template_env [ 'title' ] = 'Test view that combines various plugins'
from ui.topmenu import topmenu_items, the_user
from plugins.googlemap import GoogleMap
-from plugins.hazelnut import Hazelnut
+from plugins.querytable import QueryTable
from plugins.lists.simplelist import SimpleList
from plugins.slicestat import SliceStat
page.expose_js_metadata()
page.expose_queries()
- resourcelist = Hazelnut(
+ resourcelist = QueryTable(
page = page,
title = 'List',
domid = 'checkboxes',
from plugins.raw import Raw
from plugins.stack import Stack
from plugins.tabs import Tabs
-from plugins.hazelnut import Hazelnut
-from plugins.resources_selected import ResourcesSelected
+from plugins.querytable import QueryTable
+from plugins.queryupdater import QueryUpdater
from plugins.googlemap import GoogleMap
from plugins.senslabmap import SensLabMap
from plugins.querycode import QueryCode
)
# --------------------------------------------------------------------------
- # ResourcesSelected (Pending Operations)
+ # QueryUpdater (Pending Operations)
- main_stack.insert(ResourcesSelected(
+ main_stack.insert(QueryUpdater(
page = page,
title = 'Pending operations',
query = main_query,
zoom = 4,
)
- resources_as_list = Hazelnut(
+ resources_as_list = QueryTable(
page = page,
domid = 'resources-list',
title = 'List view',
},
)
- # with the new 'Filter' stuff on top, no need for anything but the hazelnut
+ # with the new 'Filter' stuff on top, no need for anything but the querytable
resources_as_list_area = resources_as_list
resources_area = Tabs ( page=page,
)
main_stack.insert(tab_users)
- tab_users.insert(Hazelnut(
+ tab_users.insert(QueryTable(
page = page,
title = 'Users List',
domid = 'users-list',
# )
# main_stack.insert(tab_measurements)
#
-# tab_measurements.insert(Hazelnut(
+# tab_measurements.insert(QueryTable(
# page = page,
# title = 'Measurements',
# domid = 'measurements-list',
# variables that will get passed to the view-unfold1.html template
template_env = {}
- # define 'unfold1_main' to the template engine - the main contents
- template_env [ 'unfold1_main' ] = main_stack.render(request)
+ # define 'unfold_main' to the template engine - the main contents
+ template_env [ 'unfold_main' ] = main_stack.render(request)
# more general variables expected in the template
template_env [ 'title' ] = '%(slicename)s'%locals()
<script type="text/javascript" src="{{STATIC_URL}}/js/my_account.register.js"></script>
{% endblock %}
-{% block unfold1_main %}
+{% block unfold_main %}
<h2>MySlice Account</h2>
{{ wizard.form.media }}
{% endblock %}
-{% block unfold1_main %}
+{% block unfold_main %}
<link rel="stylesheet" type="text/css" href="{{STATIC_URL}}/css/onelab.css" />
<div class="onelab-title well-lg">
{% extends "layout-unfold1.html" %}
-{% block unfold1_main %}
+{% block unfold_main %}
<h1>Query Received !</h1>
{% block head %}
{% endblock %}
-{% block unfold1_main %}
+{% block unfold_main %}
<div id='tophat_status'></div>
<div id='ms-dashboard'>
-{% extends 'layout-unfold2.html' %}
+{# fine for either layout-unfold1.html (logged in) or layout-unfold2.html (needs a login prompt) #}
+{% extends layout_1_or_2 %}
-{% block unfold2_margin %}
-{% if not username %}
+{% block unfold_margin %}
{% include 'widget-login.html' %}
-{% endif %}
-{% endblock unfold2_margin %}
+{% endblock unfold_margin %}
-{% block unfold2_main %}
+{% block unfold_main %}
<link rel="stylesheet" type="text/css" href="{{STATIC_URL}}/css/onelab.css" />
<!-- xxx ideally only onelab.css but ... xxx -->
<link rel="stylesheet" type="text/css" href="{{STATIC_URL}}/css/registration.css" />
<p>This UI server is connected to the manifold backend running at <code>{{ MANIFOLD_URL }}</code>.</p>
</div>
-{% endblock unfold2_main %}
+{% endblock unfold_main %}
<link rel="stylesheet" type="text/css" href="{{STATIC_URL}}/css/dashboard.css" />
{% endblock %}
-{% block unfold1_main %}
+{% block unfold_main %}
<h1>Platform</h1>
{{networks}}
-{% extends "layout-unfold1.html" %}
+{# fine for either layout-unfold1.html (logged in) or layout-unfold2.html (needs a login prompt) #}
+{% extends layout_1_or_2 %}
+
+{% block unfold_margin %}
+{% include 'widget-login.html' %}
+{% endblock unfold_margin %}
{% block head %}
<link rel="stylesheet" type="text/css" href="{{STATIC_URL}}/css/dashboard.css" />
{% endblock %}
-{% block unfold1_main %}
+{% block unfold_main %}
<h1>Platforms</h1>
{{platforms}}
<link rel="stylesheet" type="text/css" href="{{STATIC_URL}}css/smart_wizard.css" />
{% endblock %}
-{% block unfold1_main %}
+{% block unfold_main %}
<h1>User registration</h1>
{% extends "layout-unfold1.html" %}
-{% block unfold1_main %}
+{% block unfold_main %}
<div class="onelab-title well-lg">
<h2>OneLab Experimenter Registration</h2>
<link rel="stylesheet" type="text/css" href="{{STATIC_URL}}/css/dashboard.css" />
{% endblock %}
-{% block unfold1_main %}
+{% block unfold_main %}
<div align="center">
<h1>Resource</h1>
{% extends "layout-unfold1.html" %}
-{% block unfold1_main %}
+{% block unfold_main %}
<h1>Slice request Received !</h1>
{{ wizard.form.media }}
{% endblock %}
-{% block unfold1_main %}
+{% block unfold_main %}
<link rel="stylesheet" type="text/css" href="{{STATIC_URL}}/css/onelab.css" />
<!-- xxx ideally only onelab.css but ... xxx -->
<link rel="stylesheet" type="text/css" href="{{STATIC_URL}}css/smart_wizard.css" />
{% endblock %}
-{% block unfold1_main %}
+{% block unfold_main %}
<h1>User registration</h1>
{% extends "layout-unfold1.html" %}
-{% block unfold1_main %}
+{% block unfold_main %}
<h1>User registration complete !</h1>
</script>
{% endblock %}
-{% block unfold1_main %}
+{% block unfold_main %}
<div class="onelab-title well-lg">
<h1>Pending requests</h1>
</div>
context = super(PresViewView, self).get_context_data(**kwargs)
#context['ALL_STATIC'] = "all_static"
- context['unfold1_main'] = pres_view.render(self.request)
+ context['unfold_main'] = pres_view.render(self.request)
# XXX This is repeated in all pages
# more general variables expected in the template
context = super(PlatformView, self).get_context_data(**kwargs)
context['ALL_STATIC'] = "all_static"
- context['unfold1_main'] = debug_platform.render(self.request)
+ context['unfold_main'] = debug_platform.render(self.request)
# XXX This is repeated in all pages
# more general variables expected in the template
return this.each(function() {
var $this = $(this);
- var hazelnut = $this.data('Manifold');
+ var querytable = $this.data('Manifold');
// Unbind all events using namespacing
$(window).unbind('Manifold');
// Remove associated data
- hazelnut.remove();
+ querytable.remove();
$this.removeData('Manifold');
});
}, // destroy
var $this=$(this);
// xxx wtf. why [1] ? would expect 0...
if (debug)
- messages.debug("Hitting suspicious line in hazelnut.show");
+ messages.debug("Hitting suspicious line in querytable.show");
var oTable = $($('.dataTable', $this)[1]).dataTable();
oTable.fnAdjustColumnSizing()
/* Refresh dataTabeles if click on the menu to display it : fix dataTables 1.9.x Bug */
$(this).each(function(i,elt) {
if (jQuery(elt).hasClass('dataTables')) {
- var myDiv=jQuery('#hazelnut-' + this.id).parent();
+ var myDiv=jQuery('#querytable-' + this.id).parent();
if(myDiv.height()==0) {
- var oTable=$('#hazelnut-' + this.id).dataTable();
+ var oTable=$('#querytable-' + this.id).dataTable();
oTable.fnDraw();
}
}
from unfold.plugin import Plugin
from unfold.page import Page
#from plugins.code_editor import CodeEditor
-from plugins.hazelnut import Hazelnut
+from plugins.querytable import QueryTable
class DebugPlatform(Plugin):
# This part should be moved to a Layout
env = {}
env['topleft'] = CodeEditor(page=self.page, lineNumbers=True).render(request)
- env['bottomleft'] = Hazelnut(page=self.page, columns=['dummy']).render(request)
+ env['bottomleft'] = QueryTable(page=self.page, columns=['dummy']).render(request)
return env
return this.each(function() {
var $this = $(this);
- var hazelnut = $this.data('Manifold');
+ var querytable = $this.data('Manifold');
// Unbind all events using namespacing
$(window).unbind('Manifold');
// Remove associated data
- hazelnut.remove();
+ querytable.remove();
$this.removeData('Manifold');
});
}, // destroy
# variables that will get passed to the view-unfold2.html template
template_env = {}
- # define 'unfold2_main' to the template engine
- template_env [ 'unfold2_main' ] = main_plugin.render(request)
+ # define 'unfold_main' to the template engine
+ template_env [ 'unfold_main' ] = main_plugin.render(request)
# more general variables expected in the template
template_env [ 'title' ] = 'Test view for a full request cycle'
query=slices_query,
)
# likewise but on the side view
- template_env [ 'unfold2_margin' ] = related_plugin.render (request)
+ template_env [ 'unfold_margin' ] = related_plugin.render (request)
# add our own css in the mix
#page.add_css_files ( 'css/dashboard.css')
from plugins.querycode import QueryCode
from plugins.raw import Raw
from plugins.messages import Messages
-from plugins.hazelnut import Hazelnut
+from plugins.querytable import QueryTable
from ui.topmenu import topmenu_items, the_user
from trash.trashutils import hard_wired_slice_names, hard_wired_list, lorem_p, lorem, quickfilter_criterias
slicename='ple.inria.heartbeat'
main_query = Query.get('resource').filter_by('slice_hrn', '=', slicename).select(['network','type','hrn','hostname','sliver'])
- # without an hazelnut, this would use use : run_it=False as nothing would listen to the results
+ # without an querytable, this would use use : run_it=False as nothing would listen to the results
page.enqueue_query (main_query, # run_it=False
)
domid="messages-transient",
levels='ALL',
),
- Hazelnut (
+ QueryTable (
page=page,
title="Slice %s - checkboxes"%slicename,
query=main_query,
- domid="hazelnut",
+ domid="querytable",
checkboxes=True,
togglable=True,
),
$(function(){$("#bouton").click(issue_debug);});
""")
- # define 'unfold1_main' to the template engine
- template_env [ 'unfold1_main' ] = main_plugin.render(request)
+ # define 'unfold_main' to the template engine
+ template_env [ 'unfold_main' ] = main_plugin.render(request)
# more general variables expected in the template
template_env [ 'title' ] = 'Single Plugin View'
title='QuickFilter in main content',
criterias=quickfilter_criterias,
) ] )
- # define 'unfold2_main' to the template engine
- template_env [ 'unfold2_main' ] = main_plugin.render(request)
+ # define 'unfold_main' to the template engine
+ template_env [ 'unfold_main' ] = main_plugin.render(request)
##########
related_plugin = StaticList (page=page,
list=hard_wired_slice_names,
header='Slices')
# likewise but on the side view
- template_env [ 'unfold2_margin' ] = related_plugin.render (request)
+ template_env [ 'unfold_margin' ] = related_plugin.render (request)
# more general variables expected in the template
template_env [ 'title' ] = 'Test Plugin View'
{% extends 'layout-unfold2.html' %}
-{% block unfold2_main %}
+{% block unfold_main %}
{% insert_str prelude "css/sample.css" %}
<div id='scrollDiv3'> scroll3 area {{ lorem }} </div>
<div id='scrollDiv4'> scroll4 area {{ lorem }} {{ lorem }} {{ lorem }} </div>
<!--</div>-->
-{% endblock unfold2_main %}
+{% endblock unfold_main %}
-{% block unfold2_margin %}
+{% block unfold_margin %}
<div class="foo">
<ul class="nav nav-tabs nav-stacked">
<li><a href="#scrollDiv1" data-toggle="tab"><!--<i class="icon-chevron-right"/>--> scroll1 </a></li>
<li><a href="#scrollDiv4" data-toggle="tab"> scroll4 </a></li>
</ul>
</div>
-{% endblock unfold2_margin %}
+{% endblock unfold_margin %}
{% extends 'layout-unfold2.html' %}
-{% block unfold2_main %}
+{% block unfold_main %}
{% insert_str prelude "css/sample.css" %}
{% insert prelude_js %}
decima et quinta decima. Eodem modo typi, qui nunc nobis videntur
parum clari, fiant sollemnes in futurum.
</div>
-{% endblock unfold2_main %}
+{% endblock unfold_main %}
-{% block unfold2_margin %}
+{% block unfold_margin %}
This text is shorter on purpose Lorem <span class='bold'>ipsum
dolor</span> sit amet, consectetuer adipiscing elit, sed diam
nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation
ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo
consequat.
-{% endblock unfold2_margin %}
+{% endblock unfold_margin %}
{% extends 'layout-unfold2.html' %}
-{% block unfold2_main %}
-{{ unfold2_main|safe }}
-{% endblock unfold2_main %}
+{% block unfold_main %}
+{{ unfold_main|safe }}
+{% endblock unfold_main %}
-{% block unfold2_margin %}
-{{ unfold2_margin|safe }}
-{% endblock unfold2_margin %}
+{% block unfold_margin %}
+{{ unfold_margin|safe }}
+{% endblock unfold_margin %}
{% block base_content %}
<div id="unfold1-main" class="col-xs-12 columns">
- {% block unfold1_main %}
- "The main content area (define block 'unfold1_main')"
- {% endblock unfold1_main %}
+ {% block unfold_main %}
+ "The main content area (define block 'unfold_main')"
+ {% endblock unfold_main %}
</div><!--col-xs-12-->
{% endblock %}
{% block base_content %}
<div id="unfold2-main" class="col-xs-9 columns">
- {% block unfold2_main %}
- "The main content area (define block 'unfold2_main')"
- {% endblock unfold2_main %}
+ {% block unfold_main %}
+ "The main content area (define block 'unfold_main')"
+ {% endblock unfold_main %}
</div><!--col-xs-9-->
<div id='unfold2-margin' class='col-xs-3'>
- {% block unfold2_margin %}
- "The related content area (define block 'unfold2_margin')"
- {% endblock unfold2_margin %}
+ {% block unfold_margin %}
+ "The related content area (define block 'unfold_margin')"
+ {% endblock unfold_margin %}
</div><!--col-xs-3-->
{% endblock %}
{% extends 'layout-unfold1.html' %}
-{% block unfold1_main %}
-{{ unfold1_main|safe }}
-{% endblock unfold1_main %}
+{% block unfold_main %}
+{{ unfold_main|safe }}
+{% endblock unfold_main %}
-/* HAZELNUT */
+/* QUERYTABLE */
-div.Hazelnut table.dataTable th {
+div.QueryTable table.dataTable th {
font: bold 12px/22px Ubuntu, Arial, sans-serif;
color: #333 !important;
border-right: 0px solid #333 !important;
background: url('../img/tablesort-header.jpg') no-repeat !important;
}
-div.Hazelnut table.dataTable td, div.Hazelnut table.dataTable textarea, div.Hazelnut table.dataTable input [type="text"] {
+div.QueryTable table.dataTable td, div.QueryTable table.dataTable textarea, div.QueryTable table.dataTable input [type="text"] {
font: normal 12px Ubuntu, Arial, Helvetica, sans-serif;
border-right: 0px solid #fff !important;
border-bottom: 1px solid #fff !important;
}
-div.Hazelnut table.dataTable thead {
+div.QueryTable table.dataTable thead {
background: url('../img/tablesort-header.png') repeat-x !important;
background-color: #caebea;
}
-div.Hazelnut table.dataTable tfoot {
+div.QueryTable table.dataTable tfoot {
background: url('../img/tablesort-header.png') repeat-x !important;
/* background-color: # !important; */
}
}
.query-editor-spacer,
-.plugin.ResourcesSelected,
+.plugin.QueryUpdater,
.plugin.Tabs {
margin-top: 60px !important;
}