34 Commits

Author SHA1 Message Date
John Bampton
d74f64a2e1
Use lowercase HTTP header field names so we are compatible with HTTP/2 (#7006) 2023-01-23 11:17:54 +01:00
Rohit Yadav
b07816b730 ui: travis fix post apache/cloudstack-primate merge
This fixes Travis to run basic UI checks for job #1

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-01-20 07:27:07 +05:30
Rohit Yadav
02f80d3370
ui: deprecate old UI and move to legacy to be served at /client/legacy (#4518)
As notified in the 4.14.0.0 release notes, this deprecates the legacy UI
and moves it under the ui/legacy directory which will be served at
/client/legacy URL path. This will also ensure that users upgrading or
installing 4.15.0.0 will get the new UI by default. This will also make
it simpler to remove the old UI for future 4.16/master releases.

Co-authored-by: Daan Hoogland <daan.hoogland@shapeblue.com>
2020-12-05 20:36:59 +05:30
dahn
0795cd430b
Boot into hardware setup menu on Vmware (#4021) 2020-06-11 11:47:20 +00:00
pavanaravapalli
d4b537efa7
UEFI Implementation: Enabled UEFI Support for Guest VM's on Hypervisor KVM,VMware. enabled boot modes [Legacy,Secure] support for UEFI boot with known caveats. (#3638)
Co-authored-by: Pavan Kumar Aravapalli <pavan_aravapalli@accelerite.com>
Co-authored-by: dahn <daan.hoogland@shapeblue.com>
2020-03-13 20:56:26 +01:00
Rohit Yadav
318924d801
CloudStack Backup & Recovery Framework (#3553) 2020-03-03 13:27:58 +01:00
dahn
5ff932eb86
Ldap fixes (#3694)
* pass domainid for list users

* passing arg in wizzard

* adding userfilter to list ldap users and usersource to response

  port of list ldap users tests to java

* assertion of differnt junit ldap methods

* broken test for directory server (and others)

* embedded context loading

* add user and query test

* UI: filter options passing filter and domain and onchange trigger

* disable tests that only work in ide

prereqs for domain-linkage fixed

move trigger to the right location in code

trigger for changing domain

* logging, comments and refactor

implement search users per domain

retrieve appropriate list of users to filter

get domain specific ldap provider

* query cloudstack users with now db filter

* recreate ldap linked account should succeed

* disable auto import users that don't exist

* ui choice and text

* import filter and potential remove from list bug fixed

* fix rights for domain admins

* list only member of linked groups not of principle group

* Do not show ldap user filter if not importing from ldap
  do not delete un-needed items from dialog permanently
  delete from temp object not from global one

* localdomain should not filterout users not imported from ldap

* several types of authentication handling errors fixed and unit tested

* conflict in output name

* add conflict source field to generic import dialog

* replace reflextion by enum member call

* conflict is now called conflict 🎉
2020-01-20 16:02:33 +01:00
Nicolas Vazquez
3c2af55d81 vmware: allow configuring appliances on the VM instance wizard when OVF properties are available (#3271)
Problem: In Vmware, appliances that have options that are required to be answered before deployments are configurable through vSphere vCenter user interface but it is not possible from the CloudStack user interface.

Root cause: CloudStack does not handle vApp configuration options during deployments if the appliance contains configurable options. These configurations are mandatory for VM deployment from the appliance on Vmware vSphere vCenter. As shown in the image below, Vmware detects there are mandatory configurations that the administrator must set before deploy the VM from the appliance (in red on the image below):

Solution:
On template registration, after it is downloaded to secondary storage, the OVF file is examined and OVF properties are extracted from the file when available.
OVF properties extracted from templates after being downloaded to secondary storage are stored on the new table 'template_ovf_properties'.
A new optional section is added to the VM deployment wizard in the UI:
If the selected template does not contain OVF properties, then the optional section is not displayed on the wizard.
If the selected template contains OVF properties, then the optional new section is displayed. Each OVF property is displayed and the user must complete every property before proceeding to the next section.
If any configuration property is empty, then a dialog is displayed indicating that there are empty properties which must be set before proceeding
image
The specific OVF properties set on deployment are stored on the 'user_vm_details' table with the prefix: 'ovfproperties-'.
The VM is configured with the vApp configuration section containing the values that the user provided on the wizard.
2019-08-09 16:14:46 +05:30
Anurag Awasthi
9e6ee7c63e server: Add support for new heuristics based VM Deployement for admins (#3454)
Currently an admin can choose which host a VM is to be started on.
They should be able to 'override' the allocation algorthm to a greater
or lesser extent at will, and be able to choose the pod, cluster or host
that they wish a new VM to be deployed in.

DeployVirtualMachine API has been extended with additional, optional
parameters podid and clusterid that will be passed to and used in the
deployment planner, when selecting a viable host. If the user supplies
a pod, a suitable host in the given pod will be selected. If the user
supplies a cluster, a suitable host in the given cluster will be selected.

Based on the parameter supplied and on passing validation, the VM will
then be deployed on the selected host, cluster or pod.
2019-07-13 12:52:48 +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
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
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
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
M. Weber
a5da389b15 Enhancement scss refactoring (#3328)
* Introduce jsbeautifyrc and sass linter for automated unified scss code syntax

* Introduce new z-index scss file to manage different z-index correctly

* Use beautify tool for scss files and sass lint fix all scss files

* Add vscode folder to gitignore

* Add more new files to global gitignore

* Refactor scss files and rework custom styles implementation strategy

* Remove outdated ie7 styles

* Fix typo of facebook input token include

* Fix apache licences for new lint files

* Splitt massive cloudstack.scss into many modular and smaller files

* Refactor scss language files

* Change and move apache licence css file name
2019-05-23 11:09:31 +02:00
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
Anurag Awasthi
3e642852a7 ui: Bug fix for zone names not appearing in dashboard (#3326)
3 years ago when we moved from JSP this translate was not wrapped
in label tags and consequently the following span wasn't captured
when dashboard.js mapped the data.

Fixes: #3314
2019-05-15 09:52:38 +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
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
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
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
Paul Angus
e73fb765d2 ui: Display i18n language name in the same language (#2883)
This update changes how the languages are shown on the UI's login page. Previously all languages were shown in the current language of the login page. This meant for instance, that a Japanese speaker would have to know English to find their language. Likewise if the language had been changed, a German speaker might need to speak Korean in order to find their language.

Therefore the UI has been altered to always show the name of each language in the appropriate language.
2018-10-09 05:57:10 +05:30
ernjvr
a387272288 ui: Fixes: #2831 rendering of scheduled snapshots widget (#2836)
In the UI, when Setting up a recurring snapshot for a volume and clicking 'Add', the newly added scheduled snapshot entry is not displayed in the 'Scheduled Snapshots' table. Also, the 'Keep' input field does not limit the length of a number that can be added. This causes the API not return an error that the value is invalid.

After adding a recurring snapshot, it must display in the 'Scheduled Snapshots' table. The 'Keep' input field must restrain a user from entering too large of a number.
2018-09-07 14:18:07 +05:30
ernjvr
4b3376469d ui: display translation labels as html instead of plain text (#2815)
Fixes #2575
2018-08-21 15:55:43 +05:30
Rohit Yadav
6412e50471 saml2: Fixes #2548 SAML2 cert encoding and decoding
This fixes SAML2 certificate encoding/decoding issue due to refactoring
regression introduced in 7ce54bf7a85d6df72f84c00fadf9b0fd42ab0d99 that
did not account for base64 based encoding/decoding. The changes
effectively restore the same logic as used in previous versions.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-05-04 12:37:23 +05:30
Rohit Yadav
7ce54bf7a8 CLOUDSTACK-9993: Securing Agents Communications (#2239)
This introduces a new certificate authority framework that allows
pluggable CA provider implementations to handle certificate operations
around issuance, revocation and propagation. The framework injects
itself to `NioServer` to handle agent connections securely. The
framework adds assumptions in `NioClient` that a keystore if available
with known name `cloud.jks` will be used for SSL negotiations and
handshake.

This includes a default 'root' CA provider plugin which creates its own
self-signed root certificate authority on first run and uses it for
issuance and provisioning of certificate to CloudStack agents such as
the KVM, CPVM and SSVM agents and also for the management server for
peer clustering.

Additional changes and notes:
- Comma separate list of management server IPs can be set to the 'host'
  global setting. Newly provisioned agents (KVM/CPVM/SSVM etc) will get
  radomized comma separated list to which they will attempt connection
  or reconnection in provided order. This removes need of a TCP LB on
  port 8250 (default) of the management server(s).
- All fresh deployment will enforce two-way SSL authentication where
  connecting agents will be required to present certificates issued
  by the 'root' CA plugin.
- Existing environment on upgrade will continue to use one-way SSL
  authentication and connecting agents will not be required to present
  certificates.
- A script `keystore-setup` is responsible for initial keystore setup
  and CSR generation on the agent/hosts.
- A script `keystore-cert-import` is responsible for import provided
  certificate payload to the java keystore file.
- Agent security (keystore, certificates etc) are setup initially using
  SSH, and later provisioning is handled via an existing agent connection
  using command-answers. The supported clients and agents are limited to
  CPVM, SSVM, and KVM agents, and clustered management server (peering).
- Certificate revocation does not revoke an existing agent-mgmt server
  connection, however rejects a revoked certificate used during SSL
  handshake.
- Older `cloudstackmanagement.keystore` is deprecated and will no longer
  be used by mgmt server(s) for SSL negotiations and handshake. New
  keystores will be named `cloud.jks`, any additional SSL certificates
  should not be imported in it for use with tomcat etc. The `cloud.jks`
  keystore is stricly used for agent-server communications.
- Management server keystore are validated and renewed on start up only,
  the validity of them are same as the CA certificates.

New APIs:
- listCaProviders: lists all available CA provider plugins
- listCaCertificate: lists the CA certificate(s)
- issueCertificate: issues X509 client certificate with/without a CSR
- provisionCertificate: provisions certificate to a host
- revokeCertificate: revokes a client certificate using its serial

Global settings for the CA framework:
- ca.framework.provider.plugin: The configured CA provider plugin
- ca.framework.cert.keysize: The key size for certificate generation
- ca.framework.cert.signature.algorithm: The certificate signature algorithm
- ca.framework.cert.validity.period: Certificate validity in days
- ca.framework.cert.automatic.renewal: Certificate auto-renewal setting
- ca.framework.background.task.delay: CA background task delay/interval
- ca.framework.cert.expiry.alert.period: Days to check and alert expiring certificates

Global settings for the default 'root' CA provider:
- ca.plugin.root.private.key: (hidden/encrypted) CA private key
- ca.plugin.root.public.key: (hidden/encrypted) CA public key
- ca.plugin.root.ca.certificate: (hidden/encrypted) CA certificate
- ca.plugin.root.issuer.dn: The CA issue distinguished name
- ca.plugin.root.auth.strictness: Are clients required to present certificates
- ca.plugin.root.allow.expired.cert: Are clients with expired certificates allowed

UI changes:
- Button to download/save the CA certificates.

Misc changes:
- Upgrades bountycastle version and uses newer classes
- Refactors SAMLUtil to use new CertUtils

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-08-28 12:15:11 +02:00
Nitin Kumar Maharana
b2b422c7d7 CLOUDSTACK-8672 : NCC Integration with CloudStack. 2017-07-20 12:42:43 +05:30
rashmidixit
49a862b223 CLOUDSTACK-9700: Allow user to Register/Copy templates to multiple zones at the same time 2017-05-15 14:07:22 +05:30
Rajani Karuturi
9cc3ae8a94 Merge release branch 4.9 to master
* 4.9:
  CLOUDSTACK-9857: With this change if agent dies the systemd will catch it properly and show process as exited
  CLOUDSTACK-9805: Display VR list in network details
  CLOUDSTACK-9356: FIX Cannot add users in VPC VPN
2017-04-20 19:32:20 +05:30
rashmidixit
d8158fe5f4 CLOUDSTACK-9718: Revamp the dropdown showing lists of hosts available for migration in a Zone
Reviewed-By: Rashmi Dixit

    Problem: All the hosts suitable for VM Migration are not shown in the UI. This could
    confuse the user as the target host might never be shown in the UI.

    Root Cause: The API (findHostsForMigration) always returned page 1 results which would
    be always <= default.page.size global parameter. Therefore, in case of large
    no. of hosts where the result can map to multiple pages, this issue would arise.

    Solution: 1. Replace drop-down with listView widget.
    2. Allow lazy-loading of records on listView's scroll.
    3. Show additional parameters (CPU/Memory used) to assist admin in decision making.
    4. Provide 'Search by host name' to limit the results.

Added change where if there are no hosts found, an empty row with message will
appear.
2017-04-06 12:31:51 +05:30
Rohit Yadav
16913a9822 CLOUDSTACK-9842: Make UI JSP Free
We use some JSP file just for translation of strings in the UI. This is
achievable purely in JavaScript. This removes those JSPs, simplifies
translation usage and workflow (purely JS based). The l10n js (dictionary)
files are generated from existing messages.properties files during client-ui
code generation phase.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-09-28 12:26:43 +05:30
jessica
31081a681c Issue #: 5945 - delete obsolete index.html
Conflicts:

	ui/index.html
2010-08-25 18:27:51 -07:00
will
7cf14dcffa Test commit 2010-08-13 16:36:30 -07:00
Manuel Amador (Rudd-O)
05c020e1f6 Source code committed 2010-08-11 09:13:29 -07:00