ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject incubator-ignite git commit: # IGNITE-843 Agent rename.
Date Thu, 20 Aug 2015 09:24:24 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-843 eb9fc35a0 -> 0a82e898d


# IGNITE-843 Agent rename.


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

Branch: refs/heads/ignite-843
Commit: 0a82e898d3a7e50e5889e51cdefdc66e9821f542
Parents: eb9fc35
Author: Andrey <anovikov@gridgain.com>
Authored: Thu Aug 20 16:24:24 2015 +0700
Committer: Andrey <anovikov@gridgain.com>
Committed: Thu Aug 20 16:24:24 2015 +0700

----------------------------------------------------------------------
 .../apache/ignite/agent/AgentConfiguration.java |   6 +-
 .../main/js/controllers/metadata-controller.js  |   1 +
 .../src/main/js/controllers/sql-controller.js   |  24 ++-
 .../src/main/js/public/stylesheets/style.scss   |   4 +-
 .../src/main/js/views/sql/sql.jade              | 176 ++++++++++++-------
 .../main/js/views/templates/agent-download.jade |  23 +--
 6 files changed, 153 insertions(+), 81 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0a82e898/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentConfiguration.java
b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentConfiguration.java
index 959c10f..78f3117 100644
--- a/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentConfiguration.java
+++ b/modules/control-center-agent/src/main/java/org/apache/ignite/agent/AgentConfiguration.java
@@ -62,15 +62,15 @@ public class AgentConfiguration {
 
     /** */
     @Parameter(names = { "-tm", "--testMetadata" }, description = "Start H2 database with
sample tables in same process.")
-    private boolean help;
+    private boolean meta;
 
     /** */
     @Parameter(names = { "-ts", "--testSql" }, description = "Create cache and populate it
with sample data for use in query.")
-    private boolean meta;
+    private boolean sql;
 
     /** */
     @Parameter(names = { "-h", "--help" }, description = "Print this help message")
-    private boolean sql;
+    private boolean help;
 
     /**
      * @return Login.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0a82e898/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 5eab839..a14e0e1 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
@@ -20,6 +20,7 @@ controlCenterModule.controller('metadataController', [
         function ($scope, $controller, $http, $modal, $common, $timeout, $focus, $confirm,
$copy, $table) {
             // Initialize the super class and extend it.
             angular.extend(this, $controller('agent-download', {$scope: $scope}));
+            $scope.agentGoal = 'load metadata from database schema';
 
             $scope.joinTip = $common.joinTip;
             $scope.getModel = $common.getModel;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0a82e898/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 9687b01..5bc2d76 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
@@ -19,6 +19,7 @@ controlCenterModule.controller('sqlController', ['$scope', '$controller',
'$http
     function ($scope, $controller, $http, $common) {
     // Initialize the super class and extend it.
     angular.extend(this, $controller('agent-download', {$scope: $scope}));
+    $scope.agentGoal = 'execute sql statements';
 
     $scope.joinTip = $common.joinTip;
 
@@ -34,6 +35,11 @@ controlCenterModule.controller('sqlController', ['$scope', '$controller',
'$http
         $http.post('/notebooks/get', {noteId: $scope.noteId})
             .success(function (notebook) {
                 $scope.notebook = notebook;
+
+                $scope.notebook_name = notebook.name;
+
+                if (notebook.paragraphs)
+                    notebook.paragraphs = [{}];
             })
             .error(function (errMsg) {
                 $common.showError(errMsg);
@@ -42,28 +48,34 @@ controlCenterModule.controller('sqlController', ['$scope', '$controller',
'$http
 
     loadNotebook();
 
-    $scope.saveNotebook = function(notebook) {
+    $scope.renameNotebook = function(name) {
         $scope.notebook_edit = false;
 
-        $http.post('/notebooks/save', notebook)
+        $scope.notebook.name = name;
+
+        $http.post('/notebooks/save', $scope.notebook)
             .success(function () {
                 var idx = _.findIndex($scope.$root.notebooks, function (item) {
-                    return item._id == notebook._id;
+                    return item._id == $scope.notebook._id;
                 });
 
                 if (idx >= 0) {
-                    $scope.$root.notebooks[idx].name = $scope.notebook.name;
+                    $scope.$root.notebooks[idx].name = name;
 
                     $scope.$root.rebuildDropdown();
                 }
             })
             .error(function (errMsg) {
                 $common.showError(errMsg);
-
-                loadNotebook();
             });
     };
 
+    $scope.resetNotebookName = function() {
+        $scope.notebook_edit = false;
+
+        $scope.notebook_name = $scope.notebook.name;
+    };
+
     $scope.addParagraph = function(notebook) {
         notebook.paragraphs.push({});
     };

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0a82e898/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 89f1667..bf4286c 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
@@ -539,7 +539,7 @@ a:hover, .link:hover .title {
 }
 
 .modal .modal-dialog {
-    width: 610px;
+    width: 650px;
 }
 
 .modal .modal-content {
@@ -1264,7 +1264,7 @@ a {
     padding-bottom: 10px;
 }
 
-.metadata-download {
+.agent-download {
     padding: 10px 10px 10px 20px;
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0a82e898/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 b4f59c5..aa770ae 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
@@ -28,65 +28,123 @@ block container
                 .docs-header
                     h1
                         a(ng-hide='notebook_edit' ng-click='notebook_edit = true;' style='line-height:
44px;') {{notebook.name}}
-                        input.form-control-h1(ng-show='notebook_edit' on-enter='saveNotebook(notebook)'
ng-model='notebook.name')
+                    div(ng-show='notebook_edit')
+                        input.form-control-h1(ng-model='notebook_name' on-enter='renameNotebook(notebook_name)'
on-escape='resetNotebookName()')
                     hr
                 .docs-body
-                    div(ng-if='!caches')
-                        .block-callout-right.margin-bottom-dflt(style='width: 100%')
-                            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)')
+                    .panel-group(bs-collapse ng-model='notebook.activeIdx')
+                        .panel.panel-default(ng-repeat='paragraph in notebook.paragraphs')
+                            .panel-heading
+                                h3
+                                    a(bs-collapse-toggle ng-click='hidePopover()') {{paragraph.name}}
+                            .panel-collapse(role='tabpanel' bs-collapse-target)
+                                .panel-body
+                                    .row
+                                        .col-xs-8.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='paragraph.query')
+                                        .col-xs-4.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='cache in caches track
by cache.name')
+                                                            td.col-sm-6(ng-class='{active:
cache.name == paragraph.activeCache.name}')
+                                                                a(ng-click='paragraph.activeCache
= row') {{$index + 1}}) {{::cache.name}}, {{::cache.mode}}
+                                    hr(style='margin: 0')
+                                    .settings-row
+                                        label Page Size:&nbsp;
+                                        button.btn.btn-default.base-control(ng-model='paragraph.pageSize'
bs-options='item for item in pageSizes' bs-select)
+                                    .settings-row
+                                        button.btn.btn-primary(ng-click='explain(paragraph)')
Explain
+                                        button.btn.btn-primary(ng-click='execute(paragraph)')
Execute
+                                        button.btn.btn-primary(ng-click='scan(paragraph)')
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-xs-8.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-xs-4.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 }}
+                    //
+                    //
+                    //
+                    //div(ng-if='!caches')
+                    //    .block-callout-right.margin-bottom-dflt(style='width: 100%')
+                    //        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)')
+                    //
+                    //    - 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-xs-8.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-xs-4.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 }}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0a82e898/modules/control-center-web/src/main/js/views/templates/agent-download.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/templates/agent-download.jade b/modules/control-center-web/src/main/js/views/templates/agent-download.jade
index 87264a2..84d347f 100644
--- a/modules/control-center-web/src/main/js/views/templates/agent-download.jade
+++ b/modules/control-center-web/src/main/js/views/templates/agent-download.jade
@@ -15,16 +15,17 @@
 .modal.center(tabindex='-1' role='dialog')
     .modal-dialog
         .modal-content
-           #errors-container.modal-header.header
-              button.close(type='button' ng-click='$hide()') &times;
-              h4.modal-title Connection to Control Center Agent is not established
-           .metadata-download
-              p Please install and run agent for use this functionality.
-              p For installation:
-              ul
-                 li Download zip file distribution.
-                 li Unzip agent to some folder.
-                 li Specify the agent's properties, refer to the README.txt how to configure
and start Control Center Agent.
-                 li Run 'ignite-control-center-agent.{sh | bat}'.
+            #errors-container.modal-header.header
+                button.close(type='button' ng-click='$hide()') &times;
+                h4.modal-title Connection to Ignite Web Agent is not established
+            .agent-download
+                p Please download and run&nbsp;
+                    a(href='#' ng-click='downloadAgent()') ignite-web-agent
+                    | &nbsp;in order to {{::agentGoal}}.
+                p For installation:
+                ul
+                    li Download and unzip ignite-web-agent.
+                    li For list of options, run ignite-web-agent.{sh|bat} —help.
+                    li Refer to README.txt for more information.
             .modal-footer
                 button.btn.btn-primary(ng-click='downloadAgent()') Download zip


Mime
View raw message