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,77 +0,0 @@
|
|
1
|
-
<?
|
2
|
-
running_results = Mutx::Results.running_results_for_task_id(task["_id"])
|
3
|
-
status = if running_results.size > 0
|
4
|
-
"running"
|
5
|
-
else
|
6
|
-
"READY"
|
7
|
-
end
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
color = Mutx::View.color(status)
|
12
|
-
|
13
|
-
?>
|
14
|
-
<div class='starter-template'>
|
15
|
-
<div class='panel panel-{{color}}'>
|
16
|
-
<div class='panel-heading'">
|
17
|
-
<h3 class='panel-title' onclick="goClean('/tasks/{{task["name"].gsub(' ','%20')}}');">
|
18
|
-
{{task["name"]}}
|
19
|
-
% if task["cronneable"].eql? "on"
|
20
|
-
<a href="#" title= "Cronned task" class="label label-primary" aria-hidden="true"> <i class="fa fa-clock-o" aria-hidden="true"></i></a>
|
21
|
-
% end
|
22
|
-
% if ((task["blocked"].eql? "on") || (task["blocked_stop"].eql? "on"))
|
23
|
-
<a href="#" title= "Blocked task to run or stop" class="label label-primary" aria-hidden="true"> <i class="fa fa-lock" aria-hidden="true"></i></a>
|
24
|
-
% end
|
25
|
-
% if (task["notifications"].eql? "on")
|
26
|
-
<a href="#" title= "Task result must be notified" class="label label-primary" aria-hidden="true"> <i <span class="glyphicon glyphicon-envelope"></span></i></a>
|
27
|
-
% end
|
28
|
-
% res = Mutx::Database::MongoConnector.results_for(task["_id"]).first
|
29
|
-
% if ( (!res.nil?) && (res["file_attached"].eql? "yes") )
|
30
|
-
<a href="#" title= "Attached file on last result" class="label label-primary" aria-hidden="true"> <i <span class="glyphicon glyphicon-paperclip"></span></i></a>
|
31
|
-
%end
|
32
|
-
% if status=="running"
|
33
|
-
<i class="fa fa-cog fa-spin fa-1x fa-fw margin-bottom"></i>
|
34
|
-
% end
|
35
|
-
</h3>
|
36
|
-
</div>
|
37
|
-
<div class="panel-body">
|
38
|
-
% if (task["task_status"].eql? "off")
|
39
|
-
<a href="task/status/{{task["name"].gsub(' ','%20')}}" title= "Click to allow task to be cronned" class="label label-danger" aria-hidden="true"> <i>OFF</i></a>
|
40
|
-
% elsif (task["task_status"].eql? "on")
|
41
|
-
<a href="task/status/{{task["name"].gsub(' ','%20')}}" title= "Click to stop task and cannot be cronned" class="label label-success" aria-hidden="true"> <i>ON</i> </a>
|
42
|
-
% end
|
43
|
-
<a href='/{{task["type"]}}s/{{task["name"].gsub(' ','%20')}}' class='label label-success'>
|
44
|
-
Details</a>
|
45
|
-
<a href='/results/task/{{task["name"].gsub(' ','%20')}}' class='label label-info'>
|
46
|
-
{{Mutx::Results.results_ids_for(task["_id"]).size}} results</a>
|
47
|
-
% if task["information"]
|
48
|
-
<a href='#' title='{{task["information"]}}' class='label label-default' aria-hidden='true' data-toggle='modal' data-target='#myModal' onclick="javascript:info('Information about {{task["name"]}}','{{task["information"].gsub('\n','<br>')}}', null);">
|
49
|
-
Information</a>
|
50
|
-
% end
|
51
|
-
</div>
|
52
|
-
|
53
|
-
<div class="panel-body_aux">
|
54
|
-
% if status=="running"
|
55
|
-
<a href='#' title='See the last execution progress' class='label label-warning' onclick="refreshAndOpen('/results/{{running_results.last["_id"]}}/log');">
|
56
|
-
Last execution progress</a>
|
57
|
-
% end
|
58
|
-
</div>
|
59
|
-
</div>
|
60
|
-
</div>
|
61
|
-
|
62
|
-
<style>
|
63
|
-
.starter-template {
|
64
|
-
display:inline-block;
|
65
|
-
height: 70px;
|
66
|
-
margin: 25px;
|
67
|
-
width: auto;
|
68
|
-
margin-right: auto;
|
69
|
-
margin-left: auto;
|
70
|
-
}
|
71
|
-
.panel-body_aux {
|
72
|
-
display:inline-block;
|
73
|
-
margin: 5px;
|
74
|
-
width: auto;
|
75
|
-
padding: 10px;
|
76
|
-
}
|
77
|
-
</style>
|
@@ -1,74 +0,0 @@
|
|
1
|
-
<?
|
2
|
-
|
3
|
-
type = args[:section].downcase.scan(/task|test/).first
|
4
|
-
|
5
|
-
if args[:task_name]
|
6
|
-
raise Mutx::Error::TaskNotFound.new("Could not find task with name #{args[:task_name]}") unless Mutx::Tasks.is_there_task_with? args[:task_name]
|
7
|
-
template = Mote.parse(File.read("#{Mutx::View.path}/tasks/task.mote"), self, [:task_data])
|
8
|
-
task_data = Mutx::API::Task.info_for_name(args[:task_name])
|
9
|
-
content = template.call(task_data:task_data)
|
10
|
-
else
|
11
|
-
|
12
|
-
template = Mote.parse(File.read("#{Mutx::View.path}/tasks/task_item.mote"), self, [:task])
|
13
|
-
|
14
|
-
tasks_list = Mutx::API::Tasks.list(type:type)
|
15
|
-
end
|
16
|
-
|
17
|
-
?>
|
18
|
-
|
19
|
-
% unless args[:task_name]
|
20
|
-
% number_of_tasks = tasks_list["tasks"].size
|
21
|
-
<div class="bs-callout bs-callout-danger">
|
22
|
-
<h4> Showing {{number_of_tasks}} {{type}}{{number_of_tasks>1 ? 's':''}}<small> Click on any task title or details button to see more about a task</small></h4>
|
23
|
-
</div>
|
24
|
-
% end
|
25
|
-
% if args[:task_name]
|
26
|
-
{{content}}
|
27
|
-
% else
|
28
|
-
% tasks_list_aux = []
|
29
|
-
|
30
|
-
%tasks_list = tasks_list["tasks"].sort_by!{ |m| m["name"].downcase }
|
31
|
-
|
32
|
-
% tasks_list.each do |task|
|
33
|
-
% res = nil
|
34
|
-
% res = Mutx::Database::MongoConnector.running_results_for_task_id(task["_id"])
|
35
|
-
% tasks_list_aux << task if res.empty?
|
36
|
-
% tasks_list_aux.unshift(task) if !res.empty?
|
37
|
-
% end
|
38
|
-
|
39
|
-
% tasks_list = tasks_list_aux
|
40
|
-
% tasks_list.each do |task_data|
|
41
|
-
{{template.call(task:task_data)}}
|
42
|
-
% end
|
43
|
-
% if tasks_list.empty?
|
44
|
-
<br>
|
45
|
-
<br>
|
46
|
-
<div id='well'>
|
47
|
-
<h3>No tasks defined, create a new task to run!</h3>
|
48
|
-
</div>
|
49
|
-
<br>
|
50
|
-
<br>
|
51
|
-
% end
|
52
|
-
% end
|
53
|
-
|
54
|
-
<style>
|
55
|
-
#well {
|
56
|
-
aling: right;
|
57
|
-
height: 50px;
|
58
|
-
background: #F5F5F5;
|
59
|
-
width: 600px;
|
60
|
-
font-size: 20px;
|
61
|
-
#font-style: oblique;
|
62
|
-
color: #696969;
|
63
|
-
text-align: center;
|
64
|
-
padding: 0 20px;
|
65
|
-
margin: 20px;
|
66
|
-
display: flex;
|
67
|
-
justify-content: center;
|
68
|
-
/* align horizontal */
|
69
|
-
align-items: center;
|
70
|
-
/* align vertical */
|
71
|
-
margin-right: auto;
|
72
|
-
margin-left: auto;
|
73
|
-
}
|
74
|
-
</style>
|