From: Thierry Parmentelat Date: Wed, 13 Nov 2013 07:08:36 +0000 (+0100) Subject: Merge branch 'master' into newnames X-Git-Tag: myslice-0.3-0~113^2~7^2~20 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=0120bc491b3464f4981270a28ac153fa62f3b08b;hp=e6184193b74ac6d5c52289546dae9121bdd99008;p=unfold.git Merge branch 'master' into newnames Conflicts: portal/templates/validate_pending.html --- diff --git a/plugins/googlemap/static/js/googlemap.js b/plugins/googlemap/static/js/googlemap.js index 424b3aad..9a56d379 100644 --- a/plugins/googlemap/static/js/googlemap.js +++ b/plugins/googlemap/static/js/googlemap.js @@ -35,7 +35,7 @@ googlemap_debug_detailed=false; /* 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; @@ -105,7 +105,7 @@ googlemap_debug_detailed=false; //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; }, diff --git a/plugins/myplugin/static/js/myplugin.js b/plugins/myplugin/static/js/myplugin.js index 20f85734..26a29922 100644 --- a/plugins/myplugin/static/js/myplugin.js +++ b/plugins/myplugin/static/js/myplugin.js @@ -44,7 +44,7 @@ }, /* PLUGIN EVENTS */ - // on_show like in hazelnut + // on_show like in querytable /* GUI EVENTS */ diff --git a/plugins/hazelnut/__init__.py b/plugins/querytable/__init__.py similarity index 89% rename from plugins/hazelnut/__init__.py rename to plugins/querytable/__init__.py index eab50049..96456f56 100644 --- a/plugins/hazelnut/__init__.py +++ b/plugins/querytable/__init__.py @@ -1,6 +1,6 @@ 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 @@ -37,16 +37,16 @@ class Hazelnut (Plugin): 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 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={} @@ -60,15 +60,15 @@ class Hazelnut (Plugin): "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 diff --git a/plugins/hazelnut/static/css/hazelnut.css b/plugins/querytable/static/css/querytable.css similarity index 60% rename from plugins/hazelnut/static/css/hazelnut.css rename to plugins/querytable/static/css/querytable.css index 31c11846..edbc683e 100644 --- a/plugins/hazelnut/static/css/hazelnut.css +++ b/plugins/querytable/static/css/querytable.css @@ -1,7 +1,7 @@ /* 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; @@ -15,25 +15,25 @@ div.Hazelnut table.dataTable th { /* 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; } @@ -43,20 +43,20 @@ div.Hazelnut div.dataTables_info { * 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; } diff --git a/plugins/hazelnut/static/img/README b/plugins/querytable/static/img/README similarity index 100% rename from plugins/hazelnut/static/img/README rename to plugins/querytable/static/img/README diff --git a/plugins/hazelnut/static/img/tablesort-bullet1.png b/plugins/querytable/static/img/tablesort-bullet1.png similarity index 100% rename from plugins/hazelnut/static/img/tablesort-bullet1.png rename to plugins/querytable/static/img/tablesort-bullet1.png diff --git a/plugins/hazelnut/static/img/tablesort-bullet2.png b/plugins/querytable/static/img/tablesort-bullet2.png similarity index 100% rename from plugins/hazelnut/static/img/tablesort-bullet2.png rename to plugins/querytable/static/img/tablesort-bullet2.png diff --git a/plugins/hazelnut/static/img/tablesort-col-alt.png b/plugins/querytable/static/img/tablesort-col-alt.png similarity index 100% rename from plugins/hazelnut/static/img/tablesort-col-alt.png rename to plugins/querytable/static/img/tablesort-col-alt.png diff --git a/plugins/hazelnut/static/img/tablesort-gradient.png b/plugins/querytable/static/img/tablesort-gradient.png similarity index 100% rename from plugins/hazelnut/static/img/tablesort-gradient.png rename to plugins/querytable/static/img/tablesort-gradient.png diff --git a/plugins/hazelnut/static/img/tablesort-header-down.png b/plugins/querytable/static/img/tablesort-header-down.png similarity index 100% rename from plugins/hazelnut/static/img/tablesort-header-down.png rename to plugins/querytable/static/img/tablesort-header-down.png diff --git a/plugins/hazelnut/static/img/tablesort-header-sortable.png b/plugins/querytable/static/img/tablesort-header-sortable.png similarity index 100% rename from plugins/hazelnut/static/img/tablesort-header-sortable.png rename to plugins/querytable/static/img/tablesort-header-sortable.png diff --git a/plugins/hazelnut/static/img/tablesort-header-up.png b/plugins/querytable/static/img/tablesort-header-up.png similarity index 100% rename from plugins/hazelnut/static/img/tablesort-header-up.png rename to plugins/querytable/static/img/tablesort-header-up.png diff --git a/plugins/hazelnut/static/img/tablesort-header.png b/plugins/querytable/static/img/tablesort-header.png similarity index 100% rename from plugins/hazelnut/static/img/tablesort-header.png rename to plugins/querytable/static/img/tablesort-header.png diff --git a/plugins/hazelnut/static/img/tablesort-td-alt.png b/plugins/querytable/static/img/tablesort-td-alt.png similarity index 100% rename from plugins/hazelnut/static/img/tablesort-td-alt.png rename to plugins/querytable/static/img/tablesort-td-alt.png diff --git a/plugins/hazelnut/static/img/toggle-hidden.png b/plugins/querytable/static/img/toggle-hidden.png similarity index 100% rename from plugins/hazelnut/static/img/toggle-hidden.png rename to plugins/querytable/static/img/toggle-hidden.png diff --git a/plugins/hazelnut/static/img/toggle-visible.png b/plugins/querytable/static/img/toggle-visible.png similarity index 100% rename from plugins/hazelnut/static/img/toggle-visible.png rename to plugins/querytable/static/img/toggle-visible.png diff --git a/plugins/hazelnut/static/js/hazelnut.js b/plugins/querytable/static/js/querytable.js similarity index 93% rename from plugins/hazelnut/static/js/hazelnut.js rename to plugins/querytable/static/js/querytable.js index 7c042b18..30c727b7 100644 --- a/plugins/hazelnut/static/js/hazelnut.js +++ b/plugins/querytable/static/js/querytable.js @@ -9,7 +9,7 @@ var debug=false; // debug=true - var Hazelnut = Plugin.extend({ + var QueryTable = Plugin.extend({ init: function(options, element) { @@ -36,7 +36,7 @@ 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; @@ -64,9 +64,9 @@ /* 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(); } } @@ -96,7 +96,7 @@ // 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 @@ -131,7 +131,7 @@ /* 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 */ @@ -156,7 +156,7 @@ var result=""; // Prefix id with plugin_uuid result += " +
diff --git a/plugins/resources_selected/__init__.py b/plugins/queryupdater/__init__.py similarity index 93% rename from plugins/resources_selected/__init__.py rename to plugins/queryupdater/__init__.py index a5bbac70..9b347d3e 100644 --- a/plugins/resources_selected/__init__.py +++ b/plugins/queryupdater/__init__.py @@ -1,6 +1,6 @@ from unfold.plugin import Plugin -class ResourcesSelected(Plugin): +class QueryUpdater(Plugin): def template_file (self): return "resources_selected.html" diff --git a/plugins/resources_selected/static/css/resources_selected.css b/plugins/queryupdater/static/css/queryupdater.css similarity index 94% rename from plugins/resources_selected/static/css/resources_selected.css rename to plugins/queryupdater/static/css/queryupdater.css index dfefb466..05c7a35e 100644 --- a/plugins/resources_selected/static/css/resources_selected.css +++ b/plugins/queryupdater/static/css/queryupdater.css @@ -1,5 +1,5 @@ /* - Document : ResourcesSelected + Document : QueryUpdater Created on : 9 aout 2012, 11:54:41 Author : loicbaron Description: diff --git a/plugins/resources_selected/static/js/resources_selected.js b/plugins/queryupdater/static/js/queryupdater.js similarity index 98% rename from plugins/resources_selected/static/js/resources_selected.js rename to plugins/queryupdater/static/js/queryupdater.js index 9a064476..ebfa6eb5 100644 --- a/plugins/resources_selected/static/js/resources_selected.js +++ b/plugins/queryupdater/static/js/queryupdater.js @@ -1,5 +1,5 @@ /** - * MySlice ResourcesSelected plugin + * MySlice QueryUpdater plugin * Version: 0.1.0 * URL: http://www.myslice.info * Description: display of selected resources @@ -23,7 +23,7 @@ // Record state through the query cycle - var ResourcesSelected = Plugin.extend({ + var QueryUpdater = Plugin.extend({ init: function(options, element) { @@ -31,7 +31,7 @@ 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>", @@ -178,7 +178,7 @@ 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 { @@ -447,6 +447,6 @@ }); - $.plugin('ResourcesSelected', ResourcesSelected); + $.plugin('QueryUpdater', QueryUpdater); })(jQuery); diff --git a/plugins/resources_selected/templates/resources_selected.html b/plugins/queryupdater/templates/queryupdater.html similarity index 100% rename from plugins/resources_selected/templates/resources_selected.html rename to plugins/queryupdater/templates/queryupdater.html diff --git a/plugins/slicestat/static/js/slicestat.js b/plugins/slicestat/static/js/slicestat.js index 0e3dc532..da177222 100644 --- a/plugins/slicestat/static/js/slicestat.js +++ b/plugins/slicestat/static/js/slicestat.js @@ -51,7 +51,7 @@ }, /* PLUGIN EVENTS */ - // on_show like in hazelnut + // on_show like in querytable /* GUI EVENTS */ diff --git a/portal/homeview.py b/portal/homeview.py index b6af0644..5b822212 100644 --- a/portal/homeview.py +++ b/portal/homeview.py @@ -33,6 +33,8 @@ class HomeView (FreeAccessView): # . 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 @@ -61,5 +63,7 @@ class HomeView (FreeAccessView): 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)) diff --git a/portal/platformsview.py b/portal/platformsview.py index 0a6677e3..67446436 100644 --- a/portal/platformsview.py +++ b/portal/platformsview.py @@ -4,7 +4,7 @@ from unfold.page import Page 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): @@ -19,7 +19,7 @@ class PlatformsView(FreeAccessView): page.expose_js_metadata() page.expose_queries() - platformlist = Hazelnut( + platformlist = QueryTable( page = page, title = 'List', domid = 'checkboxes', @@ -48,4 +48,6 @@ class PlatformsView(FreeAccessView): context.update(page.prelude_env()) + context['layout_1_or_2']="layout-unfold2.html" if not context['username'] else "layout-unfold1.html" + return context diff --git a/portal/platformview.py b/portal/platformview.py index 69fd1b02..a81ba871 100644 --- a/portal/platformview.py +++ b/portal/platformview.py @@ -4,7 +4,7 @@ from unfold.page import Page 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): @@ -25,7 +25,7 @@ class PlatformView(FreeAccessView): page.expose_js_metadata() page.expose_queries() - networklist = Hazelnut( + networklist = QueryTable( page = page, title = 'List', domid = 'checkboxes', diff --git a/portal/portalpage.py b/portal/portalpage.py index b5470fd2..f592444d 100644 --- a/portal/portalpage.py +++ b/portal/portalpage.py @@ -15,8 +15,8 @@ class PortalPage(Page): 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' diff --git a/portal/resourceview.py b/portal/resourceview.py index c9fa5ba8..f0f856ae 100644 --- a/portal/resourceview.py +++ b/portal/resourceview.py @@ -5,7 +5,7 @@ from unfold.loginrequired import FreeAccessView 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 @@ -31,7 +31,7 @@ class ResourceView(FreeAccessView): page.expose_js_metadata() page.expose_queries() - resourcelist = Hazelnut( + resourcelist = QueryTable( page = page, title = 'List', domid = 'checkboxes', diff --git a/portal/sliceview.py b/portal/sliceview.py index 8461b1a6..c1dcdbf3 100644 --- a/portal/sliceview.py +++ b/portal/sliceview.py @@ -11,8 +11,8 @@ from ui.topmenu import topmenu_items, the_user 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 @@ -102,9 +102,9 @@ class SliceView (LoginRequiredAutoLogoutView): ) # -------------------------------------------------------------------------- - # ResourcesSelected (Pending Operations) + # QueryUpdater (Pending Operations) - main_stack.insert(ResourcesSelected( + main_stack.insert(QueryUpdater( page = page, title = 'Pending operations', query = main_query, @@ -160,7 +160,7 @@ class SliceView (LoginRequiredAutoLogoutView): zoom = 4, ) - resources_as_list = Hazelnut( + resources_as_list = QueryTable( page = page, domid = 'resources-list', title = 'List view', @@ -175,7 +175,7 @@ class SliceView (LoginRequiredAutoLogoutView): }, ) - # 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, @@ -202,7 +202,7 @@ class SliceView (LoginRequiredAutoLogoutView): ) main_stack.insert(tab_users) - tab_users.insert(Hazelnut( + tab_users.insert(QueryTable( page = page, title = 'Users List', domid = 'users-list', @@ -287,7 +287,7 @@ class SliceView (LoginRequiredAutoLogoutView): # ) # main_stack.insert(tab_measurements) # -# tab_measurements.insert(Hazelnut( +# tab_measurements.insert(QueryTable( # page = page, # title = 'Measurements', # domid = 'measurements-list', @@ -324,8 +324,8 @@ class SliceView (LoginRequiredAutoLogoutView): # 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() diff --git a/portal/templates/account-view.html b/portal/templates/account-view.html index 60f05bcf..4b042468 100644 --- a/portal/templates/account-view.html +++ b/portal/templates/account-view.html @@ -8,7 +8,7 @@ {% endblock %} -{% block unfold1_main %} +{% block unfold_main %}

