84 Commits

Author SHA1 Message Date
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
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
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
Rafael Weingärtner
d0c6cacd06
[CLOUDSTACK-9261] Upgrate jQuery-UI to 1.11 (JQuery UI 1.8.4 prone to XSS) (#2524)
* [CLOUDSTACK-9261] Upgrate jQuery-UI to 1.11 (JQuery UI 1.8.4 prone to XSS)

* fix problems in the UI for lbCertificatePolicy and StaticNAT

* force jenkins build

* Fix about dialog

* Fix position of network service offering
2018-07-16 13:18:55 -03:00
Abhinandan Prateek
64832fd70a CLOUDSTACK-4757: Support OVA files with multiple disks for templates (#2146)
CloudStack volumes and templates are one single virtual disk in case of XenServer/XCP and KVM hypervisors since the files used for templates and volumes are virtual disks (VHD, QCOW2). However, VMware volumes and templates are in OVA format, which are archives that can contain a complete VM including multiple VMDKs and other files such as ISOs. And currently, Cloudstack only supports Template creation based on OVA files containing a single disk. If a user creates a template from a OVA file containing more than 1 disk and launches an instance using this template, only the first disk is attached to the new instance and other disks are ignored.
Similarly with uploaded volumes, attaching an uploaded volume that contains multiple disks to a VM will result in only one VMDK to being attached to the VM.

FS: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Support+OVA+files+containing+multiple+disks

This behavior needs to be improved in VMWare to support OVA files with multiple disks for both uploaded volumes and templates. i.e. If a user creates a template from a OVA file containing more than 1 disk and launches an instance using this template, the first disk should be attached to the new instance as the ROOT disk and volumes should be created based on other VMDK disks in the OVA file and should be attached to the instance.

Signed-off-by: Abhinandan Prateek <abhinandan.prateek@shapeblue.com>
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-01-10 22:10:41 +05:30
Anshul And Priyank
ec66256149 CLOUDSTACK-9604: Root disk resize support for VMware and XenServer. 2017-03-09 19:20:38 +05:30
Nitin Kumar Maharana
f2d3cc893c CLOUDSTACK-9267: String is not localized on create instance wizards.
Fixed the hard coded string.
Added _l() to dictioanry keys.
2016-02-03 00:28:28 +05:30
Wei Zhou
3822be5a5c CLOUDSTACK-6181: Add 'root disk size' field in instance wizard for KVM templates
This commit includes three changes:
(1) Revert commit 13bf1ec5da9891eca98ef5dab61bf74b6db9530b to show the 'root disk size' field
(2) Set the default value from '1' to empty. This also changes the default value of customized service offerings from '1' to empty.
(3) show 'root disk size' field only when users choose a KVM template, as cloudstack supports deployvm with rootdisksize on KVM only.
2016-01-27 23:30:22 +01:00
Milamber
267994fa0b CLOUDSTACK-8744 Add missing localization (l10n) for several parts in the UI
- l10n for the SSH Key Pairs behavior
- l10n for Autoscaling / LB sections
- l10n for Reset password
- l10n on some strings for the installation Wizard
- l10n on some strings in VPN/VPC section
- l10n on Service offerings sections
- improve some FR translations
2015-08-18 11:16:14 +01:00
Kevin Dierkx
471a02d6a4 Removed leading tabs from ui/scripts/*.js 2015-08-07 11:58:13 +02:00
Kevin Dierkx
2bdbaf453e Removed trailing whitespace from ui/scripts/*.js 2015-08-07 11:25:15 +02:00
Rajani Karuturi
8571314406 Fixed blocker issues reported by sonarqube in js files
All of them are trailing comma in array or object

more details @
https://analysis.apache.org/component_issues?id=org.apache.cloudstack%3Acloudstack#resolved=false|severities=BLOCKER|languages=js
2015-05-20 17:19:20 +05:30
Brian Federle
5f9e0fcd7e CLOUDSTACK-8075: Front-end support for shared templates/ISOs 2014-12-16 14:53:20 -08:00
Wei Zhou
19e99848c8 CLOUDSTACK-7882: SSH Keypair Creation/Selection in UI
Thanks Ilia Shakitko for the porting and testing.
2014-12-12 14:30:34 +01:00
Jessica Wang
f00a62879b CLOUDSTACK-8023: UI > VM wizard widget > when next button is clicked, trigger event handler of event "cloudStack.module.instanceWizard.clickNextButton". 2014-12-09 16:25:54 -08:00
Brian Federle
bfe53d1b2b VM wizard: Add 'showStep' event
For UI plugin development, allow moving though VM wizard steps via
custom event hook, cloudStack.instanceWizard.showStep (attached to
wizard DOM object), passing the specified target step index

Example:

$wizard.trigger('cloudStack.instanceWizard.showStep', {
  index: 2 // Show step 2 of wizard
  refresh: true // (Optional) Force refresh of step if data loaded
});
2014-11-17 15:14:51 -08:00
Brian Federle
28aa9001c5 Instance wizard UI: Pass data for multi-disk service offerings 2014-04-03 14:52:33 -07:00
Brian Federle
a82a1299ec WIP: Instance wizard UI: Support multi-disk offerings
Adds front-end support to instance wizard UI for service offerings
supporting multiple disks.

The UI changes will show if a list 'multipleDisks: []' is passed with
the disk offering data options.
2014-04-02 16:28:15 -07:00
Gabor Apati-Nagy
883d7f17f7 Value of Global parameter "custom.diskoffering.size.min" is not reflected in UI during new instance creation.
Added fields to /api and /server classes for CustomDiskOfferingMinSize
to be available in CapabilitiesResponse. Fixed UI code in Instance
Wizard to have this config value as the minimum selectable option when
we are in custom disk size mode.
2014-04-01 10:57:36 -07:00
Mike Tutkowski
578e500bc2 CLOUDSTACK-6170 (when the "No Thanks" radio button is selected, remove controls related to custom size and custom IOPS) 2014-03-22 19:41:34 -06:00
Mike Tutkowski
d55c4dd804 CLOUDSTACK-6170 2014-03-14 23:47:20 -06:00
Mike Tutkowski
c427e8db1c CLOUDSTACK-6170 2014-03-07 15:38:50 -07:00
Brian Federle
56684a52bc UI: VM wizard: Fix specify IP field when new network is unchecked 2014-02-27 14:50:03 -08:00
Brian Federle
ecdd0e1027 UI: VM wizard: Add specify IP field to new network area 2014-02-27 14:16:32 -08:00
Brian Federle
9769ab329d UI support for specify IP in VM wizard 2014-02-27 13:15:21 -08:00
Jessica Wang
856703cc1c CLOUDSTACK-4758: UI > Instance Wizard > (1) pass cpuNumber, cpuSpeed, memory to API when custom area is shown (i.e. when selected compute offering is dynamic).
(2) pass rootDiskSize to API when custom area is shown (i.e. when selected item in step 2 is a template).
2013-10-31 13:56:42 -07:00
Brian Federle
f0a8aa7f5e CLOUDSTACK-4738: VM wizard: Add custom fields for compute offering 2013-10-29 13:29:13 -07:00
Brian Federle
1f0dd7cc36 CLOUDSTACK-4931: Instance wizard: use fn to hide/show template root size 2013-10-23 09:58:38 -07:00
Brian Federle
43b18025e3 CLOUDSTACK-4758: Add 'root disk size' field
Add 'root disk size' slider to instance wizard UI, under select
template/iso, if the selected template's size is able to be customized.
2013-10-22 11:45:18 -07:00
Jessica Wang
5cc411a9ee LOUDSTACK-4060: UI > Instance Wizard > select security group step > when there is only one security group and the only one is 'default', check it automtically. 2013-10-11 10:27:20 -07:00
Brian Federle
530df8c843 CLOUDSTACK-4302: Instance wizard: Support readonly checkbox selection
If 'selectedObjNonEditable' option is passed alongside 'selectedObj'
on response, make checkbox selection readonly/disabled.

Right now this is to support 'required' affinity group selections that
shouldn't be unselected.
2013-08-13 14:27:34 -07:00
Brian Federle
1c2362c163 Instance wizard: Fix logic preventing VPC network from being unchecked 2013-07-26 14:30:48 -07:00
Ian Duffy
ad69bc8da3 Format JS 2013-07-18 12:34:20 -04:00
Brian Federle
59e65e8406 CLOUDSTACK-2864: Fix duplicate message on affinity group
Fixes issue where text on affinity group step of instance wizard is
duplicated, when going back a step and making changes.
2013-07-12 12:05:10 -07:00
Nitin Mehta
c11dbad9c9 merge master 2013-05-11 15:28:43 +05:30
Brian Federle
16250f8e4b Instance wizard: Fix checkbox selection
Fix where VPC network is uncheckable if only VPC networks are present,
and 'add network' form is visible and checked.
2013-03-25 11:37:15 -07:00
Brian Federle
d6ce2af209 CLOUDSTACK-748: Support deployment of VM on Tier + network 2013-03-14 12:53:39 -07:00
Brian Federle
894cb8f7d9 Advanced SG instance wizard: Fix back button
Fixes back button for select SG step, when using SG-enabled advanced
network.
2013-01-31 16:07:50 -08:00
Jessica Wang
867cb4aa81 CLOUDSTACK-537: cloudstack UI - Advanced SG-enabled zone - VM Wizard - step 5 - when total number of selected sg networks is greater than 0 and total number of selected networks is greater than 1, pop up client-side validation error message "Can't create a vm with multiple networks one of which is Security Group enabled". 2013-01-29 16:44:58 -08:00
Brian Federle
8f11f631a4 Instance wizard: Fix back button state
Fix case where select SG step is shown on back, instead of select guest network.
2013-01-25 08:58:07 -08:00
Brian Federle
a2b2d45e40 Conditionally show select SG step
Only show select security group step if at least one guest network
with SecurityGroup service is selected.
2013-01-24 14:57:43 -08:00
Jessica Wang
ff5477d1f1 CLOUDSTACK-537: cloudstack UI - Advanced SG-enabled zone - VM Wizard - remove obsolete variable(myNetworks), rename variable sharedNetworks to networkObjs. 2013-01-21 15:53:29 -08:00
Jessica Wang
77bc04b90f CLOUDSTACK-537: cloudstack UI - Advanced SG-enabled zone - Instance wizard UI: Support advanced zone with security groups
For advanced zones with SG enabled, show both the add guest network
step as well as the add security group step.

reviewed-by: jessica
2013-01-18 10:38:38 -08:00
Brian Federle
27fcb788e9 Instance wizard UI: Support conditional hide/show of add network box
Adds new function 'showAddNetwork' to instance wizard configuration,
which conditionally hides the 'add network form' on the select network
step. If it returns true, then show the box, otherwise false hides it.
2012-11-15 12:16:42 -08:00
Pranav Saxena
04c5d89f80 CS-16681:Inconsistent behavior in custom disk offering selection page in Add VM instance wizard - Fixed by adding a Jquery bind event 2012-11-03 13:01:32 +05:30
Jessica Wang
0d7ed63e20 CS-16573: cloudstack UI - VM Wizard - makeSelects() - sanitize output value. 2012-11-02 11:20:24 -07:00
Brian Federle
93c84c8291 CLOUDSTACK-85: Fix instance wizard review hypervisor
Fix hypervisor type not being shown in instance wizard review step
2012-09-18 14:18:48 -07:00
Brian Federle
a52889bb6a CS-16196: Fix VM wizard network selects
-Fixes case where 1 existing network is present, but cannot be
 unchecked when 'add new network' is checked

-Fixes regression with multiple networks and VPC tiers present, where
 unchecking all regular networks will select the hidden VPC network

reviewed-by: jessica
2012-08-28 13:52:15 -07:00
Brian Federle
e6ef6985f8 CS-16138: Fix instance wizard 'add network' radio button
When no guest networks are present but VPC tier is, fix 'add new
network' radio button being unselected.

reviewed-by: jessica
2012-08-22 15:24:58 -07:00
Brian Federle
7d934d1039 CS-16085: Fix networks checkboxes
When both VPC and isolated networks are present, fix case where
unchecking first isolated networks triggers checkbox for VPC tier
network, thus making it appear as if no network is selected.

reviewed-by: jessica
2012-08-20 15:00:44 -07:00