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 Preview
Date Tue, 01 Sep 2015 08:32:21 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843 25066d7d9 -> 09c1d4360


IGNITE-843: WIP Preview


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

Branch: refs/heads/ignite-843
Commit: 09c1d436056140a7a628930d78f5b22a5d9a40c8
Parents: 25066d7
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Tue Sep 1 15:32:51 2015 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Tue Sep 1 15:32:51 2015 +0700

----------------------------------------------------------------------
 .../main/js/controllers/clusters-controller.js  |  8 ++++++
 .../src/main/js/public/stylesheets/style.scss   | 26 ++++++--------------
 .../main/js/views/configuration/summary.jade    |  8 +-----
 .../src/main/js/views/includes/controls.jade    | 13 +++++-----
 4 files changed, 22 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/09c1d436/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 a568189..03aa3d2 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
@@ -44,6 +44,14 @@ controlCenterModule.controller('clustersController', ['$scope', '$controller',
'
 
         $scope.previewInit = $preview.previewInit;
 
+        $scope.aceChanged = function (editor) {
+            console.log('aceChanged');
+
+            var edt = editor[1];
+
+            edt.navigateFileStart();
+        };
+
         $scope.formChanged = $common.formChanged;
 
         $scope.hidePopover = $common.hidePopover;

http://git-wip-us.apache.org/repos/asf/ignite/blob/09c1d436/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 b85c2ee..91fb2da 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
@@ -25,7 +25,6 @@ $ignite-block-callout-right: #50af51;
 $ignite-block-callout-right-background: #f3f8f3;
 $ignite-block-callout-gradient-to: #ffffff;
 $ignite-placeholder-color: #999999;
-$ignite-preview-background: #e8f1fc;
 $ignite-border-color: #ddd;
 $ignite-border-bottom-color: $brand-primary;
 $ignite-background-color: #fff;
@@ -38,6 +37,10 @@ hr {
     margin: 20px 0;
 }
 
+a.active {
+    font-weight: bold;
+}
+
 .navbar-default .navbar-brand, .navbar-default .navbar-brand:hover {
     position: absolute;
     width: 100%;
@@ -477,10 +480,6 @@ table tr:hover {
         padding-left: 18px;
     }
 
-    .active a {
-        font-weight: bold;
-    }
-
     tfoot > tr > td {
         padding: 0;
 
@@ -488,7 +487,6 @@ table tr:hover {
             margin: 10px 0;
 
             > .active > a {
-                font-weight: bold;
                 border-color: $ignite-border-color;
                 background-color: $ignite-background-dark-color;
             }
@@ -576,7 +574,6 @@ table tr:hover {
             margin: 10px 0;
 
             > .active > a {
-                font-weight: bold;
                 border-color: $ignite-border-color;
                 background-color: $ignite-background-dark-color;
             }
@@ -639,7 +636,6 @@ table tr:hover {
             margin: 10px 0 0 0;
 
             > .active > a {
-                font-weight: bold;
                 border-color: $ignite-border-color;
                 background-color: $ignite-background-dark-color;
             }
@@ -1149,8 +1145,6 @@ a {
 }
 
 .preview-panel {
-    background-color: $ignite-preview-background;
-
     margin-top: 10px;
     margin-left: 20px;
 
@@ -1158,23 +1152,17 @@ a {
     border: thin dotted lightgrey;
 
     padding: 0 3px;
-
-    .ace_editor {
-        background-color: $ignite-preview-background;
-    }
 }
 
 .preview-legend {
     top: 0;
-    right: 0;
-    margin-right: 5px;
     overflow: visible;
     position: absolute;
     z-index: 900;
 
-    i {
-        cursor: pointer;
-        background-image: linear-gradient(white 45%, $ignite-preview-background 100%);
+    a {
+        background-color: white;
+        margin-left: 5px;
     }
 }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/09c1d436/modules/control-center-web/src/main/js/views/configuration/summary.jade
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/views/configuration/summary.jade b/modules/control-center-web/src/main/js/views/configuration/summary.jade
index 9990ba0..7dd5449 100644
--- a/modules/control-center-web/src/main/js/views/configuration/summary.jade
+++ b/modules/control-center-web/src/main/js/views/configuration/summary.jade
@@ -45,13 +45,7 @@ block content
             | No cluster configured. You can&nbsp;
             a(href='clusters') configure
             | &nbsp;it.
-        .padding-dflt(ng-if='clusters.length > 0')
-            lable.labelHeader Clusters:
-            table.links(st-table='clusters')
-                tbody
-                    tr(ng-repeat='row in clusters track by row._id')
-                        td(ng-class='{active: row._id == selectedItem._id}')
-                            a(ng-click='selectItem(row)') {{$index + 1}}) {{row.name}}
+        +main-table('Clusters:', 'clusters', 'clusterName', 'selectItem(row)', '{{$index
+ 1}}) {{row.name}}')
         div(ng-show='selectedItem' role='tab' method='post' action='summary/download')
             .padding-dflt(bs-collapse data-start-collapsed='false')
                 .panel.panel-default

http://git-wip-us.apache.org/repos/asf/ignite/blob/09c1d436/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 a4cef34..90b46a6 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
@@ -426,8 +426,8 @@ mixin main-table(title, rows, focusId, click, rowTemplate)
         table.links(st-table='displayedRows' st-safe-src='#{rows}')
             tbody
                 tr(ng-repeat='row in displayedRows track by row._id')
-                    td(ng-class='{active: row._id == selectedItem._id}')
-                        a(on-click-focus=focusId ng-click=click) #{rowTemplate}
+                    td
+                        a(ng-class='{active: row._id == selectedItem._id}' on-click-focus=focusId
ng-click=click) #{rowTemplate}
             tfoot
                 tr
                     td.text-right
@@ -464,11 +464,10 @@ mixin preview(preview, id)
 
     .preview-panel
         .preview-legend
-            i(ng-click='#{previewState} = !#{previewState}')
-                img(ng-if='#{previewState}' src='/images/xml.png' title='Show XML')
-                img(ng-if='!#{previewState}' src='/images/java.png' title='Show Java code')
-        .preview-content(ng-if='!preview[#{preview}].allDefaults && !#{previewState}'
id='#{id}' ui-ace='{onLoad: previewInit, mode: "xml"}' ng-model='preview[#{preview}].xml'
min-height='{{::group.minHeight}}')
-        .preview-content(ng-if='!preview[#{preview}].allDefaults && #{previewState}'
id='#{id}' ui-ace='{onLoad: previewInit, mode: "java"}' ng-model='preview[#{preview}].java'
min-height='{{::group.minHeight}}')
+            a(ng-class='{active: !#{previewState}}' ng-click='#{previewState} = false') XML&nbsp;
+            a(ng-class='{active: #{previewState}}' ng-click='#{previewState} = true') Java
+        .preview-content(ng-if='!preview[#{preview}].allDefaults && !#{previewState}'
id='#{id}' ui-ace='{onLoad: previewInit, onChange: aceChanged, mode: "xml"}' ng-model='preview[#{preview}].xml'
min-height='{{::group.minHeight}}')
+        .preview-content(ng-if='!preview[#{preview}].allDefaults && #{previewState}'
id='#{id}' ui-ace='{onLoad: previewInit, onChange: aceChanged, mode: "java"}' ng-model='preview[#{preview}].java'
min-height='{{::group.minHeight}}')
         .preview-content-empty(ng-if='preview[#{preview}].allDefaults' id='#{id}')
             label All Defaults
 


Mime
View raw message