Jump to: navigation, search

Difference between revisions of "Murano/Documentation/DynamicUI"

Line 1: Line 1:
 
=Dynamic UI Definition Manual=
 
=Dynamic UI Definition Manual=
  
The main purpose of Dynamic UI is to generate application creation forms "on-the-fly". Murano dashboard doesn't know anything about what applications can be deployed and witch web form need to be used to create application instance. So all application definitions should contain yaml file which will tell dashboard now to create application and what validation  to be apply. This document will help you to compose valid UI definition to your application.
+
The main purpose of Dynamic UI is to generate application creation forms "on-the-fly". Murano dashboard doesn't know anything about what applications can be deployed and witch web form need to be used to create application instance. So all application definitions should contain yaml file which will tell dashboard now to create application and what validation  to be apply. This document will help you to compose valid UI definition to your application.  
  
 
== Structure ==
 
== Structure ==
Line 14: Line 14:
  
 
==== Application and Templates ====
 
==== Application and Templates ====
In Application section object model is described. According to this model application will be deployed. Here you can set where parameters you got from user will be used. To do this part of YAQL is used: way of setting valuabals ($ as the first symbol,
+
In Application section "application object model" is described. This model will be translated into json and according to it application will be deployed.  
 +
Application section should contains three keys (that is murano-engine requirement):
 +
* "?"  - so murano-engine will understand that it's a system part of the model.
 +
On the top level the following keys that describe application itself should be used:
  
 +
Example:
 +
#Application:
 +
#?:
 +
#  type: com.mirantis.murano.services.windows.activeDirectory.ActiveDirectory
 +
#  name: $.serviceConfiguration.name
 +
#  primaryController:
 +
#    ?:
 +
#        type: com.mirantis.murano.services.windows.activeDirectory.PrimaryController
 +
#        host: $host
 +
#        secondaryControllers: repeat($secondaryController, 2, $.serviceConfiguration.dcInstances + 1)
 +
 +
 +
Here you can pick parameters you got from user (they should be described in the Forms section) and pick the right place where they should be set . To do this part of [https://github.com/tsufiev/yaql/blob/master/README.md YAQL] is used:
 +
* way of setting variables ($ as the first symbol)
 +
* ''repeat'' function
 +
* ''interpolate'' functions
 +
 +
==== FOrms ====
 
===supported types===
 
===supported types===
 
'string': fields.CharField,
 
'string': fields.CharField,

Revision as of 14:42, 10 April 2014

Dynamic UI Definition Manual

The main purpose of Dynamic UI is to generate application creation forms "on-the-fly". Murano dashboard doesn't know anything about what applications can be deployed and witch web form need to be used to create application instance. So all application definitions should contain yaml file which will tell dashboard now to create application and what validation to be apply. This document will help you to compose valid UI definition to your application.

Structure

UI definition should be a valid yaml file and should contain the following sections (for version 2):

  • Version - points out to which syntax version is used
  • Templates - auxiliary section, using togeher with Apllication
  • Application - object model description which will be used in application deployment
  • Forms - web forms defenitions

Version

Version of supported dynamic UI syntax

Application and Templates

In Application section "application object model" is described. This model will be translated into json and according to it application will be deployed. Application section should contains three keys (that is murano-engine requirement):

  • "?" - so murano-engine will understand that it's a system part of the model.

On the top level the following keys that describe application itself should be used:

Example:

  1. Application:
  2. ?:
  3. type: com.mirantis.murano.services.windows.activeDirectory.ActiveDirectory
  4. name: $.serviceConfiguration.name
  5. primaryController:
  6.  ?:
  7. type: com.mirantis.murano.services.windows.activeDirectory.PrimaryController
  8. host: $host
  9. secondaryControllers: repeat($secondaryController, 2, $.serviceConfiguration.dcInstances + 1)


Here you can pick parameters you got from user (they should be described in the Forms section) and pick the right place where they should be set . To do this part of YAQL is used:

  • way of setting variables ($ as the first symbol)
  • repeat function
  • interpolate functions

FOrms

supported types

'string': fields.CharField,

   'boolean': fields.BooleanField,
   'clusterip': fields.ClusterIPField,
   'domain': fields.DomainChoiceField,
   'password': fields.PasswordField,
   'integer': fields.IntegerField,
   'databaselist': fields.DatabaseListField,
   'table': fields.TableField,
   'flavor': fields.FlavorChoiceField,
   'keypair': fields.KeyPairChoiceField,
   'image': fields.ImageChoiceField,
   'azone': fields.AZoneChoiceField,
   'text': (fields.CharField, forms.Textarea),
   'floatingip': fields.FloatingIpBooleanField,
   'psqlDatabase'