5327 Commits

Author SHA1 Message Date
Abhishek Kumar
2102888116 server: changes for domain, zone specified service offerings
Added changes for creating service offerings for specified domain(s) and zone(s).
Fixed checkAccess for disk offerings.
Fixed list APIs for disk and service offerings.
UI changes for creating disk, service offerings for specified domain(s) and zone(s).

Signed-off-by: Abhishek Kumar <abhishek.kumar@shapeblue.com>
2019-05-24 10:09:52 +05:30
Rohit Yadav
7721126076 remove domain id usage
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2019-05-24 09:56:23 +05:30
Rohit Yadav
9c117f2781 DB upgrade path and UI fixes
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2019-05-24 09:56:23 +05:30
Abhishek Kumar
c85b3e597a server: ability to create disk offerings for domain(s) and zone(s)
Allows creating storage offerings associated with particular domain(s) and zone(s). In create disk/storage offfering form UI, a mult-select control has been addded to select desired zone(s) and domain select element has been made multi-select.
createDiskOffering API has been modified to allow passing list of domain and zone IDs with keys domainids and zoneids respectively. These lists are stored in DB in cloud.disk_offering_details table with 'domainids' and 'zoneids' key as string of comma separated list of IDs. Response for create, update and list disk offering APIs will return domainids, domainnames, zoneids and zonenames in details object of offering.
listDiskOfferings API has been modified to allow passing zoneid to return only offerings which are associated with the zone.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2019-05-24 09:56:23 +05:30
Abhishek Kumar
2020bfb6a3 server: allows compute offering with or without constraints (#3245)
Problem: Custom compute offering does not allow setting min and max values for CPU and VRAM for custom VMs.

Root Cause: Custom compute offerings cannot be created with a given range of CPU number and memory instead it allows only fixed values.

Solution: createServiceOffering API has been modified to allow setting a defined range for CPU number and memory. Also, UI form for compute offering creation is provided with a new field named 'compute offering type’ with values - Fixed, Custom Constrained, Custom Constrained. It will allow the creation of compute offerings either with a fixed CPU speed and memory for fixed compute offering, or with a range of CPU number and memory for custom constrained compute offering or without predefined CPU number, CPU speed and memory for custom unconstrained compute offering.

To allow the user to set CPU number, CPU speed and memory during VM deployment, UI form for VM deployment has been modified to provide controls to change these values. These controls are depicted in screenshots below for custom constrained and custom unconstrained compute offering types.

Sample API calls using cmk to create a constrained service offering and deploying a VM using it,

create serviceoffering name=Constrained displaytext=Constrained customized=true mincpunumber=2 maxcpunumber=4 cpuspeed=400 minmemory=256 maxmemory=1024

deploy virtualmachine displayname=ConstrainedVM serviceofferingid=60f3e500-6559-40b2-9a61-2192891c2bd6 templateid=8e0f4a3e-601b-11e9-9df4-a0afbd4a2d60 zoneid=9612a0c6-ed28-4fae-9a48-6eb207af29e3 details[0].cpuNumber=3 details[0].memory=800

Signed-off-by: Abhishek Kumar <abhishek.kumar@shapeblue.com>
2019-05-23 11:47:53 +05:30
dahn
f6ecac42ac ui: reverse character replacements (#3260)
In the cloudstack UI fields get '<', '>' and '&' replaced by xml-entities
these are generic for all fields and hurt us in the case of userdata
this fix calls the existing method to reverse character replacements.
it also removes the ccs class that pretends to prevent special chars

Fixes #3202
2019-05-23 11:20:42 +05:30
Frank Maximus
e11f7ee1ba RIP Nuage Cloudstack Plugin (#3146)
may it rest in peaces
2019-05-14 10:58:24 +02:00
Nico Wohlfarth
89d548052b Improvements after jquery update (#3183)
* Add jQuery ui stylings to the project

* Adapt stylings to jquery ui stylings

- remove unnecessary (empty) style definitions

* Check if jquery autocomplete is initialized before destroying it

* Use dialog modal option instead of setting z-index styling

- set minimum heigth of dialog

* Swap removeAttr() for prop() since it's not longer recommended as of jQuery 3.0

* Fix reccuring snapshots modal view

* Further style improvements

* More improvements on the instance-wizard (and multi-wizard in general)

* Raise input hints over modal z-index

* Adapt/fix stylings

- center buttons of create form modals
- fix width of select menu in service offerings
- fix width of modal in Network -> VPC -> configure -> static NAT -> aquire new Ip -> enable static nat

* Adapt width of dynamic-input container
2019-04-25 16:09:43 -03:00
Abhishek Kumar
6bb8d977ac ui: show complete domain for accounts (#2994) (#3256)
This allows showing complete domain, ie, domain path for accounts list view and account detail.
Added a new key, domainpath, in AccountResponse.

Fixes #2994

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2019-04-10 17:18:01 +05:30
Rohit Yadav
1af5dedfb1
ui: don't ignore project when listing templates (#3233)
Problem: When uploading template or iso in a project, the progress is not seen
Root Cause: When users upload a template/iso in project view, the template/iso is not visible in the all filter. This creates confusion that template/iso has not been uploaded.
Solution: Since the api listtemplates with a projectid acts is a superset of list templates without a project id, we should not ignore the project id when listing templates in all filter.
2019-04-09 16:40:38 +05:30
Abhishek Kumar
9b14e17a58 server: fix for vm snapshot search (#3208) (#3257)
Using db column instead of VO variable name was causing issue with SQL select statement.
This change fixes the problem by using VO variable for adding conditional.

Fixes #3208

Using db column instead of VO variable name was causing issue with SQL select statement.
This PR fixes the problem by using VO variable for adding conditional.
Additionally in UI listAll parameter was being sent twice in the listVMSnapshot API call. It is fixed with this PR.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2019-04-08 14:18:00 +05:30
Rohit Yadav
4985e57f30
ui: use executable template filter for users (#3214)
Problem: When reinstalling a VM, the UI only shows featured templates and not all possible list of allowed templates.
Root Cause: The list of templates for reinstall used featured as filter in ‘listTemplates’ API which did not include all available options.
Solution: The issue is fixed by using the executable template filter of the ‘listTemplates’ API to list all
possible templates that a user is allowed to use to deploy a VM.
2019-03-29 12:13:26 +05:30
Philipp Bankonier
2e2b6700a5 ui: Fix behavior of multiselect in list view (#3161)
Hide multiselectaction buttons when selection is resetted after a action is performed
Use checked prop instead of attr to show/hide triggered selection when box was clicked by a user before.

How to reproduce:

Select one entry in a multiSelect listView (e.g. instance list) and then deselect it again. Now click on the "select all" checkbox. The entries which were clicked previously are not displayed as selected.

Select at least one entry. Use the multiSelectAction buttons to trigger an action. Wait for completion. The list refreshes and no entry is selected but the multiSelectAction buttons are displayed.

Fix:

Use "checked" property instead of the attribute to select all entries. This is necessary because when you checked an entry by clicking on it the property gets set and the browser is preferably using this. So setting the attribute by clicking on the "select all" checkbox had no impact anymore on the checkBox of the previously clicked entries.

Hide the multiSelectAction buttons when the list is refreshed after an action is performed and no element is selected anymore.
2019-03-26 13:11:41 +05:30
Philipp Bankonier
b81171af7d ui: add start button for multiple selected instances in list view (#3160)
Adds start button for multiple instances in list view.
Change button order for instances listview multiselect actions.
2019-03-26 13:06:06 +05:30
Rohit Yadav
9d3009f2b9
ui: remove CA certificate button from UI (#3211)
This removes CA certificate button from UI as this is not used and
confuses both admin and users how to use it. This may be re-introduced
in future when a use-case can be justified.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2019-03-25 14:57:55 +05:30
Rohit Yadav
bbf5807688 Merge remote-tracking branch 'origin/4.11' into 4.12
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2019-03-25 13:24:46 +05:30
Dingane Hlaluku
55fb1c4eb6 server: Allow users to create L2 network types (#3158)
Allow users of all types to create L2 guest networks.

Fixes #3081
2019-03-25 13:12:19 +05:30
Gabriel Beims Bräscher
34030be393
Fix XenServer Security Groups 'vmops' script (#3197)
* Fix XenServer Security Groups 'vmops' script

- fix tokens = line.split(':') to tokens = line.split(';')
- fix expected tokens size from 5 to 4
- enhance logs
- remove unused vmops script. The XCP patch points to the vmops script
on the parent folder [1]. Thus, all XenServer versions are considering
the vmops script located at [2].
- fix UI ipv4/ipv6 cidr validator to allow a list of cidirs.

Fixing issue: #3192 Security Group rules not applied at all for
XenServer 6.5 / Advanced Zone
https://github.com/apache/cloudstack/issues/3192

* Update security group rules after VM migration

Add security group rules on target host
Cause: vmops script expected secondary IPs as "0;" but received "0:"

Remove security group network rules on source host.
Cause: destroy_network_rules_for_vm function on vmops script was not
called when migrating VM

* Add unit tests and address reviewers
2019-03-06 09:13:40 -03:00
Gabriel Beims Bräscher
f0a2bf93bf
Fix issue with verification of ipv4/ipv6 address. (#3162) 2019-02-04 15:58:50 -02:00
dahn
58466c8954 api: add command to list management servers (#3150)
* api: add command to list management servers

* api: add number of mangement servers in listInfrastructure command

* ui: add block for mangement servers on infra page

* api name resolution method cleanup
2019-02-01 16:23:39 -02:00
Frank Maximus
00e6d5991d Fix UI bug (#3149)
Upgrade to jquery 3.3.1: $('selector').context was deprecated,
and has been removed.

Fixes: #3148
2019-01-30 15:47:42 -02:00
Philipp Bankonier
093ab722b3 Update jquery and related libraries (#3069)
* Update jquery, jquery ui, jquery validate and flot to current versions

update jquery to 3.3.1
update jqueryui to 1.12.1
update jquery validate to 1.17.0
update jquery flot to 0.8.3

* Replace deprecated removed jquery functions

* Fix initial tab content loading in detailView

* Fix logout for new jquery version

* Fix tooltip detail displaying for new JQuery version

* Fix view all trigger in detailView for new JQuery version

* Fix breadcrumb click event handler for JQuery update

* Fix displaying of preselected zone in instanceWizard for new jQuery verion
2019-01-16 14:22:22 -02:00
Dingane Hlaluku
7b0ff7f0c7 Rework for destroy VM with volumes UI (#3120)
* Remove redundant checkbox that controls the visibility of volumes to delete when destroying VMs

* Change label from Volume IDs to Delete Volumes

* Revert back deleted Volume IDs label
2019-01-09 11:28:47 +01:00
Gerd Müller
cabef5305d server: Enhance bypass vlan overlap check (#3026)
This PR adds the possibility to select a checkbox for the parameter bypassvlanoverlapcheck to the ajax request createNetwork. The checkbox was added for Guest Network as well as for the L2 Guest Network. For L2 Guest Network a backend check for the existence of the flag bypassvlanoverlapcheck was added.
2018-12-24 12:46:54 +05:30
Henko
525ddfb717 Destroyvm also removes volumes (#2793)
* Allow user to detach and delete volumes when destroyinh VMs

* Minor code refactoring
2018-11-30 10:27:31 -03:00
Philipp Bankonier
a216d0df3f Display mac address in nic detail view (#3034)
## Description
Adds the MAC address to the NICs detail view of an instance.

## Types of changes
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] Enhancement (improves an existing feature and functionality)
- [ ] Cleanup (Code refactoring and cleanup, that may add test cases)

## Screenshots:

![detailview_with_mac_address](https://user-images.githubusercontent.com/6997263/48567118-a2785d80-e8fc-11e8-9e24-2eda8fcb815a.png)

## How Has This Been Tested?
Tested locally to verify that the correct mac address gets displayed in the detail view.
2018-11-19 09:26:03 +01:00
Rohit Yadav
d4d91f355d
vmware: updateVmwareDc API for updating vmware datacenter details (#2919)
This adds a new API updateVmwareDc that allows admins to update the
VMware datacenter details of a zone. It also recursively updates
the cluster_details for any username/password updates
as well as updates the url detail in cluster_details table and guid
detail in the host_details table with any newly provided vcenter
domain/ip. The update API assumes that there is only one vCenter per
zone. And, since the username/password for each VMware host could be different
than what gets configured for vcenter at zone level, it does not update the
username/password in host_details.

Previously, one has to manually update the db with any new vcenter details for the zone.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-11-12 11:32:36 +05:30
Rafael Weingärtner
63094b2fbf
Fix delete domain button in the UI to update only after job finishes (#2905)
When the “deleteDomain” command is sent via UI, the HTML is already updated assuming that the “deleteDomain” command will actually delete it. However, there are cases (domain with allocated resources) that will not allow ACS to remove the command; as a consequence, the UI will not be in sync with ACS state, which can lead to misunderstandings.
2018-11-11 18:41:37 -02:00
Rafael Weingärtner
f18326880b Forwardmerge #2980 - Fix set initial reservation on public IP ranges 2018-11-07 10:50:09 -02:00
Nicolas Vazquez
7d8eb37924 [4.11] Fix set initial reservation on public IP ranges (#2980)
* Fix initial reservation on public IP ranges

* Do not allow dedicating a system VM IP range
2018-11-07 10:48:07 -02:00
Rafael Weingärtner
e175e93281
Fix set affinity for user overlay problem (Fixes #2986) (#2987)
This PR fixes #2986
2018-11-01 10:30:53 -03:00
Dingane Hlaluku
0b6eafc0f6 ui: Run diagnostics API UI integration for system VMs and VR (#2833)
- Run diagnostics API UI integration for system VMs and VR
- Added event type to Action event
2018-09-18 15:59:22 +05:30
Gabriel Beims Bräscher
fbf488497f Support IPv6 address in addIpToNic (#2773)
The admin will manually need to add the address to the Instance, but the
Security Grouping should allow it.
2018-09-11 12:03:19 -03:00
Rafael Weingärtner
b11d63f28b
Fix Overlay issue in snapshot view (#2835)
Fix UI overlay issue in snapshot view on master with new jquery and other changes. This problem was created because of the jQuery-UI upgrade.

This fixes: #2830
2018-09-11 10:16:04 -03:00
Rafael Weingärtner
b6a861b09b ui: add user information on the Event-View in the UI (#2826)
For root/domain admins, adds the username column
2018-08-30 14:33:38 +05:30
Rafael Weingärtner
e6af798373
Fix "Migrate instance to another host" popup modal (#2803)
* Fix "Migrate instance to another host" popup

* fix OK button that was not working as it should have been
2018-08-28 22:14:03 -03:00
Rafael Weingärtner
f4387c9489
Fix Div overlay problem when PopUp modal with error message is closed (#2798) 2018-08-20 09:00:20 -03:00
Daan Hoogland
698747683e Merge release branch 4.11 to master
* 4.11:
  populate project select when clicked on to display latest project options (#2810)
2018-08-20 08:18:45 +00:00
ernjvr
9b772db0f1 populate project select when clicked on to display latest project options (#2810) 2018-08-20 10:03:51 +02:00
Mike Tutkowski
46c56eaaf9 Merge release branch 4.11 to master
* 4.11:
  Changed the implementation of isVolumeOnManagedStorage(VolumeInfo) to check if the data store in question is for primary storage (and added a unit test from Daan Hoogland)
  vmware: reboot VR after mac updates (#2794)
2018-08-12 00:03:37 -06:00
Rafael Weingärtner
96d80b154b
Fix alert message in VM creation wizard (#2786)
* Fix alert message in VM creation wizard

* Remove "var" keyword for customZindex variable

* Fix "cloudStack.applyDefaultZindexAndOverlayOnJqueryDialogAndRemoveCloseButton"
2018-08-10 10:20:59 -03:00
Rohit Yadav
461c4ad027
vmware: reboot VR after mac updates (#2794)
This re-introduces the rebooting of VR after setup of nics/macs in
case of VMware. It also adds a minor enhancement to show the console
esp. for root admins when VRs and systemvms are in starting state.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-08-10 13:07:11 +05:30
Rohit Yadav
5e48c0b4c9 Merge remote-tracking branch 'origin/4.11'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-08-08 12:20:56 +05:30
ernjvr
a3d999c203 ui: change table header cursor for sortable columns to pointer (#2788)
In the UI, when a user navigates to a screen that displays a table of data and hovers the mouse over a sortable column header, the cursor does not change to a hand pointer, indicating to the user that it can be clicked on, in order to sort the table's data rows according to that column.
When the mouse hovers over the non-sortable 'Quickview' column header, it incorrectly displays a hand pointer cursor instead of a default cursor.
When the mouse hovers over a column header, it also does not display the column header's value as a tooltip.

Expected Behaviour:
The cursor type for a sortable column header must display a hand pointer.
The cursor type for the non-sortable 'Quickview' column header must display a default pointer.
When the mouse hovers over a column header it must display the column header's value as a tooltip.

Actual Behaviour:
The cursor type for a sortable column header incorrectly displays a default pointer.
The cursor type for the non-sortable 'Quickview' column header incorrectly displays a hand pointer.
When the mouse hovers over a column header it does not display the column header's value as a tooltip.

To Reproduce:
In the UI, navigate to a screen that displays a table of data and hover the mouse over a sortable column header, the cursor does not change to a hand pointer.
Hover the mouse over the non-sortable 'Quickview' column header and notice that it incorrectly displays a hand pointer cursor instead of a default cursor.
Hover the mouse over a column header and notice that it does not display the column header's value as a tooltip.
2018-08-08 12:09:38 +05:30
ernjvr
d8b3a90962 ui: insert plugin css files before custom.css file (#2784)
In the index.html file, the reference to the custom.css file is made on the last line of the <head> tag.
The plugins.js file appends a list of CSS files to the <head> tag dynamically, consequently placing them after the custom.css file and overriding it.

Expected Behaviour:
The plugins.js file must insert the list of CSS files before the custom.css file so that it does not get overridden.

Actual Behaviour:
The plugins.js file appends a list of CSS files to the <head> tag dynamically, consequently placing them after the custom.css file and overriding it.

To Reproduce:
Log in to the Cloudstack UI using your favourite browser.
Use your browser's development tool to view the HTML elements of the index.html loaded in memory.
Expand the <head> element and review the list of CSS <link> elements.
Notice that the list of module and plugins CSS files is appended after the custom.css file.
2018-08-08 12:07:56 +05:30
ernjvr
5043768406 ui: add ipaddress input field to 'Add network to VM' form (#2782)
On the 'NICs' tab, when a user clicks the 'Add network to VM' button to add a network to a VM, the 'Add network to VM' popup screen does not have an IP Address input field to allow a user to define a specific IP Address for a NIC. A user can specify the IP address for the first NIC when creating a VM instance, but cannot do that for subsequent NICs when adding a network to a VM.

To Reproduce:
Go to the 'Instances' screen by clicking the 'Instances' tab on the lefthand side.
On the 'Instances' screen click on a specific VM instance name.
This will open the 'Details' tab for the specific VM instance.
Click on the 'NICs' tab and then click on the 'Add network to VM' button to add a network to a VM.
The 'Add network to VM' popup screen will display.

Actual Behaviour:
The 'Add network to VM' popup screen does not have an IP Address input field to allow a user to define a specific IP Address for a NIC.

Expected behaviour:
The 'Add network to VM' popup screen must have an IP Address input field to allow a user to define a specific IP Address for a NIC.
Since the addNicToVirtualMachine API's ipaddress field is not required, the IP Address input field is also not a required field.
The IP Address input field must be validated for a valid IPv4 formatted value if the user enters anything into the field.
The valid user-specified IPv4 IP Address value must be allocated to the NIC if it is within the acceptable IP range for the chosen Network.
2018-08-08 12:07:04 +05:30
Rohit Yadav
75030e5522 Merge branch '4.11' 2018-08-01 16:37:21 +05:30
ernjvr
4f49bf6770 ui: hide hvm tickbox for vmware, otherwise display (#2781)
On the 'Register Template From URL' screen, when a user selects the VMware option from the Hypervisor dropdown:

It incorrectly displays the 'HVM' checkbox.
This checkbox must be hidden in the VMware context.
This checkbox must still be visible in any other hypervisor context.

To Reproduce:
Go to the 'Register Template From URL' screen by clicking the 'Templates' tab on the lefthand side.
On the 'Templates' screen click the 'Add' button to display the 'Register Template From URL' screen.
On the 'Register Template From URL' screen, select the VMware option from the Hypervisor dropdown:

Actual Behaviour:
It incorrectly displays the 'HVM' checkbox.

Expected behaviour:
This checkbox must be hidden in the VMware context.
This checkbox must still be visible in any other hypervisor context.
2018-08-01 16:36:11 +05:30
ernjvr
a32bd464b6 ui: show reset SSH key for VM in running state (#2778)
In the UI, on the Instances screen, the Quickview popup window and the Details window do not display the 'Reset SSH Key Pair' button for VMs in a running state. They only display when the VM is in a stopped state. This is inconsistent with the 'Reset Password' button behaviour, where it displays in both VM states: running and stopped. This fixes the issue so that the 'Reset SSH Key Pair' button also displays in both VM states.

Expected Behaviour:
In the UI, on the Instances screen, the Quickview popup window and the Details window must display the 'Reset SSH Key Pair' button in both VM states: running and stopped. When a user clicks on the 'Reset SSH Key Pair' button and a VM is in a running state, it will display a message "Vm xxx should be stopped to do SSH Key reset".
Actual Behaviour:
In the UI, on the Instances screen, the Quickview popup window and the Details window do not display the 'Reset SSH Key Pair' button for VMs in a running state. It only displays when the VM is in a stopped state.
2018-07-31 13:03:50 +05:30
Rohit Yadav
d64f787b66 Merge branch '4.11' 2018-07-26 13:03:46 +05:30