ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject ignite git commit: IGNITE-843 WIP on preview.
Date Mon, 24 Aug 2015 11:22:01 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843 a174e8eaa -> 5e559928b


IGNITE-843 WIP on preview.


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

Branch: refs/heads/ignite-843
Commit: 5e559928b72f0c09a766c20a41c29d00431e29b5
Parents: a174e8e
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Mon Aug 24 18:22:23 2015 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Mon Aug 24 18:22:23 2015 +0700

----------------------------------------------------------------------
 .../main/js/controllers/clusters-controller.js  | 15 ++++++++++
 .../src/main/js/public/stylesheets/style.scss   |  9 ++++++
 .../src/main/js/views/includes/controls.jade    | 29 ++++++++++++--------
 3 files changed, 42 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/5e559928/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 3ed69f3..292ec40 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
@@ -66,6 +66,21 @@ controlCenterModule.controller('clustersController', ['$scope', '$http',
'$commo
             }
         }
 
+        $scope.aceInit = function (editor) {
+            editor.setReadOnly(true);
+            editor.setOption("highlightActiveLine", false);
+
+            var renderer = editor.renderer;
+
+            renderer.setHighlightGutterLine(false);
+            renderer.setShowPrintMargin(false);
+            renderer.setOption('fontSize', '14px');
+
+            editor.setTheme('ace/theme/chrome');
+        };
+
+        $scope.preview = '<bean class="org.apache.ignite.configuration.IgniteConfiguration"></bean>';
+
         $scope.cacheModes = $common.mkOptions(['LOCAL', 'REPLICATED', 'PARTITIONED']);
 
         $scope.deploymentModes = $common.mkOptions(['PRIVATE', 'ISOLATED', 'SHARED', 'CONTINUOUS']);

