tailog 0.5.6 → 0.5.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/script/index.erb +49 -21
- data/lib/tailog/ext/irb.rb +3 -1
- data/lib/tailog/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76033882e8d86c028027768904d1335c64a3dada
|
4
|
+
data.tar.gz: 989463205a1c822a3c900899a6a7985408328652
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1aa0dbbf913c5aeafef44fbe137846687010b7abb5281aea89774954af2249f47c3a7bf83770e6bcffdcff896ace016d284dc932bac39f2dd786efd8c0df569
|
7
|
+
data.tar.gz: 0f6ce5b5f1c41c94dd20e742ae4a4250d64279a3cf966ce0b05733ca94c3650ed967e242922c009438b215dd792c5485fd93a6b5f41f46aad09c3992ede87101
|
data/app/views/script/index.erb
CHANGED
@@ -8,6 +8,7 @@
|
|
8
8
|
<option value="ruby_debug">Ruby (Debug Mode)</option>
|
9
9
|
<option value="bash">Bash</option>
|
10
10
|
</select>
|
11
|
+
<button id="broadcast-button" type="submit" class="btn btn-danger">Broadcast</button>
|
11
12
|
<button id="submit-button" type="submit" class="btn btn-primary">Submit</button>
|
12
13
|
</div>
|
13
14
|
<div>
|
@@ -17,6 +18,24 @@
|
|
17
18
|
|
18
19
|
<div id="content"></div>
|
19
20
|
|
21
|
+
<div class="modal fade" tabindex="-1" role="dialog" id="broadcast-modal">
|
22
|
+
<div class="modal-dialog" role="document">
|
23
|
+
<div class="modal-content">
|
24
|
+
<div class="modal-header">
|
25
|
+
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
26
|
+
<h4 class="modal-title">Modal title</h4>
|
27
|
+
</div>
|
28
|
+
<div class="modal-body">
|
29
|
+
<p>One fine body…</p>
|
30
|
+
</div>
|
31
|
+
<div class="modal-footer">
|
32
|
+
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
33
|
+
<button type="button" class="btn btn-primary">Save changes</button>
|
34
|
+
</div>
|
35
|
+
</div><!-- /.modal-content -->
|
36
|
+
</div><!-- /.modal-dialog -->
|
37
|
+
</div><!-- /.modal -->
|
38
|
+
|
20
39
|
<script type="text/javascript" src="javascripts/codemirror.js"></script>
|
21
40
|
<script type="text/javascript" src="javascripts/mode/ruby.js"></script>
|
22
41
|
<script type="text/javascript" src="javascripts/mode/shell.js"></script>
|
@@ -28,7 +47,7 @@
|
|
28
47
|
editor.replaceSelection(spaces);
|
29
48
|
};
|
30
49
|
CodeMirror.keyMap.default[(mac ? "Cmd" : "Ctrl") + "-Enter"] = function(editor) {
|
31
|
-
$("#submit-button").trigger(
|
50
|
+
$("#submit-button").trigger("click");
|
32
51
|
};
|
33
52
|
|
34
53
|
var editor = CodeMirror.fromTextArea($("#editor")[0], {
|
@@ -48,27 +67,36 @@
|
|
48
67
|
|
49
68
|
var $content = $("#content");
|
50
69
|
|
51
|
-
$(
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
.append('<span class="text-danger">Oops! Something went wrong, please try again later!</span>')
|
61
|
-
},
|
62
|
-
success: function(json) {
|
63
|
-
try {
|
64
|
-
var data = JSON.parse(json);
|
70
|
+
$("#broadcast-button").click(function(event) {
|
71
|
+
event.preventDefault();
|
72
|
+
$("#broadcast-modal").addClass("in");
|
73
|
+
});
|
74
|
+
|
75
|
+
$("#submit-button").click(function(event) {
|
76
|
+
event.preventDefault();
|
77
|
+
$("#script").ajaxSubmit({
|
78
|
+
beforeSend: function() {
|
65
79
|
$content
|
66
|
-
.html(
|
67
|
-
.append('<span class="text-info">
|
68
|
-
|
69
|
-
|
70
|
-
|
80
|
+
.html("<hr/>")
|
81
|
+
.append('<span class="text-info">Loading...</span>')
|
82
|
+
},
|
83
|
+
error: function() {
|
84
|
+
$content
|
85
|
+
.html("<hr/>")
|
86
|
+
.append('<span class="text-danger">Oops! Something went wrong, please try again later!</span>')
|
87
|
+
},
|
88
|
+
success: function(json) {
|
89
|
+
try {
|
90
|
+
var data = JSON.parse(json);
|
91
|
+
$content
|
92
|
+
.html("<hr/>")
|
93
|
+
.append('<span class="text-info">' + data.server_hostname + "</span>")
|
94
|
+
.append(ansi_up.ansi_to_html(data.content));
|
95
|
+
} catch (error) {
|
96
|
+
console.log(error)
|
97
|
+
}
|
71
98
|
}
|
72
|
-
}
|
99
|
+
});
|
73
100
|
});
|
101
|
+
|
74
102
|
</script>
|
data/lib/tailog/ext/irb.rb
CHANGED
data/lib/tailog/version.rb
CHANGED