ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sevdoki...@apache.org
Subject [2/2] incubator-ignite git commit: # IGNITE-843 Sql: add some results
Date Thu, 09 Jul 2015 17:45:15 GMT
# IGNITE-843 Sql: add some results


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

Branch: refs/heads/ignite-843
Commit: 566325de72b26069a40583d6df939527bf0146bb
Parents: 8dd61f6
Author: sevdokimov <sergey.evdokimov@jetbrains.com>
Authored: Thu Jul 9 20:45:04 2015 +0300
Committer: sevdokimov <sergey.evdokimov@jetbrains.com>
Committed: Thu Jul 9 20:45:04 2015 +0300

----------------------------------------------------------------------
 .../controllers/cache-viewer-controller.js      | 34 ++++++++++++++++++++
 .../nodejs/public/stylesheets/sql-console.css   | 18 ++++++++---
 .../nodejs/views/sql/sql.jade                   | 27 ++++++++++------
 3 files changed, 66 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/566325de/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 4bac759..2327b0f 100644
--- a/modules/web-control-center/nodejs/controllers/cache-viewer-controller.js
+++ b/modules/web-control-center/nodejs/controllers/cache-viewer-controller.js
@@ -17,6 +17,40 @@
 
 controlCenterModule.controller('cacheViewerController', ['$scope', '$alert', '$http', 'commonFunctions',
function ($scope, $alert, $http, commonFunctions) {
 
+    $scope.results = [
+        {
+            id: 256,
+            s: 'com.foo.User@3213',
+            fields: {
+                id: 256,
+                firstName: 'Ivan',
+                lastName: 'Ivanov',
+                old: 23
+            }
+        },
+
+        {
+            id: 384,
+            s: 'com.foo.User@23214',
+            fields: {
+                id: 384,
+                firstName: 'Sergey',
+                lastName: 'Petrov',
+                old: 28
+            }
+        },
+
+        {
+            id: 923,
+            s: 'com.foo.User@93494',
+            fields: {
+                id: 923,
+                firstName: 'Andrey',
+                lastName: 'Sidorov',
+                old: 28
+            }
+        }
+    ];
 
     var sqlEditor = ace.edit('querySql');
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/566325de/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 a81c31f..98c1026 100644
--- a/modules/web-control-center/nodejs/public/stylesheets/sql-console.css
+++ b/modules/web-control-center/nodejs/public/stylesheets/sql-console.css
@@ -16,16 +16,26 @@
     border: 1px solid #aaa;
 }
 
-#querySqlContainer {
-    margin: 0 10px;
+.queryTd {
+    width: 99%;
+    padding: 0 10px;
+}
+
+#resultPanel {
+    margin-top: 20px;
 }
 
 #queryResult {
     width: 100%;
 
-    margin-top: 10px;
-
     padding: 5px;
+}
 
+#queryResult .props {
+    color: #666;
+    font-size: smaller;
+}
 
+.resultRow {
+    padding: 2px;
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/566325de/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 e3b9361..ff39a08 100644
--- a/modules/web-control-center/nodejs/views/sql/sql.jade
+++ b/modules/web-control-center/nodejs/views/sql/sql.jade
@@ -23,21 +23,30 @@ append css
 
 block container
     div.greedy(ng-controller='cacheViewerController')
-        h3 Sql console
+        h4 Sql console
 
         table#queryTable(cellpadding=0, cellspacing=0, ng-init='queryType = "sql"')
             tr
                 td
-                    | Query&nbsp;type:
-
-
-                td(width='99%')
-                    #querySqlContainer
+                    label(for='queryTypeSelect') Query&nbsp;type:
+                    select#queryTypeSelect(ng-model='queryType')
+                        option(value='sql') Sql query
+                        option(value='id') Get by ID
+                        option(value='scane') Scan cache
+
+                td.queryTd
+                    div(ng-show='queryType == "sql"')
                         #querySql
 
-
                 td
                     | Default&nbsp;cache
 
-        #queryResult
-            | Some result
+        #resultPanel
+            strong Results
+
+            #queryResult
+                div(ng-repeat='r in results')
+                    .resultRow
+                        | {{r.id}} -> {{r.s}}
+                        span.props  {{r.fields}}
+


Mime
View raw message