ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sevdoki...@apache.org
Subject incubator-ignite git commit: # IGNITE-843 Create select cache div.
Date Thu, 09 Jul 2015 18:15:43 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 566325de7 -> 26509ad85


# IGNITE-843 Create select cache div.


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

Branch: refs/heads/ignite-843
Commit: 26509ad8517dbec254afb86466ce2cb39135c4da
Parents: 566325d
Author: sevdokimov <sergey.evdokimov@jetbrains.com>
Authored: Thu Jul 9 21:15:37 2015 +0300
Committer: sevdokimov <sergey.evdokimov@jetbrains.com>
Committed: Thu Jul 9 21:15:37 2015 +0300

----------------------------------------------------------------------
 .../controllers/cache-viewer-controller.js      | 68 +++++++++++---------
 .../nodejs/public/stylesheets/sql-console.css   | 31 +++++++++
 .../nodejs/views/sql/sql.jade                   |  4 +-
 3 files changed, 72 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/26509ad8/modules/web-control-center/nodejs/controllers/cache-viewer-controller.js
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/controllers/cache-viewer-controller.js b/modules/web-control-center/nodejs/controllers/cache-viewer-controller.js
index 2327b0f..f294bf9 100644
--- a/modules/web-control-center/nodejs/controllers/cache-viewer-controller.js
+++ b/modules/web-control-center/nodejs/controllers/cache-viewer-controller.js
@@ -15,42 +15,50 @@
  * limitations under the License.
  */
 
-controlCenterModule.controller('cacheViewerController', ['$scope', '$alert', '$http', 'commonFunctions',
function ($scope, $alert, $http, commonFunctions) {
-
-    $scope.results = [
-        {
+var demoResults = [
+    {
+        id: 256,
+        s: 'com.foo.User@3213',
+        fields: {
             id: 256,
-            s: 'com.foo.User@3213',
-            fields: {
-                id: 256,
-                firstName: 'Ivan',
-                lastName: 'Ivanov',
-                old: 23
-            }
-        },
+            firstName: 'Ivan',
+            lastName: 'Ivanov',
+            old: 23
+        }
+    },
 
-        {
+    {
+        id: 384,
+        s: 'com.foo.User@23214',
+        fields: {
             id: 384,
-            s: 'com.foo.User@23214',
-            fields: {
-                id: 384,
-                firstName: 'Sergey',
-                lastName: 'Petrov',
-                old: 28
-            }
-        },
+            firstName: 'Sergey',
+            lastName: 'Petrov',
+            old: 28
+        }
+    },
 
-        {
+    {
+        id: 923,
+        s: 'com.foo.User@93494',
+        fields: {
             id: 923,
-            s: 'com.foo.User@93494',
-            fields: {
-                id: 923,
-                firstName: 'Andrey',
-                lastName: 'Sidorov',
-                old: 28
-            }
+            firstName: 'Andrey',
+            lastName: 'Sidorov',
+            old: 28
         }
-    ];
+    }
+];
+
+var demoCaches = ['Users', 'Organizations', 'Cities'];
+
+controlCenterModule.controller('cacheViewerController', ['$scope', '$alert', '$http', 'commonFunctions',
function ($scope, $alert, $http, commonFunctions) {
+
+    $scope.results = demoResults;
+
+    $scope.caches = demoCaches;
+
+    $scope.defCache = $scope.caches.length > 0 ? $scope.caches[0] : null;
 
     var sqlEditor = ace.edit('querySql');
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/26509ad8/modules/web-control-center/nodejs/public/stylesheets/sql-console.css
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/public/stylesheets/sql-console.css b/modules/web-control-center/nodejs/public/stylesheets/sql-console.css
index 98c1026..9351349 100644
--- a/modules/web-control-center/nodejs/public/stylesheets/sql-console.css
+++ b/modules/web-control-center/nodejs/public/stylesheets/sql-console.css
@@ -21,6 +21,10 @@
     padding: 0 10px;
 }
 
+#cacheTd {
+    height: 100%;
+}
+
 #resultPanel {
     margin-top: 20px;
 }
@@ -39,3 +43,30 @@
 .resultRow {
     padding: 2px;
 }
+
+#defCacheSelect {
+    padding: 0 2px;
+
+    border: 1px solid #333;
+
+    margin-top: 10px;
+
+    width: 150px;
+
+    font-size: 12px;
+
+    overflow: auto;
+}
+
+#defCacheSelect div {
+    padding: 2px 0;
+}
+
+#defCacheSelect div:hover {
+    background: #eef;
+}
+
+#defCacheSelect .def {
+    color: #11f;
+    font-weight: bold;
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/26509ad8/modules/web-control-center/nodejs/views/sql/sql.jade
----------------------------------------------------------------------
diff --git a/modules/web-control-center/nodejs/views/sql/sql.jade b/modules/web-control-center/nodejs/views/sql/sql.jade
index ff39a08..e575676 100644
--- a/modules/web-control-center/nodejs/views/sql/sql.jade
+++ b/modules/web-control-center/nodejs/views/sql/sql.jade
@@ -39,7 +39,9 @@ block container
                         #querySql
 
                 td
-                    | Default&nbsp;cache
+                    | Default&nbsp;cache:
+                    div#defCacheSelect
+                        div(ng-repeat='c in caches', ng-class='{def: defCache == c}', ng-click='defCache
= c') {{c}}
 
         #resultPanel
             strong Results


Mime
View raw message