[yt-svn] commit/yt: MatthewTurk: * Removing console.log calls
Bitbucket
commits-noreply at bitbucket.org
Thu Jun 28 04:15:29 PDT 2012
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/changeset/599374626857/
changeset: 599374626857
branch: yt
user: MatthewTurk
date: 2012-06-28 13:15:16
summary: * Removing console.log calls
* Adding a requests grid view
* Fixing long-standing issue of payloads not being delivered to the image plots
immediately
affected #: 6 files
diff -r d7a50cabd927973502663659d0a99920026a9da6 -r 599374626857956f95ba591d17875dd439a9094d yt/gui/reason/html/app/controller/Debugger.js
--- a/yt/gui/reason/html/app/controller/Debugger.js
+++ b/yt/gui/reason/html/app/controller/Debugger.js
@@ -31,7 +31,7 @@
Ext.define('Reason.controller.Debugger', {
extend: 'Ext.app.Controller',
- stores: ['WidgetTypes', 'WidgetInstances'],
+ stores: ['WidgetTypes', 'WidgetInstances', 'Requests'],
getWidget: function(widgetId) {
this.getWidgetInstancesStore().find(
diff -r d7a50cabd927973502663659d0a99920026a9da6 -r 599374626857956f95ba591d17875dd439a9094d yt/gui/reason/html/app/controller/Notebook.js
--- a/yt/gui/reason/html/app/controller/Notebook.js
+++ b/yt/gui/reason/html/app/controller/Notebook.js
@@ -73,7 +73,6 @@
},
addRequest: function(request_id, command) {
- console.log("Adding request " + request_id);
this.getRequestsStore().add({
request_id: request_id, command: command,
});
@@ -83,7 +82,6 @@
this.application.fireEvent("wipeinput");
this.application.fireEvent("allowinput");
if (cell['result_id'] != null) {
- console.log("Turning off result_id " + cell['result_id']);
var ind = this.getRequestsStore().find(
'request_id', cell['result_id']);
if (ind != -1) {
@@ -104,20 +102,17 @@
},
loadScript: function(payload) {
- console.log("Loading script ...");
this.getInputLine().setValue(payload['value']);
this.getInputLine()._lock = true;
},
executeCell: function(line) {
this.application.fireEvent("blockinput");
- console.log("Asked to execute " + line);
reason.server.execute(line, false);
},
scrollToBottom: function() {
var i = this.getCellValuesStore().getCount();
- console.log("Scrolling to bottom: " + i);
this.getCellDisplay().getView().focusRow(i-1);
},
diff -r d7a50cabd927973502663659d0a99920026a9da6 -r 599374626857956f95ba591d17875dd439a9094d yt/gui/reason/html/app/controller/ServerCommunication.js
--- a/yt/gui/reason/html/app/controller/ServerCommunication.js
+++ b/yt/gui/reason/html/app/controller/ServerCommunication.js
@@ -35,7 +35,7 @@
extend: 'Ext.app.Controller',
stores: ['Payloads'],
views: ['PayloadGrid'],
- requires: ['Reason.view.MulticastSetup'],
+ requires: ['Reason.view.MulticastSetup', 'Reason.view.RequestsGrid'],
init: function() {
this.application.addListener({
@@ -70,7 +70,6 @@
heartbeatCall: function() {
if (heartbeatRequest == true) return;
heartbeatRequest = true;
- /*console.log("Sending heartbeat");*/
yt_rpc.ExtDirectREPL.heartbeat(
{}, function(f, a) {
heartbeatRequest = false;
@@ -96,6 +95,9 @@
this.payloadGrid = Ext.widget("payloadgrid");
Ext.ComponentQuery.query("viewport > #center-panel")[0].add(
this.payloadGrid);
+ this.requestsGrid = Ext.widget('requestsgrid');
+ Ext.ComponentQuery.query("viewport > #center-panel")[0].add(
+ this.requestsGrid);
},
execute: function(code, hide, callback) {
@@ -106,7 +108,6 @@
reason.fireEvent("disableinput");
result_id = reason.numberOfRequests + 1;
reason.numberOfRequests += 1;
- console.log("Number of requests: " + reason.numberOfRequests);
reason.getController("Notebook").addRequest(result_id, code);
yt_rpc.ExtDirectREPL.execute({
code: code,
diff -r d7a50cabd927973502663659d0a99920026a9da6 -r 599374626857956f95ba591d17875dd439a9094d yt/gui/reason/html/app/controller/widgets/BaseWidget.js
--- a/yt/gui/reason/html/app/controller/widgets/BaseWidget.js
+++ b/yt/gui/reason/html/app/controller/widgets/BaseWidget.js
@@ -49,7 +49,6 @@
var args = {};
var control = this;
function ev() {
- console.log("Inside ... " + templateName);
var myArgs = arguments;
Ext.each(arguments, function(v, i) {
args["a" + i] = myArgs[i];
@@ -70,11 +69,9 @@
ww.query(id)[0].on(conf);
};
Ext.each(this.executionTriggers, function(trigger) {
- /*console.log(trigger[0] + " " + trigger[1] + " " + trigger[2], trigger[3]);*/
ef.call(this, trigger[0], trigger[1], trigger[2], trigger[3]);
}, this);
Ext.each(this.widgetTriggers, function(trigger) {
- console.log(trigger[0], trigger[1], trigger[2]);
conf = {scope:this}
conf[trigger[1]] = this[trigger[2]];
ww.query(trigger[0])[0].on(conf);
@@ -91,12 +88,10 @@
},
activateKeyMap: function() {
- console.log("Activating key map.");
this.keyMap.enable();
},
deactivateKeyMap: function() {
- console.log("Deactivating key map.");
this.keyMap.disable();
},
diff -r d7a50cabd927973502663659d0a99920026a9da6 -r 599374626857956f95ba591d17875dd439a9094d yt/gui/reason/html/app/controller/widgets/PlotWindow.js
--- a/yt/gui/reason/html/app/controller/widgets/PlotWindow.js
+++ b/yt/gui/reason/html/app/controller/widgets/PlotWindow.js
@@ -131,6 +131,10 @@
],
applyPayload: function(payload) {
+ if(this.getImage().getEl() == null) { /* Not yet rendered */
+ this.pendingPayloads.push(payload);
+ return;
+ }
this.getImage().getEl().dom.src =
"data:image/png;base64," + payload['image_data'];
this.getZoomSlider().setValue(0, payload['zoom'], true);
@@ -161,6 +165,7 @@
createView: function() {
var wd = this.payload['data'];
+ this.pendingPayloads = [];
this.plotWindowView = Ext.widget("plotwindow",{
varname : this.payload['varname'],
title: wd['title'],
@@ -306,5 +311,6 @@
args, "recenterImage");
reason.server.execute(code, true);
});
+ Ext.each(this.pendingPayloads, this.applyPayload, this);
},
});
diff -r d7a50cabd927973502663659d0a99920026a9da6 -r 599374626857956f95ba591d17875dd439a9094d yt/gui/reason/html/app/view/RequestsGrid.js
--- /dev/null
+++ b/yt/gui/reason/html/app/view/RequestsGrid.js
@@ -0,0 +1,40 @@
+/**********************************************************************
+Requests Grid for Reason
+
+Author: Cameron Hummels <chummels at gmail.com>
+Affiliation: Columbia
+Author: Jeffrey S. Oishi <jsoishi at gmail.com>
+Affiliation: KIPAC/SLAC/Stanford
+Author: Britton Smith <brittonsmith at gmail.com>
+Affiliation: MSU
+Author: Matthew Turk <matthewturk at gmail.com>
+Affiliation: Columbia University
+Homepage: http://yt-project.org/
+License:
+ Copyright (C) 2011 Matthew Turk. All Rights Reserved.
+
+ This file is part of yt.
+
+ yt is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+***********************************************************************/
+
+Ext.define('Reason.view.RequestsGrid', {
+ extend: 'Ext.grid.Panel',
+ alias: 'widget.requestsgrid',
+ title: 'Pending Requests',
+ store: 'Requests',
+ columns: [ {header: 'Request ID', dataIndex:'result_id', width:80},
+ {header: 'Command', dataIndex: 'command', flex: 1.0},
+ ],
+});
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the yt-svn
mailing list