kaya 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kaya/background_jobs/workers/execution_checker.rb +1 -1
- data/lib/kaya/version.rb +1 -1
- data/lib/kaya/view/body.mote +1 -1
- data/lib/kaya/view/git_information.mote +1 -1
- data/lib/kaya/view/javascript.mote +23 -10
- data/lib/kaya/view/modals.mote +6 -6
- data/lib/kaya/view/results/console.mote +3 -3
- data/lib/kaya/view/suites/suite.mote +2 -2
- data/lib/kaya/view/suites/suite_item.mote +11 -3
- data/lib/kaya/view/view.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 725681a8d18c1b9844636b588ea4ce0ad4de12db
|
4
|
+
data.tar.gz: 434646b75096a939cce55abcb2b449b0e08b22de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2df0f3df1690a68ddb19a3b5182e000f98d36b5221aa26a098d1bf85bb3c935291c844d15393dec4b80acd2c2c3dd1e914181ecf319ba8895f73d0df13dcc671
|
7
|
+
data.tar.gz: 0de1700dbf969cb2e1be9d293a4a693a9f69271d4e24c225ec8bff4b520837abc86c86e2251f5c8af957ad984b26df378598b076044cc3911991d8f52b559bf9
|
data/lib/kaya/version.rb
CHANGED
data/lib/kaya/view/body.mote
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
|
2
2
|
|
3
|
-
% message = query_string.msg ? " onload=\"javascript:
|
3
|
+
% message = query_string.msg ? " onload=\"javascript:startedAlert('Attention!','#{query_string.msg}');\"" : nil
|
4
4
|
|
5
5
|
% title = h1 = section.split.map{|w| w.capitalize}.join " "
|
6
6
|
|
@@ -15,7 +15,7 @@
|
|
15
15
|
% end
|
16
16
|
% if section.downcase == "all results"
|
17
17
|
<div class='btn-group pull-right' role='group'>
|
18
|
-
<button type='button' class='btn btn-default' aria-label='Left Align' title='Toggle collapse' onclick="
|
18
|
+
<button type='button' class='btn btn-default' aria-label='Left Align' title='Toggle collapse' onclick="autoCollapse()" title='collapse all panels'>
|
19
19
|
<div id='collapse_icon'>
|
20
20
|
<span class='glyphicon glyphicon-minus' aria-hidden='true' style='font-size:18px;'></span>
|
21
21
|
</div>
|
@@ -3,11 +3,19 @@
|
|
3
3
|
<script type='text/javascript'>
|
4
4
|
|
5
5
|
function my_alert(title, text){
|
6
|
-
|
6
|
+
startedInfo(title,text);
|
7
7
|
url = 'http://' + window.location.host + window.location.pathname;
|
8
8
|
$('#myModal').modal('show');
|
9
9
|
}
|
10
|
-
|
10
|
+
|
11
|
+
function startedAlert(title, text){
|
12
|
+
startedInfo(title,text);
|
13
|
+
url = 'http://' + window.location.host + window.location.pathname;
|
14
|
+
$('#startedModal').modal('show');
|
15
|
+
}
|
16
|
+
|
17
|
+
|
18
|
+
function starterLink(formId){
|
11
19
|
var form = document.getElementById(formId);
|
12
20
|
var link = window.location.origin + '/{{Kaya::Support::Configuration.hostname}}/kaya/suites/' + formId + '/run?';
|
13
21
|
var elements = form.getElementsByClassName('customParam');
|
@@ -16,12 +24,17 @@
|
|
16
24
|
link += elements[i].getAttribute('name') + '=' + elements[i].value + '&';
|
17
25
|
}
|
18
26
|
}
|
19
|
-
|
27
|
+
infoForLink('Use to the following link to start execution, share it!', link.slice(0,link.length-1));
|
20
28
|
}
|
21
29
|
function info(title, text){
|
22
30
|
document.getElementById('myModalLabel').innerHTML= title;
|
23
31
|
document.getElementById('my-modal').innerHTML= text;
|
24
32
|
}
|
33
|
+
|
34
|
+
function startedInfo(title, text){
|
35
|
+
document.getElementById('startedModalLabel').innerHTML= title;
|
36
|
+
document.getElementById('started-modal').innerHTML= text;
|
37
|
+
}
|
25
38
|
function featureInfo(title, text){
|
26
39
|
start_html = '<pre lang="ruby" style="height:400px; overflow:scroll; white-space:pre; word-wrap:normal;">';
|
27
40
|
end_html = '</pre>'
|
@@ -31,10 +44,10 @@
|
|
31
44
|
document.getElementById('myLargeModalLabel').innerHTML= title;
|
32
45
|
document.getElementById('my-largeModal').innerHTML= all_html;
|
33
46
|
}
|
34
|
-
function
|
47
|
+
function goClean(url){
|
35
48
|
window.location.href = url;
|
36
49
|
}
|
37
|
-
function
|
50
|
+
function refreshAndOpen(url){
|
38
51
|
window.open(url, '_blank', 'toolbar=no, scrollbars=yes, resizable=yes, top=300, left=300, width=800, height=600');
|
39
52
|
location.reload();
|
40
53
|
}
|
@@ -42,7 +55,7 @@
|
|
42
55
|
document.getElementById('link-text-area').focus();
|
43
56
|
document.getElementById('link-text-area').select();
|
44
57
|
}
|
45
|
-
function
|
58
|
+
function infoForLink(title, text){
|
46
59
|
document.getElementById('myModalLabel').innerHTML= title;
|
47
60
|
content = "<textarea id='link-text-area' rows='3' cols='63' style='resize: none; padding: 6px 12px; font-size: 14px; line-height: 1.42857143; color: #555; background-color: #fff; background-image: none; border: 1px solid #ccc; border-radius: 4px; font-weight:normal;' onfocus='selectLink()'>" + text + "</textarea><br>";
|
48
61
|
content += '<small>Click to select.<small>';
|
@@ -60,24 +73,24 @@
|
|
60
73
|
}
|
61
74
|
}
|
62
75
|
|
63
|
-
function
|
76
|
+
function getAndClose(url){
|
64
77
|
xmlHttp = new XMLHttpRequest();
|
65
78
|
xmlHttp.open( 'GET', url, false );
|
66
79
|
xmlHttp.send();
|
67
80
|
window.close();
|
68
81
|
}
|
69
82
|
|
70
|
-
function
|
83
|
+
function goToBottom(){
|
71
84
|
window.scrollTo(0,document.body.scrollHeight);
|
72
85
|
}
|
73
86
|
|
74
|
-
function
|
87
|
+
function goToTop(){
|
75
88
|
window.scrollTo(0,0);
|
76
89
|
}
|
77
90
|
|
78
91
|
|
79
92
|
var collapsed = false;
|
80
|
-
function
|
93
|
+
function autoCollapse(){
|
81
94
|
if(collapsed) {
|
82
95
|
collapsed = false;
|
83
96
|
document.getElementById('collapse_icon').innerHTML = "<span class='glyphicon glyphicon-minus' aria-hidden='true' style='font-size:18px;'></span>";
|
data/lib/kaya/view/modals.mote
CHANGED
@@ -8,23 +8,23 @@
|
|
8
8
|
<h4 id='my-modal' style='overflow: hidden'></h4>
|
9
9
|
</div>
|
10
10
|
<div class='modal-footer'>
|
11
|
-
<button type='button' class='btn btn-default' data-dismiss='modal'
|
11
|
+
<button type='button' class='btn btn-default' data-dismiss='modal'>Close</button>
|
12
12
|
</div>
|
13
13
|
</div>
|
14
14
|
</div>
|
15
15
|
</div>
|
16
16
|
|
17
|
-
<div id='
|
18
|
-
<div class='modal-dialog
|
17
|
+
<div id='startedModal' class='modal fade' tabindex='-1' role='dialog' aria-labelledby='startedModalLabel' aria-hidden='true'>
|
18
|
+
<div class='modal-dialog'>
|
19
19
|
<div class='modal-content'>
|
20
20
|
<div class='modal-header'>
|
21
|
-
<
|
21
|
+
<h3 class='modal-title' id='startedModalLabel'></h3>
|
22
22
|
</div>
|
23
23
|
<div class='modal-body'>
|
24
|
-
<
|
24
|
+
<h4 id='started-modal' style='overflow: hidden'></h4>
|
25
25
|
</div>
|
26
26
|
<div class='modal-footer'>
|
27
|
-
<button type='button' class='btn btn-default' data-dismiss='modal'>Close</button>
|
27
|
+
<button type='button' class='btn btn-default' data-dismiss='modal' onclick='goClean();'>Close</button>
|
28
28
|
</div>
|
29
29
|
</div>
|
30
30
|
</div>
|
@@ -67,7 +67,7 @@ javascript = Mote.parse(File.read("#{Kaya::View.path}/javascript.mote"), self, [
|
|
67
67
|
<a href='#' class='label label-warning' onclick="window.open('/{{Kaya::Support::Configuration.hostname}}/kaya/api/results/{{result.id}}/data', '_blank', 'toolbar=no, scrollbars=yes, resizable=yes, top=300, left=300, width=800, height=600');" class='btn btn-default'>
|
68
68
|
Execution Data</a>
|
69
69
|
% unless result.status =~ /finished|stopped/
|
70
|
-
<a href='#' onclick="
|
70
|
+
<a href='#' onclick="getAndClose('/{{Kaya::Support::Configuration.hostname}}/kaya/results/{{result.id}}/reset');" class='label label-danger'>
|
71
71
|
Stop execution</a>
|
72
72
|
% end
|
73
73
|
</div>
|
@@ -78,11 +78,11 @@ javascript = Mote.parse(File.read("#{Kaya::View.path}/javascript.mote"), self, [
|
|
78
78
|
<div class='page-header'>
|
79
79
|
<h4>Console Output</h4>
|
80
80
|
</div>
|
81
|
-
<button type='button' class='btn btn-default' title='Go down' onclick='
|
81
|
+
<button type='button' class='btn btn-default' title='Go down' onclick='goToBottom()' style='float: right'><span class='glyphicon glyphicon-chevron-down' aria-hidden='true'></span> Go down</button>
|
82
82
|
<h6>
|
83
83
|
<small style='color:DarkSlateGray '>{{text}}</small>
|
84
84
|
</h6>
|
85
|
-
<button type='button' class='btn btn-default' title='Go up' onclick='
|
85
|
+
<button type='button' class='btn btn-default' title='Go up' onclick='goToTop()' style='float: right'><span class='glyphicon glyphicon-chevron-up' aria-hidden='true'></span> Go up</button><br><br>
|
86
86
|
</div>
|
87
87
|
<div>
|
88
88
|
<a href='#' class='label label-default' onclick='window.close();'>Close this window</a>
|
@@ -28,7 +28,7 @@
|
|
28
28
|
% end
|
29
29
|
% if suite["status"] == "RUNNING"
|
30
30
|
<li class='list-group-item'>
|
31
|
-
<a href='#' class='btn btn-info' onclick="
|
31
|
+
<a href='#' class='btn btn-info' onclick="refreshAndOpen('/{{Kaya::Support::Configuration.hostname}}/kaya/results/log/{{suite['last_result']}}');">
|
32
32
|
See progress
|
33
33
|
</a>
|
34
34
|
</li>
|
@@ -43,7 +43,7 @@
|
|
43
43
|
<br><br>
|
44
44
|
<input type='submit' class='btn btn-success' value='Execute Suite'>
|
45
45
|
<input type='text' name='execution_name' class='customParam' title='This value could be used to identify the result execution from other execution of this suite. E.g: You could use the release your are going to test' placeholder='Identify your execution' value='{{Kaya::Support::Configuration.auto_execution_id}}' style='height: 34px; padding: 6px 12px; font-size: 14px; line-height: 1.42857143; color: #555; background-color: #fff; background-image: none; border: 1px solid #ccc; border-radius: 4px; font-weight:normal;' />
|
46
|
-
<button type='button' class='btn btn-default' aria-label='Left Align' data-toggle='modal' data-target='#myModal' onclick='javascript:
|
46
|
+
<button type='button' class='btn btn-default' aria-label='Left Align' data-toggle='modal' data-target='#myModal' onclick='javascript:starterLink("{{suite["name"]}}");'>
|
47
47
|
<span class='glyphicon glyphicon-star' aria-hidden='true'>
|
48
48
|
Link
|
49
49
|
</span>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<div class='starter-template'>
|
2
2
|
<div class='panel panel-{{Kaya::View.color(suite["status"])}}'>
|
3
3
|
<div class='panel-heading'">
|
4
|
-
<h3 class='panel-title' onclick="
|
4
|
+
<h3 class='panel-title' onclick="goClean('/{{Kaya::Support::Configuration.hostname}}/kaya/suites/{{suite["name"].gsub(' ','%20')}}');">
|
5
5
|
{{suite["name"]}}
|
6
6
|
</h3>
|
7
7
|
% unless suite["status"]=="READY"
|
@@ -17,7 +17,15 @@
|
|
17
17
|
Open</a>
|
18
18
|
<a href='/{{Kaya::Support::Configuration.hostname}}/kaya/results/suite/{{suite["name"].gsub(' ','%20')}}' class='label label-info'>
|
19
19
|
{{Kaya::Results.results_ids_for(suite["_id"]).size}} results</a>
|
20
|
-
|
20
|
+
% unless suite["info"].empty?
|
21
|
+
<a href='#' title='{{suite["info"]}}' class='label label-default' aria-hidden='true' data-toggle='modal' data-target='#myModal' onclick="javascript:info('Information about {{suite["name"]}}','{{suite["info"].gsub('\n','<br>')}}', null);">
|
22
|
+
Information</a>
|
23
|
+
% end
|
24
|
+
% if suite["status"]=="RUNNING"
|
25
|
+
<a href='#' title='See execution progress' class='label label-warning' onclick="refreshAndOpen('/{{Kaya::Support::Configuration.hostname}}/kaya/results/log/{{suite['last_result']}}');">
|
26
|
+
See progress</a>
|
27
|
+
% end
|
21
28
|
</div>
|
22
29
|
</div>
|
23
|
-
</div>
|
30
|
+
</div>
|
31
|
+
|
data/lib/kaya/view/view.rb
CHANGED
@@ -41,9 +41,9 @@ module Kaya
|
|
41
41
|
|
42
42
|
def self.access_report? result
|
43
43
|
if result["status"] =~ /stopped|running/
|
44
|
-
"onclick=\"javascript:
|
44
|
+
"onclick=\"javascript:refreshAndOpen('/#{Kaya::Support::Configuration.hostname}/kaya/results/log/#{result["_id"]}');\""
|
45
45
|
else
|
46
|
-
"onclick=\"javascript:
|
46
|
+
"onclick=\"javascript:refreshAndOpen('/#{Kaya::Support::Configuration.hostname}/kaya/results/report/#{result['_id']}');\"" if result["status"]=='finished' and result["has_report"]
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kaya
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roman Rodriguez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|