Commit Graph

5 Commits

Author SHA1 Message Date
Andrey Kurilin 3a2e82ab75 Extend settings with OPENSTACK_SERVER_DEFAULT_USER_DATA
The new setting should allow an administrator to specify default user_data
for new VMs. The default user_data can be a string template that accepts
request object which has info about the user, so the default user_data can
be personalized.

Change-Id: I86ac21bf82c1667135abd4f20fb4514da0899450
2022-09-01 19:23:00 +03:00
Shu Muto 5424c6306a Add create and import key pair actions
This patch adds create and import keypair actions into
Angularized key pair panel as global action.

Also, to load public key from file, this patch uses
load-edit directive.

To use load-edit directive from angular-schema-form,
i.e. from separated scope, this patch enables to configure
callback function to get content of textarea in load-edit.

Change-Id: Ie38bff8fba90de99095b589d70da45dcb202fa56
Imprements: blueprint ng-keypair
Needed-By: I3d6ae0b513120cf50c89b40234b602b816adfd48
Needed-By: I9200baa585c18095656d0459c649391b61b553a2
2017-12-14 15:44:44 +09:00
Shu Muto 876f80c4a8 Commonize load-edit directive
Codes for load-edit directive is placing under framework directory:
horizon/static/framework/widgets
But it has code inside for Instance creation workflow.
This should be commonized.

If load-edit will be commonized, we can use it for Key Pair importing,
Orchestration Template and Environment in stack creation.
Furthermore, plugins can use load-edit. e.g. cert file uploading in
Magnum UI, cluster spec yaml registering in Senlin Dashboard, etc.

This patch fixes the issue.

Also, at the point view from UX, file input element should be
above of textarea. Because user wants to load file at first,
rather than input directly.

Change-Id: I3e1befb81996841820111558adf3ca386709904d
Closes-Bug: #1704260
2017-11-30 11:52:11 +09:00
Itxaka d2692ef801 NG launch instance: Clear fileInput value on text change
The onchange event occurs when a control loses the input
focus and its value has been modified since gaining focus.
This attribute applies to the following elements:
INPUT, SELECT, and TEXTAREA.
http://www.w3.org/TR/html4/interact/scripts.html#adef-onchange

This affected uploading a script and modifying it, as it would
not allow to reupload it again.
This patch cleans the fileInput.val() on textInput change so
a user can upload a script, modify it, and reupload the same
script again if he wants to start from a clean scratch again

Change-Id: Ie2d29de4ebcdea07f7e3e2ce6c7094c1d2fe5e10
Closes-Bug: #1522067
2016-03-31 14:05:08 +00:00
cbeasley 0bd3863faf Add unit tests for load-edit directive
Write unit tests for the directive to increase test coverage
Split file read into a separate service for easier testing.

Co-Authored-By: Matt Borland <matt.borland@hpe.com>
Co-Authored-By: Shaoquan Chen <sean.chen2@hp.com>
Co-Authored-By: Rajat Vig<rajatv@thoughtworks.com>

Change-Id: Ie886c374b19d24351766bb48023ddfb7426b7a06
Partial-Bug: #1506891
2016-02-04 15:17:37 -08:00