sinatra-hexacta 0.8.3 → 0.8.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sinatra/helpers/alerts.rb +4 -0
- data/lib/sinatra/public/css/app.min.1.css +36 -0
- data/lib/sinatra/public/img/noimage.jpg +0 -0
- data/lib/sinatra/public/js/process.js +50 -105
- data/lib/sinatra/views/alerts/process.slim +11 -0
- data/lib/sinatra/views/libraries/include_js_before.slim +1 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0befef98fe4dd879c83aa2bef032f9c14b0fd7d99827624d29eac4534410aa7
|
4
|
+
data.tar.gz: 15ff5feba0286aa289d1c37a3a197d4d6ab21c0ca5cac8b7a715470b4c676bc7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f927ed2709ef6473f7931efc27846e0cb8c22733d54d0cc72db124ae5d20c6f50f9ca7590af33e7fb398993b4b5d75b775c6c993335561a0d1750bcc8d8a0cc
|
7
|
+
data.tar.gz: 272264081fd19267b2faad9450f7085c27df83fe0031f9465ec28af67677abd6bceb74422788e9aaac0a9f90091d51aaa34df5edb0e4e41827479a25c09c62e7
|
@@ -23,6 +23,10 @@ module Sinatra
|
|
23
23
|
slim "#{Hexacta::GEM_FILE_DIR}/alerts/error".to_sym, locals: option_hash
|
24
24
|
end
|
25
25
|
|
26
|
+
def process_alert(option_hash)
|
27
|
+
slim "#{Hexacta::GEM_FILE_DIR}/alerts/process".to_sym, locals: option_hash
|
28
|
+
end
|
29
|
+
|
26
30
|
setup_dir("/app/views/#{Hexacta::GEM_FILE_DIR}/alerts")
|
27
31
|
copy_all_files("/lib/sinatra/views/alerts","/app/views/#{Hexacta::GEM_FILE_DIR}/alerts")
|
28
32
|
end
|
@@ -16387,3 +16387,39 @@ svg.ct-chart-bar, svg.ct-chart-line{
|
|
16387
16387
|
0% { width: 0; }
|
16388
16388
|
100% { width: 100%; }
|
16389
16389
|
}
|
16390
|
+
|
16391
|
+
@-webkit-keyframes rotating /* Safari and Chrome */ {
|
16392
|
+
from {
|
16393
|
+
-webkit-transform: rotate(0deg);
|
16394
|
+
-o-transform: rotate(0deg);
|
16395
|
+
transform: rotate(0deg);
|
16396
|
+
}
|
16397
|
+
to {
|
16398
|
+
-webkit-transform: rotate(360deg);
|
16399
|
+
-o-transform: rotate(360deg);
|
16400
|
+
transform: rotate(360deg);
|
16401
|
+
}
|
16402
|
+
}
|
16403
|
+
@keyframes rotating {
|
16404
|
+
from {
|
16405
|
+
-ms-transform: rotate(0deg);
|
16406
|
+
-moz-transform: rotate(0deg);
|
16407
|
+
-webkit-transform: rotate(0deg);
|
16408
|
+
-o-transform: rotate(0deg);
|
16409
|
+
transform: rotate(0deg);
|
16410
|
+
}
|
16411
|
+
to {
|
16412
|
+
-ms-transform: rotate(360deg);
|
16413
|
+
-moz-transform: rotate(360deg);
|
16414
|
+
-webkit-transform: rotate(360deg);
|
16415
|
+
-o-transform: rotate(360deg);
|
16416
|
+
transform: rotate(360deg);
|
16417
|
+
}
|
16418
|
+
}
|
16419
|
+
.rotating {
|
16420
|
+
-webkit-animation: rotating 2s linear infinite;
|
16421
|
+
-moz-animation: rotating 2s linear infinite;
|
16422
|
+
-ms-animation: rotating 2s linear infinite;
|
16423
|
+
-o-animation: rotating 2s linear infinite;
|
16424
|
+
animation: rotating 2s linear infinite;
|
16425
|
+
}
|
Binary file
|
@@ -1,127 +1,72 @@
|
|
1
|
-
var pro_timeout = false;
|
2
|
-
|
3
1
|
class ProcessManager {
|
4
2
|
|
5
|
-
static
|
3
|
+
static show(clazz) {
|
4
|
+
$("#processes").css("height","80px");
|
5
|
+
$("#processes .title").html(clazz);
|
6
|
+
}
|
6
7
|
|
8
|
+
static hide() {
|
9
|
+
$("#processes").css("height","0px");
|
7
10
|
}
|
8
11
|
|
9
|
-
static
|
12
|
+
static update(progress) {
|
13
|
+
$("#processes .progress-bar").css("width",progress + "%");
|
14
|
+
}
|
15
|
+
|
16
|
+
static complete() {
|
17
|
+
$("#processes .progress-bar").css("width","100%");
|
18
|
+
$("#processes .rotating").removeClass("rotating");
|
19
|
+
$("#processes .zmdi").removeClass("zmdi-settings").addClass("zmdi-check-circle");
|
20
|
+
$("#processes .progress").removeClass("active");
|
21
|
+
$("#processes .progress-bar").addClass("progress-bar-success");
|
22
|
+
$("#processes .detail").html("Completado. Refresca la pantalla para actualizar la información.");
|
23
|
+
}
|
24
|
+
|
25
|
+
static start(clazz) {
|
10
26
|
$.ajax({
|
11
|
-
url: "/
|
12
|
-
type: '
|
27
|
+
url: "/process",
|
28
|
+
type: 'POST',
|
13
29
|
data: { class : clazz },
|
14
30
|
success: function(result) {
|
15
|
-
|
16
|
-
|
17
|
-
}
|
31
|
+
ProcessManager.show('Cargando...');
|
32
|
+
ProcessManager.update(0);
|
18
33
|
},
|
19
34
|
error: function(error) {
|
20
35
|
}
|
21
36
|
});
|
22
37
|
}
|
23
38
|
|
24
|
-
static
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
39
|
+
static getProcesses(clazz) {
|
40
|
+
$.ajax({
|
41
|
+
url: "/processes",
|
42
|
+
type: 'GET',
|
43
|
+
data: { class : clazz },
|
44
|
+
success: function(result) {
|
45
|
+
if (result != "") {
|
46
|
+
if (result.progress >= 100.0) {
|
47
|
+
//ProcessManager.hide();
|
48
|
+
ProcessManager.complete()
|
49
|
+
ProcessManager.cleanProcess(clazz);
|
50
|
+
} else {
|
51
|
+
ProcessManager.show(result.name);
|
52
|
+
}
|
53
|
+
ProcessManager.update(result.progress);
|
54
|
+
|
35
55
|
}
|
56
|
+
},
|
57
|
+
error: function(error) {
|
36
58
|
}
|
37
|
-
}, 5000);
|
38
|
-
}
|
39
|
-
}
|
40
|
-
|
41
|
-
static find(query){
|
42
|
-
$.ajax({
|
43
|
-
url: "/find",
|
44
|
-
type: 'GET',
|
45
|
-
data: { query: query }
|
46
|
-
}).done(function(result) {
|
47
|
-
$("#header .results").html(result);
|
48
|
-
|
49
|
-
$('#header .results *').click(function() {
|
50
|
-
clearTimeout(hide_results_timeout);
|
51
|
-
$("#header input").focus();
|
52
|
-
});
|
53
59
|
});
|
54
60
|
}
|
55
61
|
|
56
|
-
static
|
62
|
+
static cleanProcess(clazz) {
|
57
63
|
$.ajax({
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
64
|
+
url: "/processes/" + clazz,
|
65
|
+
type: 'POST',
|
66
|
+
success: function(result) {
|
67
|
+
},
|
68
|
+
error: function(error) {
|
69
|
+
}
|
63
70
|
});
|
64
71
|
}
|
65
|
-
}
|
66
|
-
|
67
|
-
var last_query = null;
|
68
|
-
var header_input_timeout = null;
|
69
|
-
$.xhrPool = [];
|
70
|
-
|
71
|
-
$.xhrPool.abortAll = function() {
|
72
|
-
$(this).each(function(idx, jqXHR) {
|
73
|
-
jqXHR.abort();
|
74
|
-
});
|
75
|
-
$(this).each(function(idx, jqXHR) {
|
76
|
-
var index = $.inArray(jqXHR, $.xhrPool);
|
77
|
-
if (index > -1) {
|
78
|
-
$.xhrPool.splice(index, 1);
|
79
|
-
}
|
80
|
-
});
|
81
|
-
};
|
82
|
-
|
83
|
-
$.ajaxSetup({
|
84
|
-
beforeSend: function(jqXHR) {
|
85
|
-
$.xhrPool.push(jqXHR);
|
86
|
-
},
|
87
|
-
complete: function(jqXHR) {
|
88
|
-
var index = $.inArray(jqXHR, $.xhrPool);
|
89
|
-
if (index > -1) {
|
90
|
-
$.xhrPool.splice(index, 1);
|
91
|
-
}
|
92
|
-
}
|
93
|
-
});
|
94
|
-
|
95
|
-
$(document).ready(function(){
|
96
|
-
|
97
|
-
$("#header input").focusin(function() {
|
98
|
-
$("#header .results").addClass("toggled");
|
99
|
-
})
|
100
|
-
|
101
|
-
$("#header input").focusout(function() {
|
102
|
-
hide_results_timeout = setTimeout(function() {
|
103
|
-
$("#header .results").removeClass("toggled");
|
104
|
-
},200);
|
105
|
-
});
|
106
|
-
|
107
|
-
$('#header .results *').click(function() {
|
108
|
-
clearTimeout(hide_results_timeout);
|
109
|
-
$("#header input").focus();
|
110
|
-
});
|
111
|
-
|
112
|
-
$('#header input').keyup(function() {
|
113
|
-
clearTimeout(header_input_timeout);
|
114
|
-
|
115
|
-
if($('#header input').val().length > 2 && $.trim($('#header input').val())) {
|
116
|
-
header_input_timeout = setTimeout(function() {
|
117
|
-
$.xhrPool.abortAll();
|
118
|
-
if (last_query != $.trim($('#header input').val())) {
|
119
|
-
last_query = $.trim($('#header input').val());
|
120
|
-
if (last_query.length > 2) {
|
121
|
-
Finder.find(last_query);
|
122
|
-
}
|
123
|
-
}
|
124
|
-
}, 1000);
|
125
|
-
}
|
126
|
-
});
|
127
|
-
});
|
72
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
.row#processes style="height:0px;overflow: hidden;-webkit-transition: all 0.5s ease-in-out;-o-transition: all 0.5s ease-in-out;transition: all 0.5s ease-in-out;"
|
2
|
+
.col-xs-12
|
3
|
+
.progress.progress-striped.active style="height:80px;"
|
4
|
+
.progress-bar aria-valuemax="100" aria-valuemin="0" aria-valuenow="0" role="progressbar" style="width: 0%;text-align:left;"
|
5
|
+
.lv-item.p-20.p-fixed
|
6
|
+
.media
|
7
|
+
.pull-left
|
8
|
+
i.zmdi.zmdi-hc-3x.zmdi-settings.c-white.rotating
|
9
|
+
.media-body
|
10
|
+
.lv-title.c-white.title
|
11
|
+
small.lv-small.c-white.detail Espera por favor...
|
@@ -8,3 +8,4 @@ script src="/sinatra-hexacta/vendors/chartist/chartist-plugin-legend.js"
|
|
8
8
|
|
9
9
|
script src="/sinatra-hexacta/js/app.js?ver=#{settings.version}" type='text/javascript'
|
10
10
|
script src="/sinatra-hexacta/js/finder.js?ver=#{settings.version}" type='text/javascript'
|
11
|
+
script src="/sinatra-hexacta/js/process.js?ver=#{settings.version}" type='text/javascript'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-hexacta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marco Zanger
|
@@ -125,6 +125,7 @@ files:
|
|
125
125
|
- lib/sinatra/public/fonts/roboto/Roboto-Thin-webfont.ttf
|
126
126
|
- lib/sinatra/public/fonts/roboto/Roboto-Thin-webfont.woff
|
127
127
|
- lib/sinatra/public/img/finder.jpg
|
128
|
+
- lib/sinatra/public/img/noimage.jpg
|
128
129
|
- lib/sinatra/public/img/select.png
|
129
130
|
- lib/sinatra/public/img/select@2x.png
|
130
131
|
- lib/sinatra/public/js/app.js
|
@@ -175,6 +176,7 @@ files:
|
|
175
176
|
- lib/sinatra/views/alerts/empty.slim
|
176
177
|
- lib/sinatra/views/alerts/error.slim
|
177
178
|
- lib/sinatra/views/alerts/info.slim
|
179
|
+
- lib/sinatra/views/alerts/process.slim
|
178
180
|
- lib/sinatra/views/alerts/success.slim
|
179
181
|
- lib/sinatra/views/alerts/warning.slim
|
180
182
|
- lib/sinatra/views/charts/bar.slim
|