You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by se...@apache.org on 2015/07/31 09:47:28 UTC

[46/50] incubator-ignite git commit: # ignite-1121 Missing agent message.

# ignite-1121 Missing agent message.


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

Branch: refs/heads/ignite-1155_1
Commit: 505bae0c2bcd2a5727ead8294062f19b938f3a58
Parents: cb4e593
Author: Andrey <an...@gridgain.com>
Authored: Fri Jul 31 14:09:54 2015 +0700
Committer: Andrey <an...@gridgain.com>
Committed: Fri Jul 31 14:09:54 2015 +0700

----------------------------------------------------------------------
 .../src/main/js/controllers/models/sql.json     |   3 +
 .../src/main/js/controllers/sql-controller.js   |   7 +-
 .../src/main/js/routes/agent.js                 |   2 +-
 .../src/main/js/views/sql/sql.jade              | 110 ++++++++++---------
 4 files changed, 68 insertions(+), 54 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/505bae0c/modules/control-center-web/src/main/js/controllers/models/sql.json
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/models/sql.json b/modules/control-center-web/src/main/js/controllers/models/sql.json
index bcb03e0..93c821a 100644
--- a/modules/control-center-web/src/main/js/controllers/models/sql.json
+++ b/modules/control-center-web/src/main/js/controllers/models/sql.json
@@ -1,5 +1,8 @@
 {
   "screenTip": [
     "Select cache and execute SQL queries."
+  ],
+  "missingClientTip": [
+    "Please download and install client."
   ]
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/505bae0c/modules/control-center-web/src/main/js/controllers/sql-controller.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/sql-controller.js b/modules/control-center-web/src/main/js/controllers/sql-controller.js
index 1e67a08..527a194 100644
--- a/modules/control-center-web/src/main/js/controllers/sql-controller.js
+++ b/modules/control-center-web/src/main/js/controllers/sql-controller.js
@@ -64,23 +64,28 @@ controlCenterModule.controller('sqlController', ['$scope', '$controller', '$http
     $http.get('/models/sql.json')
         .success(function (data) {
             $scope.screenTip = data.screenTip;
+            $scope.missingClientTip = data.missingClientTip;
         })
         .error(function (errMsg) {
             $common.showError(errMsg);
         });
 
-    $scope.caches = [];
+    $scope.caches = undefined;
 
     $http.post('/agent/topology')
         .success(function (clusters) {
             var node = clusters[0];
 
+            console.log(clusters);
             $scope.caches = node.caches;
 
             if ($scope.tabs.length == 0)
                 $scope.addTab();
         })
         .error(function (errMsg) {
+            $scope.caches = undefined;
+
+            console.log(errMsg);
             $common.showError(errMsg);
         });
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/505bae0c/modules/control-center-web/src/main/js/routes/agent.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/routes/agent.js b/modules/control-center-web/src/main/js/routes/agent.js
index 4646c28..061376f 100644
--- a/modules/control-center-web/src/main/js/routes/agent.js
+++ b/modules/control-center-web/src/main/js/routes/agent.js
@@ -37,7 +37,7 @@ router.post('/topology', function(req, res) {
             return { nodeId: cluster._nodeId, caches: caches };
         }));
     }, function (err) {
-        res.send(err);
+        res.status(500).send(err);
     });
 });
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/505bae0c/modules/control-center-web/src/main/js/views/sql/sql.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/sql/sql.jade b/modules/control-center-web/src/main/js/views/sql/sql.jade
index 53e6639..df24e7c 100644
--- a/modules/control-center-web/src/main/js/views/sql/sql.jade
+++ b/modules/control-center-web/src/main/js/views/sql/sql.jade
@@ -29,57 +29,63 @@ block container
                     h1 Connect to Ignite and Execute SQL Queries
                     hr
                 .docs-body(ng-controller='sqlController' ng-init='noteId = #{JSON.stringify(noteId)};')
-                    - var tab = 'tabs[tabs.activeIdx]'
+                    div(ng-if='!caches')
+                        .block-callout-parent.block-callout-border.margin-bottom-dflt
+                            .block-callout
+                                p(ng-bind-html='joinTip(missingClientTip)')
+                    div(ng-if='caches')
+                        .block-callout-parent.block-callout-border.margin-bottom-dflt
+                            .block-callout
+                                p(ng-bind-html='joinTip(screenTip)')
 
