ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sevdoki...@apache.org
Subject [33/34] incubator-ignite git commit: IGNITE-843 Fixed collapse/expand advanced options. WIP on metadata screen.
Date Mon, 10 Aug 2015 16:01:15 GMT
IGNITE-843 Fixed collapse/expand advanced options. WIP on metadata screen.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/cb92fea1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/cb92fea1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/cb92fea1

Branch: refs/heads/ignite-1201
Commit: cb92fea18e4c642932ef342c0eaff31e8da5a137
Parents: faba289
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Mon Aug 10 10:46:40 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Mon Aug 10 10:46:40 2015 +0700

----------------------------------------------------------------------
 .../main/js/controllers/caches-controller.js    |   6 +
 .../main/js/controllers/clusters-controller.js  |   6 +
 .../main/js/controllers/metadata-controller.js  |   4 +-
 .../main/js/controllers/models/metadata.json    | 314 ++++++++++---------
 .../src/main/js/public/stylesheets/style.scss   |  22 +-
 .../src/main/js/views/configuration/caches.jade |  45 ++-
 .../main/js/views/configuration/clusters.jade   |  45 ++-
 .../main/js/views/configuration/metadata.jade   |  50 +--
 .../src/main/js/views/includes/controls.jade    |  16 +-
 9 files changed, 246 insertions(+), 262 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb92fea1/modules/control-center-web/src/main/js/controllers/caches-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/caches-controller.js b/modules/control-center-web/src/main/js/controllers/caches-controller.js
