Merge branch 'master' into extends-zrun-remote-transaction

This commit is contained in:
CloverHearts 2016-11-28 12:31:04 +09:00
commit 113b475337
3 changed files with 27 additions and 11 deletions

View file

@ -68,7 +68,7 @@ matrix:
before_install:
- echo "MAVEN_OPTS='-Xms1024M -Xmx2048M -XX:MaxPermSize=1024m -XX:-UseGCOverheadLimit'" >> ~/.mavenrc
- "ls -la .spark-dist ${HOME}/.m2/repository/.cache/maven-download-plugin"
- ls -la .spark-dist ${HOME}/.m2/repository/.cache/maven-download-plugin || true
- ls .node_modules && cp -r .node_modules zeppelin-web/node_modules || echo "node_modules are not cached"
- mkdir -p ~/R
- echo 'R_LIBS=~/R' > ~/.Renviron

View file

@ -261,7 +261,7 @@
</goals>
<configuration>
<failOnViolation>true</failOnViolation>
<excludes>org/apache/zeppelin/interpreter/thrift/*</excludes>
<excludes>org/apache/zeppelin/interpreter/thrift/*,org/apache/zeppelin/scio/avro/*,org/apache/zeppelin/scio/avro/*</excludes>
</configuration>
</execution>
<execution>
@ -271,7 +271,7 @@
<goal>checkstyle-aggregate</goal>
</goals>
<configuration>
<excludes>org/apache/zeppelin/interpreter/thrift/*</excludes>
<excludes>org/apache/zeppelin/interpreter/thrift/*,org/apache/zeppelin/scio/avro/*,org/apache/zeppelin/scio/avro/*</excludes>
</configuration>
</execution>
</executions>

View file

@ -345,6 +345,12 @@
if (config.enabled === undefined) {
config.enabled = true;
}
if (!config.editorSetting) {
config.editorSetting = {};
} else if (config.editorSetting.editOnDblClick) {
editorSetting.isOutputHidden = config.editorSetting.editOnDblClick;
};
};
$scope.getIframeDimensions = function() {
@ -388,9 +394,15 @@
$scope.originalText = angular.copy(data);
$scope.dirtyText = undefined;
if (editorSetting.editOnDblClick) {
if ($scope.paragraph.config.editorSetting.editOnDblClick) {
closeEditorAndOpenTable();
} else if (editorSetting.isOutputHidden &&
!$scope.paragraph.config.editorSetting.editOnDblClick) {
// %md/%angular repl make output to be hidden by default after running
// so should open output if repl changed from %md/%angular to another
openEditorAndOpenTable();
}
editorSetting.isOutputHidden = $scope.paragraph.config.editorSetting.editOnDblClick;
};
$scope.saveParagraph = function() {
@ -513,11 +525,15 @@
manageEditorAndTableState(true, false);
};
var manageEditorAndTableState = function(showEditor, showTable) {
var openEditorAndOpenTable = function() {
manageEditorAndTableState(false, false);
};
var manageEditorAndTableState = function(hideEditor, hideTable) {
var newParams = angular.copy($scope.paragraph.settings.params);
var newConfig = angular.copy($scope.paragraph.config);
newConfig.editorHide = showEditor;
newConfig.tableHide = showTable;
newConfig.editorHide = hideEditor;
newConfig.tableHide = hideTable;
commitParagraph($scope.paragraph.title, $scope.paragraph.text, newConfig, newParams);
};
@ -828,7 +844,7 @@
// or the first 30 characters of the paragraph have been modified
// or cursor position is at beginning of second line.(in case user hit enter after typing %magic)
if ((typeof pos === 'undefined') || (pos.row === 0 && pos.column < 30) ||
(pos.row === 1 && pos.column === 0) || pastePercentSign || $scope.paragraphFocused) {
(pos.row === 1 && pos.column === 0) || pastePercentSign) {
// If paragraph loading, use config value if exists
if ((typeof pos === 'undefined') && $scope.paragraph.config.editorMode) {
session.setMode($scope.paragraph.config.editorMode);
@ -839,7 +855,7 @@
getEditorSetting(magic)
.then(function(setting) {
setEditorLanguage(session, setting.editor.language);
_.merge(editorSetting, setting.editor);
_.merge($scope.paragraph.config.editorSetting, setting.editor);
});
}
}
@ -848,7 +864,7 @@
};
var getInterpreterName = function(paragraphText) {
var intpNameRegexp = /%(.+?)\s/g;
var intpNameRegexp = /^\s*%(.+?)\s/g;
var match = intpNameRegexp.exec(paragraphText);
if (match) {
return match[1].trim();
@ -1872,7 +1888,7 @@
$scope.$on('doubleClickParagraph', function(event, paragraphId) {
if ($scope.paragraph.id === paragraphId && $scope.paragraph.config.editorHide &&
editorSetting.editOnDblClick) {
$scope.paragraph.config.editorSetting.editOnDblClick) {
var deferred = $q.defer();
openEditorAndCloseTable();
$timeout(