AMBARI-19667. Hive View 2.0: Editor should be stretchable by dragging (Abhishek Kumar via pallavkul)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0de31d6a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0de31d6a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0de31d6a Branch: refs/heads/branch-dev-patch-upgrade Commit: 0de31d6a59c2ec847fc060dffb9e69431eee4ebc Parents: 72e02ab Author: pallavkul <pallav....@gmail.com> Authored: Wed Jan 25 09:14:58 2017 +0530 Committer: pallavkul <pallav....@gmail.com> Committed: Wed Jan 25 09:14:58 2017 +0530 ---------------------------------------------------------------------- .../src/main/resources/ui/app/components/query-editor.js | 8 ++++++++ .../views/hive20/src/main/resources/ui/app/styles/app.scss | 9 +++++++++ contrib/views/hive20/src/main/resources/ui/bower.json | 1 + contrib/views/hive20/src/main/resources/ui/package.json | 1 + 4 files changed, 19 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/0de31d6a/contrib/views/hive20/src/main/resources/ui/app/components/query-editor.js ---------------------------------------------------------------------- diff --git a/contrib/views/hive20/src/main/resources/ui/app/components/query-editor.js b/contrib/views/hive20/src/main/resources/ui/app/components/query-editor.js index 27d43d5..7bfe223 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/components/query-editor.js +++ b/contrib/views/hive20/src/main/resources/ui/app/components/query-editor.js @@ -74,6 +74,14 @@ export default Ember.Component.extend({ }); }); + this.$('.CodeMirror').resizable({ + handles: 's', + + resize: function () { + Ember.run.debounce(this, updateSize, 150); + } + }).find('.ui-resizable-s').addClass('grip fa fa-reorder'); + }.on('didInsertElement'), http://git-wip-us.apache.org/repos/asf/ambari/blob/0de31d6a/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss ---------------------------------------------------------------------- diff --git a/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss b/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss index 5ae65d1..7ab6992 100644 --- a/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss +++ b/contrib/views/hive20/src/main/resources/ui/app/styles/app.scss @@ -221,6 +221,15 @@ pre { overflow-y: scroll; } +.grip { + height: 20px; + border: 0 1px 1px solid #ddd; + background-color: #f5f5f5; + color: #bbb; + text-align: center; + font-size: inherit; +} + .hv-dropdown { position: absolute; .dropdown-menu { http://git-wip-us.apache.org/repos/asf/ambari/blob/0de31d6a/contrib/views/hive20/src/main/resources/ui/bower.json ---------------------------------------------------------------------- diff --git a/contrib/views/hive20/src/main/resources/ui/bower.json b/contrib/views/hive20/src/main/resources/ui/bower.json index 4eadee7..fcd11cf 100644 --- a/contrib/views/hive20/src/main/resources/ui/bower.json +++ b/contrib/views/hive20/src/main/resources/ui/bower.json @@ -6,6 +6,7 @@ "ember-qunit-notifications": "0.1.0", "font-awesome": "~4.5.0", "codemirror": "~5.15.0", + "jquery-ui": "~1.12.1", "bootstrap-treeview": "~1.2.0" } } http://git-wip-us.apache.org/repos/asf/ambari/blob/0de31d6a/contrib/views/hive20/src/main/resources/ui/package.json ---------------------------------------------------------------------- diff --git a/contrib/views/hive20/src/main/resources/ui/package.json b/contrib/views/hive20/src/main/resources/ui/package.json index ed7a299..d04a092 100644 --- a/contrib/views/hive20/src/main/resources/ui/package.json +++ b/contrib/views/hive20/src/main/resources/ui/package.json @@ -34,6 +34,7 @@ "ember-cli-htmlbars": "^1.0.3", "ember-cli-htmlbars-inline-precompile": "^0.3.1", "ember-cli-inject-live-reload": "^1.4.0", + "ember-cli-jquery-ui": "0.0.20", "ember-cli-jshint": "^1.0.0", "ember-cli-moment-shim": "3.0.1", "ember-cli-qunit": "^2.0.0",