MySlice Account

diff --git a/portal/templates/contact.html b/portal/templates/contact.html index 8ffbf9c9..b256d37a 100644 --- a/portal/templates/contact.html +++ b/portal/templates/contact.html @@ -4,7 +4,7 @@ {{ wizard.form.media }} {% endblock %} -{% block unfold1_main %} +{% block unfold_main %}
diff --git a/portal/templates/contact_sent.html b/portal/templates/contact_sent.html index ca12d5f5..62a2ab98 100644 --- a/portal/templates/contact_sent.html +++ b/portal/templates/contact_sent.html @@ -1,6 +1,6 @@ {% extends "layout-unfold1.html" %} -{% block unfold1_main %} +{% block unfold_main %}

Query Received !

diff --git a/portal/templates/dashboard.html b/portal/templates/dashboard.html index 5ca062db..cd136088 100644 --- a/portal/templates/dashboard.html +++ b/portal/templates/dashboard.html @@ -3,7 +3,7 @@ {% block head %} {% endblock %} -{% block unfold1_main %} +{% block unfold_main %}
diff --git a/portal/templates/home-view.html b/portal/templates/home-view.html index 446cc31e..c5f3bfc6 100644 --- a/portal/templates/home-view.html +++ b/portal/templates/home-view.html @@ -1,12 +1,11 @@ -{% 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 %} @@ -28,4 +27,4 @@ federated testbeds.