-                    .block-callout-parent.block-callout-border.margin-bottom-dflt
-                        .block-callout
-                            p(ng-bind-html='joinTip(screenTip)')
-                    .tabs-below(bs-tabs bs-active-pane='tabs.activeIdx' data-template='/tab')
-                        div(ng-repeat='tab in tabs' title='Query' bs-pane)
-                    .row
-                        .col-sm-9(style='border-right: 1px solid #eee')
-                            div(style='height: 200px' ui-ace='{ theme: "chrome", mode: "sql",' +
-                                'require: ["ace/ext/language_tools"],' +
-                                'rendererOptions: {showPrintMargin: false, highlightGutterLine: false, fontSize: 14},' +
-                                'advanced: {enableSnippets: false, enableBasicAutocompletion: true, enableLiveAutocompletion: true}}' ng-model='#{tab}.query')
-                        .col-sm-3
-                            div(ng-hide='caches.length == 0' style='margin-top: 0.65em')
-                                lable.labelHeader Caches:
-                                table.links(st-table='caches')
-                                    tbody
-                                        tr(ng-repeat='row in caches track by row.name')
-                                            td.col-sm-6(ng-class='{active: row.name == #{tab}.selectedItem.name}')
-                                                a(ng-click='#{tab}.selectedItem = row') {{$index + 1}}) {{::row.name}}, {{::row.mode}}
-                    hr(style='margin: 0')
-                    .settings-row
-                        label Page Size:&nbsp;
-                        button.btn.btn-default.base-control(ng-model='#{tab}.pageSize' bs-options='item for item in pageSizes' bs-select)
-                    .settings-row
-                        button.btn.btn-primary(ng-click='explain(#{tab})') Explain
-                        button.btn.btn-primary(ng-click='execute(#{tab})') Execute
-                        button.btn.btn-primary(ng-click='scan(#{tab})' disabled) Scan
+                        - var tab = 'tabs[tabs.activeIdx]'
+
+                        .tabs-below(bs-tabs bs-active-pane='tabs.activeIdx' data-template='/tab')
+                            div(ng-repeat='tab in tabs' title='Query' bs-pane)
+                        .row
+                            .col-sm-9(style='border-right: 1px solid #eee')
+                                div(style='height: 200px' ui-ace='{ theme: "chrome", mode: "sql",' +
+                                    'require: ["ace/ext/language_tools"],' +
+                                    'rendererOptions: {showPrintMargin: false, highlightGutterLine: false, fontSize: 14},' +
+                                    'advanced: {enableSnippets: false, enableBasicAutocompletion: true, enableLiveAutocompletion: true}}' ng-model='#{tab}.query')
+                            .col-sm-3
+                                div(ng-hide='caches.length == 0' style='margin-top: 0.65em')
+                                    lable.labelHeader Caches:
+                                    table.links(st-table='caches')
+                                        tbody
+                                            tr(ng-repeat='row in caches track by row.name')
+                                                td.col-sm-6(ng-class='{active: row.name == #{tab}.selectedItem.name}')
+                                                    a(ng-click='#{tab}.selectedItem = row') {{$index + 1}}) {{::row.name}}, {{::row.mode}}
+                        hr(style='margin: 0')
+                        .settings-row
+                            label Page Size:&nbsp;
+                            button.btn.btn-default.base-control(ng-model='#{tab}.pageSize' bs-options='item for item in pageSizes' bs-select)
+                        .settings-row
+                            button.btn.btn-primary(ng-click='explain(#{tab})') Explain
+                            button.btn.btn-primary(ng-click='execute(#{tab})') Execute
+                            button.btn.btn-primary(ng-click='scan(#{tab})' disabled) Scan
 
-                    div(ng-show='#{tab}.rows.length > 0' style='margin-top: 0.65em')
-                        hr
-                        div
-                            table.table.table-striped.col-sm-12.sql-results(st-table='displayedCollection' st-safe-src='#{tab}.rows')
-                                thead
-                                    tr(style='border-size: 0')
-                                        td(colspan='{{#{tab}.meta.length}}')
-                                            .col-sm-8
-                                                lable Page #:&nbsp;
-                                                b {{#{tab}.page}}&nbsp;&nbsp;&nbsp;
-                                                | Results:&nbsp;
-                                                b {{#{tab}.rows.length + #{tab}.total}}
-                                            .col-sm-4
-                                                button.btn.btn-primary.fieldButton(ng-click='nextPage(#{tab})' ng-disabled='!#{tab}.queryId') Next page
-                                                //.input-tip
-                                                //    input.form-control(st-search placeholder='Filter...' type='search')
-                                    tr
-                                        th(ng-repeat='col in #{tab}.meta track by $index' st-sort='getter' data-ng-bind='::col.fieldName' bs-tooltip='col.schemaName + "." + col.typeName + "." + col.fieldName')
-                                tbody
-                                    //tr
-                                    //    td(colspan='{{#{tab}.cols.length}}')
-                                    //        .loading-indicator
-                                    tr(ng-repeat='row in displayedCollection track by $index')
-                                        td(ng-repeat='val in row track by $index') {{ val }}
+                        div(ng-show='#{tab}.rows.length > 0' style='margin-top: 0.65em')
+                            hr
+                            div
+                                table.table.table-striped.col-sm-12.sql-results(st-table='displayedCollection' st-safe-src='#{tab}.rows')
+                                    thead
+                                        tr(style='border-size: 0')
+                                            td(colspan='{{#{tab}.meta.length}}')
+                                                .col-sm-8
+                                                    lable Page #:&nbsp;
+                                                    b {{#{tab}.page}}&nbsp;&nbsp;&nbsp;
+                                                    | Results:&nbsp;
+                                                    b {{#{tab}.rows.length + #{tab}.total}}
+                                                .col-sm-4
+                                                    button.btn.btn-primary.fieldButton(ng-click='nextPage(#{tab})' ng-disabled='!#{tab}.queryId') Next page
+                                                    //.input-tip
+                                                    //    input.form-control(st-search placeholder='Filter...' type='search')
+                                        tr
+                                            th(ng-repeat='col in #{tab}.meta track by $index' st-sort='getter' data-ng-bind='::col.fieldName' bs-tooltip='col.schemaName + "." + col.typeName + "." + col.fieldName')
+                                    tbody
+                                        //tr
+                                        //    td(colspan='{{#{tab}.cols.length}}')
+                                        //        .loading-indicator
+                                        tr(ng-repeat='row in displayedCollection track by $index')
+                                            td(ng-repeat='val in row track by $index') {{ val }}
\ No newline at end of file