7011 Commits

Author SHA1 Message Date
Anurag Awasthi
541d280e3b ui: Bug fix for distinguishing between string and map type tags in forms (#3441)
Some APIs consume 'tags' param as string and some consume as maps.
Since each API can have at most one 'tags' param the extraction of
map based tags should only happen when strings based tags are not
extracted from the form serialization.
2019-06-28 17:05:24 +05:30
Abhishek Kumar
54cdab2921 ui: fix for create vpc offering domain selection
Signed-off-by: Abhishek Kumar <abhishek.kumar@shapeblue.com>
2019-06-28 12:45:35 +05:30
Philipp Bankonier
044e4e4b21 ui: re-add custom css (#3431)
This readds the custom.css file to overwrite the default cloudstack styles.
Currently this is only possible by adding them to the custom.scss in the repository and compile them into the cloudstack3.css.
Now there is an empty custom.css created when compiling the scss source. This custom.css can be overwritten with the custom styles afterwards.

This functionality was broken by #3328.
2019-06-27 19:02:40 +05:30
Anurag Awasthi
d967993a0a Remove additional line from config as storagepool isn't available for users 2019-06-27 16:53:37 +05:30
Abhishek Kumar
8c4efaf6a2 server, ui: domain-admin update compute and disk offering access
Behaviour followed while updating disk, compute offerings by domain-admins,
- Domain-admins cannot change zones for offerings specified for domains/subdomains.
- Domain-admins can chnage domains(within their subdomains) for the offerings specified for their domains/subdomains.
- Domain-admins cannot change name, display text, sort-key for offerings specified for their domains/subdomains and also other domains which are not child domain for admin.

Fixes UI unidentified button bug for Update offering access form

Signed-off-by: Abhishek Kumar <abhishek.kumar@shapeblue.com>
2019-06-27 13:32:19 +05:30
Anurag Awasthi
95a509a1ed ui: Update config file with tables that users can see (#3429)
This is a purely documentation change of config file.
The cleanup was needed post merge of PR #3258
2019-06-27 12:51:29 +05:30
Abhishek Kumar
58474530f6 api: snapshot, snapshotpolicy tag support (#3228)
Problem: Currently tags cannot be applied to snapshot when it is being created but through separate “create tags” API calls. For snapshot policies tags cannot be set either at creation or through “create tags” API.

Root Cause: The “create snapshots” API does not support adding tags during creation and it can only be done through “create tags” API. Snapshot policy as a resource does not support tags and no tags can be set for them through any API.

Solution: Tag support for snapshot policy has been added. Snapshot policy with tags when executed will produce snapshots containing the same tags from snapshot policy.

Following APIs have been updated:

Both “create snapshotpolicy” and “create snapshot” now accepts “tags” as a new parameter. The expected format for “tags” parameter is similar to parameter “tags” in “create tags“ API.
Deletion support for tags associated with snapshots policy has been added to “delete snapshotpolicies” API.
Tags set for snapshot policies are added to the Response of “list snapshotpolicies“ API.
UI support for setting tags to snapshots and snapshot policy is provided through the corresponding menus with a new section in each form to set tags.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2019-06-27 09:21:08 +05:30
Rohit Yadav
14bff7bd03
server: export granular volume bytes and iops metrics (#3259)
Problem: The VM metrics has aggregated volume bytes read/write and iops metrics but not on per volume basis.
Root Cause: The volume stats sub-system is not used to export the metrics, the support is not available for VMware.
Solution: Use the volume stats sub-system and DB table to export the metrics via the listVolumes and listVolumeMetrics API, and implement support for VMware and fix issue with network and disk metrics in the VM metrics view.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2019-06-27 09:18:10 +05:30
Rohit Yadav
9f4f2c5348
api: instance and template details are free text (#3240)
Problem: Users don't know what keys/values to enter for template and VM details.
Root Cause: The feature does not exist that can list possible details and options.
Solution: Based on the possible VM and template details handled by the
codebase, those details were refactored and a list API is introduced
that can return users those details along with possible values. When
users add details now, they will be presented with a list of key details
and their possible options if any.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2019-06-27 09:14:47 +05:30
Abhishek Kumar
b168ebade5 ui: fix for domain selection not showing create disk offering
Signed-off-by: Abhishek Kumar <abhishek.kumar@shapeblue.com>
2019-06-26 15:07:26 +05:30
Abhishek Kumar
5628bd1fc7 Merge branch 'master' into storage-offering-domains-zones 2019-06-26 02:24:48 +05:30
Abhishek Kumar
8cff58d3b8 Merge branch 'master' into storage-offering-domains-zones 2019-06-26 02:03:25 +05:30
Abhishek Kumar
1b79466dd9 server: allow disk offering selection for volume from snapshot (#3246)
Problem: Volume created from a snapshot does not show its disk offering.

Root Cause: The volume created from a snapshot of a root disk does not have a disk offering therefore the disk offering of the created volume from the snapshot is empty.

Solution: Refactored createVolume API and extended UI to allow user to select a disk offering while creating a volume using a root disk volume snapshot. For creating volumes using data disk volume snapshot, the disk offering given by the snapshot will be assigned. Disk offering selection in the UI form for volume creation from snapshot is depicted in screenshot below.

Signed-off-by: Abhishek Kumar <abhishek.kumar@shapeblue.com>
2019-06-25 22:00:24 +05:30
Nico Wohlfarth
a12ac14c6c ui: add new way to create a volume snapshot from instance quick view tooltip (#3406)
Added a shortcut to take a volume snapshot of a VM directly from the instance view. Therefor an option was added to the quick view tooltip. On activation a new dialog will pop up, which is based on the original dialog for creating a volume snapshot (Storage > Volumes > Take snapshot) extended with a select menu to choose the desired snapshot volume of the VM.
2019-06-25 21:48:03 +05:30
Abhishek Kumar
379b660668 ui: fix for multiple zones while create/update offering issue
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2019-06-24 17:23:36 +05:30
Abhishek Kumar
392b5c3166 ui: added action to update offering linked domain(s) and zone(s)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2019-06-24 16:14:47 +05:30
Philipp Bankonier
20786d0422 ui: increase z-index for install-wizard step (#3414)
Increase z-index for install wizard step to make buttons clickable again.
After the latest refactoring of the styles there was a slight mistake which caused that the buttons for the initial install wizard in the beginning weren't clickable anymore, because they got overlaid by another box.
2019-06-21 15:59:23 +05:30
Abhishek Kumar
a3808af20f ui: fix for domain validation while creating non-public offerings
Signed-off-by: Abhishek Kumar <abhishek.kumar@shapeblue.com>
2019-06-20 15:53:43 +05:30
Rohit Yadav
26a5d50760
Merge branch 'master' into storage-offering-domains-zones 2019-06-20 15:09:48 +05:30
Abhishek Kumar
df37f162ff ui: fix for public 'All zones' offering creation
Signed-off-by: Abhishek Kumar <abhishek.kumar@shapeblue.com>
2019-06-19 18:04:18 +05:30
Rohit Yadav
90cd8aa73d
server: add support for sorting zones in UI/API (#3242)
Problem: Not able to configure a sort order for the zones that are listed in various views in the UI.

Root Cause: There is no mechanism to accept sort key for existing zones or UI widget, that would allow to listing zones in the UI in a certain order.

Solution: The order of zones in listed in various views in the UI can now be configured through the newly added “sort_key” field added for the zone. It can be set using updateZone API by providing “sort_key” parameter for a zone, or by reordering the items in the zones list in the UI. UI has been updated to show ordering controls in zones list view. Database changes include updating table “data_center” by adding “sort_key” column (containing integer values and defaults to zero).

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2019-06-19 18:03:56 +05:30
Abhishek Kumar
d2e40c98a1 ui: filter offerings for zone while listing
Signed-off-by: Abhishek Kumar <abhishek.kumar@shapeblue.com>
2019-06-19 18:03:15 +05:30
Dingane Hlaluku
0d6cae6339 volume: fix volume metrics view from returning sensitive info to end user (#3222)
Problem: The listVolumeMetrics API response does not honor the volume detail visibility restrictions set for normal users and returns sensitive information which should only be visible to the root admin.

Root Cause: The listVolumeMetrics API response extends the ListVolumesByAdmin API internally and this results in a full display view response that is only meant for the root admin.

Solution: This has been fixed by rectifying the API response to not show ‘physical size’, 'storage type', and ‘storage pool’ information. The UI has also been fixed to hide these columns for normal users.
2019-06-19 17:04:26 +05:30
Rohit Yadav
0e87040eb2
network: allow ability to specify if network's ipaddress usage need to be hidden (#3235)
Problem: Admins don’t want to charge for IP address usage on certain (shared) networks.
Root Cause: There is no flag or detail for admins to provide using UI or API when creating networks to specify if they want IP address usage of the network hidden.
Solution: A new boolean hideipaddressusage flag is added to the createNetwork API and a checkbox in the ‘Add guest network’ UI for the root admins to specify if they want the shared network’s IP address usage to be hidden in the listUsageRecords API response. The provided flag is saved as the ‘hideIpAddressUsage’ detail in the cloud.network_details table for the network. For existing (shared) networks, root admins can also specify the same boolean API parameter hideipaddressusage with the updateNetwork API request to configure the behaviour for an existing network. When the detail/flag is true, the IP address usage for the (shared) network is not exported in the listUsageRecords API response. The listNetworks API response will include the details of a network for root admin only. (note usage is still recorded in the usage database but not return by the listUsageRecords API)

The API flag works for any kind of network via the API, but the checkbox is only shown while creating shared networks in the UI.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2019-06-19 10:25:59 +05:30
Nico Wohlfarth
0886c0c636 ui: Fix quick view tooltip loading overlay offset (#3407)
Fixed the styling of the quick view tooltip loading overlay. Before it would have a top offset to the quick view tooltip and stick out of the tooltip. Afterwards it just overlays the tooltip.
2019-06-18 13:58:14 +05:30
Abhishek Kumar
cf347c89ea Merge branch 'master' into storage-offering-domains-zones 2019-06-18 12:52:34 +05:30
Abhishek Kumar
02cf680bb8 ui: fix for disk offering quickview details, actions (#3391)
Fixes #2741

Quickview widget for disk offerings list in the UI was missing offering details and action items. cloudStack.listDiskOfferings method call for the details view data provider was not working, therefore, it has been replaced with direct ajax API call.

Signed-off-by: Abhishek Kumar <abhishek.kumar@shapeblue.com>
2019-06-14 07:37:31 +05:30
Nico Wohlfarth
29125be369 ui: Fix quick view tooltip title on multiselect list views (#3403)
Fixed an issue, where the quick view tooltip title would not have been displayed properly on list views with a multiselect row.
This was because the html content of the first td of a row was used to render the title of the quick view tooltip, which would not work if the first columns content was a checkbox.
Now the td with class first will be used for this (this will be the second column if there is a multiselect column, otherwise it will remain the first column).
2019-06-13 15:53:29 +05:30
Richard Lawley
873f1f247d ui: Fix labels broken by translate code (#3386)
As discussed in #3385, the translation code does not work with self closing translate tags when there is other content at the same level, e.g. <div><translate key="foo"/>: Something</div> - it will remove the ": Something". This PR changes the affected tags to non-self closing, e.g. <translate key="foo"></translate>: Something

This fixes the Zone names not being displayed on the capacity graphs on the dashboard, plus some minor missing labels elsewhere.

Fixes #3385
2019-06-13 15:51:26 +05:30
Anurag Awasthi
1c963bac13 ui: Add more info for creating volume snapshots (#3390)
Add more details in console logs and event details.
Also show popup on successful completition of snapshots.

Fixes: #3327
2019-06-13 15:50:10 +05:30
Nico Wohlfarth
8f9f526f83 ui: alignment fixes (#3395)
- Moved some recently made CSS changes (46a3279 / 2020bfb) to their newly introduced respective SCSS files
- Aligned the dashboard containers properly (see screenshots 1 and 2)
- Restored the original quick view tooltip background color (see screenshots 3 and 4)
- Fixed the height of the toolbar in dialog views and also stretched it in width (see screenshots 5 and 6
2019-06-13 01:47:01 +05:30
Nico Wohlfarth
d6edfdc24c ui: fix instance selection behaviour (#3382)
- Fixed a bug, where after sorting a column of the instance list view the multi select action buttons wouldn't show up after selecting one ore more entries of the table.
- Added a behavior, so that an already starting/running/stopped/stopping instance of the instance view will (when multi selected alone or together with other instances) not create an API request if it already has the desired state.
2019-06-13 01:44:18 +05:30
Nicolas Vazquez
7247c5e97e server: add local ISO upload via UI (#3251)
Problem: Users can register ISOs from URL but cannot upload local ISOs.

Root cause: CloudStack provides browser-based upload support for volumes and templates, but ISOs are not supported.

Solution:
The existing browser-based upload from local functionality for templates and volumes (https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=39620237) is extended to support uploading local ISOs.

Extend the UI: A new button is created under the ISOs view: 'Upload from Local'. A new dialog form is displayed in which the user must select the ISO to upload from its local file system.
Extend the API: New 'GetUploadParamsForIso' API command is created to handle the ISO upload.
2019-06-05 23:10:51 +05:30
Abhishek Kumar
f7af27c3c8 ui: added missing hypervisor options for upload template (#3367)
Upload template form was missing some hypervisor specific options which can be seen on Register template form.
For XenServer, XenServer tool version added
For VMware, Root disk controller, NIC adapter type, Keyboard type added and HVM is hidden
For KVM, Root disk controller added

Fixes #3363

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2019-06-05 18:44:37 +05:30
nvazquez
50869fec92 Merge branch '4.12' 2019-06-04 09:49:39 -03:00
nvazquez
bea627a52e Merge branch '4.11' into 4.12 2019-06-04 09:06:09 -03:00
Vladimir Melnik
c94ee1454d kvm: suspend a VM before snapshot deletion (see PR #3193) (#3194)
To make sure that a qemu2-image won't be corrupted by the snapshot deletion procedure which is being performed after copying the snapshot to a secondary store, I'd propose to put a VM in to suspended state.

Additional reference: https://bugzilla.redhat.com/show_bug.cgi?id=920020#c5

Fixes #3193
2019-06-04 16:04:45 +05:30
Anurag Awasthi
3bf4e5c498 ui: configurable branding, keyboard list and hide-able columns through a new config.js file (#3258)
We want to support hiding table columns, specifically in metrics table, through config file so that users can make the relevant bits hidden as per their organization. Current work will support the metrics table but can be extended to any table with minimal work in future.

Config file will take the key of the metrics column from metrics.js file for the sake of minimal changes and simplicity of development.

Problem: The keyboard list in the UI is not consistent across views such as in the instance wizard and in the register template form. There is also no way to custom about url/text and doc title and help URL in the UI.
Root Cause: The list is hardcoded in the UI allowing no centralised configuration.
Solution: Introduce a new config.js file installed at the /usr/share/cloudstackmanagement/webapp/config.js location. The config.js allows configurable keyboard list, about url/text, doc title, and help URL.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2019-05-30 15:32:37 +05:30
Rohit Yadav
6d82e63e53
Merge branch 'master' into storage-offering-domains-zones 2019-05-30 15:04:32 +05:30
Rohit Yadav
0f4b1f511f Merge remote-tracking branch 'origin/4.12' 2019-05-30 12:31:26 +05:30
Rohit Yadav
7ef921de16 Merge remote-tracking branch 'origin/4.11' into 4.12 2019-05-30 12:30:54 +05:30
ustcweizhou
f6f381fc68 ui: fix enable static nat only towards first nic and not on any other interface (#3338)
When enable static nat in a vpc on UI, it only lists the primary and secondary ips of first nic of a vm, no matter which vpc tier is selected. The same issue happens when add a vm to load balancer.

Fixes #3334
2019-05-30 11:44:52 +05:30
Rohit Yadav
c072dda88e Merge remote-tracking branch 'origin/4.12' 2019-05-30 11:41:38 +05:30
Rohit Yadav
31e677f0fa Merge remote-tracking branch 'origin/4.11' into 4.12 2019-05-30 11:40:19 +05:30
smlshn
f1efcc1af6 ui: reset multiselect actions when refreshing listView in Instance page (#3359)
Enables the toolbar to reset to its initial state after any multiSelectAction completed.

Fixes #3337
2019-05-30 11:38:14 +05:30
Rohit Yadav
4e8f14975a
ui: add memory used column in instance metrics view (#3243)
This adds memory used column in the instance metrics view. Also fixes
a bug for VMware, due to which incorrect memory usage was returned.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2019-05-28 20:35:37 +05:30
Philipp Bankonier
e8c1deb25d ui: Fix ip and ip cidr column sorting in tables (#3199)
This fixes the sorting of ip addresses and ip cidrs.
Currently they get evaluated as a numeric value via parseFloat and sorted as numeric values.
For example "10.32.123.123" got parsed to 10.32.
2019-05-27 18:09:56 +05:30
Abhishek Kumar
46a32795bc ui: instance settings visibility (#3244)
This change allows instance Settings tab to be visible but inaccessible when instance is running. A warning is shown when user tries to access Settings for a running instance and tab content is greyed out.
It also allows some admin defined instance settings/details to be made static for user. User will be able to see them in instance settings tab but cannot change their values as action buttons are disabled and greyed out. This can be achieved by providing a comma-separated list details for global settings key 'user.vm.readonly.ui.details'. A new value 'readonlyuidetails' has been added in UserVMResponse for UI manipulate editing functionality of settings/details.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2019-05-24 12:28:15 +02:00
Abhishek Kumar
179d229bd7 ui: fixed create offering domain multi-selection
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2019-05-24 14:50:57 +05:30
Abhishek Kumar
45e4b54b20 ui: network, vpc offering domain(s), zones(s) in details
Signed-off-by: Abhishek Kumar <abhishek.kumar@shapeblue.com>
2019-05-24 10:18:05 +05:30