This UI server is connected to the manifold backend running at {{ MANIFOLD_URL }}.

-{% endblock unfold2_main %} +{% endblock unfold_main %} diff --git a/portal/templates/platform.html b/portal/templates/platform.html index d24d9ede..48afd944 100644 --- a/portal/templates/platform.html +++ b/portal/templates/platform.html @@ -4,7 +4,7 @@ {% endblock %} -{% block unfold1_main %} +{% block unfold_main %}

Platform

{{networks}} diff --git a/portal/templates/platforms.html b/portal/templates/platforms.html index 22340661..ee86241b 100644 --- a/portal/templates/platforms.html +++ b/portal/templates/platforms.html @@ -1,10 +1,15 @@ -{% 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 %} {% endblock %} -{% block unfold1_main %} +{% block unfold_main %}

Platforms

{{platforms}} diff --git a/portal/templates/register_user_wizard.html b/portal/templates/register_user_wizard.html index 8d1d5280..1f480a1b 100644 --- a/portal/templates/register_user_wizard.html +++ b/portal/templates/register_user_wizard.html @@ -8,7 +8,7 @@ {% endblock %} -{% block unfold1_main %} +{% block unfold_main %}

User registration

diff --git a/portal/templates/registration_view.html b/portal/templates/registration_view.html index b0bb3896..52cb402d 100644 --- a/portal/templates/registration_view.html +++ b/portal/templates/registration_view.html @@ -1,6 +1,6 @@ {% extends "layout-unfold1.html" %} -{% block unfold1_main %} +{% block unfold_main %}

