mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
enable helium only in the last result
This commit is contained in:
parent
66829081f9
commit
d09e03fcb9
6 changed files with 28 additions and 30 deletions
|
|
@ -89,27 +89,7 @@ public class ApplicationLoaderTest {
|
|||
paragraphId,
|
||||
appInstanceId,
|
||||
null,
|
||||
new InterpreterOutput(new InterpreterOutputListener() {
|
||||
@Override
|
||||
public void onUpdateAll(InterpreterOutput out) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClose(InterpreterOutput out) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAppend(int index, InterpreterResultMessageOutput out, byte[] line) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate(int index, InterpreterResultMessageOutput out) {
|
||||
|
||||
}
|
||||
}));
|
||||
new InterpreterOutput(null));
|
||||
return context1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -151,11 +151,6 @@ public class InterpreterOutputTest implements InterpreterOutputListener {
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClose(InterpreterOutput out) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAppend(int index, InterpreterResultMessageOutput out, byte[] line) {
|
||||
numAppendEvent++;
|
||||
|
|
|
|||
|
|
@ -162,6 +162,11 @@ public class RemoteInterpreterOutputTestStream implements RemoteInterpreterProce
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onOutputClear(String noteId, String paragraphId) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMetaInfosReceived(String settingId, Map<String, String> metaInfos) {
|
||||
|
||||
|
|
|
|||
|
|
@ -304,6 +304,11 @@ public class RemoteSchedulerTest implements RemoteInterpreterProcessListener {
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onOutputClear(String noteId, String paragraphId) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMetaInfosReceived(String settingId, Map<String, String> metaInfos) {
|
||||
|
||||
|
|
|
|||
|
|
@ -133,12 +133,15 @@
|
|||
}
|
||||
|
||||
if (!config.result) {
|
||||
config.result = [];
|
||||
config.result = {};
|
||||
}
|
||||
};
|
||||
|
||||
$scope.$on('updateParagraphOutput', function(event, data) {
|
||||
if ($scope.paragraph.id === data.paragraphId) {
|
||||
if (!$scope.paragraph.result) {
|
||||
$scope.paragraph.result = {};
|
||||
}
|
||||
if (!$scope.paragraph.result.msg) {
|
||||
$scope.paragraph.result.msg = [];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -133,6 +133,9 @@
|
|||
// available columns in tabledata
|
||||
$scope.tableDataColumns = [];
|
||||
|
||||
// enable helium
|
||||
var enableHelium = false;
|
||||
|
||||
// graphMode
|
||||
$scope.graphMode;
|
||||
|
||||
|
|
@ -221,6 +224,10 @@
|
|||
$scope.graphMode = config.graph.mode;
|
||||
$scope.config = angular.copy(config);
|
||||
|
||||
// enable only when it is last result
|
||||
enableHelium = (index === paragraphRef.result.msg.length - 1);
|
||||
console.log('enable helium %o %o %o', enableHelium, index, paragraphRef.result.msg.length);
|
||||
|
||||
if ($scope.type === 'TABLE') {
|
||||
var TableData = zeppelin.TableData;
|
||||
tableData = new TableData();
|
||||
|
|
@ -233,9 +240,12 @@
|
|||
};
|
||||
|
||||
var renderResult = function(type, refresh) {
|
||||
getSuggestions();
|
||||
getApplicationStates();
|
||||
var activeApp = _.get($scope.config, 'helium.activeApp');
|
||||
var activeApp;
|
||||
if (enableHelium) {
|
||||
getSuggestions();
|
||||
getApplicationStates();
|
||||
activeApp = _.get($scope.config, 'helium.activeApp');
|
||||
}
|
||||
|
||||
if (activeApp) {
|
||||
var app = _.find($scope.apps, {id: activeApp});
|
||||
|
|
|
|||
Loading…
Reference in a new issue