mutx 0.1.69 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/documentation/repos.md +21 -24
- data/lib/generators/task_rack.rb +8 -2
- data/lib/generators/templates/config.ru.tt +1 -1
- data/lib/mutx/API/execution.rb +8 -44
- data/lib/mutx/API/repo.rb +7 -10
- data/lib/mutx/background_jobs/workers/executor.rb +44 -38
- data/lib/mutx/commands/install.rb +1 -1
- data/lib/mutx/commands/start.rb +1 -1
- data/lib/mutx/custom/execution.rb +1 -1
- data/lib/mutx/database/mongo_connector.rb +19 -22
- data/lib/mutx/execution.rb +1 -0
- data/lib/mutx/lib/authentication.rb +23 -0
- data/lib/mutx/lib/helpers.rb +52 -0
- data/lib/mutx/lib/middlewares/database_middleware.rb +16 -0
- data/lib/mutx/lib/middlewares/flash_middleware.rb +31 -0
- data/lib/mutx/lib/middlewares/logger_middleware.rb +13 -0
- data/lib/mutx/lib/monkey_patch.rb +28 -0
- data/lib/mutx/lib/paths.rb +80 -0
- data/lib/mutx/platforms/ruby.rb +8 -0
- data/lib/mutx/public/css/bootstrap.min.css +7 -0
- data/lib/mutx/public/css/font-awesome.min.css +4 -0
- data/lib/mutx/public/css/jquery.json-viewer.css +44 -0
- data/{favicon.ico → lib/mutx/public/img/favicon.ico} +0 -0
- data/lib/mutx/public/js/bootstrap.min.js +6 -0
- data/lib/mutx/public/js/jquery.json-viewer.js +148 -0
- data/lib/mutx/public/js/jquery.min.js +6 -0
- data/lib/mutx/{view/javascript.mote → public/js/mutx.js} +0 -5
- data/lib/mutx/public/js/notify.min.js +1 -0
- data/lib/mutx/results/result.rb +60 -68
- data/lib/mutx/results/results.rb +4 -0
- data/lib/mutx/routes.rb +85 -883
- data/lib/mutx/routes/admin_routes.rb +16 -0
- data/lib/mutx/routes/admin_routes/custom_params_routes.rb +97 -0
- data/lib/mutx/routes/admin_routes/repositories_routes.rb +35 -0
- data/lib/mutx/routes/admin_routes/tasks_routes.rb +110 -0
- data/lib/mutx/routes/api_routes.rb +49 -0
- data/lib/mutx/routes/api_routes/custom_params_routes.rb +41 -0
- data/lib/mutx/routes/api_routes/input_routes.rb +48 -0
- data/lib/mutx/routes/api_routes/repos_routes.rb +74 -0
- data/lib/mutx/routes/api_routes/results_routes.rb +50 -0
- data/lib/mutx/routes/api_routes/tasks_routes.rb +47 -0
- data/lib/mutx/routes/api_routes/tests_routes.rb +42 -0
- data/lib/mutx/routes/features_routes.rb +24 -0
- data/lib/mutx/routes/help_routes.rb +23 -0
- data/lib/mutx/routes/logs_routes.rb +22 -0
- data/lib/mutx/routes/message_routes.rb +24 -0
- data/lib/mutx/routes/repositories_routes.rb +25 -0
- data/lib/mutx/routes/results_routes.rb +53 -0
- data/lib/mutx/routes/task_results_routes.rb +25 -0
- data/lib/mutx/routes/tasks_routes.rb +67 -0
- data/lib/mutx/routes/tests_routes.rb +66 -0
- data/lib/mutx/support/change_inspector.rb +3 -3
- data/lib/mutx/support/files_cleanner.rb +12 -3
- data/lib/mutx/support/git.rb +11 -2
- data/lib/mutx/support/processes.rb +2 -2
- data/lib/mutx/support/project_type.rb +12 -0
- data/lib/mutx/tasks/task.rb +8 -2
- data/lib/mutx/version.rb +1 -1
- data/lib/mutx/view/{custom/params/delete_form.mote → admin/custom-params/_delete_form.mote} +2 -4
- data/lib/mutx/view/{custom/params/create_edit_form.mote → admin/custom-params/_form.mote} +5 -9
- data/lib/mutx/view/{custom/params/custom_param_task_deleting_box.mote → admin/custom-params/_task_deleting_box.mote} +1 -2
- data/lib/mutx/view/{custom/params → admin/custom-params}/delete.mote +1 -3
- data/lib/mutx/view/{custom/params → admin/custom-params}/edit.mote +1 -5
- data/lib/mutx/view/{custom/params/list.mote → admin/custom-params/index.mote} +8 -13
- data/lib/mutx/view/{custom/params → admin/custom-params}/new.mote +1 -5
- data/lib/mutx/view/{custom/params/custom_param_selection_box.mote → admin/custom-params/selection_box.mote} +2 -3
- data/lib/mutx/view/{list_repos.mote → admin/repositories/index.mote} +2 -6
- data/lib/mutx/view/{repos.mote → admin/repositories/new.mote} +2 -6
- data/lib/mutx/view/{tasks/admin/delete_form.mote → admin/tasks/_delete_form.mote} +2 -12
- data/lib/mutx/view/{tasks/admin/create_edit_form.mote → admin/tasks/_form.mote} +6 -9
- data/lib/mutx/view/{tasks/admin → admin/tasks}/delete.mote +1 -3
- data/lib/mutx/view/{tasks/admin → admin/tasks}/edit.mote +1 -4
- data/lib/mutx/view/{tasks/admin/list.mote → admin/tasks/index.mote} +5 -10
- data/lib/mutx/view/{tasks/admin → admin/tasks}/new.mote +1 -5
- data/lib/mutx/view/{tasks/admin/view.mote → admin/tasks/show.mote} +1 -3
- data/lib/mutx/view/body.mote +13 -51
- data/lib/mutx/view/{custom/params.mote → custom-params/_custom_params.mote} +3 -4
- data/lib/mutx/view/{custom/params → custom-params/types}/json.mote +0 -0
- data/lib/mutx/view/{custom/params → custom-params/types}/select_list.mote +0 -0
- data/lib/mutx/view/{custom/params → custom-params/types}/text.mote +0 -0
- data/lib/mutx/view/error_handler.mote +4 -54
- data/lib/mutx/view/features/{feature.mote → file.mote} +0 -0
- data/lib/mutx/view/features/index.mote +9 -0
- data/lib/mutx/view/git_information.mote +2 -8
- data/lib/mutx/view/help/{main.mote → _main.mote} +0 -0
- data/lib/mutx/view/help/{page.mote → _page.mote} +0 -0
- data/lib/mutx/view/help/{search_result.mote → _search_result.mote} +0 -0
- data/lib/mutx/view/help/index.mote +38 -0
- data/lib/mutx/view/layout/flash.mote +7 -0
- data/lib/mutx/view/{footer.mote → layout/footer.mote} +1 -1
- data/lib/mutx/view/layout/javascript.mote +6 -0
- data/lib/mutx/view/{modals.mote → layout/modals.mote} +0 -0
- data/lib/mutx/view/layout/navigation_bar.mote +88 -0
- data/lib/mutx/view/{styles.mote → layout/styles.mote} +10 -0
- data/lib/mutx/view/logs/{logs.mote → index.mote} +1 -1
- data/lib/mutx/view/logs/show.mote +3 -0
- data/lib/mutx/view/repositories/_repository.mote +7 -0
- data/lib/mutx/view/repositories/index.mote +23 -0
- data/lib/mutx/view/repositories/show.mote +21 -0
- data/lib/mutx/view/results/{detailed_info.mote → _result.mote} +5 -5
- data/lib/mutx/view/results/console.mote +63 -106
- data/lib/mutx/view/results/{all.mote → index.mote} +18 -24
- data/lib/mutx/view/sections.rb +36 -24
- data/lib/mutx/view/task_results/_result.mote +57 -0
- data/lib/mutx/view/{results/result.mote → task_results/_result_item.mote} +6 -5
- data/lib/mutx/view/task_results/index.mote +35 -0
- data/lib/mutx/view/tasks/_task.mote +90 -0
- data/lib/mutx/view/tasks/index.mote +61 -0
- data/lib/mutx/view/tasks/show.mote +167 -0
- data/lib/mutx/view/tests/_test.mote +90 -0
- data/lib/mutx/view/tests/index.mote +59 -0
- data/lib/mutx/view/tests/show.mote +172 -0
- data/lib/mutx/view/view.rb +172 -10
- metadata +89 -50
- data/lib/mutx/database/middleware.rb +0 -18
- data/lib/mutx/view/features.mote +0 -57
- data/lib/mutx/view/features/features_list.mote +0 -10
- data/lib/mutx/view/help.mote +0 -75
- data/lib/mutx/view/logs/log.mote +0 -3
- data/lib/mutx/view/message.mote +0 -8
- data/lib/mutx/view/navigation_bar.mote +0 -67
- data/lib/mutx/view/results/results.mote +0 -112
- data/lib/mutx/view/tasks/message.mote +0 -37
- data/lib/mutx/view/tasks/task.mote +0 -167
- data/lib/mutx/view/tasks/task_item.mote +0 -77
- data/lib/mutx/view/tasks/tasks.mote +0 -74
@@ -1,18 +0,0 @@
|
|
1
|
-
module Mutx
|
2
|
-
module Database
|
3
|
-
class Middleware
|
4
|
-
|
5
|
-
def initialize(app)
|
6
|
-
@app = app
|
7
|
-
end
|
8
|
-
|
9
|
-
def call(env)
|
10
|
-
configuration = Mutx::Support::Configuration.db_connection_data
|
11
|
-
Mutx::Database::MongoConnector.new(configuration)
|
12
|
-
@app.call(env)
|
13
|
-
ensure
|
14
|
-
Mutx::Database::MongoConnector.close
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
data/lib/mutx/view/features.mote
DELETED
@@ -1,57 +0,0 @@
|
|
1
|
-
% title = h1 = section = "features"
|
2
|
-
|
3
|
-
<!--partials -->
|
4
|
-
|
5
|
-
% feature_path = query_string.path
|
6
|
-
|
7
|
-
% javascript = Mote.parse(File.read("#{Mutx::View.path}/javascript.mote"), self, []).call()
|
8
|
-
|
9
|
-
% styles = Mote.parse(File.read("#{Mutx::View.path}/styles.mote"), self, []).call()
|
10
|
-
|
11
|
-
% modals = Mote.parse(File.read("#{Mutx::View.path}/modals.mote"), self, []).call()
|
12
|
-
|
13
|
-
% git_information = Mote.parse(File.read("#{Mutx::View.path}/git_information.mote"), self, [:section]).call(section:section)
|
14
|
-
|
15
|
-
% footer = Mote.parse(File.read("#{Mutx::View.path}/footer.mote"), self, []).call()
|
16
|
-
|
17
|
-
% if feature_path
|
18
|
-
% content = Mote.parse(File.read("#{Mutx::View.path}/features/feature.mote"), self, [:feature_path]).call(feature_path:feature_path)
|
19
|
-
% else
|
20
|
-
% content = Mote.parse(File.read("#{Mutx::View.path}/features/features_list.mote"), self, []).call()
|
21
|
-
% end
|
22
|
-
% section = section.gsub(" ","_").downcase
|
23
|
-
|
24
|
-
% navigation_bar = Mote.parse(File.read("#{Mutx::View.path}/navigation_bar.mote"), self, [:section]).call(section:section)
|
25
|
-
|
26
|
-
<!DOCtype html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns ="http://www.w3.org/1999/xhtml"><head><meta content="text/html;charset=utf-8" http-equiv="Content-Type"/>'
|
27
|
-
<head>
|
28
|
-
<title>{{Mutx::Support::Configuration.project_name}} through Mutx - {{title.capitalize}}</title>
|
29
|
-
|
30
|
-
<meta content='text/html;charset=utf-8' http-equiv='Content-Type'/>
|
31
|
-
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
|
32
|
-
<link rel='shortcut icon' href='/favicon'>
|
33
|
-
<link href='https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css' rel='stylesheet'>
|
34
|
-
|
35
|
-
{{javascript}}
|
36
|
-
|
37
|
-
{{styles}}
|
38
|
-
|
39
|
-
</head>
|
40
|
-
<body class='padding-top: 50px;'>
|
41
|
-
|
42
|
-
{{modals}}
|
43
|
-
|
44
|
-
{{navigation_bar}}
|
45
|
-
|
46
|
-
<div class='container'>
|
47
|
-
<br>
|
48
|
-
{{git_information}}
|
49
|
-
|
50
|
-
<p>{{content}}</p>
|
51
|
-
|
52
|
-
{{footer}}
|
53
|
-
|
54
|
-
</div>
|
55
|
-
</div>
|
56
|
-
</body>
|
57
|
-
</html>
|
@@ -1,10 +0,0 @@
|
|
1
|
-
% features_files_list = Mutx::Cucumber::Features.feature_files_names
|
2
|
-
<table class='table table-hover'>
|
3
|
-
% features_files_list.each do |file_name|
|
4
|
-
<tr>
|
5
|
-
<td>
|
6
|
-
<a aria-hidden='true' href='/features/file?path={{file_name.gsub("/"," ")}}'>{{file_name}}</a>
|
7
|
-
</td>
|
8
|
-
</tr>
|
9
|
-
% end
|
10
|
-
</table>
|
data/lib/mutx/view/help.mote
DELETED
@@ -1,75 +0,0 @@
|
|
1
|
-
|
2
|
-
<?
|
3
|
-
|
4
|
-
page = args[:page]
|
5
|
-
|
6
|
-
title = (page == "main")? page : Mutx::Database::MongoConnector.help_title(page)
|
7
|
-
|
8
|
-
javascript = Mote.parse(File.read("#{Mutx::View.path}/javascript.mote"), self, []).call()
|
9
|
-
|
10
|
-
styles = Mote.parse(File.read("#{Mutx::View.path}/styles.mote"), self, []).call()
|
11
|
-
|
12
|
-
available_pages = Mutx::Database::MongoConnector.get_all_documentation.map{|doc| doc["title"].downcase}
|
13
|
-
|
14
|
-
navigation_bar = Mote.parse(File.read("#{Mutx::View.path}/navigation_bar.mote"), self, [:section]).call(section:"help")
|
15
|
-
|
16
|
-
query = args[:query_string]
|
17
|
-
|
18
|
-
?>
|
19
|
-
<!DOCtype html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
20
|
-
<html xmlns ="http://www.w3.org/1999/xhtml">
|
21
|
-
|
22
|
-
<head>
|
23
|
-
<title>{{Mutx::Support::Configuration.project_name}} through Mutx - {{title}}</title>
|
24
|
-
|
25
|
-
<meta content='text/html;charset=utf-8' http-equiv='Content-Type'/>
|
26
|
-
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
|
27
|
-
<link rel='shortcut icon' href='/favicon'>
|
28
|
-
<link href='https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css' rel='stylesheet'>
|
29
|
-
|
30
|
-
{{javascript}}
|
31
|
-
|
32
|
-
{{styles}}
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
</head>
|
37
|
-
<body class='padding-top: 50px;'>
|
38
|
-
|
39
|
-
|
40
|
-
{{navigation_bar}}
|
41
|
-
|
42
|
-
<div class='container'>
|
43
|
-
<br>
|
44
|
-
|
45
|
-
<div class='jumbotron'>
|
46
|
-
<div class='container'>
|
47
|
-
<h1>
|
48
|
-
<a href='/help'>Help</a>
|
49
|
-
{{page.capitalize.gsub("_"," ")}}
|
50
|
-
<div class='col-sm-3 col-md-3 pull-right'>
|
51
|
-
<form class='navbar-form' role='search' action='/help/main' method='get'>
|
52
|
-
<div class='input-group'>
|
53
|
-
<input type='text' class='form-control' placeholder='Search' name='s' value="{{query}}">
|
54
|
-
<div class='input-group-btn'>
|
55
|
-
<button class='btn btn-info' type='submit'><i class='glyphicon glyphicon-search'></i></button>
|
56
|
-
</div>
|
57
|
-
</div>
|
58
|
-
</form>
|
59
|
-
</div>
|
60
|
-
</h1>
|
61
|
-
<!-- inicio content-->
|
62
|
-
% if query and !query.empty?
|
63
|
-
{{Mote.parse(File.read("#{Mutx::View.path}/help/search_result.mote"), self, [:query]).call(query:query)}}
|
64
|
-
% else
|
65
|
-
% if available_pages.include? page
|
66
|
-
{{Mote.parse(File.read("#{Mutx::View.path}/help/page.mote"), self, [:page]).call(page:page)}}
|
67
|
-
% else
|
68
|
-
{{Mote.parse(File.read("#{Mutx::View.path}/help/main.mote"), self, []).call()}}
|
69
|
-
% end
|
70
|
-
% end
|
71
|
-
<!-- fin content -->
|
72
|
-
</div>
|
73
|
-
</div>
|
74
|
-
</body>
|
75
|
-
</html>
|
data/lib/mutx/view/logs/log.mote
DELETED
data/lib/mutx/view/message.mote
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
<div style="padding: 20px; z-index: 9999; position: absolute; top: 20px; right: 20px;">
|
2
|
-
<div class="alert alert-info alert-dismissible fade in" role="alert">
|
3
|
-
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
4
|
-
<span aria-hidden="true"> × </span>
|
5
|
-
</button>
|
6
|
-
<strong>{{query_string.msg[0..30]}}</strong>
|
7
|
-
</div>
|
8
|
-
</div>
|
@@ -1,67 +0,0 @@
|
|
1
|
-
<div class='navbar navbar-inverse navbar-fixed-top'>
|
2
|
-
<div class='container'>
|
3
|
-
<div class='navbar-header'>
|
4
|
-
<button type='button' class='navbar-toggle' data-toggle='collapse' data-target='.navbar-collapse'>
|
5
|
-
<span class='icon-bar'></span>
|
6
|
-
<span class='icon-bar'></span>
|
7
|
-
<span class='icon-bar'></span>
|
8
|
-
<span class='icon-bar'></span>
|
9
|
-
<span class='icon-bar'></span>
|
10
|
-
<span class='icon-bar'></span>
|
11
|
-
<span class='icon-bar'></span>
|
12
|
-
</button>
|
13
|
-
<a class='navbar-brand' href='#'>{{Mutx::Support::Configuration.project_name}}</a>
|
14
|
-
</div>
|
15
|
-
<div class='collapse navbar-collapse'>
|
16
|
-
<ul class='nav navbar-nav'>
|
17
|
-
<li class='{{'active' if section =~ /test/}}'>
|
18
|
-
<a href='/tests'>Tests</a>
|
19
|
-
</li>
|
20
|
-
<li class='{{'active' if section =~ /task/}}'>
|
21
|
-
<a href='/tasks'>Tasks</a>
|
22
|
-
</li>
|
23
|
-
<li class='{{'active' if section == "features"}}'>
|
24
|
-
<a href='/features'>Features</a>
|
25
|
-
</li>
|
26
|
-
<li class='{{'active' if section == "results"}}'>
|
27
|
-
<a href='/results?type=all'>
|
28
|
-
Results
|
29
|
-
</a>
|
30
|
-
</li>
|
31
|
-
<li class='{{'active' if section == "all_results"}}'>
|
32
|
-
<a href='/results/all'>All Results</a>
|
33
|
-
</li>
|
34
|
-
<li class='{{'active' if section == "repo"}}'>
|
35
|
-
<a title='Open repository url' href='{{Mutx::Support::Configuration.project_url}}' target='_blank'>Repo</a>
|
36
|
-
</li>
|
37
|
-
<!--
|
38
|
-
<li class='{{section == "help" ? 'active' : ''}}'>
|
39
|
-
<a href='/help'>Help</a>
|
40
|
-
</li>
|
41
|
-
-->
|
42
|
-
<li class='{{'active' if section =~ /custom|admin|log/}}'>
|
43
|
-
<a href='#' class='dropdown-toggle' data-toggle='dropdown' role= 'button' aria-expanded='false'>
|
44
|
-
Admin
|
45
|
-
</a>
|
46
|
-
<ul class='dropdown-menu' role='menu'>
|
47
|
-
<li><a href='/admin/tasks/list'>Tasks</a></li>
|
48
|
-
<li><a href='/admin/custom/params'>Custom Parameters</a></li>
|
49
|
-
<li><a href='/admin/list/repositories'>Repositories</a>
|
50
|
-
<li role="presentation" class="divider"></li>
|
51
|
-
<li><a href='/logs/mutx'>Mutx Log</a>
|
52
|
-
<li><a href='/logs/sidekiq'>Sidekiq Log</a>
|
53
|
-
<li role="presentation" class="divider"></li>
|
54
|
-
<!-- <li><a href='/admin/config'>Configuration</a></li>
|
55
|
-
-->
|
56
|
-
</ul>
|
57
|
-
</li>
|
58
|
-
% if $result
|
59
|
-
<li class='{{'active' if section == "logout"}}'>
|
60
|
-
<a href='/logout'>Logout</a>
|
61
|
-
</li>
|
62
|
-
% end
|
63
|
-
</ul>
|
64
|
-
</div>
|
65
|
-
<!--/.nav-collapse -->
|
66
|
-
</div>
|
67
|
-
</div>
|
@@ -1,112 +0,0 @@
|
|
1
|
-
|
2
|
-
% type = "tasks"
|
3
|
-
|
4
|
-
% tasks_list = Mutx::API::Tasks.list({})
|
5
|
-
% Mutx::Support::Log.debug "Results for task name #{args[:task_name]}" if Mutx::Support::Log and args[:task_name]
|
6
|
-
% type = args[:type] || "all"
|
7
|
-
% unless tasks_list["tasks"].empty?
|
8
|
-
<!--
|
9
|
-
<div class='form-group'>
|
10
|
-
<label class='control-label' for='formGroupInputSmall'>Type</label>
|
11
|
-
<select id='type' name='type' class='customParam' >
|
12
|
-
<option value='all'>All</option>
|
13
|
-
<option value='tests' {{selected if type=="tests"}}>Tests</option>
|
14
|
-
<option value='tasks' {{selected if type=="tasks"}}>Tasks</option>
|
15
|
-
</select>
|
16
|
-
</div>
|
17
|
-
-->
|
18
|
-
% tasks_list["tasks"].select!{|task| task["name"]==args[:task_name]} if args[:task_name]
|
19
|
-
% tasks_list["tasks"].each do |task|
|
20
|
-
% results_list = Mutx::API::Result.results_list_for(task["_id"])
|
21
|
-
% if results_list.size > 0
|
22
|
-
% results_list_size = Mutx::View.round_plus(results_list.size)
|
23
|
-
<div class="panel panel-primary">
|
24
|
-
<div class="panel-heading" data-toggle="collapse" data-target='#{{task["_id"]}}'>
|
25
|
-
<h3 class="panel-title">
|
26
|
-
{{task["name"]}}
|
27
|
-
<div class="pull-right">{{results_list_size}} Results</div>
|
28
|
-
</h3>
|
29
|
-
<div></div>
|
30
|
-
</div>
|
31
|
-
<div class="panel-body collapse in" id='{{task["_id"]}}'>
|
32
|
-
<table class="table">
|
33
|
-
<thead>
|
34
|
-
<tr>
|
35
|
-
<th style="font-weight: bold;">When started</th>
|
36
|
-
<th style="font-weight: bold;">Label</th>
|
37
|
-
<th style="font-weight: bold;">Time Elapsed</th>
|
38
|
-
<th style="font-weight: bold; text-align: center;">Viewed</th>
|
39
|
-
<th style="font-weight: bold; text-align: center;">Notified</th>
|
40
|
-
<th style="font-weight: bold; text-align: center;">File Attached</th>
|
41
|
-
<th style="font-weight: bold;">Console</th>
|
42
|
-
<th style="font-weight: bold;">Status</th>
|
43
|
-
</tr>
|
44
|
-
</thead>
|
45
|
-
% result_template = Mote.parse(File.read("#{Mutx::View.path}/results/result.mote"), self, [:result])
|
46
|
-
% results_list_size = results_list.size
|
47
|
-
% results_list = results_list[0..2] unless args[:task_name]
|
48
|
-
% results_list.each do |result_data|
|
49
|
-
{{result_template.call(result:result_data)}}
|
50
|
-
% end
|
51
|
-
</table>
|
52
|
-
<div class="text-center">
|
53
|
-
<a href="/tasks/{{task["name"]}}" class="btn btn-info">
|
54
|
-
Go to task
|
55
|
-
</a>
|
56
|
-
% unless args[:task_name]
|
57
|
-
<a href="/results/task/{{task["name"]}}" class="btn btn-default">
|
58
|
-
All results for this {{args[:type]}}
|
59
|
-
<span class="label label-info label-as-badge">
|
60
|
-
{{results_list_size}}
|
61
|
-
</span>
|
62
|
-
</a>
|
63
|
-
% end
|
64
|
-
</div>
|
65
|
-
</div>
|
66
|
-
</div>
|
67
|
-
% else
|
68
|
-
<!--
|
69
|
-
<br>
|
70
|
-
<br>
|
71
|
-
<div id='well'>
|
72
|
-
<h4>No results found for execution: '{{task[:name]}}', go ahead and run it</h4>
|
73
|
-
</div>
|
74
|
-
<br>
|
75
|
-
<br>
|
76
|
-
-->
|
77
|
-
% end
|
78
|
-
% end
|
79
|
-
% end
|
80
|
-
% if tasks_list["tasks"].empty?
|
81
|
-
<!--
|
82
|
-
<br>
|
83
|
-
<br>
|
84
|
-
<div id='well'>
|
85
|
-
<h3>No results found, go ahead create and run a task</h3>
|
86
|
-
</div>
|
87
|
-
<br>
|
88
|
-
<br>
|
89
|
-
-->
|
90
|
-
% end
|
91
|
-
|
92
|
-
<style>
|
93
|
-
#well {
|
94
|
-
aling: right;
|
95
|
-
height: 50px;
|
96
|
-
background: #F5F5F5;
|
97
|
-
width: 600px;
|
98
|
-
font-size: 20px;
|
99
|
-
#font-style: oblique;
|
100
|
-
color: #696969;
|
101
|
-
text-align: center;
|
102
|
-
padding: 0 20px;
|
103
|
-
margin: 20px;
|
104
|
-
display: flex;
|
105
|
-
justify-content: center;
|
106
|
-
/* align horizontal */
|
107
|
-
align-items: center;
|
108
|
-
/* align vertical */
|
109
|
-
margin-right: auto;
|
110
|
-
margin-left: auto;
|
111
|
-
}
|
112
|
-
</style>
|
@@ -1,37 +0,0 @@
|
|
1
|
-
<?
|
2
|
-
title = "<p>Click on result or return to tasks</p>"
|
3
|
-
alert = "info"
|
4
|
-
buttons = "<a href='/tasks' class='btn btn-info' >Go to Tasks</a>"
|
5
|
-
|
6
|
-
result_id = args[:result_id]
|
7
|
-
result = Mutx::Results::Result.get(result_id)
|
8
|
-
|
9
|
-
if result
|
10
|
-
type = result.task_type.capitalize
|
11
|
-
task_name = result.task_name
|
12
|
-
|
13
|
-
if result.has_started_message?
|
14
|
-
title = result.get_started_message!
|
15
|
-
|
16
|
-
alert = "success"
|
17
|
-
buttons = "
|
18
|
-
<a href='/#{type.downcase}s/#{task_name}' class='btn btn-info' >Go to '#{task_name}'</a>
|
19
|
-
<a href='/#{type.downcase}s' class='btn btn-default' >Go to #{type.capitalize}s</a>
|
20
|
-
"
|
21
|
-
end
|
22
|
-
|
23
|
-
end
|
24
|
-
?>
|
25
|
-
|
26
|
-
<div class="alert alert-{{alert}}" role="alert">
|
27
|
-
|
28
|
-
<H3>
|
29
|
-
<!--<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>--> {{title}}
|
30
|
-
</H3>
|
31
|
-
<p> </p>
|
32
|
-
<p> </p>
|
33
|
-
<p>
|
34
|
-
{{buttons}}
|
35
|
-
<a href='/results/{{result_id}}/log', '_blank', 'toolbar=no, scrollbars=yes, resizable=yes, top=300, left=300, width=800, height=600';" class='btn btn-primary'>Go to Result</a>
|
36
|
-
</p>
|
37
|
-
</div>
|
@@ -1,167 +0,0 @@
|
|
1
|
-
<?
|
2
|
-
|
3
|
-
puts "========================================"
|
4
|
-
puts task_data
|
5
|
-
puts "========================================"
|
6
|
-
|
7
|
-
task = task_data["task"]
|
8
|
-
|
9
|
-
#task = Mutx::Tasks::Task.get(task_name)
|
10
|
-
|
11
|
-
|
12
|
-
running_results = Mutx::Results.running_results_for_task_id task["_id"]
|
13
|
-
|
14
|
-
|
15
|
-
max_number_of_execs_reached = running_results.size == task["max_execs"]
|
16
|
-
|
17
|
-
status = if running_results.size>0
|
18
|
-
"running"
|
19
|
-
else
|
20
|
-
"ready"
|
21
|
-
end
|
22
|
-
|
23
|
-
run_on = []
|
24
|
-
run_on << 'Sunday' if task["su"]=="on"
|
25
|
-
run_on << 'Monday' if task["mo"]=="on"
|
26
|
-
run_on << 'Tuesday' if task["tu"]=="on"
|
27
|
-
run_on << 'Wednesday' if task["we"]=="on"
|
28
|
-
run_on << 'Thursday' if task["th"]=="on"
|
29
|
-
run_on << 'Friday' if task["fr"]=="on"
|
30
|
-
run_on << 'Saturday' if task["sa"]=="on"
|
31
|
-
|
32
|
-
if run_on.empty?
|
33
|
-
run_on << "everyday"
|
34
|
-
end
|
35
|
-
|
36
|
-
if task["start_time"] and task["stop_time"]
|
37
|
-
from_to = "from " + task["start_time"] + " to " + task["stop_time"]
|
38
|
-
end
|
39
|
-
|
40
|
-
color = Mutx::View.color(status)
|
41
|
-
|
42
|
-
?>
|
43
|
-
<div class='starter-template'>
|
44
|
-
<div class='panel panel-{{color}}'>
|
45
|
-
<div class='panel-heading' data-toggle='collapse' data-target='#{{task["name"].gsub(' ','')}}'>
|
46
|
-
<h4 class='panel-title'>{{task["name"]}}</h4>
|
47
|
-
% if status=="running"
|
48
|
-
<i class="fa fa-cog fa-spin fa-2x fa-fw margin-bottom"></i>
|
49
|
-
% end
|
50
|
-
</div>
|
51
|
-
|
52
|
-
<div class='panel-body collapse in' id='{{task["name"].gsub(' ','')}}'>
|
53
|
-
<ul class='list-group'>
|
54
|
-
<!-- Si la task está en running se muestran las ejecuciones -->
|
55
|
-
% if running_results.size > 0
|
56
|
-
<li class='list-group-item'>
|
57
|
-
Running {{running_results.size}} tasks
|
58
|
-
% if max_number_of_execs_reached
|
59
|
-
<small>(Maximum no. of execution reached)</small>
|
60
|
-
% end
|
61
|
-
<div class='panel-body'>
|
62
|
-
<div class='list-group'>
|
63
|
-
% running_results.each do |result|
|
64
|
-
<a class='list-group-item' onclick="refreshAndOpen('/results/{{result["_id"]}}/log/');">
|
65
|
-
{{Mutx::Support::TimeHelper.formatted_time_for(Mutx::Results::Result.get(result["_id"]).started_at)}}
|
66
|
-
<small>{{result["execution_name"]}}</small>
|
67
|
-
{{Mutx::View.only_label_for result}}
|
68
|
-
</a>
|
69
|
-
% end
|
70
|
-
</div>
|
71
|
-
</div>
|
72
|
-
</li>
|
73
|
-
% end
|
74
|
-
% unless max_number_of_execs_reached
|
75
|
-
<li class='list-group-item'>
|
76
|
-
% task_type = (task["type"] == "test") ? "tests" : "tasks"
|
77
|
-
% form_url = "/#{task_type}/#{task["name"]}/run"
|
78
|
-
<form name='run' id='{{task["name"]}}' method='get' action='{{form_url}}'>
|
79
|
-
|
80
|
-
% unless task["custom_params"].empty?
|
81
|
-
% custom_template = Mote.parse(File.read("#{Mutx::View.path}/custom/params.mote"), self, [:custom_params])
|
82
|
-
{{custom_template.call(custom_params:task["custom_params"])}}
|
83
|
-
% end
|
84
|
-
<br><br>
|
85
|
-
<button type='submit' class='btn btn-success' value='Execute'/>Execute
|
86
|
-
<span class="glyphicon glyphicon-send" aria-hidden="true"></span>
|
87
|
-
</button>
|
88
|
-
<input type='text' name='execution_name' class='customParam' title='This value could be used to identify the result execution from other execution of this task. E.g: You could use the release your are going to test' placeholder='Identify your execution' value='{{Mutx::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;' />
|
89
|
-
<button type='button' class='btn btn-default' aria-label='Left Align' data-toggle='modal' data-target='#myModal' onclick='javascript:starterLink("{{task['name']}}","{{task['type']}}");'>
|
90
|
-
<span class='glyphicon glyphicon-share' aria-hidden='true'></span>
|
91
|
-
Share
|
92
|
-
</button>
|
93
|
-
<a href='/results/task/{{task["name"].gsub(' ','%20')}}' class='btn btn-primary'>
|
94
|
-
<span class="glyphicon glyphicon-list" aria-hidden="true"></span>
|
95
|
-
Results
|
96
|
-
</a>
|
97
|
-
<br>
|
98
|
-
|
99
|
-
<!--
|
100
|
-
<li class='list-group-item'>
|
101
|
-
Command: {{task["command"]}}
|
102
|
-
</li>
|
103
|
-
-->
|
104
|
-
|
105
|
-
<!-- cron info -->
|
106
|
-
|
107
|
-
% if task["cronneable"]=="on"
|
108
|
-
<br>
|
109
|
-
<li class="list-group-item">
|
110
|
-
<span class="glyphicon glyphicon-repeat" aria-hidden="true"></span> Run every {{task["cron_time"]}} minutes
|
111
|
-
|
112
|
-
% unless run_on.empty?
|
113
|
-
<br>
|
114
|
-
on:
|
115
|
-
% run_on.each do |day|
|
116
|
-
<span class='label label-default'>{{day}} </span>
|
117
|
-
% end
|
118
|
-
|
119
|
-
% end
|
120
|
-
% if from_to
|
121
|
-
<br>
|
122
|
-
{{from_to}}
|
123
|
-
|
124
|
-
% end
|
125
|
-
</li>
|
126
|
-
% end
|
127
|
-
|
128
|
-
<!-- end cron info -->
|
129
|
-
|
130
|
-
<!-- notification info -->
|
131
|
-
% if task["notifications"]=="on"
|
132
|
-
<br>
|
133
|
-
<li class="list-group-item">
|
134
|
-
<span class="glyphicon glyphicon-envelope" aria-hidden="true"></span> Notification on {{task["notify_on"]}}
|
135
|
-
<br>
|
136
|
-
Recipients: {{task["mail"]}}
|
137
|
-
<br>
|
138
|
-
Subject: {{task["subject"]}}
|
139
|
-
</li>
|
140
|
-
% end
|
141
|
-
<!-- end notification info -->
|
142
|
-
|
143
|
-
% if task["information"]
|
144
|
-
<br><br>
|
145
|
-
<p><figure class="highlight">{{task["information"].gsub('\n','<br>')}}</figure></p>
|
146
|
-
|
147
|
-
<br>
|
148
|
-
% end
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
</form>
|
153
|
-
</li>
|
154
|
-
% end
|
155
|
-
</li>
|
156
|
-
</ul>
|
157
|
-
|
158
|
-
% if task["last_result"] # There is at least one result
|
159
|
-
% if task["results"]["size"] > 0
|
160
|
-
<a href='/results/task/{{task["name"].gsub(' ','%20')}}' class='btn btn-default pull-center'>All results({{task["results"]["size"]}})</a>
|
161
|
-
% end
|
162
|
-
% else
|
163
|
-
|
164
|
-
% end
|
165
|
-
</div>
|
166
|
-
</div>
|
167
|
-
</div>
|