OneLab Experimenter Registration

diff --git a/portal/templates/resource.html b/portal/templates/resource.html index d379470a..5b59f73e 100644 --- a/portal/templates/resource.html +++ b/portal/templates/resource.html @@ -4,7 +4,7 @@ {% endblock %} -{% block unfold1_main %} +{% block unfold_main %}

Resource

diff --git a/portal/templates/slice-request-ack-view.html b/portal/templates/slice-request-ack-view.html index 7ea26ed8..dc98c27a 100644 --- a/portal/templates/slice-request-ack-view.html +++ b/portal/templates/slice-request-ack-view.html @@ -1,6 +1,6 @@ {% extends "layout-unfold1.html" %} -{% block unfold1_main %} +{% block unfold_main %}

Slice request Received !

diff --git a/portal/templates/slice-request-view.html b/portal/templates/slice-request-view.html index b9e0e22d..4568864a 100644 --- a/portal/templates/slice-request-view.html +++ b/portal/templates/slice-request-view.html @@ -5,7 +5,7 @@ {{ wizard.form.media }} {% endblock %} -{% block unfold1_main %} +{% block unfold_main %} diff --git a/portal/templates/user_register.html b/portal/templates/user_register.html index baa56675..bfb08f12 100644 --- a/portal/templates/user_register.html +++ b/portal/templates/user_register.html @@ -5,7 +5,7 @@ {% endblock %} -{% block unfold1_main %} +{% block unfold_main %}