index 942fb8e..9d9d582 100644
--- a/modules/control-center-web/src/main/js/controllers/caches-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/caches-controller.js
@@ -88,6 +88,12 @@ controlCenterModule.controller('cachesController', ['$scope', '$http',
'$common'
             {value: 'H2', label: 'H2 database'}
         ];
 
+        $scope.ui = {expanded: false};
+
+        $scope.toggleExpanded = function () {
+            $scope.ui.expanded = !$scope.ui.expanded;
+        };
+
         $scope.general = [];
         $scope.advanced = [];
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb92fea1/modules/control-center-web/src/main/js/controllers/clusters-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/clusters-controller.js b/modules/control-center-web/src/main/js/controllers/clusters-controller.js
index 2cdd1ab..d962f52 100644
--- a/modules/control-center-web/src/main/js/controllers/clusters-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/clusters-controller.js
@@ -97,6 +97,12 @@ controlCenterModule.controller('clustersController', ['$scope', '$http',
'$commo
             {value: 'JdkMarshaller', label: 'JdkMarshaller'}
         ];
 
+        $scope.ui = {expanded: false};
+
+        $scope.toggleExpanded = function () {
+            $scope.ui.expanded = !$scope.ui.expanded;
+        };
+
         var simpleTables = {
             addresses: {msg: 'Such IP address already exists!', id: 'IpAddress'},
             regions: {msg: 'Such region already exists!', id: 'Region'},

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb92fea1/modules/control-center-web/src/main/js/controllers/metadata-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/metadata-controller.js b/modules/control-center-web/src/main/js/controllers/metadata-controller.js
index ba72b17..b6eaaab 100644
--- a/modules/control-center-web/src/main/js/controllers/metadata-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/metadata-controller.js
@@ -307,7 +307,7 @@ controlCenterModule.controller('metadataController', [
                 .success(function (data) {
                     $scope.screenTip = data.screenTip;
                     $scope.templateTip = data.templateTip;
-                    $scope.metadataManual = data.metadataManual;
+                    $scope.metadata = data.metadata;
                     $scope.metadataDb = data.metadataDb;
                 })
                 .error(function (errMsg) {
@@ -324,8 +324,6 @@ controlCenterModule.controller('metadataController', [
 
                 $scope.selectedItem = sel;
                 $scope.backupItem = bak;
-
-                $scope.panels.activePanel = [0];
             }
 
             // When landing on the page, get metadatas and show them.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb92fea1/modules/control-center-web/src/main/js/controllers/models/metadata.json
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/models/metadata.json b/modules/control-center-web/src/main/js/controllers/models/metadata.json
index ee73c11..2d6a593 100644
--- a/modules/control-center-web/src/main/js/controllers/models/metadata.json
+++ b/modules/control-center-web/src/main/js/controllers/models/metadata.json
@@ -23,168 +23,174 @@
     "  <li>both - Create cache type metadata to use with query and store.</li>",
     "</ul>"
   ],
-  "metadataManual": [
+  "metadata": [
     {
-      "label": "Name",
-      "type": "text",
-      "model": "name",
-      "required": true,
-      "placeholder": "Input name",
-      "id": "defaultFocusId"
-    },
-    {
-      "label": "Metadata for",
-      "type": "select",
-      "model": "kind",
-      "items": "kinds",
-      "tip": [
-        "Use following template for metadata:",
-        "<ul>",
-        "  <li>query - Create cache type metadata to use with queries only.</li>",
-        "  <li>store - Create cache type metadata to use with JDBC POJO store only.</li>",
-        "  <li>both - Create cache type metadata to use with query and store.</li>",
-        "</ul>"
-      ]
-    },
-    {
-      "label": "Database schema",
-      "type": "text",
-      "model": "databaseSchema",
-      "hide": "backupItem.kind != 'both' && backupItem.kind == 'query'",
-      "placeholder": "Input DB schema name",
-      "tip": [
-        "Schema name in database."
-      ]
-    },
-    {
-      "label": "Database table",
-      "type": "text",
-      "model": "databaseTable",
-      "hide": "backupItem.kind != 'both' && backupItem.kind == 'query'",
-      "placeholder": "Input DB table name",
-      "tip": [
-        "Table name in database."
-      ]
-    },
-    {
-      "label": "Key type",
-      "type": "withJavaBuildInTypes",
-      "model": "keyType",
-      "id": "keyType",
-      "required": true,
-      "placeholder": "Full class name for Key",
+      "label": "Metadata Common",
       "tip": [
-        "Key class used to store key in cache."
-      ]
-    },
-    {
-      "label": "Value type",
-      "type": "text",
-      "model": "valueType",
-      "id": "valueType",
-      "required": true,
-      "placeholder": "Full class name for Value",
-      "tip": [
-        "Value class used to store value in cache."
-      ]
-    },
-    {
-      "label": "Key fields",
-      "type": "dbFields",
-      "model": "keyFields",
-      "keyName": "name",
-      "valueName": "className",
-      "hide": "backupItem.kind == 'query' || isJavaBuildInClass()",
-      "focusId": "KeyField",
-      "addTip": "Add key field.",
-      "removeTip": "Remove key field.",
-      "tip": [
-        "Collection of key fields descriptions for CacheJdbcPojoStore."
-      ]
-    },
-    {
-      "label": "Value fields",
-      "type": "dbFields",
-      "model": "valueFields",
-      "keyName": "name",
-      "valueName": "className",
-      "hide": "backupItem.kind != 'both' && backupItem.kind == 'query'",
-      "focusId": "ValueField",
-      "addTip": "Add value field.",
-      "removeTip": "Remove value field.",
-      "tip": [
-        "Collection of value fields descriptions for CacheJdbcPojoStore.."
-      ]
-    },
-    {
-      "label": "Query fields",
-      "type": "queryFields",
-      "model": "queryFields",
-      "keyName": "name",
-      "valueName": "className",
-      "hide": "backupItem.kind == 'store'",
-      "focusId": "QryField",
-      "addTip": "Add field to query.",
-      "removeTip": "Remove field.",
-      "tip": [
-        "Collection of name-to-type mappings to be queried, in addition to indexed fields."
-      ]
-    },
-    {
-      "label": "Ascending fields",
-      "type": "queryFields",
-      "model": "ascendingFields",
-      "keyName": "name",
-      "valueName": "className",
-      "hide": "backupItem.kind == 'store'",
-      "focusId": "AscField",
-      "addTip": "Add field to index in ascending order.",
-      "removeTip": "Remove field.",
-      "tip": [
-        "Collection of name-to-type mappings to index in ascending order."
-      ]
-    },
-    {
-      "label": "Descending fields",
-      "type": "queryFields",
-      "model": "descendingFields",
-      "keyName": "name",
-      "valueName": "className",
-      "hide": "backupItem.kind == 'store'",
-      "focusId": "DescField",
-      "addTip": "Add field to index in descending order.",
-      "removeTip": "Remove field.",
-      "tip": [
-        "Collection of name-to-type mappings to index in descending order."
+        "Metadata properties common to Query and Store."
+      ],
+      "fields": [
+        {
+          "label": "Name",
+          "type": "text",
+          "model": "name",
+          "required": true,
+          "placeholder": "Input name",
+          "id": "defaultFocusId"
+        },
+        {
+          "label": "Key type",
+          "type": "withJavaBuildInTypes",
+          "model": "keyType",
+          "id": "keyType",
+          "required": true,
+          "placeholder": "Full class name for Key",
+          "tip": [
+            "Key class used to store key in cache."
+          ]
+        },
+        {
+          "label": "Value type",
+          "type": "text",
+          "model": "valueType",
+          "id": "valueType",
+          "required": true,
+          "placeholder": "Full class name for Value",
+          "tip": [
+            "Value class used to store value in cache."
+          ]
+        }
       ]
     },
     {
-      "label": "Text fields",
-      "type": "table-simple",
-      "model": "textFields",
-      "hide": "backupItem.kind == 'store'",
-      "placeholder": "Field name",
-      "focusId": "TextField",
-      "addTip": "Add field to index as text.",
-      "removeTip": "Remove field.",
-      "tableTip": [
-        "Fields to index as text."
-      ],
-      "tip": [
-        "Field to index as text."
+      "label": "Metadata for SQL query",
+      "tip": [],
+      "fields": [
+        {
+          "label": "Query fields",
+          "type": "queryFields",
+          "model": "queryFields",
+          "keyName": "name",
+          "valueName": "className",
+          "hide": "backupItem.kind == 'store'",
+          "focusId": "QryField",
+          "addTip": "Add field to query.",
+          "removeTip": "Remove field.",
+          "tip": [
+            "Collection of name-to-type mappings to be queried, in addition to indexed fields."
+          ]
+        },
+        {
+          "label": "Ascending fields",
+          "type": "queryFields",
+          "model": "ascendingFields",
+          "keyName": "name",
+          "valueName": "className",
+          "hide": "backupItem.kind == 'store'",
+          "focusId": "AscField",
+          "addTip": "Add field to index in ascending order.",
+          "removeTip": "Remove field.",
+          "tip": [
+            "Collection of name-to-type mappings to index in ascending order."
+          ]
+        },
+        {
+          "label": "Descending fields",
+          "type": "queryFields",
+          "model": "descendingFields",
+          "keyName": "name",
+          "valueName": "className",
+          "hide": "backupItem.kind == 'store'",
+          "focusId": "DescField",
+          "addTip": "Add field to index in descending order.",
+          "removeTip": "Remove field.",
+          "tip": [
+            "Collection of name-to-type mappings to index in descending order."
+          ]
+        },
+        {
+          "label": "Text fields",
+          "type": "table-simple",
+          "model": "textFields",
+          "hide": "backupItem.kind == 'store'",
+          "placeholder": "Field name",
+          "focusId": "TextField",
+          "addTip": "Add field to index as text.",
+          "removeTip": "Remove field.",
+          "tableTip": [
+            "Fields to index as text."
+          ],
+          "tip": [
+            "Field to index as text."
+          ]
+        },
+        {
+          "label": "Groups",
+          "type": "queryGroups",
+          "model": "groups",
+          "hide": "backupItem.kind == 'store'",
+          "addTip": "Add new group.",
+          "removeTip": "Remove group.",
+          "addItemTip": "Add new field to group.",
+          "removeItemTip": "Remove field from group.",
+          "tip": [
+            "Collection of group indexes."
+          ]
+        }
       ]
     },
     {
-      "label": "Groups",
-      "type": "queryGroups",
-      "model": "groups",
-      "hide": "backupItem.kind == 'store'",
-      "addTip": "Add new group.",
-      "removeTip": "Remove group.",
-      "addItemTip": "Add new field to group.",
-      "removeItemTip": "Remove field from group.",
-      "tip": [
-        "Collection of group indexes."
+      "label": "Metadata for cache store",
+      "tip": [],
+      "fields": [
+        {
+          "label": "Database schema",
+          "type": "text",
+          "model": "databaseSchema",
+          "hide": "backupItem.kind != 'both' && backupItem.kind == 'query'",
+          "placeholder": "Input DB schema name",
+          "tip": [
+            "Schema name in database."
+          ]
+        },
+        {
+          "label": "Database table",
+          "type": "text",
+          "model": "databaseTable",
+          "hide": "backupItem.kind != 'both' && backupItem.kind == 'query'",
+          "placeholder": "Input DB table name",
+          "tip": [
+            "Table name in database."
+          ]
+        },
+        {
+          "label": "Key fields",
+          "type": "dbFields",
+          "model": "keyFields",
+          "keyName": "name",
+          "valueName": "className",
+          "hide": "backupItem.kind == 'query' || isJavaBuildInClass()",
+          "focusId": "KeyField",
+          "addTip": "Add key field.",
+          "removeTip": "Remove key field.",
+          "tip": [
+            "Collection of key fields descriptions for CacheJdbcPojoStore."
+          ]
+        },
+        {
+          "label": "Value fields",
+          "type": "dbFields",
+          "model": "valueFields",
+          "keyName": "name",
+          "valueName": "className",
+          "hide": "backupItem.kind != 'both' && backupItem.kind == 'query'",
+          "focusId": "ValueField",
+          "addTip": "Add value field.",
+          "removeTip": "Remove value field.",
+          "tip": [
+            "Collection of value fields descriptions for CacheJdbcPojoStore.."
+          ]
+        }
       ]
     }
   ],

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb92fea1/modules/control-center-web/src/main/js/public/stylesheets/style.scss
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/public/stylesheets/style.scss b/modules/control-center-web/src/main/js/public/stylesheets/style.scss
index 4b0e754..993d0ab 100644
--- a/modules/control-center-web/src/main/js/public/stylesheets/style.scss
+++ b/modules/control-center-web/src/main/js/public/stylesheets/style.scss
@@ -414,7 +414,7 @@ hr {
 }
 
 .theme-line .main-content a {
-    color: #666;
+    color: $ignite-red;
 }
 
 .theme-line .main-content a:hover {
@@ -705,23 +705,12 @@ button .caret, .btn .caret {
     }
 }
 
-.theme-line .panel-title {
-    a {
-        color: $ignite-red;
-    }
-
-    h3 {
-        margin-bottom: 20px;
-    }
-}
-
 .theme-line .panel-body {
     padding: 10px 20px;
 }
 
 .theme-line .main-content a.customize {
     margin-left: 5px;
-    color: $ignite-red;
 }
 
 .theme-line .panel-collapse {
@@ -1130,6 +1119,15 @@ a {
     margin-top: 20px;
 }
 
+.section {
+    margin-top: 20px;
+}
+
+.advanced-options {
+    @extend .section;
+    margin-bottom: 20px;
+}
+
 .margin-top-dflt {
     margin-top: 10px;
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb92fea1/modules/control-center-web/src/main/js/views/configuration/caches.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/configuration/caches.jade b/modules/control-center-web/src/main/js/views/configuration/caches.jade
index dda7b40..c0cd1ec 100644
--- a/modules/control-center-web/src/main/js/views/configuration/caches.jade
+++ b/modules/control-center-web/src/main/js/views/configuration/caches.jade
@@ -48,30 +48,25 @@ block content
                         .panel-body
                             .settings-row(ng-repeat='field in general')
                                 +form-row('backupItem')
-            .panel-group(bs-collapse data-allow-multiple='true')
-                div(bs-collapse data-start-collapsed='true')
-                    .panel-title(ng-show='expanded')
-                        h3
-                            i.fa.fa-chevron-circle-up(ng-click='expanded = !expanded')
-                            a(bs-collapse-toggle='0' ng-click='expanded = !expanded') {{expanded
? 'Hide advanced settings...' : 'Show advanced settings...'}}
-                    .panel-collapse(bs-collapse-target)
-                        .span(bs-collapse data-start-collapsed='true' data-allow-multiple='true')
-                            .panel.panel-default(ng-repeat='group in advanced' ng-hide='{{group.hide}}')
-                                .panel-heading
-                                    h3
-                                        a(bs-collapse-toggle) {{group.label}}
-                                        i.tipLabel.fa.fa-question-circle(ng-if='group.tip'
bs-tooltip='joinTip(group.tip)' type='button')
-                                        i.tipLabel.fa.fa-question-circle.blank(ng-if='!group.tip')
-                                .panel-collapse(bs-collapse-target)
-                                    .panel-body
-                                        .settings-row(ng-repeat='field in group.fields')
-                                            +form-row('backupItem')
-                    .panel-title
-                        h3
-                            i.fa.fa-chevron-circle-up(ng-show='expanded' ng-click='expanded
= !expanded')
-                            i.fa.fa-chevron-circle-down(ng-show='!expanded' ng-click='expanded
= !expanded')
-                            a(bs-collapse-toggle='0' ng-click='expanded = !expanded') {{expanded
? 'Hide advanced settings...' : 'Show advanced settings...'}}
-            div
+            div(ng-show='ui.expanded')
+                .advanced-options
+                    i.fa.fa-chevron-circle-up(ng-click='toggleExpanded()')
+                    a(ng-click='toggleExpanded()') {{ui.expanded ? 'Hide advanced settings...'
: 'Show advanced settings...'}}
+                .panel-group(bs-collapse data-allow-multiple='true' data-start-collapsed='true')
+                    .panel.panel-default(ng-repeat='group in advanced')
+                        .panel-heading
+                            h3
+                                a(bs-collapse-toggle) {{::group.label}}
+                        .panel-collapse(bs-collapse-target)
+                            .panel-body
+                                .settings-row(ng-repeat='field in group.fields')
+                                    +form-row('backupItem')
+            .advanced-options
+                i.fa.fa-chevron-circle-up(ng-show='ui.expanded' ng-click='toggleExpanded()')
+                i.fa.fa-chevron-circle-down(ng-show='!ui.expanded' ng-click='toggleExpanded()')
+                a(ng-click='toggleExpanded()') {{ui.expanded ? 'Hide advanced settings...'
: 'Show advanced settings...'}}
+            .section
                 button.btn.btn-primary(ng-disabled='inputForm.$invalid' ng-click='saveItem()')
Save
                 button.btn.btn-primary(ng-show='backupItem._id' ng-disabled='inputForm.$invalid'
ng-click='saveItemAs()') Copy
-                button.btn.btn-primary.btn-second(ng-show='backupItem._id' ng-click='removeItem()')
Remove
+                button.btn.btn-primary(ng-show='backupItem._id' ng-click='removeItem()')
Remove
+

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb92fea1/modules/control-center-web/src/main/js/views/configuration/clusters.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/configuration/clusters.jade b/modules/control-center-web/src/main/js/views/configuration/clusters.jade
index 344b08b..b3737cf 100644
--- a/modules/control-center-web/src/main/js/views/configuration/clusters.jade
+++ b/modules/control-center-web/src/main/js/views/configuration/clusters.jade
@@ -36,7 +36,7 @@ block content
                             td(ng-class='{active: row._id == selectedItem._id}')
                                 a(event-focus='defaultFocusId' ng-click='selectItem(row)')
{{$index + 1}}) {{row.name}}, {{row.discovery.kind | displayValue:discoveries:'Discovery not
set'}}
         .padding-top-dflt
-            button.btn.btn-primary(event-focus='defaultFocusId' ng-click='createItem()')
&nbspAdd cluster
+            button.btn.btn-primary(event-focus='defaultFocusId' ng-click='createItem()')
Add cluster
             label(style='margin-left: 10px; margin-right: 10px') Use template:
             select.form-control.line-control(ng-model='template' ng-options='item.value as
item.label for item in templates')
             i.tipLabel.fa.fa-question-circle(bs-tooltip data-title='{{joinTip(templateTip)}}'
type='button')
@@ -51,31 +51,24 @@ block content
                         .panel-body
                             .settings-row(ng-repeat='field in general')
                                 +form-row('backupItem')
-            .panel-group(bs-collapse data-allow-multiple='true')
-                div(bs-collapse data-start-collapsed='true')
-                    .panel-title(ng-show='expanded')
-                        h3
-                            i.fa.fa-chevron-circle-up(ng-click='expanded = !expanded')
-                            a(bs-collapse-toggle='0' ng-click='expanded = !expanded') {{expanded
? 'Hide advanced settings...' : 'Show advanced settings...'}}
-                    .panel-collapse(bs-collapse-target)
-                        .span(bs-collapse data-start-collapsed='true' data-allow-multiple='true')
-                            .panel.panel-default(ng-repeat='group in advanced')
-                                .panel-heading
-                                    h3
-                                        a(bs-collapse-toggle) {{group.label}}
-                                        i.tipLabel.fa.fa-question-circle(ng-if='group.tip'
bs-tooltip='joinTip(group.tip)' type='button')
-                                        i.tipLabel.fa.fa-question-circle.blank(ng-if='!group.tip')
-                                .panel-collapse(bs-collapse-target)
-                                    .panel-body
-                                        .settings-row(ng-repeat='field in group.fields')
-                                            +form-row('backupItem')
-                    .panel-title
-                        h3
-                            i.fa.fa-chevron-circle-up(ng-show='expanded' ng-click='expanded
= !expanded')
-                            i.fa.fa-chevron-circle-down(ng-show='!expanded' ng-click='expanded
= !expanded')
-                            a(bs-collapse-toggle='0' ng-click='expanded = !expanded') {{expanded
? 'Hide advanced settings...' : 'Show advanced settings...'}}
-
-            div
+            div(ng-show='ui.expanded')
+                .advanced-options
+                    i.fa.fa-chevron-circle-up(ng-click='toggleExpanded()')
+                    a(ng-click='toggleExpanded()') {{ui.expanded ? 'Hide advanced settings...'
: 'Show advanced settings...'}}
+                .panel-group(bs-collapse data-allow-multiple='true' data-start-collapsed='true')
+                    .panel.panel-default(ng-repeat='group in advanced')
+                        .panel-heading
+                            h3
+                                a(bs-collapse-toggle) {{::group.label}}
+                        .panel-collapse(bs-collapse-target)
+                            .panel-body
+                                .settings-row(ng-repeat='field in group.fields')
+                                    +form-row('backupItem')
+            .advanced-options
+                i.fa.fa-chevron-circle-up(ng-show='ui.expanded' ng-click='toggleExpanded()')
+                i.fa.fa-chevron-circle-down(ng-show='!ui.expanded' ng-click='toggleExpanded()')
+                a(ng-click='toggleExpanded()') {{ui.expanded ? 'Hide advanced settings...'
: 'Show advanced settings...'}}
+            .section
                 button.btn.btn-primary(ng-disabled='inputForm.$invalid' ng-click='saveItem()')
Save
                 button.btn.btn-primary(ng-show='backupItem._id' ng-disabled='inputForm.$invalid'
ng-click='saveItemAs()') Copy
                 button.btn.btn-primary(ng-show='backupItem._id' ng-click='removeItem()')
Remove

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb92fea1/modules/control-center-web/src/main/js/views/configuration/metadata.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/configuration/metadata.jade b/modules/control-center-web/src/main/js/views/configuration/metadata.jade
index b5a2050..b8b56c6 100644
--- a/modules/control-center-web/src/main/js/views/configuration/metadata.jade
+++ b/modules/control-center-web/src/main/js/views/configuration/metadata.jade
@@ -36,39 +36,21 @@ block content
                             td(ng-class='{active: row._id == selectedItem._id}')
                                 a(event-focus='defaultFocusId' ng-click='selectItem(row)')
{{$index + 1}}) {{row.name}}
         .padding-top-dflt
-            button.btn.btn-primary(event-focus='defaultFocusId' ng-click='panels.activePanel
= [0]; createItem()') &nbspAdd metadata
-            label(style='margin-left: 6px; margin-right: 10px') For:
-            select.form-control.line-control(ng-model='template' ng-options='item.value as
item.label for item in templates')
-            i.tipLabel.fa.fa-question-circle(bs-tooltip data-title='{{joinTip(templateTip)}}'
type='button')
+            button.btn.btn-primary(event-focus='defaultFocusId' ng-click='panels.activePanel
= [0]; createItem()') Add metadata
+            button.btn.btn-primary(ng-click='loadFromDb()') Load from database
+
         hr
-        .panel-group(bs-collapse ng-model='panels.activePanel' data-allow-multiple='true')
-            .panel.panel-default(ng-show='selectedItem || backupItem')
-                .panel-heading
-                    h3
-                        a(bs-collapse-toggle) Configure metadata
-                .panel-collapse(role='tabpanel' bs-collapse-target)
-                    .panel-body
-                        form.form-horizontal(name='manualForm' ng-if='backupItem' novalidate)
-                            .settings-row(ng-repeat='field in metadataManual')
-                                +form-row('backupItem')
-                            button.btn.btn-primary(ng-disabled='manualForm.$invalid' ng-click='saveItem()')
Save
-                            button.btn.btn-primary(ng-show='backupItem._id' ng-disabled='inputForm.$invalid'
ng-click='saveItemAs()') Copy
-                            button.btn.btn-primary.btn-second(ng-show='backupItem._id' ng-click='removeItem()')
Remove
-            .panel.panel-default
-                .panel-heading
-                    h3
-                        a(bs-collapse-toggle) Load from database
-                .panel-collapse(bs-collapse-target)
-                    .panel-body
-                        form.form-horizontal(name='dbForm' novalidate)
-                            .settings-row(ng-repeat='field in metadataDb')
+        form.form-horizontal(name='inputForm' ng-if='backupItem' novalidate)
+            .panel-group(bs-collapse data-allow-multiple='true')
+                .panel.panel-default(ng-repeat='group in metadata')
+                    .panel-heading
+                        h3
+                            a(bs-collapse-toggle) {{::group.label}}
+                    .panel-collapse(role='tabpanel' bs-collapse-target)
+                        .panel-body
+                            .settings-row(ng-repeat='field in group.fields')
                                 +form-row('backupItem')
-                        div(ng-hide='tables.length == 0')
-                            table.links(st-table='tables')
-                                tbody
-                                    tr(ng-repeat='row in tables')
-                                        td
-                                            a {{$index + 1}}) {{::row.schemaName}} / {{::row.tableName}}
-                        button.btn.btn-primary(ng-disabled='dbForm.$invalid' ng-click='saveItem()')
Save
-                        button.btn.btn-primary.btn-second(ng-show='backupItem._id' ng-click='removeItem()')
Remove
-                        button.btn.btn-primary.btn-second(ng-click='reloadMetadata()') Reload
+        .section
+            button.btn.btn-primary(ng-disabled='manualForm.$invalid' ng-click='saveItem()')
Save
+            button.btn.btn-primary(ng-show='backupItem._id' ng-disabled='inputForm.$invalid'
ng-click='saveItemAs()') Copy
+            button.btn.btn-primary.btn-second(ng-show='backupItem._id' ng-click='removeItem()')
Remove

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cb92fea1/modules/control-center-web/src/main/js/views/includes/controls.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/includes/controls.jade b/modules/control-center-web/src/main/js/views/includes/controls.jade
index 8751ca7..4c6f0bb 100644
--- a/modules/control-center-web/src/main/js/views/includes/controls.jade
+++ b/modules/control-center-web/src/main/js/views/includes/controls.jade
@@ -77,11 +77,11 @@ mixin table-pair-edit(keyModel, valModel, keyPlaceholder, valPlaceholder,
keyJav
                 input.form-control(id=focusIdVal type='text' ng-model=valModel placeholder=valPlaceholder
on-enter=btnVisibleAndSave on-escape='tableReset()')
 
 mixin table-pair(header, tblMdl, keyFld, valFld, keyPlaceholder, valPlaceholder, keyJavaBuildInTypes,
valueJavaBuildInTypes)
-    .col-sm-7
+    .col-sm-7.table-details
         label.table-header #{header}:
         +tipLabel('field.tip')
         +btn-add('tableNewItem(field)', 'field.addTip', 'newKey{{::field.focusId}}')
-        .table-details(ng-show='(#{tblMdl} && #{tblMdl}.length > 0) || tableNewItemActive(field)')
+        div(ng-show='(#{tblMdl} && #{tblMdl}.length > 0) || tableNewItemActive(field)')
             table.links-edit.col-sm-12(st-table=tblMdl)
                 tbody
                     tr(ng-repeat='item in #{tblMdl}')
@@ -287,13 +287,13 @@ mixin form-row-custom(lblClasses, fieldClasses, dataSource)
                 .details-row(ng-repeat='detail in field.details[#{fieldMdl}].fields')
                     +details-row
         div(ng-switch-when='table-simple' ng-hide=fieldHide)&attributes(fieldCommon)
-            .col-sm-7
+            .col-sm-7.table-details
                 label.table-header {{::field.label}}:
                 +tipLabel('field.tableTip')
                 +btn-add('tableNewItem(field)', 'field.addTip', 'new{{::field.focusId}}')
             .col-sm-12(ng-show='(#{fieldMdl} && #{fieldMdl}.length > 0) || tableNewItemActive(field)')
                 .col-sm-7
-                    .table-details
+                    div
                         table.links-edit.col-sm-12(st-table='#{fieldMdl}')
                             tbody
                                 tr(ng-repeat='item in #{fieldMdl} track by $index')
@@ -319,13 +319,13 @@ mixin form-row-custom(lblClasses, fieldClasses, dataSource)
         div(ng-switch-when='queryFields' ng-hide=fieldHide)
             +table-pair('{{::field.label}}', fieldMdl, 'name', 'className', 'Field name',
'Field class full name', false, true)
         div(ng-switch-when='dbFields' ng-hide=fieldHide)
-            .col-sm-7
+            .col-sm-7.table-details
                 label.table-header {{::field.label}}:
                 +tipLabel('field.tip')
                 +btn-add('tableNewItem(field)', 'field.addTip', 'newDatabaseName{{::field.focusId}}')
             .col-sm-12(ng-show='(#{fieldMdl} && #{fieldMdl}.length > 0) || tableNewItemActive(field)')
                 .col-sm-7
-                    .table-details
+                    div
                         table.links-edit.col-sm-12(st-table=fieldMdl)
                             tbody
                                 tr(ng-repeat='item in #{fieldMdl}')
@@ -340,13 +340,13 @@ mixin form-row-custom(lblClasses, fieldClasses, dataSource)
                                     td.col-sm-12(ng-init='newDatabaseType="INTEGER"; newJavaType="Integer"')
                                         +table-db-field-edit('newDatabaseName', 'newDatabaseType',
'newJavaName', 'newJavaType', '{{::field.focusId}}', '-1')
         div(ng-switch-when='queryGroups' ng-hide=fieldHide)
-            .col-sm-7
+            .col-sm-7.table-details
                 label.table-header {{::field.label}}:
                 +tipLabel('field.tip')
                 +btn-add('tableNewItem(field)', 'field.addTip', 'newGroupName')
             .col-sm-12(ng-show='(#{fieldMdl} && #{fieldMdl}.length > 0) || tableNewItemActive(field)')
                 .col-sm-7
-                    .table-details
+                    div
                         table.links-edit.col-sm-12(st-table=fieldMdl ng-init='newDirection
= false')
                             tbody
                                 tr(ng-repeat='group in #{fieldMdl}')


Mime
View raw message