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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 849203aa79f721fc52d36711c3ebdef3e7134eac
4
- data.tar.gz: 8195dc1eb253f15c08ea82501aec4f8258866056
3
+ metadata.gz: 725681a8d18c1b9844636b588ea4ce0ad4de12db
4
+ data.tar.gz: 434646b75096a939cce55abcb2b449b0e08b22de
5
5
  SHA512:
6
- metadata.gz: 7e3e305a12110084e87e24913b40a7e9f26064c627d6fc578b52b5da772044e69bbe8f356e1e1b8f78d9ba8bee2b7361d0f9a3d6a5d31934d1eb66d15bb90dab
7
- data.tar.gz: ca05ed024da9fc1fe727bfea132960a4219d78d3ddb58eba6454dbec08d2ccf4c3dac7cdb6636bef2b4f68802e0a88bc7ce07e5aa24649c91e04147afcd142a7
6
+ metadata.gz: 2df0f3df1690a68ddb19a3b5182e000f98d36b5221aa26a098d1bf85bb3c935291c844d15393dec4b80acd2c2c3dd1e914181ecf319ba8895f73d0df13dcc671
7
+ data.tar.gz: 0de1700dbf969cb2e1be9d293a4a693a9f69271d4e24c225ec8bff4b520837abc86c86e2251f5c8af957ad984b26df378598b076044cc3911991d8f52b559bf9
@@ -12,7 +12,7 @@ module Kaya
12
12
  suite = Kaya::Suites::Suite.get(suite_id)
13
13
  begin
14
14
  suite.check_last_result!
15
- sleep 10
15
+ sleep 5
16
16
  end while not suite.is_ready?
17
17
  end
18
18
  end
data/lib/kaya/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Kaya
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
@@ -1,6 +1,6 @@
1
1
 
2
2
 
3
- % message = query_string.msg ? " onload=\"javascript:my_alert('Attention!','#{query_string.msg}');\"" : nil
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="auto_collapse()" title='collapse all panels'>
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
- info(title,text);
6
+ startedInfo(title,text);
7
7
  url = 'http://' + window.location.host + window.location.pathname;
8
8
  $('#myModal').modal('show');
9
9
  }
10
- function starter_link(formId){
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
- info_for_link('Use to the following link to start execution, share it!', link.slice(0,link.length-1));
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 go_clean(url){
47
+ function goClean(url){
35
48
  window.location.href = url;
36
49
  }
37
- function refresh_and_open(url){
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 info_for_link(title, text){
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 get_and_close(url){
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 go_to_bottom(){
83
+ function goToBottom(){
71
84
  window.scrollTo(0,document.body.scrollHeight);
72
85
  }
73
86
 
74
- function go_to_top(){
87
+ function goToTop(){
75
88
  window.scrollTo(0,0);
76
89
  }
77
90
 
78
91
 
79
92
  var collapsed = false;
80
- function auto_collapse(){
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>";
@@ -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' onclick='go_clean();'>Close</button>
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='myLargeModal' class='modal fade bs-example-modal-lg' tabindex='-1' role='dialog' aria-labelledby='myLargeModalLabel' aria-hidden='true'>
18
- <div class='modal-dialog modal-lg'>
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
- <h4 class='modal-title' id='myLargeModalLabel'></h4>
21
+ <h3 class='modal-title' id='startedModalLabel'></h3>
22
22
  </div>
23
23
  <div class='modal-body'>
24
- <h6 id='my-largeModal'></h6>
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="get_and_close('/{{Kaya::Support::Configuration.hostname}}/kaya/results/{{result.id}}/reset');" class='label label-danger'>
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='go_to_bottom()' style='float: right'><span class='glyphicon glyphicon-chevron-down' aria-hidden='true'></span> Go down</button>
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='go_to_top()' style='float: right'><span class='glyphicon glyphicon-chevron-up' aria-hidden='true'></span> Go up</button><br><br>
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="refresh_and_open('/{{Kaya::Support::Configuration.hostname}}/kaya/results/log/{{suite['last_result']}}');">
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'>&nbsp;
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:starter_link("{{suite["name"]}}");'>
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="go_clean('/{{Kaya::Support::Configuration.hostname}}/kaya/suites/{{suite["name"].gsub(' ','%20')}}');">
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
+
@@ -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:refresh_and_open('/#{Kaya::Support::Configuration.hostname}/kaya/results/log/#{result["_id"]}');\""
44
+ "onclick=\"javascript:refreshAndOpen('/#{Kaya::Support::Configuration.hostname}/kaya/results/log/#{result["_id"]}');\""
45
45
  else
46
- "onclick=\"javascript:refresh_and_open('/#{Kaya::Support::Configuration.hostname}/kaya/results/report/#{result['_id']}');\"" if result["status"]=='finished' and result["has_report"]
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.7
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-28 00:00:00.000000000 Z
11
+ date: 2015-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor