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
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
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
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
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