1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

F #4126: custom paginate cloudview (#4715)

Signed-off-by: Jorge Lobo <jlobo@opennebula.io>
This commit is contained in:
Jorge Miguel Lobo Escalona 2020-05-13 11:03:21 +02:00 committed by GitHub
parent 0c083384d3
commit 8435418bf2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 23 additions and 6 deletions

View File

@ -233,6 +233,9 @@
- support
- nsx
# this is for custom paginate
:paginate: "[[6, 12, 36, 72], [6, 12, 36, 72]]"
# this display button and clock icon in table of vm
:leases:
suspense:

View File

@ -1335,6 +1335,15 @@ define(function(require) {
router.resolve();
};
var _getPaginate = function(){
var rtn = [[6, 12, 36, 72], [6, 12, 36, 72]];
if(config && config.system_config && config.system_config.paginate){
var paginate = config.system_config.paginate;
rtn = typeof paginate === 'string' ? JSON.parse(paginate) : paginate;
}
return rtn;
}
var Sunstone = {
"addMainTabs": _addMainTabs,
"addMainTab": _addMainTab,
@ -1373,7 +1382,9 @@ define(function(require) {
"TOP_INTERVAL": TOP_INTERVAL,
"setupNavigoRoutes": _setupNavigoRoutes
"setupNavigoRoutes": _setupNavigoRoutes,
"getPaginate": _getPaginate
};
return Sunstone;

View File

@ -755,7 +755,7 @@ define(function(require) {
"iDisplayLength": 6,
"bAutoWidth": false,
"sDom" : "<\"H\">t<\"F\"lp>",
"aLengthMenu": [[6, 12, 36, 72], [6, 12, 36, 72]],
"aLengthMenu": Sunstone.getPaginate(),
"aoColumnDefs": [
{ "bVisible": false, "aTargets": ["all"]}
],
@ -1093,7 +1093,7 @@ define(function(require) {
"iDisplayLength": 6,
"bAutoWidth": false,
"sDom" : "<\"H\">t<\"F\"lp>",
"aLengthMenu": [[6, 12, 36, 72], [6, 12, 36, 72]],
"aLengthMenu": Sunstone.getPaginate(),
"aaSorting" : [[1, "asc"]],
"aoColumnDefs": [
{ "bVisible": false, "aTargets": ["all"]}

View File

@ -17,6 +17,7 @@
define(function(require) {
// require('foundation.alert');
var OpenNebula = require("opennebula");
var Sunstone = require("sunstone");
var OpenNebulaService = require("opennebula/service");
var OpenNebulaVm = require("opennebula/vm");
var Locale = require("utils/locale");
@ -133,7 +134,7 @@ define(function(require) {
provision_flows_datatable = $(".provision_flows_table", context).dataTable({
"iDisplayLength": 6,
"sDom" : "<\"H\">t<\"F\"lp>",
"aLengthMenu": [[6, 12, 36, 72], [6, 12, 36, 72]],
"aLengthMenu": Sunstone.getPaginate(),
"aaSorting" : [[0, "desc"]],
"aoColumnDefs": [
{ "bVisible": false, "aTargets": ["all"]}

View File

@ -17,6 +17,7 @@
define(function(require) {
// require('foundation.alert');
var OpenNebula = require("opennebula");
var Sunstone = require("sunstone");
var Locale = require("utils/locale");
var Config = require("sunstone-config");
var Notifier = require("utils/notifier");
@ -123,7 +124,7 @@ define(function(require) {
var provision_templates_datatable = $(".provision_templates_table", context).dataTable({
"iDisplayLength": 8,
"sDom" : "<\"H\">t<\"F\"lp>",
"aLengthMenu": [[6, 12, 36, 72], [6, 12, 36, 72]],
"aLengthMenu": Sunstone.getPaginate(),
"aaSorting" : [[0, "desc"]],
"aoColumnDefs": [
{ "bVisible": false, "aTargets": ["all"]}

View File

@ -138,7 +138,7 @@ define(function(require) {
"iDisplayLength": 6,
"bAutoWidth": false,
"sDom" : "<\"H\">t<\"F\"lp>",
"aLengthMenu": [[6, 12, 36, 72], [6, 12, 36, 72]],
"aLengthMenu": Sunstone.getPaginate(),
"aaSorting" : [[0, "desc"]],
"aoColumnDefs": [
{ "bVisible": false, "aTargets": ["all"]},

View File

@ -43,6 +43,7 @@
'threshold_high' : '<%= $conf[:threshold_high] %>',
},
'system_config' : {
'paginate': '<%= $conf[:paginate] %>',
'marketplace_url' : '<%= $conf[:marketplace_url] %>',
'vnc_request_password' : <%= $conf[:vnc_request_password] || false %>,
'vnc_proxy_port' : '<%= $vnc.proxy_port %>',