diff --git a/install.sh b/install.sh index 3b44c1cf32..0c12de176e 100755 --- a/install.sh +++ b/install.sh @@ -1476,7 +1476,8 @@ SUNSTONE_ETC_FILES="src/sunstone/etc/sunstone-server.conf \ src/sunstone/etc/sunstone-oneflow.conf" SUNSTONE_ETC_VIEW_FILES="src/sunstone/etc/sunstone-views/admin.yaml \ - src/sunstone/etc/sunstone-views/user.yaml" + src/sunstone/etc/sunstone-views/user.yaml \ + src/sunstone/etc/sunstone-views/cloud.yaml" SUNSTONE_MODELS_FILES="src/sunstone/models/OpenNebulaJSON.rb \ src/sunstone/models/SunstoneServer.rb \ diff --git a/src/sunstone/etc/sunstone-views.yaml b/src/sunstone/etc/sunstone-views.yaml index 329b4d0211..a710f056f3 100644 --- a/src/sunstone/etc/sunstone-views.yaml +++ b/src/sunstone/etc/sunstone-views.yaml @@ -1,6 +1,25 @@ --- logo: images/opennebula-sunstone-v4.0.png +available_tabs: + - dashboard-tab + - system-tab + - users-tab + - groups-tab + - acls-tab + - vresources-tab + - vms-tab + - templates-tab + - images-tab + - files-tab + - infra-tab + - clusters-tab + - hosts-tab + - datastores-tab + - vnets-tab + - marketplace-tab users: + cloud: + - cloud groups: oneadmin: - admin diff --git a/src/sunstone/etc/sunstone-views/admin.yaml b/src/sunstone/etc/sunstone-views/admin.yaml index a7d99e82fd..44d3f0a3d2 100644 --- a/src/sunstone/etc/sunstone-views/admin.yaml +++ b/src/sunstone/etc/sunstone-views/admin.yaml @@ -1,24 +1,24 @@ small_logo: images/opennebula-sunstone-v4.0-small.png enabled_tabs: - - dashboard-tab - - system-tab - - users-tab - - groups-tab - - acls-tab - - vresources-tab - - vms-tab - - templates-tab - - images-tab - - files-tab - - infra-tab - - clusters-tab - - hosts-tab - - datastores-tab - - vnets-tab - - marketplace-tab - #- oneflow-dashboard - #- oneflow-services - #- oneflow-templates + dashboard-tab: true + system-tab: true + users-tab: true + groups-tab: true + acls-tab: true + vresources-tab: true + vms-tab: true + templates-tab: true + images-tab: true + files-tab: true + infra-tab: true + clusters-tab: true + hosts-tab: true + datastores-tab: true + vnets-tab: true + marketplace-tab: true + oneflow-dashboard: false + oneflow-services: false + oneflow-templates: false tabs: dashboard-tab: panel_tabs: @@ -116,6 +116,7 @@ tabs: actions: VM.refresh: true VM.create_dialog: true + VM.easy_provision: false VM.chown: true VM.chgrp: true VM.chmod: true @@ -163,6 +164,7 @@ tabs: actions: Template.refresh: true Template.create_dialog: true + Template.easy_provision: false Template.update_dialog: true Template.instantiate_vms: true Template.chown: true diff --git a/src/sunstone/etc/sunstone-views/cloud.yaml b/src/sunstone/etc/sunstone-views/cloud.yaml new file mode 100644 index 0000000000..31d5eb8735 --- /dev/null +++ b/src/sunstone/etc/sunstone-views/cloud.yaml @@ -0,0 +1,349 @@ +small_logo: images/opennebula-sunstone-v4.0-small.png +enabled_tabs: + dashboard-tab: true + system-tab: false + users-tab: false + groups-tab: false + acls-tab: false + vresources-tab: false + vms-tab: true + templates-tab: false + images-tab: false + files-tab: false + infra-tab: false + clusters-tab: false + hosts-tab: false + datastores-tab: false + vnets-tab: false + marketplace-tab: false + oneflow-dashboard: false + oneflow-services: false + oneflow-templates: false +tabs: + dashboard-tab: + panel_tabs: + actions: + widgets_three_per_row: + #- users + widgets_two_per_row: + #- network + #- storage + #- hosts + #- vms + widgets_one_per_row: + - vms + system-tab: + panel_tabs: + actions: + users-tab: + panel_tabs: + user_info_panel: true + user_quotas_tab: true + table_columns: + - 0 # Checkbox + - 1 # ID + - 2 # Name + - 3 # Group + - 4 # Auth driver + - 5 # VMs + - 6 # Memory + - 7 # CPU + #- 8 # Group ID + actions: + User.refresh: true + User.create_dialog: true + User.update_password: true + User.quotas_dialog: true + User.chgrp: true + User.chauth: true + User.delete: true + groups-tab: + panel_tabs: + group_quotas_tab: true + table_columns: + - 0 # Checkbox + - 1 # ID + - 2 # Name + - 3 # Users + - 4 # VMs + - 5 # Memory + - 6 # CPU + actions: + Group.refresh: true + Group.create_dialog: true + Group.quotas_dialog: true + Group.delete: true + acls-tab: + panel_tabs: + table_columns: + - 0 # Checkbox + - 1 # ID + - 2 # Applies to + - 3 # Affected resources + - 4 # Resource ID / Owned by + - 5 # Allowed operations + #- 6 # ACL String + actions: + Acl.refresh: true + Acl.create_dialog: true + Acl.delete: true + vresources-tab: + panel_tabs: + actions: + vms-tab: + panel_tabs: + vm_info_tab: true + vm_capacity_tab: true + vm_hotplugging_tab: true + vm_network_tab: true + vm_snapshot_tab: true + vm_placement_tab: false + vm_actions_tab: true + vm_template_tab: false + vm_log_tab: false + table_columns: + - 0 # Checkbox + - 1 # ID + - 2 # Owner + - 3 # Group + - 4 # Name + - 5 # Status + #- 6 # Used CPU + #- 7 # Used Memory + - 8 # Host + - 9 # IPs + #- 10 # Start Time + - 11 # VNC + actions: + VM.refresh: true + VM.create_dialog: false + VM.easy_provision: true + VM.chown: false + VM.chgrp: false + VM.chmod: true + VM.deploy: false + VM.migrate: false + VM.migrate_live: false + VM.hold: true + VM.release: true + VM.suspend: true + VM.resume: true + VM.stop: true + VM.boot: true + VM.reboot: true + VM.reboot_hard: true + VM.poweroff: true + VM.poweroff_hard: true + VM.undeploy: true + VM.undeploy_hard: true + VM.shutdown: true + VM.shutdown_hard: true + VM.delete: true + VM.delete_recreate: true + VM.resize: true + VM.attachdisk: true + VM.detachdisk: true + VM.saveas: true + VM.attachnic: true + VM.detachnic: true + VM.snapshot_create: true + VM.snapshot_revert: true + VM.snapshot_delete: true + VM.resched: false + VM.unresched: false + templates-tab: + panel_tabs: + template_info_tab: true + template_template_tab: true + table_columns: + - 0 # Checkbox + - 1 # ID + - 2 # Owner + - 3 # Group + - 4 # Name + - 5 # Registration time + actions: + Template.refresh: true + Template.create_dialog: false + Template.easy_provision: true + Template.update_dialog: true + Template.instantiate_vms: true + Template.chown: false + Template.chgrp: false + Template.chmod: true + Template.clone_dialog: true + Template.delete: true + template_creation_tabs: + general: true + storage: true + network: true + os_booting: true + features: true + input_output: true + context: true + scheduling: false + images-tab: + panel_tabs: + image_info_panel: true + table_columns: + - 0 # Checkbox + - 1 # ID + - 2 # Owner + - 3 # Group + - 4 # Name + - 5 # Datastore + #- 6 # Size + - 7 # Type + #- 8 # Registration time + #- 9 # Persistent + - 10 # Status + - 11 # #VMs + #- 12 # Target + actions: + Image.refresh: true + Image.create_dialog: true + Image.chown: false + Image.chgrp: false + Image.chmod: true + Image.enable: true + Image.disable: true + Image.persistent: true + Image.nonpersistent: true + Image.clone_dialog: true + Image.delete: true + files-tab: + panel_tabs: + file_info_panel: true + table_columns: + - 0 # Checkbox + - 1 # ID + - 2 # Owner + - 3 # Group + - 4 # Name + - 5 # Datastore + #- 6 # Size + - 7 # Type + #- 8 # Registration time + #- 9 # Persistent + - 10 # Status + #- 11 # #VMs + #- 12 # Target + actions: + File.refresh: true + File.create_dialog: true + File.chown: false + File.chgrp: false + File.chmod: true + File.enable: true + File.disable: true + File.delete: true + infra-tab: + panel_tabs: + actions: + clusters-tab: + panel_tabs: + cluster_info_tab: true + cluster_host_tab: true + cluster_vnet_tab: true + cluster_datastore_tab: true + table_columns: + - 0 # Checkbox + - 1 # ID + - 2 # Name + - 3 # Hosts + - 4 # VNets + - 5 # Datastores + actions: + Cluster.refresh: true + Cluster.create_dialog: true + Cluster.update_dialog: true + Cluster.delete: true + hosts-tab: + panel_tabs: + host_info_tab: true + host_monitoring_tab: true + table_columns: + - 0 # Checkbox + - 1 # ID + - 2 # Name + - 3 # Cluster + - 4 # RVMs + #- 5 # Real CPU + - 6 # Allocated CPU + #- 7 # Real MEM + - 8 # Allocated MEM + - 9 # Status + #- 10 # IM MAD + #- 11 # VM MAD + #- 12 # Last monitored on + actions: + Host.refresh: true + Host.create_dialog: true + Host.addtocluster: true + Host.enable: true + Host.disable: true + Host.delete: true + datastores-tab: + panel_tabs: + datastore_info_tab: false + datastore_image_tab: true + table_columns: + - 0 # Checkbox + - 1 # ID + - 2 # Owner + - 3 # Group + - 4 # Name + - 5 # Cluster + #- 6 # Basepath + #- 7 # TM + #- 8 # DS + #- 9 # Type + actions: + Datastore.refresh: true + Datastore.create_dialog: false + Datastore.addtocluster: false + Datastore.chown: false + Datastore.chgrp: false + Datastore.chmod: true + Datastore.delete: false + vnets-tab: + panel_tabs: + vnet_info_tab: false + vnet_leases_tab: true + table_columns: + - 0 # Checkbox + - 1 # ID + - 2 # Owner + - 3 # Group + - 4 # Name + - 5 # Cluster + - 6 # Type + #- 7 # Bridge + - 8 # Leases + actions: + Network.refresh: true + Network.create_dialog: false + Network.addtocluster: false + Network.chown: false + Network.chgrp: false + Network.chmod: true + Network.delete: false + Network.addleases: false + Network.hold_lease: false + Network.remove_lease: false + Network.release_lease: false + marketplace-tab: + panel_tabs: + marketplace_info_tab: true + table_columns: + - 0 # Checkbox + #- 1 # ID + - 2 # Name + - 3 # Publisher + - 4 # Hypervisor + - 5 # Arch + - 6 # Format + #- 7 # Tags + actions: + Marketplace.refresh: true + Marketplace.import: true diff --git a/src/sunstone/etc/sunstone-views/user.yaml b/src/sunstone/etc/sunstone-views/user.yaml index 066feb7dfb..121ffb9590 100644 --- a/src/sunstone/etc/sunstone-views/user.yaml +++ b/src/sunstone/etc/sunstone-views/user.yaml @@ -1,24 +1,24 @@ small_logo: images/opennebula-sunstone-v4.0-small.png enabled_tabs: - - dashboard-tab - #- system-tab - #- users-tab - #- groups-tab - #- acls-tab - - vresources-tab - - vms-tab - - templates-tab - - images-tab - - files-tab - - infra-tab - #- clusters-tab - #- hosts-tab - - datastores-tab - - vnets-tab - - marketplace-tab - #- oneflow-dashboard - #- oneflow-services - #- oneflow-templates + dashboard-tab: true + system-tab: false + users-tab: false + groups-tab: false + acls-tab: false + vresources-tab: true + vms-tab: true + templates-tab: true + images-tab: true + files-tab: true + infra-tab: true + clusters-tab: false + hosts-tab: false + datastores-tab: true + vnets-tab: true + marketplace-tab: true + oneflow-dashboard: false + oneflow-services: false + oneflow-templates: false tabs: dashboard-tab: panel_tabs: @@ -117,6 +117,7 @@ tabs: actions: VM.refresh: true VM.create_dialog: true + VM.easy_provision: false VM.chown: false VM.chgrp: false VM.chmod: true @@ -164,6 +165,7 @@ tabs: actions: Template.refresh: true Template.create_dialog: true + Template.easy_provision: false Template.update_dialog: true Template.instantiate_vms: true Template.chown: false diff --git a/src/sunstone/models/OpenNebulaJSON/TemplateJSON.rb b/src/sunstone/models/OpenNebulaJSON/TemplateJSON.rb index 03bbe9a90e..461006eeb7 100644 --- a/src/sunstone/models/OpenNebulaJSON/TemplateJSON.rb +++ b/src/sunstone/models/OpenNebulaJSON/TemplateJSON.rb @@ -78,7 +78,12 @@ module OpenNebulaJSON end def instantiate(params=Hash.new) - super(params['vm_name']) + if params['template'] + template = template_to_str(params['template']) + super(params['vm_name'], false, template) + else + super(params['vm_name']) + end end def clone(params=Hash.new) diff --git a/src/sunstone/models/SunstoneViews.rb b/src/sunstone/models/SunstoneViews.rb index 8d6aae27f4..ce7797f529 100644 --- a/src/sunstone/models/SunstoneViews.rb +++ b/src/sunstone/models/SunstoneViews.rb @@ -56,6 +56,10 @@ class SunstoneViews return available_views end + def available_tabs + @views_config['available_tabs'] + end + def logo @views_config['logo'] end diff --git a/src/sunstone/public/css/app.css b/src/sunstone/public/css/app.css index f1ed398f8c..3cf0f7a0bd 100644 --- a/src/sunstone/public/css/app.css +++ b/src/sunstone/public/css/app.css @@ -6654,19 +6654,20 @@ ul.button-group { /* line 611, ../sass/app.scss */ .value_td { text-overflow: ellipsis; + word-break: break-all; } -/* line 615, ../sass/app.scss */ +/* line 616, ../sass/app.scss */ small { color: #b6b6b6 !important; } -/* line 619, ../sass/app.scss */ +/* line 620, ../sass/app.scss */ .header-dashboard { margin-top: -5px; } -/* line 623, ../sass/app.scss */ +/* line 624, ../sass/app.scss */ .span-dashboard { background: #fcfcfc; color: #6f6f6f; @@ -6674,43 +6675,43 @@ small { box-shadow: 0 0 2px 0px #6f6f6f; } -/* line 632, ../sass/app.scss */ +/* line 633, ../sass/app.scss */ .button.dropdown.small::after { border-color: #9f9f9f transparent transparent transparent; border-width: 4px; } -/* line 637, ../sass/app.scss */ +/* line 638, ../sass/app.scss */ .footer-opennebula { font-size: 10px; color: #b6b6b6 !important; } -/* line 642, ../sass/app.scss */ +/* line 643, ../sass/app.scss */ a.footer.button { margin: 5px; } -/* line 647, ../sass/app.scss */ +/* line 648, ../sass/app.scss */ .user-login { float: right; } -/* line 651, ../sass/app.scss */ +/* line 652, ../sass/app.scss */ .user-login i.header-icon { color: #6f6f6f; font-weight: 300; font-size: 23px; } -/* line 657, ../sass/app.scss */ +/* line 658, ../sass/app.scss */ .user-login .button { color: #6f6f6f; font-size: 60%; line-height: 0; } -/* line 663, ../sass/app.scss */ +/* line 664, ../sass/app.scss */ .user-login .button.secondary { background: #f2f2f2; border: 0px; @@ -6718,100 +6719,100 @@ a.footer.button { font-weight: 300; } -/* line 671, ../sass/app.scss */ +/* line 672, ../sass/app.scss */ .user-login .button.secondary:hover, .user-login .button.secondary:focus { background-color: #d0d0d0; color: #6f6f6f; } -/* line 676, ../sass/app.scss */ +/* line 677, ../sass/app.scss */ .user-login .button.dropdown.tiny::after { border: solid 5px; border-color: #b6b6b6 transparent transparent transparent; right: 7px; } -/* line 682, ../sass/app.scss */ +/* line 683, ../sass/app.scss */ .header-resource { text-align: center; } -/* line 686, ../sass/app.scss */ +/* line 687, ../sass/app.scss */ .header-resource { float: left; } -/* line 690, ../sass/app.scss */ +/* line 691, ../sass/app.scss */ .header { text-align: center; } -/* line 694, ../sass/app.scss */ +/* line 695, ../sass/app.scss */ .button.dropdown.tiny ul.no-hover.show-dropdown { top: 34px !important; } -/* line 698, ../sass/app.scss */ +/* line 699, ../sass/app.scss */ .graph_legend { text-align: center; } -/* line 702, ../sass/app.scss */ +/* line 703, ../sass/app.scss */ .graph_legend table { background: inherit; border: 0px; width: 100%; } -/* line 708, ../sass/app.scss */ +/* line 709, ../sass/app.scss */ .graph_legend h3 { margin-top: 0px; } -/* line 712, ../sass/app.scss */ +/* line 713, ../sass/app.scss */ .graph_legend .subheader { margin-bottom: 5px; } -/* line 716, ../sass/app.scss */ +/* line 717, ../sass/app.scss */ .dashboard hr { margin: 0; margin-bottom: 8px; } -/* line 721, ../sass/app.scss */ +/* line 722, ../sass/app.scss */ .graph { margin-bottom: 15px !important; } -/* line 725, ../sass/app.scss */ +/* line 726, ../sass/app.scss */ .dashboard-panel { height: 450px; } -/* line 729, ../sass/app.scss */ +/* line 730, ../sass/app.scss */ .vm_log_error { color: #ff8d81; } -/* line 733, ../sass/app.scss */ +/* line 734, ../sass/app.scss */ .noUiSlider { margin: 10px; } -/* line 737, ../sass/app.scss */ +/* line 738, ../sass/app.scss */ .log-tab { background: #6f6f6f; color: #f2f2f2; padding: 20px; } -/* line 743, ../sass/app.scss */ +/* line 744, ../sass/app.scss */ .reveal-modal ul.tabs-content { margin: 0 0 0px; } -/* line 747, ../sass/app.scss */ +/* line 748, ../sass/app.scss */ .reveal-body { height: 80%; overflow-y: overlay; @@ -6819,28 +6820,28 @@ a.footer.button { padding: 5px 20px; } -/* line 754, ../sass/app.scss */ +/* line 755, ../sass/app.scss */ .reveal-footer { position: absolute; bottom: 20px; width: 90%; } -/* line 760, ../sass/app.scss */ +/* line 761, ../sass/app.scss */ .max-height { max-height: 85%; position: absolute; height: 100%; } -/* line 766, ../sass/app.scss */ +/* line 767, ../sass/app.scss */ .ui-layout-content { overflow-y: overlay; overflow-x: hidden; padding: 0; } -/* line 774, ../sass/app.scss */ +/* line 775, ../sass/app.scss */ div.time-picker { position: absolute; height: 191px; @@ -6853,20 +6854,20 @@ div.time-picker { margin: 0; } -/* line 784, ../sass/app.scss */ +/* line 785, ../sass/app.scss */ div.time-picker-12hours { width: 6em; /* needed for IE */ } -/* line 788, ../sass/app.scss */ +/* line 789, ../sass/app.scss */ div.time-picker ul { list-style-type: none; margin: 0; padding: 0; } -/* line 793, ../sass/app.scss */ +/* line 794, ../sass/app.scss */ div.time-picker li { cursor: pointer; height: 20px; @@ -6874,124 +6875,124 @@ div.time-picker li { padding: 4px 3px; } -/* line 799, ../sass/app.scss */ +/* line 800, ../sass/app.scss */ div.time-picker li.selected { background: #0063CE; color: #fff; } -/* line 805, ../sass/app.scss */ +/* line 806, ../sass/app.scss */ .timepicker { float: left; width: 50px !important; } -/* line 810, ../sass/app.scss */ +/* line 811, ../sass/app.scss */ .jdpicker { float: left; width: 90px !important; } -/* line 815, ../sass/app.scss */ +/* line 816, ../sass/app.scss */ .columns { line-height: 2; } -/* line 819, ../sass/app.scss */ +/* line 820, ../sass/app.scss */ .transparent_table, .transparent_table tr { background: none !important; border: 0px !important; } -/* line 824, ../sass/app.scss */ +/* line 825, ../sass/app.scss */ form { margin: 0 !important; } -/* line 828, ../sass/app.scss */ +/* line 829, ../sass/app.scss */ #template_create_tabs { width: 180px; } -/* line 833, ../sass/app.scss */ +/* line 834, ../sass/app.scss */ .dataTables_scrollHead { height: 30px; } -/* line 837, ../sass/app.scss */ +/* line 838, ../sass/app.scss */ .dataTables_scrollBody { margin-top: -3px; } -/* line 841, ../sass/app.scss */ +/* line 842, ../sass/app.scss */ .show_hide { cursor: pointer; } -/* line 845, ../sass/app.scss */ +/* line 846, ../sass/app.scss */ .show_hide:hover > h4 > small { color: #6f6f6f !important; } -/* line 849, ../sass/app.scss */ +/* line 850, ../sass/app.scss */ .label.allocated { background-color: #2ba6cb; } -/* line 852, ../sass/app.scss */ +/* line 853, ../sass/app.scss */ .label.real { background-color: #707d85; } -/* line 855, ../sass/app.scss */ +/* line 856, ../sass/app.scss */ .label.total { background-color: #ac5a62; } -/* line 859, ../sass/app.scss */ +/* line 860, ../sass/app.scss */ .tabs dd a, .tabs li a { padding: 0px 13px; } -/* line 863, ../sass/app.scss */ +/* line 864, ../sass/app.scss */ .ui-layout-resizer-west { background: none; } -/* line 868, ../sass/app.scss */ +/* line 869, ../sass/app.scss */ .ui-layout-resizer-west:hover { background: none; width: 30px !important; } -/* line 874, ../sass/app.scss */ +/* line 875, ../sass/app.scss */ .ui-layout-toggler-west:hover { width: 30px !important; background: #2ba6cb !important; } -/* line 879, ../sass/app.scss */ +/* line 880, ../sass/app.scss */ .ui-layout-resizer-south:hover { height: 25px !important; } -/* line 883, ../sass/app.scss */ +/* line 884, ../sass/app.scss */ .ui-layout-resizer-south:hover .ui-layout-toggler-south { height: 25px !important; } -/* line 889, ../sass/app.scss */ +/* line 890, ../sass/app.scss */ .ui-layout-toggler-south:hover { height: 25px !important; background: #2ba6cb !important; } -/* line 900, ../sass/app.scss */ +/* line 901, ../sass/app.scss */ div.dataTables_wrapper { margin-bottom: 1.25em; } -/* line 906, ../sass/app.scss */ +/* line 907, ../sass/app.scss */ div.dataTables_length label, div.dataTables_filter label, div.dataTables_info { @@ -6999,46 +7000,46 @@ div.dataTables_info { font-weight: normal; } -/* line 911, ../sass/app.scss */ +/* line 912, ../sass/app.scss */ div.dataTables_length { padding-top: 0px; } -/* line 914, ../sass/app.scss */ +/* line 915, ../sass/app.scss */ div.dataTables_length label { float: left; text-align: left; } -/* line 919, ../sass/app.scss */ +/* line 920, ../sass/app.scss */ div.dataTables_length select { width: 75px; } -/* line 923, ../sass/app.scss */ +/* line 924, ../sass/app.scss */ div.dataTables_filter label { float: right; } -/* line 926, ../sass/app.scss */ +/* line 927, ../sass/app.scss */ div.dataTables_filter input { display: inline-block !important; width: auto !important; } -/* line 931, ../sass/app.scss */ +/* line 932, ../sass/app.scss */ div.dataTables_info { padding-top: 1px; } -/* line 935, ../sass/app.scss */ +/* line 936, ../sass/app.scss */ div.dataTables_paginate { float: right; margin: 0; padding-top: 2px; } -/* line 941, ../sass/app.scss */ +/* line 942, ../sass/app.scss */ table.dataTable { clear: both; margin-bottom: 0.5em !important; @@ -7046,7 +7047,7 @@ table.dataTable { width: 100%; } -/* line 952, ../sass/app.scss */ +/* line 953, ../sass/app.scss */ table.dataTable thead .sorting, table.dataTable thead .sorting_asc, table.dataTable thead .sorting_desc, @@ -7056,50 +7057,50 @@ table.dataTable thead .sorting_desc_disabled { *cursor: hand; } -/* line 957, ../sass/app.scss */ +/* line 958, ../sass/app.scss */ table.dataTable thead .sorting_asc { background: url("../images/sort_asc_disabled.png") no-repeat center right; } -/* line 958, ../sass/app.scss */ +/* line 959, ../sass/app.scss */ table.dataTable thead .sorting_desc { background: url("../images/sort_desc_disabled.png") no-repeat center right; } -/* line 960, ../sass/app.scss */ +/* line 961, ../sass/app.scss */ table.dataTable thead .sorting_asc_disabled { background: url("../images/sort_asc_disabled.png") no-repeat center right; } -/* line 961, ../sass/app.scss */ +/* line 962, ../sass/app.scss */ table.dataTable thead .sorting_desc_disabled { background: url("../images/sort_desc_disabled.png") no-repeat center right; } -/* line 963, ../sass/app.scss */ +/* line 964, ../sass/app.scss */ table.dataTable th:active { outline: none; } /* Scrolling */ -/* line 968, ../sass/app.scss */ +/* line 969, ../sass/app.scss */ div.dataTables_scrollHead table { margin-bottom: 0 !important; } -/* line 972, ../sass/app.scss */ +/* line 973, ../sass/app.scss */ div.dataTables_scrollBody table { border-top: none; margin-bottom: 0 !important; } -/* line 978, ../sass/app.scss */ +/* line 979, ../sass/app.scss */ div.dataTables_scrollBody tbody tr:first-child th, div.dataTables_scrollBody tbody tr:first-child td { border-top: none; } -/* line 982, ../sass/app.scss */ +/* line 983, ../sass/app.scss */ div.dataTables_scrollFoot table { border-top: none; } @@ -7107,42 +7108,42 @@ div.dataTables_scrollFoot table { /* * TableTools styles */ -/* line 993, ../sass/app.scss */ +/* line 994, ../sass/app.scss */ .table tbody tr.active td, .table tbody tr.active th { background-color: #08C; color: white; } -/* line 999, ../sass/app.scss */ +/* line 1000, ../sass/app.scss */ .table tbody tr.active:hover td, .table tbody tr.active:hover th { background-color: #0075b0 !important; } -/* line 1004, ../sass/app.scss */ +/* line 1005, ../sass/app.scss */ .table-striped tbody tr.active:nth-child(odd) td, .table-striped tbody tr.active:nth-child(odd) th { background-color: #017ebc; } -/* line 1011, ../sass/app.scss */ +/* line 1012, ../sass/app.scss */ table.policies_table th, table.policies_table td { font-size: 13px; } -/* line 1014, ../sass/app.scss */ +/* line 1015, ../sass/app.scss */ table.policies_table input { margin: 0px !important; height: 23px !important; font-size: 13px; } -/* line 1021, ../sass/app.scss */ +/* line 1022, ../sass/app.scss */ .key_td { font-weight: bold; } -/* line 1025, ../sass/app.scss */ +/* line 1026, ../sass/app.scss */ .detach-vnc-icon { top: 11px; right: 40px; @@ -7150,7 +7151,7 @@ table.policies_table input { color: #aaa; } -/* line 1032, ../sass/app.scss */ +/* line 1033, ../sass/app.scss */ .detach-vnc-icon:hover { color: #222; } diff --git a/src/sunstone/public/js/opennebula.js b/src/sunstone/public/js/opennebula.js index 1c71cc5301..fcf9378390 100644 --- a/src/sunstone/public/js/opennebula.js +++ b/src/sunstone/public/js/opennebula.js @@ -1066,8 +1066,7 @@ var OpenNebula = { OpenNebula.Action.simple_action(params,OpenNebula.Template.resource,"unpublish"); }, "instantiate" : function(params) { - var vm_name = params.data.extra_param ? params.data.extra_param : ""; - var action_obj = { "vm_name" : vm_name }; + var action_obj = params.data.extra_param ? params.data.extra_param : {}; OpenNebula.Action.simple_action(params,OpenNebula.Template.resource, "instantiate",action_obj); }, diff --git a/src/sunstone/public/js/plugins/acls-tab.js b/src/sunstone/public/js/plugins/acls-tab.js index 689a9622d9..eb485a439f 100644 --- a/src/sunstone/public/js/plugins/acls-tab.js +++ b/src/sunstone/public/js/plugins/acls-tab.js @@ -599,35 +599,37 @@ function setAclAutorefresh(){ $(document).ready(function(){ var tab_name = 'acls-tab'; - //if we are not oneadmin, our tab will not even be in the DOM. - dataTable_acls = $("#datatable_acls",main_tabs_context).dataTable({ - "aoColumnDefs": [ - { "bSortable": false, "aTargets": ["check",2,3,4,5,6] }, - { "sWidth": "35px", "aTargets": [0] }, - { "bVisible": true, "aTargets": Config.tabTableColumns(tab_name)}, - { "bVisible": false, "aTargets": ['_all']} - ] - }); + if (Config.isTabEnabled(tab_name)) { + //if we are not oneadmin, our tab will not even be in the DOM. + dataTable_acls = $("#datatable_acls",main_tabs_context).dataTable({ + "aoColumnDefs": [ + { "bSortable": false, "aTargets": ["check",2,3,4,5,6] }, + { "sWidth": "35px", "aTargets": [0] }, + { "bVisible": true, "aTargets": Config.tabTableColumns(tab_name)}, + { "bVisible": false, "aTargets": ['_all']} + ] + }); - $('#acl_search').keyup(function(){ - dataTable_acls.fnFilter( $(this).val() ); - }) + $('#acl_search').keyup(function(){ + dataTable_acls.fnFilter( $(this).val() ); + }) - dataTable_acls.on('draw', function(){ - recountCheckboxes(dataTable_acls); - }) + dataTable_acls.on('draw', function(){ + recountCheckboxes(dataTable_acls); + }) - Sunstone.runAction("Acl.list"); + Sunstone.runAction("Acl.list"); - setupCreateAclDialog(); - setAclAutorefresh(); + setupCreateAclDialog(); + setAclAutorefresh(); - initCheckAllBoxes(dataTable_acls); - tableCheckboxesListener(dataTable_acls); - //shortenedInfoFields('#datatable_acls'); + initCheckAllBoxes(dataTable_acls); + tableCheckboxesListener(dataTable_acls); + //shortenedInfoFields('#datatable_acls'); - infoListener(dataTable_acls); + infoListener(dataTable_acls); - $('div#acls_tab div.legend_div').hide(); + $('div#acls_tab div.legend_div').hide(); + } }) diff --git a/src/sunstone/public/js/plugins/clusters-tab.js b/src/sunstone/public/js/plugins/clusters-tab.js index 6fbeb8f26c..0aff397a78 100644 --- a/src/sunstone/public/js/plugins/clusters-tab.js +++ b/src/sunstone/public/js/plugins/clusters-tab.js @@ -1407,32 +1407,34 @@ function clusters_sel() { $(document).ready(function(){ var tab_name = "clusters-tab" - //prepare host datatable - dataTable_clusters = $("#datatable_clusters",main_tabs_context).dataTable({ - "aoColumnDefs": [ - { "bSortable": false, "aTargets": ["check"] }, - { "sWidth": "35px", "aTargets": [0] }, - { "bVisible": true, "aTargets": Config.tabTableColumns(tab_name)}, - { "bVisible": false, "aTargets": ['_all']} - ] - }); + if (Config.isTabEnabled(tab_name)) { + //prepare host datatabl + dataTable_clusters = $("#datatable_clusters",main_tabs_context).dataTable({ + "aoColumnDefs": [ + { "bSortable": false, "aTargets": ["check"] }, + { "sWidth": "35px", "aTargets": [0] }, + { "bVisible": true, "aTargets": Config.tabTableColumns(tab_name)}, + { "bVisible": false, "aTargets": ['_all']} + ] + }); - $('#cluster_search').keyup(function(){ - dataTable_clusters.fnFilter( $(this).val() ); - }) + $('#cluster_search').keyup(function(){ + dataTable_clusters.fnFilter( $(this).val() ); + }) - dataTable_clusters.on('draw', function(){ - recountCheckboxes(dataTable_clusters); - }) + dataTable_clusters.on('draw', function(){ + recountCheckboxes(dataTable_clusters); + }) - Sunstone.runAction("Cluster.list"); + Sunstone.runAction("Cluster.list"); - dialogs_context.append('
'); + dialogs_context.append(''); - setClusterAutorefresh(); - clusterResourceViewListeners(); + setClusterAutorefresh(); + clusterResourceViewListeners(); - initCheckAllBoxes(dataTable_clusters); - tableCheckboxesListener(dataTable_clusters); - infoListener(dataTable_clusters, "Cluster.showinfo"); + initCheckAllBoxes(dataTable_clusters); + tableCheckboxesListener(dataTable_clusters); + infoListener(dataTable_clusters, "Cluster.showinfo"); + } }); diff --git a/src/sunstone/public/js/plugins/config-tab.js b/src/sunstone/public/js/plugins/config-tab.js index e3cd2bbe41..585244c2fb 100644 --- a/src/sunstone/public/js/plugins/config-tab.js +++ b/src/sunstone/public/js/plugins/config-tab.js @@ -34,7 +34,7 @@ setInterval(function(){ Config = { "isTabEnabled": function(tab_name){ - var enabled = config['view']['tabs'][tab_name]['enabled']; + var enabled = config['view']['enabled_tabs'][tab_name]; return enabled; }, "isTabActionEnabled": function(tab_name, action_name, panel_name){ diff --git a/src/sunstone/public/js/plugins/datastores-tab.js b/src/sunstone/public/js/plugins/datastores-tab.js index 6fc68e08b4..858e6b8996 100644 --- a/src/sunstone/public/js/plugins/datastores-tab.js +++ b/src/sunstone/public/js/plugins/datastores-tab.js @@ -1082,38 +1082,41 @@ function setDatastoreAutorefresh(){ } $(document).ready(function(){ + var tab_name = 'datastores-tab'; - dataTable_datastores = $("#datatable_datastores",main_tabs_context).dataTable({ - "aoColumnDefs": [ - { "bSortable": false, "aTargets": ["check"] }, - { "sWidth": "35px", "aTargets": [0] }, - { "bVisible": true, "aTargets": config['view']['tabs']['datastores-tab']['table_columns']}, - { "bVisible": false, "aTargets": ['_all']} - ] - }); + if (Config.isTabEnabled(tab_name)) { + dataTable_datastores = $("#datatable_datastores",main_tabs_context).dataTable({ + "aoColumnDefs": [ + { "bSortable": false, "aTargets": ["check"] }, + { "sWidth": "35px", "aTargets": [0] }, + { "bVisible": true, "aTargets": Config.tabTableColumns(tab_name)}, + { "bVisible": false, "aTargets": ['_all']} + ] + }); - $('#datastore_search').keyup(function(){ - dataTable_datastores.fnFilter( $(this).val() ); - }) + $('#datastore_search').keyup(function(){ + dataTable_datastores.fnFilter( $(this).val() ); + }) - dataTable_datastores.on('draw', function(){ - recountCheckboxes(dataTable_datastores); - }) + dataTable_datastores.on('draw', function(){ + recountCheckboxes(dataTable_datastores); + }) - Sunstone.runAction("Datastore.list"); + Sunstone.runAction("Datastore.list"); - setupCreateDatastoreDialog(); - setDatastoreAutorefresh(); + setupCreateDatastoreDialog(); + setDatastoreAutorefresh(); - initCheckAllBoxes(dataTable_datastores); - tableCheckboxesListener(dataTable_datastores); - infoListener(dataTable_datastores,'Datastore.showinfo'); + initCheckAllBoxes(dataTable_datastores); + tableCheckboxesListener(dataTable_datastores); + infoListener(dataTable_datastores,'Datastore.showinfo'); - // Reset filter in case the view was filtered because it was accessed - // from a single cluster. - $('div#menu li#li_datastores_tab').live('click',function(){ - dataTable_datastores.fnFilter('',5); - }); + // Reset filter in case the view was filtered because it was accessed + // from a single cluster. + $('div#menu li#li_datastores_tab').live('click',function(){ + dataTable_datastores.fnFilter('',5); + }); - $('div#datastores_tab div.legend_div').hide(); + $('div#datastores_tab div.legend_div').hide(); + } }) diff --git a/src/sunstone/public/js/plugins/files-tab.js b/src/sunstone/public/js/plugins/files-tab.js index 6737248253..4c3ef7bff5 100644 --- a/src/sunstone/public/js/plugins/files-tab.js +++ b/src/sunstone/public/js/plugins/files-tab.js @@ -969,32 +969,34 @@ function is_persistent_file(id){ $(document).ready(function(){ var tab_name = 'files-tab'; - dataTable_files = $("#datatable_files",main_tabs_context).dataTable({ - "aoColumnDefs": [ - { "bSortable": false, "aTargets": ["check"] }, - { "sWidth": "35px", "aTargets": [0] }, - { "bVisible": true, "aTargets": Config.tabTableColumns(tab_name)}, - { "bVisible": false, "aTargets": ['_all']} - ] - }); + if (Config.isTabEnabled(tab_name)) { + dataTable_files = $("#datatable_files",main_tabs_context).dataTable({ + "aoColumnDefs": [ + { "bSortable": false, "aTargets": ["check"] }, + { "sWidth": "35px", "aTargets": [0] }, + { "bVisible": true, "aTargets": Config.tabTableColumns(tab_name)}, + { "bVisible": false, "aTargets": ['_all']} + ] + }); - $('#file_search').keyup(function(){ - dataTable_files.fnFilter( $(this).val() ); - }) + $('#file_search').keyup(function(){ + dataTable_files.fnFilter( $(this).val() ); + }) - dataTable_files.on('draw', function(){ - recountCheckboxes(dataTable_files); - }) + dataTable_files.on('draw', function(){ + recountCheckboxes(dataTable_files); + }) - Sunstone.runAction("File.list"); + Sunstone.runAction("File.list"); - setupCreateFileDialog(); - setupTips($create_file_dialog); - setFileAutorefresh(); + setupCreateFileDialog(); + setupTips($create_file_dialog); + setFileAutorefresh(); - initCheckAllBoxes(dataTable_files); - tableCheckboxesListener(dataTable_files); - infoListener(dataTable_files,'File.showinfo'); + initCheckAllBoxes(dataTable_files); + tableCheckboxesListener(dataTable_files); + infoListener(dataTable_files,'File.showinfo'); - $('div#files_tab div.legend_div').hide(); + $('div#files_tab div.legend_div').hide(); + } }); diff --git a/src/sunstone/public/js/plugins/groups-tab.js b/src/sunstone/public/js/plugins/groups-tab.js index 4ab6400285..8a96583f97 100644 --- a/src/sunstone/public/js/plugins/groups-tab.js +++ b/src/sunstone/public/js/plugins/groups-tab.js @@ -609,32 +609,34 @@ function setGroupAutorefresh(){ $(document).ready(function(){ var tab_name = 'groups-tab'; - dataTable_groups = $("#datatable_groups",main_tabs_context).dataTable({ - "aoColumnDefs": [ - { "bSortable": false, "aTargets": ["check",4,5,6] }, - { "sWidth": "35px", "aTargets": [0] }, - { "bVisible": true, "aTargets": Config.tabTableColumns(tab_name)}, - { "bVisible": false, "aTargets": ['_all']} - ] - }); + if (Config.isTabEnabled(tab_name)) { + dataTable_groups = $("#datatable_groups",main_tabs_context).dataTable({ + "aoColumnDefs": [ + { "bSortable": false, "aTargets": ["check",4,5,6] }, + { "sWidth": "35px", "aTargets": [0] }, + { "bVisible": true, "aTargets": Config.tabTableColumns(tab_name)}, + { "bVisible": false, "aTargets": ['_all']} + ] + }); - $('#group_search').keyup(function(){ - dataTable_groups.fnFilter( $(this).val() ); - }) + $('#group_search').keyup(function(){ + dataTable_groups.fnFilter( $(this).val() ); + }) - dataTable_groups.on('draw', function(){ - recountCheckboxes(dataTable_groups); - }) + dataTable_groups.on('draw', function(){ + recountCheckboxes(dataTable_groups); + }) - Sunstone.runAction("Group.list"); - setupCreateGroupDialog(); - setupGroupQuotasDialog(); - setGroupAutorefresh(); + Sunstone.runAction("Group.list"); + setupCreateGroupDialog(); + setupGroupQuotasDialog(); + setGroupAutorefresh(); - initCheckAllBoxes(dataTable_groups); - tableCheckboxesListener(dataTable_groups); - infoListener(dataTable_groups, 'Group.showinfo'); + initCheckAllBoxes(dataTable_groups); + tableCheckboxesListener(dataTable_groups); + infoListener(dataTable_groups, 'Group.showinfo'); - $('div#groups_tab div.legend_div').hide(); - $('div#groups_tab_non_admin div.legend_div').hide(); + $('div#groups_tab div.legend_div').hide(); + $('div#groups_tab_non_admin div.legend_div').hide(); + } }) diff --git a/src/sunstone/public/js/plugins/hosts-tab.js b/src/sunstone/public/js/plugins/hosts-tab.js index 638ba81011..2ef52deb31 100644 --- a/src/sunstone/public/js/plugins/hosts-tab.js +++ b/src/sunstone/public/js/plugins/hosts-tab.js @@ -968,42 +968,44 @@ function hostMonitorError(req,error_json){ $(document).ready(function(){ var tab_name = 'hosts-tab'; - //prepare host datatable - dataTable_hosts = $("#datatable_hosts",main_tabs_context).dataTable({ - "aoColumnDefs": [ - { "bSortable": false, "aTargets": ["check",5,6,7,8] }, - { "sWidth": "35px", "aTargets": [0] }, //check, ID, RVMS, Status, - { "bVisible": true, "aTargets": Config.tabTableColumns(tab_name)}, - { "bVisible": false, "aTargets": ['_all']} - ] - }); + if (Config.isTabEnabled(tab_name)) { + //prepare host datatable + dataTable_hosts = $("#datatable_hosts",main_tabs_context).dataTable({ + "aoColumnDefs": [ + { "bSortable": false, "aTargets": ["check",5,6,7,8] }, + { "sWidth": "35px", "aTargets": [0] }, //check, ID, RVMS, Status, + { "bVisible": true, "aTargets": Config.tabTableColumns(tab_name)}, + { "bVisible": false, "aTargets": ['_all']} + ] + }); - $('#hosts_search').keyup(function(){ - dataTable_hosts.fnFilter( $(this).val() ); - }) + $('#hosts_search').keyup(function(){ + dataTable_hosts.fnFilter( $(this).val() ); + }) - dataTable_hosts.on('draw', function(){ - recountCheckboxes(dataTable_hosts); - }) + dataTable_hosts.on('draw', function(){ + recountCheckboxes(dataTable_hosts); + }) - Sunstone.runAction("Host.list"); + Sunstone.runAction("Host.list"); - setupCreateHostDialog(); + setupCreateHostDialog(); - setHostAutorefresh(); + setHostAutorefresh(); - initCheckAllBoxes(dataTable_hosts); - tableCheckboxesListener(dataTable_hosts); - infoListener(dataTable_hosts, "Host.showinfo"); + initCheckAllBoxes(dataTable_hosts); + tableCheckboxesListener(dataTable_hosts); + infoListener(dataTable_hosts, "Host.showinfo"); - // This listener removes any filter on hosts table when its menu item is - // selected. The cluster plugins will filter hosts when the hosts - // in a cluster are shown. So we have to make sure no filter has been - // left in place when we want to see all hosts. - $('div#menu li#li_hosts_tab').live('click',function(){ - dataTable_hosts.fnFilter('',3); - }); + // This listener removes any filter on hosts table when its menu item is + // selected. The cluster plugins will filter hosts when the hosts + // in a cluster are shown. So we have to make sure no filter has been + // left in place when we want to see all hosts. + $('div#menu li#li_hosts_tab').live('click',function(){ + dataTable_hosts.fnFilter('',3); + }); - // Hide help - $('div#hosts_tab div.legend_div',main_tabs_context).hide(); + // Hide help + $('div#hosts_tab div.legend_div',main_tabs_context).hide(); + } }); diff --git a/src/sunstone/public/js/plugins/images-tab.js b/src/sunstone/public/js/plugins/images-tab.js index fd4dd22d5a..8ae95e92cd 100644 --- a/src/sunstone/public/js/plugins/images-tab.js +++ b/src/sunstone/public/js/plugins/images-tab.js @@ -16,6 +16,8 @@ /*Images tab plugin*/ +size_images = 0; + var images_tab_content = '\