http://git-wip-us.apache.org/repos/asf/ignite/blob/5e559928/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 4de127d..eff77d2 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
@@ -764,6 +764,11 @@ button .caret, .btn .caret {
 
 .theme-line .panel-body {
     padding: 10px 20px;
+
+    [class*="col-"] {
+        padding-left: 0 !important;
+        padding-right: 0 !important;
+    }
 }
 
 .theme-line .main-content a.customize {
@@ -1447,6 +1452,10 @@ a {
     }
 }
 
+.ace-preview {
+
+}
+
 .loading-indicator {
     box-sizing: border-box;
     -webkit-box-sizing: border-box;

http://git-wip-us.apache.org/repos/asf/ignite/blob/5e559928/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 f932f27..642e836 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
@@ -86,7 +86,7 @@ mixin table-pair-edit(prefix, keyPlaceholder, valPlaceholder, keyJavaBuildInType
                 input.form-control(id=valFocusId 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.group
+    .col-sm-12.group
         .group-legend
             label #{header}
             +group-tip('field.tip')
@@ -246,7 +246,7 @@ mixin table-group-item-edit(prefix, index)
             button.form-control(id=direction ng-model=directionModel bs-select bs-options='item.value
as item.label for item in {{sortDirections}}' on-enter=btnVisibleAndSave on-escape='tableReset()'
tabindex='0')
 
 mixin form-row(dataSource)
-    +form-row-custom(['col-xs-3 col-sm-2 col-md-2'], ['col-xs-6 col-sm-5 col-md-5'], dataSource)
+    +form-row-custom(['col-xs-4 col-sm-4 col-md-4'], ['col-xs-8 col-sm-8 col-md-8'], dataSource)
 
 mixin form-row-custom(lblClasses, fieldClasses, dataSource)
     - var fieldMdl = 'getModel('+ dataSource + ', field)[field.model]';
@@ -297,12 +297,13 @@ mixin form-row-custom(lblClasses, fieldClasses, dataSource)
                 .input-tip
                     button.form-control(id='{{::field.id}}' bs-select ng-disabled=fieldDisabled
data-placeholder='{{::field.placeholder}}' bs-options='item.value as item.label for item in
{{field.items}}' tabindex='0')&attributes(fieldCommon)
         div(ng-switch-when='dropdown-multiple' ng-hide=fieldHide)
-            label(class=lblClasses ng-class=fieldRequiredClass) {{::field.label}}:
+            dic(class=lblClasses)
+                label(ng-class=fieldRequiredClass) {{::field.label}}:
+                a.customize(ng-if='field.addLink' ng-href='{{field.addLink.ref}}') (add)
             div(class=fieldClasses)
                 +tipField('field.tip')
                 .input-tip
                     button.form-control(bs-select ng-disabled='{{field.items}}.length ==
0' data-multiple='1' data-placeholder='{{::field.placeholder}}' bs-options='item.value as
item.label for item in {{field.items}}' tabindex='-1')&attributes(fieldCommon)
-            a.customize(ng-show='field.addLink' ng-href='{{field.addLink.ref}}') {{field.addLink.label}}
         div(ng-switch-when='dropdown-details' ng-hide=fieldHide)
             - var expanded = 'field.details[' + fieldMdl + '].expanded'
 
@@ -312,11 +313,11 @@ mixin form-row-custom(lblClasses, fieldClasses, dataSource)
                 .input-tip
                     button.form-control(bs-select ng-disabled=fieldDisabled data-placeholder='{{::field.placeholder}}'
bs-options='item.value as item.label for item in {{field.items}}' tabindex='0')&attributes(fieldCommon)
             a.customize(ng-show='#{fieldMdl} && field.settings' ng-click='#{expanded}
= !#{expanded}') {{#{expanded} ? 'Hide settings' : 'Show settings'}}
-            .col-sm-7.panel-details(ng-show='(#{expanded} || !field.settings) &&
#{fieldMdl}')
+            .col-sm-12.panel-details(ng-show='(#{expanded} || !field.settings) &&
#{fieldMdl}')
                 .details-row(ng-repeat='detail in field.details[#{fieldMdl}].fields')
                     +details-row
         .section(ng-switch-when='panel-details' ng-hide=fieldHide)&attributes(fieldCommon)
-            .col-sm-7.group
+            .col-sm-12.group
                 .group-legend
                     label {{::field.label}}
                     +group-tip('field.tip')
@@ -324,7 +325,7 @@ mixin form-row-custom(lblClasses, fieldClasses, dataSource)
                     .details-row(ng-repeat='detail in field.details')
                         +details-row
         .group-section(ng-switch-when='table-simple' ng-hide=fieldHide)&attributes(fieldCommon)
-            .col-sm-7.group
+            .col-sm-12.group
                 .group-legend
                     label {{::field.label}}
                     +group-tip('field.tableTip')
@@ -358,7 +359,7 @@ mixin form-row-custom(lblClasses, fieldClasses, dataSource)
         .group-section(ng-switch-when='queryFields' ng-hide=fieldHide)
             +table-pair('{{::field.label}}', fieldMdl, 'name', 'className', 'Field name',
'Field class full name', false, true)
         .group-section(ng-switch-when='table-db-fields' ng-hide=fieldHide)
-            .col-sm-7.group
+            .col-sm-12.group
                 .group-legend
                     label(id='{{::field.id + "-add"}}') {{::field.label}}
                     +group-tip('field.tip')
@@ -379,7 +380,7 @@ mixin form-row-custom(lblClasses, fieldClasses, dataSource)
                                 td.col-sm-12
                                     +table-db-field-edit('new', '{{::field.focusId}}', '-1')
         .group-section(ng-switch-when='table-query-groups' ng-hide=fieldHide)
-            .col-sm-7.group
+            .col-sm-12.group
                 .group-legend
                     label {{::field.label}}
                     +group-tip('field.tip')
@@ -443,8 +444,11 @@ mixin groups(groups, dataSource)
                 i.tipLabel.fa.fa-question-circle.blank(ng-if='!group.tip')
         .panel-collapse(role='tabpanel' bs-collapse-target id='{{::group.id}}' number='{{::group.number}}')
             .panel-body
-                .settings-row(ng-repeat='field in group.fields')
-                    +form-row(dataSource)
+                .col-sm-6
+                    .settings-row(ng-repeat='field in group.fields')
+                        +form-row(dataSource)
+                .col-sm-6
+                    +preview
 
 mixin advanced-options-top
     .advanced-options
@@ -456,3 +460,6 @@ mixin advanced-options-bottom
     .advanced-options
         i.fa.fa-chevron-circle-up(ng-click='toggleExpanded()')
         a(ng-click='toggleExpanded()') {{ui.expanded ? 'Hide advanced settings...' : 'Show
advanced settings...'}}
+
+mixin preview
+    div(ui-ace='{onLoad: aceInit, mode: "xml"}' ng-model='preview')


Mime
View raw message