User registration

diff --git a/portal/templates/user_register_complete.html b/portal/templates/user_register_complete.html index 9e134cfb..35b252e8 100644 --- a/portal/templates/user_register_complete.html +++ b/portal/templates/user_register_complete.html @@ -1,6 +1,6 @@ {% extends "layout-unfold1.html" %} -{% block unfold1_main %} +{% block unfold_main %}

User registration complete !

diff --git a/portal/templates/validate_pending.html b/portal/templates/validate_pending.html index 9ddf01c9..0ab0e572 100644 --- a/portal/templates/validate_pending.html +++ b/portal/templates/validate_pending.html @@ -45,7 +45,7 @@ {% endblock %} -{% block unfold1_main %} +{% block unfold_main %}

Pending requests

diff --git a/portal/views.py b/portal/views.py index 167f324e..d454502e 100644 --- a/portal/views.py +++ b/portal/views.py @@ -62,7 +62,7 @@ class PresViewView(FreeAccessView): 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 diff --git a/debug_platform/__init__.py b/to-be-integrated/debug_platform/__init__.py similarity index 100% rename from debug_platform/__init__.py rename to to-be-integrated/debug_platform/__init__.py diff --git a/debug_platform/urls.py b/to-be-integrated/debug_platform/urls.py similarity index 100% rename from debug_platform/urls.py rename to to-be-integrated/debug_platform/urls.py diff --git a/debug_platform/views.py b/to-be-integrated/debug_platform/views.py similarity index 97% rename from debug_platform/views.py rename to to-be-integrated/debug_platform/views.py index e6b0c955..ead4ed7e 100644 --- a/debug_platform/views.py +++ b/to-be-integrated/debug_platform/views.py @@ -45,7 +45,7 @@ class PlatformView(TemplateView): 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 diff --git a/to-be-integrated/plugins/code_editor/static/js/code_editor.js b/to-be-integrated/plugins/code_editor/static/js/code_editor.js index 664bbdc7..48111018 100644 --- a/to-be-integrated/plugins/code_editor/static/js/code_editor.js +++ b/to-be-integrated/plugins/code_editor/static/js/code_editor.js @@ -78,13 +78,13 @@ 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 @@ -93,16 +93,16 @@ 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(); } } diff --git a/plugins/debug_platform/__init__.py b/to-be-integrated/plugins/debug_platform/__init__.py similarity index 85% rename from plugins/debug_platform/__init__.py rename to to-be-integrated/plugins/debug_platform/__init__.py index e14a478e..fa76ba40 100644 --- a/plugins/debug_platform/__init__.py +++ b/to-be-integrated/plugins/debug_platform/__init__.py @@ -1,7 +1,7 @@ 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): @@ -29,6 +29,6 @@ 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 diff --git a/plugins/debug_platform/static/css/debug_platform.css b/to-be-integrated/plugins/debug_platform/static/css/debug_platform.css similarity index 100% rename from plugins/debug_platform/static/css/debug_platform.css rename to to-be-integrated/plugins/debug_platform/static/css/debug_platform.css diff --git a/plugins/debug_platform/static/js/debug_platform.js b/to-be-integrated/plugins/debug_platform/static/js/debug_platform.js similarity index 97% rename from plugins/debug_platform/static/js/debug_platform.js rename to to-be-integrated/plugins/debug_platform/static/js/debug_platform.js index cbbd0b75..dda946c3 100644 --- a/plugins/debug_platform/static/js/debug_platform.js +++ b/to-be-integrated/plugins/debug_platform/static/js/debug_platform.js @@ -79,13 +79,13 @@ 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 diff --git a/plugins/debug_platform/templates/debug_platform.html b/to-be-integrated/plugins/debug_platform/templates/debug_platform.html similarity index 100% rename from plugins/debug_platform/templates/debug_platform.html rename to to-be-integrated/plugins/debug_platform/templates/debug_platform.html diff --git a/trash/dashboard.py b/trash/dashboard.py index a9742267..f4bde8fc 100644 --- a/trash/dashboard.py +++ b/trash/dashboard.py @@ -65,8 +65,8 @@ def dashboard_view (request): # 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' @@ -87,7 +87,7 @@ def dashboard_view (request): 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') diff --git a/trash/pluginview.py b/trash/pluginview.py index 0b22e119..f2003127 100644 --- a/trash/pluginview.py +++ b/trash/pluginview.py @@ -17,7 +17,7 @@ from plugins.quickfilter import QuickFilter 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 @@ -35,7 +35,7 @@ def test_plugin_view (request): 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 ) @@ -53,11 +53,11 @@ def test_plugin_view (request): 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, ), @@ -84,8 +84,8 @@ function issue_debug() {console.log("issue_debug");messages.debug("issue_debug") $(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' diff --git a/trash/sampleviews.py b/trash/sampleviews.py index 5d257a4f..e1c66d8c 100644 --- a/trash/sampleviews.py +++ b/trash/sampleviews.py @@ -84,8 +84,8 @@ def test_plugin_view (request): 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, @@ -94,7 +94,7 @@ def test_plugin_view (request): 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' diff --git a/trash/templates/view-scroll.html b/trash/templates/view-scroll.html index 5fa9400b..f6f6b933 100644 --- a/trash/templates/view-scroll.html +++ b/trash/templates/view-scroll.html @@ -1,6 +1,6 @@ {% extends 'layout-unfold2.html' %} -{% block unfold2_main %} +{% block unfold_main %} {% insert_str prelude "css/sample.css" %} @@ -11,9 +11,9 @@
scroll3 area {{ lorem }}
scroll4 area {{ lorem }} {{ lorem }} {{ lorem }}
-{% endblock unfold2_main %} +{% endblock unfold_main %} -{% block unfold2_margin %} +{% block unfold_margin %}
-{% endblock unfold2_margin %} +{% endblock unfold_margin %} diff --git a/trash/templates/view-tab.html b/trash/templates/view-tab.html index c3ba335c..6b4472bd 100644 --- a/trash/templates/view-tab.html +++ b/trash/templates/view-tab.html @@ -1,6 +1,6 @@ {% extends 'layout-unfold2.html' %} -{% block unfold2_main %} +{% block unfold_main %} {% insert_str prelude "css/sample.css" %} {% insert prelude_js %} @@ -58,13 +58,13 @@ $(function() {$('#mylougout').click(foo);}) decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.
-{% endblock unfold2_main %} +{% endblock unfold_main %} -{% block unfold2_margin %} +{% block unfold_margin %} This text is shorter on purpose Lorem ipsum dolor 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 %} diff --git a/trash/templates/view-unfold2.html b/trash/templates/view-unfold2.html index 7626ab1e..e1e43171 100644 --- a/trash/templates/view-unfold2.html +++ b/trash/templates/view-unfold2.html @@ -1,9 +1,9 @@ {% 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 %} diff --git a/ui/templates/layout-unfold1.html b/ui/templates/layout-unfold1.html index fa796b93..7d3ee2e6 100644 --- a/ui/templates/layout-unfold1.html +++ b/ui/templates/layout-unfold1.html @@ -2,8 +2,8 @@ {% block base_content %}
- {% 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 %}
{% endblock %} diff --git a/ui/templates/layout-unfold2.html b/ui/templates/layout-unfold2.html index 345f57f2..7022aa59 100644 --- a/ui/templates/layout-unfold2.html +++ b/ui/templates/layout-unfold2.html @@ -2,13 +2,13 @@ {% block base_content %}
- {% 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 %}
- {% 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 %}
{% endblock %} diff --git a/ui/templates/view-unfold1.html b/ui/templates/view-unfold1.html index 75a10096..8fc17f1f 100644 --- a/ui/templates/view-unfold1.html +++ b/ui/templates/view-unfold1.html @@ -1,5 +1,5 @@ {% extends 'layout-unfold1.html' %} -{% block unfold1_main %} -{{ unfold1_main|safe }} -{% endblock unfold1_main %} +{% block unfold_main %} +{{ unfold_main|safe }} +{% endblock unfold_main %} diff --git a/unfold/static/css/onelab_marko.css b/unfold/static/css/onelab_marko.css index ab82706b..a49457b7 100644 --- a/unfold/static/css/onelab_marko.css +++ b/unfold/static/css/onelab_marko.css @@ -283,9 +283,9 @@ div.dataTables_info { -/* 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; @@ -299,18 +299,18 @@ div.Hazelnut table.dataTable th { 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; */ } @@ -327,7 +327,7 @@ table.query-editor { } .query-editor-spacer, -.plugin.ResourcesSelected, +.plugin.QueryUpdater, .plugin.Tabs { margin-top: 60px !important; }