summaryrefslogtreecommitdiffstats
path: root/qx08/source/class/tr
diff options
context:
space:
mode:
Diffstat (limited to 'qx08/source/class/tr')
-rw-r--r--qx08/source/class/tr/Application.js125
-rw-r--r--qx08/source/class/tr/Server.js55
-rw-r--r--qx08/source/class/tr/Theme.js11
-rw-r--r--qx08/source/class/tr/theme/Color.js14
-rw-r--r--qx08/source/class/tr/ui/Cellrenderer.js51
-rw-r--r--qx08/source/class/tr/ui/Config.js206
-rw-r--r--qx08/source/class/tr/ui/CopyBuffer.js45
-rw-r--r--qx08/source/class/tr/ui/Footer.js24
-rw-r--r--qx08/source/class/tr/ui/Link.js54
-rw-r--r--qx08/source/class/tr/ui/TraceTable.js314
10 files changed, 0 insertions, 899 deletions
diff --git a/qx08/source/class/tr/Application.js b/qx08/source/class/tr/Application.js
deleted file mode 100644
index 17044ad..0000000
--- a/qx08/source/class/tr/Application.js
+++ /dev/null
@@ -1,125 +0,0 @@
-/* ************************************************************************
- Copyright: 2008, OETIKER+PARTNER AG
- License: GPL
- Authors: Tobias Oetiker
- $Id: $
-* ************************************************************************ */
-
-/*
-#asset(tr/*)
-*/
-
-/**
- * This is the main application class of your custom application "qx08"
- */
-qx.Class.define("tr.Application", {
- extend : qx.application.Standalone,
-
- members : {
- /**
- * This method contains the initial application code and gets called
- * during startup of the application
- *
- * @type member
- * @return {void}
- */
- main : function() {
- // Call super class
- this.base(arguments);
-
- // Enable logging in debug variant
- if (qx.core.Variant.isSet("qx.debug", "on")) {
- qx.log.appender.Native;
- qx.log.appender.Console;
- }
-
- // if we run with a file:// url make sure
- // the app finds the Tr service (tr.cgi)
- tr.Server.getInstance().setLocalUrl('http://localhost/~oetiker/tr/');
-
- this.getRoot().add(new tr.ui.CopyBuffer(), {
- left : 0,
- top : 0
- });
-
- this.getRoot().add(new tr.ui.Error(), {
- left : 0,
- top : 0
- });
-
- this.getRoot().add(new tr.ui.Config(), {
- left : 0,
- top : 0
- });
-
- this.getRoot().add(new tr.ui.Link('SmokeTrace 2.4.2', 'http://oss.oetiker.ch/smokeping/', '#b0b0b0', '17px bold sans-serif'), {
- right : 7,
- top : 5
- });
-
- // Document is the application root
- var root = new qx.ui.container.Composite(new qx.ui.layout.VBox());
- root.setPadding(5);
-
- this.getRoot().add(root, {
- left : 0,
- top : 0,
- right : 0,
- bottom : 0
- });
-
- var tabs = new qx.ui.tabview.TabView();
- root.add(tabs, { flex : 1 });
-
- root.add(new tr.ui.Footer(this.tr("SmokeTrace is part of the of the SmokePing suite created by Tobi Oetiker, Copyright 2008."), 'http://oss.oetiker.ch/smokeping/'));
-
- tabs.add(new tr.ui.TraceTab());
- this.__handles = {};
- qx.event.message.Bus.subscribe('add_handle',this.__add_handle,this);
- },
-
- __handles: null,
- __handle_count: 0,
-
- __add_handle: function(m){
- var handle = m.getData();
- this.__handles[handle]=0;
- if (this.__handle_count == 0){
- this.__run_poller();
- }
- },
- __run_poller: function(){
- var that = this;
- tr.Server.getInstance().callAsync(
- function(ret,exc,id){that.__process_input(ret,exc,id);},'poll',this.__handles
- );
- },
- __process_input: function(ret,exc,id){
- if (exc == null) {
- for (var hand in ret){
- this.info('got '+hand);
- if (hand == 'handles'){
- this.__handles = ret[hand];
- }
- if (ret[hand]['data']){
- qx.event.message.Bus.dispatch(hand+'::data', ret[hand]['data']);
- }
- if (ret[hand]['type']){
- qx.event.message.Bus.dispatch(hand+'::status', {type : ret[hand]['type'],
- msg : ret[hand]['msg'] });
- }
- };
- }
- else {
- qx.event.message.Bus.dispatch('error', [ this.tr("Server Error"), '' + exc ]);
- }
- this.__handle_count = 0;
- for(var i in this.__handles){
- this.__handle_count ++;
- };
- if (this.__hanlde_count > 0){
- qx.event.Timer.once(this.__run_poller,this,this.__interval);
- }
- }
- }
-});
diff --git a/qx08/source/class/tr/Server.js b/qx08/source/class/tr/Server.js
deleted file mode 100644
index af9cbc4..0000000
--- a/qx08/source/class/tr/Server.js
+++ /dev/null
@@ -1,55 +0,0 @@
-/* ************************************************************************
- Copyright: 2008, OETIKER+PARTNER AG
- License: GPL
- Authors: Tobias Oetiker
- $Id: $
-* ************************************************************************ */
-
-/**
- * A Tr specific rpc call which works
- */
-qx.Class.define('tr.Server', {
- extend : qx.io.remote.Rpc,
- type : "singleton",
-
-
- /**
- * @param local_url {String} When running the application in file:// mode, where will we find our RPC server.
- */
- construct : function(local_url) {
- this.base(arguments);
-
- this.set({
- timeout : 60000,
- url : 'tr.cgi',
- serviceName : 'tr'
- });
- },
-
- members : {
- /**
- * Tell about the BaseUrl we found.
- *
- * @type member
- * @return {var} BaseUrl {Strings}
- */
- getBaseUrl : function() {
- return this.__base_url;
- },
-
-
- /**
- * TODOC
- *
- * @type member
- * @param local_url {var} TODOC
- * @return {void}
- */
- setLocalUrl : function(local_url) {
- if (document.location.host === '') {
- this.setCrossDomain(true);
- this.setUrl(local_url + 'tr.cgi');
- }
- }
- }
-}); \ No newline at end of file
diff --git a/qx08/source/class/tr/Theme.js b/qx08/source/class/tr/Theme.js
deleted file mode 100644
index 6008e3a..0000000
--- a/qx08/source/class/tr/Theme.js
+++ /dev/null
@@ -1,11 +0,0 @@
-qx.Theme.define("tr.Theme", {
- title : "Tr Light Colors",
-
- meta : {
- color : tr.theme.Color,
- decoration : qx.theme.modern.Decoration,
- font : qx.theme.modern.Font,
- icon : qx.theme.icon.Tango,
- appearance : qx.theme.modern.Appearance
- }
-}); \ No newline at end of file
diff --git a/qx08/source/class/tr/theme/Color.js b/qx08/source/class/tr/theme/Color.js
deleted file mode 100644
index 389e0dc..0000000
--- a/qx08/source/class/tr/theme/Color.js
+++ /dev/null
@@ -1,14 +0,0 @@
-qx.Theme.define("tr.theme.Color", {
- extend : qx.theme.modern.Color,
-
- colors : {
- // application, desktop, ...
- 'background-application' : '#f0f0f0',
-
- // pane color for windows, splitpanes, ...
- "background-pane" : '#f8f8f8',
-
- // textfields, ...
- 'background-light' : '#ffffff'
- }
-}); \ No newline at end of file
diff --git a/qx08/source/class/tr/ui/Cellrenderer.js b/qx08/source/class/tr/ui/Cellrenderer.js
deleted file mode 100644
index 79edf4d..0000000
--- a/qx08/source/class/tr/ui/Cellrenderer.js
+++ /dev/null
@@ -1,51 +0,0 @@
-/* ************************************************************************
-
- Tr Frontend
-
- Author:
- * Tobias Oetiker
-
-************************************************************************ */
-
-/* ************************************************************************
-#module(Tr)
-************************************************************************ */
-
-/**
- * A configurable cell renderre
- */
-qx.Class.define('tr.ui.Cellrenderer', {
- extend : qx.ui.table.cellrenderer.Number,
-
-
- /**
- * Format a number with a configurable number of fraction digits
- * and add optional pre and postfix.
- * @param digits {Integer} how many digits should there be. Default is 0.
- * @param prefix {String} optional prefix.
- * @param postfix {String} optional postfix.
- */
- construct : function(digits, postfix, prefix) {
- if (digits == undefined) {
- digits = 0;
- }
-
- this.base(arguments);
- var format = new qx.util.format.NumberFormat();
-
- format.set({
- maximumFractionDigits : digits,
- minimumFractionDigits : digits
- });
-
- if (postfix != undefined) {
- format.setPostfix(postfix);
- }
-
- if (prefix != undefined) {
- format.setPrefix(prefix);
- }
-
- this.setNumberFormat(format);
- }
-}); \ No newline at end of file
diff --git a/qx08/source/class/tr/ui/Config.js b/qx08/source/class/tr/ui/Config.js
deleted file mode 100644
index 3310bee..0000000
--- a/qx08/source/class/tr/ui/Config.js
+++ /dev/null
@@ -1,206 +0,0 @@
-/* ************************************************************************
-#module(Tr)
-#asset(qx/icon/${qx.icontheme}/22/actions/dialog-apply.png)
-#asset(qx/icon/${qx.icontheme}/22/actions/dialog-close.png)
-
-************************************************************************ */
-
-/**
- * show the config options for traceroute as defined by the server
- */
-qx.Class.define('tr.ui.Config', {
- extend : qx.ui.window.Window,
-
- construct : function() {
- this.base(arguments, this.tr("Traceroute Configuration"));
- var layout = new qx.ui.layout.Grid(3, 5);
- layout.setColumnAlign(0, 'right', 'middle');
- layout.setColumnAlign(1, 'left', 'middle');
- layout.setColumnWidth(0, 140);
- layout.setColumnWidth(1, 140);
-
- this.setLayout(layout);
-
- this.set({
- allowMaximize : false,
- allowMinimize : false,
- modal : true,
- resizable : false,
- showMaximize : false,
- showMinimize : false
- });
-
- var that = this;
-
- var create_config = function(retval, exc, id) {
- if (exc == null) {
- that.__create_config(retval);
- } else {
- qx.event.message.Bus.dispatch('error', [ that.tr("Server Error"), '' + exc ]);
- }
- };
-
- tr.Server.getInstance().callAsync(create_config, 'get_config');
-
- qx.event.message.Bus.subscribe('config', function(e) {
- this.__task = e.getData();
- this.__seed();
- this.center();
- this.open();
- },
- this);
- },
-
- members : {
- __task : null,
- __setters : null,
-
-
- /**
- * Load configuration values into dialog. If no values are provided,
- * the default values get loaded.
- *
- * @type member
- * @return {void}
- */
- __seed : function() {
- for (var key in this.__setters) {
- this.info(key+': '+this.__task[key])
- this.__setters[key](this.__task[key]);
- }
- },
-
-
- /**
- * TODOC
- *
- * @type member
- * @param data {var} TODOC
- * @return {void}
- */
- __create_config : function(data) {
- var entries = data.length;
- var status = {};
- var setters = {};
- this.__setters = setters;
-
- var r = 0;
- var that = this;
-
- for (var k=0; k<entries; k++) {
- (function() {
- for (var check in
- {
- 'default' : 0,
- 'label' : 0,
- 'type' : 0
- }) {
- if (data[k][check] == undefined) {
- that.debug('Skipping ' + data[k] + ' since there is no ' + check);
- // exit from function is like 'next'
- return;
- }
- }
-
- var def = data[k]['default'];
- var widget;
- var pick;
- var items;
- var c;
-
- that.add(new qx.ui.basic.Label(data[k]['label']).set({ marginRight : 5 }), {
- row : r,
- column : 0
- });
-
- switch(data[k]['type'])
- {
- case 'spinner':
- widget = new qx.ui.form.Spinner(data[k]['min'], def, data[k]['max']);
- status[data[k]['key']] = function() {
- return widget.getValue();
- };
-
- setters[data[k]['key']] = function(value) {
- widget.setValue(value == undefined ? def : value);
- };
-
- break;
-
- case 'select':
- widget = new qx.ui.form.SelectBox();
- status[data[k]['key']] = function() {
- return widget.getValue();
- };
-
- setters[data[k]['key']] = function(value) {
- widget.setValue(value == undefined ? def : value);
- };
-
- pick = data[k]['pick'];
- items = pick.length;
-
- for (c=0; c<items; c+=2) {
- widget.add(new qx.ui.form.ListItem(pick[c + 1], null, pick[c]));
- }
-
- break;
-
- case 'boolean':
- widget = new qx.ui.form.CheckBox();
- status[data[k]['key']] = function() {
- return widget.getChecked();
- };
-
- setters[data[k]['key']] = function(value) {
- widget.setChecked(value == undefined ? def > 0 : value > 0);
- };
-
- break;
- }
-
- that.add(widget, {
- row : r,
- column : 1
- });
-
- r++;
- })();
- }
-
- var ok = new qx.ui.form.Button(this.tr("Apply")).set({
- marginTop : 10,
- marginLeft : 40
- });
-
- ok.addListener('execute', function(e) {
- for (var key in status) {
- that.__task[key] = status[key]();
- }
-
- that.close();
- });
-
- this.add(ok, {
- row : r,
- column : 0
- });
-
- var cancel = new qx.ui.form.Button(this.tr("Reset")).set({
- marginTop : 10,
- marginRight : 30
- });
-
- cancel.addListener('execute', function(e) {
- for (var key in setters) {
- setters[key]();
- }
- });
-
- this.add(cancel, {
- row : r,
- column : 1
- });
- }
- }
-});
diff --git a/qx08/source/class/tr/ui/CopyBuffer.js b/qx08/source/class/tr/ui/CopyBuffer.js
deleted file mode 100644
index a48fee2..0000000
--- a/qx08/source/class/tr/ui/CopyBuffer.js
+++ /dev/null
@@ -1,45 +0,0 @@
-/* ************************************************************************
- Copyright: 2008, OETIKER+PARTNER AG
- License: GPL
- Authors: Tobias Oetiker
- $Id: $
-* ************************************************************************ */
-
-/**
- * Place an instance of this widget into the application root. It will remain
- * invisible. I will listen on the 'copy' bus for data to get ready for copying with
- * [ctrl]+[c]
- */
-qx.Class.define('tr.ui.CopyBuffer', {
- extend : qx.ui.form.TextArea,
-
- construct : function() {
- this.base(arguments);
-
- this.set({
- width : 0,
- height : 0,
- allowGrowX : false,
- allowGrowY : false,
- decorator : null
- });
-
- qx.event.message.Bus.subscribe('copy', this.__copy, this);
- },
-
- members : {
- /**
- * TODOC
- *
- * @type member
- * @param m {var} TODOC
- * @return {void}
- */
- __copy : function(m) {
- var data = m.getData();
- this.info('set: ' + data);
- this.setValue(data);
- this.selectAll();
- }
- }
-}); \ No newline at end of file
diff --git a/qx08/source/class/tr/ui/Footer.js b/qx08/source/class/tr/ui/Footer.js
deleted file mode 100644
index 4e2a2d2..0000000
--- a/qx08/source/class/tr/ui/Footer.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/* ************************************************************************
-#module(Tr)
-************************************************************************ */
-
-/**
- * a widget showing the footer
- */
-qx.Class.define('tr.ui.Footer', {
- extend : qx.ui.container.Composite,
-
-
-
-
- /*
- *****************************************************************************
- CONSTRUCTOR
- *****************************************************************************
- */
-
- construct : function(text, url) {
- this.base(arguments, new qx.ui.layout.HBox().set({ alignX : 'right' }));
- this.add(new tr.ui.Link(text, url, '#888', '10px sans-serif'));
- }
-}); \ No newline at end of file
diff --git a/qx08/source/class/tr/ui/Link.js b/qx08/source/class/tr/ui/Link.js
deleted file mode 100644
index d7bd28b..0000000
--- a/qx08/source/class/tr/ui/Link.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/* ************************************************************************
-#module(Tr)
-************************************************************************ */
-
-/**
- * A label with the ability to link out. Based on Label.
- */
-qx.Class.define('tr.ui.Link', {
- extend : qx.ui.basic.Label,
-
-
-
-
- /*
- *****************************************************************************
- CONSTRUCTOR
- *****************************************************************************
- */
-
- /**
- * @param text {String} Initial label
- * @param url {String} Where to link to
- * @param color {String} Hex Color for the text
- * @param font {String} Font from string representation
- */
- construct : function(text, url, color, font) {
- this.base(arguments, text);
-
- if (color) {
- this.setTextColor(color);
- }
-
- if (font) {
- this.setFont(qx.bom.Font.fromString(font));
- }
-
- this.set({
- cursor : 'pointer',
- opacity : 0.9
- });
-
- this.addListener('click', function(e) {
- window.open(url, '__new');
- });
-
- this.addListener('mouseover', function(e) {
- this.setOpacity(1);
- }, this);
-
- this.addListener('mouseout', function(e) {
- this.setOpacity(0.7);
- }, this);
- }
-}); \ No newline at end of file
diff --git a/qx08/source/class/tr/ui/TraceTable.js b/qx08/source/class/tr/ui/TraceTable.js
deleted file mode 100644
index 42ed8cc..0000000
--- a/qx08/source/class/tr/ui/TraceTable.js
+++ /dev/null
@@ -1,314 +0,0 @@
-/* ************************************************************************
- Copyright: 2008, OETIKER+PARTNER AG
- License: GPL
- Authors: Tobias Oetiker
- $Id: $
-* ************************************************************************ */
-
-/**
- * a widget showing the Tr target tree
- */
-qx.Class.define('tr.ui.TraceTable', {
- extend : qx.ui.table.Table,
-
- construct : function() {
- var tableModel = new qx.ui.table.model.Simple();
- this.__tableModel = tableModel;
-
- tableModel.setColumns([ this.tr("Hop"), this.tr("Host"), this.tr("Ip"), this.tr("Loss [%]"), this.tr("Sent"), this.tr("Last [ms]"), this.tr("Avg [ms]"), this.tr("Best [ms]"), this.tr("Worst [ms]"), this.tr("StDev [ms]") ]);
-
- var custom = {
- tableColumnModel : function(obj) {
- return new qx.ui.table.columnmodel.Resize(obj);
- }
- };
-
- this.base(arguments, tableModel, custom);
-
- this.set({
- decorator : 'main',
- showCellFocusIndicator : false,
- statusBarVisible : false
- });
-
- var tcm = this.getTableColumnModel();
- this.__tcm = tcm;
-
- tcm.setDataCellRenderer(0, new tr.ui.Cellrenderer(1));
- tcm.setDataCellRenderer(3, new tr.ui.Cellrenderer(0, ' %'));
- tcm.setDataCellRenderer(4, new tr.ui.Cellrenderer(0));
-
- var render_ms = new tr.ui.Cellrenderer(1);
-
- for (var i=5; i<10; i++) {
- tcm.setDataCellRenderer(i, render_ms);
- }
-
- // Obtain the behavior object to manipulate
- var resizeBehavior = tcm.getBehavior();
-
- // This uses the set() method to set all attriutes at once; uses flex
- resizeBehavior.set(0, { width : '2*' });
- resizeBehavior.set(1, { width : '9*' });
- resizeBehavior.set(2, { width : '5*' });
-
- for (var i=3; i<10; i++) {
- resizeBehavior.set(i, { width : '3*' });
- }
-
- },
-
- members : {
- __handle : null,
- __data : null,
- __delay : null,
- __tableModel : null,
- __tcm : null,
-
-
- /**
- * TODOC
- *
- * @type member
- * @return {var} TODOC
- */
- __make_empty_row : function() {
- return ([ undefined, undefined, undefined, 0, 0, undefined, undefined, undefined, undefined, undefined, 0, 0, 0 ]);
- },
-
-
- /**
- * TODOC
- *
- * @type member
- * @return {void}
- */
- __stop_table : function() {
- var tableModel = this.__tableModel;
-
- for (var i=0; i<10; i++) {
- tableModel.setColumnSortable(i, true);
- }
-
- qx.event.message.Bus.dispatch('tr.status', 'stopped');
- this.__handle = undefined;
- },
-
-
- /**
- * TODOC
- *
- * @type member
- * @param retval {var} TODOC
- * @param exc {Exception} TODOC
- * @param id {var} TODOC
- * @return {void}
- */
- __fill_table : function(retval, exc, id) {
- var f_host = 1;
- var f_ip = 2;
- var f_loss = 3;
- var f_snt = 4;
- var f_last = 5;
- var f_avg = 6;
- var f_best = 7;
- var f_worst = 8;
- var f_stdev = 9;
- var f_cnt = 10;
- var f_sum = 11;
- var f_sqsum = 12;
- var that = this;
-
- if (exc == null) {
- if (this.__handle == undefined) {
- qx.event.message.Bus.dispatch('tr.status', 'started');
- }
-
- this.__handle = retval['handle'];
- var tableModel = this.__tableModel;
- var lines = retval['output'].length;
- var data = this.__data;
- var sleep = 0;
-
- for (var i=0; i<lines; i++) {
- sleep = 0;
- var hop = retval['output'][i][0];
-
- if (hop == 'SLEEP') {
- sleep = retval['output'][i][1];
- continue;
- }
- else if (hop == 'INFO') {
- qx.event.message.Bus.dispatch('tr.info', retval['output'][i][1]);
- continue;
- }
-
- var host = retval['output'][i][1];
- var ip = retval['output'][i][2];
- var value = retval['output'][i][3];
- var ii = 0;
- var max = data.length;
-
- while (true) {
- if (ii == max) {
- break;
- }
-
- if (Math.floor(data[ii][0]) > hop) {
- break;
- }
-
- if (Math.floor(data[ii][0]) == hop) {
- if (ip == undefined) {
- break;
- }
-
- if (ip == data[ii][2]) {
- break;
- }
- }
-
- ii++;
- }
-
- if (ii == max || Math.floor(data[ii][0]) > hop) {
- if (ii > 0 && Math.floor(data[ii - 1][0]) == hop) {
- hop = data[ii - 1][0] + 0.1;
- }
-
- data.splice(ii, 0, this.__make_empty_row());
- data[ii][0] = hop;
- }
-
- var drow = data[ii];
-
- if (drow[f_host] == undefined && host != undefined) {
- drow[f_host] = host;
- }
-
- if (drow[f_ip] == undefined && ip != undefined) {
- drow[f_ip] = ip;
- }
-
- drow[f_snt]++;
- drow[f_last] = value;
-
- if (value != undefined) {
- var best = drow[f_best];
-
- if (best == undefined || best > value) {
- drow[f_best] = value;
- }
-
- var worst = drow[f_worst];
-
- if (worst == undefined || worst < value) {
- drow[f_worst] = value;
- }
-
- drow[f_sum] += value;
- var sum = drow[f_sum];
- drow[f_cnt]++;
- var cnt = drow[f_cnt];
- var sqsum = drow[f_sqsum] + value * value;
- drow[f_sqsum] = sqsum;
- drow[f_avg] = drow[f_sum] / drow[f_cnt];
- drow[f_stdev] = Math.sqrt((cnt * sqsum - sum * sum) / (cnt * (cnt - 1)));
- }
-
- drow[f_loss] = ((drow[f_snt] - drow[f_cnt]) / drow[f_snt]) * 100;
- }
-
- tableModel.setData(data);
-
- if (retval['again']) {
- var next_round = function() {
- tr.Server.getInstance().callAsync(function(ret, exc, id) {
- that.__fill_table(ret, exc, id);
- }, 'run_tr', {
- handle : retval['handle'],
- point : retval['point']
- });
- };
-
- qx.event.Timer.once(next_round, this, sleep * 1000);
- }
- else {
- this.__stop_table();
- }
- }
- else {
- this.__stop_table();
- }
- },
-
-
- /**
- * TODOC
- *
- * @type member
- * @param data {var} TODOC
- * @param exc {Exception} TODOC
- * @param id {var} TODOC
- * @return {void}
- */
- __stop_handler : function(data, exc, id) {
- if (exc == null) {
- qx.event.message.Bus.dispatch('tr.status', 'stopped');
- } else {
- this.error(exc);
- }
- },
-
- subscribe: function(handle){
- qx.event.message.Bus.subscribe(handle+'::data', this.__handle_tr, this);
- },
-
-
- /**
- * TODOC
- *
- * @type member
- * @param m {var} TODOC
- * @return {void}
- */
- __handle_tr : function(m) {
- var that = this;
- var cmd = m.getData();
-
- switch(cmd['action'])
- {
- case 'stop':
- qx.event.message.Bus.dispatch('tr.status', 'stopping');
- tr.Server.getInstance().callAsync(function(ret, exc, id) {
- that.__stop_handler(ret, exc, id);
- }, 'stop_tr', this.__handle);
-
- break;
-
- case 'go':
- this.__data = [];
- this.__tableModel.setData(this.__data);
- this.__delay = cmd['delay'];
-
- for (var i=0; i<10; i++) {
- this.__tableModel.setColumnSortable(i, false);
- }
-
- qx.event.message.Bus.dispatch('tr.status', 'starting');
- tr.Server.getInstance().callAsync(function(ret, exc, id) {
- that.__fill_table(ret, exc, id);
- }, 'run_tr', {
- host : cmd['host'],
- rounds : cmd['rounds'],
- delay : cmd['delay']
- });
-
- break;
-
- default:
- this.error('Unknown Command ' + cmd['action']);
- }
- }
- }
-});