Commit 4a79e9d3 authored by ThorbenQuast's avatar ThorbenQuast
Browse files

editor: show start time for job execution, feature #1987

parent 539acfdb
......@@ -51,10 +51,11 @@ var CodeEditorOutput = Emitter.extend({
self.running = !!res.runningjob;
self.updateExeButtons();
});
// register events
this.view.onSocket("start", function(data) {
self.append(
self.getDate() + ": \n" +
"executing \"" + data.command + "\"\n" +
"--------------------\n" +
"OUTPUT:\n\n");
......@@ -96,6 +97,12 @@ var CodeEditorOutput = Emitter.extend({
return s;
},
getDate: function() {
var d = new Date();
return d.toLocaleString();
},
// execution
execute: function() {
var self = this;
......@@ -168,8 +175,8 @@ var CodeEditorOutput = Emitter.extend({
}
this.initialClear();
var textarray = text.split("\n");
var maxlines = this.view.getPreference("maxLines") < textarray.length ?
this.view.getPreference("maxLines") : textarray.length;
var maxlines = this.view.getPreference("maxLines") < textarray.length ?
this.view.getPreference("maxLines") : textarray.length;
var cleantext = textarray.slice(-maxlines).join("\n");
this.preNode.text(cleantext);
return this;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment