tailog 0.6.5 → 0.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/application.css +10 -0
- data/app/views/script/index.erb +35 -6
- 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: d80f553a201e53ca0f79e92c0d19a8e2ea856cd7
|
4
|
+
data.tar.gz: d6b53865fb32612771a23afe359b078496e61042
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef66c3e7ba6467a068591340e099341f0d91997b7ac78caf95ba34d1e6080bc994cd48f3eaf58112d8e245232dcb8e86488c58ec22f06dcb20b390ad992b89f0
|
7
|
+
data.tar.gz: da5faafe1df5a06afe2b1b2bcec3b644497b38aaae88d659a9d54de42e4f1d29e7bf4153e87d81252216935eaf4da8b6162a4a429a6c9d26833a213cc3bedc25
|
@@ -10,6 +10,10 @@ p {
|
|
10
10
|
margin: 0;
|
11
11
|
}
|
12
12
|
|
13
|
+
* {
|
14
|
+
outline: 0 !important;
|
15
|
+
}
|
16
|
+
|
13
17
|
.fixed-top-right {
|
14
18
|
position: fixed;
|
15
19
|
top: 25px;
|
@@ -60,3 +64,9 @@ p {
|
|
60
64
|
.highlight {
|
61
65
|
background: #FFFF88;
|
62
66
|
}
|
67
|
+
|
68
|
+
.progress-bar {
|
69
|
+
-webkit-transition: width .6s ease, background-color .6s ease;
|
70
|
+
-o-transition: width .6s ease, background-color .6s ease;
|
71
|
+
transition: width .6s ease, background-color .6s ease;
|
72
|
+
}
|
data/app/views/script/index.erb
CHANGED
@@ -45,9 +45,12 @@
|
|
45
45
|
});
|
46
46
|
|
47
47
|
var $content = $("#content"),
|
48
|
-
$script = $("#script")
|
48
|
+
$script = $("#script"),
|
49
|
+
$submitButton = $("#submit-button"),
|
50
|
+
$broadcastButton = $("#broadcast-button"),
|
51
|
+
$buttons = $("#submit-button, #broadcast-button");
|
49
52
|
|
50
|
-
$
|
53
|
+
$submitButton.click(function(event) {
|
51
54
|
event.preventDefault();
|
52
55
|
editor.save();
|
53
56
|
|
@@ -56,6 +59,7 @@
|
|
56
59
|
$content
|
57
60
|
.html("<hr/>")
|
58
61
|
.append('<span class="text-info">Loading...</span>');
|
62
|
+
$buttons.attr("disabled", true);
|
59
63
|
},
|
60
64
|
error: function() {
|
61
65
|
$content
|
@@ -72,17 +76,39 @@
|
|
72
76
|
} catch (error) {
|
73
77
|
console.error(error);
|
74
78
|
}
|
79
|
+
},
|
80
|
+
complete: function() {
|
81
|
+
$buttons.attr("disabled", false);
|
75
82
|
}
|
76
83
|
});
|
77
84
|
});
|
78
85
|
|
79
|
-
|
86
|
+
var ajaxInterval = null;
|
87
|
+
$broadcastButton.click(function(event) {
|
80
88
|
event.preventDefault();
|
81
89
|
editor.save();
|
82
90
|
|
91
|
+
function onComplete() {
|
92
|
+
$submitButton.attr("disabled", false);
|
93
|
+
$broadcastButton.text("Broadcast");
|
94
|
+
clearInterval(ajaxInterval);
|
95
|
+
ajaxInterval = null;
|
96
|
+
}
|
97
|
+
|
98
|
+
if (ajaxInterval) {
|
99
|
+
onComplete();
|
100
|
+
$(".progress-bar")
|
101
|
+
.removeClass("progress-bar-info active")
|
102
|
+
.addClass("progress-bar-danger");
|
103
|
+
return;
|
104
|
+
}
|
105
|
+
|
83
106
|
$content
|
84
107
|
.html("<hr/>")
|
85
|
-
.append('<div class="progress"><div class="progress-bar progress-bar-
|
108
|
+
.append('<div class="progress"><div class="progress-bar progress-bar-info progress-bar-striped active" role="progressbar" style="width: 0%"><span class="progress-bar-indicator">0 / 1 Requests, 0 Instances (0%)</span></div></div>');
|
109
|
+
$submitButton.attr("disabled", true);
|
110
|
+
$broadcastButton.text("Stop broadcasting!");
|
111
|
+
|
86
112
|
var $progressBar = $(".progress-bar"),
|
87
113
|
$indicator = $(".progress-bar-indicator");
|
88
114
|
|
@@ -92,7 +118,7 @@
|
|
92
118
|
currentTries = 0,
|
93
119
|
concurrent = 0;
|
94
120
|
|
95
|
-
|
121
|
+
ajaxInterval = setInterval(function() {
|
96
122
|
if (currentTries < totalEstimate) {
|
97
123
|
if (concurrent < MaxCurrent) {
|
98
124
|
$script.ajaxSubmit({
|
@@ -136,7 +162,10 @@
|
|
136
162
|
});
|
137
163
|
}
|
138
164
|
} else if (concurrent === 0) {
|
139
|
-
|
165
|
+
onComplete();
|
166
|
+
$progressBar
|
167
|
+
.removeClass("progress-bar-info active")
|
168
|
+
.addClass("progress-bar-success");
|
140
169
|
}
|
141
170
|
}, 100);
|
142
171
|
});
|
data/lib/tailog/version.rb
CHANGED