From f4cf3ebc4fdcf848315205cc21bda37bb289dc19 Mon Sep 17 00:00:00 2001 From: Mik Date: Thu, 19 Nov 2020 19:48:51 +0100 Subject: [PATCH] sync structure to ione-standalone --- public/.bowerrc | 3 - public/.eslintrc.json | 27 - public/.jscsrc | 5 - public/Gruntfile.js | 241 - public/README.md | 119 - public/SConstruct | 33 - public/app/addons/end.js | 1 - public/app/addons/start.js | 1 - public/app/app.js | 520 -- public/app/console/spice.js | 128 - public/app/console/vnc.js | 163 - public/app/login.js | 108 - public/app/main.js | 367 - public/app/opennebula.js | 100 - public/app/opennebula/acl.js | 39 - public/app/opennebula/action.js | 406 - public/app/opennebula/ansible-process.js | 44 - public/app/opennebula/ansible.js | 71 - public/app/opennebula/auth.js | 77 - public/app/opennebula/cluster.js | 81 - public/app/opennebula/datastore.js | 145 - public/app/opennebula/error.js | 35 - public/app/opennebula/group.js | 106 - public/app/opennebula/helper.js | 149 - public/app/opennebula/host.js | 327 - public/app/opennebula/image.js | 171 - public/app/opennebula/marketplace.js | 68 - public/app/opennebula/marketplaceapp.js | 116 - public/app/opennebula/network.js | 125 - public/app/opennebula/role.js | 190 - public/app/opennebula/securitygroup.js | 74 - public/app/opennebula/service.js | 120 - public/app/opennebula/servicetemplate.js | 113 - public/app/opennebula/settings.js | 68 - public/app/opennebula/support.js | 43 - public/app/opennebula/template.js | 158 - public/app/opennebula/user.js | 124 - public/app/opennebula/vdc.js | 99 - public/app/opennebula/virtualrouter.js | 77 - public/app/opennebula/vm.js | 819 -- public/app/opennebula/vmgroup.js | 57 - public/app/opennebula/vntemplate.js | 91 - public/app/opennebula/zone.js | 54 - public/app/sunstone-config.js | 168 - public/app/sunstone.js | 1261 --- public/app/sunstone/buttons.hbs | 92 - public/app/sunstone/panels.hbs | 38 - public/app/sunstone/tab.hbs | 89 - public/app/sunstone/user_and_zone.hbs | 92 - public/app/tabs/acls-tab.js | 56 - public/app/tabs/acls-tab/actions.js | 43 - public/app/tabs/acls-tab/buttons.js | 38 - public/app/tabs/acls-tab/datatable.js | 282 - .../app/tabs/acls-tab/form-panels/create.js | 307 - .../form-panels/create/formPanelId.js | 19 - .../acls-tab/form-panels/create/wizard.hbs | 206 - public/app/tabs/acls-tab/tabId.js | 19 - public/app/tabs/ansible-process-tab.js | 69 - .../app/tabs/ansible-process-tab/actions.js | 68 - .../app/tabs/ansible-process-tab/buttons.js | 43 - .../app/tabs/ansible-process-tab/datatable.js | 159 - .../ansible-process-tab/datatable/search.hbs | 36 - .../tabs/ansible-process-tab/dialogs/clone.js | 131 - .../dialogs/clone/dialogId.js | 19 - .../dialogs/clone/html.hbs | 50 - .../ansible-process-tab/form-panels/create.js | 345 - .../form-panels/create/formPanelId.js | 19 - .../form-panels/create/wizard.hbs | 54 - .../tabs/ansible-process-tab/panels/info.js | 146 - .../ansible-process-tab/panels/info/html.hbs | 84 - .../panels/info/panelId.js | 19 - .../tabs/ansible-process-tab/panels/log.js | 69 - .../ansible-process-tab/panels/log/html.hbs | 25 - .../ansible-process-tab/panels/log/panelId.js | 19 - .../ansible-process-tab/panels/runnable.js | 69 - .../panels/runnable/html.hbs | 25 - .../panels/runnable/panelId.js | 19 - public/app/tabs/ansible-process-tab/tabId.js | 19 - public/app/tabs/ansible-tab.js | 70 - public/app/tabs/ansible-tab/actions.js | 86 - public/app/tabs/ansible-tab/buttons.js | 72 - public/app/tabs/ansible-tab/datatable.js | 174 - .../app/tabs/ansible-tab/datatable/search.hbs | 36 - public/app/tabs/ansible-tab/dialogs/clone.js | 131 - .../ansible-tab/dialogs/clone/dialogId.js | 19 - .../tabs/ansible-tab/dialogs/clone/html.hbs | 50 - .../tabs/ansible-tab/form-panels/create.js | 199 - .../form-panels/create/formPanelId.js | 19 - .../ansible-tab/form-panels/create/wizard.hbs | 61 - public/app/tabs/ansible-tab/panels/body.js | 71 - .../app/tabs/ansible-tab/panels/body/html.hbs | 25 - .../tabs/ansible-tab/panels/body/panelId.js | 19 - .../tabs/ansible-tab/panels/info-common.js | 78 - public/app/tabs/ansible-tab/panels/info.js | 173 - .../app/tabs/ansible-tab/panels/info/html.hbs | 47 - .../tabs/ansible-tab/panels/info/panelId.js | 19 - .../ansible-tab/panels/permissions-table.js | 214 - public/app/tabs/ansible-tab/tabId.js | 19 - public/app/tabs/automatization-top-tab.js | 28 - public/app/tabs/clusters-tab.js | 66 - public/app/tabs/clusters-tab/actions.js | 137 - public/app/tabs/clusters-tab/buttons.js | 46 - public/app/tabs/clusters-tab/datatable.js | 131 - .../tabs/clusters-tab/form-panels/create.js | 248 - .../form-panels/create/formPanelId.js | 19 - .../form-panels/create/wizard.hbs | 54 - .../tabs/clusters-tab/panels/datastores.js | 88 - .../clusters-tab/panels/datastores/panelId.js | 19 - public/app/tabs/clusters-tab/panels/hosts.js | 88 - .../tabs/clusters-tab/panels/hosts/panelId.js | 19 - public/app/tabs/clusters-tab/panels/info.js | 181 - .../tabs/clusters-tab/panels/info/html.hbs | 71 - .../tabs/clusters-tab/panels/info/panelId.js | 19 - public/app/tabs/clusters-tab/panels/vnets.js | 88 - .../tabs/clusters-tab/panels/vnets/panelId.js | 19 - public/app/tabs/clusters-tab/tabId.js | 19 - public/app/tabs/dashboard-tab.js | 336 - public/app/tabs/dashboard-tab/empty-graph.hbs | 20 - public/app/tabs/dashboard-tab/hosts.hbs | 51 - public/app/tabs/dashboard-tab/html.hbs | 46 - public/app/tabs/dashboard-tab/network.hbs | 33 - public/app/tabs/dashboard-tab/storage.hbs | 33 - public/app/tabs/dashboard-tab/tabId.js | 19 - public/app/tabs/dashboard-tab/users.hbs | 54 - public/app/tabs/dashboard-tab/vms.hbs | 59 - public/app/tabs/datastores-tab.js | 66 - public/app/tabs/datastores-tab/actions.js | 78 - public/app/tabs/datastores-tab/buttons.js | 76 - public/app/tabs/datastores-tab/datatable.js | 186 - .../tabs/datastores-tab/datatable/search.hbs | 46 - .../tabs/datastores-tab/form-panels/create.js | 546 -- .../form-panels/create/advanced.hbs | 38 - .../form-panels/create/formPanelId.js | 19 - .../form-panels/create/wizard.hbs | 279 - .../tabs/datastores-tab/form-panels/import.js | 126 - .../form-panels/import/formPanelId.js | 19 - .../form-panels/import/html.hbs | 45 - .../tabs/datastores-tab/panels/clusters.js | 87 - .../datastores-tab/panels/clusters/panelId.js | 19 - .../app/tabs/datastores-tab/panels/images.js | 97 - .../datastores-tab/panels/images/panelId.js | 19 - public/app/tabs/datastores-tab/panels/info.js | 138 - .../tabs/datastores-tab/panels/info/html.hbs | 66 - .../datastores-tab/panels/info/panelId.js | 19 - public/app/tabs/datastores-tab/tabId.js | 19 - .../utils/datastore-capacity-bar.js | 49 - public/app/tabs/files-tab.js | 62 - public/app/tabs/files-tab/actions.js | 51 - public/app/tabs/files-tab/buttons.js | 32 - public/app/tabs/files-tab/datatable.js | 86 - .../app/tabs/files-tab/form-panels/create.js | 49 - .../form-panels/create/formPanelId.js | 19 - public/app/tabs/files-tab/panels/info.js | 50 - .../app/tabs/files-tab/panels/info/panelId.js | 19 - public/app/tabs/files-tab/tabId.js | 19 - public/app/tabs/groups-tab.js | 69 - public/app/tabs/groups-tab/actions.js | 115 - public/app/tabs/groups-tab/buttons.js | 51 - public/app/tabs/groups-tab/datatable.js | 162 - public/app/tabs/groups-tab/dialogs/image.js | 84 - .../tabs/groups-tab/dialogs/image/dialogId.js | 19 - .../tabs/groups-tab/dialogs/image/html.hbs | 30 - public/app/tabs/groups-tab/dialogs/quotas.js | 94 - .../groups-tab/dialogs/quotas/dialogId.js | 19 - .../tabs/groups-tab/dialogs/quotas/html.hbs | 37 - .../app/tabs/groups-tab/form-panels/create.js | 429 - .../form-panels/create/formPanelId.js | 19 - .../groups-tab/form-panels/create/wizard.hbs | 258 - .../app/tabs/groups-tab/panels/accounting.js | 68 - .../groups-tab/panels/accounting/panelId.js | 19 - public/app/tabs/groups-tab/panels/info.js | 159 - .../app/tabs/groups-tab/panels/info/html.hbs | 82 - .../tabs/groups-tab/panels/info/panelId.js | 19 - public/app/tabs/groups-tab/panels/quotas.js | 75 - .../tabs/groups-tab/panels/quotas/panelId.js | 19 - public/app/tabs/groups-tab/panels/showback.js | 74 - .../groups-tab/panels/showback/panelId.js | 19 - public/app/tabs/groups-tab/panels/users.js | 168 - .../app/tabs/groups-tab/panels/users/html.hbs | 41 - .../tabs/groups-tab/panels/users/panelId.js | 19 - public/app/tabs/groups-tab/tabId.js | 19 - public/app/tabs/groups-tab/utils/views.js | 93 - public/app/tabs/hosts-tab.js | 73 - public/app/tabs/hosts-tab/actions.js | 105 - public/app/tabs/hosts-tab/buttons.js | 63 - public/app/tabs/hosts-tab/datatable.js | 297 - .../app/tabs/hosts-tab/datatable/search.hbs | 34 - .../tabs/hosts-tab/dialogs/create/dialogId.js | 19 - .../app/tabs/hosts-tab/form-panels/create.js | 291 - .../form-panels/create/formPanelId.js | 19 - .../hosts-tab/form-panels/create/wizard.hbs | 173 - public/app/tabs/hosts-tab/panels/esx.js | 105 - public/app/tabs/hosts-tab/panels/esx/html.hbs | 31 - .../app/tabs/hosts-tab/panels/esx/panelId.js | 19 - public/app/tabs/hosts-tab/panels/info.js | 248 - .../app/tabs/hosts-tab/panels/info/html.hbs | 156 - .../app/tabs/hosts-tab/panels/info/panelId.js | 19 - public/app/tabs/hosts-tab/panels/monitor.js | 110 - .../tabs/hosts-tab/panels/monitor/html.hbs | 52 - .../tabs/hosts-tab/panels/monitor/panelId.js | 19 - public/app/tabs/hosts-tab/panels/pci.js | 116 - public/app/tabs/hosts-tab/panels/pci/html.hbs | 40 - .../app/tabs/hosts-tab/panels/pci/panelId.js | 19 - public/app/tabs/hosts-tab/panels/vms.js | 88 - .../app/tabs/hosts-tab/panels/vms/panelId.js | 19 - public/app/tabs/hosts-tab/panels/wilds.js | 199 - .../app/tabs/hosts-tab/panels/wilds/html.hbs | 35 - .../tabs/hosts-tab/panels/wilds/panelId.js | 19 - public/app/tabs/hosts-tab/panels/zombies.js | 103 - .../tabs/hosts-tab/panels/zombies/html.hbs | 28 - .../tabs/hosts-tab/panels/zombies/panelId.js | 19 - public/app/tabs/hosts-tab/tabId.js | 19 - .../tabs/hosts-tab/utils/can-import-wilds.js | 49 - public/app/tabs/hosts-tab/utils/cpu-bars.js | 71 - .../utils/datastore-capacity-table/html.hbs | 32 - .../utils/datastores-capacity-table.js | 63 - .../app/tabs/hosts-tab/utils/memory-bars.js | 71 - public/app/tabs/hosts-tab/utils/reserved.js | 44 - public/app/tabs/images-tab.js | 66 - public/app/tabs/images-tab/actions.js | 140 - public/app/tabs/images-tab/buttons.js | 90 - .../app/tabs/images-tab/datatable-common.js | 135 - public/app/tabs/images-tab/datatable.js | 91 - .../app/tabs/images-tab/datatable/search.hbs | 54 - public/app/tabs/images-tab/dialogs/clone.js | 137 - .../tabs/images-tab/dialogs/clone/dialogId.js | 19 - .../tabs/images-tab/dialogs/clone/html.hbs | 51 - .../images-tab/form-panels/create-common.js | 526 -- .../app/tabs/images-tab/form-panels/create.js | 49 - .../form-panels/create/advanced.hbs | 34 - .../form-panels/create/formPanelId.js | 19 - .../images-tab/form-panels/create/wizard.hbs | 212 - .../app/tabs/images-tab/form-panels/import.js | 153 - .../form-panels/import/formPanelId.js | 19 - .../images-tab/form-panels/import/html.hbs | 51 - .../app/tabs/images-tab/panels/info-common.js | 165 - public/app/tabs/images-tab/panels/info.js | 50 - .../app/tabs/images-tab/panels/info/html.hbs | 90 - .../tabs/images-tab/panels/info/panelId.js | 19 - .../app/tabs/images-tab/panels/snapshots.js | 216 - .../tabs/images-tab/panels/snapshots/html.hbs | 42 - .../images-tab/panels/snapshots/panelId.js | 19 - public/app/tabs/images-tab/panels/vms.js | 88 - .../app/tabs/images-tab/panels/vms/panelId.js | 19 - public/app/tabs/images-tab/tabId.js | 19 - public/app/tabs/infrastructure-top-tab.js | 28 - public/app/tabs/instances-top-tab.js | 28 - public/app/tabs/marketplaceapps-tab.js | 70 - .../app/tabs/marketplaceapps-tab/actions.js | 175 - .../app/tabs/marketplaceapps-tab/buttons.js | 73 - .../app/tabs/marketplaceapps-tab/datatable.js | 186 - .../marketplaceapps-tab/datatable/search.hbs | 54 - .../marketplaceapps-tab/form-panels/create.js | 209 - .../form-panels/create/advanced.hbs | 32 - .../form-panels/create/formPanelId.js | 19 - .../form-panels/create/wizard.hbs | 73 - .../marketplaceapps-tab/form-panels/export.js | 153 - .../form-panels/export/formPanelId.js | 19 - .../form-panels/export/wizard.hbs | 43 - .../tabs/marketplaceapps-tab/hooks/init.js | 41 - .../tabs/marketplaceapps-tab/panels/info.js | 118 - .../marketplaceapps-tab/panels/info/html.hbs | 76 - .../panels/info/panelId.js | 19 - .../marketplaceapps-tab/panels/templates.js | 127 - .../panels/templates/html.hbs | 62 - .../panels/templates/panelId.js | 19 - public/app/tabs/marketplaceapps-tab/tabId.js | 19 - public/app/tabs/marketplaces-tab.js | 69 - public/app/tabs/marketplaces-tab/actions.js | 51 - public/app/tabs/marketplaces-tab/buttons.js | 60 - public/app/tabs/marketplaces-tab/datatable.js | 173 - .../marketplaces-tab/datatable/search.hbs | 34 - .../marketplaces-tab/form-panels/create.js | 277 - .../form-panels/create/advanced.hbs | 32 - .../form-panels/create/formPanelId.js | 19 - .../form-panels/create/wizard.hbs | 60 - .../app/tabs/marketplaces-tab/hooks/init.js | 39 - .../app/tabs/marketplaces-tab/panels/apps.js | 87 - .../marketplaces-tab/panels/apps/panelId.js | 19 - .../app/tabs/marketplaces-tab/panels/info.js | 90 - .../marketplaces-tab/panels/info/html.hbs | 49 - .../marketplaces-tab/panels/info/panelId.js | 19 - public/app/tabs/marketplaces-tab/tabId.js | 19 - public/app/tabs/network-top-tab.js | 29 - public/app/tabs/oneflow-services-tab.js | 70 - .../app/tabs/oneflow-services-tab/actions.js | 469 - .../app/tabs/oneflow-services-tab/buttons.js | 68 - .../tabs/oneflow-services-tab/datatable.js | 125 - .../oneflow-services-tab/datatable/search.hbs | 28 - .../oneflow-services-tab/dialogs/scale.js | 110 - .../dialogs/scale/dialogId.js | 19 - .../dialogs/scale/html.hbs | 48 - .../form-panels/create.js | 91 - .../form-panels/create/formPanelId.js | 19 - .../tabs/oneflow-services-tab/hooks/header.js | 51 - .../tabs/oneflow-services-tab/panels/info.js | 81 - .../oneflow-services-tab/panels/info/html.hbs | 59 - .../panels/info/panelId.js | 19 - .../tabs/oneflow-services-tab/panels/log.js | 81 - .../panels/log/panelId.js | 19 - .../tabs/oneflow-services-tab/panels/roles.js | 310 - .../panels/roles/html.hbs | 89 - .../panels/roles/panelId.js | 19 - .../panels/roles/roleInfo.hbs | 131 - .../panels/roles/roles-buttons.js | 94 - .../panels/roles/roles-vm-buttons.js | 40 - public/app/tabs/oneflow-services-tab/tabId.js | 19 - public/app/tabs/oneflow-templates-tab.js | 71 - .../app/tabs/oneflow-templates-tab/actions.js | 119 - .../app/tabs/oneflow-templates-tab/buttons.js | 71 - .../tabs/oneflow-templates-tab/datatable.js | 119 - .../datatable/search.hbs | 22 - .../oneflow-templates-tab/dialogs/clone.js | 115 - .../dialogs/clone/dialogId.js | 19 - .../dialogs/clone/html.hbs | 45 - .../form-panels/create.js | 464 - .../form-panels/create/advanced.hbs | 28 - .../form-panels/create/formPanelId.js | 19 - .../form-panels/create/wizard.hbs | 116 - .../form-panels/instantiate.js | 276 - .../form-panels/instantiate/formPanelId.js | 19 - .../form-panels/instantiate/html.hbs | 49 - .../tabs/oneflow-templates-tab/panels/info.js | 116 - .../panels/info/html.hbs | 78 - .../panels/info/panelId.js | 19 - .../oneflow-templates-tab/panels/roles.js | 48 - .../panels/roles/panelId.js | 19 - .../oneflow-templates-tab/panels/template.js | 72 - .../panels/template/html.hbs | 25 - .../panels/template/panelId.js | 19 - .../app/tabs/oneflow-templates-tab/tabId.js | 19 - .../oneflow-templates-tab/utils/role-tab.js | 306 - .../utils/role-tab/elasticity-row.hbs | 46 - .../utils/role-tab/elasticity-thead.hbs | 50 - .../utils/role-tab/html.hbs | 157 - .../utils/role-tab/sche-row.hbs | 43 - .../utils/role-tab/sched-thead.hbs | 47 - public/app/tabs/provision-tab.js | 1401 --- public/app/tabs/provision-tab/content.hbs | 30 - .../provision-tab/dashboard/empty-graphs.hbs | 20 - .../provision-tab/dashboard/empty-quota.hbs | 17 - .../provision-tab/dashboard/group-quotas.hbs | 63 - .../provision-tab/dashboard/group-vms.hbs | 116 - .../tabs/provision-tab/dashboard/quotas.hbs | 64 - .../provision-tab/dashboard/techwork.html.erb | 14 - .../app/tabs/provision-tab/dashboard/vms.hbs | 124 - .../app/tabs/provision-tab/flows/create.hbs | 92 - public/app/tabs/provision-tab/flows/info.hbs | 76 - public/app/tabs/provision-tab/flows/list.hbs | 62 - public/app/tabs/provision-tab/flows/list.js | 677 -- public/app/tabs/provision-tab/tabId.js | 19 - .../app/tabs/provision-tab/templates/list.hbs | 56 - .../app/tabs/provision-tab/templates/list.js | 428 - .../tabs/provision-tab/vms/confirm_backup.hbs | 56 - .../provision-tab/vms/confirm_poweroff.hbs | 47 - .../tabs/provision-tab/vms/confirm_reboot.hbs | 47 - .../vms/confirm_save_as_template.hbs | 60 - .../provision-tab/vms/confirm_terminate.hbs | 47 - .../provision-tab/vms/confirm_undeploy.hbs | 47 - public/app/tabs/provision-tab/vms/create.hbs | 153 - public/app/tabs/provision-tab/vms/info.hbs | 216 - public/app/tabs/provision-tab/vms/list.hbs | 72 - public/app/tabs/provision-tab/vms/list.js | 1305 --- public/app/tabs/secgroups-tab.js | 65 - public/app/tabs/secgroups-tab/actions.js | 104 - public/app/tabs/secgroups-tab/buttons.js | 70 - public/app/tabs/secgroups-tab/datatable.js | 132 - .../tabs/secgroups-tab/datatable/search.hbs | 22 - .../app/tabs/secgroups-tab/dialogs/clone.js | 116 - .../secgroups-tab/dialogs/clone/dialogId.js | 19 - .../tabs/secgroups-tab/dialogs/clone/html.hbs | 48 - .../tabs/secgroups-tab/form-panels/create.js | 364 - .../form-panels/create/advanced.hbs | 28 - .../form-panels/create/formPanelId.js | 19 - .../form-panels/create/wizard.hbs | 160 - public/app/tabs/secgroups-tab/panels/info.js | 111 - .../tabs/secgroups-tab/panels/info/html.hbs | 75 - .../tabs/secgroups-tab/panels/info/panelId.js | 19 - public/app/tabs/secgroups-tab/panels/vms.js | 129 - .../tabs/secgroups-tab/panels/vms/html.hbs | 38 - .../tabs/secgroups-tab/panels/vms/panelId.js | 19 - public/app/tabs/secgroups-tab/tabId.js | 19 - public/app/tabs/secgroups-tab/utils/common.js | 177 - public/app/tabs/settings-tab.js | 79 - .../tabs/settings-tab/panels/accounting.js | 46 - .../settings-tab/panels/accounting/panelId.js | 19 - public/app/tabs/settings-tab/panels/auth.js | 46 - .../tabs/settings-tab/panels/auth/panelId.js | 19 - public/app/tabs/settings-tab/panels/cloud.js | 717 -- .../tabs/settings-tab/panels/cloud/html.hbs | 104 - .../tabs/settings-tab/panels/cloud/panelId.js | 19 - .../tabs/settings-tab/panels/group-quotas.js | 131 - .../panels/group-quotas/panelId.js | 19 - public/app/tabs/settings-tab/panels/info.js | 46 - .../tabs/settings-tab/panels/info/panelId.js | 19 - public/app/tabs/settings-tab/panels/quotas.js | 46 - .../settings-tab/panels/quotas/panelId.js | 19 - .../app/tabs/settings-tab/panels/showback.js | 46 - .../settings-tab/panels/showback/panelId.js | 19 - .../tabs/settings-tab/panels/user-config.js | 155 - .../settings-tab/panels/user-config/html.hbs | 213 - .../panels/user-config/panelId.js | 19 - public/app/tabs/settings-tab/tabId.js | 19 - public/app/tabs/storage-top-tab.js | 29 - public/app/tabs/support-tab.js | 115 - public/app/tabs/support-tab/actions.js | 156 - public/app/tabs/support-tab/buttons.js | 47 - public/app/tabs/support-tab/datatable.js | 89 - public/app/tabs/support-tab/dialogs/upload.js | 164 - .../support-tab/dialogs/upload/dialogId.js | 19 - .../tabs/support-tab/dialogs/upload/html.hbs | 37 - .../tabs/support-tab/form-panels/create.js | 96 - .../form-panels/create/formPanelId.js | 19 - .../support-tab/form-panels/create/wizard.hbs | 47 - public/app/tabs/support-tab/panels/info.js | 110 - .../app/tabs/support-tab/panels/info/html.hbs | 74 - .../tabs/support-tab/panels/info/panelId.js | 19 - public/app/tabs/support-tab/subheader.hbs | 84 - public/app/tabs/support-tab/tabId.js | 19 - public/app/tabs/support-tab/title.hbs | 30 - public/app/tabs/support-tab/utils/common.js | 61 - public/app/tabs/system-top-tab.js | 28 - public/app/tabs/templates-tab.js | 68 - .../app/tabs/templates-tab/actions-common.js | 260 - public/app/tabs/templates-tab/actions.js | 38 - public/app/tabs/templates-tab/buttons.js | 89 - .../tabs/templates-tab/datatable-common.js | 156 - public/app/tabs/templates-tab/datatable.js | 78 - .../tabs/templates-tab/datatable/search.hbs | 36 - .../app/tabs/templates-tab/dialogs/clone.js | 136 - .../templates-tab/dialogs/clone/dialogId.js | 19 - .../tabs/templates-tab/dialogs/clone/html.hbs | 51 - .../tabs/templates-tab/dialogs/superlist.js | 161 - .../dialogs/superlist/dialogId.js | 19 - .../templates-tab/dialogs/superlist/html.hbs | 41 - .../form-panels/create-common.js | 278 - .../tabs/templates-tab/form-panels/create.js | 49 - .../form-panels/create/advanced.hbs | 28 - .../form-panels/create/formPanelId.js | 19 - .../form-panels/create/wizard-tabs/actions.js | 224 - .../create/wizard-tabs/actions/html.hbs | 15 - .../create/wizard-tabs/actions/wizardTabId.js | 19 - .../form-panels/create/wizard-tabs/context.js | 378 - .../create/wizard-tabs/context/html.hbs | 154 - .../create/wizard-tabs/context/wizardTabId.js | 19 - .../form-panels/create/wizard-tabs/general.js | 372 - .../wizard-tabs/general/capacity-create.js | 341 - .../general/capacity-create/html.hbs | 186 - .../wizard-tabs/general/capacity-inputs.js | 231 - .../general/capacity-inputs/html.hbs | 45 - .../create/wizard-tabs/general/html.hbs | 193 - .../create/wizard-tabs/general/wizardTabId.js | 19 - .../form-panels/create/wizard-tabs/hybrid.js | 274 - .../create/wizard-tabs/hybrid/azure.hbs | 112 - .../create/wizard-tabs/hybrid/ec2.hbs | 158 - .../create/wizard-tabs/hybrid/html.hbs | 29 - .../create/wizard-tabs/hybrid/opennebula.hbs | 8 - .../create/wizard-tabs/hybrid/wizardTabId.js | 19 - .../form-panels/create/wizard-tabs/io.js | 197 - .../create/wizard-tabs/io/html.hbs | 114 - .../create/wizard-tabs/io/wizardTabId.js | 19 - .../form-panels/create/wizard-tabs/network.js | 283 - .../create/wizard-tabs/network/html.hbs | 45 - .../create/wizard-tabs/network/nic-tab.js | 239 - .../wizard-tabs/network/nic-tab/html.hbs | 345 - .../create/wizard-tabs/network/wizardTabId.js | 19 - .../form-panels/create/wizard-tabs/os.js | 489 - .../create/wizard-tabs/os/html.hbs | 268 - .../create/wizard-tabs/os/wizardTabId.js | 19 - .../form-panels/create/wizard-tabs/other.js | 157 - .../create/wizard-tabs/other/html.hbs | 80 - .../create/wizard-tabs/other/wizardTabId.js | 19 - .../create/wizard-tabs/scheduling.js | 247 - .../create/wizard-tabs/scheduling/html.hbs | 131 - .../wizard-tabs/scheduling/wizardTabId.js | 19 - .../form-panels/create/wizard-tabs/storage.js | 210 - .../create/wizard-tabs/storage/disk-tab.js | 250 - .../wizard-tabs/storage/disk-tab/html.hbs | 112 - .../wizard-tabs/storage/disk-tab/options.hbs | 166 - .../create/wizard-tabs/storage/html.hbs | 29 - .../create/wizard-tabs/storage/wizardTabId.js | 19 - .../form-panels/create/wizard-tabs/utils.js | 118 - .../create/wizard-tabs/utils/pciRow.hbs | 33 - .../form-panels/create/wizard-tabs/vmgroup.js | 92 - .../create/wizard-tabs/vmgroup/wizardTabId.js | 19 - .../form-panels/create/wizard.hbs | 35 - .../tabs/templates-tab/form-panels/import.js | 126 - .../form-panels/import/formPanelId.js | 19 - .../templates-tab/form-panels/import/html.hbs | 45 - .../templates-tab/form-panels/instantiate.js | 1362 --- .../form-panels/instantiate/formPanelId.js | 19 - .../form-panels/instantiate/html.hbs | 48 - .../form-panels/instantiate/templateRow.hbs | 646 -- .../tabs/templates-tab/panels/info-common.js | 78 - public/app/tabs/templates-tab/panels/info.js | 48 - .../tabs/templates-tab/panels/info/html.hbs | 44 - .../tabs/templates-tab/panels/info/panelId.js | 19 - .../templates-tab/panels/template-common.js | 69 - .../app/tabs/templates-tab/panels/template.js | 48 - .../templates-tab/panels/template/html.hbs | 25 - .../templates-tab/panels/template/panelId.js | 19 - public/app/tabs/templates-tab/tabId.js | 19 - public/app/tabs/templates-top-tab.js | 28 - public/app/tabs/upgrade-top-tab.js | 70 - public/app/tabs/users-tab.js | 73 - public/app/tabs/users-tab/actions.js | 261 - public/app/tabs/users-tab/buttons.js | 48 - public/app/tabs/users-tab/datatable.js | 178 - .../app/tabs/users-tab/datatable/search.hbs | 28 - .../app/tabs/users-tab/dialogs/auth-driver.js | 103 - .../users-tab/dialogs/auth-driver/dialogId.js | 19 - .../users-tab/dialogs/auth-driver/html.hbs | 37 - public/app/tabs/users-tab/dialogs/groups.js | 133 - .../tabs/users-tab/dialogs/groups/dialogId.js | 19 - .../tabs/users-tab/dialogs/groups/html.hbs | 37 - .../app/tabs/users-tab/dialogs/login-token.js | 208 - .../users-tab/dialogs/login-token/dialogId.js | 19 - .../users-tab/dialogs/login-token/html.hbs | 86 - public/app/tabs/users-tab/dialogs/password.js | 119 - .../users-tab/dialogs/password/dialogId.js | 19 - .../tabs/users-tab/dialogs/password/html.hbs | 37 - public/app/tabs/users-tab/dialogs/quotas.js | 94 - .../tabs/users-tab/dialogs/quotas/dialogId.js | 19 - .../tabs/users-tab/dialogs/quotas/html.hbs | 37 - .../app/tabs/users-tab/form-panels/create.js | 106 - .../form-panels/create/formPanelId.js | 19 - .../users-tab/form-panels/create/wizard.hbs | 23 - .../users-tab/panels/accounting-common.js | 65 - .../app/tabs/users-tab/panels/accounting.js | 46 - .../users-tab/panels/accounting/panelId.js | 19 - .../app/tabs/users-tab/panels/auth-common.js | 193 - public/app/tabs/users-tab/panels/auth.js | 46 - .../app/tabs/users-tab/panels/auth/html.hbs | 91 - .../app/tabs/users-tab/panels/auth/panelId.js | 19 - public/app/tabs/users-tab/panels/groups.js | 170 - .../app/tabs/users-tab/panels/groups/html.hbs | 54 - .../tabs/users-tab/panels/groups/panelId.js | 19 - .../app/tabs/users-tab/panels/info-common.js | 178 - public/app/tabs/users-tab/panels/info.js | 46 - .../tabs/users-tab/panels/info/chgrp-tr.hbs | 25 - .../app/tabs/users-tab/panels/info/html.hbs | 71 - .../app/tabs/users-tab/panels/info/panelId.js | 19 - .../tabs/users-tab/panels/quotas-common.js | 72 - public/app/tabs/users-tab/panels/quotas.js | 46 - .../tabs/users-tab/panels/quotas/panelId.js | 19 - .../tabs/users-tab/panels/showback-common.js | 70 - public/app/tabs/users-tab/panels/showback.js | 46 - .../tabs/users-tab/panels/showback/panelId.js | 19 - public/app/tabs/users-tab/tabId.js | 19 - .../app/tabs/users-tab/utils/user-creation.js | 237 - .../users-tab/utils/user-creation/html.hbs | 68 - public/app/tabs/vdcs-tab.js | 65 - public/app/tabs/vdcs-tab/actions.js | 176 - public/app/tabs/vdcs-tab/buttons.js | 46 - public/app/tabs/vdcs-tab/datatable.js | 153 - .../app/tabs/vdcs-tab/form-panels/create.js | 373 - .../vdcs-tab/form-panels/create/advanced.hbs | 28 - .../form-panels/create/formPanelId.js | 19 - .../vdcs-tab/form-panels/create/wizard.hbs | 60 - public/app/tabs/vdcs-tab/panels/groups.js | 88 - .../tabs/vdcs-tab/panels/groups/panelId.js | 19 - public/app/tabs/vdcs-tab/panels/info.js | 76 - public/app/tabs/vdcs-tab/panels/info/html.hbs | 40 - .../app/tabs/vdcs-tab/panels/info/panelId.js | 19 - public/app/tabs/vdcs-tab/panels/resources.js | 81 - .../tabs/vdcs-tab/panels/resources/panelId.js | 19 - public/app/tabs/vdcs-tab/tabId.js | 19 - public/app/tabs/vdcs-tab/utils/common.js | 113 - .../app/tabs/vdcs-tab/utils/resources-tab.js | 145 - .../vdcs-tab/utils/resources-tab/html.hbs | 30 - .../app/tabs/vdcs-tab/utils/resources-zone.js | 242 - .../vdcs-tab/utils/resources-zone/html.hbs | 84 - public/app/tabs/vmgroup-tab.js | 56 - public/app/tabs/vmgroup-tab/actions.js | 53 - public/app/tabs/vmgroup-tab/buttons.js | 61 - public/app/tabs/vmgroup-tab/datatable.js | 149 - .../app/tabs/vmgroup-tab/datatable/search.hbs | 16 - .../tabs/vmgroup-tab/form-panels/create.js | 341 - .../form-panels/create/advanced.hbs | 28 - .../form-panels/create/formPanelId.js | 19 - .../vmgroup-tab/form-panels/create/wizard.hbs | 54 - public/app/tabs/vmgroup-tab/panels/info.js | 120 - .../app/tabs/vmgroup-tab/panels/info/html.hbs | 112 - .../tabs/vmgroup-tab/panels/info/panelId.js | 19 - public/app/tabs/vmgroup-tab/panels/vms.js | 138 - .../app/tabs/vmgroup-tab/panels/vms/html.hbs | 32 - .../tabs/vmgroup-tab/panels/vms/panelId.js | 19 - public/app/tabs/vmgroup-tab/tabId.js | 19 - .../vmgroup-tab/utils/affinity-role-tab.js | 213 - .../utils/affinity-role-tab/html.hbs | 34 - public/app/tabs/vmgroup-tab/utils/common.js | 87 - .../app/tabs/vmgroup-tab/utils/datatable.js | 165 - .../vmgroup-tab/utils/datatable/search.hbs | 16 - .../vmgroup-tab/utils/group-role-affinity.js | 101 - public/app/tabs/vmgroup-tab/utils/role-tab.js | 256 - .../tabs/vmgroup-tab/utils/role-tab/html.hbs | 77 - public/app/tabs/vms-tab.js | 93 - public/app/tabs/vms-tab/actions.js | 276 - public/app/tabs/vms-tab/buttons.js | 232 - public/app/tabs/vms-tab/datatable.js | 237 - public/app/tabs/vms-tab/datatable/search.hbs | 67 - .../app/tabs/vms-tab/dialogs/attach-disk.js | 103 - .../vms-tab/dialogs/attach-disk/dialogId.js | 19 - .../tabs/vms-tab/dialogs/attach-disk/html.hbs | 37 - public/app/tabs/vms-tab/dialogs/attach-nic.js | 103 - .../vms-tab/dialogs/attach-nic/dialogId.js | 19 - .../tabs/vms-tab/dialogs/attach-nic/html.hbs | 37 - public/app/tabs/vms-tab/dialogs/deploy.js | 116 - .../tabs/vms-tab/dialogs/deploy/dialogId.js | 19 - .../app/tabs/vms-tab/dialogs/deploy/html.hbs | 60 - .../app/tabs/vms-tab/dialogs/disk-resize.js | 156 - .../vms-tab/dialogs/disk-resize/dialogId.js | 19 - .../tabs/vms-tab/dialogs/disk-resize/html.hbs | 54 - .../app/tabs/vms-tab/dialogs/disk-saveas.js | 117 - .../vms-tab/dialogs/disk-saveas/dialogId.js | 19 - .../tabs/vms-tab/dialogs/disk-saveas/html.hbs | 50 - .../vms-tab/dialogs/disk-snapshot-rename.js | 108 - .../dialogs/disk-snapshot-rename/dialogId.js | 19 - .../dialogs/disk-snapshot-rename/html.hbs | 50 - .../app/tabs/vms-tab/dialogs/disk-snapshot.js | 102 - .../vms-tab/dialogs/disk-snapshot/dialogId.js | 19 - .../vms-tab/dialogs/disk-snapshot/html.hbs | 46 - public/app/tabs/vms-tab/dialogs/migrate.js | 152 - .../tabs/vms-tab/dialogs/migrate/dialogId.js | 19 - .../app/tabs/vms-tab/dialogs/migrate/html.hbs | 60 - .../app/tabs/vms-tab/dialogs/place-on-node.js | 124 - .../vms-tab/dialogs/place-on-node/dialogId.js | 19 - .../vms-tab/dialogs/place-on-node/html.hbs | 39 - public/app/tabs/vms-tab/dialogs/reinstall.js | 246 - .../vms-tab/dialogs/reinstall/dialogId.js | 19 - .../tabs/vms-tab/dialogs/reinstall/html.hbs | 66 - public/app/tabs/vms-tab/dialogs/resize.js | 109 - .../tabs/vms-tab/dialogs/resize/dialogId.js | 19 - .../app/tabs/vms-tab/dialogs/resize/html.hbs | 48 - .../vms-tab/dialogs/revert-zfs-snapshot.js | 106 - .../dialogs/revert-zfs-snapshot/dialogId.js | 19 - .../dialogs/revert-zfs-snapshot/html.hbs | 78 - public/app/tabs/vms-tab/dialogs/revert.js | 92 - .../tabs/vms-tab/dialogs/revert/dialogId.js | 19 - .../app/tabs/vms-tab/dialogs/revert/html.hbs | 40 - .../tabs/vms-tab/dialogs/saveas-template.js | 106 - .../dialogs/saveas-template/dialogId.js | 19 - .../vms-tab/dialogs/saveas-template/html.hbs | 46 - public/app/tabs/vms-tab/dialogs/snapshot.js | 94 - .../tabs/vms-tab/dialogs/snapshot/dialogId.js | 19 - .../tabs/vms-tab/dialogs/snapshot/html.hbs | 39 - public/app/tabs/vms-tab/dialogs/spice.js | 90 - .../tabs/vms-tab/dialogs/spice/dialogId.js | 19 - .../app/tabs/vms-tab/dialogs/spice/html.hbs | 37 - public/app/tabs/vms-tab/dialogs/vnc.js | 95 - .../app/tabs/vms-tab/dialogs/vnc/dialogId.js | 19 - public/app/tabs/vms-tab/dialogs/vnc/html.hbs | 39 - public/app/tabs/vms-tab/form-panels/create.js | 96 - .../vms-tab/form-panels/create/formPanelId.js | 19 - .../tabs/vms-tab/form-panels/updateconf.js | 171 - .../form-panels/updateconf/advanced.hbs | 28 - .../form-panels/updateconf/formPanelId.js | 19 - .../vms-tab/form-panels/updateconf/wizard.hbs | 35 - public/app/tabs/vms-tab/hooks/header.js | 57 - public/app/tabs/vms-tab/hooks/state.js | 69 - public/app/tabs/vms-tab/panels/actions.js | 238 - .../tabs/vms-tab/panels/actions/panelId.js | 19 - public/app/tabs/vms-tab/panels/capacity.js | 159 - .../app/tabs/vms-tab/panels/capacity/html.hbs | 96 - .../tabs/vms-tab/panels/capacity/panelId.js | 19 - public/app/tabs/vms-tab/panels/conf.js | 108 - public/app/tabs/vms-tab/panels/conf/html.hbs | 48 - .../app/tabs/vms-tab/panels/conf/panelId.js | 19 - public/app/tabs/vms-tab/panels/info.js | 177 - public/app/tabs/vms-tab/panels/info/html.hbs | 107 - .../app/tabs/vms-tab/panels/info/panelId.js | 19 - public/app/tabs/vms-tab/panels/log.js | 124 - public/app/tabs/vms-tab/panels/log/panelId.js | 19 - public/app/tabs/vms-tab/panels/network.js | 505 - .../tabs/vms-tab/panels/network/panelId.js | 19 - public/app/tabs/vms-tab/panels/placement.js | 208 - .../tabs/vms-tab/panels/placement/panelId.js | 19 - public/app/tabs/vms-tab/panels/reinstall.js | 121 - .../tabs/vms-tab/panels/reinstall/panelId.js | 19 - public/app/tabs/vms-tab/panels/snapshots.js | 186 - .../tabs/vms-tab/panels/snapshots/panelId.js | 19 - public/app/tabs/vms-tab/panels/storage.js | 775 -- .../vms-tab/panels/storage/disk-details.hbs | 42 - .../app/tabs/vms-tab/panels/storage/html.hbs | 59 - .../tabs/vms-tab/panels/storage/panelId.js | 19 - public/app/tabs/vms-tab/panels/template.js | 68 - .../app/tabs/vms-tab/panels/template/html.hbs | 32 - .../tabs/vms-tab/panels/template/panelId.js | 19 - public/app/tabs/vms-tab/tabId.js | 19 - .../tabs/vms-tab/utils/datatable-common.js | 158 - .../app/tabs/vms-tab/utils/state-actions.js | 207 - public/app/tabs/vnets-tab.js | 72 - public/app/tabs/vnets-tab/actions.js | 161 - public/app/tabs/vnets-tab/buttons.js | 89 - public/app/tabs/vnets-tab/datatable.js | 173 - .../app/tabs/vnets-tab/datatable/search.hbs | 34 - public/app/tabs/vnets-tab/dialogs/add-ar.js | 102 - .../tabs/vnets-tab/dialogs/add-ar/dialogId.js | 19 - .../tabs/vnets-tab/dialogs/add-ar/html.hbs | 42 - public/app/tabs/vnets-tab/dialogs/reserve.js | 150 - .../vnets-tab/dialogs/reserve/ar-datatable.js | 133 - .../vnets-tab/dialogs/reserve/dialogId.js | 19 - .../tabs/vnets-tab/dialogs/reserve/html.hbs | 87 - .../app/tabs/vnets-tab/dialogs/reserve_vdc.js | 152 - .../vnets-tab/dialogs/reserve_vdc/dialogId.js | 19 - .../vnets-tab/dialogs/reserve_vdc/html.hbs | 42 - .../app/tabs/vnets-tab/dialogs/update-ar.js | 107 - .../vnets-tab/dialogs/update-ar/dialogId.js | 19 - .../tabs/vnets-tab/dialogs/update-ar/html.hbs | 39 - .../app/tabs/vnets-tab/form-panels/create.js | 509 -- .../vnets-tab/form-panels/create/advanced.hbs | 28 - .../form-panels/create/formPanelId.js | 19 - .../vnets-tab/form-panels/create/wizard.hbs | 392 - .../app/tabs/vnets-tab/form-panels/import.js | 137 - .../form-panels/import/formPanelId.js | 19 - .../vnets-tab/form-panels/import/html.hbs | 29 - .../tabs/vnets-tab/form-panels/instantiate.js | 90 - .../form-panels/instantiate/formPanelId.js | 19 - public/app/tabs/vnets-tab/panels/ar.js | 482 - .../app/tabs/vnets-tab/panels/ar/arInfo.hbs | 113 - public/app/tabs/vnets-tab/panels/ar/html.hbs | 81 - .../app/tabs/vnets-tab/panels/ar/panelId.js | 19 - public/app/tabs/vnets-tab/panels/clusters.js | 88 - .../tabs/vnets-tab/panels/clusters/panelId.js | 19 - public/app/tabs/vnets-tab/panels/info.js | 172 - .../app/tabs/vnets-tab/panels/info/html.hbs | 108 - .../app/tabs/vnets-tab/panels/info/panelId.js | 19 - public/app/tabs/vnets-tab/panels/leases.js | 167 - .../app/tabs/vnets-tab/panels/leases/html.hbs | 64 - .../tabs/vnets-tab/panels/leases/panelId.js | 19 - public/app/tabs/vnets-tab/panels/secgroups.js | 86 - .../vnets-tab/panels/secgroups/panelId.js | 19 - public/app/tabs/vnets-tab/panels/vrouters.js | 88 - .../tabs/vnets-tab/panels/vrouters/panelId.js | 19 - public/app/tabs/vnets-tab/tabId.js | 19 - public/app/tabs/vnets-tab/utils/ar-tab.js | 236 - .../app/tabs/vnets-tab/utils/ar-tab/html.hbs | 94 - public/app/tabs/vnets-tab/utils/common.js | 41 - public/app/tabs/vnets-templates-tab.js | 71 - .../app/tabs/vnets-templates-tab/actions.js | 156 - .../app/tabs/vnets-templates-tab/buttons.js | 97 - .../app/tabs/vnets-templates-tab/datatable.js | 148 - .../vnets-templates-tab/datatable/search.hbs | 22 - .../vnets-templates-tab/dialogs/add-ar.js | 118 - .../dialogs/add-ar/dialogId.js | 19 - .../dialogs/instantiate-add-ar.js | 162 - .../dialogs/instantiate-add-ar/dialogId.js | 19 - .../dialogs/instantiate-update-ar.js | 153 - .../dialogs/instantiate-update-ar/dialogId.js | 19 - .../vnets-templates-tab/dialogs/update-ar.js | 118 - .../dialogs/update-ar/dialogId.js | 19 - .../vnets-templates-tab/form-panels/create.js | 525 -- .../form-panels/create/formPanelId.js | 19 - .../form-panels/instantiate.js | 488 - .../form-panels/instantiate/formPanelId.js | 19 - .../form-panels/instantiate/html.hbs | 41 - .../form-panels/instantiate/templateRow.hbs | 110 - .../app/tabs/vnets-templates-tab/panels/ar.js | 416 - .../vnets-templates-tab/panels/ar/panelId.js | 19 - .../vnets-templates-tab/panels/clusters.js | 88 - .../panels/clusters/panelId.js | 19 - .../tabs/vnets-templates-tab/panels/info.js | 171 - .../panels/info/panelId.js | 19 - .../vnets-templates-tab/panels/secgroups.js | 86 - .../panels/secgroups/panelId.js | 19 - .../panels/template/html.hbs | 25 - .../panels/template/panelId.js | 19 - .../vnets-templates-tab/panels/templates.js | 66 - public/app/tabs/vnets-templates-tab/tabId.js | 19 - public/app/tabs/vnets-topology-tab.js | 644 -- public/app/tabs/vnets-topology-tab/html.hbs | 18 - public/app/tabs/vnets-topology-tab/tabId.js | 19 - public/app/tabs/vrouter-templates-tab.js | 65 - .../app/tabs/vrouter-templates-tab/actions.js | 67 - .../app/tabs/vrouter-templates-tab/buttons.js | 42 - .../tabs/vrouter-templates-tab/datatable.js | 73 - .../form-panels/create.js | 49 - .../form-panels/create/formPanelId.js | 19 - .../form-panels/instantiate.js | 205 - .../form-panels/instantiate/formPanelId.js | 19 - .../instantiate/templateSelection.hbs | 49 - .../form-panels/instantiate/wizard.hbs | 59 - .../tabs/vrouter-templates-tab/panels/info.js | 48 - .../panels/info/panelId.js | 19 - .../vrouter-templates-tab/panels/template.js | 48 - .../panels/template/panelId.js | 19 - .../app/tabs/vrouter-templates-tab/tabId.js | 19 - public/app/tabs/vrouters-tab.js | 66 - public/app/tabs/vrouters-tab/actions.js | 80 - public/app/tabs/vrouters-tab/buttons.js | 60 - public/app/tabs/vrouters-tab/datatable.js | 132 - .../tabs/vrouters-tab/datatable/search.hbs | 22 - .../tabs/vrouters-tab/dialogs/attach-nic.js | 106 - .../dialogs/attach-nic/dialogId.js | 19 - .../vrouters-tab/dialogs/attach-nic/html.hbs | 43 - .../tabs/vrouters-tab/form-panels/create.js | 121 - .../form-panels/create/advanced.hbs | 28 - .../form-panels/create/formPanelId.js | 19 - .../vrouters-tab/form-panels/instantiate.js | 186 - .../form-panels/instantiate/formPanelId.js | 19 - .../form-panels/instantiate/html.hbs | 19 - public/app/tabs/vrouters-tab/panels/info.js | 187 - .../tabs/vrouters-tab/panels/info/html.hbs | 85 - .../tabs/vrouters-tab/panels/info/panelId.js | 19 - public/app/tabs/vrouters-tab/panels/vms.js | 88 - .../tabs/vrouters-tab/panels/vms/panelId.js | 19 - public/app/tabs/vrouters-tab/tabId.js | 19 - public/app/tabs/zones-tab.js | 59 - public/app/tabs/zones-tab/actions.js | 69 - public/app/tabs/zones-tab/buttons.js | 41 - public/app/tabs/zones-tab/datatable.js | 118 - public/app/tabs/zones-tab/dialogs/create.js | 75 - .../tabs/zones-tab/dialogs/create/dialogId.js | 19 - .../tabs/zones-tab/dialogs/create/html.hbs | 43 - public/app/tabs/zones-tab/panels/info.js | 80 - .../app/tabs/zones-tab/panels/info/html.hbs | 40 - .../app/tabs/zones-tab/panels/info/panelId.js | 19 - public/app/tabs/zones-tab/tabId.js | 19 - .../helpers/advancedImportationSection.js | 44 - .../app/templates/helpers/advancedSection.js | 44 - public/app/templates/helpers/htmlDecode.js | 34 - public/app/templates/helpers/humanizeSize.js | 50 - public/app/templates/helpers/humanizeTime.js | 35 - .../templates/helpers/isAdvancedEnabled.js | 32 - .../app/templates/helpers/isFeatureEnabled.js | 32 - .../helpers/isProvisionTabEnabled.js | 32 - .../templates/helpers/isTabActionEnabled.js | 32 - .../templates/helpers/isTabPanelEnabled.js | 32 - public/app/templates/helpers/navigate.js | 28 - public/app/templates/helpers/tip.js | 28 - public/app/templates/helpers/tr.js | 27 - public/app/templates/helpers/valOrDefault.js | 35 - public/app/utils/accounting.js | 777 -- public/app/utils/accounting/empty-graph.hbs | 20 - public/app/utils/accounting/html.hbs | 154 - public/app/utils/actions.js | 73 - public/app/utils/browser-info.js | 39 - public/app/utils/common-actions.js | 296 - public/app/utils/custom-tags-table.js | 144 - public/app/utils/custom-tags-table/html.hbs | 40 - public/app/utils/custom-tags-table/row.hbs | 42 - .../vector-attribute-row.hbs | 13 - .../utils/custom-tags-table/vector-row.hbs | 38 - public/app/utils/dashboard.js | 71 - public/app/utils/dialogs/clusters.js | 154 - public/app/utils/dialogs/clusters/dialogId.js | 19 - public/app/utils/dialogs/clusters/html.hbs | 37 - .../app/utils/dialogs/confirm-with-select.js | 217 - .../dialogs/confirm-with-select/dialogId.js | 19 - .../dialogs/confirm-with-select/html.hbs | 42 - public/app/utils/dialogs/confirm.js | 98 - public/app/utils/dialogs/confirm/dialogId.js | 19 - public/app/utils/dialogs/confirm/html.hbs | 36 - public/app/utils/dialogs/dialog.js | 118 - public/app/utils/dialogs/generic-confirm.js | 152 - .../utils/dialogs/generic-confirm/dialogId.js | 19 - .../utils/dialogs/generic-confirm/html.hbs | 37 - public/app/utils/dialogs/overcommit.js | 112 - .../app/utils/dialogs/overcommit/dialogId.js | 19 - public/app/utils/dialogs/overcommit/html.hbs | 73 - public/app/utils/disks-resize.js | 236 - public/app/utils/disks-resize/html.hbs | 27 - public/app/utils/dom-datatable.js | 58 - public/app/utils/form-panels/form-panel.js | 164 - public/app/utils/graphs.js | 143 - public/app/utils/hooks/header.js | 36 - public/app/utils/humanize.js | 290 - public/app/utils/labels/tree.js | 202 - public/app/utils/labels/utils.js | 553 -- public/app/utils/locale.js | 64 - public/app/utils/menu.js | 105 - public/app/utils/menu/provision-top-row.hbs | 54 - public/app/utils/menu/top-row.hbs | 39 - public/app/utils/navigation.js | 44 - public/app/utils/nics-section.js | 348 - public/app/utils/nics-section/dd.hbs | 95 - public/app/utils/nics-section/html.hbs | 12 - public/app/utils/notifier.js | 134 - public/app/utils/panel/cluster-tr.js | 72 - public/app/utils/panel/cluster-tr/html.hbs | 25 - public/app/utils/panel/ec2-tr.js | 95 - public/app/utils/panel/ec2-tr/html.hbs | 27 - public/app/utils/panel/permissions-table.js | 237 - .../utils/panel/permissions-table/group.hbs | 27 - .../utils/panel/permissions-table/html.hbs | 26 - .../utils/panel/permissions-table/owner.hbs | 27 - .../panel/permissions-table/permissions.hbs | 60 - public/app/utils/panel/rename-tr.js | 77 - public/app/utils/panel/rename-tr/html.hbs | 27 - public/app/utils/panel/template-table.js | 518 -- public/app/utils/progress-bar.js | 39 - public/app/utils/quotas/quota-defaults.js | 161 - public/app/utils/quotas/quota-limits.js | 26 - public/app/utils/quotas/quota-widgets.js | 1367 --- public/app/utils/range-slider.js | 75 - public/app/utils/range-slider/html.hbs | 38 - public/app/utils/resource-select.js | 129 - public/app/utils/schedule_action.js | 448 - public/app/utils/schedule_action/html.hbs | 123 - public/app/utils/schedule_action/table.hbs | 38 - public/app/utils/showback.js | 801 -- public/app/utils/showback/html.hbs | 150 - public/app/utils/showback/showbackList.js | 92 - public/app/utils/spice.js | 104 - public/app/utils/status.js | 109 - public/app/utils/tab-datatable.js | 1285 --- .../app/utils/tab-datatable/empty-table.hbs | 26 - .../app/utils/tab-datatable/search-input.hbs | 48 - public/app/utils/tab-datatable/table.hbs | 50 - public/app/utils/template-utils.js | 174 - public/app/utils/tips.js | 53 - public/app/utils/tree.js | 70 - public/app/utils/unique-id.js | 34 - public/app/utils/user-inputs.js | 775 -- public/app/utils/user-inputs/row.hbs | 96 - public/app/utils/user-inputs/table.hbs | 21 - public/app/utils/vcenter-vm-folder.js | 74 - public/app/utils/vcenter-vm-folder/html.hbs | 29 - public/app/utils/vcenter/clusters.js | 285 - public/app/utils/vcenter/clusters/row.hbs | 29 - .../utils/vcenter/common/empty-fieldset.hbs | 30 - .../utils/vcenter/common/fieldset-table.hbs | 67 - public/app/utils/vcenter/common/html.hbs | 22 - public/app/utils/vcenter/datastores.js | 221 - public/app/utils/vcenter/datastores/row.hbs | 31 - public/app/utils/vcenter/images.js | 196 - public/app/utils/vcenter/images/row.hbs | 30 - public/app/utils/vcenter/networks.js | 314 - public/app/utils/vcenter/networks/row.hbs | 76 - public/app/utils/vcenter/templates.js | 604 -- public/app/utils/vcenter/templates/row.hbs | 98 - public/app/utils/vcenter/vcenter-common.js | 137 - public/app/utils/vmgroup-section.js | 167 - public/app/utils/vmgroup-section/html.hbs | 18 - public/app/utils/vnc.js | 122 - public/app/utils/wizard-fields.js | 113 - public/bower.json | 39 - public/build.sh | 94 - public/config.rb | 26 - public/css/app.css | 101 - public/css/app.min.css | 1 - public/css/custom.css | 151 - public/css/login.css | 220 - public/css/novnc-custom.css | 483 - public/css/opensans/LICENSE | 202 - public/css/opensans/METADATA.json | 112 - public/css/opensans/opensans.woff | Bin 15936 -> 0 bytes public/css/spice-custom.css | 52 - public/images/advanced_layout.png | Bin 97585 -> 0 bytes public/images/ajax-loader.gif | Bin 1737 -> 0 bytes .../images/apple-touch-icon-precomposed.png | Bin 9836 -> 0 bytes public/images/cloud_layout.png | Bin 179120 -> 0 bytes public/images/favicon.ico | Bin 399 -> 0 bytes public/images/favicon.png | Bin 10267 -> 0 bytes public/images/foundation/orbit/bullets.jpg | Bin 657 -> 0 bytes .../foundation/orbit/left-arrow-small.png | Bin 3163 -> 0 bytes public/images/foundation/orbit/left-arrow.png | Bin 522 -> 0 bytes public/images/foundation/orbit/loading.gif | Bin 2608 -> 0 bytes public/images/foundation/orbit/mask-black.png | Bin 526 -> 0 bytes .../images/foundation/orbit/pause-black.png | Bin 288 -> 0 bytes .../foundation/orbit/right-arrow-small.png | Bin 3169 -> 0 bytes .../images/foundation/orbit/right-arrow.png | Bin 3242 -> 0 bytes .../images/foundation/orbit/rotator-black.png | Bin 536 -> 0 bytes .../images/foundation/orbit/timer-black.png | Bin 526 -> 0 bytes public/images/login.png | Bin 4097 -> 0 bytes public/images/login_over.png | Bin 4351 -> 0 bytes public/images/logos/alpine.png | Bin 2740 -> 0 bytes public/images/logos/alt.png | Bin 21816 -> 0 bytes public/images/logos/arch.png | Bin 11783 -> 0 bytes public/images/logos/centos.png | Bin 15169 -> 0 bytes public/images/logos/clearos.png | Bin 10392 -> 0 bytes public/images/logos/debian.png | Bin 14578 -> 0 bytes public/images/logos/devuan.png | Bin 1858 -> 0 bytes public/images/logos/fedora.png | Bin 12055 -> 0 bytes public/images/logos/freebsd.png | Bin 6723 -> 0 bytes public/images/logos/hardenedbsd.png | Bin 11079 -> 0 bytes public/images/logos/knoppix-logo.png | Bin 9908 -> 0 bytes public/images/logos/linux.png | Bin 11642 -> 0 bytes public/images/logos/oel.png | Bin 9443 -> 0 bytes public/images/logos/redhat.png | Bin 17211 -> 0 bytes public/images/logos/suse.png | Bin 2651 -> 0 bytes public/images/logos/ubuntu.png | Bin 16542 -> 0 bytes public/images/logos/windows8.png | Bin 10919 -> 0 bytes public/images/logos/windowsxp.png | Bin 17561 -> 0 bytes public/images/one_small_logo.png | Bin 18369 -> 0 bytes public/images/opennebula-5.0.png | Bin 9156 -> 0 bytes .../images/opennebula-sunstone-v4.0-small.png | Bin 12101 -> 0 bytes public/images/opennebula-sunstone-v4.0.png | Bin 17254 -> 0 bytes .../opennebula-sunstone-v4.14-small.png | Bin 10046 -> 0 bytes public/images/panel.png | Bin 5227 -> 0 bytes public/images/panel_short.png | Bin 1825 -> 0 bytes public/images/pbar.gif | Bin 2892 -> 0 bytes public/images/vcenter_layout.png | Bin 246475 -> 0 bytes public/locale/generate_messages_pot.sh | 35 - public/locale/languages/SConstruct | 46 - public/locale/languages/bg.po | 4388 --------- public/locale/languages/bg_BG.po | 3668 -------- public/locale/languages/ca.js | 739 -- public/locale/languages/ca.po | 3681 -------- public/locale/languages/ca_datatable.txt | 17 - public/locale/languages/cs.po | 3668 -------- public/locale/languages/cs_CZ.js | 1541 ---- public/locale/languages/cs_CZ.po | 6073 ------------ public/locale/languages/cs_datatable.txt | 23 - public/locale/languages/da.js | 1541 ---- public/locale/languages/da.po | 5392 ----------- public/locale/languages/da_datatable.txt | 17 - public/locale/languages/de.js | 1541 ---- public/locale/languages/de.po | 4588 ---------- public/locale/languages/de_CH.po | 3668 -------- public/locale/languages/de_datatable.txt | 17 - public/locale/languages/el_GR.js | 739 -- public/locale/languages/el_GR.po | 3671 -------- public/locale/languages/el_datatable.txt | 17 - public/locale/languages/en.po | 3695 -------- public/locale/languages/en_US.js | 806 -- public/locale/languages/en_US.po | 3668 -------- public/locale/languages/en_datatable.txt | 17 - public/locale/languages/es_ES.js | 1541 ---- public/locale/languages/es_ES.po | 6087 ------------- public/locale/languages/es_datatable.txt | 17 - public/locale/languages/et_EE.po | 7778 ---------------- public/locale/languages/fa.po | 7776 ---------------- public/locale/languages/fa_IR.js | 1541 ---- public/locale/languages/fa_IR.po | 4957 ---------- public/locale/languages/fa_datatable.txt | 17 - public/locale/languages/fr_CA.po | 3668 -------- public/locale/languages/fr_FR.js | 1541 ---- public/locale/languages/fr_FR.po | 6095 ------------- public/locale/languages/fr_datatable.txt | 17 - public/locale/languages/gl.po | 3674 -------- public/locale/languages/hu_HU.po | 3673 -------- public/locale/languages/id.po | 3670 -------- public/locale/languages/it_IT.js | 1541 ---- public/locale/languages/it_IT.po | 5236 ----------- public/locale/languages/it_datatable.txt | 17 - public/locale/languages/ja.js | 1541 ---- public/locale/languages/ja.po | 4581 ---------- public/locale/languages/ja_datatable.txt | 17 - public/locale/languages/ka.po | 3675 -------- public/locale/languages/lt_LT.js | 1541 ---- public/locale/languages/lt_LT.po | 4543 --------- public/locale/languages/lt_datatable.txt | 22 - public/locale/languages/nl_NL.js | 1541 ---- public/locale/languages/nl_NL.po | 5194 ----------- public/locale/languages/nl_datatable.txt | 19 - public/locale/languages/pl.js | 1541 ---- public/locale/languages/pl.po | 4285 --------- public/locale/languages/pl_datatable.txt | 17 - public/locale/languages/pt_BR.js | 1541 ---- public/locale/languages/pt_BR.po | 5886 ------------ public/locale/languages/pt_PT.js | 1541 ---- public/locale/languages/pt_PT.po | 4928 ---------- public/locale/languages/pt_datatable.txt | 17 - public/locale/languages/ro_RO.po | 4560 --------- public/locale/languages/ru.po | 3670 -------- public/locale/languages/ru_RU.js | 1623 ---- public/locale/languages/ru_RU.po | 5268 ----------- public/locale/languages/ru_datatable.txt | 17 - public/locale/languages/si.po | 7777 ---------------- public/locale/languages/sk_SK.js | 1541 ---- public/locale/languages/sk_SK.po | 6070 ------------ public/locale/languages/sk_datatable.txt | 17 - public/locale/languages/sr_RS.po | 3669 -------- public/locale/languages/sv.po | 3668 -------- public/locale/languages/th.po | 7776 ---------------- public/locale/languages/th_TH.po | 7844 ---------------- public/locale/languages/tr.po | 3669 -------- public/locale/languages/tr_TR.js | 1585 ---- public/locale/languages/tr_TR.po | 4098 --------- public/locale/languages/tr_datatable.txt | 17 - public/locale/languages/uk.po | 3668 -------- public/locale/languages/uk_UA.po | 8115 ----------------- public/locale/languages/vi.po | 3669 -------- public/locale/languages/vi_VN.po | 3669 -------- public/locale/languages/zh_CN.js | 1541 ---- public/locale/languages/zh_CN.po | 6055 ------------ public/locale/languages/zh_TW.po | 4436 --------- public/locale/languages/zh_datatable.txt | 17 - public/locale/messages.pot | 3493 ------- public/locale/upgrade_po_translations.sh | 24 - public/package.json | 12 - public/patches/bug4304-novnc.patch | 16 - public/scss/_advanced-section.scss | 39 - public/scss/_boxes.scss | 54 - public/scss/_fieldset.scss | 47 - public/scss/_flot.scss | 10 - public/scss/_helper-classes.scss | 20 - public/scss/_jgrowl.scss | 25 - public/scss/_labels.scss | 57 - public/scss/_layout.scss | 130 - public/scss/_menu.scss | 101 - public/scss/_provision.scss | 139 - public/scss/_range-slider.scss | 77 - public/scss/_settings.scss | 594 -- public/scss/_table.scss | 92 - public/scss/_tabs.scss | 84 - public/scss/_tooltips.scss | 7 - public/scss/_tree.scss | 52 - public/scss/_vcenter.scss | 14 - public/scss/_visjs.scss | 10 - public/scss/app.scss | 236 - 1102 files changed, 350694 deletions(-) delete mode 100644 public/.bowerrc delete mode 100644 public/.eslintrc.json delete mode 100644 public/.jscsrc delete mode 100644 public/Gruntfile.js delete mode 100644 public/README.md delete mode 100644 public/SConstruct delete mode 100644 public/app/addons/end.js delete mode 100644 public/app/addons/start.js delete mode 100644 public/app/app.js delete mode 100644 public/app/console/spice.js delete mode 100644 public/app/console/vnc.js delete mode 100644 public/app/login.js delete mode 100644 public/app/main.js delete mode 100644 public/app/opennebula.js delete mode 100644 public/app/opennebula/acl.js delete mode 100644 public/app/opennebula/action.js delete mode 100644 public/app/opennebula/ansible-process.js delete mode 100644 public/app/opennebula/ansible.js delete mode 100644 public/app/opennebula/auth.js delete mode 100644 public/app/opennebula/cluster.js delete mode 100644 public/app/opennebula/datastore.js delete mode 100644 public/app/opennebula/error.js delete mode 100644 public/app/opennebula/group.js delete mode 100644 public/app/opennebula/helper.js delete mode 100644 public/app/opennebula/host.js delete mode 100644 public/app/opennebula/image.js delete mode 100644 public/app/opennebula/marketplace.js delete mode 100644 public/app/opennebula/marketplaceapp.js delete mode 100644 public/app/opennebula/network.js delete mode 100644 public/app/opennebula/role.js delete mode 100644 public/app/opennebula/securitygroup.js delete mode 100644 public/app/opennebula/service.js delete mode 100644 public/app/opennebula/servicetemplate.js delete mode 100644 public/app/opennebula/settings.js delete mode 100644 public/app/opennebula/support.js delete mode 100644 public/app/opennebula/template.js delete mode 100644 public/app/opennebula/user.js delete mode 100644 public/app/opennebula/vdc.js delete mode 100644 public/app/opennebula/virtualrouter.js delete mode 100644 public/app/opennebula/vm.js delete mode 100644 public/app/opennebula/vmgroup.js delete mode 100644 public/app/opennebula/vntemplate.js delete mode 100644 public/app/opennebula/zone.js delete mode 100644 public/app/sunstone-config.js delete mode 100644 public/app/sunstone.js delete mode 100644 public/app/sunstone/buttons.hbs delete mode 100644 public/app/sunstone/panels.hbs delete mode 100644 public/app/sunstone/tab.hbs delete mode 100644 public/app/sunstone/user_and_zone.hbs delete mode 100644 public/app/tabs/acls-tab.js delete mode 100644 public/app/tabs/acls-tab/actions.js delete mode 100644 public/app/tabs/acls-tab/buttons.js delete mode 100644 public/app/tabs/acls-tab/datatable.js delete mode 100644 public/app/tabs/acls-tab/form-panels/create.js delete mode 100644 public/app/tabs/acls-tab/form-panels/create/formPanelId.js delete mode 100644 public/app/tabs/acls-tab/form-panels/create/wizard.hbs delete mode 100644 public/app/tabs/acls-tab/tabId.js delete mode 100644 public/app/tabs/ansible-process-tab.js delete mode 100644 public/app/tabs/ansible-process-tab/actions.js delete mode 100644 public/app/tabs/ansible-process-tab/buttons.js delete mode 100644 public/app/tabs/ansible-process-tab/datatable.js delete mode 100644 public/app/tabs/ansible-process-tab/datatable/search.hbs delete mode 100644 public/app/tabs/ansible-process-tab/dialogs/clone.js delete mode 100644 public/app/tabs/ansible-process-tab/dialogs/clone/dialogId.js delete mode 100644 public/app/tabs/ansible-process-tab/dialogs/clone/html.hbs delete mode 100644 public/app/tabs/ansible-process-tab/form-panels/create.js delete mode 100644 public/app/tabs/ansible-process-tab/form-panels/create/formPanelId.js delete mode 100644 public/app/tabs/ansible-process-tab/form-panels/create/wizard.hbs delete mode 100644 public/app/tabs/ansible-process-tab/panels/info.js delete mode 100644 public/app/tabs/ansible-process-tab/panels/info/html.hbs delete mode 100644 public/app/tabs/ansible-process-tab/panels/info/panelId.js delete mode 100644 public/app/tabs/ansible-process-tab/panels/log.js delete mode 100644 public/app/tabs/ansible-process-tab/panels/log/html.hbs delete mode 100644 public/app/tabs/ansible-process-tab/panels/log/panelId.js delete mode 100644 public/app/tabs/ansible-process-tab/panels/runnable.js delete mode 100644 public/app/tabs/ansible-process-tab/panels/runnable/html.hbs delete mode 100644 public/app/tabs/ansible-process-tab/panels/runnable/panelId.js delete mode 100644 public/app/tabs/ansible-process-tab/tabId.js delete mode 100644 public/app/tabs/ansible-tab.js delete mode 100644 public/app/tabs/ansible-tab/actions.js delete mode 100644 public/app/tabs/ansible-tab/buttons.js delete mode 100644 public/app/tabs/ansible-tab/datatable.js delete mode 100644 public/app/tabs/ansible-tab/datatable/search.hbs delete mode 100644 public/app/tabs/ansible-tab/dialogs/clone.js delete mode 100644 public/app/tabs/ansible-tab/dialogs/clone/dialogId.js delete mode 100644 public/app/tabs/ansible-tab/dialogs/clone/html.hbs delete mode 100644 public/app/tabs/ansible-tab/form-panels/create.js delete mode 100644 public/app/tabs/ansible-tab/form-panels/create/formPanelId.js delete mode 100644 public/app/tabs/ansible-tab/form-panels/create/wizard.hbs delete mode 100644 public/app/tabs/ansible-tab/panels/body.js delete mode 100644 public/app/tabs/ansible-tab/panels/body/html.hbs delete mode 100644 public/app/tabs/ansible-tab/panels/body/panelId.js delete mode 100644 public/app/tabs/ansible-tab/panels/info-common.js delete mode 100644 public/app/tabs/ansible-tab/panels/info.js delete mode 100644 public/app/tabs/ansible-tab/panels/info/html.hbs delete mode 100644 public/app/tabs/ansible-tab/panels/info/panelId.js delete mode 100644 public/app/tabs/ansible-tab/panels/permissions-table.js delete mode 100644 public/app/tabs/ansible-tab/tabId.js delete mode 100644 public/app/tabs/automatization-top-tab.js delete mode 100644 public/app/tabs/clusters-tab.js delete mode 100644 public/app/tabs/clusters-tab/actions.js delete mode 100644 public/app/tabs/clusters-tab/buttons.js delete mode 100644 public/app/tabs/clusters-tab/datatable.js delete mode 100644 public/app/tabs/clusters-tab/form-panels/create.js delete mode 100644 public/app/tabs/clusters-tab/form-panels/create/formPanelId.js delete mode 100644 public/app/tabs/clusters-tab/form-panels/create/wizard.hbs delete mode 100644 public/app/tabs/clusters-tab/panels/datastores.js delete mode 100644 public/app/tabs/clusters-tab/panels/datastores/panelId.js delete mode 100644 public/app/tabs/clusters-tab/panels/hosts.js delete mode 100644 public/app/tabs/clusters-tab/panels/hosts/panelId.js delete mode 100644 public/app/tabs/clusters-tab/panels/info.js delete mode 100644 public/app/tabs/clusters-tab/panels/info/html.hbs delete mode 100644 public/app/tabs/clusters-tab/panels/info/panelId.js delete mode 100644 public/app/tabs/clusters-tab/panels/vnets.js delete mode 100644 public/app/tabs/clusters-tab/panels/vnets/panelId.js delete mode 100644 public/app/tabs/clusters-tab/tabId.js delete mode 100644 public/app/tabs/dashboard-tab.js delete mode 100644 public/app/tabs/dashboard-tab/empty-graph.hbs delete mode 100644 public/app/tabs/dashboard-tab/hosts.hbs delete mode 100644 public/app/tabs/dashboard-tab/html.hbs delete mode 100644 public/app/tabs/dashboard-tab/network.hbs delete mode 100644 public/app/tabs/dashboard-tab/storage.hbs delete mode 100644 public/app/tabs/dashboard-tab/tabId.js delete mode 100644 public/app/tabs/dashboard-tab/users.hbs delete mode 100644 public/app/tabs/dashboard-tab/vms.hbs delete mode 100644 public/app/tabs/datastores-tab.js delete mode 100644 public/app/tabs/datastores-tab/actions.js delete mode 100644 public/app/tabs/datastores-tab/buttons.js delete mode 100644 public/app/tabs/datastores-tab/datatable.js delete mode 100644 public/app/tabs/datastores-tab/datatable/search.hbs delete mode 100644 public/app/tabs/datastores-tab/form-panels/create.js delete mode 100644 public/app/tabs/datastores-tab/form-panels/create/advanced.hbs delete mode 100644 public/app/tabs/datastores-tab/form-panels/create/formPanelId.js delete mode 100644 public/app/tabs/datastores-tab/form-panels/create/wizard.hbs delete mode 100644 public/app/tabs/datastores-tab/form-panels/import.js delete mode 100644 public/app/tabs/datastores-tab/form-panels/import/formPanelId.js delete mode 100644 public/app/tabs/datastores-tab/form-panels/import/html.hbs delete mode 100644 public/app/tabs/datastores-tab/panels/clusters.js delete mode 100644 public/app/tabs/datastores-tab/panels/clusters/panelId.js delete mode 100644 public/app/tabs/datastores-tab/panels/images.js delete mode 100644 public/app/tabs/datastores-tab/panels/images/panelId.js delete mode 100644 public/app/tabs/datastores-tab/panels/info.js delete mode 100644 public/app/tabs/datastores-tab/panels/info/html.hbs delete mode 100644 public/app/tabs/datastores-tab/panels/info/panelId.js delete mode 100644 public/app/tabs/datastores-tab/tabId.js delete mode 100644 public/app/tabs/datastores-tab/utils/datastore-capacity-bar.js delete mode 100644 public/app/tabs/files-tab.js delete mode 100644 public/app/tabs/files-tab/actions.js delete mode 100644 public/app/tabs/files-tab/buttons.js delete mode 100644 public/app/tabs/files-tab/datatable.js delete mode 100644 public/app/tabs/files-tab/form-panels/create.js delete mode 100644 public/app/tabs/files-tab/form-panels/create/formPanelId.js delete mode 100644 public/app/tabs/files-tab/panels/info.js delete mode 100644 public/app/tabs/files-tab/panels/info/panelId.js delete mode 100644 public/app/tabs/files-tab/tabId.js delete mode 100644 public/app/tabs/groups-tab.js delete mode 100644 public/app/tabs/groups-tab/actions.js delete mode 100644 public/app/tabs/groups-tab/buttons.js delete mode 100644 public/app/tabs/groups-tab/datatable.js delete mode 100644 public/app/tabs/groups-tab/dialogs/image.js delete mode 100644 public/app/tabs/groups-tab/dialogs/image/dialogId.js delete mode 100644 public/app/tabs/groups-tab/dialogs/image/html.hbs delete mode 100644 public/app/tabs/groups-tab/dialogs/quotas.js delete mode 100644 public/app/tabs/groups-tab/dialogs/quotas/dialogId.js delete mode 100644 public/app/tabs/groups-tab/dialogs/quotas/html.hbs delete mode 100644 public/app/tabs/groups-tab/form-panels/create.js delete mode 100644 public/app/tabs/groups-tab/form-panels/create/formPanelId.js delete mode 100644 public/app/tabs/groups-tab/form-panels/create/wizard.hbs delete mode 100644 public/app/tabs/groups-tab/panels/accounting.js delete mode 100644 public/app/tabs/groups-tab/panels/accounting/panelId.js delete mode 100644 public/app/tabs/groups-tab/panels/info.js delete mode 100644 public/app/tabs/groups-tab/panels/info/html.hbs delete mode 100644 public/app/tabs/groups-tab/panels/info/panelId.js delete mode 100644 public/app/tabs/groups-tab/panels/quotas.js delete mode 100644 public/app/tabs/groups-tab/panels/quotas/panelId.js delete mode 100644 public/app/tabs/groups-tab/panels/showback.js delete mode 100644 public/app/tabs/groups-tab/panels/showback/panelId.js delete mode 100644 public/app/tabs/groups-tab/panels/users.js delete mode 100644 public/app/tabs/groups-tab/panels/users/html.hbs delete mode 100644 public/app/tabs/groups-tab/panels/users/panelId.js delete mode 100644 public/app/tabs/groups-tab/tabId.js delete mode 100644 public/app/tabs/groups-tab/utils/views.js delete mode 100644 public/app/tabs/hosts-tab.js delete mode 100644 public/app/tabs/hosts-tab/actions.js delete mode 100644 public/app/tabs/hosts-tab/buttons.js delete mode 100644 public/app/tabs/hosts-tab/datatable.js delete mode 100644 public/app/tabs/hosts-tab/datatable/search.hbs delete mode 100644 public/app/tabs/hosts-tab/dialogs/create/dialogId.js delete mode 100644 public/app/tabs/hosts-tab/form-panels/create.js delete mode 100644 public/app/tabs/hosts-tab/form-panels/create/formPanelId.js delete mode 100644 public/app/tabs/hosts-tab/form-panels/create/wizard.hbs delete mode 100644 public/app/tabs/hosts-tab/panels/esx.js delete mode 100644 public/app/tabs/hosts-tab/panels/esx/html.hbs delete mode 100644 public/app/tabs/hosts-tab/panels/esx/panelId.js delete mode 100644 public/app/tabs/hosts-tab/panels/info.js delete mode 100644 public/app/tabs/hosts-tab/panels/info/html.hbs delete mode 100644 public/app/tabs/hosts-tab/panels/info/panelId.js delete mode 100644 public/app/tabs/hosts-tab/panels/monitor.js delete mode 100644 public/app/tabs/hosts-tab/panels/monitor/html.hbs delete mode 100644 public/app/tabs/hosts-tab/panels/monitor/panelId.js delete mode 100644 public/app/tabs/hosts-tab/panels/pci.js delete mode 100644 public/app/tabs/hosts-tab/panels/pci/html.hbs delete mode 100644 public/app/tabs/hosts-tab/panels/pci/panelId.js delete mode 100644 public/app/tabs/hosts-tab/panels/vms.js delete mode 100644 public/app/tabs/hosts-tab/panels/vms/panelId.js delete mode 100644 public/app/tabs/hosts-tab/panels/wilds.js delete mode 100644 public/app/tabs/hosts-tab/panels/wilds/html.hbs delete mode 100644 public/app/tabs/hosts-tab/panels/wilds/panelId.js delete mode 100644 public/app/tabs/hosts-tab/panels/zombies.js delete mode 100644 public/app/tabs/hosts-tab/panels/zombies/html.hbs delete mode 100644 public/app/tabs/hosts-tab/panels/zombies/panelId.js delete mode 100644 public/app/tabs/hosts-tab/tabId.js delete mode 100644 public/app/tabs/hosts-tab/utils/can-import-wilds.js delete mode 100644 public/app/tabs/hosts-tab/utils/cpu-bars.js delete mode 100644 public/app/tabs/hosts-tab/utils/datastore-capacity-table/html.hbs delete mode 100644 public/app/tabs/hosts-tab/utils/datastores-capacity-table.js delete mode 100644 public/app/tabs/hosts-tab/utils/memory-bars.js delete mode 100644 public/app/tabs/hosts-tab/utils/reserved.js delete mode 100644 public/app/tabs/images-tab.js delete mode 100644 public/app/tabs/images-tab/actions.js delete mode 100644 public/app/tabs/images-tab/buttons.js delete mode 100644 public/app/tabs/images-tab/datatable-common.js delete mode 100644 public/app/tabs/images-tab/datatable.js delete mode 100644 public/app/tabs/images-tab/datatable/search.hbs delete mode 100644 public/app/tabs/images-tab/dialogs/clone.js delete mode 100644 public/app/tabs/images-tab/dialogs/clone/dialogId.js delete mode 100644 public/app/tabs/images-tab/dialogs/clone/html.hbs delete mode 100644 public/app/tabs/images-tab/form-panels/create-common.js delete mode 100644 public/app/tabs/images-tab/form-panels/create.js delete mode 100644 public/app/tabs/images-tab/form-panels/create/advanced.hbs delete mode 100644 public/app/tabs/images-tab/form-panels/create/formPanelId.js delete mode 100644 public/app/tabs/images-tab/form-panels/create/wizard.hbs delete mode 100644 public/app/tabs/images-tab/form-panels/import.js delete mode 100644 public/app/tabs/images-tab/form-panels/import/formPanelId.js delete mode 100644 public/app/tabs/images-tab/form-panels/import/html.hbs delete mode 100644 public/app/tabs/images-tab/panels/info-common.js delete mode 100644 public/app/tabs/images-tab/panels/info.js delete mode 100644 public/app/tabs/images-tab/panels/info/html.hbs delete mode 100644 public/app/tabs/images-tab/panels/info/panelId.js delete mode 100644 public/app/tabs/images-tab/panels/snapshots.js delete mode 100644 public/app/tabs/images-tab/panels/snapshots/html.hbs delete mode 100644 public/app/tabs/images-tab/panels/snapshots/panelId.js delete mode 100644 public/app/tabs/images-tab/panels/vms.js delete mode 100644 public/app/tabs/images-tab/panels/vms/panelId.js delete mode 100644 public/app/tabs/images-tab/tabId.js delete mode 100644 public/app/tabs/infrastructure-top-tab.js delete mode 100644 public/app/tabs/instances-top-tab.js delete mode 100644 public/app/tabs/marketplaceapps-tab.js delete mode 100644 public/app/tabs/marketplaceapps-tab/actions.js delete mode 100644 public/app/tabs/marketplaceapps-tab/buttons.js delete mode 100644 public/app/tabs/marketplaceapps-tab/datatable.js delete mode 100644 public/app/tabs/marketplaceapps-tab/datatable/search.hbs delete mode 100644 public/app/tabs/marketplaceapps-tab/form-panels/create.js delete mode 100644 public/app/tabs/marketplaceapps-tab/form-panels/create/advanced.hbs delete mode 100644 public/app/tabs/marketplaceapps-tab/form-panels/create/formPanelId.js delete mode 100644 public/app/tabs/marketplaceapps-tab/form-panels/create/wizard.hbs delete mode 100644 public/app/tabs/marketplaceapps-tab/form-panels/export.js delete mode 100644 public/app/tabs/marketplaceapps-tab/form-panels/export/formPanelId.js delete mode 100644 public/app/tabs/marketplaceapps-tab/form-panels/export/wizard.hbs delete mode 100644 public/app/tabs/marketplaceapps-tab/hooks/init.js delete mode 100644 public/app/tabs/marketplaceapps-tab/panels/info.js delete mode 100644 public/app/tabs/marketplaceapps-tab/panels/info/html.hbs delete mode 100644 public/app/tabs/marketplaceapps-tab/panels/info/panelId.js delete mode 100644 public/app/tabs/marketplaceapps-tab/panels/templates.js delete mode 100644 public/app/tabs/marketplaceapps-tab/panels/templates/html.hbs delete mode 100644 public/app/tabs/marketplaceapps-tab/panels/templates/panelId.js delete mode 100644 public/app/tabs/marketplaceapps-tab/tabId.js delete mode 100644 public/app/tabs/marketplaces-tab.js delete mode 100644 public/app/tabs/marketplaces-tab/actions.js delete mode 100644 public/app/tabs/marketplaces-tab/buttons.js delete mode 100644 public/app/tabs/marketplaces-tab/datatable.js delete mode 100644 public/app/tabs/marketplaces-tab/datatable/search.hbs delete mode 100644 public/app/tabs/marketplaces-tab/form-panels/create.js delete mode 100644 public/app/tabs/marketplaces-tab/form-panels/create/advanced.hbs delete mode 100644 public/app/tabs/marketplaces-tab/form-panels/create/formPanelId.js delete mode 100644 public/app/tabs/marketplaces-tab/form-panels/create/wizard.hbs delete mode 100644 public/app/tabs/marketplaces-tab/hooks/init.js delete mode 100644 public/app/tabs/marketplaces-tab/panels/apps.js delete mode 100644 public/app/tabs/marketplaces-tab/panels/apps/panelId.js delete mode 100644 public/app/tabs/marketplaces-tab/panels/info.js delete mode 100644 public/app/tabs/marketplaces-tab/panels/info/html.hbs delete mode 100644 public/app/tabs/marketplaces-tab/panels/info/panelId.js delete mode 100644 public/app/tabs/marketplaces-tab/tabId.js delete mode 100644 public/app/tabs/network-top-tab.js delete mode 100644 public/app/tabs/oneflow-services-tab.js delete mode 100644 public/app/tabs/oneflow-services-tab/actions.js delete mode 100644 public/app/tabs/oneflow-services-tab/buttons.js delete mode 100644 public/app/tabs/oneflow-services-tab/datatable.js delete mode 100644 public/app/tabs/oneflow-services-tab/datatable/search.hbs delete mode 100644 public/app/tabs/oneflow-services-tab/dialogs/scale.js delete mode 100644 public/app/tabs/oneflow-services-tab/dialogs/scale/dialogId.js delete mode 100644 public/app/tabs/oneflow-services-tab/dialogs/scale/html.hbs delete mode 100644 public/app/tabs/oneflow-services-tab/form-panels/create.js delete mode 100644 public/app/tabs/oneflow-services-tab/form-panels/create/formPanelId.js delete mode 100644 public/app/tabs/oneflow-services-tab/hooks/header.js delete mode 100644 public/app/tabs/oneflow-services-tab/panels/info.js delete mode 100644 public/app/tabs/oneflow-services-tab/panels/info/html.hbs delete mode 100644 public/app/tabs/oneflow-services-tab/panels/info/panelId.js delete mode 100644 public/app/tabs/oneflow-services-tab/panels/log.js delete mode 100644 public/app/tabs/oneflow-services-tab/panels/log/panelId.js delete mode 100644 public/app/tabs/oneflow-services-tab/panels/roles.js delete mode 100644 public/app/tabs/oneflow-services-tab/panels/roles/html.hbs delete mode 100644 public/app/tabs/oneflow-services-tab/panels/roles/panelId.js delete mode 100644 public/app/tabs/oneflow-services-tab/panels/roles/roleInfo.hbs delete mode 100644 public/app/tabs/oneflow-services-tab/panels/roles/roles-buttons.js delete mode 100644 public/app/tabs/oneflow-services-tab/panels/roles/roles-vm-buttons.js delete mode 100644 public/app/tabs/oneflow-services-tab/tabId.js delete mode 100644 public/app/tabs/oneflow-templates-tab.js delete mode 100644 public/app/tabs/oneflow-templates-tab/actions.js delete mode 100644 public/app/tabs/oneflow-templates-tab/buttons.js delete mode 100644 public/app/tabs/oneflow-templates-tab/datatable.js delete mode 100644 public/app/tabs/oneflow-templates-tab/datatable/search.hbs delete mode 100644 public/app/tabs/oneflow-templates-tab/dialogs/clone.js delete mode 100644 public/app/tabs/oneflow-templates-tab/dialogs/clone/dialogId.js delete mode 100644 public/app/tabs/oneflow-templates-tab/dialogs/clone/html.hbs delete mode 100644 public/app/tabs/oneflow-templates-tab/form-panels/create.js delete mode 100644 public/app/tabs/oneflow-templates-tab/form-panels/create/advanced.hbs delete mode 100644 public/app/tabs/oneflow-templates-tab/form-panels/create/formPanelId.js delete mode 100644 public/app/tabs/oneflow-templates-tab/form-panels/create/wizard.hbs delete mode 100644 public/app/tabs/oneflow-templates-tab/form-panels/instantiate.js delete mode 100644 public/app/tabs/oneflow-templates-tab/form-panels/instantiate/formPanelId.js delete mode 100644 public/app/tabs/oneflow-templates-tab/form-panels/instantiate/html.hbs delete mode 100644 public/app/tabs/oneflow-templates-tab/panels/info.js delete mode 100644 public/app/tabs/oneflow-templates-tab/panels/info/html.hbs delete mode 100644 public/app/tabs/oneflow-templates-tab/panels/info/panelId.js delete mode 100644 public/app/tabs/oneflow-templates-tab/panels/roles.js delete mode 100644 public/app/tabs/oneflow-templates-tab/panels/roles/panelId.js delete mode 100644 public/app/tabs/oneflow-templates-tab/panels/template.js delete mode 100644 public/app/tabs/oneflow-templates-tab/panels/template/html.hbs delete mode 100644 public/app/tabs/oneflow-templates-tab/panels/template/panelId.js delete mode 100644 public/app/tabs/oneflow-templates-tab/tabId.js delete mode 100644 public/app/tabs/oneflow-templates-tab/utils/role-tab.js delete mode 100644 public/app/tabs/oneflow-templates-tab/utils/role-tab/elasticity-row.hbs delete mode 100644 public/app/tabs/oneflow-templates-tab/utils/role-tab/elasticity-thead.hbs delete mode 100644 public/app/tabs/oneflow-templates-tab/utils/role-tab/html.hbs delete mode 100644 public/app/tabs/oneflow-templates-tab/utils/role-tab/sche-row.hbs delete mode 100644 public/app/tabs/oneflow-templates-tab/utils/role-tab/sched-thead.hbs delete mode 100644 public/app/tabs/provision-tab.js delete mode 100644 public/app/tabs/provision-tab/content.hbs delete mode 100644 public/app/tabs/provision-tab/dashboard/empty-graphs.hbs delete mode 100644 public/app/tabs/provision-tab/dashboard/empty-quota.hbs delete mode 100644 public/app/tabs/provision-tab/dashboard/group-quotas.hbs delete mode 100644 public/app/tabs/provision-tab/dashboard/group-vms.hbs delete mode 100644 public/app/tabs/provision-tab/dashboard/quotas.hbs delete mode 100644 public/app/tabs/provision-tab/dashboard/techwork.html.erb delete mode 100644 public/app/tabs/provision-tab/dashboard/vms.hbs delete mode 100644 public/app/tabs/provision-tab/flows/create.hbs delete mode 100644 public/app/tabs/provision-tab/flows/info.hbs delete mode 100644 public/app/tabs/provision-tab/flows/list.hbs delete mode 100644 public/app/tabs/provision-tab/flows/list.js delete mode 100644 public/app/tabs/provision-tab/tabId.js delete mode 100644 public/app/tabs/provision-tab/templates/list.hbs delete mode 100644 public/app/tabs/provision-tab/templates/list.js delete mode 100644 public/app/tabs/provision-tab/vms/confirm_backup.hbs delete mode 100644 public/app/tabs/provision-tab/vms/confirm_poweroff.hbs delete mode 100644 public/app/tabs/provision-tab/vms/confirm_reboot.hbs delete mode 100644 public/app/tabs/provision-tab/vms/confirm_save_as_template.hbs delete mode 100644 public/app/tabs/provision-tab/vms/confirm_terminate.hbs delete mode 100644 public/app/tabs/provision-tab/vms/confirm_undeploy.hbs delete mode 100644 public/app/tabs/provision-tab/vms/create.hbs delete mode 100644 public/app/tabs/provision-tab/vms/info.hbs delete mode 100644 public/app/tabs/provision-tab/vms/list.hbs delete mode 100644 public/app/tabs/provision-tab/vms/list.js delete mode 100644 public/app/tabs/secgroups-tab.js delete mode 100644 public/app/tabs/secgroups-tab/actions.js delete mode 100644 public/app/tabs/secgroups-tab/buttons.js delete mode 100644 public/app/tabs/secgroups-tab/datatable.js delete mode 100644 public/app/tabs/secgroups-tab/datatable/search.hbs delete mode 100644 public/app/tabs/secgroups-tab/dialogs/clone.js delete mode 100644 public/app/tabs/secgroups-tab/dialogs/clone/dialogId.js delete mode 100644 public/app/tabs/secgroups-tab/dialogs/clone/html.hbs delete mode 100644 public/app/tabs/secgroups-tab/form-panels/create.js delete mode 100644 public/app/tabs/secgroups-tab/form-panels/create/advanced.hbs delete mode 100644 public/app/tabs/secgroups-tab/form-panels/create/formPanelId.js delete mode 100644 public/app/tabs/secgroups-tab/form-panels/create/wizard.hbs delete mode 100644 public/app/tabs/secgroups-tab/panels/info.js delete mode 100644 public/app/tabs/secgroups-tab/panels/info/html.hbs delete mode 100644 public/app/tabs/secgroups-tab/panels/info/panelId.js delete mode 100644 public/app/tabs/secgroups-tab/panels/vms.js delete mode 100644 public/app/tabs/secgroups-tab/panels/vms/html.hbs delete mode 100644 public/app/tabs/secgroups-tab/panels/vms/panelId.js delete mode 100644 public/app/tabs/secgroups-tab/tabId.js delete mode 100644 public/app/tabs/secgroups-tab/utils/common.js delete mode 100644 public/app/tabs/settings-tab.js delete mode 100644 public/app/tabs/settings-tab/panels/accounting.js delete mode 100644 public/app/tabs/settings-tab/panels/accounting/panelId.js delete mode 100644 public/app/tabs/settings-tab/panels/auth.js delete mode 100644 public/app/tabs/settings-tab/panels/auth/panelId.js delete mode 100644 public/app/tabs/settings-tab/panels/cloud.js delete mode 100644 public/app/tabs/settings-tab/panels/cloud/html.hbs delete mode 100644 public/app/tabs/settings-tab/panels/cloud/panelId.js delete mode 100644 public/app/tabs/settings-tab/panels/group-quotas.js delete mode 100644 public/app/tabs/settings-tab/panels/group-quotas/panelId.js delete mode 100644 public/app/tabs/settings-tab/panels/info.js delete mode 100644 public/app/tabs/settings-tab/panels/info/panelId.js delete mode 100644 public/app/tabs/settings-tab/panels/quotas.js delete mode 100644 public/app/tabs/settings-tab/panels/quotas/panelId.js delete mode 100644 public/app/tabs/settings-tab/panels/showback.js delete mode 100644 public/app/tabs/settings-tab/panels/showback/panelId.js delete mode 100644 public/app/tabs/settings-tab/panels/user-config.js delete mode 100644 public/app/tabs/settings-tab/panels/user-config/html.hbs delete mode 100644 public/app/tabs/settings-tab/panels/user-config/panelId.js delete mode 100644 public/app/tabs/settings-tab/tabId.js delete mode 100644 public/app/tabs/storage-top-tab.js delete mode 100644 public/app/tabs/support-tab.js delete mode 100644 public/app/tabs/support-tab/actions.js delete mode 100644 public/app/tabs/support-tab/buttons.js delete mode 100644 public/app/tabs/support-tab/datatable.js delete mode 100644 public/app/tabs/support-tab/dialogs/upload.js delete mode 100644 public/app/tabs/support-tab/dialogs/upload/dialogId.js delete mode 100644 public/app/tabs/support-tab/dialogs/upload/html.hbs delete mode 100644 public/app/tabs/support-tab/form-panels/create.js delete mode 100644 public/app/tabs/support-tab/form-panels/create/formPanelId.js delete mode 100644 public/app/tabs/support-tab/form-panels/create/wizard.hbs delete mode 100644 public/app/tabs/support-tab/panels/info.js delete mode 100644 public/app/tabs/support-tab/panels/info/html.hbs delete mode 100644 public/app/tabs/support-tab/panels/info/panelId.js delete mode 100644 public/app/tabs/support-tab/subheader.hbs delete mode 100644 public/app/tabs/support-tab/tabId.js delete mode 100644 public/app/tabs/support-tab/title.hbs delete mode 100644 public/app/tabs/support-tab/utils/common.js delete mode 100644 public/app/tabs/system-top-tab.js delete mode 100644 public/app/tabs/templates-tab.js delete mode 100644 public/app/tabs/templates-tab/actions-common.js delete mode 100644 public/app/tabs/templates-tab/actions.js delete mode 100644 public/app/tabs/templates-tab/buttons.js delete mode 100644 public/app/tabs/templates-tab/datatable-common.js delete mode 100644 public/app/tabs/templates-tab/datatable.js delete mode 100644 public/app/tabs/templates-tab/datatable/search.hbs delete mode 100644 public/app/tabs/templates-tab/dialogs/clone.js delete mode 100644 public/app/tabs/templates-tab/dialogs/clone/dialogId.js delete mode 100644 public/app/tabs/templates-tab/dialogs/clone/html.hbs delete mode 100644 public/app/tabs/templates-tab/dialogs/superlist.js delete mode 100644 public/app/tabs/templates-tab/dialogs/superlist/dialogId.js delete mode 100644 public/app/tabs/templates-tab/dialogs/superlist/html.hbs delete mode 100644 public/app/tabs/templates-tab/form-panels/create-common.js delete mode 100644 public/app/tabs/templates-tab/form-panels/create.js delete mode 100644 public/app/tabs/templates-tab/form-panels/create/advanced.hbs delete mode 100644 public/app/tabs/templates-tab/form-panels/create/formPanelId.js delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/actions.js delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/actions/html.hbs delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/actions/wizardTabId.js delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/context.js delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/context/html.hbs delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/context/wizardTabId.js delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/general.js delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/general/capacity-create.js delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/general/capacity-create/html.hbs delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/general/capacity-inputs.js delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/general/capacity-inputs/html.hbs delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/general/html.hbs delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/general/wizardTabId.js delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/hybrid.js delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/hybrid/azure.hbs delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/hybrid/ec2.hbs delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/hybrid/html.hbs delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/hybrid/opennebula.hbs delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/hybrid/wizardTabId.js delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/io.js delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/io/html.hbs delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/io/wizardTabId.js delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/network.js delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/network/html.hbs delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/network/nic-tab.js delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/network/nic-tab/html.hbs delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/network/wizardTabId.js delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/os.js delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/os/html.hbs delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/os/wizardTabId.js delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/other.js delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/other/html.hbs delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/other/wizardTabId.js delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/scheduling.js delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/scheduling/html.hbs delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/scheduling/wizardTabId.js delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/storage.js delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/storage/disk-tab.js delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/storage/disk-tab/html.hbs delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/storage/disk-tab/options.hbs delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/storage/html.hbs delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/storage/wizardTabId.js delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/utils.js delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/utils/pciRow.hbs delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/vmgroup.js delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard-tabs/vmgroup/wizardTabId.js delete mode 100644 public/app/tabs/templates-tab/form-panels/create/wizard.hbs delete mode 100644 public/app/tabs/templates-tab/form-panels/import.js delete mode 100644 public/app/tabs/templates-tab/form-panels/import/formPanelId.js delete mode 100644 public/app/tabs/templates-tab/form-panels/import/html.hbs delete mode 100644 public/app/tabs/templates-tab/form-panels/instantiate.js delete mode 100644 public/app/tabs/templates-tab/form-panels/instantiate/formPanelId.js delete mode 100644 public/app/tabs/templates-tab/form-panels/instantiate/html.hbs delete mode 100644 public/app/tabs/templates-tab/form-panels/instantiate/templateRow.hbs delete mode 100644 public/app/tabs/templates-tab/panels/info-common.js delete mode 100644 public/app/tabs/templates-tab/panels/info.js delete mode 100644 public/app/tabs/templates-tab/panels/info/html.hbs delete mode 100644 public/app/tabs/templates-tab/panels/info/panelId.js delete mode 100644 public/app/tabs/templates-tab/panels/template-common.js delete mode 100644 public/app/tabs/templates-tab/panels/template.js delete mode 100644 public/app/tabs/templates-tab/panels/template/html.hbs delete mode 100644 public/app/tabs/templates-tab/panels/template/panelId.js delete mode 100644 public/app/tabs/templates-tab/tabId.js delete mode 100644 public/app/tabs/templates-top-tab.js delete mode 100644 public/app/tabs/upgrade-top-tab.js delete mode 100644 public/app/tabs/users-tab.js delete mode 100644 public/app/tabs/users-tab/actions.js delete mode 100644 public/app/tabs/users-tab/buttons.js delete mode 100644 public/app/tabs/users-tab/datatable.js delete mode 100644 public/app/tabs/users-tab/datatable/search.hbs delete mode 100644 public/app/tabs/users-tab/dialogs/auth-driver.js delete mode 100644 public/app/tabs/users-tab/dialogs/auth-driver/dialogId.js delete mode 100644 public/app/tabs/users-tab/dialogs/auth-driver/html.hbs delete mode 100644 public/app/tabs/users-tab/dialogs/groups.js delete mode 100644 public/app/tabs/users-tab/dialogs/groups/dialogId.js delete mode 100644 public/app/tabs/users-tab/dialogs/groups/html.hbs delete mode 100644 public/app/tabs/users-tab/dialogs/login-token.js delete mode 100644 public/app/tabs/users-tab/dialogs/login-token/dialogId.js delete mode 100644 public/app/tabs/users-tab/dialogs/login-token/html.hbs delete mode 100644 public/app/tabs/users-tab/dialogs/password.js delete mode 100644 public/app/tabs/users-tab/dialogs/password/dialogId.js delete mode 100644 public/app/tabs/users-tab/dialogs/password/html.hbs delete mode 100644 public/app/tabs/users-tab/dialogs/quotas.js delete mode 100644 public/app/tabs/users-tab/dialogs/quotas/dialogId.js delete mode 100644 public/app/tabs/users-tab/dialogs/quotas/html.hbs delete mode 100644 public/app/tabs/users-tab/form-panels/create.js delete mode 100644 public/app/tabs/users-tab/form-panels/create/formPanelId.js delete mode 100644 public/app/tabs/users-tab/form-panels/create/wizard.hbs delete mode 100644 public/app/tabs/users-tab/panels/accounting-common.js delete mode 100644 public/app/tabs/users-tab/panels/accounting.js delete mode 100644 public/app/tabs/users-tab/panels/accounting/panelId.js delete mode 100644 public/app/tabs/users-tab/panels/auth-common.js delete mode 100644 public/app/tabs/users-tab/panels/auth.js delete mode 100644 public/app/tabs/users-tab/panels/auth/html.hbs delete mode 100644 public/app/tabs/users-tab/panels/auth/panelId.js delete mode 100644 public/app/tabs/users-tab/panels/groups.js delete mode 100644 public/app/tabs/users-tab/panels/groups/html.hbs delete mode 100644 public/app/tabs/users-tab/panels/groups/panelId.js delete mode 100644 public/app/tabs/users-tab/panels/info-common.js delete mode 100644 public/app/tabs/users-tab/panels/info.js delete mode 100644 public/app/tabs/users-tab/panels/info/chgrp-tr.hbs delete mode 100644 public/app/tabs/users-tab/panels/info/html.hbs delete mode 100644 public/app/tabs/users-tab/panels/info/panelId.js delete mode 100644 public/app/tabs/users-tab/panels/quotas-common.js delete mode 100644 public/app/tabs/users-tab/panels/quotas.js delete mode 100644 public/app/tabs/users-tab/panels/quotas/panelId.js delete mode 100644 public/app/tabs/users-tab/panels/showback-common.js delete mode 100644 public/app/tabs/users-tab/panels/showback.js delete mode 100644 public/app/tabs/users-tab/panels/showback/panelId.js delete mode 100644 public/app/tabs/users-tab/tabId.js delete mode 100644 public/app/tabs/users-tab/utils/user-creation.js delete mode 100644 public/app/tabs/users-tab/utils/user-creation/html.hbs delete mode 100644 public/app/tabs/vdcs-tab.js delete mode 100644 public/app/tabs/vdcs-tab/actions.js delete mode 100644 public/app/tabs/vdcs-tab/buttons.js delete mode 100644 public/app/tabs/vdcs-tab/datatable.js delete mode 100644 public/app/tabs/vdcs-tab/form-panels/create.js delete mode 100644 public/app/tabs/vdcs-tab/form-panels/create/advanced.hbs delete mode 100644 public/app/tabs/vdcs-tab/form-panels/create/formPanelId.js delete mode 100644 public/app/tabs/vdcs-tab/form-panels/create/wizard.hbs delete mode 100644 public/app/tabs/vdcs-tab/panels/groups.js delete mode 100644 public/app/tabs/vdcs-tab/panels/groups/panelId.js delete mode 100644 public/app/tabs/vdcs-tab/panels/info.js delete mode 100644 public/app/tabs/vdcs-tab/panels/info/html.hbs delete mode 100644 public/app/tabs/vdcs-tab/panels/info/panelId.js delete mode 100644 public/app/tabs/vdcs-tab/panels/resources.js delete mode 100644 public/app/tabs/vdcs-tab/panels/resources/panelId.js delete mode 100644 public/app/tabs/vdcs-tab/tabId.js delete mode 100644 public/app/tabs/vdcs-tab/utils/common.js delete mode 100644 public/app/tabs/vdcs-tab/utils/resources-tab.js delete mode 100644 public/app/tabs/vdcs-tab/utils/resources-tab/html.hbs delete mode 100644 public/app/tabs/vdcs-tab/utils/resources-zone.js delete mode 100644 public/app/tabs/vdcs-tab/utils/resources-zone/html.hbs delete mode 100644 public/app/tabs/vmgroup-tab.js delete mode 100644 public/app/tabs/vmgroup-tab/actions.js delete mode 100644 public/app/tabs/vmgroup-tab/buttons.js delete mode 100644 public/app/tabs/vmgroup-tab/datatable.js delete mode 100644 public/app/tabs/vmgroup-tab/datatable/search.hbs delete mode 100644 public/app/tabs/vmgroup-tab/form-panels/create.js delete mode 100644 public/app/tabs/vmgroup-tab/form-panels/create/advanced.hbs delete mode 100644 public/app/tabs/vmgroup-tab/form-panels/create/formPanelId.js delete mode 100644 public/app/tabs/vmgroup-tab/form-panels/create/wizard.hbs delete mode 100644 public/app/tabs/vmgroup-tab/panels/info.js delete mode 100644 public/app/tabs/vmgroup-tab/panels/info/html.hbs delete mode 100644 public/app/tabs/vmgroup-tab/panels/info/panelId.js delete mode 100644 public/app/tabs/vmgroup-tab/panels/vms.js delete mode 100644 public/app/tabs/vmgroup-tab/panels/vms/html.hbs delete mode 100644 public/app/tabs/vmgroup-tab/panels/vms/panelId.js delete mode 100644 public/app/tabs/vmgroup-tab/tabId.js delete mode 100644 public/app/tabs/vmgroup-tab/utils/affinity-role-tab.js delete mode 100644 public/app/tabs/vmgroup-tab/utils/affinity-role-tab/html.hbs delete mode 100644 public/app/tabs/vmgroup-tab/utils/common.js delete mode 100644 public/app/tabs/vmgroup-tab/utils/datatable.js delete mode 100644 public/app/tabs/vmgroup-tab/utils/datatable/search.hbs delete mode 100644 public/app/tabs/vmgroup-tab/utils/group-role-affinity.js delete mode 100644 public/app/tabs/vmgroup-tab/utils/role-tab.js delete mode 100644 public/app/tabs/vmgroup-tab/utils/role-tab/html.hbs delete mode 100644 public/app/tabs/vms-tab.js delete mode 100644 public/app/tabs/vms-tab/actions.js delete mode 100644 public/app/tabs/vms-tab/buttons.js delete mode 100644 public/app/tabs/vms-tab/datatable.js delete mode 100644 public/app/tabs/vms-tab/datatable/search.hbs delete mode 100644 public/app/tabs/vms-tab/dialogs/attach-disk.js delete mode 100644 public/app/tabs/vms-tab/dialogs/attach-disk/dialogId.js delete mode 100644 public/app/tabs/vms-tab/dialogs/attach-disk/html.hbs delete mode 100644 public/app/tabs/vms-tab/dialogs/attach-nic.js delete mode 100644 public/app/tabs/vms-tab/dialogs/attach-nic/dialogId.js delete mode 100644 public/app/tabs/vms-tab/dialogs/attach-nic/html.hbs delete mode 100644 public/app/tabs/vms-tab/dialogs/deploy.js delete mode 100644 public/app/tabs/vms-tab/dialogs/deploy/dialogId.js delete mode 100644 public/app/tabs/vms-tab/dialogs/deploy/html.hbs delete mode 100644 public/app/tabs/vms-tab/dialogs/disk-resize.js delete mode 100644 public/app/tabs/vms-tab/dialogs/disk-resize/dialogId.js delete mode 100644 public/app/tabs/vms-tab/dialogs/disk-resize/html.hbs delete mode 100644 public/app/tabs/vms-tab/dialogs/disk-saveas.js delete mode 100644 public/app/tabs/vms-tab/dialogs/disk-saveas/dialogId.js delete mode 100644 public/app/tabs/vms-tab/dialogs/disk-saveas/html.hbs delete mode 100644 public/app/tabs/vms-tab/dialogs/disk-snapshot-rename.js delete mode 100644 public/app/tabs/vms-tab/dialogs/disk-snapshot-rename/dialogId.js delete mode 100644 public/app/tabs/vms-tab/dialogs/disk-snapshot-rename/html.hbs delete mode 100644 public/app/tabs/vms-tab/dialogs/disk-snapshot.js delete mode 100644 public/app/tabs/vms-tab/dialogs/disk-snapshot/dialogId.js delete mode 100644 public/app/tabs/vms-tab/dialogs/disk-snapshot/html.hbs delete mode 100644 public/app/tabs/vms-tab/dialogs/migrate.js delete mode 100644 public/app/tabs/vms-tab/dialogs/migrate/dialogId.js delete mode 100644 public/app/tabs/vms-tab/dialogs/migrate/html.hbs delete mode 100644 public/app/tabs/vms-tab/dialogs/place-on-node.js delete mode 100644 public/app/tabs/vms-tab/dialogs/place-on-node/dialogId.js delete mode 100644 public/app/tabs/vms-tab/dialogs/place-on-node/html.hbs delete mode 100644 public/app/tabs/vms-tab/dialogs/reinstall.js delete mode 100644 public/app/tabs/vms-tab/dialogs/reinstall/dialogId.js delete mode 100644 public/app/tabs/vms-tab/dialogs/reinstall/html.hbs delete mode 100644 public/app/tabs/vms-tab/dialogs/resize.js delete mode 100644 public/app/tabs/vms-tab/dialogs/resize/dialogId.js delete mode 100644 public/app/tabs/vms-tab/dialogs/resize/html.hbs delete mode 100644 public/app/tabs/vms-tab/dialogs/revert-zfs-snapshot.js delete mode 100644 public/app/tabs/vms-tab/dialogs/revert-zfs-snapshot/dialogId.js delete mode 100644 public/app/tabs/vms-tab/dialogs/revert-zfs-snapshot/html.hbs delete mode 100644 public/app/tabs/vms-tab/dialogs/revert.js delete mode 100644 public/app/tabs/vms-tab/dialogs/revert/dialogId.js delete mode 100644 public/app/tabs/vms-tab/dialogs/revert/html.hbs delete mode 100644 public/app/tabs/vms-tab/dialogs/saveas-template.js delete mode 100644 public/app/tabs/vms-tab/dialogs/saveas-template/dialogId.js delete mode 100644 public/app/tabs/vms-tab/dialogs/saveas-template/html.hbs delete mode 100644 public/app/tabs/vms-tab/dialogs/snapshot.js delete mode 100644 public/app/tabs/vms-tab/dialogs/snapshot/dialogId.js delete mode 100644 public/app/tabs/vms-tab/dialogs/snapshot/html.hbs delete mode 100644 public/app/tabs/vms-tab/dialogs/spice.js delete mode 100644 public/app/tabs/vms-tab/dialogs/spice/dialogId.js delete mode 100644 public/app/tabs/vms-tab/dialogs/spice/html.hbs delete mode 100644 public/app/tabs/vms-tab/dialogs/vnc.js delete mode 100644 public/app/tabs/vms-tab/dialogs/vnc/dialogId.js delete mode 100644 public/app/tabs/vms-tab/dialogs/vnc/html.hbs delete mode 100644 public/app/tabs/vms-tab/form-panels/create.js delete mode 100644 public/app/tabs/vms-tab/form-panels/create/formPanelId.js delete mode 100644 public/app/tabs/vms-tab/form-panels/updateconf.js delete mode 100644 public/app/tabs/vms-tab/form-panels/updateconf/advanced.hbs delete mode 100644 public/app/tabs/vms-tab/form-panels/updateconf/formPanelId.js delete mode 100644 public/app/tabs/vms-tab/form-panels/updateconf/wizard.hbs delete mode 100644 public/app/tabs/vms-tab/hooks/header.js delete mode 100644 public/app/tabs/vms-tab/hooks/state.js delete mode 100644 public/app/tabs/vms-tab/panels/actions.js delete mode 100644 public/app/tabs/vms-tab/panels/actions/panelId.js delete mode 100644 public/app/tabs/vms-tab/panels/capacity.js delete mode 100644 public/app/tabs/vms-tab/panels/capacity/html.hbs delete mode 100644 public/app/tabs/vms-tab/panels/capacity/panelId.js delete mode 100644 public/app/tabs/vms-tab/panels/conf.js delete mode 100644 public/app/tabs/vms-tab/panels/conf/html.hbs delete mode 100644 public/app/tabs/vms-tab/panels/conf/panelId.js delete mode 100644 public/app/tabs/vms-tab/panels/info.js delete mode 100644 public/app/tabs/vms-tab/panels/info/html.hbs delete mode 100644 public/app/tabs/vms-tab/panels/info/panelId.js delete mode 100644 public/app/tabs/vms-tab/panels/log.js delete mode 100644 public/app/tabs/vms-tab/panels/log/panelId.js delete mode 100644 public/app/tabs/vms-tab/panels/network.js delete mode 100644 public/app/tabs/vms-tab/panels/network/panelId.js delete mode 100644 public/app/tabs/vms-tab/panels/placement.js delete mode 100644 public/app/tabs/vms-tab/panels/placement/panelId.js delete mode 100644 public/app/tabs/vms-tab/panels/reinstall.js delete mode 100644 public/app/tabs/vms-tab/panels/reinstall/panelId.js delete mode 100644 public/app/tabs/vms-tab/panels/snapshots.js delete mode 100644 public/app/tabs/vms-tab/panels/snapshots/panelId.js delete mode 100644 public/app/tabs/vms-tab/panels/storage.js delete mode 100644 public/app/tabs/vms-tab/panels/storage/disk-details.hbs delete mode 100644 public/app/tabs/vms-tab/panels/storage/html.hbs delete mode 100644 public/app/tabs/vms-tab/panels/storage/panelId.js delete mode 100644 public/app/tabs/vms-tab/panels/template.js delete mode 100644 public/app/tabs/vms-tab/panels/template/html.hbs delete mode 100644 public/app/tabs/vms-tab/panels/template/panelId.js delete mode 100644 public/app/tabs/vms-tab/tabId.js delete mode 100644 public/app/tabs/vms-tab/utils/datatable-common.js delete mode 100644 public/app/tabs/vms-tab/utils/state-actions.js delete mode 100644 public/app/tabs/vnets-tab.js delete mode 100644 public/app/tabs/vnets-tab/actions.js delete mode 100644 public/app/tabs/vnets-tab/buttons.js delete mode 100644 public/app/tabs/vnets-tab/datatable.js delete mode 100644 public/app/tabs/vnets-tab/datatable/search.hbs delete mode 100644 public/app/tabs/vnets-tab/dialogs/add-ar.js delete mode 100644 public/app/tabs/vnets-tab/dialogs/add-ar/dialogId.js delete mode 100644 public/app/tabs/vnets-tab/dialogs/add-ar/html.hbs delete mode 100644 public/app/tabs/vnets-tab/dialogs/reserve.js delete mode 100644 public/app/tabs/vnets-tab/dialogs/reserve/ar-datatable.js delete mode 100644 public/app/tabs/vnets-tab/dialogs/reserve/dialogId.js delete mode 100644 public/app/tabs/vnets-tab/dialogs/reserve/html.hbs delete mode 100644 public/app/tabs/vnets-tab/dialogs/reserve_vdc.js delete mode 100644 public/app/tabs/vnets-tab/dialogs/reserve_vdc/dialogId.js delete mode 100644 public/app/tabs/vnets-tab/dialogs/reserve_vdc/html.hbs delete mode 100644 public/app/tabs/vnets-tab/dialogs/update-ar.js delete mode 100644 public/app/tabs/vnets-tab/dialogs/update-ar/dialogId.js delete mode 100644 public/app/tabs/vnets-tab/dialogs/update-ar/html.hbs delete mode 100644 public/app/tabs/vnets-tab/form-panels/create.js delete mode 100644 public/app/tabs/vnets-tab/form-panels/create/advanced.hbs delete mode 100644 public/app/tabs/vnets-tab/form-panels/create/formPanelId.js delete mode 100644 public/app/tabs/vnets-tab/form-panels/create/wizard.hbs delete mode 100644 public/app/tabs/vnets-tab/form-panels/import.js delete mode 100644 public/app/tabs/vnets-tab/form-panels/import/formPanelId.js delete mode 100644 public/app/tabs/vnets-tab/form-panels/import/html.hbs delete mode 100644 public/app/tabs/vnets-tab/form-panels/instantiate.js delete mode 100644 public/app/tabs/vnets-tab/form-panels/instantiate/formPanelId.js delete mode 100644 public/app/tabs/vnets-tab/panels/ar.js delete mode 100644 public/app/tabs/vnets-tab/panels/ar/arInfo.hbs delete mode 100644 public/app/tabs/vnets-tab/panels/ar/html.hbs delete mode 100644 public/app/tabs/vnets-tab/panels/ar/panelId.js delete mode 100644 public/app/tabs/vnets-tab/panels/clusters.js delete mode 100644 public/app/tabs/vnets-tab/panels/clusters/panelId.js delete mode 100644 public/app/tabs/vnets-tab/panels/info.js delete mode 100644 public/app/tabs/vnets-tab/panels/info/html.hbs delete mode 100644 public/app/tabs/vnets-tab/panels/info/panelId.js delete mode 100644 public/app/tabs/vnets-tab/panels/leases.js delete mode 100644 public/app/tabs/vnets-tab/panels/leases/html.hbs delete mode 100644 public/app/tabs/vnets-tab/panels/leases/panelId.js delete mode 100644 public/app/tabs/vnets-tab/panels/secgroups.js delete mode 100644 public/app/tabs/vnets-tab/panels/secgroups/panelId.js delete mode 100644 public/app/tabs/vnets-tab/panels/vrouters.js delete mode 100644 public/app/tabs/vnets-tab/panels/vrouters/panelId.js delete mode 100644 public/app/tabs/vnets-tab/tabId.js delete mode 100644 public/app/tabs/vnets-tab/utils/ar-tab.js delete mode 100644 public/app/tabs/vnets-tab/utils/ar-tab/html.hbs delete mode 100644 public/app/tabs/vnets-tab/utils/common.js delete mode 100644 public/app/tabs/vnets-templates-tab.js delete mode 100644 public/app/tabs/vnets-templates-tab/actions.js delete mode 100644 public/app/tabs/vnets-templates-tab/buttons.js delete mode 100644 public/app/tabs/vnets-templates-tab/datatable.js delete mode 100644 public/app/tabs/vnets-templates-tab/datatable/search.hbs delete mode 100644 public/app/tabs/vnets-templates-tab/dialogs/add-ar.js delete mode 100644 public/app/tabs/vnets-templates-tab/dialogs/add-ar/dialogId.js delete mode 100644 public/app/tabs/vnets-templates-tab/dialogs/instantiate-add-ar.js delete mode 100644 public/app/tabs/vnets-templates-tab/dialogs/instantiate-add-ar/dialogId.js delete mode 100644 public/app/tabs/vnets-templates-tab/dialogs/instantiate-update-ar.js delete mode 100644 public/app/tabs/vnets-templates-tab/dialogs/instantiate-update-ar/dialogId.js delete mode 100644 public/app/tabs/vnets-templates-tab/dialogs/update-ar.js delete mode 100644 public/app/tabs/vnets-templates-tab/dialogs/update-ar/dialogId.js delete mode 100644 public/app/tabs/vnets-templates-tab/form-panels/create.js delete mode 100644 public/app/tabs/vnets-templates-tab/form-panels/create/formPanelId.js delete mode 100644 public/app/tabs/vnets-templates-tab/form-panels/instantiate.js delete mode 100644 public/app/tabs/vnets-templates-tab/form-panels/instantiate/formPanelId.js delete mode 100644 public/app/tabs/vnets-templates-tab/form-panels/instantiate/html.hbs delete mode 100644 public/app/tabs/vnets-templates-tab/form-panels/instantiate/templateRow.hbs delete mode 100644 public/app/tabs/vnets-templates-tab/panels/ar.js delete mode 100644 public/app/tabs/vnets-templates-tab/panels/ar/panelId.js delete mode 100644 public/app/tabs/vnets-templates-tab/panels/clusters.js delete mode 100644 public/app/tabs/vnets-templates-tab/panels/clusters/panelId.js delete mode 100644 public/app/tabs/vnets-templates-tab/panels/info.js delete mode 100644 public/app/tabs/vnets-templates-tab/panels/info/panelId.js delete mode 100644 public/app/tabs/vnets-templates-tab/panels/secgroups.js delete mode 100644 public/app/tabs/vnets-templates-tab/panels/secgroups/panelId.js delete mode 100644 public/app/tabs/vnets-templates-tab/panels/template/html.hbs delete mode 100644 public/app/tabs/vnets-templates-tab/panels/template/panelId.js delete mode 100644 public/app/tabs/vnets-templates-tab/panels/templates.js delete mode 100644 public/app/tabs/vnets-templates-tab/tabId.js delete mode 100644 public/app/tabs/vnets-topology-tab.js delete mode 100644 public/app/tabs/vnets-topology-tab/html.hbs delete mode 100644 public/app/tabs/vnets-topology-tab/tabId.js delete mode 100644 public/app/tabs/vrouter-templates-tab.js delete mode 100644 public/app/tabs/vrouter-templates-tab/actions.js delete mode 100644 public/app/tabs/vrouter-templates-tab/buttons.js delete mode 100644 public/app/tabs/vrouter-templates-tab/datatable.js delete mode 100644 public/app/tabs/vrouter-templates-tab/form-panels/create.js delete mode 100644 public/app/tabs/vrouter-templates-tab/form-panels/create/formPanelId.js delete mode 100644 public/app/tabs/vrouter-templates-tab/form-panels/instantiate.js delete mode 100644 public/app/tabs/vrouter-templates-tab/form-panels/instantiate/formPanelId.js delete mode 100644 public/app/tabs/vrouter-templates-tab/form-panels/instantiate/templateSelection.hbs delete mode 100644 public/app/tabs/vrouter-templates-tab/form-panels/instantiate/wizard.hbs delete mode 100644 public/app/tabs/vrouter-templates-tab/panels/info.js delete mode 100644 public/app/tabs/vrouter-templates-tab/panels/info/panelId.js delete mode 100644 public/app/tabs/vrouter-templates-tab/panels/template.js delete mode 100644 public/app/tabs/vrouter-templates-tab/panels/template/panelId.js delete mode 100644 public/app/tabs/vrouter-templates-tab/tabId.js delete mode 100644 public/app/tabs/vrouters-tab.js delete mode 100644 public/app/tabs/vrouters-tab/actions.js delete mode 100644 public/app/tabs/vrouters-tab/buttons.js delete mode 100644 public/app/tabs/vrouters-tab/datatable.js delete mode 100644 public/app/tabs/vrouters-tab/datatable/search.hbs delete mode 100644 public/app/tabs/vrouters-tab/dialogs/attach-nic.js delete mode 100644 public/app/tabs/vrouters-tab/dialogs/attach-nic/dialogId.js delete mode 100644 public/app/tabs/vrouters-tab/dialogs/attach-nic/html.hbs delete mode 100644 public/app/tabs/vrouters-tab/form-panels/create.js delete mode 100644 public/app/tabs/vrouters-tab/form-panels/create/advanced.hbs delete mode 100644 public/app/tabs/vrouters-tab/form-panels/create/formPanelId.js delete mode 100644 public/app/tabs/vrouters-tab/form-panels/instantiate.js delete mode 100644 public/app/tabs/vrouters-tab/form-panels/instantiate/formPanelId.js delete mode 100644 public/app/tabs/vrouters-tab/form-panels/instantiate/html.hbs delete mode 100644 public/app/tabs/vrouters-tab/panels/info.js delete mode 100644 public/app/tabs/vrouters-tab/panels/info/html.hbs delete mode 100644 public/app/tabs/vrouters-tab/panels/info/panelId.js delete mode 100644 public/app/tabs/vrouters-tab/panels/vms.js delete mode 100644 public/app/tabs/vrouters-tab/panels/vms/panelId.js delete mode 100644 public/app/tabs/vrouters-tab/tabId.js delete mode 100644 public/app/tabs/zones-tab.js delete mode 100644 public/app/tabs/zones-tab/actions.js delete mode 100644 public/app/tabs/zones-tab/buttons.js delete mode 100644 public/app/tabs/zones-tab/datatable.js delete mode 100644 public/app/tabs/zones-tab/dialogs/create.js delete mode 100644 public/app/tabs/zones-tab/dialogs/create/dialogId.js delete mode 100644 public/app/tabs/zones-tab/dialogs/create/html.hbs delete mode 100644 public/app/tabs/zones-tab/panels/info.js delete mode 100644 public/app/tabs/zones-tab/panels/info/html.hbs delete mode 100644 public/app/tabs/zones-tab/panels/info/panelId.js delete mode 100644 public/app/tabs/zones-tab/tabId.js delete mode 100644 public/app/templates/helpers/advancedImportationSection.js delete mode 100644 public/app/templates/helpers/advancedSection.js delete mode 100644 public/app/templates/helpers/htmlDecode.js delete mode 100644 public/app/templates/helpers/humanizeSize.js delete mode 100644 public/app/templates/helpers/humanizeTime.js delete mode 100644 public/app/templates/helpers/isAdvancedEnabled.js delete mode 100644 public/app/templates/helpers/isFeatureEnabled.js delete mode 100644 public/app/templates/helpers/isProvisionTabEnabled.js delete mode 100644 public/app/templates/helpers/isTabActionEnabled.js delete mode 100644 public/app/templates/helpers/isTabPanelEnabled.js delete mode 100644 public/app/templates/helpers/navigate.js delete mode 100644 public/app/templates/helpers/tip.js delete mode 100644 public/app/templates/helpers/tr.js delete mode 100644 public/app/templates/helpers/valOrDefault.js delete mode 100644 public/app/utils/accounting.js delete mode 100644 public/app/utils/accounting/empty-graph.hbs delete mode 100644 public/app/utils/accounting/html.hbs delete mode 100644 public/app/utils/actions.js delete mode 100644 public/app/utils/browser-info.js delete mode 100644 public/app/utils/common-actions.js delete mode 100644 public/app/utils/custom-tags-table.js delete mode 100644 public/app/utils/custom-tags-table/html.hbs delete mode 100644 public/app/utils/custom-tags-table/row.hbs delete mode 100644 public/app/utils/custom-tags-table/vector-attribute-row.hbs delete mode 100644 public/app/utils/custom-tags-table/vector-row.hbs delete mode 100644 public/app/utils/dashboard.js delete mode 100644 public/app/utils/dialogs/clusters.js delete mode 100644 public/app/utils/dialogs/clusters/dialogId.js delete mode 100644 public/app/utils/dialogs/clusters/html.hbs delete mode 100644 public/app/utils/dialogs/confirm-with-select.js delete mode 100644 public/app/utils/dialogs/confirm-with-select/dialogId.js delete mode 100644 public/app/utils/dialogs/confirm-with-select/html.hbs delete mode 100644 public/app/utils/dialogs/confirm.js delete mode 100644 public/app/utils/dialogs/confirm/dialogId.js delete mode 100644 public/app/utils/dialogs/confirm/html.hbs delete mode 100644 public/app/utils/dialogs/dialog.js delete mode 100644 public/app/utils/dialogs/generic-confirm.js delete mode 100644 public/app/utils/dialogs/generic-confirm/dialogId.js delete mode 100644 public/app/utils/dialogs/generic-confirm/html.hbs delete mode 100644 public/app/utils/dialogs/overcommit.js delete mode 100644 public/app/utils/dialogs/overcommit/dialogId.js delete mode 100644 public/app/utils/dialogs/overcommit/html.hbs delete mode 100644 public/app/utils/disks-resize.js delete mode 100644 public/app/utils/disks-resize/html.hbs delete mode 100644 public/app/utils/dom-datatable.js delete mode 100644 public/app/utils/form-panels/form-panel.js delete mode 100644 public/app/utils/graphs.js delete mode 100644 public/app/utils/hooks/header.js delete mode 100644 public/app/utils/humanize.js delete mode 100644 public/app/utils/labels/tree.js delete mode 100644 public/app/utils/labels/utils.js delete mode 100644 public/app/utils/locale.js delete mode 100644 public/app/utils/menu.js delete mode 100644 public/app/utils/menu/provision-top-row.hbs delete mode 100644 public/app/utils/menu/top-row.hbs delete mode 100644 public/app/utils/navigation.js delete mode 100644 public/app/utils/nics-section.js delete mode 100644 public/app/utils/nics-section/dd.hbs delete mode 100644 public/app/utils/nics-section/html.hbs delete mode 100644 public/app/utils/notifier.js delete mode 100644 public/app/utils/panel/cluster-tr.js delete mode 100644 public/app/utils/panel/cluster-tr/html.hbs delete mode 100644 public/app/utils/panel/ec2-tr.js delete mode 100644 public/app/utils/panel/ec2-tr/html.hbs delete mode 100644 public/app/utils/panel/permissions-table.js delete mode 100644 public/app/utils/panel/permissions-table/group.hbs delete mode 100644 public/app/utils/panel/permissions-table/html.hbs delete mode 100644 public/app/utils/panel/permissions-table/owner.hbs delete mode 100644 public/app/utils/panel/permissions-table/permissions.hbs delete mode 100644 public/app/utils/panel/rename-tr.js delete mode 100644 public/app/utils/panel/rename-tr/html.hbs delete mode 100644 public/app/utils/panel/template-table.js delete mode 100644 public/app/utils/progress-bar.js delete mode 100644 public/app/utils/quotas/quota-defaults.js delete mode 100644 public/app/utils/quotas/quota-limits.js delete mode 100644 public/app/utils/quotas/quota-widgets.js delete mode 100644 public/app/utils/range-slider.js delete mode 100644 public/app/utils/range-slider/html.hbs delete mode 100644 public/app/utils/resource-select.js delete mode 100644 public/app/utils/schedule_action.js delete mode 100644 public/app/utils/schedule_action/html.hbs delete mode 100644 public/app/utils/schedule_action/table.hbs delete mode 100644 public/app/utils/showback.js delete mode 100644 public/app/utils/showback/html.hbs delete mode 100644 public/app/utils/showback/showbackList.js delete mode 100644 public/app/utils/spice.js delete mode 100644 public/app/utils/status.js delete mode 100644 public/app/utils/tab-datatable.js delete mode 100644 public/app/utils/tab-datatable/empty-table.hbs delete mode 100644 public/app/utils/tab-datatable/search-input.hbs delete mode 100644 public/app/utils/tab-datatable/table.hbs delete mode 100644 public/app/utils/template-utils.js delete mode 100644 public/app/utils/tips.js delete mode 100644 public/app/utils/tree.js delete mode 100644 public/app/utils/unique-id.js delete mode 100644 public/app/utils/user-inputs.js delete mode 100644 public/app/utils/user-inputs/row.hbs delete mode 100644 public/app/utils/user-inputs/table.hbs delete mode 100644 public/app/utils/vcenter-vm-folder.js delete mode 100644 public/app/utils/vcenter-vm-folder/html.hbs delete mode 100644 public/app/utils/vcenter/clusters.js delete mode 100644 public/app/utils/vcenter/clusters/row.hbs delete mode 100644 public/app/utils/vcenter/common/empty-fieldset.hbs delete mode 100644 public/app/utils/vcenter/common/fieldset-table.hbs delete mode 100644 public/app/utils/vcenter/common/html.hbs delete mode 100644 public/app/utils/vcenter/datastores.js delete mode 100644 public/app/utils/vcenter/datastores/row.hbs delete mode 100644 public/app/utils/vcenter/images.js delete mode 100644 public/app/utils/vcenter/images/row.hbs delete mode 100644 public/app/utils/vcenter/networks.js delete mode 100644 public/app/utils/vcenter/networks/row.hbs delete mode 100644 public/app/utils/vcenter/templates.js delete mode 100644 public/app/utils/vcenter/templates/row.hbs delete mode 100644 public/app/utils/vcenter/vcenter-common.js delete mode 100644 public/app/utils/vmgroup-section.js delete mode 100644 public/app/utils/vmgroup-section/html.hbs delete mode 100644 public/app/utils/vnc.js delete mode 100644 public/app/utils/wizard-fields.js delete mode 100644 public/bower.json delete mode 100644 public/build.sh delete mode 100644 public/config.rb delete mode 100644 public/css/app.css delete mode 100644 public/css/app.min.css delete mode 100644 public/css/custom.css delete mode 100644 public/css/login.css delete mode 100644 public/css/novnc-custom.css delete mode 100644 public/css/opensans/LICENSE delete mode 100644 public/css/opensans/METADATA.json delete mode 100644 public/css/opensans/opensans.woff delete mode 100644 public/css/spice-custom.css delete mode 100644 public/images/advanced_layout.png delete mode 100644 public/images/ajax-loader.gif delete mode 100644 public/images/apple-touch-icon-precomposed.png delete mode 100644 public/images/cloud_layout.png delete mode 100644 public/images/favicon.ico delete mode 100644 public/images/favicon.png delete mode 100644 public/images/foundation/orbit/bullets.jpg delete mode 100644 public/images/foundation/orbit/left-arrow-small.png delete mode 100644 public/images/foundation/orbit/left-arrow.png delete mode 100644 public/images/foundation/orbit/loading.gif delete mode 100644 public/images/foundation/orbit/mask-black.png delete mode 100644 public/images/foundation/orbit/pause-black.png delete mode 100644 public/images/foundation/orbit/right-arrow-small.png delete mode 100644 public/images/foundation/orbit/right-arrow.png delete mode 100644 public/images/foundation/orbit/rotator-black.png delete mode 100644 public/images/foundation/orbit/timer-black.png delete mode 100644 public/images/login.png delete mode 100644 public/images/login_over.png delete mode 100644 public/images/logos/alpine.png delete mode 100644 public/images/logos/alt.png delete mode 100644 public/images/logos/arch.png delete mode 100644 public/images/logos/centos.png delete mode 100644 public/images/logos/clearos.png delete mode 100644 public/images/logos/debian.png delete mode 100644 public/images/logos/devuan.png delete mode 100644 public/images/logos/fedora.png delete mode 100644 public/images/logos/freebsd.png delete mode 100644 public/images/logos/hardenedbsd.png delete mode 100644 public/images/logos/knoppix-logo.png delete mode 100644 public/images/logos/linux.png delete mode 100644 public/images/logos/oel.png delete mode 100644 public/images/logos/redhat.png delete mode 100644 public/images/logos/suse.png delete mode 100644 public/images/logos/ubuntu.png delete mode 100644 public/images/logos/windows8.png delete mode 100644 public/images/logos/windowsxp.png delete mode 100644 public/images/one_small_logo.png delete mode 100644 public/images/opennebula-5.0.png delete mode 100644 public/images/opennebula-sunstone-v4.0-small.png delete mode 100644 public/images/opennebula-sunstone-v4.0.png delete mode 100644 public/images/opennebula-sunstone-v4.14-small.png delete mode 100644 public/images/panel.png delete mode 100644 public/images/panel_short.png delete mode 100644 public/images/pbar.gif delete mode 100644 public/images/vcenter_layout.png delete mode 100644 public/locale/generate_messages_pot.sh delete mode 100644 public/locale/languages/SConstruct delete mode 100644 public/locale/languages/bg.po delete mode 100644 public/locale/languages/bg_BG.po delete mode 100644 public/locale/languages/ca.js delete mode 100644 public/locale/languages/ca.po delete mode 100644 public/locale/languages/ca_datatable.txt delete mode 100644 public/locale/languages/cs.po delete mode 100644 public/locale/languages/cs_CZ.js delete mode 100644 public/locale/languages/cs_CZ.po delete mode 100644 public/locale/languages/cs_datatable.txt delete mode 100644 public/locale/languages/da.js delete mode 100644 public/locale/languages/da.po delete mode 100644 public/locale/languages/da_datatable.txt delete mode 100644 public/locale/languages/de.js delete mode 100644 public/locale/languages/de.po delete mode 100644 public/locale/languages/de_CH.po delete mode 100644 public/locale/languages/de_datatable.txt delete mode 100644 public/locale/languages/el_GR.js delete mode 100644 public/locale/languages/el_GR.po delete mode 100644 public/locale/languages/el_datatable.txt delete mode 100644 public/locale/languages/en.po delete mode 100644 public/locale/languages/en_US.js delete mode 100644 public/locale/languages/en_US.po delete mode 100644 public/locale/languages/en_datatable.txt delete mode 100644 public/locale/languages/es_ES.js delete mode 100644 public/locale/languages/es_ES.po delete mode 100644 public/locale/languages/es_datatable.txt delete mode 100644 public/locale/languages/et_EE.po delete mode 100644 public/locale/languages/fa.po delete mode 100644 public/locale/languages/fa_IR.js delete mode 100644 public/locale/languages/fa_IR.po delete mode 100644 public/locale/languages/fa_datatable.txt delete mode 100644 public/locale/languages/fr_CA.po delete mode 100644 public/locale/languages/fr_FR.js delete mode 100644 public/locale/languages/fr_FR.po delete mode 100644 public/locale/languages/fr_datatable.txt delete mode 100644 public/locale/languages/gl.po delete mode 100644 public/locale/languages/hu_HU.po delete mode 100644 public/locale/languages/id.po delete mode 100644 public/locale/languages/it_IT.js delete mode 100644 public/locale/languages/it_IT.po delete mode 100644 public/locale/languages/it_datatable.txt delete mode 100644 public/locale/languages/ja.js delete mode 100644 public/locale/languages/ja.po delete mode 100644 public/locale/languages/ja_datatable.txt delete mode 100644 public/locale/languages/ka.po delete mode 100644 public/locale/languages/lt_LT.js delete mode 100644 public/locale/languages/lt_LT.po delete mode 100644 public/locale/languages/lt_datatable.txt delete mode 100644 public/locale/languages/nl_NL.js delete mode 100644 public/locale/languages/nl_NL.po delete mode 100644 public/locale/languages/nl_datatable.txt delete mode 100644 public/locale/languages/pl.js delete mode 100644 public/locale/languages/pl.po delete mode 100644 public/locale/languages/pl_datatable.txt delete mode 100644 public/locale/languages/pt_BR.js delete mode 100644 public/locale/languages/pt_BR.po delete mode 100644 public/locale/languages/pt_PT.js delete mode 100644 public/locale/languages/pt_PT.po delete mode 100644 public/locale/languages/pt_datatable.txt delete mode 100644 public/locale/languages/ro_RO.po delete mode 100644 public/locale/languages/ru.po delete mode 100644 public/locale/languages/ru_RU.js delete mode 100644 public/locale/languages/ru_RU.po delete mode 100644 public/locale/languages/ru_datatable.txt delete mode 100644 public/locale/languages/si.po delete mode 100644 public/locale/languages/sk_SK.js delete mode 100644 public/locale/languages/sk_SK.po delete mode 100644 public/locale/languages/sk_datatable.txt delete mode 100644 public/locale/languages/sr_RS.po delete mode 100644 public/locale/languages/sv.po delete mode 100644 public/locale/languages/th.po delete mode 100644 public/locale/languages/th_TH.po delete mode 100644 public/locale/languages/tr.po delete mode 100644 public/locale/languages/tr_TR.js delete mode 100644 public/locale/languages/tr_TR.po delete mode 100644 public/locale/languages/tr_datatable.txt delete mode 100644 public/locale/languages/uk.po delete mode 100644 public/locale/languages/uk_UA.po delete mode 100644 public/locale/languages/vi.po delete mode 100644 public/locale/languages/vi_VN.po delete mode 100644 public/locale/languages/zh_CN.js delete mode 100644 public/locale/languages/zh_CN.po delete mode 100644 public/locale/languages/zh_TW.po delete mode 100644 public/locale/languages/zh_datatable.txt delete mode 100644 public/locale/messages.pot delete mode 100644 public/locale/upgrade_po_translations.sh delete mode 100644 public/package.json delete mode 100644 public/patches/bug4304-novnc.patch delete mode 100644 public/scss/_advanced-section.scss delete mode 100644 public/scss/_boxes.scss delete mode 100644 public/scss/_fieldset.scss delete mode 100644 public/scss/_flot.scss delete mode 100644 public/scss/_helper-classes.scss delete mode 100644 public/scss/_jgrowl.scss delete mode 100644 public/scss/_labels.scss delete mode 100644 public/scss/_layout.scss delete mode 100644 public/scss/_menu.scss delete mode 100644 public/scss/_provision.scss delete mode 100644 public/scss/_range-slider.scss delete mode 100644 public/scss/_settings.scss delete mode 100644 public/scss/_table.scss delete mode 100644 public/scss/_tabs.scss delete mode 100644 public/scss/_tooltips.scss delete mode 100644 public/scss/_tree.scss delete mode 100644 public/scss/_vcenter.scss delete mode 100644 public/scss/_visjs.scss delete mode 100644 public/scss/app.scss diff --git a/public/.bowerrc b/public/.bowerrc deleted file mode 100644 index 69fad358..00000000 --- a/public/.bowerrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "directory": "bower_components" -} diff --git a/public/.eslintrc.json b/public/.eslintrc.json deleted file mode 100644 index 2a25e883..00000000 --- a/public/.eslintrc.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "env": { - "browser": true, - "es6": true - }, - "parserOptions": { - "sourceType": "module" - }, - "rules": { - "linebreak-style": [ - "error", - "unix" - ], - "quotes": [ - "error", - "double" - ], - "semi": [ - "error", - "always" - ], - "eqeqeq": 2, - "no-trailing-spaces": [ - "error" - ] - } -} \ No newline at end of file diff --git a/public/.jscsrc b/public/.jscsrc deleted file mode 100644 index 62f7b01c..00000000 --- a/public/.jscsrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "preset": "google", - "disallowSpacesInAnonymousFunctionExpression": null, - "excludeFiles": ["node_modules/**"] -} \ No newline at end of file diff --git a/public/Gruntfile.js b/public/Gruntfile.js deleted file mode 100644 index 097e9401..00000000 --- a/public/Gruntfile.js +++ /dev/null @@ -1,241 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -module.exports = function(grunt) { - grunt.initConfig({ - pkg: grunt.file.readJSON('package.json'), - - sass: { - options: { - includePaths: ['bower_components/foundation-sites/scss'] - }, - dist: { - options: { - outputStyle: 'compressed' - }, - files: { - 'css/app.css': 'scss/app.scss' - } - } - }, - - watch: { - grunt: { - files: ['Gruntfile.js'] - }, - - sass: { - files: 'scss/*.scss', - tasks: ['sass'] - }, - - requirejs: { - files: 'app/**/*.js', - tasks: ['requirejs'] - } - }, - - requirejs: { - compileCSS: { - options: { - out: './css/app.min.css', - cssIn: './css/app.css', - optimizeCss: 'default' - } - }, - compileJS: { - options: { - appDir: './app', - baseUrl: './', // 1 - dir: './dist', // 2 - //name: 'vendor/almond', // 3 - mainConfigFile: './app/main.js', // 5 - preserveLicenseComments: false, - optimize: 'none', - generateSourceMaps: true, - removeCombined: true, - //skipDirOptimize: false, - //findNestedDependencies: true, - modules: [ - { - name: 'main', - include: ['almond'] - }, - { - name: 'login', - include: ['almond'], - insertRequire: ['login'] - }, - { - name: 'console/vnc', - include: ['almond'], - insertRequire: ['console/vnc'] - }, - { - name: 'console/spice', - include: ['almond'], - insertRequire: ['console/spice'] - } - /*{ - name: 'main' - excludeShallow: [ - 'app' - ], - include: [ - 'jquery', - 'datatables', - 'foundation-datatables', - 'jgrowl', - 'foundation.core', - 'foundation.abide', - 'foundation.accordion', - 'foundation.alert', - 'foundation.clearing', - 'foundation.dropdown', - 'foundation.equalizer', - 'foundation.interchange', - 'foundation.joyride', - 'foundation.magellan', - 'foundation.offcanvas', - 'foundation.orbit', - 'foundation.reveal', - 'foundation.slider', - 'foundation.tab', - 'foundation.tooltip', - 'foundation.topbar', - 'hbs', - 'jquery.cookie', - 'fastclick', - 'modernizr', - 'placeholder', - 'resumable', - 'flot', - 'flot.stack', - 'flot.resize', - 'flot.time', - 'flot.tooltip', - 'nouislider', - 'vnc-util', - 'spice-main', - 'spice-spicearraybuffer', - 'spice-enums', - 'spice-atKeynames', - 'spice-utils', - 'spice-png', - 'spice-lz', - 'spice-quic', - 'spice-bitmap', - 'spice-spicedataview', - 'spice-spicetype', - 'spice-spicemsg', - 'spice-wire', - 'spice-spiceconn', - 'spice-display', - 'spice-inputs', - 'spice-webm', - 'spice-playback', - 'spice-simulatecursor', - 'spice-cursor', - 'spice-jsbn', - 'spice-rsa', - 'spice-prng4', - 'spice-rng', - 'spice-sha1', - 'spice-ticket', - 'spice-resize', - 'spice-filexfer' - ] - }, - { - name: 'app', - exclude: [ - 'jquery', - 'datatables', - 'foundation-datatables', - 'jgrowl', - 'foundation.core', - 'foundation.abide', - 'foundation.accordion', - 'foundation.alert', - 'foundation.clearing', - 'foundation.dropdown', - 'foundation.equalizer', - 'foundation.interchange', - 'foundation.joyride', - 'foundation.magellan', - 'foundation.offcanvas', - 'foundation.orbit', - 'foundation.reveal', - 'foundation.slider', - 'foundation.tab', - 'foundation.tooltip', - 'foundation.topbar', - 'hbs', - 'jquery.cookie', - 'fastclick', - 'modernizr', - 'placeholder', - 'resumable', - 'flot', - 'flot.stack', - 'flot.resize', - 'flot.time', - 'flot.tooltip', - 'nouislider', - 'vnc-util', - 'spice-main', - 'spice-spicearraybuffer', - 'spice-enums', - 'spice-atKeynames', - 'spice-utils', - 'spice-png', - 'spice-lz', - 'spice-quic', - 'spice-bitmap', - 'spice-spicedataview', - 'spice-spicetype', - 'spice-spicemsg', - 'spice-wire', - 'spice-spiceconn', - 'spice-display', - 'spice-inputs', - 'spice-webm', - 'spice-playback', - 'spice-simulatecursor', - 'spice-cursor', - 'spice-jsbn', - 'spice-rsa', - 'spice-prng4', - 'spice-rng', - 'spice-sha1', - 'spice-ticket', - 'spice-resize', - 'spice-filexfer' - ] - }*/ - ] - } - } - } - }); - - grunt.loadNpmTasks('grunt-sass'); - grunt.loadNpmTasks('grunt-contrib-watch'); - grunt.loadNpmTasks('grunt-contrib-requirejs'); - - grunt.registerTask('build', ['sass']); - grunt.registerTask('default', ['build','watch']); -} diff --git a/public/README.md b/public/README.md deleted file mode 100644 index a6141394..00000000 --- a/public/README.md +++ /dev/null @@ -1,119 +0,0 @@ -Sunstone dependencies -===================== - -1. Install nodejs and npm -2. Install the following npm packages: - - ``` - sudo npm install -g bower - sudo npm install -g grunt - sudo npm install -g grunt-cli - ``` - -3. Move to the Sunstone public folder and run: - - ``` - npm install - bower install - ``` - -Building minified JS and CSS files -================================== - -The dependencies defined in the previous section must be instaled before running these commands: - -Option A - Grunt ----------------- - -* Run the following command to generate the app.css file in the css folder: - - ``` - grunt sass - ``` - -* Run the following command to generate the minified js files in the dist foler -and the app.min.css in the css folder: - - ``` - grunt requirejs - ``` - -These are the files generate by the grunt requirejs command: - - ``` - css - app.min.css - dist - login.js, login.js.map main.js main.js.map - console - spice.js spice.js.map vnc.js vnc.js.map - ``` - -Option B - Scons ----------------- - -Scons includes an option to build the minified JS and CSS files. - - ``` - scons sunstone=yes - ``` - -Install.sh -========== - -By default the install.sh script will install all the files, including the non-minified ones. Providing the -p option, only the minified files will be installed. - -Documentation -============= - -[JSDoc](http://usejsdoc.org/) is used for the JS documentation. - -Examples --------- - -* Parameters with properties - - ``` - /** - * Assign the project to an employee. - * @param {Object} employee - The employee who is responsible for the project. - * @param {string} employee.name - The name of the employee. - * @param {string} employee.department - The employee's department. - */ - Project.prototype.assign = function(employee) { - // ... - }; - ``` - -* Optional parameter - - ``` - /** - * @param {string} [somebody] - Somebody's name. - */ - function sayHello(somebody) { - if (!somebody) { - somebody = 'John Doe'; - } - alert('Hello ' + somebody); - } - ``` - -* Returns - - ``` - /** - * Returns the sum of a and b - * @param {Number} a - * @param {Number} b - * @param {Boolean} retArr If set to true, the function will return an array - * @returns {Number|Array} Sum of a and b or an array that contains a, b and the sum of a and b. - */ - function sum(a, b, retArr) { - if (retArr) { - return [a, b, a + b]; - } - return a + b; - } - ``` - diff --git a/public/SConstruct b/public/SConstruct deleted file mode 100644 index 0b58bb8a..00000000 --- a/public/SConstruct +++ /dev/null @@ -1,33 +0,0 @@ -# SConstruct for share/man - -# -------------------------------------------------------------------------- # -# Copyright 2002-2017, OpenNebula Project, OpenNebula Systems # -# # -# Licensed under the Apache License, Version 2.0 (the "License"); you may # -# not use this file except in compliance with the License. You may obtain # -# a copy of the License at # -# # -# http://www.apache.org/licenses/LICENSE-2.0 # -# # -# Unless required by applicable law or agreed to in writing, software # -# distributed under the License is distributed on an "AS IS" BASIS, # -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # -# See the License for the specific language governing permissions and # -# limitations under the License. # -#--------------------------------------------------------------------------- # - -import os - -Import('env') - -if env['sunstone']=='yes': - print "Generating Sunstone minified files\n" - exit_code=os.system("grunt --gruntfile ./Gruntfile.js sass") - if exit_code != 0: - print "Error generating Sunstone css files\n" - exit(-1) - - exit_code=os.system("grunt --gruntfile ./Gruntfile.js requirejs") - if exit_code != 0: - print "Error generating minifying Sunstone files\n" - exit(-1) diff --git a/public/app/addons/end.js b/public/app/addons/end.js deleted file mode 100644 index b20a5427..00000000 --- a/public/app/addons/end.js +++ /dev/null @@ -1 +0,0 @@ -// end-addon-section // diff --git a/public/app/addons/start.js b/public/app/addons/start.js deleted file mode 100644 index b4f12966..00000000 --- a/public/app/addons/start.js +++ /dev/null @@ -1 +0,0 @@ -// start-addon-section // \ No newline at end of file diff --git a/public/app/app.js b/public/app/app.js deleted file mode 100644 index ee8a7549..00000000 --- a/public/app/app.js +++ /dev/null @@ -1,520 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function (require) { - require('jquery'); - require('jquery-ui'); - - require('foundation'); - - Foundation.Dropdown.defaults.positionClass = 'left'; - Foundation.Dropdown.defaults.closeOnClick = true; - Foundation.DropdownMenu.defaults.closeOnClick = true; - Foundation.DropdownMenu.defaults.disableHover = true; - Foundation.DropdownMenu.defaults.clickOpen = true; - Foundation.Reveal.defaults.closeOnClick = false; - - _setupDataTableSearch(); - - var SETTINGS_TAB_ID = require('tabs/settings-tab/tabId'); - var PROVISION_TAB_ID = require('tabs/provision-tab/tabId'); - var Sunstone = require('sunstone'); - var Config = require('sunstone-config'); - var OpenNebula = require('opennebula'); - var Settings = require('opennebula/settings'); - var Notifier = require('utils/notifier'); - var Menu = require('utils/menu'); - var Locale = require('utils/locale'); - var UserAndZoneTemplate = require('hbs!sunstone/user_and_zone'); - - var _commonDialogs = [ - require('utils/dialogs/confirm'), - require('utils/dialogs/confirm-with-select'), - require('utils/dialogs/generic-confirm'), - require('utils/dialogs/clusters'), - require('utils/dialogs/overcommit') - ] - - - //$(window).load(function() { - // $('#loading').hide(); - //}); - $(document).ready(function () { - Sunstone.addDialogs(_commonDialogs); - Sunstone.addMainTabs(); - Sunstone.insertTabs(); - - if (Config.isTabEnabled(PROVISION_TAB_ID)) { - Menu.insertProvision(); - } else { - Menu.insert(); - Sunstone.setupNavigoRoutes(); - } - - _setupAccordion(); - _setupCloseDropdownsOnClick(); - _insertUserAndZoneSelector(); - - if (Config.isTabEnabled(PROVISION_TAB_ID)) { - Sunstone.showTab(PROVISION_TAB_ID); - } - - $('#loading').hide(); - }); - - function _setupCloseDropdownsOnClick() { - $(document).on("click", '.is-dropdown-submenu-item > a', function () { - $('.is-active > a', $(this).closest('.dropdown')).trigger('click'); - }); - } - - function _setupAccordion() { - $(document).on("click", ".accordion_advanced_toggle", function () { - if ($(this).hasClass("active")) { - $(this).removeClass("active"); - } else { - $(this).addClass("active"); - } - - $(".content", $(this).closest(".accordion_advanced")).toggle(); - - return false; - }) - } - - function _insertUserAndZoneSelector() { - - this.idGroup = -2; /*All*/ - Config.changeFilter(false); - // console.log('Config', config.user_config.default_view); - if (config.user_config.default_view == 'user') { - - var text; - OpenNebula.User.show({ - data: { 'id': config.user_id }, success: function (a, b) { - template = b; - if (template.USER.TEMPLATE.BALANCE != undefined) { - text = template.USER.TEMPLATE.BALANCE; - var style = ''; - var str = ''; - - $('head').append(style); - - Settings.cloud({ - success: function (r, res) { - var settings = r.response; - if (settings.CURRENCY_MAIN == undefined) { - settings.CURRENCY_MAIN = 'USD'; - } - $('.divfrombalance').prepend('
  • ' + Locale.tr("Balance") + ': ' + text + ' ' + settings.CURRENCY_MAIN + '' + str + '
  • '); - } - }); - - - $(document).ready(function ($) { - $('.popup-open').click(function () { - $('.popup-fade').fadeIn(0); - return false; - }); - - $(document).keydown(function (e) { - if (e.keyCode === 27) { - e.stopPropagation(); - $('.popup-fade').fadeOut(0); - } - }); - - $('.popup-fade').click(function (e) { - if ($(e.target).closest('.popup').length == 0) { - $(this).fadeOut(0); - } - }); - }); - } - } - }); - } - - - $(".user-zone-info").html(UserAndZoneTemplate({ - filterView: Config['filterView'], - displayName: config['display_name'], - settingsTabEnabled: Config.isTabEnabled(SETTINGS_TAB_ID), - availableViews: config['available_views'], - zoneName: config['zone_name'], - isUser: config.user_config.default_view != 'user' - })).foundation(); - - $('#filter-view').hide(); - groupsRefresh(); - - $('.quickconf_view[view="' + config['user_config']["default_view"] + '"] i').addClass('fa-check'); - $(".user-zone-info a.quickconf_view_header").click(function () { - var context = $(this).closest('ul'); - $(".quickconf_view", context).toggle(); - - return false; - }); - - $(".user-zone-info a.quickconf_view").click(function () { - var sunstone_setting = { DEFAULT_VIEW: $(this).attr("view") }; - Sunstone.runAction("User.append_sunstone_setting_refresh", -1, sunstone_setting); - }); - - - function groupsRefresh() { - - OpenNebula.User.show({ - timeout: true, - data: { - id: config['user_id'] - }, - success: function (request, obj_user) { - var groups = obj_user.USER.GROUPS.ID; - this.primaryGroup = obj_user.USER.GID; - var groupsHTML = "
  • \ - " + Locale.tr("All") + "
  • "; - if (this.idGroup == -2) { - var groupsHTML = "
  • \ - " + Locale.tr("All") + "
  • "; - } - - if (!$.isArray(groups)) { - groups = groups.toString(); - groups = [groups]; - } - - that = this; - OpenNebula.Group.list({ - timeout: true, - success: function (request, group_list) { - var group_list_aux = group_list; - $.each(groups, function (key, value) { - var id = value; - $.each(group_list_aux, function (key, value) { - if (id == value.GROUP.ID) { - if (id == that.idGroup) { - groupsHTML += "
  • \ - " + value.GROUP.NAME + "\ -
  • "; - } else { - groupsHTML += "
  • \ - " + value.GROUP.NAME + "\ -
  • "; - } - return false; - } - }); - }); - }, - error: Notifier.onError - }); - - $('#userselector').on('click', function () { - $('.groups-menu').empty(); - $('.groups-menu').append(groupsHTML); - var primaryGroupChar = ''; - $('#' + that.primaryGroup + ' a').append(primaryGroupChar); - $('.groups').on('click', function () { - that.idGroup = $(this).attr('value'); - if (that.idGroup != -2) { - $('#primary-char').remove(); - Sunstone.runAction("User.chgrp", [parseInt(config['user_id'])], parseInt(that.idGroup)); - $('a', this).append(primaryGroupChar); - Config.changeFilter(true); - var filterName = $(this).text(); - $('#filter-view').show(); - $('.filter-name').html(filterName); - } else { - $('#filter-view').hide(); - Config.changeFilter(false); - } - $('.groups-menu a i').removeClass('fa-check'); - $('a i', this).addClass('fa-check'); - groupsRefresh(); - $('.refresh').click(); - $('.refresh-table').click(); - }); - }); - }, - error: Notifier.onError - }); - } - - function zoneRefresh() { - // Populate Zones dropdown - OpenNebula.Zone.list({ - timeout: true, - success: function (request, obj_list) { - $('.zone-ul').empty(); - $.each(obj_list, function () { - var icon; - - if (this.ZONE.NAME == config['zone_name']) { - icon = '' - } else { - icon = '' - } - - $('.zone-ul').append('
  • ' + - '' + icon + ' ' + this.ZONE.NAME + '
  • '); - }); - }, - error: Notifier.onError - }); - } - - $('#zonelector').on("click", function () { - zoneRefresh(); - }); - - $(".user-zone-info").on("click", 'a.zone-choice', function () { - $.ajax({ - url: 'config', - type: "GET", - headers: { - "ZONE_NAME": this.id - }, - dataType: "json", - success: function () { - window.location.href = "."; - }, - error: function (response) { - Notifier.onError(null, OpenNebula.Error(response)) - } - }); - }); - - $("a.logout", $(".user-zone-info ")).click(function () { - OpenNebula.Auth.logout({ - success: function () { - window.location.href = "login"; - }, - error: Notifier.onError - }); - - return false; - }); - - $(".user-zone-info a.configuration").click(function () { - //$(document).foundation('dropdown', 'closeall'); - Sunstone.showTab(SETTINGS_TAB_ID); - }); - } - - function _checkIP(sData) { - if (/^\d{1,3}[\.]\d{1,3}[\.]\d{1,3}[\.]\d{1,3}$/.test(sData)) { - return 'ip-address'; - } - return null; - } - - function _setupDataTableSearch() { - $.fn.dataTable.ext.type.order['file-size-pre'] = function (data) { - var matches = data.match(/^(\d+(?:\.\d+)?)\s*([a-z]+)/i); - var multipliers = { - B: 1, - KB: 1024, - MB: 1048576, - GB: 1073741824, - TB: 1099511627776, - PB: 1125899906842624 - }; - - - if (matches) { - var multiplier = multipliers[matches[2]]; - return parseFloat(matches[1]) * multiplier; - } else { - return -1; - } - } - - jQuery.extend(jQuery.fn.dataTableExt.oSort, { - "date-euro-pre": function (a) { - var x; - - if ($.trim(a) !== '') { - var frDatea = $.trim(a).split(' '); - var frTimea = (undefined != frDatea[1]) ? frDatea[1].split(':') : [00, 00, 00]; - var frDatea2 = frDatea[0].split('/'); - x = (frDatea2[2] + frDatea2[1] + frDatea2[0] + frTimea[0] + frTimea[1] + ((undefined != frTimea[2]) ? frTimea[2] : 0)) * 1; - } - else { - x = Infinity; - } - - return x; - }, - - "date-euro-asc": function (a, b) { - return a - b; - }, - - "date-euro-desc": function (a, b) { - return b - a; - } - - }); - - //source https://cdn.datatables.net/plug-ins/1.10.12/type-detection/ip-address.js (modified) - jQuery.fn.dataTableExt.aTypes.unshift( - function (sData) { - if (/^\d{1,3}[\.]\d{1,3}[\.]\d{1,3}[\.]\d{1,3}$/.test(sData)) { - return 'ip-address'; - } - return 'ip-address'; - } - ); - - //source https://datatables.net/plug-ins/sorting/ip-address (modified) - jQuery.extend(jQuery.fn.dataTableExt.oSort, { - "ip-address-pre": function (a) { - if (a != null && a.split) { - var ip = a.split("
    "); - var i, item; - if (ip.length == 1) { - var m = a.split("."), - n = a.split(":"); - } - else if (ip.length > 1) { - var m = ip[0].split("."), - n = ip[0].split(":"); - } - var x = "", - xa = ""; - - if (m.length == 4) { - // IPV4 - for (i = 0; i < m.length; i++) { - item = m[i]; - - if (item.length == 1) { - x += "00" + item; - } - else if (item.length == 2) { - x += "0" + item; - } - else { - x += item; - } - } - } - else if (n.length > 0) { - // IPV6 - var count = 0; - for (i = 0; i < n.length; i++) { - item = n[i]; - - if (i > 0) { - xa += ":"; - } - - if (item.length === 0) { - count += 0; - } - else if (item.length == 1) { - xa += "000" + item; - count += 4; - } - else if (item.length == 2) { - xa += "00" + item; - count += 4; - } - else if (item.length == 3) { - xa += "0" + item; - count += 4; - } - else { - xa += item; - count += 4; - } - } - - // Padding the :: - n = xa.split(":"); - var paddDone = 0; - - for (i = 0; i < n.length; i++) { - item = n[i]; - - if (item.length === 0 && paddDone === 0) { - for (var padding = 0; padding < (32 - count); padding++) { - x += "0"; - paddDone = 1; - } - } - else { - x += item; - } - } - } - - return x; - } else return a; - }, - "ip-address-asc": function (a, b) { - return ((a < b) ? -1 : ((a > b) ? 1 : 0)); - }, - - "ip-address-desc": function (a, b) { - return ((a < b) ? 1 : ((a > b) ? -1 : 0)); - } - }); - } -}); diff --git a/public/app/console/spice.js b/public/app/console/spice.js deleted file mode 100644 index 7f200500..00000000 --- a/public/app/console/spice.js +++ /dev/null @@ -1,128 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - require('spice-main'); - - var host = null, port = null; - var sc; - - function spice_set_cookie(name, value, days) { - var date, expires; - date = new Date(); - date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); - expires = "; expires=" + date.toGMTString(); - document.cookie = name + "=" + value + expires + "; path=/"; - }; - - function spice_query_var(name, defvalue) { - var match = RegExp('[?&]' + name + '=([^&]*)') - .exec(window.location.search); - return match ? - decodeURIComponent(match[1].replace(/\+/g, ' ')) - : defvalue; - } - - function spice_error(e) { - disconnect(); - } - - function connect() { - var host, port, password, scheme = "ws://", uri; - - // By default, use the host and port of server that served this file - host = spice_query_var('host', window.location.hostname); - - // Note that using the web server port only makes sense - // if your web server has a reverse proxy to relay the WebSocket - // traffic to the correct destination port. - var default_port = window.location.port; - if (!default_port) { - if (window.location.protocol == 'http:') { - default_port = 80; - } else if (window.location.protocol == 'https:') { - default_port = 443; - } - } - port = spice_query_var('port', default_port); - if (window.location.protocol == 'https:') { - scheme = "wss://"; - } - - // If a token variable is passed in, set the parameter in a cookie. - // This is used by nova-spiceproxy. - token = spice_query_var('token', null); - if (token) { - spice_set_cookie('token', token, 1) - } - - password = spice_query_var('password', ''); - path = spice_query_var('path', 'websockify'); - - if ((!host) || (!port)) { - console.log("must specify host and port in URL"); - return; - } - - if (sc) { - sc.stop(); - } - - uri = scheme + host + ":" + port + "?token=" + token; - - try { - sc = new SpiceMainConn({uri: uri, screen_id: "spice-screen", dump_id: "debug-div", - message_id: "message-div", password: password, onerror: spice_error, onagent: agent_connected}); - } - catch (e) { - alert(e.toString()); - disconnect(); - } - - } - - function disconnect() { - console.log(">> disconnect"); - if (sc) { - sc.stop(); - } - if (window.File && window.FileReader && window.FileList && window.Blob) { - var spice_xfer_area = document.getElementById('spice-xfer-area'); - document.getElementById('spice-area').removeChild(spice_xfer_area); - document.getElementById('spice-area').removeEventListener('dragover', handle_file_dragover, false); - document.getElementById('spice-area').removeEventListener('drop', handle_file_drop, false); - } - console.log("<< disconnect"); - } - - function agent_connected(sc) { - window.addEventListener('resize', handle_resize); - window.spice_connection = this; - - resize_helper(this); - - if (window.File && window.FileReader && window.FileList && window.Blob) { - var spice_xfer_area = document.createElement("div"); - spice_xfer_area.setAttribute('id', 'spice-xfer-area'); - document.getElementById('spice-area').addEventListener('dragover', handle_file_dragover, false); - document.getElementById('spice-area').addEventListener('drop', handle_file_drop, false); - } else { - console.log("File API is not supported"); - } - } - - connect(); -}); diff --git a/public/app/console/vnc.js b/public/app/console/vnc.js deleted file mode 100644 index 7d92e99a..00000000 --- a/public/app/console/vnc.js +++ /dev/null @@ -1,163 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - require('vnc-util'); - require('vnc-webutil'); - require('vnc-base64'); - require('vnc-websock'); - require('vnc-des'); - require('vnc-keysymdef'); - require('vnc-keyboard'); - require('vnc-input'); - require('vnc-display'); - require('vnc-jsunzip'); - require('vnc-rfb'); - require('vnc-keysym'); - - var rfb; - var encrypt = WebUtil.getQueryVar('encrypt', (window.location.protocol === "https:")); - var repeaterID = WebUtil.getQueryVar('repeaterID', ''); - var true_color = WebUtil.getQueryVar('true_color', true); - var local_cursor = WebUtil.getQueryVar('cursor', true); - var shared = WebUtil.getQueryVar('shared', true); - var view_only = WebUtil.getQueryVar('view_only', false); - var host = WebUtil.getQueryVar('host', window.location.hostname); - var port = WebUtil.getQueryVar('port', window.location.port); - var token = WebUtil.getQueryVar('token', null); - var password = WebUtil.getQueryVar('password', null); - var path = WebUtil.getQueryVar('path', 'websockify'); - - function passwordRequired(rfb) { - var msg; - msg = '
    = 1) { - xvpbuttons.style.display = 'inline'; - } else { - xvpbuttons.style.display = 'none'; - } - } - - var host, port, password, path, token; - - $D('sendCtrlAltDelButton').style.display = "inline"; - $D('sendCtrlAltDelButton').onclick = sendCtrlAltDel; - $D('xvpShutdownButton').onclick = xvpShutdown; - $D('xvpRebootButton').onclick = xvpReboot; - $D('xvpResetButton').onclick = xvpReset; - - WebUtil.init_logging(WebUtil.getQueryVar('logging', 'warn')); - document.title = unescape(WebUtil.getQueryVar('title', 'noVNC')); - // By default, use the host and port of server that served this file - - // if port == 80 (or 443) then it won't be present and should be - // set manually - if (!port) { - if (window.location.protocol.substring(0, 4) == 'http') { - port = 80; - } else if (window.location.protocol.substring(0, 5) == 'https') { - port = 443; - } - } - - // If a token variable is passed in, set the parameter in a cookie. - // This is used by nova-novncproxy. - if (token) { - WebUtil.createCookie('token', token, 1) - } - - if ((!host) || (!port)) { - updateState('failed', - "Must specify host and port in URL"); - return; - } - - rfb = new RFB({'target': $D('noVNC_canvas'), - 'encrypt': encrypt, - 'repeaterID': repeaterID, - 'true_color': true_color, - 'local_cursor': local_cursor, - 'shared': shared, - 'view_only': view_only, - 'onUpdateState': updateState, - 'onXvpInit': xvpInit, - 'onPasswordRequired': passwordRequired}); - console.log(host, port, password, path, token); - if (password) { - rfb.connect(host, port, password, path + "?token=" + token); - } else { - rfb.connect(host, port, undefined, path + "?token=" + token); - } -}) diff --git a/public/app/login.js b/public/app/login.js deleted file mode 100644 index 62a02cb0..00000000 --- a/public/app/login.js +++ /dev/null @@ -1,108 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - require('../bower_components/jquery/dist/jquery.min'); - var OpenNebulaAuth = require('opennebula/auth'); - - function auth_success(req, response) { - window.location.href = "."; - } - - function auth_error(req, error) { - - var status = error.error.http_status; - - switch (status){ - case 401: - $("#error_message").text("Invalid username or password"); - break; - case 500: - $("#error_message").text("OpenNebula is not running or there was a server exception. Please check the server logs."); - break; - case 0: - $("#error_message").text("No answer from server. Is it running?"); - break; - default: - $("#error_message").text("Unexpected error. Status " + status + ". Check the server logs."); - }; - $("#error_box").fadeIn("slow"); - $("#login_spinner").hide(); - } - - function authenticate() { - var username = $("#username").val(); - var password = $("#password").val(); - var remember = $("#check_remember").is(":checked"); - - $("#error_box").fadeOut("slow"); - $("#login_spinner").show(); - - OpenNebulaAuth.login({ - data: { - username: username, - password: password - }, - remember: remember, - success: auth_success, - error: auth_error - }); - } - - function getInternetExplorerVersion() { - // Returns the version of Internet Explorer or a -1 - // (indicating the use of another browser). - var rv = -1; // Return value assumes failure. - if (navigator.appName == 'Microsoft Internet Explorer') { - var ua = navigator.userAgent; - var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})"); - if (re.exec(ua) != null) - rv = parseFloat(RegExp.$1); - } - return rv; - } - - function checkVersion() { - var ver = getInternetExplorerVersion(); - - if (ver > -1) { - msg = ver <= 7.0 ? "You are using an old version of IE. \ - Please upgrade or use Firefox or Chrome for full compatibility." : - "OpenNebula Sunstone is best seen with Chrome or Firefox"; - $("#error_box").text(msg); - $("#error_box").fadeIn('slow'); - } - } - - $(document).ready(function() { - $("#login_form").submit(function () { - authenticate(); - return false; - }); - - //compact login elements according to screen height - if (screen.height <= 600) { - $('div#logo_sunstone').css("top", "15px"); - $('div#login').css("top", "10px"); - $('.error_message').css("top", "10px"); - }; - - $("input#username.box").focus(); - $("#login_spinner").hide(); - - checkVersion(); - }); -}); diff --git a/public/app/main.js b/public/app/main.js deleted file mode 100644 index 97730088..00000000 --- a/public/app/main.js +++ /dev/null @@ -1,367 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -require.config({ - paths: { - /* Almond */ - 'almond': '../bower_components/almond/almond', - - /* jQuery */ - 'jquery': '../bower_components/jquery/dist/jquery', - 'jquery-ui': '../bower_components/jquery-ui/jquery-ui', - - /* DataTables */ - 'datatables.net': '../bower_components/datatables/media/js/jquery.dataTables', - 'datatables.foundation': '../bower_components/datatables/media/js/dataTables.foundation', - - /* DataTables */ - 'jgrowl': '../bower_components/jgrowl/jquery.jgrowl', - - /* Foundation */ - 'foundation': '../bower_components/foundation-sites/dist/foundation', - //'foundation.core': '../bower_components/foundation/js/foundation/foundation', - //'foundation.abide': '../bower_components/foundation/js/foundation/foundation.abide', - //'foundation.accordion': '../bower_components/foundation/js/foundation/foundation.accordion', - //'foundation.alert': '../bower_components/foundation/js/foundation/foundation.alert', - //'foundation.clearing': '../bower_components/foundation/js/foundation/foundation.clearing', - //'foundation.dropdown': '../bower_components/foundation/js/foundation/foundation.dropdown', - //'foundation.equalizer': '../bower_components/foundation/js/foundation/foundation.equalizer', - //'foundation.interchange': '../bower_components/foundation/js/foundation/foundation.interchange', - //'foundation.joyride': '../bower_components/foundation/js/foundation/foundation.joyride', - //'foundation.magellan': '../bower_components/foundation/js/foundation/foundation.magellan', - //'foundation.offcanvas': '../bower_components/foundation/js/foundation/foundation.offcanvas', - //'foundation.orbit': '../bower_components/foundation/js/foundation/foundation.orbit', - //'foundation.reveal': '../bower_components/foundation/js/foundation/foundation.reveal', - //'foundation.slider': '../bower_components/foundation/js/foundation/foundation.slider', - //'foundation.tab': '../bower_components/foundation/js/foundation/foundation.tab', - //'foundation.tooltip': '../bower_components/foundation/js/foundation/foundation.tooltip', - //'foundation.topbar': '../bower_components/foundation/js/foundation/foundation.topbar', - - /* Handlebars */ - 'hbs': '../bower_components/require-handlebars-plugin/hbs', - - /* Resumable */ - 'resumable': '../bower_components/resumablejs/resumable', - - /* Flot Graphs */ - 'flot': '../bower_components/flot/jquery.flot', - 'flot.stack': '../bower_components/flot/jquery.flot.stack', - 'flot.navigate': '../bower_components/flot/jquery.flot.navigate', - 'flot.canvas': '../bower_components/flot/jquery.flot.canvas', - 'flot.resize': '../bower_components/flot/jquery.flot.resize', - 'flot.time': '../bower_components/flot/jquery.flot.time', - 'flot.tooltip': '../bower_components/flot.tooltip/js/jquery.flot.tooltip', - - /* VNC */ - 'vnc-util': '../bower_components/no-vnc/include/util', - 'vnc-webutil': '../bower_components/no-vnc/include/webutil', - 'vnc-base64': '../bower_components/no-vnc/include/base64', - 'vnc-websock': '../bower_components/no-vnc/include/websock', - 'vnc-des': '../bower_components/no-vnc/include/des', - 'vnc-keysymdef': '../bower_components/no-vnc/include/keysymdef', - 'vnc-keyboard': '../bower_components/no-vnc/include/keyboard', - 'vnc-input': '../bower_components/no-vnc/include/input', - 'vnc-display': '../bower_components/no-vnc/include/display', - 'vnc-jsunzip': '../bower_components/no-vnc/include/jsunzip', - 'vnc-rfb': '../bower_components/no-vnc/include/rfb', - 'vnc-keysym': '../bower_components/no-vnc/include/keysym', - - /* Spice */ - 'spice-main': '../bower_components/spice-html5/main', - 'spice-spicearraybuffer': '../bower_components/spice-html5/spicearraybuffer', - 'spice-enums': '../bower_components/spice-html5/enums', - 'spice-atKeynames': '../bower_components/spice-html5/atKeynames', - 'spice-utils': '../bower_components/spice-html5/utils', - 'spice-png': '../bower_components/spice-html5/png', - 'spice-lz': '../bower_components/spice-html5/lz', - 'spice-quic': '../bower_components/spice-html5/quic', - 'spice-bitmap': '../bower_components/spice-html5/bitmap', - 'spice-spicedataview': '../bower_components/spice-html5/spicedataview', - 'spice-spicetype': '../bower_components/spice-html5/spicetype', - 'spice-spicemsg': '../bower_components/spice-html5/spicemsg', - 'spice-wire': '../bower_components/spice-html5/wire', - 'spice-spiceconn': '../bower_components/spice-html5/spiceconn', - 'spice-display': '../bower_components/spice-html5/display', - 'spice-inputs': '../bower_components/spice-html5/inputs', - 'spice-webm': '../bower_components/spice-html5/webm', - 'spice-playback': '../bower_components/spice-html5/playback', - 'spice-simulatecursor': '../bower_components/spice-html5/simulatecursor', - 'spice-cursor': '../bower_components/spice-html5/cursor', - 'spice-jsbn': '../bower_components/spice-html5/thirdparty/jsbn', - 'spice-rsa': '../bower_components/spice-html5/thirdparty/rsa', - 'spice-prng4': '../bower_components/spice-html5/thirdparty/prng4', - 'spice-rng': '../bower_components/spice-html5/thirdparty/rng', - 'spice-sha1': '../bower_components/spice-html5/thirdparty/sha1', - 'spice-ticket': '../bower_components/spice-html5/ticket', - 'spice-resize': '../bower_components/spice-html5/resize', - 'spice-filexfer': '../bower_components/spice-html5/filexfer', - - /* vis.js */ - 'vis': '../bower_components/vis/dist/vis.min', - - /* navigo */ - 'Navigo': '../bower_components/navigo/lib/navigo.min', - - /* sprintf */ - 'sprintf': '../bower_components/sprintf/dist/sprintf.min' - }, - shim: { - /* Tabs */ - 'app': { - deps: [ - 'foundation', - 'jquery', - 'tabs/provision-tab', - 'tabs/dashboard-tab', - 'tabs/system-top-tab', - 'tabs/users-tab', - 'tabs/groups-tab', - 'tabs/vdcs-tab', - 'tabs/acls-tab', - 'tabs/templates-top-tab', - 'tabs/templates-tab', - 'tabs/oneflow-templates-tab', - 'tabs/vrouter-templates-tab', - 'tabs/instances-top-tab', - 'tabs/vms-tab', - 'tabs/oneflow-services-tab', - 'tabs/vrouters-tab', - 'tabs/infrastructure-top-tab', - 'tabs/clusters-tab', - 'tabs/hosts-tab', - 'tabs/zones-tab', - 'tabs/storage-top-tab', - 'tabs/datastores-tab', - 'tabs/images-tab', - 'tabs/files-tab', - 'tabs/marketplaces-tab', - 'tabs/marketplaceapps-tab', - 'tabs/network-top-tab', - 'tabs/vnets-tab', - 'tabs/vnets-topology-tab', - 'tabs/secgroups-tab', - 'tabs/settings-tab', - 'tabs/support-tab', - 'tabs/upgrade-top-tab', - 'tabs/vmgroup-tab', - 'tabs/automatization-top-tab', - 'tabs/ansible-tab', - 'tabs/ansible-process-tab' - ] - }, - - /* jQuery */ - 'jquery': { - exports: '$' - }, - - /* jGrowl */ - 'jgrowl': { - deps: ['jquery'] - }, - - /* Foundation */ - 'foundation': { - deps: ['jquery'] - }, - //'foundation.core': { - // deps: ['jquery', 'modernizr'], - // exports: 'Foundation' - //}, - //'foundation.abide': { - // deps: ['foundation.core'] - //}, - //'foundation.accordion': { - // deps: ['foundation.core'] - //}, - //'foundation.alert': { - // deps: ['foundation.core'] - //}, - //'foundation.clearing': { - // deps: ['foundation.core'] - //}, - //'foundation.dropdown': { - // deps: ['foundation.core'] - //}, - //'foundation.equalizer': { - // deps: ['foundation.core'] - //}, - //'foundation.interchange': { - // deps: ['foundation.core'] - //}, - //'foundation.joyride': { - // deps: ['foundation.core', 'jquery.cookie'] - //}, - //'foundation.magellan': { - // deps: ['foundation.core'] - //}, - //'foundation.offcanvas': { - // deps: ['foundation.core'] - //}, - //'foundation.orbit': { - // deps: ['foundation.core'] - //}, - //'foundation.reveal': { - // deps: ['foundation.core'] - //}, - //'foundation.slider': { - // deps: ['foundation.core'] - //}, - //'foundation.tab': { - // deps: ['foundation.core'] - //}, - //'foundation.tooltip': { - // deps: ['foundation.core'] - //}, - //'foundation.topbar': { - // deps: ['foundation.core'] - //}, - - /* Vendor Scripts */ - //'jquery.cookie': { - // deps: ['jquery'] - //}, - //'fastclick': { - // exports: 'FastClick' - //}, - //'modernizr': { - // exports: 'Modernizr' - //}, - //'placeholder': { - // exports: 'Placeholders' - //}, - - /* Flot Graphs */ - 'flot': { - deps: ['jquery'] - }, - 'flot.stack': { - deps: ['flot'] - }, - 'flot.resize': { - deps: ['flot'] - }, - 'flot.time': { - deps: ['flot'] - }, - 'flot.tooltip': { - deps: ['flot'] - }, - - /* VNC */ - 'vnc-util': { - exports: 'Util' - }, - 'vnc-webutil': { - deps: ["vnc-util"] - }, - 'vnc-base64': { - deps: ["vnc-util"] - }, - 'vnc-websock': { - deps: ["vnc-util"] - }, - 'vnc-des': { - deps: ["vnc-util"] - }, - 'vnc-keysymdef': { - deps: ["vnc-util"] - }, - 'vnc-keyboard': { - deps: ["vnc-util"] - }, - 'vnc-input': { - deps: ["vnc-util"] - }, - 'vnc-display': { - deps: ["vnc-util"] - }, - 'vnc-jsunzip': { - deps: ["vnc-util"] - }, - 'vnc-rfb': { - deps: ["vnc-util"] - }, - 'vnc-keysym': { - deps: ["vnc-util"] - }, - - 'spice-main': { - exports: 'SpiceMainConn', - deps: [ - 'spice-spiceconn', - 'spice-spicearraybuffer', - 'spice-enums', - 'spice-atKeynames', - 'spice-utils', - 'spice-png', - 'spice-lz', - 'spice-quic', - 'spice-bitmap', - 'spice-spicedataview', - 'spice-spicetype', - 'spice-spicemsg', - 'spice-wire', - 'spice-display', - 'spice-inputs', - 'spice-webm', - 'spice-playback', - 'spice-simulatecursor', - 'spice-cursor', - 'spice-jsbn', - 'spice-rsa', - 'spice-prng4', - 'spice-rng', - 'spice-sha1', - 'spice-ticket', - 'spice-resize', - 'spice-filexfer' - ] - }, - - 'spice-rng': { - deps: [ - 'spice-prng4' - ] - }, - - 'spice-display': { - deps: [ - 'spice-spiceconn' - ] - }, - - 'spice-inputs': { - deps: [ - 'spice-spiceconn' - ] - }, - - 'spice-playback': { - deps: [ - 'spice-spiceconn' - ] - }, - - 'spice-cursor': { - deps: [ - 'spice-spiceconn' - ] - } - } -}); - -require(['app'], function(App) {}); diff --git a/public/app/opennebula.js b/public/app/opennebula.js deleted file mode 100644 index efe3058f..00000000 --- a/public/app/opennebula.js +++ /dev/null @@ -1,100 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - require('jquery'); - - var Helper = require('./opennebula/helper'), - Action = require('./opennebula/action'), - Auth = require('./opennebula/auth'), - Error = require('./opennebula/error'), - - Acl = require('./opennebula/acl'), - Ansible = require('./opennebula/ansible'), - AnsibleProcess = require('./opennebula/ansible-process'), - Cluster = require('./opennebula/cluster'), - Datastore = require('./opennebula/datastore'), - Group = require('./opennebula/group'), - Host = require('./opennebula/host'), - Image = require('./opennebula/image'), - Network = require('./opennebula/network'), - Role = require('./opennebula/role'), - securitygroup = require('./opennebula/securitygroup'), - Service = require('./opennebula/service'), - ServiceTemplate = require('./opennebula/servicetemplate'), - Settings = require('./opennebula/settings'), - Support = require('./opennebula/support'), - Template = require('./opennebula/template'), - User = require('./opennebula/user'), - Vdc = require('./opennebula/vdc'), - Vm = require('./opennebula/vm'), - VMGroup = require('./opennebula/vmgroup'), - Zone = require('./opennebula/zone'), - VirtualRouter = require('./opennebula/virtualrouter'); - MarketPlace = require('./opennebula/marketplace'); - MarketPlaceApp = require('./opennebula/marketplaceapp'); - - if (typeof(csrftoken) != "undefined") { - $.ajaxPrefilter(function(options, originalOptions, jqXHR) { - var params = originalOptions.data; - - if (typeof(params) == "string") { - params = JSON.parse(params); - params["csrftoken"] = csrftoken; - options.data = JSON.stringify(params); - } else { - params = params || {}; - params["csrftoken"] = csrftoken; - options.data = $.param(params); - } - }); - } - - var OpenNebula = { - 'Helper': Helper, - 'Action': Action, - 'Auth': Auth, - 'Error': Error, - 'Acl': Acl, - 'Ansible': Ansible, - 'AnsibleProcess': AnsibleProcess, - 'Cluster': Cluster, - 'Datastore': Datastore, - 'Group': Group, - 'Host': Host, - 'Image': Image, - 'File': Image, - 'Network': Network, - 'Role': Role, - 'SecurityGroup': securitygroup, - 'Service': Service, - 'ServiceTemplate': ServiceTemplate, - 'Settings': Settings, - 'Support': Support, - 'Template': Template, - 'VirtualRouterTemplate': Template, - 'User': User, - 'Vdc': Vdc, - 'VM': Vm, - 'VMGroup': VMGroup, - 'Zone': Zone, - 'VirtualRouter': VirtualRouter, - 'MarketPlace': MarketPlace, - 'MarketPlaceApp': MarketPlaceApp - }; - - return OpenNebula; -}); diff --git a/public/app/opennebula/acl.js b/public/app/opennebula/acl.js deleted file mode 100644 index 6d093931..00000000 --- a/public/app/opennebula/acl.js +++ /dev/null @@ -1,39 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - var OpenNebulaAction = require('./action'); - - var RESOURCE = "ACL"; - - var Acl = { - "resource": RESOURCE, - "create" : function(params) { - OpenNebulaAction.create(params, RESOURCE); - }, - "del" : function(params) { - OpenNebulaAction.del(params, RESOURCE); - }, - "list" : function(params) { - OpenNebulaAction.list(params, RESOURCE); - }, - "getName": function(id){ - return ""; - } - } - - return Acl; -}) diff --git a/public/app/opennebula/action.js b/public/app/opennebula/action.js deleted file mode 100644 index 15347e18..00000000 --- a/public/app/opennebula/action.js +++ /dev/null @@ -1,406 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function (require) { - var OpenNebulaHelper = require('./helper'); - var OpenNebulaError = require('./error'); - var Config = require('sunstone-config'); - - var listCache = {}; - var listWaiting = {}; - var listCallbacks = {}; - - var nameIndex = {}; - - var CACHE_EXPIRE = 60000; //ms - - var _clearCache = function (cache_name) { - listCache[cache_name] = null; - //console.log(cache_name+" cache cleaned"); - } - - //Example: Simple action: publish. Simple action with action obj: deploy - var _simple_action = function (params, resource, method, action_obj, path, pathReplace = false) { - var callback = params.success; - var callbackError = params.error; - var id = params.data.id; - var action, request; - if (action_obj) { - action = OpenNebulaHelper.action(method, action_obj); - request = OpenNebulaHelper.request(resource, method, [id, action_obj]); - } else { - action = OpenNebulaHelper.action(method); - request = OpenNebulaHelper.request(resource, method, id); - }; - - var reqPath = path ? path : resource.toLowerCase(); - var url = pathReplace ? reqPath : reqPath + "/" + id + "/action"; - var cache_name = params.cache_name ? params.cache_name : resource; - - $.ajax({ - url: url, - type: "POST", - contentType: "application/json; charset=utf-8", - data: JSON.stringify(action), - success: function (response) { - console.log(request, response); - _clearCache(cache_name); - return callback ? callback(request, response) : null; - }, - error: function (response) { - console.log(request, response); - return callbackError ? - callbackError(request, OpenNebulaError(response)) : null; - } - }); - } - - var Action = { - "create": function (params, resource, path) { - var callback = params.success; - var callbackError = params.error; - var data = params.data; - var request = OpenNebulaHelper.request(resource, "create", data); - var reqPath = path ? path : resource.toLowerCase(); - var cache_name = params.cache_name ? params.cache_name : resource; - - $.ajax({ - url: reqPath, - type: "POST", - dataType: "json", - data: JSON.stringify(data), - contentType: "application/json; charset=utf-8", - success: function (response) { - _clearCache(cache_name); - - return callback ? callback(request, response) : null; - }, - error: function (response) { - return callbackError ? - callbackError(request, OpenNebulaError(response)) : null; - } - }); - }, - - "del": function (params, resource, path) { - var callback = params.success; - var callbackError = params.error; - var id = params.data.id; - var request = OpenNebulaHelper.request(resource, "delete", id); - var reqPath = path ? path : resource.toLowerCase(); - var cache_name = params.cache_name ? params.cache_name : resource; - - $.ajax({ - url: reqPath + "/" + id, - type: "DELETE", - success: function () { - _clearCache(cache_name); - - return callback ? callback(request) : null; - }, - error: function (response) { - return callbackError ? - callbackError(request, OpenNebulaError(response)) : null; - } - }); - }, - - "list": function (params, resource, path, process) { - var callback = params.success; - var callbackError = params.error; - var timeout = params.timeout || false; - var request = OpenNebulaHelper.request(resource, "list"); - var reqPath = path ? path : resource.toLowerCase(); - var cache_name = params.cache_name ? params.cache_name : resource; - - var options = params.options; - var force = false; - if (options) { - force = options.force; - } - - if (force) { - _clearCache(cache_name); - } - if (!force && - listCache[cache_name] && - listCache[cache_name]["timestamp"] + CACHE_EXPIRE > new Date().getTime()) { - - //console.log(cache_name+" list. Cache used"); - - return callback ? - callback(request, listCache[cache_name]["data"]) : null; - } - - // TODO: Because callbacks are queued, we may need to force a - // timeout. Otherwise a blocked call cannot be retried. - - if (!listCallbacks[cache_name]) { - listCallbacks[cache_name] = []; - } - - listCallbacks[cache_name].push({ - success: callback, - error: callbackError - }); - - //console.log(cache_name+" list. Callback queued"); - - if (listWaiting[cache_name]) { - return; - } - - listWaiting[cache_name] = true; - var pool_filter = Config.isChangedFilter() ? -4 : -2; - //console.log(cache_name+" list. NO cache, calling ajax"); - - $.ajax({ - url: reqPath, - type: "GET", - data: { - timeout: timeout, - pool_filter: pool_filter - }, - dataType: "json", - success: function (response) { - var list; - - if (process) { - list = process(response); - } else { - list = OpenNebulaHelper.pool(resource, response); - } - - nameIndex[cache_name] = OpenNebulaHelper.pool_name_processing( - resource + "_POOL", resource, response); - - listCache[cache_name] = { - timestamp: new Date().getTime(), - data: list - }; - - listWaiting[cache_name] = false; - - for (var i = 0; i < listCallbacks[cache_name].length; i++) { - var callback = listCallbacks[cache_name][i].success; - - if (callback) { - //console.log(cache_name+" list. Callback called"); - try { - callback(request, list, response); - } catch (err) { - console.error(err); - } - } - } - - listCallbacks[cache_name] = []; - - return; - }, - error: function (response) { - listWaiting[cache_name] = false; - - for (var i = 0; i < listCallbacks[cache_name].length; i++) { - var callback = listCallbacks[cache_name][i].error; - - if (callback) { - //console.log(cache_name+" list. ERROR Callback called"); - callback(request, OpenNebulaError(response)); - } - } - - listCallbacks[cache_name] = []; - - return; - } - }); - }, - - "list_in_zone": function (params, resource, path) { - var callback = params.success; - var callbackError = params.error; - var timeout = params.timeout || false; - var request = OpenNebulaHelper.request(resource, "list"); - var reqPath = path ? path : resource.toLowerCase(); - - $.ajax({ - url: reqPath, - type: "GET", - data: { - timeout: timeout, - zone_id: params.data.zone_id, - pool_filter: params.data.pool_filter - }, - dataType: "json", - success: function (response) { - var list = OpenNebulaHelper.pool(resource, response) - return callback ? - callback(request, list) : null; - }, - error: function (response) { - return callbackError ? - callbackError(request, OpenNebulaError(response)) : null; - } - }); - }, - - //Subresource examples: "log"... - "show": function (params, resource, subresource, path) { - var callback = params.success; - var callbackError = params.error; - var id = params.data.id; - var data = params.data; - var request = subresource ? - OpenNebulaHelper.request(resource, subresource, id) : - OpenNebulaHelper.request(resource, "show", id); - - var reqPath = path ? path : resource.toLowerCase(); - var url = reqPath + "/" + id; - url = subresource ? url + "/" + subresource : url; - - $.ajax({ - url: url, - type: "GET", - dataType: "json", - data: data, - success: function (response) { - return callback ? callback(request, response) : null; - }, - error: function (response) { - return callbackError ? - callbackError(request, OpenNebulaError(response)) : null; - } - }); - }, - - "chown": function (params, resource, path) { - var id = params.data.extra_param; - var action_obj = { - "owner_id": id, - "group_id": "-1" - }; - - _simple_action(params, resource, "chown", action_obj, path); - }, - - "chgrp": function (params, resource, path) { - var id = params.data.extra_param; - var action_obj = { - "owner_id": "-1", - "group_id": id - }; - - _simple_action(params, resource, "chown", action_obj, path); - }, - - "simple_action": _simple_action, - - "monitor": function (params, resource, all, path) { - var callback = params.success; - var callbackError = params.error; - var data = params.data; - - var method = "monitor"; - var request = OpenNebulaHelper.request(resource, method, data); - - var url = path ? path : resource.toLowerCase(); - url = all ? url + "/monitor" : url + "/" + params.data.id + "/monitor"; - - $.ajax({ - url: url, - type: "GET", - data: data['monitor'], - dataType: "json", - success: function (response) { - return callback ? callback(request, response) : null; - }, - error: function (response) { - return callbackError ? - callbackError(request, OpenNebulaError(response)) : null; - } - }); - }, - - "accounting": function (params, resource, path) { - var callback = params.success; - var callbackError = params.error; - var data = params.data; - - var method = "accounting"; - var request = OpenNebulaHelper.request(resource, method, data); - - var url = path ? path : resource.toLowerCase() + "/accounting"; - - $.ajax({ - url: url, - type: "GET", - data: data, - dataType: "json", - success: function (response) { - return callback ? callback(request, response) : null; - }, - error: function (response) { - return callbackError ? - callbackError(request, OpenNebulaError(response)) : null; - } - }); - }, - - "showback": function (params, resource, path) { - var callback = params.success; - var callbackError = params.error; - var data = params.data; - - var method = "showback"; - var request = OpenNebulaHelper.request(resource, method, data); - - var url = path ? path : resource.toLowerCase() + "/showback"; - - $.ajax({ - url: url, - type: "GET", - data: data, - dataType: "json", - success: function (response) { - return callback ? callback(request, response) : null; - }, - error: function (response) { - return callbackError ? - callbackError(request, OpenNebulaError(response)) : null; - } - }); - }, - - "getName": function (id, cache_name) { - if (nameIndex[cache_name] != undefined) { - var name = nameIndex[cache_name][id]; - if (name != undefined) { - return name; - } - - // TODO: if name is not found, perform a .list or .show to at least - // get it ready for the next call? - } - - return "" + id; - }, - - "clear_cache": _clearCache - }; - - return Action; -}); \ No newline at end of file diff --git a/public/app/opennebula/ansible-process.js b/public/app/opennebula/ansible-process.js deleted file mode 100644 index b8485b81..00000000 --- a/public/app/opennebula/ansible-process.js +++ /dev/null @@ -1,44 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - var OpenNebulaAction = require('./action'); - var Config = require('sunstone-config'); - - var RESOURCE = "ANSIBLE_PROCESS"; - - var AnsibleProcess = { - "resource": RESOURCE, - "create" : function(params) { - OpenNebulaAction.create(params, RESOURCE); - }, - "del" : function(params) { - OpenNebulaAction.del(params, RESOURCE); - }, - "list" : function(params) { - OpenNebulaAction.list(params, RESOURCE); - }, - "show" : function(params) { - OpenNebulaAction.show(params, RESOURCE); - }, - "run" : function(params) { - var action_obj = params.data.id ? params.data.id : {}; - OpenNebulaAction.simple_action(params, RESOURCE, "run", action_obj); - } - } - - return AnsibleProcess; -}) diff --git a/public/app/opennebula/ansible.js b/public/app/opennebula/ansible.js deleted file mode 100644 index cacb1060..00000000 --- a/public/app/opennebula/ansible.js +++ /dev/null @@ -1,71 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - var OpenNebulaAction = require('./action'); - var Config = require('sunstone-config'); - - var RESOURCE = "ANSIBLE"; - - var Ansible = { - "resource": RESOURCE, - "create" : function(params) { - OpenNebulaAction.create(params, RESOURCE); - }, - "del" : function(params) { - OpenNebulaAction.del(params, RESOURCE); - }, - "list" : function(params) { - OpenNebulaAction.list(params, RESOURCE); - }, - "show" : function(params) { - OpenNebulaAction.show(params, RESOURCE); - }, - "chown" : function(params) { - OpenNebulaAction.chown(params, RESOURCE); - }, - "chgrp" : function(params) { - OpenNebulaAction.chgrp(params, RESOURCE); - }, - "chmod" : function(params) { - var action_obj = params.data.extra_param.octet; - OpenNebulaAction.simple_action(params, RESOURCE, "chmod", action_obj); - }, - "update" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj); - }, - "run" : function(params) { - var action_obj = params.data.extra_param ? params.data.extra_param : {}; - OpenNebulaAction.simple_action(params, RESOURCE, "instantiate", action_obj); - }, - "clone" : function(params) { - var name = params.data.extra_param ? params.data.extra_param : ""; - var action_obj = {"name" : name}; - OpenNebulaAction.simple_action(params, RESOURCE, "clone", action_obj); - }, - "rename" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "rename", action_obj); - }, - "getName" : function(id) { - return OpenNebulaAction.getName(id, RESOURCE); - } - } - - return Ansible; - }) - \ No newline at end of file diff --git a/public/app/opennebula/auth.js b/public/app/opennebula/auth.js deleted file mode 100644 index b16bd588..00000000 --- a/public/app/opennebula/auth.js +++ /dev/null @@ -1,77 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - var OpenNebulaHelper = require('./helper'); - var OpenNebulaError = require('./error'); - - var RESOURCE = "AUTH"; - - var Auth = { - "login": function(params) { - var callback = params.success; - var callbackError = params.error; - var username = params.data.username; - var password = params.data.password; - var remember = params.remember; - - var request = OpenNebulaHelper.request(RESOURCE, "login"); - - $.ajax({ - url: "login", - type: "POST", - data: {remember: remember}, - beforeSend : function(req) { - if (username && password) { - var token = username + ':' + password; - var authString = 'Basic '; - authString += btoa(unescape(encodeURIComponent(token))); - req.setRequestHeader("Authorization", authString); - } - }, - success: function(response) { - return callback ? callback(request, response) : null; - }, - error: function(response) { - return callbackError ? - callbackError(request, OpenNebulaError(response)) : null; - } - }); - }, - - "logout": function(params) { - var callback = params.success; - var callbackError = params.error; - - var request = OpenNebulaHelper.request(RESOURCE, "logout"); - - $.ajax({ - url: "logout", - type: "POST", - success: function(response) { - // TODO $.cookie("one-user", null); - return callback ? callback(request, response) : null; - }, - error: function(response) { - return callbackError ? - callbackError(request, OpenNebulaError(response)) : null; - } - }); - } - } - - return Auth; -}) diff --git a/public/app/opennebula/cluster.js b/public/app/opennebula/cluster.js deleted file mode 100644 index 600e1c20..00000000 --- a/public/app/opennebula/cluster.js +++ /dev/null @@ -1,81 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - var OpenNebulaAction = require('./action'); - - var RESOURCE = "CLUSTER"; - - var Cluster = { - "resource": RESOURCE, - "create" : function(params) { - OpenNebulaAction.create(params, RESOURCE); - }, - "del" : function(params) { - OpenNebulaAction.del(params, RESOURCE); - }, - "list" : function(params) { - OpenNebulaAction.list(params, RESOURCE); - }, - "list_in_zone" : function(params) { - OpenNebulaAction.list_in_zone(params, RESOURCE); - }, - "show" : function(params) { - OpenNebulaAction.show(params, RESOURCE); - }, - "addhost" : function(params) { - var action_obj = {"host_id": params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "addhost", action_obj); - }, - "delhost" : function(params) { - var action_obj = {"host_id": params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "delhost", action_obj); - }, - "adddatastore" : function(params) { - var action_obj = {"ds_id": params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "adddatastore", action_obj); - }, - "deldatastore" : function(params) { - var action_obj = {"ds_id": params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "deldatastore", action_obj); - }, - "addvnet" : function(params) { - var action_obj = {"vnet_id": params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "addvnet", action_obj); - }, - "delvnet" : function(params) { - var action_obj = {"vnet_id": params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "delvnet", action_obj); - }, - "update" : function(params) { - var action_obj = {"template_raw" : params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj); - }, - "append": function(params) { - var action_obj = {"template_raw" : params.data.extra_param, append : true}; - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj); - }, - "rename" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "rename", action_obj); - }, - "getName": function(id){ - return OpenNebulaAction.getName(id, RESOURCE); - } - } - - return Cluster; -}) diff --git a/public/app/opennebula/datastore.js b/public/app/opennebula/datastore.js deleted file mode 100644 index 40c96295..00000000 --- a/public/app/opennebula/datastore.js +++ /dev/null @@ -1,145 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - var OpenNebulaAction = require('./action'); - var Locale = require('utils/locale'); - var Config = require('sunstone-config'); - var OpenNebulaHelper = require('./helper'); - - var RESOURCE = "DATASTORE"; - var STATES_STR = [ - Locale.tr("ON"), - Locale.tr("OFF")]; - - var TYPES_STR = [ - Locale.tr("IMAGE"), - Locale.tr("SYSTEM"), - Locale.tr("FILE") - ]; - - var STATES = { - READY : 0, - DISABLED : 1 - }; - - var TYPES = { - IMAGE_DS : 0, - SYSTEM_DS : 1, - FILE_DS : 2 - }; - - var dsMadIndex = {}; - - var Datastore = { - "resource": RESOURCE, - "stateStr": function(stateId) { - return STATES_STR[stateId]; - }, - "STATES": STATES, - "typeStr": function(typeId) { - return TYPES_STR[typeId]; - }, - "TYPES": TYPES, - "create" : function(params) { - OpenNebulaAction.create(params, RESOURCE); - }, - "del" : function(params) { - OpenNebulaAction.del(params, RESOURCE); - }, - "list" : function(params) { - OpenNebulaAction.list(params, RESOURCE, null, function(response) { - var list = OpenNebulaHelper.pool(RESOURCE, response); - - dsMadIndex = {}; - - $.each(list, function(){ - dsMadIndex[ this[RESOURCE].ID ] = this[RESOURCE].DS_MAD; - }); - - return list; - }); - }, - "list_in_zone" : function(params) { - OpenNebulaAction.list_in_zone(params, RESOURCE); - }, - "show" : function(params) { - OpenNebulaAction.show(params, RESOURCE); - }, - "chown" : function(params) { - OpenNebulaAction.chown(params, RESOURCE); - }, - "chgrp" : function(params) { - OpenNebulaAction.chgrp(params, RESOURCE); - }, - "chmod" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "chmod", action_obj); - }, - "update" : function(params) { - var action_obj = {"template_raw" : params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj); - }, - "append": function(params) { - var action_obj = {"template_raw" : params.data.extra_param, append : true}; - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj); - }, - "rename" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "rename", action_obj); - }, - "enable": function(params) { - OpenNebulaAction.simple_action(params, RESOURCE, "enable"); - }, - "disable": function(params) { - OpenNebulaAction.simple_action(params, RESOURCE, "disable"); - }, - "getName": function(id){ - return OpenNebulaAction.getName(id, RESOURCE); - }, - "isMarketExportSupported": function(id){ - var name = dsMadIndex[id]; - - if(name == undefined){ - // When in doubt, allow the action and let oned return failure - return true; - } - - var support = false; - - $.each(Config.onedConf.DS_MAD_CONF, function(){ - if (this.NAME == name){ - support = (this.MARKETPLACE_ACTIONS != undefined && - this.MARKETPLACE_ACTIONS.split(',').includes("export")); - return false; //break - } - }); - - return support; - }, - "initMarketExportSupported": function(){ - var pool_filter = Config.isChangedFilter()? -4 : -2; - this.list({ - data : {pool_filter : pool_filter}, - timeout: true, - success: function (request, obj_list) {}, - //error: Notifier.onError - }); - } - } - - return Datastore; -}) diff --git a/public/app/opennebula/error.js b/public/app/opennebula/error.js deleted file mode 100644 index 6bd990e0..00000000 --- a/public/app/opennebula/error.js +++ /dev/null @@ -1,35 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - var Error = function(resp) { - var error = {}; - if (resp.responseText) { - try { - error = JSON.parse(resp.responseText); - } - catch (e) { - error.error = {message: "It appears there was a server exception. Please check server's log."}; - }; - } else { - error.error = {}; - } - error.error.http_status = resp.status; - return error; - } - - return Error; -}) diff --git a/public/app/opennebula/group.js b/public/app/opennebula/group.js deleted file mode 100644 index bf0f3bf6..00000000 --- a/public/app/opennebula/group.js +++ /dev/null @@ -1,106 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - - var QuotaDefaults = require('utils/quotas/quota-defaults'); - var OpenNebulaAction = require('./action'); - var OpenNebulaHelper = require('./helper'); - var OpenNebulaError = require('./error'); - - var RESOURCE = "GROUP"; - - var Group = { - "resource": RESOURCE, - "create": function(params) { - OpenNebulaAction.create(params, RESOURCE); - }, - "del": function(params) { - OpenNebulaAction.del(params, RESOURCE); - }, - "list": function(params) { - if (params.options === undefined){ - params.options = { force: true }; - } - OpenNebulaAction.list(params, RESOURCE, null, function(response) { - var list = OpenNebulaHelper.pool(RESOURCE, response); - - QuotaDefaults.setDefaultGroupQuotas( - QuotaDefaults.default_quotas(response.GROUP_POOL.DEFAULT_GROUP_QUOTAS) - ); - - // Inject the VM quota. This info is returned separately in the - // pool info call, but the elementArray expects it inside the GROUP, - // as it is returned by the individual info call - var quotas_hash = OpenNebulaHelper.pool_hash_processing( - 'GROUP_POOL', 'QUOTAS', response); - - $.each(list,function(){ - var q = quotas_hash[this[RESOURCE].ID]; - - if (q != undefined) { - this[RESOURCE].VM_QUOTA = q.QUOTAS.VM_QUOTA; - } - }); - - return list; - }); - }, - "update": function(params) { - var action_obj = {"template_raw" : params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj); - }, - "append": function(params) { - var action_obj = {"template_raw" : params.data.extra_param, append : true}; - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj); - }, - "set_quota" : function(params) { - var action_obj = {quotas : params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "set_quota", action_obj); - }, - "show" : function(params) { - var callback = params.success; - - // Before calling the true callback, we update the default quotas - // included in the .show response - params.success = function(request, response) { - QuotaDefaults.setDefaultGroupQuotas( - QuotaDefaults.default_quotas(response.GROUP.DEFAULT_GROUP_QUOTAS) - ); - - return callback ? callback(request, response) : null; - }; - - OpenNebulaAction.show(params, RESOURCE); - }, - "accounting" : function(params) { - OpenNebulaAction.monitor(params, RESOURCE, false); - }, - "add_admin" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "add_admin", action_obj); - }, - "del_admin" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "del_admin", action_obj); - }, - "getName": function(id){ - return OpenNebulaAction.getName(id, RESOURCE); - } - }; - - return Group; -}); diff --git a/public/app/opennebula/helper.js b/public/app/opennebula/helper.js deleted file mode 100644 index 6d298c88..00000000 --- a/public/app/opennebula/helper.js +++ /dev/null @@ -1,149 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - var Helper = { - "action": function(action, params) { - obj = { - "action": { - "perform": action - } - } - if (params) { - obj.action.params = params; - } - return obj; - }, - - "request": function(resource, method, data) { - var r = { - "request": { - "resource" : resource, - "method" : method - } - } - if (data) { - if (!(data instanceof Array)) { - data = [data]; - } - r.request.data = data; - } - return r; - }, - - "pool": function(resource, response) { - var pool_name = resource + "_POOL"; - var type = resource; - var pool; - - if (typeof(pool_name) == "undefined") { - return Error('Incorrect Pool'); - } - - var p_pool = []; - - if (response[pool_name]) { - pool = response[pool_name][type]; - } else { - pool = null; - } - - if (pool == null) { - return p_pool; - } else if (pool.length) { - for (i = 0; i < pool.length; i++) { - p_pool[i] = {}; - p_pool[i][type] = pool[i]; - } - return (p_pool); - } else { - p_pool[0] = {}; - p_pool[0][type] = pool; - return (p_pool); - } - }, - - "pool_hash_processing": function(pool_name, resource_name, response) { - var pool; - - if (typeof(pool_name) == "undefined") { - return Error('Incorrect Pool'); - } - - var p_pool = {}; - - if (response[pool_name]) { - pool = response[pool_name][resource_name]; - } else { - pool = null; - } - - if (pool == null) { - return p_pool; - } else if (pool.length) { - for (i = 0; i < pool.length; i++) { - var res = {}; - res[resource_name] = pool[i]; - - p_pool[res[resource_name]['ID']] = res; - } - return (p_pool); - } else { - var res = {}; - res[resource_name] = pool; - - p_pool[res[resource_name]['ID']] = res; - - return (p_pool); - } - }, - - "pool_name_processing": function(pool_name, resource_name, response) { - var pool; - - if (typeof(pool_name) == "undefined") { - return Error('Incorrect Pool'); - } - - var p_pool = {}; - - if (response[pool_name]) { - pool = response[pool_name][resource_name]; - } else { - pool = null; - } - - if (pool == null) { - return p_pool; - } else if (pool.length) { - for (i = 0; i < pool.length; i++) { - var res = pool[i]; - - p_pool[res['ID']] = res['NAME']; - } - return (p_pool); - } else { - var res = pool; - - p_pool[res['ID']] = res['NAME']; - - return (p_pool); - } - } - }; - - return Helper; -}); diff --git a/public/app/opennebula/host.js b/public/app/opennebula/host.js deleted file mode 100644 index 27a1093b..00000000 --- a/public/app/opennebula/host.js +++ /dev/null @@ -1,327 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - var OpenNebulaAction = require('./action'); - var Locale = require('utils/locale'); - var OpenNebulaError = require('./error'); - var OpenNebulaHelper = require('./helper'); - - - var infrastructureCache; - var infrastructureWaiting = false; - var pcisCallbacks = []; - var customizationsCallbacks = []; - var kvmInfoCallbacks = []; - - var CACHE_EXPIRE = 300000; //ms - - var _clearCache = function() { - infrastructureCache = null; - //console.log("Host.pciDevices. Cache cleaned"); - }; - - var RESOURCE = "HOST"; - - var STATES_STR = [ - Locale.tr("INIT"), - Locale.tr("MONITORING_MONITORED"), - Locale.tr("MONITORED"), - Locale.tr("ERROR"), - Locale.tr("DISABLED"), - Locale.tr("MONITORING_ERROR"), - Locale.tr("MONITORING_INIT"), - Locale.tr("MONITORING_DISABLED"), - Locale.tr("OFFLINE") - ]; - - var SIMPLE_STATES_STR = [ - Locale.tr("INIT"), - Locale.tr("UPDATE"), - Locale.tr("ON"), - Locale.tr("ERROR"), - Locale.tr("DISABLED"), - Locale.tr("RETRY"), - Locale.tr("INIT"), - Locale.tr("DISABLED"), - Locale.tr("OFF") - ]; - - var STATES = { - INIT : 0, - MONITORING_MONITORED : 1, - MONITORED : 2, - ERROR : 3, - DISABLED : 4, - MONITORING_ERROR : 5, - MONITORING_INIT : 6, - MONITORING_DISABLED : 7, - OFFLINE : 8 - }; - - var Host = { - "resource": RESOURCE, - "stateStr": function(stateId) { - return STATES_STR[stateId]; - }, - "simpleStateStr": function(stateId) { - return SIMPLE_STATES_STR[stateId]; - }, - "STATES": STATES, - "create": function(params) { - OpenNebulaAction.create(params, RESOURCE); - _clearCache(); - }, - "del": function(params) { - OpenNebulaAction.del(params, RESOURCE); - _clearCache(); - }, - "list": function(params) { - OpenNebulaAction.list(params, RESOURCE); - }, - "list_in_zone" : function(params) { - OpenNebulaAction.list_in_zone(params, RESOURCE); - }, - "show": function(params) { - OpenNebulaAction.show(params, RESOURCE); - }, - "update": function(params) { - var action_obj = {"template_raw" : params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj); - _clearCache(); - }, - "append": function(params) { - var action_obj = {"template_raw" : params.data.extra_param, append : true}; - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj); - _clearCache(); - }, - "enable": function(params) { - OpenNebulaAction.simple_action(params, RESOURCE, "enable"); - _clearCache(); - }, - "disable": function(params) { - OpenNebulaAction.simple_action(params, RESOURCE, "disable"); - _clearCache(); - }, - "offline": function(params) { - OpenNebulaAction.simple_action(params, RESOURCE, "offline"); - _clearCache(); - }, - "monitor" : function(params) { - OpenNebulaAction.monitor(params, RESOURCE, false); - }, - "pool_monitor" : function(params) { - OpenNebulaAction.monitor(params, RESOURCE, true); - }, - "rename" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "rename", action_obj); - }, - "import_wild" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "import_wild", action_obj); - }, - "getName": function(id){ - return OpenNebulaAction.getName(id, RESOURCE); - }, - "pciDevices": function(params){ - var callback = params.success; - var callbackError = params.error; - var request = OpenNebulaHelper.request(RESOURCE, "infrastructure"); - - if (infrastructureCache && - infrastructureCache["timestamp"] + CACHE_EXPIRE > new Date().getTime()) { - - //console.log("Host.pciDevices. Cache used"); - - return callback ? - callback(request, infrastructureCache["pcis"]) : null; - } - - pcisCallbacks.push({ - success : callback, - error : callbackError - }); - - //console.log("Host.pciDevices. Callback queued"); - - _infrastructure(); - }, - "vcenterCustomizations": function(params){ - var callback = params.success; - var callbackError = params.error; - var request = OpenNebulaHelper.request(RESOURCE, "infrastructure"); - - if (infrastructureCache && - infrastructureCache["timestamp"] + CACHE_EXPIRE > new Date().getTime()) { - - //console.log("Host.vcenterCustomizations. Cache used"); - - return callback ? - callback(request, infrastructureCache["customizations"]) : null; - } - - customizationsCallbacks.push({ - success : callback, - error : callbackError - }); - - //console.log("Host.vcenterCustomizations. Callback queued"); - - _infrastructure(); - }, - "kvmInfo": function(params){ - var callback = params.success; - var callbackError = params.error; - var request = OpenNebulaHelper.request(RESOURCE, "infrastructure"); - - if (infrastructureCache && - infrastructureCache["timestamp"] + CACHE_EXPIRE > new Date().getTime()) { - - return callback ? - callback(request, infrastructureCache["kvm_info"]) : null; - } - - kvmInfoCallbacks.push({ - success : callback, - error : callbackError - }); - - _infrastructure(); - } - }; - - function _infrastructure(){ - if (infrastructureWaiting) { - return; - } - - var request = OpenNebulaHelper.request(RESOURCE, "infrastructure"); - - infrastructureWaiting = true; - - //console.log("Host.infrastructure. NO cache, calling ajax"); - - $.ajax({ - url: "infrastructure", - type: "GET", - dataType: "json", - success: function(response) { - var pcis = response.pci_devices; - - if (pcis == undefined){ - pcis = []; - } - - if (!$.isArray(pcis)){ // If only 1 convert to array - pcis = [pcis]; - } - - var customizations = response.vcenter_customizations; - - if (customizations == undefined){ - customizations = []; - } - - if (!$.isArray(customizations)){ // If only 1 convert to array - customizations = [customizations]; - } - - var kvm_info = response.kvm_info; - - if (kvm_info == undefined){ - kvm_info = []; - } - - if (!$.isArray(kvm_info)){ // If only 1 convert to array - kvm_info = [kvm_info]; - } - - infrastructureCache = { - timestamp : new Date().getTime(), - pcis : pcis, - customizations : customizations, - kvm_info : kvm_info - }; - - infrastructureWaiting = false; - - for (var i = 0; i < pcisCallbacks.length; i++) { - var callback = pcisCallbacks[i].success; - - if (callback) { - //console.log("Host.pciDevices. Callback called"); - callback(request, pcis); - } - } - - pcisCallbacks = []; - - for (var i = 0; i < customizationsCallbacks.length; i++) { - var callback = customizationsCallbacks[i].success; - - if (callback) { - //console.log("Host.vcenterCustomizations. Callback called"); - callback(request, customizations); - } - } - - customizationsCallbacks = []; - - for (var i = 0; i < kvmInfoCallbacks.length; i++) { - var callback = kvmInfoCallbacks[i].success; - - if (callback) { - callback(request, kvm_info); - } - } - - kvmInfoCallbacks = []; - - return; - }, - error: function(response) { - infrastructureWaiting = false; - - for (var i = 0; i < pcisCallbacks.length; i++) { - var callback = pcisCallbacks[i].error; - - if (callback) { - //console.log("Host.pciDevices. ERROR Callback called"); - callback(request, OpenNebulaError(response)); - } - } - - pcisCallbacks = []; - - for (var i = 0; i < customizationsCallbacks.length; i++) { - var callback = customizationsCallbacks[i].error; - - if (callback) { - //console.log("Host.vcenterCustomizations. ERROR Callback called"); - callback(request, OpenNebulaError(response)); - } - } - - customizationsCallbacks = []; - - return; - } - }); - } - - return Host; -}) diff --git a/public/app/opennebula/image.js b/public/app/opennebula/image.js deleted file mode 100644 index ec28c448..00000000 --- a/public/app/opennebula/image.js +++ /dev/null @@ -1,171 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - var OpenNebulaAction = require('./action'); - var Locale = require('utils/locale'); - - var RESOURCE = "IMAGE"; - var STATES_STR = [ - Locale.tr("INIT"), - Locale.tr("READY"), - Locale.tr("USED"), - Locale.tr("DISABLED"), - Locale.tr("LOCKED"), - Locale.tr("ERROR"), - Locale.tr("CLONE"), - Locale.tr("DELETE"), - Locale.tr("USED_PERS"), - Locale.tr("LOCKED_USED"), - Locale.tr("LOCKED_USED_PERS") - ]; - - var TYPES_STR = [ - Locale.tr("OS"), - Locale.tr("CDROM"), - Locale.tr("DATABLOCK"), - Locale.tr("KERNEL"), - Locale.tr("RAMDISK"), - Locale.tr("CONTEXT") - ]; - - var STATES_COLOR = [ - 'off', // INIT - 'running', // READY - 'running', // USED - 'error', // DISABLED - 'deploying', // LOCKED - 'error', // ERROR - 'error', // CLONE - 'error', // DELETE - 'error', // USED_PERS - 'deploying', // LOCKED_USED - 'error' // LOCKED_USED_PERS - ]; - - var STATES = { - INIT : 0, - READY : 1, - USED : 2, - DISABLED : 3, - LOCKED : 4, - ERROR : 5, - CLONE : 6, - DELETE : 7, - USED_PERS : 8, - LOCKED_USED : 9, - LOCKED_USED_PERS : 10 - }; - - var TYPES = { - OS : 0, - CDROM : 1, - DATABLOCK : 2, - KERNEL : 3, - RAMDISK : 4, - CONTEXT : 5 - }; - - var Image = { - "resource": RESOURCE, - "stateStr": function(stateId) { - return STATES_STR[stateId]; - }, - /** - * @return {String} css class for this state. Use: - * color + '-color' font color class - */ - "stateColor": function(stateId) { - return STATES_COLOR[stateId]; - }, - "STATES": STATES, - "typeStr": function(typeId) { - return TYPES_STR[typeId]; - }, - "TYPES": TYPES, - "create": function(params) { - OpenNebulaAction.create(params, RESOURCE); - }, - "del": function(params) { - OpenNebulaAction.del(params, RESOURCE); - }, - "list": function(params) { - OpenNebulaAction.list(params, RESOURCE); - }, - "show": function(params) { - OpenNebulaAction.show(params, RESOURCE); - }, - "chown" : function(params) { - OpenNebulaAction.chown(params, RESOURCE); - }, - "chgrp" : function(params) { - OpenNebulaAction.chgrp(params, RESOURCE); - }, - "chmod" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "chmod", action_obj); - }, - "append": function(params) { - var action_obj = {"template_raw" : params.data.extra_param, append : true}; - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj); - }, - "update": function(params) { - var action_obj = {"template_raw" : params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj); - }, - "enable": function(params) { - OpenNebulaAction.simple_action(params, RESOURCE, "enable"); - }, - "disable": function(params) { - OpenNebulaAction.simple_action(params, RESOURCE, "disable"); - }, - "persistent": function(params) { - OpenNebulaAction.simple_action(params, RESOURCE, "persistent"); - }, - "nonpersistent": function(params) { - OpenNebulaAction.simple_action(params, RESOURCE, "nonpersistent"); - }, - "chtype": function(params) { - var action_obj = {"type" : params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "chtype", action_obj); - }, - "clone" : function(params) { - var action_obj = params.data.extra_param ? params.data.extra_param : {}; - OpenNebulaAction.simple_action(params, RESOURCE, "clone", action_obj); - }, - "rename" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "rename", action_obj); - }, - "snapshot_flatten": function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "snapshot_flatten", action_obj); - }, - "snapshot_revert": function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "snapshot_revert", action_obj); - }, - "snapshot_delete": function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "snapshot_delete", action_obj); - }, - "getName": function(id){ - return OpenNebulaAction.getName(id, RESOURCE); - } - } - - return Image; -}) diff --git a/public/app/opennebula/marketplace.js b/public/app/opennebula/marketplace.js deleted file mode 100644 index 1b267ad1..00000000 --- a/public/app/opennebula/marketplace.js +++ /dev/null @@ -1,68 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - var OpenNebulaAction = require('./action'); - var Locale = require('utils/locale'); - - var RESOURCE = "MARKETPLACE"; - - var MarketPlace = { - "resource": RESOURCE, - "create" : function(params) { - OpenNebulaAction.create(params, RESOURCE); - }, - "del" : function(params) { - OpenNebulaAction.del(params, RESOURCE); - }, - "list" : function(params) { - OpenNebulaAction.list(params, RESOURCE); - }, - "list_in_zone" : function(params) { - OpenNebulaAction.list_in_zone(params, RESOURCE); - }, - "show" : function(params) { - OpenNebulaAction.show(params, RESOURCE); - }, - "chown" : function(params) { - OpenNebulaAction.chown(params, RESOURCE); - }, - "chgrp" : function(params) { - OpenNebulaAction.chgrp(params, RESOURCE); - }, - "chmod" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "chmod", action_obj); - }, - "update" : function(params) { - var action_obj = {"template_raw" : params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj); - }, - "append": function(params) { - var action_obj = {"template_raw" : params.data.extra_param, append : true}; - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj); - }, - "rename" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "rename", action_obj); - }, - "getName": function(id){ - return OpenNebulaAction.getName(id, RESOURCE); - } - } - - return MarketPlace; -}) diff --git a/public/app/opennebula/marketplaceapp.js b/public/app/opennebula/marketplaceapp.js deleted file mode 100644 index 1266dafb..00000000 --- a/public/app/opennebula/marketplaceapp.js +++ /dev/null @@ -1,116 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - var OpenNebulaAction = require('./action'); - var Locale = require('utils/locale'); - - var RESOURCE = "MARKETPLACEAPP"; - - var STATES_STR = [ - Locale.tr("INIT"), - Locale.tr("READY"), - Locale.tr("LOCKED"), - Locale.tr("ERROR"), - Locale.tr("DISABLED") - ]; - - var TYPES_STR = [ - Locale.tr("UNKNOWN"), - Locale.tr("IMAGE"), - Locale.tr("VMTEMPLATE"), - Locale.tr("SERVICE_TEMPLATE") - ]; - - var STATES = { - INIT : 0, - READY : 1, - LOCKED : 2, - ERROR : 3, - DISABLED : 4 - }; - - var TYPES = { - UNKNOWN : 0, - IMAGE : 1, - VMTEMPLATE : 2, - SERVICE_TEMPLATE : 3 - }; - - var MarketPlaceApp = { - "resource": RESOURCE, - "stateStr": function(stateId) { - return STATES_STR[stateId]; - }, - "STATES": STATES, - "typeStr": function(typeId) { - return TYPES_STR[typeId]; - }, - "TYPES": TYPES, - "create" : function(params) { - OpenNebulaAction.create(params, RESOURCE); - }, - "del" : function(params) { - OpenNebulaAction.del(params, RESOURCE); - }, - "list" : function(params) { - OpenNebulaAction.list(params, RESOURCE); - }, - "list_in_zone" : function(params) { - OpenNebulaAction.list_in_zone(params, RESOURCE); - }, - "show" : function(params) { - OpenNebulaAction.show(params, RESOURCE); - }, - "chown" : function(params) { - OpenNebulaAction.chown(params, RESOURCE); - }, - "chgrp" : function(params) { - OpenNebulaAction.chgrp(params, RESOURCE); - }, - "chmod" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "chmod", action_obj); - }, - "update" : function(params) { - var action_obj = {"template_raw" : params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj); - }, - "append": function(params) { - var action_obj = {"template_raw" : params.data.extra_param, append : true}; - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj); - }, - "rename" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "rename", action_obj); - }, - "export" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "export", action_obj); - }, - "enable": function(params) { - OpenNebulaAction.simple_action(params, RESOURCE, "enable"); - }, - "disable": function(params) { - OpenNebulaAction.simple_action(params, RESOURCE, "disable"); - }, - "getName": function(id){ - return OpenNebulaAction.getName(id, RESOURCE); - } - } - - return MarketPlaceApp; -}) diff --git a/public/app/opennebula/network.js b/public/app/opennebula/network.js deleted file mode 100644 index 037ec11c..00000000 --- a/public/app/opennebula/network.js +++ /dev/null @@ -1,125 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function (require) { - var OpenNebulaAction = require('./action'); - - var RESOURCE = "VNET"; - - var Network = { - "resource": RESOURCE, - "create": function (params) { - OpenNebulaAction.create(params, RESOURCE); - }, - "del": function (params) { - OpenNebulaAction.del(params, RESOURCE); - }, - "list": function (params) { - OpenNebulaAction.list(params, RESOURCE); - }, - "list_in_zone": function (params) { - OpenNebulaAction.list_in_zone(params, RESOURCE); - }, - "show": function (params) { - OpenNebulaAction.show(params, RESOURCE); - }, - "chown": function (params) { - OpenNebulaAction.chown(params, RESOURCE); - }, - "chgrp": function (params) { - OpenNebulaAction.chgrp(params, RESOURCE); - }, - "chmod": function (params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "chmod", action_obj); - }, - "publish": function (params) { - OpenNebulaAction.simple_action(params, RESOURCE, "publish"); - }, - "unpublish": function (params) { - OpenNebulaAction.simple_action(params, RESOURCE, "unpublish"); - }, - "hold": function (params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "hold", action_obj); - }, - "release": function (params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "release", action_obj); - }, - "add_ar": function (params) { - var action_obj = { "ar_template": params.data.extra_param }; - OpenNebulaAction.simple_action(params, RESOURCE, "add_ar", action_obj); - }, - "rm_ar": function (params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "rm_ar", action_obj); - }, - "update_ar": function (params) { - var action_obj = { "ar_template": params.data.extra_param }; - OpenNebulaAction.simple_action(params, RESOURCE, "update_ar", action_obj); - }, - "reserve": function (params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "reserve", action_obj); - }, - "update": function (params) { - var action_obj = { "template_raw": params.data.extra_param }; - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj); - }, - "append": function (params) { - var action_obj = { "template_raw": params.data.extra_param, append: true }; - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj); - }, - "rename": function (params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "rename", action_obj); - }, - "getName": function (id) { - return OpenNebulaAction.getName(id, RESOURCE); - }, - "reserve_public_ip": function ({ n: amount, u: user_id }, callback) { - $.ajax({ - url: '/ione/reserve_public_ip', - type: 'POST', - data: JSON.stringify({ "params": [{ "n": amount * 1, "u": user_id * 1 }] }), - success: function (req, res) { - console.log('SUCCESS -> ', { req, res }) - return callback ? callback(req, res) : null; - }, - error: function (req, res) { - console.log('ERROR ->', { req, res }); - } - }); - }, - "release_public_ip": function ({ vn, ar }, callback) { - $.ajax({ - url: '/ione/release_public_ip', - type: 'POST', - data: JSON.stringify({ "params": [{ "vn": vn * 1, "ar": ar * 1 }] }), - success: function (req, res) { - console.log('SUCCESS -> ', { req, res }) - return callback ? callback(req, res) : null; - }, - error: function (req, res) { - console.log('ERROR ->', { req, res }); - } - }); - } - } - - return Network; -}) diff --git a/public/app/opennebula/role.js b/public/app/opennebula/role.js deleted file mode 100644 index d7803199..00000000 --- a/public/app/opennebula/role.js +++ /dev/null @@ -1,190 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - var OpenNebulaAction = require('./action'); - var OpenNebulaError = require('./error'); - var OpenNebulaHelper = require('./helper'); - var Locale = require('utils/locale'); - - var RESOURCE = "DOCUMENT"; - var PATH = 'service'; - - var TAB_ID = require('tabs/oneflow-services-tab/tabId'); - var PANEL_ID = require('tabs/oneflow-services-tab/panels/roles/panelId'); - - function generate_batch_action_params() { - var context = $('#'+TAB_ID+' #'+PANEL_ID); - - var action_obj = { - "period" : $("#batch_action_period", context).val(), - "number" : $("#batch_action_number", context).val()}; - - return action_obj; - } - - var Role = { - "resource": RESOURCE, - "state" : function(state_int) { - state_int = state_int ? state_int : 0; - var state = [ - Locale.tr("PENDING"), - Locale.tr("DEPLOYING"), - Locale.tr("RUNNING"), - Locale.tr("UNDEPLOYING"), - Locale.tr("WARNING"), - Locale.tr("DONE"), - Locale.tr("FAILED_UNDEPLOYING"), - Locale.tr("FAILED_DEPLOYING"), - Locale.tr("SCALING"), - Locale.tr("FAILED_SCALING"), - Locale.tr("COOLDOWN") - ][state_int] - return state ? state : state_int; - }, - "hold" : function(params) { - OpenNebulaAction.simple_action(params, - RESOURCE, - "hold", - generate_batch_action_params(), - PATH); - }, - "release" : function(params) { - OpenNebulaAction.simple_action(params, - RESOURCE, - "release", - generate_batch_action_params(), - PATH); - }, - "suspend" : function(params) { - OpenNebulaAction.simple_action(params, - RESOURCE, - "suspend", - generate_batch_action_params(), - PATH); - }, - "resume" : function(params) { - OpenNebulaAction.simple_action(params, - RESOURCE, - "resume", - generate_batch_action_params(), - PATH); - }, - "stop" : function(params) { - OpenNebulaAction.simple_action(params, - RESOURCE, - "stop", - generate_batch_action_params(), - PATH); - }, - "boot" : function(params) { - OpenNebulaAction.simple_action(params, - RESOURCE, - "boot", - generate_batch_action_params(), - PATH); - }, - "reboot" : function(params) { - OpenNebulaAction.simple_action(params, - RESOURCE, - "reboot", - generate_batch_action_params(), - PATH); - }, - "reboot_hard" : function(params) { - OpenNebulaAction.simple_action(params, - RESOURCE, - "reboot-hard", - generate_batch_action_params(), - PATH); - }, - "poweroff" : function(params) { - OpenNebulaAction.simple_action(params, - RESOURCE, - "poweroff", - generate_batch_action_params(), - PATH); - }, - "poweroff_hard" : function(params) { - OpenNebulaAction.simple_action(params, - RESOURCE, - "poweroff-hard", - generate_batch_action_params(), - PATH); - }, - "undeploy" : function(params) { - OpenNebulaAction.simple_action(params, - RESOURCE, - "undeploy", - generate_batch_action_params(), - PATH); - }, - "undeploy_hard" : function(params) { - OpenNebulaAction.simple_action(params, - RESOURCE, - "undeploy-hard", - generate_batch_action_params(), - PATH); - }, - "snapshot_create" : function(params) { - OpenNebulaAction.simple_action(params, - RESOURCE, - "snapshot-create", - generate_batch_action_params(), - PATH); - }, - "terminate" : function(params) { - OpenNebulaAction.simple_action(params, - RESOURCE, - "terminate", - generate_batch_action_params(), - PATH); - }, - "terminate_hard" : function(params) { - OpenNebulaAction.simple_action(params, - RESOURCE, - "terminate-hard", - generate_batch_action_params(), - PATH); - }, - "recover" : function(params) { - OpenNebulaAction.simple_action(params, - RESOURCE, - "recover", - null, - PATH); - }, - "update" : function(params) { - var request = OpenNebulaHelper.request(RESOURCE, "update", params.data.id); - - $.ajax({ - url: PATH + "/" + params.data.id, - type: "PUT", - dataType: "json", - contentType: "application/json; charset=utf-8", - data: JSON.stringify(params.data.extra_param), - success: function(response) { - return params.success ? params.success(request, response) : null; - }, - error: function(response) { - return params.error ? params.error(request, OpenNebulaError(response)) : null; - } - }); - } - } - - return Role; -}) diff --git a/public/app/opennebula/securitygroup.js b/public/app/opennebula/securitygroup.js deleted file mode 100644 index f0c15b73..00000000 --- a/public/app/opennebula/securitygroup.js +++ /dev/null @@ -1,74 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - var OpenNebulaAction = require('./action'); - - var RESOURCE = "SECURITY_GROUP"; - - var SecurityGroup = { - "resource" : "SECURITY_GROUP", - - "create" : function(params) { - OpenNebulaAction.create(params, RESOURCE); - }, - "del" : function(params) { - OpenNebulaAction.del(params, RESOURCE); - }, - "list" : function(params) { - OpenNebulaAction.list(params, RESOURCE); - }, - "show" : function(params) { - OpenNebulaAction.show(params, RESOURCE); - }, - "chown" : function(params) { - OpenNebulaAction.chown(params, RESOURCE); - }, - "chgrp" : function(params) { - OpenNebulaAction.chgrp(params, RESOURCE); - }, - "chmod" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "chmod", action_obj); - }, - "update": function(params) { - var action_obj = {"template_raw" : params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj); - }, - "append": function(params) { - var action_obj = {"template_raw" : params.data.extra_param, append : true}; - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj); - }, - "clone" : function(params) { - var name = params.data.extra_param ? params.data.extra_param : ""; - var action_obj = {"name" : name}; - OpenNebulaAction.simple_action(params, RESOURCE, "clone", action_obj); - }, - "rename" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "rename", action_obj); - }, - "getName": function(id){ - return OpenNebulaAction.getName(id, RESOURCE); - }, - "commit" : function(params) { - var action_obj = {"recover": params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "commit", action_obj); - }, - } - - return SecurityGroup; -}) diff --git a/public/app/opennebula/service.js b/public/app/opennebula/service.js deleted file mode 100644 index 2151baff..00000000 --- a/public/app/opennebula/service.js +++ /dev/null @@ -1,120 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - var OpenNebulaAction = require('./action'); - var Locale = require('utils/locale'); - - var RESOURCE = "DOCUMENT"; - var PATH = 'service'; - var CACHE_NAME = 'SERVICE' - - var STATES_STR = [ - Locale.tr("PENDING"), - Locale.tr("DEPLOYING"), - Locale.tr("RUNNING"), - Locale.tr("UNDEPLOYING"), - Locale.tr("WARNING"), - Locale.tr("DONE"), - Locale.tr("FAILED_UNDEPLOYING"), - Locale.tr("FAILED_DEPLOYING"), - Locale.tr("SCALING"), - Locale.tr("FAILED_SCALING"), - Locale.tr("COOLDOWN") - ]; - - var STATES = { - PENDING : 0, - DEPLOYING : 1, - RUNNING : 2, - UNDEPLOYING : 3, - WARNING : 4, - DONE : 5, - FAILED_UNDEPLOYING : 6, - FAILED_DEPLOYING : 7, - SCALING : 8, - FAILED_SCALING : 9, - COOLDOWN : 10 - }; - - var Service = { - "resource": RESOURCE, - "del": function(params) { - params.cache_name = CACHE_NAME; - OpenNebulaAction.del(params, RESOURCE, PATH); - }, - "list" : function(params) { - params.cache_name = CACHE_NAME; - OpenNebulaAction.list(params, RESOURCE, PATH) - }, - "show" : function(params) { - params.cache_name = CACHE_NAME; - OpenNebulaAction.show(params, RESOURCE, false, PATH) - }, - "chown" : function(params) { - params.cache_name = CACHE_NAME; - OpenNebulaAction.chown(params, RESOURCE, PATH); - }, - "chgrp" : function(params) { - params.cache_name = CACHE_NAME; - OpenNebulaAction.chgrp(params, RESOURCE, PATH); - }, - "chmod" : function(params) { - params.cache_name = CACHE_NAME; - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "chmod", action_obj, PATH); - }, - "shutdown" : function(params) { - params.cache_name = CACHE_NAME; - OpenNebulaAction.simple_action(params, RESOURCE, "shutdown", null, PATH); - }, - "recover" : function(params) { - params.cache_name = CACHE_NAME; - OpenNebulaAction.simple_action(params, RESOURCE, "recover", null, PATH); - }, - "rename" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "rename", action_obj, PATH); - }, - "append": function(params) { - params.cache_name = CACHE_NAME; - - var action_obj = {}; - - try { - JSON.parse(params.data.extra_param); - action_obj["template_json"] = params.data.extra_param; - } - catch(err) { - action_obj["template_raw"] = params.data.extra_param; - } - - action_obj["append"] = true; - - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj, PATH); - }, - "stateStr" : function(stateId) { - return STATES_STR[stateId]; - }, - "STATES": STATES, - "getName": function(id){ - return OpenNebulaAction.getName(id, CACHE_NAME); - } - } - - return Service; -}) - diff --git a/public/app/opennebula/servicetemplate.js b/public/app/opennebula/servicetemplate.js deleted file mode 100644 index 3fc32182..00000000 --- a/public/app/opennebula/servicetemplate.js +++ /dev/null @@ -1,113 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - var OpenNebulaAction = require('./action'); - - var RESOURCE = "DOCUMENT"; - var PATH = 'service_template'; - var CACHE_NAME = "SERVICE_TEMPLATE"; - - var ServiceTemplate = { - "resource": RESOURCE, - "create": function(params) { - params.cache_name = CACHE_NAME; - OpenNebulaAction.create(params, RESOURCE, PATH); - }, - - "instantiate": function(params) { - params.cache_name = CACHE_NAME; - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "instantiate", action_obj, PATH); - }, - "update": function(params) { - params.cache_name = CACHE_NAME; - - var action_obj = {}; - - try { - JSON.parse(params.data.extra_param); - action_obj["template_json"] = params.data.extra_param; - } - catch(err) { - action_obj["template_raw"] = params.data.extra_param; - } - - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj, PATH); - }, - "append": function(params) { - params.cache_name = CACHE_NAME; - - var action_obj = {}; - - try { - JSON.parse(params.data.extra_param); - action_obj["template_json"] = params.data.extra_param; - } - catch(err) { - action_obj["template_raw"] = params.data.extra_param; - } - - action_obj["append"] = true; - - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj, PATH); - }, - "update_labels": function(params) { - params.cache_name = CACHE_NAME; - var action_obj = {"template_raw" : params.data.extra_param, append : true}; - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj, PATH); - }, - "del": function(params) { - params.cache_name = CACHE_NAME; - OpenNebulaAction.del(params, RESOURCE, PATH); - }, - "list" : function(params) { - params.cache_name = CACHE_NAME; - OpenNebulaAction.list(params, RESOURCE, PATH) - }, - "show" : function(params) { - params.cache_name = CACHE_NAME; - OpenNebulaAction.show(params, RESOURCE, false, PATH) - }, - "chown" : function(params) { - params.cache_name = CACHE_NAME; - OpenNebulaAction.chown(params, RESOURCE, PATH); - }, - "chgrp" : function(params) { - params.cache_name = CACHE_NAME; - OpenNebulaAction.chgrp(params, RESOURCE, PATH); - }, - "chmod" : function(params) { - params.cache_name = CACHE_NAME; - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "chmod", action_obj, PATH); - }, - "rename" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "rename", action_obj, PATH); - }, - "clone" : function(params) { - var name = params.data.extra_param ? params.data.extra_param : ""; - var action_obj = {"name" : name}; - OpenNebulaAction.simple_action(params, RESOURCE, "clone", action_obj, PATH); - }, - "getName": function(id){ - return OpenNebulaAction.getName(id, CACHE_NAME); - } - } - - return ServiceTemplate; -}) diff --git a/public/app/opennebula/settings.js b/public/app/opennebula/settings.js deleted file mode 100644 index aa65de40..00000000 --- a/public/app/opennebula/settings.js +++ /dev/null @@ -1,68 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2018, IONe Cloud Project, Support.by */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function (require) { - var OpenNebulaAction = require('./action'); - var Config = require('sunstone-config'); - var Notifier = require('utils/notifier'); - var RESOURCE = "SETTINGS"; - - var Settings = { - "resource": RESOURCE, - "showback": function (params) { - var callback = params.success; - var data = JSON.stringify(params); - - $.ajax({ - url: '/ione_showback', - type: 'POST', - data: data, - success: function (req, res) { - return callback ? callback(req, res) : null; - }, - error: function (req, res) { Notifier.notifyError(req) } - }); - }, - 'showbackV2': function (params) { - var callback = params.success; - var data = JSON.stringify(params); - - $.ajax({ - url: '/ione_showback/v2', - type: 'POST', - data: data, - success: function (req, res) { - return callback ? callback(req, res) : null; - }, - error: function (req, res) { console.log('ERROR showbackV2->', req, res); Notifier.notifyError(req) } - }); - }, - "cloud": function (params) { - var callback = params.success; - - $.ajax({ - url: 'settings', - type: 'GET', - success: function (req, res) { - return callback ? callback(req, res) : null; - }, - error: function (req, res) { Notifier.notifyError(req) } - }); - } - } - - return Settings; -}) \ No newline at end of file diff --git a/public/app/opennebula/support.js b/public/app/opennebula/support.js deleted file mode 100644 index 18068727..00000000 --- a/public/app/opennebula/support.js +++ /dev/null @@ -1,43 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function (require) { - var OpenNebulaAction = require('./action'); - - var RESOURCE = "REQUEST"; - var PATH = 'support/request'; - var CACHE_NAME = "REQUEST"; - - var Support = { - "resource": RESOURCE, - "create": function (params) { - OpenNebulaAction.create(params, RESOURCE, PATH); - }, - "update": function (params) { - OpenNebulaAction.simple_action(params, RESOURCE, "update", params.data.extra_param, PATH); - }, - "list": function (params) { - params.cache_name = CACHE_NAME; - OpenNebulaAction.clear_cache(params.cache_name); - OpenNebulaAction.list(params, RESOURCE, PATH) - }, - "show": function (params) { - OpenNebulaAction.show(params, RESOURCE, false, PATH) - } - } - - return Support; -}) \ No newline at end of file diff --git a/public/app/opennebula/template.js b/public/app/opennebula/template.js deleted file mode 100644 index 35cbda75..00000000 --- a/public/app/opennebula/template.js +++ /dev/null @@ -1,158 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - var OpenNebulaAction = require('./action'); - var Config = require('sunstone-config'); - - var RESOURCE = "VMTEMPLATE"; - - var Template = { - "resource": RESOURCE, - "create" : function(params) { - OpenNebulaAction.create(params, RESOURCE); - }, - "del" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.del(params, RESOURCE, action_obj); - }, - "delete_recursive": function(params) { - var action_obj = {"recursive": true}; - OpenNebulaAction.simple_action(params, RESOURCE, "delete_recursive", action_obj); - }, - "list" : function(params) { - OpenNebulaAction.list(params, RESOURCE); - }, - "show" : function(params) { - OpenNebulaAction.show(params, RESOURCE); - }, - "chown" : function(params) { - OpenNebulaAction.chown(params, RESOURCE); - }, - "chgrp" : function(params) { - OpenNebulaAction.chgrp(params, RESOURCE); - }, - "chmod" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "chmod", action_obj); - }, - "append": function(params) { - var action_obj = {"template_raw" : params.data.extra_param, append : true}; - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj); - }, - "update" : function(params) { - var action_obj = {"template_raw" : params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj); - }, - "publish" : function(params) { - OpenNebulaAction.simple_action(params, RESOURCE, "publish"); - }, - "unpublish" : function(params) { - OpenNebulaAction.simple_action(params, RESOURCE, "unpublish"); - }, - "instantiate" : function(params) { - var action_obj = params.data.extra_param ? params.data.extra_param : {}; - OpenNebulaAction.simple_action(params, RESOURCE, "instantiate", action_obj); - }, - "instantiate_persistent" : function(params) { - var action_obj = params.data.extra_param ? params.data.extra_param : {}; - action_obj["persistent"] = true; - OpenNebulaAction.simple_action(params, RESOURCE, "instantiate", action_obj); - }, - "clone" : function(params) { - var name = params.data.extra_param ? params.data.extra_param : ""; - var action_obj = {"name" : name}; - OpenNebulaAction.simple_action(params, RESOURCE, "clone", action_obj); - }, - "clone_recursive": function(params) { - var name = params.data.extra_param ? params.data.extra_param : ""; - var action_obj = {"name" : name, "recursive" : true}; - OpenNebulaAction.simple_action(params, RESOURCE, "clone", action_obj); - }, - "rename" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "rename", action_obj); - }, - "getName": function(id){ - return OpenNebulaAction.getName(id, RESOURCE); - }, - "isNetworkChangeEnabled": function(template) { - if (template.VMTEMPLATE.TEMPLATE.SUNSTONE && - template.VMTEMPLATE.TEMPLATE.SUNSTONE.NETWORK_SELECT == 'NO') { - return false; - } else { - return true; - } - }, - "cost": function(template) { - var cost = 0; - var capacity = template.VMTEMPLATE.TEMPLATE; - - var cpuCost = capacity.CPU_COST; - var memoryCost = capacity.MEMORY_COST; - var memoryUnitCost = capacity.MEMORY_UNIT_COST; - var diskCost = capacity.DISK_COST; - - if (cpuCost == undefined){ - cpuCost = Config.onedConf.DEFAULT_COST.CPU_COST; - } - - if (memoryCost == undefined){ - memoryCost = Config.onedConf.DEFAULT_COST.MEMORY_COST; - } - - if (diskCost == undefined){ - diskCost = Config.onedConf.DEFAULT_COST.DISK_COST; - } - - if (capacity.CPU) { - cost += capacity.CPU * cpuCost; - } - - if (capacity.MEMORY) { - if (memoryUnitCost === "GB"){ - cost += (capacity.MEMORY / 1024) * memoryCost; - } else { - cost += capacity.MEMORY * memoryCost; - } - } - - if (diskCost != 0) { - var template_disk = capacity.DISK; - var disks = []; - if ($.isArray(template_disk)) { - disks = template_disk; - } else if (!$.isEmptyObject(template_disk)) { - disks = [template_disk]; - } - - $.each(disks, function(i, disk){ - if (disk.SIZE) { - cost += diskCost * (disk.SIZE / 1024); - } - - if (disk.DISK_SNAPSHOT_TOTAL_SIZE) { - cost += diskCost * disk.DISK_SNAPSHOT_TOTAL_SIZE; - } - }); - } - - return cost; - } - } - - return Template; -}) diff --git a/public/app/opennebula/user.js b/public/app/opennebula/user.js deleted file mode 100644 index 1acb1693..00000000 --- a/public/app/opennebula/user.js +++ /dev/null @@ -1,124 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - - var QuotaDefaults = require('utils/quotas/quota-defaults'); - - var OpenNebulaAction = require('./action'), - OpenNebulaHelper = require('./helper'), - OpenNebulaError = require('./error'); - - var RESOURCE = "USER"; - - var User = { - "resource": RESOURCE, - "create": function(params) { - OpenNebulaAction.create(params, RESOURCE); - }, - "del": function(params) { - OpenNebulaAction.del(params, RESOURCE); - }, - "list": function(params) { - OpenNebulaAction.list(params, RESOURCE, null, function(response) { - var list = OpenNebulaHelper.pool(RESOURCE, response); - - QuotaDefaults.setDefaultUserQuotas( - QuotaDefaults.default_quotas(response.USER_POOL.DEFAULT_USER_QUOTAS) - ); - - // Inject the VM user quota. This info is returned separately in the - // pool info call, but the userElementArray expects it inside the USER, - // as it is returned by the individual info call - var quotas_hash = OpenNebulaHelper.pool_hash_processing( - 'USER_POOL', 'QUOTAS', response); - - $.each(list,function(){ - var q = quotas_hash[this[RESOURCE].ID]; - - if (q != undefined) { - this[RESOURCE].VM_QUOTA = q.QUOTAS.VM_QUOTA; - } - }); - - return list; - }); - }, - "show" : function(params) { - var callback = params.success; - - // Before calling the true callback, we update the default quotas - // included in the .show response - params.success = function(request, response) { - QuotaDefaults.setDefaultUserQuotas( - QuotaDefaults.default_quotas(response.USER.DEFAULT_USER_QUOTAS) - ); - - return callback ? callback(request, response) : null; - }; - - OpenNebulaAction.show(params, RESOURCE); - }, - "passwd": function(params) { - var action_obj = {"password": params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "passwd", action_obj); - }, - "login": function(params) { - var action_obj = {"username": params.data.username, - "token": params.data.token, - "expire": params.data.expire, - "egid": params.data.egid}; - - OpenNebulaAction.simple_action(params, RESOURCE, "login", action_obj); - }, - "chgrp" : function(params) { - var action_obj = {"group_id": params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "chgrp", action_obj); - }, - "chauth" : function(params) { - var action_obj = {"auth_driver" : params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "chauth", action_obj); - }, - "update": function(params) { - var action_obj = {"template_raw" : params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj); - }, - "append": function(params) { - var action_obj = {"template_raw" : params.data.extra_param, append : true}; - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj); - }, - "accounting" : function(params) { - OpenNebulaAction.monitor(params, RESOURCE, false); - }, - "set_quota" : function(params) { - var action_obj = {quotas : params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "set_quota", action_obj); - }, - "addgroup" : function(params) { - var action_obj = {"group_id": params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "addgroup", action_obj); - }, - "delgroup" : function(params) { - var action_obj = {"group_id": params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "delgroup", action_obj); - }, - "getName": function(id){ - return OpenNebulaAction.getName(id, RESOURCE); - } - }; - - return User; -}); diff --git a/public/app/opennebula/vdc.js b/public/app/opennebula/vdc.js deleted file mode 100644 index a3391d34..00000000 --- a/public/app/opennebula/vdc.js +++ /dev/null @@ -1,99 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - var OpenNebulaAction = require('./action'); - - var RESOURCE = "VDC"; - - var Vdc = { - "resource": RESOURCE, - "create" : function(params) { - OpenNebulaAction.create(params, RESOURCE); - }, - "del" : function(params) { - OpenNebulaAction.del(params, RESOURCE); - }, - "list" : function(params) { - OpenNebulaAction.list(params, RESOURCE); - }, - "show" : function(params) { - OpenNebulaAction.show(params, RESOURCE); - }, - "update" : function(params) { - var action_obj = {"template_raw" : params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj); - }, - "append": function(params) { - var action_obj = {"template_raw" : params.data.extra_param, append : true}; - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj); - }, - "rename" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "rename", action_obj); - }, - - "add_group" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "add_group", action_obj); - }, - "del_group" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "del_group", action_obj); - }, - - "add_cluster" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "add_cluster", action_obj); - }, - "del_cluster" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "del_cluster", action_obj); - }, - - "add_host" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "add_host", action_obj); - }, - "del_host" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "del_host", action_obj); - }, - - "add_datastore" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "add_datastore", action_obj); - }, - "del_datastore" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "del_datastore", action_obj); - }, - - "add_vnet" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "add_vnet", action_obj); - }, - "del_vnet" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "del_vnet", action_obj); - }, - "getName": function(id){ - return OpenNebulaAction.getName(id, RESOURCE); - } - } - - return Vdc; -}) diff --git a/public/app/opennebula/virtualrouter.js b/public/app/opennebula/virtualrouter.js deleted file mode 100644 index fda94173..00000000 --- a/public/app/opennebula/virtualrouter.js +++ /dev/null @@ -1,77 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - var OpenNebulaAction = require('./action'); - - var RESOURCE = "VROUTER"; - - var VirtualRouter = { - "resource" : RESOURCE, - - "create" : function(params) { - OpenNebulaAction.create(params, RESOURCE); - }, - "instantiate" : function(params) { - var action_obj = params.data.extra_param ? params.data.extra_param : {}; - OpenNebulaAction.simple_action(params, RESOURCE, "instantiate", action_obj); - }, - "del" : function(params) { - OpenNebulaAction.del(params, RESOURCE); - }, - "list" : function(params) { - OpenNebulaAction.list(params, RESOURCE); - }, - "show" : function(params) { - OpenNebulaAction.show(params, RESOURCE); - }, - "chown" : function(params) { - OpenNebulaAction.chown(params, RESOURCE); - }, - "chgrp" : function(params) { - OpenNebulaAction.chgrp(params, RESOURCE); - }, - "chmod" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "chmod", action_obj); - }, - "update": function(params) { - var action_obj = {"template_raw" : params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj); - }, - "append": function(params) { - var action_obj = {"template_raw" : params.data.extra_param, append : true}; - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj); - }, - "rename" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "rename", action_obj); - }, - "attachnic" : function(params) { - var action_obj = {"nic_template": params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "attachnic", action_obj); - }, - "detachnic" : function(params) { - var action_obj = {"nic_id": params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "detachnic", action_obj); - }, - "getName": function(id){ - return OpenNebulaAction.getName(id, RESOURCE); - } - }; - - return VirtualRouter; -}); diff --git a/public/app/opennebula/vm.js b/public/app/opennebula/vm.js deleted file mode 100644 index 52de50c9..00000000 --- a/public/app/opennebula/vm.js +++ /dev/null @@ -1,819 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - var OpenNebulaAction = require('./action'), - OpenNebulaHelper = require('./helper'), - OpenNebulaError = require('./error'); - Locale = require('utils/locale'), - Navigation = require('utils/navigation'); - - var OpenNebulaCluster = require('./cluster'); - - var RESOURCE = "VM"; - - var STATES_STR = [ - "INIT", - "PENDING", - "HOLD", - "ACTIVE", - "STOPPED", - "SUSPENDED", - "DONE", - "FAILED", - "POWEROFF", - "UNDEPLOYED", - "CLONING", - "CLONING_FAILURE" - ]; - - var STATES = { - INIT : 0, - PENDING : 1, - HOLD : 2, - ACTIVE : 3, - STOPPED : 4, - SUSPENDED : 5, - DONE : 6, - //FAILED : 7, - POWEROFF : 8, - UNDEPLOYED : 9, - CLONING : 10, - CLONING_FAILURE : 11 - }; - - var LCM_STATES_STR = [ - "LCM_INIT", - "PROLOG", - "BOOT", - "RUNNING", - "MIGRATE", - "SAVE_STOP", - "SAVE_SUSPEND", - "SAVE_MIGRATE", - "PROLOG_MIGRATE", - "PROLOG_RESUME", - "EPILOG_STOP", - "EPILOG", - "SHUTDOWN", - "CANCEL", - "FAILURE", - "CLEANUP_RESUBMIT", - "UNKNOWN", - "HOTPLUG", - "SHUTDOWN_POWEROFF", - "BOOT_UNKNOWN", - "BOOT_POWEROFF", - "BOOT_SUSPENDED", - "BOOT_STOPPED", - "CLEANUP_DELETE", - "HOTPLUG_SNAPSHOT", - "HOTPLUG_NIC", - "HOTPLUG_SAVEAS", - "HOTPLUG_SAVEAS_POWEROFF", - "HOTPLUG_SAVEAS_SUSPENDED", - "SHUTDOWN_UNDEPLOY", - "EPILOG_UNDEPLOY", - "PROLOG_UNDEPLOY", - "BOOT_UNDEPLOY", - "HOTPLUG_PROLOG_POWEROFF", - "HOTPLUG_EPILOG_POWEROFF", - "BOOT_MIGRATE", - "BOOT_FAILURE", - "BOOT_MIGRATE_FAILURE", - "PROLOG_MIGRATE_FAILURE", - "PROLOG_FAILURE", - "EPILOG_FAILURE", - "EPILOG_STOP_FAILURE", - "EPILOG_UNDEPLOY_FAILURE", - "PROLOG_MIGRATE_POWEROFF", - "PROLOG_MIGRATE_POWEROFF_FAILURE", - "PROLOG_MIGRATE_SUSPEND", - "PROLOG_MIGRATE_SUSPEND_FAILURE", - "BOOT_UNDEPLOY_FAILURE", - "BOOT_STOPPED_FAILURE", - "PROLOG_RESUME_FAILURE", - "PROLOG_UNDEPLOY_FAILURE", - "DISK_SNAPSHOT_POWEROFF", - "DISK_SNAPSHOT_REVERT_POWEROFF", - "DISK_SNAPSHOT_DELETE_POWEROFF", - "DISK_SNAPSHOT_SUSPENDED", - "DISK_SNAPSHOT_REVERT_SUSPENDED", - "DISK_SNAPSHOT_DELETE_SUSPENDED", - "DISK_SNAPSHOT", - "DISK_SNAPSHOT_REVERT", // deprecated - "DISK_SNAPSHOT_DELETE", - "PROLOG_MIGRATE_UNKNOWN", - "PROLOG_MIGRATE_UNKNOWN_FAILURE", - "DISK_RESIZE", - "DISK_RESIZE_POWEROFF", - "DISK_RESIZE_UNDEPLOYED" - ]; - - var LCM_STATES = { - LCM_INIT : 0, - PROLOG : 1, - BOOT : 2, - RUNNING : 3, - MIGRATE : 4, - SAVE_STOP : 5, - SAVE_SUSPEND : 6, - SAVE_MIGRATE : 7, - PROLOG_MIGRATE : 8, - PROLOG_RESUME : 9, - EPILOG_STOP : 10, - EPILOG : 11, - SHUTDOWN : 12, - //CANCEL : 13, - //FAILURE : 14, - CLEANUP_RESUBMIT : 15, - UNKNOWN : 16, - HOTPLUG : 17, - SHUTDOWN_POWEROFF : 18, - BOOT_UNKNOWN : 19, - BOOT_POWEROFF : 20, - BOOT_SUSPENDED : 21, - BOOT_STOPPED : 22, - CLEANUP_DELETE : 23, - HOTPLUG_SNAPSHOT : 24, - HOTPLUG_NIC : 25, - HOTPLUG_SAVEAS : 26, - HOTPLUG_SAVEAS_POWEROFF : 27, - HOTPLUG_SAVEAS_SUSPENDED : 28, - SHUTDOWN_UNDEPLOY : 29, - EPILOG_UNDEPLOY : 30, - PROLOG_UNDEPLOY : 31, - BOOT_UNDEPLOY : 32, - HOTPLUG_PROLOG_POWEROFF : 33, - HOTPLUG_EPILOG_POWEROFF : 34, - BOOT_MIGRATE : 35, - BOOT_FAILURE : 36, - BOOT_MIGRATE_FAILURE : 37, - PROLOG_MIGRATE_FAILURE : 38, - PROLOG_FAILURE : 39, - EPILOG_FAILURE : 40, - EPILOG_STOP_FAILURE : 41, - EPILOG_UNDEPLOY_FAILURE : 42, - PROLOG_MIGRATE_POWEROFF : 43, - PROLOG_MIGRATE_POWEROFF_FAILURE : 44, - PROLOG_MIGRATE_SUSPEND : 45, - PROLOG_MIGRATE_SUSPEND_FAILURE : 46, - BOOT_UNDEPLOY_FAILURE : 47, - BOOT_STOPPED_FAILURE : 48, - PROLOG_RESUME_FAILURE : 49, - PROLOG_UNDEPLOY_FAILURE : 50, - DISK_SNAPSHOT_POWEROFF : 51, - DISK_SNAPSHOT_REVERT_POWEROFF : 52, - DISK_SNAPSHOT_DELETE_POWEROFF : 53, - DISK_SNAPSHOT_SUSPENDED : 54, - DISK_SNAPSHOT_REVERT_SUSPENDED : 55, - DISK_SNAPSHOT_DELETE_SUSPENDED : 56, - DISK_SNAPSHOT : 57, - //DISK_SNAPSHOT_REVERT : 58, - DISK_SNAPSHOT_DELETE : 59, - PROLOG_MIGRATE_UNKNOWN : 60, - PROLOG_MIGRATE_UNKNOWN_FAILURE : 61, - DISK_RESIZE : 62, - DISK_RESIZE_POWEROFF : 63, - DISK_RESIZE_UNDEPLOYED : 64 - }; - - var SHORT_LCM_STATES_STR = [ - Locale.tr("LCM_INIT"), // LCM_INIT - Locale.tr("PROLOG"), // PROLOG - Locale.tr("BOOT"), // BOOT - Locale.tr("RUNNING"), // RUNNING - Locale.tr("MIGRATE"), // MIGRATE - Locale.tr("SAVE"), // SAVE_STOP - Locale.tr("SAVE"), // SAVE_SUSPEND - Locale.tr("SAVE"), // SAVE_MIGRATE - Locale.tr("MIGRATE"), // PROLOG_MIGRATE - Locale.tr("PROLOG"), // PROLOG_RESUME - Locale.tr("EPILOG"), // EPILOG_STOP - Locale.tr("EPILOG"), // EPILOG - Locale.tr("SHUTDOWN"), // SHUTDOWN - Locale.tr("SHUTDOWN"), // CANCEL - Locale.tr("FAILURE"), // FAILURE - Locale.tr("CLEANUP"), // CLEANUP_RESUBMIT - Locale.tr("UNKNOWN"), // UNKNOWN - Locale.tr("HOTPLUG"), // HOTPLUG - Locale.tr("SHUTDOWN"), // SHUTDOWN_POWEROFF - Locale.tr("BOOT"), // BOOT_UNKNOWN - Locale.tr("BOOT"), // BOOT_POWEROFF - Locale.tr("BOOT"), // BOOT_SUSPENDED - Locale.tr("BOOT"), // BOOT_STOPPED - Locale.tr("CLEANUP"), // CLEANUP_DELETE - Locale.tr("SNAPSHOT"), // HOTPLUG_SNAPSHOT - Locale.tr("HOTPLUG"), // HOTPLUG_NIC - Locale.tr("HOTPLUG"), // HOTPLUG_SAVEAS - Locale.tr("HOTPLUG"), // HOTPLUG_SAVEAS_POWEROFF - Locale.tr("HOTPLUG"), // HOTPLUG_SAVEAS_SUSPENDED - Locale.tr("SHUTDOWN"), // SHUTDOWN_UNDEPLOY - Locale.tr("EPILOG"), // EPILOG_UNDEPLOY - Locale.tr("PROLOG"), // PROLOG_UNDEPLOY - Locale.tr("BOOT"), // BOOT_UNDEPLOY - Locale.tr("HOTPLUG"), // HOTPLUG_PROLOG_POWEROFF - Locale.tr("HOTPLUG"), // HOTPLUG_EPILOG_POWEROFF - Locale.tr("BOOT"), // BOOT_MIGRATE - Locale.tr("FAILURE"), // BOOT_FAILURE - Locale.tr("FAILURE"), // BOOT_MIGRATE_FAILURE - Locale.tr("FAILURE"), // PROLOG_MIGRATE_FAILURE - Locale.tr("FAILURE"), // PROLOG_FAILURE - Locale.tr("FAILURE"), // EPILOG_FAILURE - Locale.tr("FAILURE"), // EPILOG_STOP_FAILURE - Locale.tr("FAILURE"), // EPILOG_UNDEPLOY_FAILURE - Locale.tr("MIGRATE"), // PROLOG_MIGRATE_POWEROFF - Locale.tr("FAILURE"), // PROLOG_MIGRATE_POWEROFF_FAILURE - Locale.tr("MIGRATE"), // PROLOG_MIGRATE_SUSPEND - Locale.tr("FAILURE"), // PROLOG_MIGRATE_SUSPEND_FAILURE - Locale.tr("FAILURE"), // BOOT_UNDEPLOY_FAILURE - Locale.tr("FAILURE"), // BOOT_STOPPED_FAILURE - Locale.tr("FAILURE"), // PROLOG_RESUME_FAILURE - Locale.tr("FAILURE"), // PROLOG_UNDEPLOY_FAILURE - Locale.tr("SNAPSHOT"), // DISK_SNAPSHOT_POWEROFF - Locale.tr("SNAPSHOT"), // DISK_SNAPSHOT_REVERT_POWEROFF - Locale.tr("SNAPSHOT"), // DISK_SNAPSHOT_DELETE_POWEROFF - Locale.tr("SNAPSHOT"), // DISK_SNAPSHOT_SUSPENDED - Locale.tr("SNAPSHOT"), // DISK_SNAPSHOT_REVERT_SUSPENDED - Locale.tr("SNAPSHOT"), // DISK_SNAPSHOT_DELETE_SUSPENDED - Locale.tr("SNAPSHOT"), // DISK_SNAPSHOT - Locale.tr("SNAPSHOT"), // DISK_SNAPSHOT_REVERT - Locale.tr("SNAPSHOT"), // DISK_SNAPSHOT_DELETE - Locale.tr("MIGRATE"), // PROLOG_MIGRATE_UNKNOWN - Locale.tr("FAILURE"), // PROLOG_MIGRATE_UNKNOWN_FAILURE - Locale.tr("DISK_RSZ"), // DISK_RESIZE - Locale.tr("DISK_RSZ"), // DISK_RESIZE_POWEROFF - Locale.tr("DISK_RSZ") // DISK_RESIZE_UNDEPLOYED - ]; - - var VNC_STATES = [ - LCM_STATES.RUNNING, - LCM_STATES.MIGRATE, - LCM_STATES.SHUTDOWN, - LCM_STATES.CANCEL, - LCM_STATES.UNKNOWN, - LCM_STATES.HOTPLUG, - LCM_STATES.SHUTDOWN_POWEROFF, - LCM_STATES.HOTPLUG_SNAPSHOT, - LCM_STATES.HOTPLUG_NIC, - LCM_STATES.HOTPLUG_SAVEAS, - LCM_STATES.HOTPLUG_SAVEAS_POWEROFF, - LCM_STATES.HOTPLUG_SAVEAS_SUSPENDED, - LCM_STATES.SHUTDOWN_UNDEPLOY, - LCM_STATES.DISK_SNAPSHOT, - LCM_STATES.DISK_SNAPSHOT_REVERT, - LCM_STATES.DISK_RESIZE - ]; - - var EXTERNAL_IP_ATTRS = [ - 'GUEST_IP', - 'GUEST_IP_ADDRESSES', - 'AWS_IP_ADDRESS', - 'AWS_PUBLIC_IP_ADDRESS', - 'AWS_PRIVATE_IP_ADDRESS', - 'AZ_IPADDRESS', - 'SL_PRIMARYIPADDRESS' - ]; - - var NIC_IP_ATTRS = [ - "IP", - "IP6", - "IP6_GLOBAL", - "IP6_ULA", - "VROUTER_IP", - "VROUTER_IP6_GLOBAL", - "VROUTER_IP6_ULA" - ]; - - var EXTERNAL_NETWORK_ATTRIBUTES = [ - 'GUEST_IP', - 'GUEST_IP_ADDRESSES', - 'AWS_IP_ADDRESS', - 'AWS_DNS_NAME', - 'AWS_PUBLIC_IP_ADDRESS', - 'AWS_PUBLIC_DNS_NAME', - 'AWS_PRIVATE_IP_ADDRESS', - 'AWS_PRIVATE_DNS_NAME', - 'AWS_SECURITY_GROUPS', - 'AZ_IPADDRESS', - 'SL_PRIMARYIPADDRESS' - ]; - - var MIGRATE_ACTION_STR = [ - "none", // NONE_ACTION = 0 - "migrate", // MIGRATE_ACTION = 1 - "live-migrate", // LIVE_MIGRATE_ACTION = 2 - "shutdown", // //SHUTDOWN_ACTION = 3 - "shutdown-hard", // //SHUTDOWN_HARD_ACTION = 4 - "undeploy", // UNDEPLOY_ACTION = 5 - "undeploy-hard", // UNDEPLOY_HARD_ACTION = 6 - "hold", // HOLD_ACTION = 7 - "release", // RELEASE_ACTION = 8 - "stop", // STOP_ACTION = 9 - "suspend", // SUSPEND_ACTION = 10 - "resume", // RESUME_ACTION = 11 - "boot", // //BOOT_ACTION = 12 - "delete", // DELETE_ACTION = 13 - "delete-recreate", // DELETE_RECREATE_ACTION = 14 - "reboot", // REBOOT_ACTION = 15 - "reboot-hard", // REBOOT_HARD_ACTION = 16 - "resched", // RESCHED_ACTION = 17 - "unresched", // UNRESCHED_ACTION = 18 - "poweroff", // POWEROFF_ACTION = 19 - "poweroff-hard", // POWEROFF_HARD_ACTION = 20 - "disk-attach", // DISK_ATTACH_ACTION = 21 - "disk-detach", // DISK_DETACH_ACTION = 22 - "nic-attach", // NIC_ATTACH_ACTION = 23 - "nic-detach", // NIC_DETACH_ACTION = 24 - "snap-create", // DISK_SNAPSHOT_CREATE_ACTION = 25 - "snap-delete", // DISK_SNAPSHOT_DELETE_ACTION = 26 - "terminate", // TERMINATE_ACTION = 27 - "terminate-hard", // TERMINATE_HARD_ACTION = 28 - "disk-resize", // DISK_RESIZE_ACTION = 29 - "deploy", // DEPLOY_ACTION = 30 - "chown", // CHOWN_ACTION = 31 - "chmod", // CHMOD_ACTION = 32 - "updateconf", // UPDATECONF_ACTION = 33 - "rename", // RENAME_ACTION = 34 - "resize", // RESIZE_ACTION = 35 - "update", // UPDATE_ACTION = 36 - "snapshot-create", // SNAPSHOT_CREATE_ACTION = 37 - "snapshot-delete", // SNAPSHOT_DELETE_ACTION = 38 - "snapshot-revert", // SNAPSHOT_REVERT_ACTION = 39 - "disk-saveas", // DISK_SAVEAS_ACTION = 40 - "disk-snapshot-revert",// DISK_SNAPSHOT_REVERT_ACTION = 41 - "recover", // RECOVER_ACTION = 42 - "retry", // RETRY_ACTION = 43 - "monitor", // MONITOR_ACTION = 44 - ]; - - var VM = { - "resource": RESOURCE, - "create": function(params) { - OpenNebulaAction.create(params, RESOURCE); - }, - "list": function(params) { - OpenNebulaAction.list(params, RESOURCE); - }, - "show": function(params) { - OpenNebulaAction.show(params, RESOURCE); - }, - "chown" : function(params) { - OpenNebulaAction.chown(params, RESOURCE); - }, - "chgrp" : function(params) { - OpenNebulaAction.chgrp(params, RESOURCE); - }, - "chmod" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "chmod", action_obj); - }, - "terminate": function(params) { - var action_obj = {"hard": false}; - OpenNebulaAction.simple_action(params, RESOURCE, "terminate", action_obj); - }, - "terminate_hard" : function(params) { - var action_obj = {"hard": true}; - OpenNebulaAction.simple_action(params, RESOURCE, "terminate", action_obj); - }, - "hold": function(params) { - OpenNebulaAction.simple_action(params, RESOURCE, "hold"); - }, - "release": function(params) { - OpenNebulaAction.simple_action(params, RESOURCE, "release"); - }, - "stop": function(params) { - OpenNebulaAction.simple_action(params, RESOURCE, "stop"); - }, - "suspend": function(params) { - OpenNebulaAction.simple_action(params, RESOURCE, "suspend"); - }, - "save_as_template": function(params) { - OpenNebulaAction.simple_action(params, RESOURCE, "save_as_template"); - }, - "resume": function(params) { - OpenNebulaAction.simple_action(params, RESOURCE, "resume"); - }, - "poweroff" : function(params) { - var action_obj = {"hard": false}; - OpenNebulaAction.simple_action(params, RESOURCE, "poweroff", action_obj); - }, - "poweroff_hard" : function(params) { - var action_obj = {"hard": true}; - OpenNebulaAction.simple_action(params, RESOURCE, "poweroff", action_obj); - }, - "undeploy" : function(params) { - var action_obj = {"hard": false}; - OpenNebulaAction.simple_action(params, RESOURCE, "undeploy", action_obj); - }, - "undeploy_hard" : function(params) { - var action_obj = {"hard": true}; - OpenNebulaAction.simple_action(params, RESOURCE, "undeploy", action_obj); - }, - "reboot": function(params) { - var action_obj = {"hard": false}; - OpenNebulaAction.simple_action(params, RESOURCE, "reboot", action_obj); - }, - "reboot_hard" : function(params) { - var action_obj = {"hard": true}; - OpenNebulaAction.simple_action(params, RESOURCE, "reboot", action_obj); - }, - - "log": function(params) { - OpenNebulaAction.show(params, RESOURCE, "log"); - }, - "deploy": function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "deploy", action_obj); - }, - "livemigrate": function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "livemigrate", action_obj); - }, - "migrate": function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "migrate", action_obj); - }, - "disk_saveas": function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "disk_saveas", action_obj); - }, - "snapshot_create": function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "snapshot_create", action_obj); - }, - "snapshot_revert": function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "snapshot_revert", action_obj); - }, - "snapshot_delete": function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "snapshot_delete", action_obj); - }, - "disk_snapshot_create": function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "disk_snapshot_create", action_obj); - }, - "disk_snapshot_revert": function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "disk_snapshot_revert", action_obj); - }, - "disk_snapshot_delete": function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "disk_snapshot_delete", action_obj); - }, - "vnc" : function(params, startstop) { - var callback = params.success; - var callback_error = params.error; - var id = params.data.id; - var resource = RESOURCE; - - var method = startstop; - var action = OpenNebulaHelper.action(method); - var request = OpenNebulaHelper.request(resource, method, id); - $.ajax({ - url: "vm/" + id + "/startvnc", - type: "POST", - dataType: "json", - success: function(response) { - return callback ? callback(request, response) : null; - }, - error: function(response) { - return callback_error ? - callback_error(request, OpenNebulaError(response)) : null; - } - }); - }, - "append": function(params) { - var action_obj = {"template_raw" : params.data.extra_param, append : true}; - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj); - }, - "update": function(params) { - var action_obj = {"template_raw" : params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj); - }, - "updateconf": function(params) { - var action_obj = {"template_raw" : params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "updateconf", action_obj); - }, - "monitor" : function(params) { - OpenNebulaAction.monitor(params, RESOURCE, false); - }, - "pool_monitor" : function(params) { - OpenNebulaAction.monitor(params, RESOURCE, true); - }, - "resize" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "resize", action_obj); - }, - "disk_resize" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "disk_resize", action_obj); - }, - "attachdisk" : function(params) { - var action_obj = {"disk_template": params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "attachdisk", action_obj); - }, - "detachdisk" : function(params) { - var action_obj = {"disk_id": params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "detachdisk", action_obj); - }, - "attachnic" : function(params) { - var action_obj = {"nic_template": params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "attachnic", action_obj); - }, - "detachnic" : function(params) { - var action_obj = {"nic_id": params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "detachnic", action_obj); - }, - "rename" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "rename", action_obj); - }, - "resched" : function(params) { - OpenNebulaAction.simple_action(params, RESOURCE, "resched"); - }, - "unresched" : function(params) { - OpenNebulaAction.simple_action(params, RESOURCE, "unresched"); - }, - "recover" : function(params) { - var action_obj = {"result": params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "recover", action_obj); - }, - "accounting": function(params) { - OpenNebulaAction.accounting(params, RESOURCE); - }, - "showback": function(params) { - OpenNebulaAction.showback(params, RESOURCE); - }, - "save_as_template": function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "save_as_template", action_obj); - }, - "stateStr": function(stateId) { - return STATES_STR[stateId]; - }, - "STATES": STATES, - "lcmStateStr": function(stateId) { - return LCM_STATES_STR[stateId]; - }, - "LCM_STATES": LCM_STATES, - "shortLcmStateStr": function(stateId) { - return SHORT_LCM_STATES_STR[stateId]; - }, - "isFailureState": function(lcmStateId) { - switch(parseInt(lcmStateId)){ - case LCM_STATES.BOOT_FAILURE: - case LCM_STATES.BOOT_MIGRATE_FAILURE: - case LCM_STATES.PROLOG_MIGRATE_FAILURE: - case LCM_STATES.PROLOG_FAILURE: - case LCM_STATES.EPILOG_FAILURE: - case LCM_STATES.EPILOG_STOP_FAILURE: - case LCM_STATES.EPILOG_UNDEPLOY_FAILURE: - case LCM_STATES.PROLOG_MIGRATE_POWEROFF_FAILURE: - case LCM_STATES.PROLOG_MIGRATE_SUSPEND_FAILURE: - case LCM_STATES.BOOT_UNDEPLOY_FAILURE: - case LCM_STATES.BOOT_STOPPED_FAILURE: - case LCM_STATES.PROLOG_RESUME_FAILURE: - case LCM_STATES.PROLOG_UNDEPLOY_FAILURE: - case LCM_STATES.PROLOG_MIGRATE_UNKNOWN_FAILURE: - return true; - - default: - return false; - } - }, - "hostnameStr": function(element) { - var state = element.STATE; - var hostname = "--"; - if (state == STATES.ACTIVE || state == STATES.SUSPENDED || state == STATES.POWEROFF) { - var history = retrieveLastHistoryRecord(element) - if (history) { - hostname = history.HOSTNAME; - }; - }; - - return hostname; - }, - "hostnameStrLink": function(element) { - var state = element.STATE; - var hostname = "--"; - if (state == STATES.ACTIVE || state == STATES.SUSPENDED || state == STATES.POWEROFF) { - var history = retrieveLastHistoryRecord(element) - if (history) { - hostname = Navigation.link(history.HOSTNAME, "hosts-tab", history.HID); - }; - }; - - return hostname; - }, - "clusterStr": function(element) { - var state = element.STATE; - var cluster = "--"; - if (state == STATES.ACTIVE || state == STATES.SUSPENDED || state == STATES.POWEROFF) { - var history = retrieveLastHistoryRecord(element) - if (history) { - cluster = history.CID; - }; - }; - - return OpenNebulaCluster.getName(cluster); - }, - "migrateActionStr": function(stateId) { - return MIGRATE_ACTION_STR[stateId]; - }, - "ipsStr": ipsStr, - "retrieveExternalIPs": retrieveExternalIPs, - "retrieveExternalNetworkAttrs": retrieveExternalNetworkAttrs, - "isNICGraphsSupported": isNICGraphsSupported, - "isDiskGraphsSupported": isDiskGraphsSupported, - "isNICAttachSupported": isNICAttachSupported, - "isVNCSupported": isVNCSupported, - "isSPICESupported": isSPICESupported, - "getName": function(id){ - return OpenNebulaAction.getName(id, RESOURCE); - }, - - // Additional actions - "reinstall" : function(params) { - var action_obj = params.data; - OpenNebulaAction.simple_action(params, RESOURCE, "reinstall", action_obj, "/vm/" + params.data.id + "/reinstall", true); - }, - "revert_zfs_snapshot" : function(params){ - var action_obj = params.data; - OpenNebulaAction.simple_action(params, RESOURCE, "revert_zfs_snapshot", action_obj, "/vm/" + params.data.id + "/revert_zfs_snapshot", true); - } - } - - function retrieveLastHistoryRecord(element) { - if (element.HISTORY_RECORDS && element.HISTORY_RECORDS.HISTORY) { - var history = element.HISTORY_RECORDS.HISTORY; - if (history.constructor == Array) { - return history[history.length - 1]; - } else { - return history; - }; - } else { - return null; - } - } - - // Return true if the VM has a hybrid section - function isNICGraphsSupported(element) { - var history = retrieveLastHistoryRecord(element) - if (history) { - return $.inArray(history.VM_MAD, ['az']) == -1; - } else { - return false; - } - } - - function isDiskGraphsSupported(element) { - var history = retrieveLastHistoryRecord(element) - if (history) { - return $.inArray(history.VM_MAD, ['ec2','az']) == -1; - } else { - return false; - } - } - - function isNICAttachSupported(element) { - var history = retrieveLastHistoryRecord(element) - if (history) { - return $.inArray(history.VM_MAD, ['ec2', 'az']) == -1; - } else { - return false; - } - } - - function retrieveExternalIPs(element) { - var monitoring = element.MONITORING; - var ips = {}; - var externalIP; - - $.each(EXTERNAL_IP_ATTRS, function(index, IPAttr) { - externalIP = monitoring[IPAttr]; - if (externalIP) { - ips[IPAttr] = externalIP; - } - }); - - return ips; - } - - function retrieveExternalNetworkAttrs(element) { - var ips = {}; - var externalAttr; - - var monitoring = element.MONITORING; - if (monitoring) { - $.each(EXTERNAL_NETWORK_ATTRIBUTES, function(index, attr) { - externalAttr = monitoring[attr]; - if (externalAttr) { - ips[attr] = externalAttr; - } - }); - } - - return ips; - } - - // Return the IP or several IPs of a VM - function ipsStr(element, divider) { - var divider = divider || "
    " - var nic = element.TEMPLATE.NIC; - var pci = element.TEMPLATE.PCI; - var ips = []; - - var monitoring = element.MONITORING; - if (monitoring) { - var externalIP; - $.each(EXTERNAL_IP_ATTRS, function(index, IPAttr) { - externalIP = monitoring[IPAttr]; - - if (externalIP) { - var splitArr = externalIP.split(','); - - $.each(splitArr, function(i,ip){ - if (ip && ($.inArray(ip, ips) == -1)) { - ips.push(ip); - } - }); - } - }) - } - - if (nic == undefined){ - nic = []; - } - - if (!$.isArray(nic)) { - nic = [nic]; - } - - if (pci != undefined) { - if (!$.isArray(pci)) { - pci = [pci]; - } - - $.each(pci, function(){ - if (this["TYPE"] == "NIC"){ - nic.push(this); - } - }); - } - - if(ips.length==0) - { - $.each(nic, function(index, value) { - $.each(NIC_IP_ATTRS, function(j, attr){ - if (value[attr]) { - ips.push(value[attr]); - } - }); - }); - } - - if (ips.length > 0) { - return ips.join(divider); - } else { - return '--'; - } - }; - - // returns true if the vnc button should be enabled - function isVNCSupported(element) { - var graphics = element.TEMPLATE.GRAPHICS; - var state = parseInt(element.LCM_STATE); - - return (graphics && - graphics.TYPE && - graphics.TYPE.toLowerCase() == "vnc" && - $.inArray(state, VNC_STATES) != -1); - } - - function isSPICESupported(element) { - var graphics = element.TEMPLATE.GRAPHICS; - var state = parseInt(element.LCM_STATE); - - return (graphics && - graphics.TYPE && - graphics.TYPE.toLowerCase() == "spice" && - $.inArray(state, VNC_STATES) != -1); - } - - return VM; -}) diff --git a/public/app/opennebula/vmgroup.js b/public/app/opennebula/vmgroup.js deleted file mode 100644 index a2053341..00000000 --- a/public/app/opennebula/vmgroup.js +++ /dev/null @@ -1,57 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - - var QuotaDefaults = require('utils/quotas/quota-defaults'); - var OpenNebulaAction = require('./action'); - var OpenNebulaHelper = require('./helper'); - var OpenNebulaError = require('./error'); - - var RESOURCE = "VM_GROUP"; - - var VMGroup = { - "resource": RESOURCE, - "create": function(params) { - OpenNebulaAction.create(params, RESOURCE); - }, - "list": function(params) { - OpenNebulaAction.list(params, RESOURCE); - }, - "show": function(params) { - OpenNebulaAction.show(params, RESOURCE); - }, - "chown" : function(params) { - OpenNebulaAction.chown(params, RESOURCE); - }, - "chmod" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "chmod", action_obj); - }, - "update": function(params) { - var action_obj = {"template_raw" : params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj); - }, - "del": function(params) { - OpenNebulaAction.del(params, RESOURCE); - }, - "getName": function(id){ - return OpenNebulaAction.getName(id, RESOURCE); - } - }; - - return VMGroup; -}); diff --git a/public/app/opennebula/vntemplate.js b/public/app/opennebula/vntemplate.js deleted file mode 100644 index 58bc3fb5..00000000 --- a/public/app/opennebula/vntemplate.js +++ /dev/null @@ -1,91 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - var OpenNebulaAction = require('./action'); - - var RESOURCE = "VNTEMPLATE"; - - var NetworkTemplate = { - "resource": RESOURCE, - "create": function(params) { - OpenNebulaAction.create(params, RESOURCE); - }, - "del": function(params) { - OpenNebulaAction.del(params, RESOURCE); - }, - "list": function(params) { - OpenNebulaAction.list(params, RESOURCE); - }, - "list_in_zone" : function(params) { - OpenNebulaAction.list_in_zone(params, RESOURCE); - }, - "show": function(params) { - OpenNebulaAction.show(params, RESOURCE); - }, - "chown" : function(params) { - OpenNebulaAction.chown(params, RESOURCE); - }, - "chgrp" : function(params) { - OpenNebulaAction.chgrp(params, RESOURCE); - }, - "chmod" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "chmod", action_obj); - }, - "publish": function(params) { - OpenNebulaAction.simple_action(params, RESOURCE, "publish"); - }, - "unpublish": function(params) { - OpenNebulaAction.simple_action(params, RESOURCE, "unpublish"); - }, - "hold" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "hold", action_obj); - }, - "release" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "release", action_obj); - }, - "update" : function(params) { - var action_obj = {"template_raw" : params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj); - }, - "append": function(params) { - var action_obj = {"template_raw" : params.data.extra_param, append : true}; - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj); - }, - "rename" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "rename", action_obj); - }, - "getName": function(id){ - return OpenNebulaAction.getName(id, RESOURCE); - }, - "lock" : function(params) { - OpenNebulaAction.lock(params, RESOURCE); - }, - "unlock" : function(params) { - OpenNebulaAction.simple_action(params, RESOURCE, "unlock"); - }, - "instantiate" : function(params) { - var action_obj = params.data.extra_param ? params.data.extra_param : {}; - OpenNebulaAction.simple_action(params, RESOURCE, "instantiate", action_obj); - } - } - - return NetworkTemplate; -}) diff --git a/public/app/opennebula/zone.js b/public/app/opennebula/zone.js deleted file mode 100644 index ba67d3de..00000000 --- a/public/app/opennebula/zone.js +++ /dev/null @@ -1,54 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - var OpenNebulaAction = require('./action'); - - var RESOURCE = "ZONE"; - - var Zone = { - "resource": RESOURCE, - "create" : function(params) { - OpenNebulaAction.create(params, RESOURCE); - }, - "del" : function(params) { - OpenNebulaAction.del(params, RESOURCE); - }, - "list" : function(params) { - OpenNebulaAction.list(params, RESOURCE); - }, - "show" : function(params) { - OpenNebulaAction.show(params, RESOURCE); - }, - "update" : function(params) { - var action_obj = {"template_raw" : params.data.extra_param}; - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj); - }, - "append": function(params) { - var action_obj = {"template_raw" : params.data.extra_param, append : true}; - OpenNebulaAction.simple_action(params, RESOURCE, "update", action_obj); - }, - "rename" : function(params) { - var action_obj = params.data.extra_param; - OpenNebulaAction.simple_action(params, RESOURCE, "rename", action_obj); - }, - "getName": function(id){ - return OpenNebulaAction.getName(id, RESOURCE); - } - }; - - return Zone; -}); diff --git a/public/app/sunstone-config.js b/public/app/sunstone-config.js deleted file mode 100644 index 16c7e1e7..00000000 --- a/public/app/sunstone-config.js +++ /dev/null @@ -1,168 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function (require) { - require('jquery'); - - // Clone the local config object in a private var - var _config = $.extend(true, {}, config); - - var Config = { - 'isTabEnabled': function (tabName) { - var enabled = _config['view']['enabled_tabs'].indexOf(tabName) != -1; - return enabled; - }, - - "changeFilter": function (bool) { - _config['pool_filter'] = bool; - }, - - "isChangedFilter": function () { - return _config['pool_filter']; - }, - - "isTabActionEnabled": function (tabName, actionName, panelName) { - var enabled = false; - var configTab = _config['view']['tabs'][tabName]; - - if (configTab != undefined) { - if (panelName) { - enabled = configTab['panel_tabs_actions'][panelName][actionName]; - } else if (configTab['actions']) { - enabled = configTab['actions'][actionName]; - } - } - - return enabled; - }, - - "isTabPanelEnabled": function (tabName, panelTabName) { - if (_config['view']['tabs'][tabName]) { - var enabled = _config['view']['tabs'][tabName]['panel_tabs'][panelTabName]; - return enabled; - } else { - return false; - } - }, - - "isProvisionTabEnabled": function (tabName, panelTabName) { - if (_config['view']['tabs'][tabName]) { - if (_config['view']['tabs'][tabName]['provision_tabs']) { - return _config['view']['tabs'][tabName]['provision_tabs'][panelTabName]; - } else { - // if provision_tabs is not defined use panel_tabs. - // This attribute was used in before 4.14, provision_tabs was include in 4.14.2 - return _config['view']['tabs'][tabName]['panel_tabs'][panelTabName]; - } - } else { - return false; - } - }, - - "isFeatureEnabled": function (featureName) { - if (_config['view']['features'] && _config['view']['features'][featureName]) { - return true; - } else { - return false; - } - }, - - "tabTableColumns": function (tabName) { - if (!_config['view']['tabs'][tabName]) { - return []; - } - - var columns = _config['view']['tabs'][tabName]['table_columns']; - - if (columns) { - return columns; - } else { - return []; - } - }, - - "isTemplateCreationTabEnabled": function (tabName, wizardTabName) { - var enabled = false; - - if (_config['view']['tabs'][tabName] && _config['view']['tabs'][tabName]['template_creation_tabs']) { - enabled = _config['view']['tabs'][tabName]['template_creation_tabs'][wizardTabName]; - } - - return (enabled == true); - }, - - "dashboardWidgets": function (perRow) { - if (!_config['view']['tabs']['dashboard-tab']) { - return [] - } - - var widgets = _config['view']['tabs']['dashboard-tab'][perRow]; - - if (widgets) { - return widgets; - } else { - return []; - } - }, - - "tableOrder": function () { - return _config['user_config']["table_order"]; - }, - - "provision": { - "dashboard": { - "isEnabled": function (widget) { - if (_config['view']['tabs']['provision-tab']) { - var enabled = _config['view']['tabs']['provision-tab']['dashboard'][widget]; - return enabled; - } else { - return false; - } - } - }, - "create_vm": { - "isEnabled": function (widget) { - if (_config['view']['tabs']['provision-tab'] && _config['view']['tabs']['provision-tab']["create_vm"]) { - return _config['view']['tabs']['provision-tab']['create_vm'][widget]; - } else { - return false; - } - } - }, - "logo": (_config['view']["provision_logo"] || "images/one_small_logo.png"), - }, - - 'tableOrder': _config['user_config']['table_order'], - 'vncProxyPort': _config['system_config']['vnc_proxy_port'], - 'vncWSS': _config['user_config']['vnc_wss'], - 'requestVNCPassword': _config['system_config']['vnc_request_password'], - 'logo': (_config['view']["small_logo"] || "images/one_small_logo.png"), - "link_logo": (_config['view']["link_logo"] || false), - "text_link_logo": (_config['view']["text_link_logo"] || false), - 'vmLogos': (_config['vm_logos']), - 'enabledTabs': _config['view']['enabled_tabs'], - 'onedConf': _config['oned_conf'], - 'confirmVMActions': _config['view']['confirm_vms'], - 'scaleFactor': _config['view']['features']['instantiate_cpu_factor'], - 'filterView': _config['view']['filter_view'], - - "allTabs": function () { - return Object.keys(_config['view']['tabs']); - } - } - - return Config; -}); diff --git a/public/app/sunstone.js b/public/app/sunstone.js deleted file mode 100644 index 77a22f11..00000000 --- a/public/app/sunstone.js +++ /dev/null @@ -1,1261 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function (require) { - require("jquery"); - //require('foundation.reveal'); - //require('foundation.tab'); - //require('foundation.dropdown'); - - var Config = require("sunstone-config"); - var Locale = require("utils/locale"); - var Notifier = require("utils/notifier"); - var Menu = require("utils/menu"); - var Tips = require("utils/tips"); - var Navigo = require("Navigo"); - - var router; - - var TOP_INTERVAL = 10000; //ms - var CONFIRM_DIALOG_ID = require("utils/dialogs/confirm/dialogId"); - var CONFIRM_WITH_SELECT_DIALOG_ID = require("utils/dialogs/confirm-with-select/dialogId"); - var DASHBOARD_TAB_ID = require("tabs/dashboard-tab/tabId"); - - var SunstoneCfg = { - "actions": {}, - "dialogs": {}, - "dialogInstances": {}, - "tabs": {} - }; - - var _addMainTabs = function () { - _addActions(); - - $.each(Config.enabledTabs, function (i, tabName) { - var name = "./tabs/" + tabName; - var tabObj = require(name); - var _tabId = tabObj.tabId; - SunstoneCfg["tabs"][_tabId] = tabObj; - - var panels = tabObj.panels; - if (panels) { - _addPanels(_tabId, panels); - } - - var panelsHooks = tabObj.panelsHooks; - if (panelsHooks) { - _addPanelsHooks(_tabId, panelsHooks); - } - - var initHooks = tabObj.initHooks; - if (initHooks) { - _addInitHooks(_tabId, initHooks); - } - - var dialogs = tabObj.dialogs; - if (dialogs) { - _addDialogs(dialogs); - } - - var formPanels = tabObj.formPanels; - if (formPanels) { - _addFormPanels(_tabId, formPanels); - } - }); - }; - - var _addActions = function () { - $.each(Config.allTabs(), function (i, tabName) { - var name = "./tabs/" + tabName; - - var tabObj = require(name); - - if (tabObj) { - var actions = tabObj.actions; - if (actions) { - $.each(actions, function (actionName, action) { - SunstoneCfg["actions"][actionName] = action; - }); - } - } - - }); - }; - - var _addDialogs = function (dialogs) { - $.each(dialogs, function (index, dialog) { - SunstoneCfg["dialogs"][dialog.DIALOG_ID] = dialog; - }); - return false; - }; - - var _addPanelsHooks = function (tabId, hooks) { - SunstoneCfg["tabs"][tabId]["panelsHooks"] = hooks; - return false; - }; - - var _addInitHooks = function (tabId, hooks) { - SunstoneCfg["tabs"][tabId]["initHooks"] = hooks; - return false; - }; - - var _addPanels = function (tabId, panels) { - var indexedPanels = {}; - $.each(panels, function (index, panel) { - indexedPanels[panel.PANEL_ID] = panel; - }); - SunstoneCfg["tabs"][tabId]["panels"] = indexedPanels; - return false; - }; - - var _addFormPanels = function (tabId, formPanels) { - var indexedFormPanels = {}; - $.each(formPanels, function (index, formPanel) { - indexedFormPanels[formPanel.FORM_PANEL_ID] = formPanel; - }); - SunstoneCfg["tabs"][tabId]["formPanels"] = indexedFormPanels; - SunstoneCfg["tabs"][tabId]["formPanelInstances"] = {}; - return false; - }; - - //Inserts all main tabs in the DOM - var _insertTabs = function () { - for (var tabName in SunstoneCfg["tabs"]) { - _insertTab(tabName); - _insertButtonsInTab(tabName); - _setupDataTable(tabName); - - var hooks = SunstoneCfg["tabs"][tabName].initHooks; - - if (hooks) { - $.each(hooks, function (i, hook) { - hook.init(); - }); - } - - // TODO Add openenbula actions - /*if (config['view']['autorefresh']) { - var tabContext = $("#" + tabName); - var refreshButton = $(".fa-refresh", $(".action_blocks", tabContext).first()); - setInterval(function() { - if (Sunstone.rightListVisible(tabContext)) { - refreshButton.click(); - } - }, TOP_INTERVAL); - }*/ - } - - _setupTabs(); - }; - - var _setupDataTable = function (tabName) { - var dataTable = SunstoneCfg["tabs"][tabName].dataTable; - if (dataTable) { - dataTable.initialize(); - } - }; - - //Inserts a main tab in the DOM. This is done by - //adding the content to the proper div and by adding a list item - //link to the navigation menu - var _insertTab = function (tabName) { - var tabInfo = SunstoneCfg["tabs"][tabName]; - var condition = tabInfo["condition"]; - var tabClass = tabInfo["tabClass"] ? tabInfo["tabClass"] : "topTab"; - var parent = tabInfo["parentTab"] ? tabInfo["parentTab"] : ""; - - //skip this tab if we do not meet the condition - if (condition && !condition()) { return; } - - if (tabInfo.no_content === true) { - tabClass += " tab_with_no_content is-accordion-submenu-parent"; - } else { - tabInfo["tabName"] = tabName; - var TabTemplate = require("hbs!sunstone/tab"); - $("div.sunstone-content").append(TabTemplate(tabInfo)); - } - - var liItem; - var title = ""; - if (tabInfo.icon) { - title += " "; - } - title += tabInfo.title; - if (tabInfo.beta) { - title += "βeta "; - } - - if (parent !== "") { - liItem = "
  • " + - "" + title + "" + - "
  • "; - - if ($("#menu ul#navigation #li_" + parent + " .menu").length > 0) { - $("#menu ul#navigation #li_" + parent + " .menu").append(liItem); - } else { - $("#menu ul#navigation #li_" + parent).append( - ""); - } - } else { - liItem = "
  • " + - "" + title + "" + - "
  • "; - - $("div#menu ul#navigation").append(liItem); - } - - //if this is a submenu... - //if (parent.length) { - // var children = $('div#menu ul#navigation #li_' + parent); - // //if there are other submenus, insert after last of them - // if (children.length) { - // $('div#menu li#li_' + tabName).hide();//hide by default - // $('div#menu li#li_' + parent + ' span').css("display", "inline-block"); - // } - //}; - - if (tabInfo.forms) { - $.each(tabInfo.forms, function (key, value) { - Sunstone.addFormPanel(tabName, key, value); - }); - } - - if (tabInfo.setup) { - var context = $("div#" + tabName, $("div.sunstone-content")); - - tabInfo.setup(context); - } - }; - - //If we have defined a block of action buttons in a tab, - //this function takes care of inserting them in the DOM. - var _insertButtonsInTab = function (tabName, panelName, panelButtons, customContext) { - var buttons = panelButtons ? panelButtons : SunstoneCfg["tabs"][tabName]["buttons"]; - var buttonCode = ""; - var condition = null; - - var context, customId; - if (customContext) { - customId = customContext.attr("id"); - context = customContext; - } else { - customId = tabName; - context = $("div#" + tabName, $("div.sunstone-content")); - } - - var actionBlock = $("div.action_blocks", context); - - if (actionBlock.length) { - - var ButtonsTemplate = require("hbs!./sunstone/buttons"); - var buttonsRow = $(ButtonsTemplate({ customId: customId, customContext: customContext })); - - //for every button defined for this tab... - for (buttonName in buttons) { - buttonCode = ""; - button = buttons[buttonName]; - - //if we meet the condition we proceed. Otherwise we skip it. - if (Config.isTabActionEnabled(tabName, buttonName, panelName) == false) { - continue; - } - - var type = button.type + "_button"; - var strClass = [type]; - switch (button.type) { - case "select": - break; - case "image": - strClass.push("action_button"); - break; - case "create_dialog": - strClass.push("action_button"); - strClass.push("top_button"); - break; - default: - strClass.push("top_button"); - } - - if (button.alwaysActive) { - strClass.push("alwaysActive"); - } - - if (button.custom_classes) { - strClass.push(button.custom_classes); - } - - var buttonContext; - var text; - switch (button.layout) { - case "create": - buttonContext = $("#" + customId + "create_buttons", buttonsRow); - icon = button.icon ? button.icon : ""; - text = button.text ? icon + " " + button.text : icon; - strClass.push("success", "button"); - buttonCode = ""; - break; - case "refresh": - buttonContext = $("#" + customId + "refresh_buttons", buttonsRow); - icon = button.icon ? button.icon : ""; - text = button.text ? icon + " " + button.text : icon; - strClass.push("refresh", "button", "secondary"); - buttonCode = ""; - break; - case "top": - buttonContext = $("#" + customId + "refresh_buttons", buttonsRow); - text = "" + - "" + - "" + - ""; - strClass.push("toggle_top_button", "only-sunstone-list", "button", "hollow"); - buttonCode = "" + text + ""; - break; - case "main": - buttonContext = $("#" + customId + "main_buttons", buttonsRow); - text = button.text; - strClass.push("button"); - buttonCode = ""; - break; - case "vmsplay_buttons": - buttonContext = $("#" + customId + "vmsplay_buttons", buttonsRow); - text = button.text; - strClass.push("button"); - buttonCode = ""; - break; - case "vmspause_buttons": - buttonContext = $("#" + customId + "vmspause_buttons", buttonsRow); - text = button.text; - buttonCode = "
  • " + text + "
  • "; - break; - case "vmsstop_buttons": - buttonContext = $("#" + customId + "vmsstop_buttons", buttonsRow); - text = button.text; - buttonCode = "
  • " + text + "
  • "; - break; - case "vmsrepeat_buttons": - buttonContext = $("#" + customId + "vmsrepeat_buttons", buttonsRow); - text = button.text; - buttonCode = "
  • " + text + "
  • "; - break; - case "vmsdelete_buttons": - buttonContext = $("#" + customId + "vmsdelete_buttons", buttonsRow); - text = button.text; - buttonCode = "
  • " + text + "
  • "; - break; - case "vmsplanification_buttons": - buttonContext = $("#" + customId + "vmsplanification_buttons", buttonsRow); - text = button.text; - buttonCode = "
  • " + text + "
  • "; - break; - case "more_select": - buttonContext = $("#" + customId + "more_buttons", buttonsRow); - text = button.text; - buttonCode = "
  • " + text + "
  • "; - break; - case "user_select": - buttonContext = $("#" + customId + "user_buttons", buttonsRow); - text = button.text; - buttonCode = "
  • " + text + "
  • "; - break; - case "del": - buttonContext = $("#" + customId + "delete_buttons", buttonsRow); - text = " "; - strClass.push("alert", "button"); - buttonCode = ""; - break; - case "labels": - buttonContext = $("#" + customId + "labels_buttons", buttonsRow); - text = ""; - strClass.push("only-sunstone-info", "only-sunstone-list", "top_button", "secondary", "button", "dropdown"); - buttonCode = ""; - break; - default: - buttonContext = $("#" + customId + "main_buttons", buttonsRow); - text = button.text; - strClass.push("button"); - buttonCode = ""; - } - - buttonContext.append(buttonCode); - }//for each button in tab - //$('.top_button',actionBlock).button(); - //$('.top_button',actionBlock).addClass("secondary small button") - - actionBlock.append(buttonsRow); - //actionBlock.foundation(); - Foundation.reflow(actionBlock, "dropdown"); - - Tips.setup(actionBlock); - - if ($("#" + customId + "more_buttons li", actionBlock).length == 0) { - $("button[data-toggle=" + customId + "more_buttons]", actionBlock).remove(); - } - - if ($("#" + customId + "user_buttons li", actionBlock).length == 0) { - $("button[data-toggle=" + customId + "user_buttons]", actionBlock).remove(); - } - - if ($("#" + customId + "vmsplanification_buttons li", actionBlock).length == 0) { - $("button[data-toggle=" + customId + "vmsplanification_buttons]", actionBlock).remove(); - } - - if ($("#" + customId + "vmsdelete_buttons li", actionBlock).length == 0) { - $("button[data-toggle=" + customId + "vmsdelete_buttons]", actionBlock).remove(); - } - - if ($("#" + customId + "vmsstop_buttons li", actionBlock).length == 0) { - $("button[data-toggle=" + customId + "vmsstop_buttons]", actionBlock).remove(); - } - - if ($("#" + customId + "vmspause_buttons li", actionBlock).length == 0) { - $("button[data-toggle=" + customId + "vmspause_buttons]", actionBlock).remove(); - } - - if ($("#" + customId + "vmsrepeat_buttons li", actionBlock).length == 0) { - $("button[data-toggle=" + customId + "vmsrepeat_buttons]", actionBlock).remove(); - } - - if ($("#" + customId + "user_buttons li", actionBlock).length == 0) { - $("button[data-toggle=" + customId + "user_buttons]", actionBlock).remove(); - } - - if ($("#" + customId + "labels_buttons button", buttonsRow).length != 0) { - $("#" + customId + "labels_buttons").append( - "
    "); - } - - $("#" + customId + "labels_buttons").foundation(); - //actionBlock.foundationButtons(); - $(".top_button, .list_button", actionBlock).prop("disabled", false); - $(".top_button, .list_button", actionBlock).prop("disabled", true); - $(".create_dialog_button", actionBlock).prop("disabled", false).removeAttr("disabled"); - $(".alwaysActive", actionBlock).prop("disabled", false).removeAttr("disabled"); - - $("#" + customId + "reset_button", actionBlock).on("click", function () { - _resetFormPanel(tabName); - return false; - }); - - $(".submit_button", actionBlock).on("click", function () { - _submitFormPanel(tabName); - return false; - }); - }//if tab exists - }; - - var _setupButtons = function () { - //Listen for .action_buttons - //An action buttons runs a predefined action. If it has type - //"multiple" it runs that action on the elements of a datatable. - $(document).on("click", ".action_button", function () { - var error = 0; - var value = $(this).val(); - if ($.isEmptyObject(value)) { - value = $(this).attr("href"); - } - - $(".dropdown-pane").foundation("close"); - - var action = SunstoneCfg["actions"][value]; - if (!action) { - Notifier.notifyError("Action " + value + " not defined."); - return false; - }; - switch (action.type) { - case "multiple": //find the datatable - var context = $(this).parents(".tab"); - var nodes = action.elements(); - error = _runAction(value, nodes); - break; - default: - error = _runAction(value); - } - - return false; - }); - - //Listen .confirm_buttons. These buttons show a confirmation dialog - //before running the action. - $(document).on("click", ".confirm_button", function () { - var dialogInstance = _getDialogInstance(CONFIRM_DIALOG_ID); - dialogInstance.reset(); - $("#" + CONFIRM_DIALOG_ID).data("buttonAction", $(this).attr("href")); - $("#" + CONFIRM_DIALOG_ID).data("buttonTab", $(this).parents(".tab").attr("id")); - dialogInstance.show(); - return false; - }); - - //Listen .confirm_buttons. These buttons show a confirmation dialog - //with a select box before running the action. - $(document).on("click", ".confirm_with_select_button", function () { - var dialogInstance = _getDialogInstance(CONFIRM_WITH_SELECT_DIALOG_ID); - - dialogInstance.setParams({ - "buttonAction": $(this).attr("href"), - "buttonTab": $(this).parents(".tab").attr("id") - }); - - dialogInstance.reset(); - dialogInstance.show(); - - return false; - }); - - //$(document).foundation('dropdown', 'reflow'); - - // Button to return to the list view from the detailed view - $(document).on("click", "button[href='back']", function (e) { - window.history.back(); - e.preventDefault(); - }); - }; - - var _setupTabs = function () { - Foundation.reflow($("#menu"), "accordion-menu"); - Foundation.reflow($("div.sunstone-content"), "sticky"); - var topTabs = $(".sunstone-menu-content ul li.topTab"); - var subTabs = $(".sunstone-menu-content ul li.subTab > a"); - - subTabs.on("click", function () { - if ($(this).closest("li").hasClass("topTab")) { - return false; - } else { - var tabName = $(this).closest("li").attr("id").substring(3); - _showTab(tabName); - return false; - } - }); - - topTabs.on("click", function (e) { - var tabName = $(this).attr("id").substring(3); - - if ($(this).hasClass("tab_with_no_content")) { - //Subtabs have a class with the name of this tab - //var subtabs = $('div#menu li.' + tabName); - //subtabs.fadeToggle('fast'); - return false; - } else { - _showTab(tabName); - return false; - } - }); - - _setupButtons(); - }; - - var _showRighList = function (tabName) { - var tab = $("#" + tabName); - $(".tab").hide(); - tab.show(); - - $(".sunstone-info", tab).hide(); - $(".sunstone-form", tab).hide(); - $(".sunstone-list", tab).fadeIn(); - $(".only-sunstone-info", tab).hide(); - $(".only-sunstone-form", tab).hide(); - $(".only-sunstone-list", tab).fadeIn(); - $(".action_blocks", tab).removeClass("large-12").addClass("large-9"); - }; - - var _showRighInfo = function (tabName) { - var tab = $("#" + tabName); - $(".tab").hide(); - tab.show(); - - $(".sunstone-list", tab).hide(); - $(".sunstone-form", tab).hide(); - $(".sunstone-info", tab).fadeIn(); - $(".only-sunstone-list", tab).hide(); - $(".only-sunstone-form", tab).hide(); - $(".only-sunstone-info", tab).fadeIn(); - $(".action_blocks", tab).removeClass("large-9").addClass("large-12"); - }; - - var _showTab = function (tabName) { - if (_getTab() == tabName && _rightListVisible()) { - _routerShowTab(tabName); - } else { - if (router != undefined) { - router.navigate(tabName); - } else { - _routerShowTab(tabName); - } - } - }; - - var _routerShowTab = function (tabName) { - $(".labels-tree", "#navigation").remove(); - - if (!SunstoneCfg["tabs"][tabName]) { - return false; - } - - // Hide the menu in small windows - Menu.entryClick(); - - // TODO check if necessary - // last_selected_row = null; - - if (tabName.indexOf("#") == 0) { - tabName = tabName.substring(1); - } - - //clean selected menu - $("#navigation li").removeClass("navigation-active-li"); - $("#navigation li#li_" + tabName).addClass("navigation-active-li"); - - var tab = $("#" + tabName); - //show tab - _showRighList(tabName); - - var dataTable = SunstoneCfg["tabs"][tabName]["dataTable"]; - if (dataTable) { - dataTable.recountCheckboxes(); - } - - var hashRes = ["Dashboard", "Settings", "NetworkTopology"]; - var res = SunstoneCfg["tabs"][tabName]["resource"]; - if (res) { - if (!hashRes.includes(res)) { - Sunstone.runAction(res + ".list"); - } else { - Sunstone.runAction(res + ".refresh"); - } - } - }; - - var _getTab = function () { - return $(".tab:visible").attr("id"); - }; - - var _showElement = function (tabName, elementId) { - if (!Config.isTabEnabled(tabName)) { - return; - } - - if (router != undefined) { - router.navigate(tabName + "/" + elementId); - } else { - _routerShowElement(tabName, elementId); - } - }; - - var _routerShowElement = function (tabName, elementId) { - var resource = SunstoneCfg["tabs"][tabName].resource; - - if (resource == undefined) { - return; - } - - var infoAction = resource + ".show"; - - _routerShowTab(tabName); - - var context = $("#" + tabName); - - $(".resource-id", context).html(elementId); - $(".resource-info-header", context).text(""); - - var loading = "
    \"loading...\"
    "; - $(".sunstone-info", context).html(loading); - _showRighInfo(tabName); - - Sunstone.runAction(infoAction, elementId); - //enable action buttons - $(".top_button, .list_button", context).attr("disabled", false); - }; - - // Returns the element that is currently shown in the right info - var _getElementRightInfo = function (tabName, context) { - var context = context || $(".sunstone-info", $("#" + tabName)); - return context.data("element"); - }; - - var _insertPanels = function (tabName, info, contextTabId, context) { - var context = context || $(".sunstone-info", $("#" + tabName)); - - context.data("element", info[Object.keys(info)[0]]); - - var containerId = tabName + "-panels"; - var activaTab = $("li.is-active a", $("#" + containerId)); - if (activaTab) { - var activaTabHref = activaTab.attr("href"); - } - - var isRefresh = (activaTabHref != undefined); - var prevPanelInstances = SunstoneCfg["tabs"][tabName]["panelInstances"]; - var prevPanelStates = {}; - - if (isRefresh && prevPanelInstances != undefined) { - $.each(prevPanelInstances, function (panelName, panel) { - if (panel.getState) { - prevPanelStates[panelName] = panel.getState(context); - } - }); - } - - var hooks = SunstoneCfg["tabs"][tabName].panelsHooks; - - if (hooks) { - $.each(hooks, function (i, hook) { - hook.pre(info, (contextTabId || tabName)); - }); - } - - var panels = SunstoneCfg["tabs"][tabName].panels; - var active = false; - var templatePanelsParams = []; - SunstoneCfg["tabs"][tabName]["panelInstances"] = {}; - - $.each(panels, function (panelName, Panel) { - if (Config.isTabPanelEnabled((contextTabId || tabName), panelName)) { - if (activaTabHref) { - if (activaTabHref == "#" + panelName) { - active = true; - } - } else { - activaTabHref = "#" + panelName; - active = true; - } - - try { - var panelInstance = new Panel(info, contextTabId); - SunstoneCfg["tabs"][tabName]["panelInstances"][panelName] = panelInstance; - templatePanelsParams.push({ - "panelName": panelName, - "icon": panelInstance.icon, - "title": panelInstance.title, - "html": panelInstance.html(), - "active": active - }); - } catch (err) { - console.log(err); - } - - active = false; - } - }); - - var TemplatePanels = require("hbs!./sunstone/panels"); - var html = TemplatePanels({ - "containerId": containerId, - "panels": templatePanelsParams - }); - - context.html(html); - $.each(SunstoneCfg["tabs"][tabName]["panelInstances"], function (panelName, panel) { - panel.setup(context); - - if (isRefresh && prevPanelStates[panelName] && panel.setState) { - panel.setState(prevPanelStates[panelName], context); - } - }); - - $("#" + containerId + "Tabs", context).on("change.zf.tabs", function (target) { - var elemIdWithHash = $(".is-active > a")[0]; - var tabIdWithHash = elemIdWithHash.hash; - - var panel = SunstoneCfg["tabs"][tabName]["panelInstances"][tabIdWithHash.substring(1)]; - if (panel && panel.onShow) { - panel.onShow(context); - } - }); - - Foundation.reflow(context, "tabs"); - - if (activaTabHref != undefined) { - $("[href=\"" + activaTabHref + "\"]", context).trigger("click"); - $("#" + containerId + "Tabs", context).trigger("change.zf.tabs"); - } - - if (hooks) { - $.each(hooks, function (i, hook) { - hook.post(info, (contextTabId || tabName)); - }); - } - }; - - //Runs a predefined action. Wraps the calls to opennebula.js and - //can be use to run action depending on conditions and notify them - //if desired. Returns 1 if some problem has been detected: i.e - //the condition to run the action is not met, the action is not found - var _runAction = function (action, dataArg, extraParam) { - var actions = SunstoneCfg["actions"]; - if (!actions[action]) { - Notifier.notifyError("Action " + action + " not defined"); - return 1; - } - - var actionCfg = actions[action]; - var notify = actionCfg.notify; - - var condition = actionCfg["condition"]; - - //Is the condition to run the action met? - //Should we inform if it is not met? - if (condition && !condition()) { - if (notify) { - Notifier.notifyError("This action cannot be run"); - } - return 1; - } - - var call = actionCfg["call"]; - var callback = actionCfg["callback"]; - var err = actionCfg["error"]; - - switch (actionCfg.type) { - case "create": - case "register": - call({ data: dataArg, success: callback, error: err }); - break; - case "single": - if (extraParam) { - call({ - data: { - id: dataArg, - extra_param: extraParam - }, - success: callback, error: err - }); - } else { - call({ data: { id: dataArg }, success: callback, error: err }); - }; - break; - case "list": - call({ success: callback, error: err, options: dataArg }); - break; - case "monitor_global": - call({ - timeout: true, - success: callback, - error: err, - data: { monitor: dataArg } - }); - break; - case "monitor": - case "monitor_single": - call({ - timeout: true, - success: callback, - error: err, - data: { id: dataArg, monitor: extraParam } - }); - break; - case "multiple": - $.each(dataArg, function () { - if (extraParam) { - call({ - data: { - id: this, - extra_param: extraParam - }, - success: callback, - error: err - }); - } else { - call({ - data: { id: this }, - success: callback, - error: err - }); - } - }); - break; - default: - if (dataArg && extraParam) { - call(dataArg, extraParam); - } else if (dataArg) { - call(dataArg); - } else { - call(); - } - } - - if (notify) { - Notifier.notifySubmit(action, dataArg, extraParam); - } - - return 0; - }; - - function _showFormPanel(tabId, formPanelId, action, onShow2) { - var context = $("#" + tabId); - _popFormPanelLoading(tabId); - _showFormPanelSubmit(tabId); - - setTimeout(function () { - var tab = SunstoneCfg["tabs"][tabId]; - var formPanelInstance = tab["formPanelInstances"][formPanelId]; - - var formContext = $("#" + tabId + " div[form-panel-id=" + formPanelId + "]"); - - if (!formPanelInstance) { - formContext = - $("
    \ -
    \ -
    \ -
    ").appendTo($(".contentForm", context)); - - // Create panelInstance, insert in the DOM and setup - var formPanel = tab["formPanels"][formPanelId]; - if (!formPanel) { - console.log("Form Panel not defined"); - return false; - } // Panel not defined - - Foundation.reflow(context, "tabs"); - - formPanelInstance = new formPanel(); - tab["formPanelInstances"][formPanelId] = formPanelInstance; - - if (action != undefined) { - formPanelInstance.setAction(formContext, action); - } - - formPanelInstance.insert(formContext); - } - - if (action != undefined) { - formPanelInstance.setAction(formContext, action); - } - - tab["activeFormPanel"] = formPanelInstance; - - // Hide wizard/advanced selector if advanced not defined - if (formPanelInstance.htmlAdvanced) { - $(".wizard_tabs", context).show(); - } else { - $(".wizard_tabs", context).hide(); - $("a[href=\"#" + tab.tabName + "-wizardForms\"]", context).click(); - } - - // Hide reset button if not defined - if (formPanelInstance.resetButton()) { - $(".reset_button", context).show(); - } else { - $(".reset_button", context).hide(); - } - - _hideFormPanelLoading(tabId); - - formPanelInstance.onShow(formContext); - if (onShow2) { - onShow2(formPanelInstance, formContext); - } - }, 13); - } - - var _submitFormPanel = function (tabId) { - var context = $("#" + tabId); - //_popFormPanelLoading(tabId); - // Workaround until Foundation.abide support hidden forms - - var context = $("#" + tabId); - $(".sunstone-form-title", context).text(Locale.tr("Submitting...")); - $(".submit_button", context).text(Locale.tr("Submitting...")); - - _disableFormPanelSubmit(tabId); - - setTimeout(function () { - var formPanelInstance = SunstoneCfg["tabs"][tabId].activeFormPanel; - - if ($(".wizardForms", context).is(":visible")) { - $("#" + formPanelInstance.formPanelId + "Wizard").submit(); - } else if ($(".advancedForms", context).is(":visible")) { - $("#" + formPanelInstance.formPanelId + "Advanced").submit(); - } - }, 13); - }; - - /** - * Resets the form panel. The loading screen is shown, then the panel is reset - * and shown - * - * @param {String} tabId TAB_ID. Optional, if it is not provided the current - * tab will be used - * @param {String} formPanelId TAB_ID. Optional, if it is not provided the - * visible form panel will be used - */ - var _resetFormPanel = function (tabId, formPanelId) { - if (tabId == undefined) { - tabId = _getTab(); - } - - _popFormPanelLoading(tabId); - - setTimeout(function () { - var formPanelInstance; - if (formPanelId != undefined) { - formPanelInstance = SunstoneCfg["tabs"][tabId]["formPanelInstances"][formPanelId]; - } else { - formPanelInstance = SunstoneCfg["tabs"][tabId].activeFormPanel; - } - - if (formPanelInstance) { - var context = $("#" + tabId + " div[form-panel-id=" + formPanelInstance.formPanelId + "]"); - - formPanelId = formPanelInstance.formPanelId; - - formPanelInstance.reset(context); - } - - if (_formPanelVisible($("#" + tabId))) { - _showFormPanel(tabId, formPanelId); - } - }, 13); - }; - - /** - * Hides the form panel loading (spinning icon on submit), and resets - * the header and submit button texts - * - * @param {String} tabId TAB_ID. Optional, if it is not provided the current - * tab will be used - */ - function _hideFormPanelLoading(tabId) { - if (tabId == undefined) { - tabId = _getTab(); - } - - var context = $("#" + tabId); - //$(".sunstone-form", context).html(content); - - $(".loadingForm", context).hide(); - $(".tabs-contentForm", context).hide(); - - var formPanelInstance = SunstoneCfg["tabs"][tabId].activeFormPanel; - if (formPanelInstance) { - // Set title and button strings - $(".sunstone-form-title", context).text(formPanelInstance.title()); - $(".submit_button", context).text(formPanelInstance.buttonText()); - - $("div[form-panel-id=" + formPanelInstance.formPanelId + "]", context).fadeIn(); - } - - _enableFormPanelSubmit(tabId); - } - - function _hideFormPanel(tabId) { - if (tabId == undefined) { - tabId = _getTab(); - } - - var context = $("#" + tabId); - - if (_formPanelVisible(context)) { - $("[href=\"back\"]", context).trigger("click"); - } - } - - function _popFormPanelLoading(tabId) { - if (tabId == undefined) { - tabId = _getTab(); - } - - if (_getTab() != tabId) { - _routerShowTab(tabId); - } - - if (!_formPanelVisible($("#" + tabId)) && router != undefined) { - router.navigate(tabId + "/form"); - } - - var context = $("#" + tabId); - $(".sunstone-list", context).hide(); - $(".sunstone-info", context).hide(); - $(".sunstone-form", context).show(); - $(".only-sunstone-list", context).hide(); - $(".only-sunstone-info", context).hide(); - $(".only-sunstone-form", context).show(); - $(".action_blocks", context).removeClass("large-9").addClass("large-12"); - - $(".sunstone-form-title", context).text(Locale.tr("Loading...")); - $(".submit_button", context).text(Locale.tr("Loading...")); - _disableFormPanelSubmit(tabId); - - $(".sunstone-form-id", context).text(""); - $(".sunstone-form-info-header", context).text(""); - $(".sunstone-form-info-header-small", context).text(""); - - $(".tabs-contentForm", context).hide(); - $(".loadingForm", context).show(); - } - - function _disableFormPanelSubmit(tabId) { - var context = $("#" + tabId); - $(".submit_button", context). - attr("disabled", "disabled"). - on("click.disable", function (e) { return false; }); - } - - function _enableFormPanelSubmit(tabId) { - if (tabId == undefined) { - tabId = _getTab(); - } - - var context = $("#" + tabId); - $(".submit_button", context). - removeAttr("disabled"). - off("click.disable"); - } - - function _hideFormPanelSubmit(tabId) { - var context = $("#" + tabId); - $(".submit_button", context).hide(); - } - - function _showFormPanelSubmit(tabId) { - var context = $("#" + tabId); - $(".submit_button", context).show(); - } - - var _getButton = function (tadId, buttonName) { - var button = null; - var buttons = SunstoneCfg["tabs"][tadId]["buttons"]; - button = buttons[buttonName]; - //not found, is it in the list then? - if (!button && buttons["action_list"]) { - button = buttons["action_list"]["actions"][buttonName]; - } - return button; - }; - - var _rightInfoVisible = function (context) { - return $(".sunstone-info", context).is(":visible"); - }; - - var _rightListVisible = function (context) { - return $(".sunstone-list", context).is(":visible"); - }; - - var _formPanelVisible = function (context) { - return $(".sunstone-form", context).is(":visible"); - }; - - var _rightInfoResourceId = function (context) { - return $(".resource-id", context).text(); - }; - - var _getAction = function (actionId) { - return SunstoneCfg["actions"][actionId]; - }; - - var _getDataTable = function (tabName) { - if (SunstoneCfg["tabs"][tabName]) { - return SunstoneCfg["tabs"][tabName].dataTable; - } - }; - - var _getResource = function (tabName) { - if (SunstoneCfg["tabs"][tabName]) { - return SunstoneCfg["tabs"][tabName].resource; - } - }; - - var _getDialogInstance = function (dialogId) { - var dialogInstance = SunstoneCfg["dialogInstances"][dialogId]; - if (dialogInstance == undefined) { - var Dialog = SunstoneCfg["dialogs"][dialogId]; - var dialogInstance = new Dialog(); - dialogInstance.insert(); - SunstoneCfg["dialogInstances"][dialogId] = dialogInstance; - } - - return dialogInstance; - }; - - var _setupNavigoRoutes = function () { - router = new Navigo(null, true); - - for (var tabName in SunstoneCfg["tabs"]) { - router.on(new RegExp("(?:#|/)" + tabName + "/form"), function () { - if (_getTab() == undefined) { - // This will happen if the user opens sunstone directly in a /form url - _showTab(this); - } - }.bind(tabName)); - - router.on(new RegExp("(?:#|/)" + tabName + "/(\\d+)"), function (id) { - _routerShowElement(this, id); - }.bind(tabName)); - - router.on(new RegExp("(?:#|/)" + tabName), function () { - _routerShowTab(this); - }.bind(tabName)); - } - - router.on(function () { - _routerShowTab(DASHBOARD_TAB_ID); - }); - - $(document).on("click", "a", function (e) { - if ($(this).attr("href") != undefined && - $(this).attr("href")[0] === "#") { - e.preventDefault(); - } - }); - - router.resolve(); - }; - - var Sunstone = { - "addMainTabs": _addMainTabs, - "addDialogs": _addDialogs, - - "insertTabs": _insertTabs, - "insertPanels": _insertPanels, - "getElementRightInfo": _getElementRightInfo, - - "showTab": _showTab, - "showElement": _showElement, - "getTab": _getTab, - - "showFormPanel": _showFormPanel, - "resetFormPanel": _resetFormPanel, - "hideFormPanel": _hideFormPanel, - "hideFormPanelLoading": _hideFormPanelLoading, - "disableFormPanelSubmit": _disableFormPanelSubmit, - "enableFormPanelSubmit": _enableFormPanelSubmit, - "hideFormPanelSubmit": _hideFormPanelSubmit, - "showFormPanelSubmit": _showFormPanelSubmit, - - - "rightInfoVisible": _rightInfoVisible, - "rightListVisible": _rightListVisible, - "rightInfoResourceId": _rightInfoResourceId, - - "runAction": _runAction, - "getAction": _getAction, - "getButton": _getButton, - "getDataTable": _getDataTable, - "getResource": _getResource, - "getDialog": _getDialogInstance, - - "insertButtonsInTab": _insertButtonsInTab, - - "TOP_INTERVAL": TOP_INTERVAL, - - "setupNavigoRoutes": _setupNavigoRoutes - }; - - return Sunstone; -}); diff --git a/public/app/sunstone/buttons.hbs b/public/app/sunstone/buttons.hbs deleted file mode 100644 index 54b5dbd3..00000000 --- a/public/app/sunstone/buttons.hbs +++ /dev/null @@ -1,92 +0,0 @@ -{{! -------------------------------------------------------------------------- }} -{{! Copyright 2002-2017, OpenNebula Project, OpenNebula Systems }} -{{! }} -{{! Licensed under the Apache License, Version 2.0 (the "License"); you may }} -{{! not use this file except in compliance with the License. You may obtain }} -{{! a copy of the License at }} -{{! }} -{{! http://www.apache.org/licenses/LICENSE-2.0 }} -{{! }} -{{! Unless required by applicable law or agreed to in writing, software }} -{{! distributed under the License is distributed on an "AS IS" BASIS, }} -{{! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. }} -{{! See the License for the specific language governing permissions and }} -{{! limitations under the License. }} -{{! -------------------------------------------------------------------------- }} - - - {{#unless customContext}} - - - - {{/unless}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/app/sunstone/panels.hbs b/public/app/sunstone/panels.hbs deleted file mode 100644 index d149cdd5..00000000 --- a/public/app/sunstone/panels.hbs +++ /dev/null @@ -1,38 +0,0 @@ -{{! -------------------------------------------------------------------------- }} -{{! Copyright 2002-2017, OpenNebula Project, OpenNebula Systems }} -{{! }} -{{! Licensed under the Apache License, Version 2.0 (the "License"); you may }} -{{! not use this file except in compliance with the License. You may obtain }} -{{! a copy of the License at }} -{{! }} -{{! http://www.apache.org/licenses/LICENSE-2.0 }} -{{! }} -{{! Unless required by applicable law or agreed to in writing, software }} -{{! distributed under the License is distributed on an "AS IS" BASIS, }} -{{! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. }} -{{! See the License for the specific language governing permissions and }} -{{! limitations under the License. }} -{{! -------------------------------------------------------------------------- }} - -
    - -
    - {{#each panels}} -
    - {{{html}}} -
    - {{/each}} -
    -
    diff --git a/public/app/sunstone/tab.hbs b/public/app/sunstone/tab.hbs deleted file mode 100644 index b2315015..00000000 --- a/public/app/sunstone/tab.hbs +++ /dev/null @@ -1,89 +0,0 @@ -{{! -------------------------------------------------------------------------- }} -{{! Copyright 2002-2017, OpenNebula Project, OpenNebula Systems }} -{{! }} -{{! Licensed under the Apache License, Version 2.0 (the "License"); you may }} -{{! not use this file except in compliance with the License. You may obtain }} -{{! a copy of the License at }} -{{! }} -{{! http://www.apache.org/licenses/LICENSE-2.0 }} -{{! }} -{{! Unless required by applicable law or agreed to in writing, software }} -{{! distributed under the License is distributed on an "AS IS" BASIS, }} -{{! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. }} -{{! See the License for the specific language governing permissions and }} -{{! limitations under the License. }} -{{! -------------------------------------------------------------------------- }} - \ No newline at end of file diff --git a/public/app/sunstone/user_and_zone.hbs b/public/app/sunstone/user_and_zone.hbs deleted file mode 100644 index 1cd61f75..00000000 --- a/public/app/sunstone/user_and_zone.hbs +++ /dev/null @@ -1,92 +0,0 @@ -{{! -------------------------------------------------------------------------- }} -{{! Copyright 2002-2017, OpenNebula Project, OpenNebula Systems }} -{{! }} -{{! Licensed under the Apache License, Version 2.0 (the "License"); you may }} -{{! not use this file except in compliance with the License. You may obtain }} -{{! a copy of the License at }} -{{! }} -{{! http://www.apache.org/licenses/LICENSE-2.0 }} -{{! }} -{{! Unless required by applicable law or agreed to in writing, software }} -{{! distributed under the License is distributed on an "AS IS" BASIS, }} -{{! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. }} -{{! See the License for the specific language governing permissions and }} -{{! limitations under the License. }} -{{! -------------------------------------------------------------------------- }} - - \ No newline at end of file diff --git a/public/app/tabs/acls-tab.js b/public/app/tabs/acls-tab.js deleted file mode 100644 index 0fc6acf4..00000000 --- a/public/app/tabs/acls-tab.js +++ /dev/null @@ -1,56 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - var Locale = require('utils/locale'); - var Buttons = require('./acls-tab/buttons'); - var Actions = require('./acls-tab/actions'); - var Table = require('./acls-tab/datatable'); - - var TAB_ID = require('./acls-tab/tabId'); - var DATATABLE_ID = "dataTableAcls"; - - var _dialogs = [ - ]; - - var _panels = [ - ]; - - var _formPanels = [ - require('./acls-tab/form-panels/create') - ]; - - var Tab = { - tabId: TAB_ID, - title: Locale.tr("ACLs"), - icon: 'fa-key', - tabClass: "subTab", - parentTab: "system-top-tab", - listHeader: Locale.tr("Access Control Lists"), - subheader: '\ - '+Locale.tr("TOTAL")+'\ - ', - resource: 'Acl', - buttons: Buttons, - actions: Actions, - dataTable: new Table(DATATABLE_ID, {actions: true, info: false}), - panels: _panels, - formPanels: _formPanels, - dialogs: _dialogs - }; - - return Tab; -}); diff --git a/public/app/tabs/acls-tab/actions.js b/public/app/tabs/acls-tab/actions.js deleted file mode 100644 index c4df7609..00000000 --- a/public/app/tabs/acls-tab/actions.js +++ /dev/null @@ -1,43 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - var Sunstone = require('sunstone'); - var Notifier = require('utils/notifier'); - var Locale = require('utils/locale'); - var DataTable = require('./datatable'); - var OpenNebulaResource = require('opennebula/acl'); - var CommonActions = require('utils/common-actions'); - - var TAB_ID = require('./tabId'); - var CREATE_DIALOG_ID = require('./form-panels/create/formPanelId'); - - var XML_ROOT = "ACL" - var RESOURCE = "Acl" - - var _commonActions = new CommonActions(OpenNebulaResource, RESOURCE, TAB_ID, - XML_ROOT, Locale.tr("ACL Rule created")); - - var _actions = { - "Acl.list" : _commonActions.list(), - "Acl.refresh" : _commonActions.refresh(), - "Acl.delete" : _commonActions.del(), - "Acl.create" : _commonActions.create(CREATE_DIALOG_ID), - "Acl.create_dialog" : _commonActions.showCreate(CREATE_DIALOG_ID) - }; - - return _actions; -}); diff --git a/public/app/tabs/acls-tab/buttons.js b/public/app/tabs/acls-tab/buttons.js deleted file mode 100644 index c0c4ac1f..00000000 --- a/public/app/tabs/acls-tab/buttons.js +++ /dev/null @@ -1,38 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - var Locale = require('utils/locale'); - - var Buttons = { - "Acl.refresh" : { - type: "action", - layout: "refresh", - alwaysActive: true - }, - "Acl.create_dialog" : { - type: "create_dialog", - layout: "create" - }, - "Acl.delete" : { - type: "confirm", - text: Locale.tr("Delete"), - layout: "del" - }, - }; - - return Buttons; -}); diff --git a/public/app/tabs/acls-tab/datatable.js b/public/app/tabs/acls-tab/datatable.js deleted file mode 100644 index 92c02998..00000000 --- a/public/app/tabs/acls-tab/datatable.js +++ /dev/null @@ -1,282 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - /* - DEPENDENCIES - */ - - var TabDataTable = require('utils/tab-datatable'); - var SunstoneConfig = require('sunstone-config'); - var Locale = require('utils/locale'); - - var OpenNebulaUser = require('opennebula/user'); - var OpenNebulaGroup = require('opennebula/group'); - var OpenNebulaZone = require('opennebula/zone'); - - /* - CONSTANTS - */ - - var RESOURCE = "Acl"; - var XML_ROOT = "ACL"; - var TAB_NAME = require('./tabId'); - - /* - CONSTRUCTOR - */ - - function Table(dataTableId, conf) { - this.conf = conf || {}; - this.tabId = TAB_NAME; - this.dataTableId = dataTableId; - this.resource = RESOURCE; - this.xmlRoot = XML_ROOT; - - this.dataTableOptions = { - "bSortClasses" : false, - "bDeferRender": true, - "aoColumnDefs": [ - { "bSortable": false, "aTargets": ["check",2,3,4,5,6,7] }, - {"sWidth": "35px", "aTargets": [0]}, - {"bVisible": true, "aTargets": SunstoneConfig.tabTableColumns(TAB_NAME)}, - {"bVisible": false, "aTargets": ['_all']}, - {"sType": "num", "aTargets": [1]} - ] - }; - - this.totalACLs = 0; - - this.columns = [ - Locale.tr("ID"), - Locale.tr("Applies to"), - Locale.tr("Affected resources"), - Locale.tr("Resource ID / Owned by"), - Locale.tr("Allowed operations"), - Locale.tr("Zone"), - Locale.tr("ACL String") - ]; - - this.selectOptions = { - "id_index": 1, - "name_index": 1, - "select_resource": Locale.tr("Please select an ACL rule from the list"), - "you_selected": Locale.tr("You selected the following ACL rule:"), - "select_resource_multiple": Locale.tr("Please select one or more ACL rules from the list"), - "you_selected_multiple": Locale.tr("You selected the following ACL rules:") - }; - - TabDataTable.call(this); - } - - Table.prototype = Object.create(TabDataTable.prototype); - Table.prototype.constructor = Table; - Table.prototype.elementArray = _elementArray; - Table.prototype.preUpdateView = _preUpdateView; - Table.prototype.postUpdateView = _postUpdateView; - - return Table; - - /* - FUNCTION DEFINITIONS - */ - - function _elementArray(element_json) { - var element = element_json[XML_ROOT]; - - var acl_string = element.STRING; - - var acl_array = _parseAclString(acl_string); - - this.totalACLs++; - - return [ - '', - element.ID, - acl_array[0], - acl_array[1], - acl_array[2], - acl_array[3], - Locale.tr(acl_array[4].charAt(0).toUpperCase()+acl_array[4].substring(1)), //capitalize 1st letter for translation - element.STRING - ]; - } - - - //Parses a full ACL string, and translates it into - //a legible array - //to be put in the datatable fields. - function _parseAclString(string) { - var space_split = string.split(' '); - var user = space_split[0]; - var resources = space_split[1]; - var rights = space_split[2]; - var zone = space_split[3]; - - //User - var user_str = _parseUserAcl(user); - - - //Resources - var resources_str=""; - var resources_array = resources.split('/'); - var belonging_to = _parseResourceAcl(resources_array[1]); - resources_array = resources_array[0].split('+'); - for (var i=0; i All - // @1 -> Group 1 (tries to translate "1" into group name) - // #1 -> User 1 (tries to translate "1" into username) - //Translation of usernames and groupnames depends on - //group and user plugins tables. - function _parseUserAcl(user){ - var user_str=""; - if (user[0] == '*'){ - user_str = Locale.tr("All"); - } else { - if (user[0] == '#'){ - user_str=Locale.tr("User")+" "; - user_str+= OpenNebulaUser.getName(user.substring(1)); - } - else if (user[0] == '@'){ - user_str=Locale.tr("Group")+" "; - user_str+= OpenNebulaGroup.getName(user.substring(1)); - } - } - return user_str; - } - - //Similar to above, but #1 means resource with "ID 1" - function _parseResourceAcl(user){ - var user_str=""; - if (user[0] == '*'){ - user_str = Locale.tr("All"); - } else { - if (user[0] == '#'){ - user_str=Locale.tr("ID")+" "; - user_str+= user.substring(1); - } - else if (user[0] == '@'){ - user_str=Locale.tr("Group")+" "; - user_str+= OpenNebulaGroup.getName(user.substring(1)); - } - else if (user[0] == '%'){ - user_str=Locale.tr("Cluster ID")+" "; - user_str+= user.substring(1); - } - } - return user_str; - } - - //Receives a segment of an ACL and translates: - // * -> All - // #1 -> Zone 1 (tries to translate "1" into zone name) - //Translation of zone names depends on - //zone plugins tables. - function _parseZoneAcl(zone){ - var zone_str = ""; - - if (zone[0] == '*'){ - zone_str = Locale.tr("All"); - } else if (zone[0] == '#'){ - zone_str = OpenNebulaZone.getName(zone.substring(1)); - } - - return zone_str; - } - - function _preUpdateView() { - this.totalACLs = 0; - } - - function _postUpdateView() { - $(".total_acl").text(this.totalACLs); - } - -}); diff --git a/public/app/tabs/acls-tab/form-panels/create.js b/public/app/tabs/acls-tab/form-panels/create.js deleted file mode 100644 index ae8c9129..00000000 --- a/public/app/tabs/acls-tab/form-panels/create.js +++ /dev/null @@ -1,307 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - /* - DEPENDENCIES - */ - - //require('foundation.tab'); - var BaseFormPanel = require('utils/form-panels/form-panel'); - var Sunstone = require('sunstone'); - var Locale = require('utils/locale'); - var Notifier = require('utils/notifier'); - var ResourceSelect = require('utils/resource-select'); - - /* - TEMPLATES - */ - - var TemplateWizardHTML = require('hbs!./create/wizard'); - - /* - CONSTANTS - */ - - var FORM_PANEL_ID = require('./create/formPanelId'); - var TAB_ID = require('../tabId'); - - /* - CONSTRUCTOR - */ - - function FormPanel() { - this.formPanelId = FORM_PANEL_ID; - this.tabId = TAB_ID; - this.actions = { - 'create': { - 'title': Locale.tr("Create ACL"), - 'buttonText': Locale.tr("Create"), - 'resetButton': true - } - }; - - BaseFormPanel.call(this); - } - - FormPanel.FORM_PANEL_ID = FORM_PANEL_ID; - FormPanel.prototype = Object.create(BaseFormPanel.prototype); - FormPanel.prototype.constructor = FormPanel; - FormPanel.prototype.htmlWizard = _htmlWizard; - FormPanel.prototype.submitWizard = _submitWizard; - FormPanel.prototype.onShow = _onShow; - FormPanel.prototype.setup = _setup; - - return FormPanel; - - /* - FUNCTION DEFINITIONS - */ - - function _htmlWizard() { - return TemplateWizardHTML({ - 'formPanelId': this.formPanelId - }); - } - - function _setup(context) { - //Default selected options - $('#applies_all',context).attr('checked','checked'); - $('.applies_to_user',context).hide(); - $('.applies_to_group',context).hide(); - - $('#res_subgroup_all',context).attr('checked','checked'); - $('.res_id',context).hide(); - $('.belonging_to',context).hide(); - $('.in_cluster',context).hide(); - - //Applies to subset radio buttons - $('.applies',context).click(function(){ - var value = $(this).val(); - switch (value) { - case "*": - $('.applies_to_user',context).hide(); - $('.applies_to_group',context).hide(); - break; - case "applies_to_user": - $('.applies_to_user',context).show(); - $('.applies_to_group',context).hide(); - break; - case "applies_to_group": - $('.applies_to_user',context).hide(); - $('.applies_to_group',context).show(); - break; - } - }); - - //Resource subset radio buttons - $('.res_subgroup',context).click(function(){ - var value = $(this).val(); - switch (value) { - case "*": - $('.res_id',context).hide(); - $('.belonging_to',context).hide(); - $('.in_cluster',context).hide(); - break; - case "res_id": - $('.res_id',context).show(); - $('.belonging_to').hide(); - $('.in_cluster',context).hide(); - break; - case "belonging_to": - $('.res_id',context).hide(); - $('.belonging_to',context).show(); - $('.in_cluster',context).hide(); - break; - case "in_cluster": - $('.res_id',context).hide(); - $('.belonging_to',context).hide(); - $('.in_cluster',context).show(); - break; - } - }); - - //trigger ACL string preview on keyup - $('input#res_id',context).keyup(function(){ - $(this).trigger("change"); - }); - - //update the rule preview every time some field changes - context.off('change', 'input,select'); - context.on('change', 'input,select', function(){ - var user=""; - var mode = $('.applies:checked',context).val(); - switch (mode) { - case "*": - user="*"; - break; - case "applies_to_user": - user="#"+$('div#applies_to_user .resource_list_select',context).val(); - break; - case "applies_to_group": - user="@"+$('div#applies_to_group .resource_list_select',context).val(); - break; - } - - var resources = ""; - $('.resource_cb:checked',context).each(function(){ - resources+=$(this).val()+'+'; - }); - - if (resources.length) { - resources = resources.substring(0,resources.length-1); - } - - var belonging=""; - var mode = $('.res_subgroup:checked',context).val(); - switch (mode) { - case "*": - belonging="*"; - break; - case "res_id": - belonging="#"+$('#res_id',context).val(); - break; - case "belonging_to": - belonging="@"+$('div#belonging_to .resource_list_select',context).val(); - break; - case "in_cluster": - belonging="%"+$('#in_cluster .resource_list_select',context).val(); - break; - } - - var rights = ""; - $('.right_cb:checked',context).each(function(){ - rights+=$(this).val()+'+'; - }); - if (rights.length) { - rights = rights.substring(0,rights.length-1); - } - - var zone = $('#zones_applies .resource_list_select',context).val(); - - if (zone != "*"){ - zone = '#'+zone; - } - - var acl_string = user + ' ' + resources + '/' + belonging + ' ' + - rights + ' ' + zone; - $('#acl_preview',context).val(acl_string); - }); - } - - function _submitWizard(context) { - var mode = $('.applies:checked',context).val(); - switch (mode) { - case "applies_to_user": - var l=$('#applies_to_user .resource_list_select',context).val().length; - if (!l){ - Sunstone.hideFormPanelLoading(this.tabId); - Notifier.notifyError(Locale.tr("Please select a user to whom the acl applies")); - return false; - } - break; - case "applies_to_group": - var l=$('#applies_to_group .resource_list_select',context).val().length; - if (!l){ - Sunstone.hideFormPanelLoading(this.tabId); - Notifier.notifyError(Locale.tr("Please select a group to whom the acl applies")); - return false; - } - break; - } - - var resources = $('.resource_cb:checked',context).length; - if (!resources) { - Sunstone.hideFormPanelLoading(this.tabId); - Notifier.notifyError(Locale.tr("Please select at least one resource")); - return false; - } - - var mode = $('.res_subgroup:checked',context).val(); - switch (mode) { - case "res_id": - var l=$('#res_id',context).val().length; - if (!l){ - Sunstone.hideFormPanelLoading(this.tabId); - Notifier.notifyError(Locale.tr("Please provide a resource ID for the resource(s) in this rule")); - return false; - } - break; - case "belonging_to": - var l=$('#belonging_to .resource_list_select',context).val().length; - if (!l){ - Sunstone.hideFormPanelLoading(this.tabId); - Notifier.notifyError("Please select a group to which the selected resources belong to"); - return false; - } - break; - case "in_cluster": - var l=$('#in_cluster .resource_list_select',context).val().length; - if (!l){ - Sunstone.hideFormPanelLoading(this.tabId); - Notifier.notifyError("Please select a cluster to which the selected resources belong to"); - return false; - } - break; - } - - var rights = $('.right_cb:checked',context).length; - if (!rights) { - Sunstone.hideFormPanelLoading(this.tabId); - Notifier.notifyError("Please select at least one operation"); - return false; - } - - var acl_string = $('#acl_preview',context).val(); - - var acl_json = { "acl" : acl_string }; - Sunstone.runAction("Acl.create",acl_json); - return false; - } - - function _onShow(context) { - ResourceSelect.insert({ - context: $('#applies_to_user', context), - resourceName: 'User', - emptyValue: true - }); - - ResourceSelect.insert({ - context: $('#applies_to_group', context), - resourceName: 'Group', - emptyValue: true - }); - - ResourceSelect.insert({ - context: $('#belonging_to', context), - resourceName: 'Group', - emptyValue: true - }); - - ResourceSelect.insert({ - context: $('#in_cluster', context), - resourceName: 'Cluster', - emptyValue: true - }); - - ResourceSelect.insert({ - context: $('#zones_applies', context), - resourceName: 'Zone', - initValue: '*', - extraOptions: '' - }); - } -}); diff --git a/public/app/tabs/acls-tab/form-panels/create/formPanelId.js b/public/app/tabs/acls-tab/form-panels/create/formPanelId.js deleted file mode 100644 index 1473b2b7..00000000 --- a/public/app/tabs/acls-tab/form-panels/create/formPanelId.js +++ /dev/null @@ -1,19 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require){ - return 'createAclForm'; -}); diff --git a/public/app/tabs/acls-tab/form-panels/create/wizard.hbs b/public/app/tabs/acls-tab/form-panels/create/wizard.hbs deleted file mode 100644 index 0c643b0b..00000000 --- a/public/app/tabs/acls-tab/form-panels/create/wizard.hbs +++ /dev/null @@ -1,206 +0,0 @@ -{{! -------------------------------------------------------------------------- }} -{{! Copyright 2002-2017, OpenNebula Project, OpenNebula Systems }} -{{! }} -{{! Licensed under the Apache License, Version 2.0 (the "License"); you may }} -{{! not use this file except in compliance with the License. You may obtain }} -{{! a copy of the License at }} -{{! }} -{{! http://www.apache.org/licenses/LICENSE-2.0 }} -{{! }} -{{! Unless required by applicable law or agreed to in writing, software }} -{{! distributed under the License is distributed on an "AS IS" BASIS, }} -{{! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. }} -{{! See the License for the specific language governing permissions and }} -{{! limitations under the License. }} -{{! -------------------------------------------------------------------------- }} - - -
    -
    -
    - {{tr "This rule applies to"}} -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -
    -
    -
    -
    -
    -
    - -
    -
    -
    -
    -
    - {{tr "Affected resources"}} -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - {{tr "Resource subset"}} -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    -
    -
    -
    - - -
    -
    - -
    -
    -
    -
    - -
    -
    -
    -
    -
    -
    -
    - {{tr "Allowed operations"}} -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    -
    -
    -
    -
    - - -
    -
    - diff --git a/public/app/tabs/acls-tab/tabId.js b/public/app/tabs/acls-tab/tabId.js deleted file mode 100644 index 8a26caaf..00000000 --- a/public/app/tabs/acls-tab/tabId.js +++ /dev/null @@ -1,19 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require){ - return 'acls-tab'; -}); diff --git a/public/app/tabs/ansible-process-tab.js b/public/app/tabs/ansible-process-tab.js deleted file mode 100644 index 784d5c7f..00000000 --- a/public/app/tabs/ansible-process-tab.js +++ /dev/null @@ -1,69 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - var Locale = require('utils/locale'); - var Buttons = require('./ansible-process-tab/buttons'); - var Actions = require('./ansible-process-tab/actions'); - var Table = require('./ansible-process-tab/datatable'); - - var TAB_ID = require('./ansible-process-tab/tabId'); - var DATATABLE_ID = "dataTableAnsibleProcess"; - - - var _dialogs = [ - require('./ansible-process-tab/dialogs/clone') - ]; - - var _panels = [ - require('./ansible-process-tab/panels/info'), - require('./ansible-process-tab/panels/log'), - require('./ansible-process-tab/panels/runnable') - ]; - - - //var _panelsHooks = [ - // require('../utils/hooks/header') - //]; - - var _formPanels = [ - require('./ansible-process-tab/form-panels/create') - ]; - - - var Tab = { - tabId: TAB_ID, - title: Locale.tr("Processes"), - icon: 'fa-cogs', - beta: true, - listHeader: Locale.tr("Processes"), - infoHeader: Locale.tr("Process"), - subheader: '\ - '+Locale.tr("TOTAL")+'\ - ', - resource: 'AnsibleProcess', - buttons: Buttons, - actions: Actions, - dataTable: new Table(DATATABLE_ID, {actions: true, info: true}), - panels: _panels, - formPanels: _formPanels, - dialogs: _dialogs, - tabClass: "subTab", - parentTab: "automatization-top-tab", - }; - - return Tab; -}); diff --git a/public/app/tabs/ansible-process-tab/actions.js b/public/app/tabs/ansible-process-tab/actions.js deleted file mode 100644 index 005d301b..00000000 --- a/public/app/tabs/ansible-process-tab/actions.js +++ /dev/null @@ -1,68 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - var Sunstone = require('sunstone'); - var Notifier = require('utils/notifier'); - var Locale = require('utils/locale'); - var DataTable = require('./datatable'); - var OpenNebulaResource = require('opennebula/ansible-process'); - var OpenNebulaAction = require('opennebula/action'); - var CommonActions = require('utils/common-actions'); - var Navigation = require('utils/navigation'); - var CREATE_DIALOG_ID = require('./form-panels/create/formPanelId'); - var CLONE_DIALOG_ID = require('./dialogs/clone/dialogId'); - - var RESOURCE = "AnsibleProcess"; - var XML_ROOT = "ANSIBLE_PROCESS"; - var TAB_ID = require('./tabId'); - - var _commonActions = new CommonActions(OpenNebulaResource, RESOURCE, TAB_ID, - XML_ROOT, Locale.tr("Ansible created")); - - var _actions = { - "AnsibleProcess.create" : _commonActions.create(), - "AnsibleProcess.list" : _commonActions.list(), - "AnsibleProcess.show" : _commonActions.show(), - "AnsibleProcess.refresh" : _commonActions.refresh(), - "AnsibleProcess.delete" : _commonActions.multipleAction('del'), - "AnsibleProcess.create_dialog" : _commonActions.showCreate(CREATE_DIALOG_ID), - "AnsibleProcess.update_dialog" : _commonActions.checkAndShowUpdate(), - "AnsibleProcess.show_to_update" : _commonActions.showUpdate(CREATE_DIALOG_ID), - "AnsibleProcess.run" : { - type: "multiple", - call: OpenNebulaResource.run, - callback: function(request, response) { - if(response.error){ - Notifier.notifyError("Process didn't started: " + response.error); - } else { - Notifier.notifySubmit(Locale.tr("Process started")); - } - Sunstone.runAction('AnsibleProcess.refresh'); - }, - elements: function(opts) { - return Sunstone.getDataTable(TAB_ID).elements(opts); - }, - error: function(request, response){ - Notifier.onError(request, response); - }, - notify: false - } - }; - - - return _actions; -}); diff --git a/public/app/tabs/ansible-process-tab/buttons.js b/public/app/tabs/ansible-process-tab/buttons.js deleted file mode 100644 index 20e6ba14..00000000 --- a/public/app/tabs/ansible-process-tab/buttons.js +++ /dev/null @@ -1,43 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - var Locale = require('utils/locale'); - - var Buttons = { - "AnsibleProcess.refresh" : { - type: "action", - layout: "refresh", - alwaysActive: true - }, - "AnsibleProcess.create_dialog" : { - type: "create_dialog", - layout: "create" - }, - "AnsibleProcess.run" : { - type: "action", - layout: "main", - text: Locale.tr("Run") - }, - "AnsibleProcess.delete" : { - type: "action", - layout: "del", - text: Locale.tr("Delete") - } - }; - - return Buttons; -}) diff --git a/public/app/tabs/ansible-process-tab/datatable.js b/public/app/tabs/ansible-process-tab/datatable.js deleted file mode 100644 index b444faa8..00000000 --- a/public/app/tabs/ansible-process-tab/datatable.js +++ /dev/null @@ -1,159 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - /* - DEPENDENCIES - */ - - var TabDataTable = require('utils/tab-datatable'); - var SunstoneConfig = require('sunstone-config'); - var Locale = require('utils/locale'); - var LabelsUtils = require('utils/labels/utils'); - var Humanize = require('utils/humanize'); - - /* - CONSTANTS - */ - - var RESOURCE = "AnsibleProcess"; - var XML_ROOT = "ANSIBLE_PROCESS"; - var TAB_NAME = require('./tabId'); - var LABELS_COLUMN = 6; - var TEMPLATE_ATTR = 'TEMPLATE'; - - /* - CONSTRUCTOR - */ - - function Table(dataTableId, conf) { - this.conf = conf || {}; - this.tabId = TAB_NAME; - this.dataTableId = dataTableId; - this.resource = RESOURCE; - this.xmlRoot = XML_ROOT; - this.labelsColumn = LABELS_COLUMN; - this.dataTableOptions = { - "bAutoWidth": false, - "bSortClasses" : false, - "bDeferRender": true, - "aoColumnDefs": [ - {"bSortable": false, "aTargets": ["check"] }, - {"sWidth": "35px", "aTargets": [0]}, - {"bVisible": true, "aTargets": SunstoneConfig.tabTableColumns(TAB_NAME)}, - {"bVisible": false, "aTargets": ['_all']} - ] - }; - - - - this.columns = [ - Locale.tr("ID"), - Locale.tr("Playbook"), - Locale.tr("User"), - Locale.tr("Create time"), - Locale.tr("Install ID"), - Locale.tr("Status") - ]; - - this.selectOptions = { - - }; - - this.totalProcesses = 0; - - TabDataTable.call(this); - - } - - Table.prototype = Object.create(TabDataTable.prototype); - Table.prototype.constructor = Table; - Table.prototype.elementArray = _elementArray; - Table.prototype.preUpdateView = _preUpdateView; - Table.prototype.postUpdateView = _postUpdateView; - - return Table; - - - /* - FUNCTION DEFINITIONS - */ - - function _elementArray(element_json) { - var element = element_json[XML_ROOT]; - - this.totalProcesses++; - return [ - - '', - element.proc_id, - element.playbook_name, - element.uname, - Humanize.prettyTime(element.create_time), - element.install_id, - element.status - ]; - } - - function _lengthOf(ids){ - var l = 0; - if ($.isArray(ids)) - l = ids.length; - else if (!$.isEmptyObject(ids)) - l = 1; - return l; - } - - function _preUpdateView() { - this.totalProcesses = 0; - } - - function _postUpdateView() { - $(".total_processes").text(this.totalProcesses); - if($('.odd').text().search('NaN:NaN:NaN NaN/NaN/NaN') != '-1'){ - $('.odd').html('\n' + - '\n' + - '
    \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - '
    \n' + - ' There is no data available\n' + - '
    \n' + - '
    \n' + - ''); - } - $('#dataTableAnsibleProcess').off('click', 'tbody .check_item'); - $('[href="AnsibleProcess.run"]').hide(); - $('#dataTableAnsibleProcess').on('click', 'tbody .check_item', function () { - if ($(this).prop('checked')){ - if ($(this).parent().siblings().last().text() != Locale.tr('PENDING')){ - $('[href="AnsibleProcess.run"]').hide(); - }else{ - $('[href="AnsibleProcess.run"]').show(); - } - }else{ - $('[href="AnsibleProcess.run"]').hide(); - } - - }); - - } - -}); diff --git a/public/app/tabs/ansible-process-tab/datatable/search.hbs b/public/app/tabs/ansible-process-tab/datatable/search.hbs deleted file mode 100644 index fd7b277f..00000000 --- a/public/app/tabs/ansible-process-tab/datatable/search.hbs +++ /dev/null @@ -1,36 +0,0 @@ -
    -
    - - - -
    -
    -
    -
    - -
    -
    - -
    -
    \ No newline at end of file diff --git a/public/app/tabs/ansible-process-tab/dialogs/clone.js b/public/app/tabs/ansible-process-tab/dialogs/clone.js deleted file mode 100644 index 3d9c1b94..00000000 --- a/public/app/tabs/ansible-process-tab/dialogs/clone.js +++ /dev/null @@ -1,131 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - /* - DEPENDENCIES - */ - - var BaseDialog = require('utils/dialogs/dialog'); - var TemplateHTML = require('hbs!./clone/html'); - var Sunstone = require('sunstone'); - var Notifier = require('utils/notifier'); - var AnsiblePlaybook = require('opennebula/ansible-process'); - - /* - CONSTANTS - */ - - var DIALOG_ID = require('./clone/dialogId'); - - /* - CONSTRUCTOR - */ - - function Dialog() { - this.dialogId = DIALOG_ID; - - BaseDialog.call(this); - }; - - Dialog.DIALOG_ID = DIALOG_ID; - Dialog.prototype = Object.create(BaseDialog.prototype); - Dialog.prototype.constructor = Dialog; - Dialog.prototype.html = _html; - Dialog.prototype.onShow = _onShow; - Dialog.prototype.setup = _setup; - Dialog.prototype.setParams = _setParams; - - return Dialog; - - /* - FUNCTION DEFINITIONS - */ - - function _html() { - return TemplateHTML({ - 'dialogId': this.dialogId - }); - } - - function _setParams(params) { - this.params = params; - this.tabId = params.tabId; - this.resource = params.resource; - } - - function _setup(context) { - var that = this; - - $('#' + DIALOG_ID + 'Form', context).submit(function(e) { - e.preventDefault(); - return false; - }); - - $('#' + DIALOG_ID + 'Form', context).on("click", "button.custom_submit", function() { - if(!$('#' + DIALOG_ID + 'Form', context)[0].checkValidity()){ - return true; - } - - var extra_info; - var name = $('#' + DIALOG_ID + 'Form input[name="name"]').val(); - var sel_elems = Sunstone.getDataTable(that.tabId).elements(); - - if (sel_elems.length > 1) { - for (var i = 0; i < sel_elems.length; i++) { - //If we are cloning several images we - //use the name as prefix - extra_info = name + AnsiblePlaybook.getName(sel_elems[i]); - Sunstone.runAction($(this).val(), sel_elems[i], extra_info); - } - } else { - extra_info = name; - Sunstone.runAction($(this).val(), sel_elems[0], extra_info) - } - - Sunstone.getDialog(DIALOG_ID).hide(); - Sunstone.getDialog(DIALOG_ID).reset(); - setTimeout(function() { - Sunstone.runAction(that.resource+'.refresh'); - }, 1500); - - return false; - }); - - return false; - } - - function _onShow(context) { - var sel_elems = Sunstone.getDataTable(this.tabId).elements({names: true}); - - this.setNames( {elements: sel_elems} ); - - //show different text depending on how many elements are selected - if (sel_elems.length > 1) { - $('.clone_one', context).hide(); - $('.clone_several', context).show(); - $('input[name="name"]',context).val('Copy of '); - } else { - $('.clone_one', context).show(); - $('.clone_several', context).hide(); - $('input[name="name"]', context).val('Copy of ' + sel_elems[0].name); - }; - - $("input[name='name']", context).focus(); - - return false; - } -}); diff --git a/public/app/tabs/ansible-process-tab/dialogs/clone/dialogId.js b/public/app/tabs/ansible-process-tab/dialogs/clone/dialogId.js deleted file mode 100644 index 797ef4fa..00000000 --- a/public/app/tabs/ansible-process-tab/dialogs/clone/dialogId.js +++ /dev/null @@ -1,19 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require){ - return 'clonePlaybookDialog'; -}) diff --git a/public/app/tabs/ansible-process-tab/dialogs/clone/html.hbs b/public/app/tabs/ansible-process-tab/dialogs/clone/html.hbs deleted file mode 100644 index db74e341..00000000 --- a/public/app/tabs/ansible-process-tab/dialogs/clone/html.hbs +++ /dev/null @@ -1,50 +0,0 @@ -{{! -------------------------------------------------------------------------- }} -{{! Copyright 2002-2017, OpenNebula Project, OpenNebula Systems }} -{{! }} -{{! Licensed under the Apache License, Version 2.0 (the "License"); you may }} -{{! not use this file except in compliance with the License. You may obtain }} -{{! a copy of the License at }} -{{! }} -{{! http://www.apache.org/licenses/LICENSE-2.0 }} -{{! }} -{{! Unless required by applicable law or agreed to in writing, software }} -{{! distributed under the License is distributed on an "AS IS" BASIS, }} -{{! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. }} -{{! See the License for the specific language governing permissions and }} -{{! limitations under the License. }} -{{! -------------------------------------------------------------------------- }} - -
    -
    -

    {{tr "Clone Template"}}

    -
    -
    -
    -
    -
    -
    -
    - {{tr "Several playbooks are selected, please choose prefix to name the new copies"}} -
    -
    -
    -
    -
    - - - -
    -
    -
    -
    -

    {{tr "You can also clone any Image referenced inside this Template. They will be cloned to a new Image, and made persistent."}}

    -
    -
    -
    - -
    - -
    -
    diff --git a/public/app/tabs/ansible-process-tab/form-panels/create.js b/public/app/tabs/ansible-process-tab/form-panels/create.js deleted file mode 100644 index 3c886822..00000000 --- a/public/app/tabs/ansible-process-tab/form-panels/create.js +++ /dev/null @@ -1,345 +0,0 @@ -/* -------------------------------------------------------------------------- */ -/* Copyright 2002-2017, OpenNebula Project, OpenNebula Systems */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); you may */ -/* not use this file except in compliance with the License. You may obtain */ -/* a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ -/* See the License for the specific language governing permissions and */ -/* limitations under the License. */ -/* -------------------------------------------------------------------------- */ - -define(function(require) { - /* - DEPENDENCIES - */ - - var BaseFormPanel = require('utils/form-panels/form-panel'); - var Sunstone = require('sunstone'); - var Locale = require('utils/locale'); - var Tips = require('utils/tips'); - var Notifier = require('utils/notifier'); - var ResourceSelect = require('utils/resource-select'); - var Config = require('sunstone-config'); - var WizardFields = require('utils/wizard-fields'); - var OpenNebula = require('opennebula'); - var CommonActions = require('utils/common-actions'); - var VMTable = require('tabs/vms-tab/datatable'); - - - /* - TEMPLATES - */ - - var TemplateWizardHTML = require('hbs!./create/wizard'); - - /* - CONSTANTS - */ - - var FORM_PANEL_ID = require('./create/formPanelId'); - var TAB_ID = require('../tabId'); - - /* - CONSTRUCTOR - */ - - function FormPanel() { - - this.formPanelId = FORM_PANEL_ID; - this.tabId = TAB_ID; - if (config.user_config.default_view == 'user'){ - var but_txt = Locale.tr("Run"); - }else{ - var but_txt = Locale.tr("Create"); - } - this.actions = { - 'create': { - 'title': Locale.tr("Create Process"), - 'buttonText': but_txt, - 'resetButton': true - } - } - - var that = this; - - BaseFormPanel.call(this); - }; - - var Playbooks; - OpenNebula.Ansible.list({ - success: function(r, res){ - Playbooks = res; - }, error:function(r, res){ - - } - }); - - FormPanel.FORM_PANEL_ID = FORM_PANEL_ID; - FormPanel.prototype = Object.create(BaseFormPanel.prototype); - FormPanel.prototype.htmlWizard = _htmlWizard; - FormPanel.prototype.submitWizard = _submitWizard; - FormPanel.prototype.onShow = _onShow; - FormPanel.prototype.setup = _setup; - FormPanel.prototype.fill = _fill; - FormPanel.prototype.constructor = FormPanel; - - return FormPanel; - - /* - FUNCTION DEFINITIONS - */ - - function _htmlWizard() { - - var opts = { - info: false, - select: true, - selectOptions: {"multiple_choice": true} - }; - - this.VMTable = new VMTable("vms_wizard_process", opts); - - return TemplateWizardHTML({ - 'formPanelId': this.formPanelId, - 'VMTableHTML': this.VMTable.dataTableHTML, - 'Playbooks': Playbooks, - }); - } - - function _setup(context) { - - $('div').on('click',function(){ - var Hosts = {}; - var HostsData = []; - $('.login-pass-vm').find('input').each(function(index,data){ - HostsData.push(data.value); - }); - for(var i = 0; i < HostsData.length; i += 4){ - Hosts[HostsData[i].split(' ')[0]] = [ - HostsData[i].split(' ')[4] + ':' + HostsData[i + 1], - HostsData[i + 2] + ':' + HostsData[i + 3], - ] - }; - - var Vars = {}; - $('.playbooks_vars').find('input').each(function(index, input){ - Vars[input.name] = input.value - }); - - var id_playbooks = $('#Playbooks').val(); - - if(Object.keys(Hosts).length != 0 && Object.keys(HostsData).length != 0 && id_playbooks != ''){ - if($('.playbooks_vars').find('input').length != 0){ - if(Object.keys(HostsData).length != 0) { - $('#ansible-process-tabsubmit_button button').prop('disabled', false); - }else{ - $('#ansible-process-tabsubmit_button button').prop('disabled', true); - } - }else{ - $('#ansible-process-tabsubmit_button button').prop('disabled', false); - } - }else{ - $('#ansible-process-tabsubmit_button button').prop('disabled', true); - } - }); - - $('#Playbooks').on('click',function () { - - var id_playbooks = $('#Playbooks').val(); - var playbook; - var html = ''; - - $('.playbooks_vars').html(''); - if(id_playbooks != '') { - OpenNebula.Ansible.show({ - data: {id: id_playbooks}, - success: function (r, res) { - for (key in res.ANSIBLE.VARS){ - html +='
    '+ key + '' + - '
    '; - }; - $('.playbooks_vars').append(html); - for (key in res.ANSIBLE.VARS){ - if (isNaN(res.ANSIBLE.VARS[key]) == true && res.ANSIBLE.VARS[key].indexOf('\\') == 0) { - $("input[name="+key+"]").val(res.ANSIBLE.VARS[key].replace(/[\\"]+/g, '\"')); - }else{ - $("input[name="+key+"]").val(res.ANSIBLE.VARS[key]); - } - } - } - }); - } - }); - - $("#vms_wizard_process", context).on('click', 'tbody [role="row"]', function () { - var status_index = $('#vms_wizard_process thead th:contains("Status")').index(); - if ($(this).find('td').eq(status_index).text() == Locale.tr('RUNNING')) { - - $('.fa-times').on('click', function () { - $('input[value="' + $(this).parent().attr("info") + '"]').parent().remove(); - }); - - $('.login-pass-vm').html(''); - var allvm = new Object(); - var3 = 0; - $('#selected_ids_row_vms_wizard_process').find('.radius.label').each(function (var1, var2) { - if ($(var2).attr('row_id') != undefined) { - $('.login-pass-vm').append('
    ' + $(var2).attr("info") + '
    ' + - '' + - '
    ' + - '
    ' + - '
    ' + - '
    '); - allvm[var3] = $(var2).attr('row_id'); - var3++; - } - }); - }else{ - $(this).removeClass('markrowchecked'); - $('.fa-times').last().click(); - } - }); - - $('#checkbox_sshkey').on('click',function () { - if($('#checkbox_sshkey').prop('checked') == true){ - $('.ssh_key_ok').removeClass('hidden'); - }else{ - $('.ssh_key_ok').addClass('hidden'); - } - }); - - - var that = this; - this.VMTable.initialize(); - - return false; - } - - function _submitWizard(context) { - var that = this; - - var Hosts = {}; - var HostsData = []; - $('.login-pass-vm').find('input').each(function(index,data){ - HostsData.push(data.value); - }); - - for(var i = 0; i < HostsData.length; i += 4){ - Hosts[HostsData[i].split(' ')[0]] = [ - HostsData[i].split(' ')[4] + ':' + HostsData[i + 1], - HostsData[i + 2] + ':' + HostsData[i + 3], - ] - } - - var Vars = {}; - $('.playbooks_vars').find('input').each(function(index, input){ - Vars[input.name] = input.value - }); - - //if (Hosts) - console.log(Hosts); - opts = { - playbook_id: $("#Playbooks").val(), - hosts: Hosts, - vars: Vars, - comment: $("#comment").val() - }; - Sunstone.runAction("AnsibleProcess.create", opts); - - return false; - }; - - - function _fill(context, element) { - - element.ID = element.id - element.NAME = element.name - - this.setHeader(element); - - this.resource = element - this.resourceId = element.ID; - - // Fills the inputs - - var VMIds = element.VMs.ID; - - if (typeof VMIds == 'string'){ - VMIds = [VMIds]; - } - - $('#name',context).val(name); - $('#name',context).attr("disabled", "disabled"); - - this.originalHostsList = []; - - // Select hosts belonging to the cluster - if (VMIds){ - this.originalVMList = VMIds; - this.VMTable.selectResourceTableSelect({ids: VMIds}); - } - - - } - - function _onShow(context) { - - var playbooks; - OpenNebula.Ansible.list({ - success: function(r, res){ - playbooks = res; - - if (Playbooks != playbooks){ - var difference = playbooks.slice(Playbooks.length) - for(key in difference){ - $('#Playbooks').append($('