maglev-webtools 0.2.1 → 1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +38 -29
- data/bin/webtools +22 -1
- data/lib/web_tools/code_browser.rb +156 -0
- data/lib/web_tools/debugger.rb +96 -199
- data/lib/web_tools/info.rb +1 -3
- data/lib/web_tools/method_list.rb +67 -0
- data/lib/web_tools/middleware/debugger.rb +10 -16
- data/lib/web_tools/object_log.rb +24 -0
- data/lib/web_tools/session_list.rb +119 -0
- data/lib/web_tools/shared_page_cache.rb +30 -0
- data/lib/web_tools/stat_process.rb +24 -0
- data/lib/web_tools/statistics.rb +14 -0
- data/lib/web_tools/support/app_model.rb +66 -101
- data/lib/web_tools/support/code_browser.rb +88 -86
- data/lib/web_tools/support/debugger.rb +303 -0
- data/lib/web_tools/support/error_log.rb +33 -0
- data/lib/web_tools/support/ruby.rb +60 -121
- data/lib/web_tools/support/service_helper.rb +38 -10
- data/lib/web_tools/support/smalltalk_extensions.rb +12 -0
- data/lib/web_tools/tool.rb +48 -0
- data/lib/web_tools/ui.rb +14 -53
- data/lib/web_tools/version_report.rb +29 -0
- data/lib/web_tools/workspace.rb +77 -0
- data/lib/web_tools.rb +14 -4
- data/public/CodeBrowser.html +51 -0
- data/public/CodeMirror/LICENSE +19 -0
- data/public/CodeMirror/css/codemirror.css +67 -0
- data/public/CodeMirror/css/default.css +18 -0
- data/public/CodeMirror/js/codemirror.js +2131 -0
- data/public/CodeMirror/js/ruby.js +195 -0
- data/public/CodeMirror/js/smalltalk.js +139 -0
- data/public/Debugger.html +28 -0
- data/public/MethodList.html +20 -0
- data/public/ObjectLog.html +20 -0
- data/public/SessionList.html +31 -0
- data/public/SharedPageCache.html +78 -0
- data/public/Statistics.html +64 -0
- data/public/VersionReport.html +50 -0
- data/public/Workspace.html +39 -0
- data/public/css/CodeBrowser.css +24 -0
- data/public/css/Debugger.css +32 -0
- data/public/css/MethodList.css +8 -0
- data/public/css/ObjectLog.css +5 -0
- data/public/css/SessionList.css +9 -0
- data/public/css/Statistics.css +24 -0
- data/public/{stylesheets → css}/base/images/ui-anim_basic_16x16.gif +0 -0
- data/public/{stylesheets → css}/base/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/public/{stylesheets → css}/base/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/public/{stylesheets → css}/base/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/public/{stylesheets → css}/base/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/public/{stylesheets → css}/base/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/public/{stylesheets → css}/base/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/public/{stylesheets → css}/base/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/public/{stylesheets → css}/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/public/{stylesheets → css}/base/images/ui-icons_222222_256x240.png +0 -0
- data/public/{stylesheets → css}/base/images/ui-icons_2e83ff_256x240.png +0 -0
- data/public/{stylesheets → css}/base/images/ui-icons_454545_256x240.png +0 -0
- data/public/{stylesheets → css}/base/images/ui-icons_888888_256x240.png +0 -0
- data/public/{stylesheets → css}/base/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.accordion.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.all.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.autocomplete.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.base.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.button.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.core.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.datepicker.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.dialog.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.progressbar.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.resizable.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.selectable.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.slider.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.tabs.css +0 -0
- data/public/{stylesheets → css}/base/jquery.ui.theme.css +0 -0
- data/public/css/editor.css +25 -0
- data/public/css/jjmenu.css +33 -0
- data/public/css/menuitem.gif +0 -0
- data/public/css/more.gif +0 -0
- data/public/{stylesheets → css}/reset.css +1 -1
- data/public/css/smoothness/images/ui-anim_basic_16x16.gif +0 -0
- data/public/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/public/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/public/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/public/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/public/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/public/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/public/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/public/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/public/css/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/public/css/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/public/css/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/public/css/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/public/css/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/public/css/smoothness/jquery-ui.css +489 -0
- data/public/css/ui-lightness/images/ui-anim_basic_16x16.gif +0 -0
- data/public/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- data/public/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- data/public/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
- data/public/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- data/public/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/public/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/public/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- data/public/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- data/public/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- data/public/css/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
- data/public/css/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
- data/public/css/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
- data/public/css/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
- data/public/css/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
- data/public/css/ui-lightness/jquery-ui.css +489 -0
- data/public/css/webtools.css +65 -0
- data/public/favicon.ico +0 -0
- data/public/flot/API.txt +1201 -0
- data/public/flot/FAQ.txt +76 -0
- data/public/flot/LICENSE.txt +22 -0
- data/public/flot/Makefile +9 -0
- data/public/flot/NEWS.txt +508 -0
- data/public/flot/PLUGINS.txt +137 -0
- data/public/flot/README.txt +90 -0
- data/public/flot/examples/ajax.html +143 -0
- data/public/flot/examples/annotating.html +75 -0
- data/public/flot/examples/arrow-down.gif +0 -0
- data/public/flot/examples/arrow-left.gif +0 -0
- data/public/flot/examples/arrow-right.gif +0 -0
- data/public/flot/examples/arrow-up.gif +0 -0
- data/public/flot/examples/basic.html +38 -0
- data/public/flot/examples/data-eu-gdp-growth-1.json +4 -0
- data/public/flot/examples/data-eu-gdp-growth-2.json +4 -0
- data/public/flot/examples/data-eu-gdp-growth-3.json +4 -0
- data/public/flot/examples/data-eu-gdp-growth-4.json +4 -0
- data/public/flot/examples/data-eu-gdp-growth-5.json +4 -0
- data/public/flot/examples/data-eu-gdp-growth.json +4 -0
- data/public/flot/examples/data-japan-gdp-growth.json +4 -0
- data/public/flot/examples/data-usa-gdp-growth.json +4 -0
- data/public/flot/examples/graph-types.html +75 -0
- data/public/flot/examples/hs-2004-27-a-large_web.jpg +0 -0
- data/public/flot/examples/image.html +45 -0
- data/public/flot/examples/index.html +44 -0
- data/public/flot/examples/interacting-axes.html +97 -0
- data/public/flot/examples/interacting.html +93 -0
- data/public/flot/examples/layout.css +6 -0
- data/public/flot/examples/multiple-axes.html +60 -0
- data/public/flot/examples/navigate.html +118 -0
- data/public/flot/examples/percentiles.html +57 -0
- data/public/flot/examples/pie.html +756 -0
- data/public/flot/examples/realtime.html +83 -0
- data/public/flot/examples/resize.html +61 -0
- data/public/flot/examples/selection.html +114 -0
- data/public/flot/examples/setting-options.html +61 -0
- data/public/flot/examples/stacking.html +77 -0
- data/public/flot/examples/symbols.html +49 -0
- data/public/flot/examples/thresholding.html +54 -0
- data/public/flot/examples/time.html +71 -0
- data/public/flot/examples/tracking.html +95 -0
- data/public/flot/examples/turning-series.html +98 -0
- data/public/flot/examples/visitors.html +90 -0
- data/public/flot/examples/zooming.html +98 -0
- data/public/flot/excanvas.js +1427 -0
- data/public/flot/excanvas.min.js +1 -0
- data/public/flot/jquery.colorhelpers.js +179 -0
- data/public/flot/jquery.colorhelpers.min.js +1 -0
- data/public/flot/jquery.flot.crosshair.js +167 -0
- data/public/flot/jquery.flot.crosshair.min.js +1 -0
- data/public/flot/jquery.flot.fillbetween.js +183 -0
- data/public/flot/jquery.flot.fillbetween.min.js +1 -0
- data/public/flot/jquery.flot.image.js +238 -0
- data/public/flot/jquery.flot.image.min.js +1 -0
- data/public/flot/jquery.flot.js +2599 -0
- data/public/flot/jquery.flot.min.js +6 -0
- data/public/flot/jquery.flot.navigate.js +336 -0
- data/public/flot/jquery.flot.navigate.min.js +1 -0
- data/public/flot/jquery.flot.pie.js +750 -0
- data/public/flot/jquery.flot.pie.min.js +1 -0
- data/public/flot/jquery.flot.resize.js +60 -0
- data/public/flot/jquery.flot.resize.min.js +1 -0
- data/public/flot/jquery.flot.selection.js +344 -0
- data/public/flot/jquery.flot.selection.min.js +1 -0
- data/public/flot/jquery.flot.stack.js +184 -0
- data/public/flot/jquery.flot.stack.min.js +1 -0
- data/public/flot/jquery.flot.symbol.js +70 -0
- data/public/flot/jquery.flot.symbol.min.js +1 -0
- data/public/flot/jquery.flot.threshold.js +103 -0
- data/public/flot/jquery.flot.threshold.min.js +1 -0
- data/public/flot/jquery.js +8316 -0
- data/public/flot/jquery.min.js +23 -0
- data/public/genPacking.pl +30 -0
- data/public/index.html +28 -0
- data/public/install.tpz +66 -0
- data/public/installAndRun.tpz +5 -0
- data/public/jsTree/jquery.jstree.js +3510 -0
- data/public/jsTree/themes/default/d.gif +0 -0
- data/public/jsTree/themes/default/d.png +0 -0
- data/public/jsTree/themes/default/style.css +73 -0
- data/public/jsTree/themes/default/throbber.gif +0 -0
- data/public/readMe.txt +9 -0
- data/public/scripts/CodeBrowser.js +645 -0
- data/public/scripts/Debugger.js +134 -0
- data/public/scripts/MethodList.js +72 -0
- data/public/scripts/ObjectLog.js +59 -0
- data/public/scripts/SessionList.js +164 -0
- data/public/scripts/Statistics.js +266 -0
- data/public/scripts/editor.js +430 -0
- data/public/scripts/jjmenu.js +375 -0
- data/public/scripts/jquery-ui.js +1012 -0
- data/public/scripts/jquery.js +154 -0
- data/public/scripts/webtools.js +374 -0
- data/public/src/CodeBrowser.gs +416 -0
- data/public/src/Debugger.gs +132 -0
- data/public/src/MethodList.gs +130 -0
- data/public/src/ObjectLog.gs +73 -0
- data/public/src/Server.gs +544 -0
- data/public/src/SessionList.gs +172 -0
- data/public/src/SharedPageCache.gs +66 -0
- data/public/src/StatProcess.gs +280 -0
- data/public/src/StatProcessType.gs +242 -0
- data/public/src/StatStatistic.gs +381 -0
- data/public/src/Statistics.gs +222 -0
- data/public/src/Statmonitor.gs +490 -0
- data/public/src/Tool.gs +86 -0
- data/public/src/VersionReport.gs +52 -0
- data/public/src/Workspace.gs +163 -0
- data/views/debugger.rhtml +6 -9
- metadata +344 -243
- data/lib/web_tools/#debugger.rb# +0 -212
- data/lib/web_tools/browser.rb +0 -45
- data/public/images/favicon.ico +0 -0
- data/public/javascript/CodeMirror/LICENSE +0 -23
- data/public/javascript/CodeMirror/css/Smalltalk.css +0 -34
- data/public/javascript/CodeMirror/js/codemirror.js +0 -582
- data/public/javascript/CodeMirror/js/editor.js +0 -1671
- data/public/javascript/CodeMirror/js/highlight.js +0 -68
- data/public/javascript/CodeMirror/js/parseSmalltalk.js +0 -126
- data/public/javascript/CodeMirror/js/parsedummy.js +0 -32
- data/public/javascript/CodeMirror/js/select.js +0 -699
- data/public/javascript/CodeMirror/js/stringstream.js +0 -159
- data/public/javascript/CodeMirror/js/tokenize.js +0 -57
- data/public/javascript/CodeMirror/js/undo.js +0 -413
- data/public/javascript/CodeMirror/js/util.js +0 -133
- data/public/javascript/CodeMirror/testSmalltalkParser.html +0 -116
- data/public/javascript/ace/ace-uncompressed.js +0 -17299
- data/public/javascript/ace/ace.js +0 -1
- data/public/javascript/ace/keybinding-emacs.js +0 -1
- data/public/javascript/ace/keybinding-vim.js +0 -1
- data/public/javascript/ace/mode-c_cpp.js +0 -1
- data/public/javascript/ace/mode-clojure.js +0 -1
- data/public/javascript/ace/mode-coffee.js +0 -1
- data/public/javascript/ace/mode-csharp.js +0 -1
- data/public/javascript/ace/mode-css.js +0 -1
- data/public/javascript/ace/mode-groovy.js +0 -1
- data/public/javascript/ace/mode-html.js +0 -1
- data/public/javascript/ace/mode-java.js +0 -1
- data/public/javascript/ace/mode-javascript.js +0 -1
- data/public/javascript/ace/mode-json.js +0 -1
- data/public/javascript/ace/mode-lua.js +0 -1
- data/public/javascript/ace/mode-markdown.js +0 -1
- data/public/javascript/ace/mode-ocaml.js +0 -1
- data/public/javascript/ace/mode-perl.js +0 -1
- data/public/javascript/ace/mode-php.js +0 -1
- data/public/javascript/ace/mode-python.js +0 -1
- data/public/javascript/ace/mode-ruby.js +0 -1
- data/public/javascript/ace/mode-scad.js +0 -1
- data/public/javascript/ace/mode-scala.js +0 -1
- data/public/javascript/ace/mode-scss.js +0 -1
- data/public/javascript/ace/mode-svg.js +0 -1
- data/public/javascript/ace/mode-textile.js +0 -1
- data/public/javascript/ace/mode-xml.js +0 -1
- data/public/javascript/ace/theme-clouds.js +0 -1
- data/public/javascript/ace/theme-clouds_midnight.js +0 -1
- data/public/javascript/ace/theme-cobalt.js +0 -1
- data/public/javascript/ace/theme-crimson_editor.js +0 -1
- data/public/javascript/ace/theme-dawn.js +0 -1
- data/public/javascript/ace/theme-eclipse.js +0 -1
- data/public/javascript/ace/theme-idle_fingers.js +0 -1
- data/public/javascript/ace/theme-kr_theme.js +0 -1
- data/public/javascript/ace/theme-merbivore.js +0 -1
- data/public/javascript/ace/theme-merbivore_soft.js +0 -1
- data/public/javascript/ace/theme-mono_industrial.js +0 -1
- data/public/javascript/ace/theme-monokai.js +0 -1
- data/public/javascript/ace/theme-pastel_on_dark.js +0 -1
- data/public/javascript/ace/theme-solarized_dark.js +0 -1
- data/public/javascript/ace/theme-solarized_light.js +0 -1
- data/public/javascript/ace/theme-textmate.js +0 -1
- data/public/javascript/ace/theme-twilight.js +0 -1
- data/public/javascript/ace/theme-vibrant_ink.js +0 -1
- data/public/javascript/ace/worker-coffee.js +0 -1
- data/public/javascript/ace/worker-css.js +0 -1
- data/public/javascript/ace/worker-javascript.js +0 -1
- data/public/javascript/webtools/browser.js +0 -260
- data/public/javascript/webtools/debugger.coffee +0 -286
- data/public/javascript/webtools/debugger.js +0 -366
- data/public/javascript/webtools/sessions.coffee +0 -17
- data/public/javascript/webtools/sessions.js +0 -27
- data/public/javascript/webtools/version.coffee +0 -14
- data/public/javascript/webtools/version.js +0 -20
- data/public/stylesheets/jquery.contextMenu.css +0 -62
- data/public/stylesheets/webtools.css +0 -53
- data/public/test.html +0 -47
@@ -1,366 +0,0 @@
|
|
1
|
-
var Debugger, DebuggerApp, Frame, Process;
|
2
|
-
var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
|
3
|
-
window.escapeHTML = function(str) {
|
4
|
-
if (str == null) {
|
5
|
-
str = "";
|
6
|
-
}
|
7
|
-
if (typeof str !== "string") {
|
8
|
-
str += str;
|
9
|
-
}
|
10
|
-
return $("<i></i>").text(str).html();
|
11
|
-
};
|
12
|
-
Frame = (function() {
|
13
|
-
function Frame(server, pid, frame_idx, container) {
|
14
|
-
this.server = server;
|
15
|
-
this.pid = pid;
|
16
|
-
this.frame_idx = frame_idx;
|
17
|
-
this.container = container;
|
18
|
-
}
|
19
|
-
Frame.prototype.update_detail_view = function(objectInfo) {
|
20
|
-
this.inspector.hide();
|
21
|
-
this.inspector.find('.objInfoClass').text(objectInfo['class']);
|
22
|
-
this.inspector.find('.objInfoValue').text(objectInfo['inspect']);
|
23
|
-
this.renderTableData(this.inspector.children('.objInstVars'), objectInfo.instance_variables, function(idx, data) {
|
24
|
-
return $("<tr><td>" + idx + "</td><td>" + data + "</td></tr>");
|
25
|
-
});
|
26
|
-
return this.inspector.show();
|
27
|
-
};
|
28
|
-
Frame.prototype.renderTableData = function(table, object, formatFn) {
|
29
|
-
var ui;
|
30
|
-
ui = table.children('tbody');
|
31
|
-
ui.empty();
|
32
|
-
return $.each(object, function(key, value) {
|
33
|
-
if (key.indexOf("@") === 0) {
|
34
|
-
return ui.append(formatFn(key, value));
|
35
|
-
}
|
36
|
-
});
|
37
|
-
};
|
38
|
-
Frame.prototype.create_detail_view = function() {
|
39
|
-
this.inspector = $('#objectInspector').clone();
|
40
|
-
this.inspector.removeAttr('id');
|
41
|
-
this.inspector.removeClass('hidden');
|
42
|
-
return this.container.append(this.inspector);
|
43
|
-
};
|
44
|
-
Frame.prototype.create_source_code_holder = function() {
|
45
|
-
this.container.prepend(window.editorDiv);
|
46
|
-
window.editor.save_url = "" + this.server + "/process/" + this.pid + "/frames/" + this.frame_idx;
|
47
|
-
return window.editorDiv.show();
|
48
|
-
};
|
49
|
-
Frame.prototype.create_inspector = function(object, index, path) {
|
50
|
-
var inspector, options;
|
51
|
-
if (index == null) {
|
52
|
-
index = 0;
|
53
|
-
}
|
54
|
-
if (path == null) {
|
55
|
-
path = "" + this.server + "/process/" + this.pid + "/frames/" + this.frame_idx;
|
56
|
-
}
|
57
|
-
options = $([]);
|
58
|
-
if (object.instance_variables != null) {
|
59
|
-
$.each(object.instance_variables, function(key, value) {
|
60
|
-
return options.push("" + key);
|
61
|
-
});
|
62
|
-
} else {
|
63
|
-
$.each(object, function(key, value) {
|
64
|
-
return options.push("" + key);
|
65
|
-
});
|
66
|
-
}
|
67
|
-
if (!(this.inspector_div != null)) {
|
68
|
-
this.inspector_div = $(document.createElement("div"));
|
69
|
-
this.inspector_div.addClass("inspectors");
|
70
|
-
this.container.prepend(this.inspector_div);
|
71
|
-
}
|
72
|
-
if (this.inspectors[index] != null) {
|
73
|
-
inspector = this.inspectors[index];
|
74
|
-
} else {
|
75
|
-
this.inspectors[index] = (inspector = $(document.createElement("select")));
|
76
|
-
this.inspector_div.append(inspector);
|
77
|
-
inspector.attr({
|
78
|
-
multiple: true,
|
79
|
-
"class": 'inspector'
|
80
|
-
});
|
81
|
-
}
|
82
|
-
inspector.html("");
|
83
|
-
$(options).each(__bind(function(idx, o) {
|
84
|
-
return inspector.append("<option value=" + idx + ">" + (escapeHTML(o)) + "</option>");
|
85
|
-
}, this));
|
86
|
-
this.create_evaluator(path);
|
87
|
-
return inspector.bind("change", __bind(function() {
|
88
|
-
var i, url, value, _i, _len, _ref;
|
89
|
-
value = options[inspector.val()];
|
90
|
-
url = "" + path + "/objects/" + value;
|
91
|
-
_ref = this.inspectors.slice(index + 1);
|
92
|
-
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
93
|
-
i = _ref[_i];
|
94
|
-
i.html("");
|
95
|
-
}
|
96
|
-
return $.get(url, __bind(function(object) {
|
97
|
-
this.create_inspector(object.instance_variables, index + 1, url);
|
98
|
-
return this.update_detail_view(object);
|
99
|
-
}, this), 'json');
|
100
|
-
}, this));
|
101
|
-
};
|
102
|
-
Frame.prototype.create_evaluator = function(path) {
|
103
|
-
if (this.evaluator == null) {
|
104
|
-
this.evaluator = $(document.createElement("input"));
|
105
|
-
this.evaluator.attr({
|
106
|
-
type: "text",
|
107
|
-
name: "" + this.frame_idx + "_evaluator",
|
108
|
-
id: "" + this.frame_idx + "_evaluator",
|
109
|
-
"class": "ui-widget-content ui-corner-all",
|
110
|
-
style: 'width: 100%;'
|
111
|
-
});
|
112
|
-
this.container.prepend(this.evaluator);
|
113
|
-
}
|
114
|
-
this.evaluator.bind("focus", __bind(function() {}, this));
|
115
|
-
this.evaluator.unbind("keypress");
|
116
|
-
return this.evaluator.bind("keypress", __bind(function(e) {
|
117
|
-
var code;
|
118
|
-
if (e.keyCode != null) {
|
119
|
-
code = e.keyCode;
|
120
|
-
}
|
121
|
-
if (!code) {
|
122
|
-
code = e.which;
|
123
|
-
}
|
124
|
-
if (code === 13) {
|
125
|
-
return $.ajax({
|
126
|
-
url: path,
|
127
|
-
data: {
|
128
|
-
"do-it": this.evaluator.val()
|
129
|
-
},
|
130
|
-
success: __bind(function(data) {
|
131
|
-
var result;
|
132
|
-
result = data["do-it-result"];
|
133
|
-
this.evaluator.val("" + (this.evaluator.val()) + " => " + result['inspect']);
|
134
|
-
this.update_detail_view(result);
|
135
|
-
return this.evaluator.select();
|
136
|
-
}, this),
|
137
|
-
dataType: 'json',
|
138
|
-
type: 'PUT'
|
139
|
-
});
|
140
|
-
}
|
141
|
-
}, this));
|
142
|
-
};
|
143
|
-
Frame.prototype.render = function() {
|
144
|
-
this.container.html("");
|
145
|
-
this.inspectors = [];
|
146
|
-
this.create_source_code_holder();
|
147
|
-
return $.get("" + this.server + "/process/" + this.pid + "/frames/" + this.frame_idx, __bind(function(frame) {
|
148
|
-
editor.getSession().setValue(frame.debug_info.source);
|
149
|
-
this.create_inspector(frame.debug_info.context);
|
150
|
-
return this.create_detail_view();
|
151
|
-
}, this), 'json');
|
152
|
-
};
|
153
|
-
return Frame;
|
154
|
-
})();
|
155
|
-
Process = (function() {
|
156
|
-
function Process(server, pid, tab) {
|
157
|
-
this.server = server;
|
158
|
-
this.pid = pid;
|
159
|
-
this.tab = tab;
|
160
|
-
this.info_div = $("#" + this.tab + " .info-bar");
|
161
|
-
this.stack_div = $("#" + this.tab + " .frame-list");
|
162
|
-
}
|
163
|
-
Process.prototype.render = function() {
|
164
|
-
this.render_info();
|
165
|
-
return this.render_stack();
|
166
|
-
};
|
167
|
-
Process.prototype.render_info = function() {
|
168
|
-
var request;
|
169
|
-
return request = $.get("" + this.server + "/process/" + this.pid, __bind(function(data) {
|
170
|
-
return this.info_div.text("" + data.label + " (" + data.timestamp + ")");
|
171
|
-
}, this), 'json');
|
172
|
-
};
|
173
|
-
Process.prototype.render_stack = function() {
|
174
|
-
var request;
|
175
|
-
this.stack_div.html("");
|
176
|
-
return request = $.get("" + this.server + "/process/" + this.pid + "/frames", __bind(function(framelist) {
|
177
|
-
$(framelist).each(__bind(function(idx, f) {
|
178
|
-
var div, header, link, restartLink;
|
179
|
-
header = $(document.createElement("h3"));
|
180
|
-
link = $(document.createElement("a"));
|
181
|
-
link.attr({
|
182
|
-
href: '#',
|
183
|
-
data_idx: idx
|
184
|
-
});
|
185
|
-
link.text("" + f["class"] + "#" + f.method_name);
|
186
|
-
link.append("<small>" + (escapeHTML(f.source_location)) + "</small>");
|
187
|
-
header.append(link);
|
188
|
-
restartLink = $('<a href="#">Restart frame</a>');
|
189
|
-
restartLink.bind("click", __bind(function(e) {
|
190
|
-
$.ajax({
|
191
|
-
url: "" + this.server + "/process/" + this.pid + "/frames/" + idx,
|
192
|
-
type: 'DELETE',
|
193
|
-
success: __bind(function() {
|
194
|
-
return this.render();
|
195
|
-
}, this)
|
196
|
-
});
|
197
|
-
return e.preventDefault();
|
198
|
-
}, this));
|
199
|
-
header.append(restartLink);
|
200
|
-
div = document.createElement("div");
|
201
|
-
$(div).text("Waiting for data...");
|
202
|
-
this.stack_div.append(header);
|
203
|
-
this.stack_div.append(div);
|
204
|
-
if (idx === 0) {
|
205
|
-
this.selected_frame = new Frame(this.server, this.pid, 0, $(div));
|
206
|
-
return this.selected_frame.render();
|
207
|
-
}
|
208
|
-
}, this));
|
209
|
-
this.stack_div.accordion("destroy");
|
210
|
-
return this.stack_div.accordion({
|
211
|
-
clearStyle: true,
|
212
|
-
collapsible: true,
|
213
|
-
changestart: __bind(function(event, ui) {
|
214
|
-
var frame_idx;
|
215
|
-
frame_idx = ui.newHeader.children("a").attr("data_idx");
|
216
|
-
if (frame_idx != null) {
|
217
|
-
this.selected_frame = new Frame(this.server, this.pid, frame_idx, ui.newContent);
|
218
|
-
return this.selected_frame.render();
|
219
|
-
}
|
220
|
-
}, this)
|
221
|
-
});
|
222
|
-
}, this), 'json');
|
223
|
-
};
|
224
|
-
return Process;
|
225
|
-
})();
|
226
|
-
Debugger = (function() {
|
227
|
-
function Debugger(server) {
|
228
|
-
this.server = server;
|
229
|
-
this.tab_content_template = $("#tab_content_template");
|
230
|
-
}
|
231
|
-
Debugger.prototype.toString = function() {
|
232
|
-
return "Debugger on " + server;
|
233
|
-
};
|
234
|
-
Debugger.prototype.server_alive = function() {
|
235
|
-
var request;
|
236
|
-
request = $.ajax({
|
237
|
-
url: "" + this.server + "/process",
|
238
|
-
async: false
|
239
|
-
});
|
240
|
-
return request.status === 200;
|
241
|
-
};
|
242
|
-
Debugger.prototype.clone_template = function() {
|
243
|
-
this.content = this.tab_content_template.clone();
|
244
|
-
this.content.show();
|
245
|
-
return this.content.removeAttr("id");
|
246
|
-
};
|
247
|
-
Debugger.prototype.fill_process_selector = function() {
|
248
|
-
var refreshButton;
|
249
|
-
this.process_box = this.content.children("select[name='process-select-box']");
|
250
|
-
$.getJSON("" + this.server + "/process", __bind(function(errors) {
|
251
|
-
return $(errors).each(__bind(function(idx, e) {
|
252
|
-
return this.process_box.append("<option value='" + e.process_id + "'>" + e.process_id + ": " + (escapeHTML(e.label)) + "</option>");
|
253
|
-
}, this));
|
254
|
-
}, this));
|
255
|
-
this.process_box.bind("change", __bind(function() {
|
256
|
-
this.process = new Process(this.server, this.process_box.val(), this.tab);
|
257
|
-
return this.process.render();
|
258
|
-
}, this));
|
259
|
-
refreshButton = this.content.children(".reload-button");
|
260
|
-
return refreshButton.bind("click", __bind(function(e) {
|
261
|
-
e.preventDefault();
|
262
|
-
this.process = new Process(this.server, this.process_box.val(), this.tab);
|
263
|
-
return this.process.render();
|
264
|
-
}, this));
|
265
|
-
};
|
266
|
-
Debugger.prototype.content_for = function(ui_panel) {
|
267
|
-
if (!(this.content != null)) {
|
268
|
-
this.tab = $(ui_panel).attr("id");
|
269
|
-
if (!this.server_alive()) {
|
270
|
-
return "<p>The URL " + url + " could not be reached</p>";
|
271
|
-
}
|
272
|
-
this.clone_template();
|
273
|
-
this.fill_process_selector();
|
274
|
-
ui_panel.append(this.content);
|
275
|
-
}
|
276
|
-
return this.content;
|
277
|
-
};
|
278
|
-
return Debugger;
|
279
|
-
})();
|
280
|
-
DebuggerApp = {
|
281
|
-
setup: function() {
|
282
|
-
var add_tab, debuggers, dialog, form, tab_counter, tab_server_input, tabs;
|
283
|
-
debuggers = [];
|
284
|
-
tab_server_input = $("#tab_server");
|
285
|
-
tab_counter = 2;
|
286
|
-
add_tab = function() {
|
287
|
-
var tab_server;
|
288
|
-
tab_server = tab_server_input.val();
|
289
|
-
tabs.tabs("add", "#tabs-" + tab_counter, tab_server);
|
290
|
-
return tab_counter++;
|
291
|
-
};
|
292
|
-
tabs = $("#tabs").tabs({
|
293
|
-
tabTemplate: '<li><a href=\'#{href}\'>#{label}</a>' + "<span class='ui-icon ui-icon-close'>Remove Tab</span></li>",
|
294
|
-
add: function(event, ui) {
|
295
|
-
var new_debugger;
|
296
|
-
new_debugger = new Debugger(tab_server_input.val());
|
297
|
-
debuggers.push(new_debugger);
|
298
|
-
return new_debugger.content_for($(ui.panel));
|
299
|
-
}
|
300
|
-
});
|
301
|
-
dialog = $("#dialog").dialog({
|
302
|
-
autoOpen: false,
|
303
|
-
modal: true,
|
304
|
-
buttons: {
|
305
|
-
Add: function() {
|
306
|
-
add_tab();
|
307
|
-
return dialog.dialog("close");
|
308
|
-
},
|
309
|
-
Cancel: function() {
|
310
|
-
return dialog.dialog("close");
|
311
|
-
}
|
312
|
-
},
|
313
|
-
open: function() {
|
314
|
-
return tab_server_input.focus();
|
315
|
-
},
|
316
|
-
close: function() {
|
317
|
-
return form[0].reset();
|
318
|
-
}
|
319
|
-
});
|
320
|
-
form = $("form", this.dialog).submit(function() {
|
321
|
-
add_tab();
|
322
|
-
dialog.dialog("close");
|
323
|
-
return false;
|
324
|
-
});
|
325
|
-
$("#add_tab").button().click(function() {
|
326
|
-
return dialog.dialog("open");
|
327
|
-
});
|
328
|
-
return $("#tabs span.ui-icon-close").live("click", function() {
|
329
|
-
var index;
|
330
|
-
index = $("li", tabs).index($(this).parent());
|
331
|
-
return tabs.tabs("remove", index);
|
332
|
-
});
|
333
|
-
}
|
334
|
-
};
|
335
|
-
$(document).ready(function() {
|
336
|
-
DebuggerApp.setup();
|
337
|
-
window.RubyMode = require("ace/mode/ruby").Mode;
|
338
|
-
window.canon = require('pilot/canon');
|
339
|
-
window.editorDiv = $("#editor");
|
340
|
-
window.editor = ace.edit('editor');
|
341
|
-
window.editor.getSession().setUseSoftTabs(true);
|
342
|
-
window.editor.getSession().setMode(new RubyMode());
|
343
|
-
return canon.addCommand({
|
344
|
-
name: "save",
|
345
|
-
bindKey: {
|
346
|
-
win: "Ctrl-S",
|
347
|
-
mac: "Command-S",
|
348
|
-
sender: "editor"
|
349
|
-
},
|
350
|
-
exec: function() {
|
351
|
-
return $.ajax({
|
352
|
-
url: window.editor.save_url,
|
353
|
-
type: 'PUT',
|
354
|
-
data: {
|
355
|
-
debug_info: {
|
356
|
-
source: window.editor.getSession().getValue()
|
357
|
-
}
|
358
|
-
},
|
359
|
-
success: function() {
|
360
|
-
alert('Save successful. The stack has been reset to the new method.');
|
361
|
-
return $("#tabs").select(".reload-button").filter(':visible').click();
|
362
|
-
}
|
363
|
-
});
|
364
|
-
}
|
365
|
-
});
|
366
|
-
});
|
@@ -1,17 +0,0 @@
|
|
1
|
-
$(document).ready ->
|
2
|
-
$.getJSON "#{WebTools.location}/sessions", (data) ->
|
3
|
-
error = data['_error']
|
4
|
-
if error?
|
5
|
-
console.log(data)
|
6
|
-
alert(error + ' (see console log for stack)')
|
7
|
-
else
|
8
|
-
thead = $('#sessionHeaders').children("tr")
|
9
|
-
$(data.headers).each (idx, element) ->
|
10
|
-
thead.append("<th title='#{element[1]}'>#{element[0]}</th>")
|
11
|
-
tbody = $('#sessionTable')
|
12
|
-
for session in data.report
|
13
|
-
row = $('<tr>')
|
14
|
-
for field in session
|
15
|
-
row.append("<td>#{field}</td>")
|
16
|
-
tbody.append(row)
|
17
|
-
$('.timestamp').html("Report generated #{data.timestamp}")
|
@@ -1,27 +0,0 @@
|
|
1
|
-
$(document).ready(function() {
|
2
|
-
return $.getJSON("" + WebTools.location + "/sessions", function(data) {
|
3
|
-
var error, field, row, session, tbody, thead, _i, _j, _len, _len2, _ref;
|
4
|
-
error = data['_error'];
|
5
|
-
if (error != null) {
|
6
|
-
console.log(data);
|
7
|
-
return alert(error + ' (see console log for stack)');
|
8
|
-
} else {
|
9
|
-
thead = $('#sessionHeaders').children("tr");
|
10
|
-
$(data.headers).each(function(idx, element) {
|
11
|
-
return thead.append("<th title='" + element[1] + "'>" + element[0] + "</th>");
|
12
|
-
});
|
13
|
-
tbody = $('#sessionTable');
|
14
|
-
_ref = data.report;
|
15
|
-
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
16
|
-
session = _ref[_i];
|
17
|
-
row = $('<tr>');
|
18
|
-
for (_j = 0, _len2 = session.length; _j < _len2; _j++) {
|
19
|
-
field = session[_j];
|
20
|
-
row.append("<td>" + field + "</td>");
|
21
|
-
}
|
22
|
-
tbody.append(row);
|
23
|
-
}
|
24
|
-
return $('.timestamp').html("Report generated " + data.timestamp);
|
25
|
-
}
|
26
|
-
});
|
27
|
-
});
|
@@ -1,14 +0,0 @@
|
|
1
|
-
$(document).ready ->
|
2
|
-
$.getJSON "#{WebTools.location}/version", (data) ->
|
3
|
-
error = data['_error']
|
4
|
-
if error?
|
5
|
-
console.log(data)
|
6
|
-
alert(error + ' (see console log for stack)')
|
7
|
-
else
|
8
|
-
thead = $('#versionHeaders')
|
9
|
-
$(data.headers).each (idx, element) ->
|
10
|
-
thead.append("<th title='#{element[1]}'>#{element[0]}</th>")
|
11
|
-
tbody = $('#versionTable')
|
12
|
-
$.each data.report, (k, v) ->
|
13
|
-
tbody.append("<tr><th>#{k}</th><td>#{v[0]}</td><td>#{v[1]}</td></tr>")
|
14
|
-
$('#versionTimestamp').html("Report generated #{data.timestamp}")
|
@@ -1,20 +0,0 @@
|
|
1
|
-
$(document).ready(function() {
|
2
|
-
return $.getJSON("" + WebTools.location + "/version", function(data) {
|
3
|
-
var error, tbody, thead;
|
4
|
-
error = data['_error'];
|
5
|
-
if (error != null) {
|
6
|
-
console.log(data);
|
7
|
-
return alert(error + ' (see console log for stack)');
|
8
|
-
} else {
|
9
|
-
thead = $('#versionHeaders');
|
10
|
-
$(data.headers).each(function(idx, element) {
|
11
|
-
return thead.append("<th title='" + element[1] + "'>" + element[0] + "</th>");
|
12
|
-
});
|
13
|
-
tbody = $('#versionTable');
|
14
|
-
$.each(data.report, function(k, v) {
|
15
|
-
return tbody.append("<tr><th>" + k + "</th><td>" + v[0] + "</td><td>" + v[1] + "</td></tr>");
|
16
|
-
});
|
17
|
-
return $('#versionTimestamp').html("Report generated " + data.timestamp);
|
18
|
-
}
|
19
|
-
});
|
20
|
-
});
|