k8srepo field description mandatory; k8scluster placeholder hint for nets field 30/8330/3 v7.0.0 v7.0.0rc1 v7.0.1 v7.0.1rc1 v7.0.1rc2 v7.0.1rc3
authorlombardofr <lombardo@everyup.it>
Thu, 5 Dec 2019 13:21:57 +0000 (14:21 +0100)
committerlombardofr <lombardo@everyup.it>
Fri, 6 Dec 2019 14:13:07 +0000 (15:13 +0100)
Change-Id: I9d237333a3e2961845aef4948f27f69dfae5b405
Signed-off-by: lombardofr <lombardo@everyup.it>
k8sclusterhandler/template/modal/k8scluster_register.html
k8sclusterhandler/views.py
k8srepohandler/template/modal/k8srepo_register.html

index 1be648f..db9de50 100644 (file)
@@ -32,34 +32,41 @@ limitations under the License.
                         <div class="col-sm-3">
                             <input class="form-control" id="k8sc_name" name="name" placeholder="Name" required>
                         </div>
-                        <label for="k8sc_vim_account" class="col-sm-2">Vim Account *</label>
+                        <label for="k8sc_version" class="col-sm-2">K8s Version *</label>
                         <div class="col-sm-3">
-                            <select required id="k8sc_vim_account" class="js-example-basic form-control" name="vim_account">
-                            </select>
+                            <input class="form-control" id="k8sc_version" name="k8s_version"
+                                        placeholder="K8s Version" required>
                         </div>
+                       
                         
                     </div> 
                     
-
                     <div class="form-group">
-                        <label for="k8sc_version" class="col-sm-2">K8s Version *</label>
+                        
+                        <label for="k8sc_vim_account" class="col-sm-2">Vim Account *</label>
                         <div class="col-sm-3">
-                            <input class="form-control" id="k8sc_version" name="k8s_version"
-                                        placeholder="K8s Version" required>
+                            <select required id="k8sc_vim_account" class="js-example-basic form-control" name="vim_account">
+                            </select>
                         </div>
-                        <label for="k8sc_nets" class="col-sm-2">Nets*</label>
+
+                        <label for="k8sc_description" class="col-sm-2">Description *</label>
                         <div class="col-sm-3">
-                            <input class="form-control" id="k8sc_nets" name="nets"
-                                        placeholder="Nets" >
+                            <input class="form-control" id="k8sc_description" name="description"
+                                        placeholder="Description" required>
+                        </div>
+                    </div>
+                    <div class="form-group">
+                        <label for="k8sc_nets" class="col-sm-2">Nets*</label>
+                        <div class="col-sm-6">
+                            <textarea class="form-control" id="k8sc_nets" name="nets" placeholder="example: {'net1': 'osm-ext'}"
+                                        rows="2"></textarea>
                         </div>
                     </div>
                     <div class="form-group">
-                        <label for="credentials" class="col-sm-3 control-label">Credentials *</label>
+                        <label for="k8sc_nets" class="col-sm-2">Credentials*</label>
                         <div class="col-sm-6">
                             <textarea class="form-control" id="credentials" name="credentials" placeholder="Yaml"
-                                      rows="3"></textarea>
-                            <!--<p class="help-block">Or load from file</p>
-                            <input type="file" id="credentials_file" name=credentials_file">-->
+                                        rows="2"></textarea>
                         </div>
                     </div>
 
index f3ee93d..00f7c8c 100644 (file)
@@ -55,6 +55,7 @@ def create(request):
             "name": request.POST.get('name'),
             "credentials": yaml.load(request.POST.get('credentials')),
             "vim_account": request.POST.get('vim_account'),
+            "description": request.POST.get('description'),
             "k8s_version": request.POST.get('k8s_version'),
             "nets": yaml.load(request.POST.get('nets')),
         }
index b742d79..6da73d5 100644 (file)
@@ -49,10 +49,10 @@ limitations under the License.
                             <input class="form-control" id="k8sr_url" name="url"
                                         placeholder="Url" required>
                         </div>
-                        <label for="k8sr_description" class="col-sm-2">Description</label>
+                        <label for="k8sr_description" class="col-sm-2">Description *</label>
                         <div class="col-sm-3">
                             <input class="form-control" id="k8sr_description" name="description"
-                                        placeholder="Description" >
+                                        placeholder="Description" required>
                         </div>
                     </div>