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
@@ -15,6 +15,8 @@ module Mutx
|
|
15
15
|
|
16
16
|
end
|
17
17
|
|
18
|
+
# Returns true if delete fiven file_name
|
19
|
+
# @param [String] file_name
|
18
20
|
def self.delete_file file_name
|
19
21
|
begin
|
20
22
|
File.delete("#{file_name}") and true
|
@@ -34,15 +36,22 @@ module Mutx
|
|
34
36
|
report = all_mutx_reports.select do |file|
|
35
37
|
file.include? text
|
36
38
|
end.first
|
37
|
-
|
38
|
-
|
39
|
+
if delete_file(report)
|
40
|
+
Mutx::Support::Log.debug "Execution files(id=#{result.id}) cleanned" and true
|
41
|
+
else
|
42
|
+
false
|
43
|
+
end
|
39
44
|
end
|
40
45
|
|
41
46
|
def self.delete_html_report_for result_id
|
42
47
|
file = all_mutx_reports.select do |file|
|
43
48
|
file.include? result_id
|
44
49
|
end.first
|
45
|
-
|
50
|
+
if file
|
51
|
+
delete_file(file) and true
|
52
|
+
else
|
53
|
+
false
|
54
|
+
end
|
46
55
|
end
|
47
56
|
|
48
57
|
def self.all_mutx_reports
|
data/lib/mutx/support/git.rb
CHANGED
@@ -157,7 +157,6 @@ module Mutx
|
|
157
157
|
|
158
158
|
def self.log
|
159
159
|
res = Mutx::Support::Console.execute "git log"
|
160
|
-
|
161
160
|
end
|
162
161
|
|
163
162
|
def self.log_last_commit
|
@@ -168,10 +167,20 @@ module Mutx
|
|
168
167
|
self.commits.first
|
169
168
|
end
|
170
169
|
|
170
|
+
# Returns an Array of changed files on last commit
|
171
|
+
# @return [Array] ["path/file_1","path/file_2".."path/file_n"]
|
172
|
+
def self.changed_files_on_last_commit
|
173
|
+
res = Mutx::Support::Console.execute("git diff-tree --no-commit-id --name-only -r #{self.get_last_commit_id}")
|
174
|
+
res.split(" ")
|
175
|
+
end
|
176
|
+
|
177
|
+
# Returns true if the obtained commit is different from the last saved commit
|
178
|
+
# @return [Bool]
|
171
179
|
def self.is_there_commit_id_diff? obtained_commit
|
172
|
-
obtained_commit != self.
|
180
|
+
obtained_commit != self.get_last_commit_id
|
173
181
|
end
|
174
182
|
|
183
|
+
|
175
184
|
def self.remote_url
|
176
185
|
res = Mutx::Support::Console.execute("git config --get remote.origin.url").split("\n").first.gsub(":","/").gsub("git@", 'http://').chop
|
177
186
|
res[0..-5] if res.end_with? ".git"
|
data/lib/mutx/tasks/task.rb
CHANGED
@@ -67,7 +67,7 @@ module Mutx
|
|
67
67
|
@framework = task_data["framework"]
|
68
68
|
@command = task_data["command"]
|
69
69
|
@custom_params = task_data["custom_params"] || []
|
70
|
-
@information = task_data["information"]
|
70
|
+
@information = task_data["information"] if (task_data["information"] and task_data["information"] != "")
|
71
71
|
@running_execs = []
|
72
72
|
@cucumber = task_data["cucumber"]
|
73
73
|
@cucumber_report = task_data["cucumber_report"]
|
@@ -263,6 +263,12 @@ module Mutx
|
|
263
263
|
end
|
264
264
|
end
|
265
265
|
|
266
|
+
def switch!
|
267
|
+
@task_status = @task_status == "on" ? "off" : "on"
|
268
|
+
self.save!
|
269
|
+
@task_status
|
270
|
+
end
|
271
|
+
|
266
272
|
def task_data_for task_name
|
267
273
|
Mutx::Database::MongoConnector.task_data_for(task_name)
|
268
274
|
end
|
@@ -321,7 +327,7 @@ module Mutx
|
|
321
327
|
self.type == "test"
|
322
328
|
end
|
323
329
|
|
324
|
-
def push_exec result_id
|
330
|
+
def push_exec! result_id
|
325
331
|
@running_execs << result_id
|
326
332
|
self.save!
|
327
333
|
end
|
data/lib/mutx/version.rb
CHANGED
@@ -1,10 +1,9 @@
|
|
1
1
|
<?
|
2
|
-
custom_param = Mutx::Tasks::Custom::Param.get(args[:custom_param_id]).structure
|
3
2
|
types = Mutx::Tasks::Custom::Param.types
|
4
3
|
options = custom_param["options"].join(",").gsub("none,","")
|
5
4
|
?>
|
6
5
|
<nav class="navbar navbar-default">
|
7
|
-
<form name="delete-custom-param" id="delete-custom-param" action="
|
6
|
+
<form name="delete-custom-param" id="delete-custom-param" action="{{ path_for(:admin_custom_params_destroy, custom_param_id: custom_param["_id"]) }}" method="POST">
|
8
7
|
<div class='form-group'>
|
9
8
|
<br>
|
10
9
|
<label class='col-sm-2 control-label' for='formGroupInputSmall'>
|
@@ -36,8 +35,7 @@ options = custom_param["options"].join(",").gsub("none,","")
|
|
36
35
|
% elsif custom_param["type"]=="json"
|
37
36
|
<div class='form-group'>
|
38
37
|
<label class='col-sm-2 control-label' for='formGroupInputSmall'>Value</label>
|
39
|
-
|
40
|
-
{{param_representation}}
|
38
|
+
{{ partial('custom-params/types/json', param: custom_param, no_label: true) }}
|
41
39
|
</div>
|
42
40
|
%end
|
43
41
|
<div class='form-group'>
|
@@ -1,10 +1,5 @@
|
|
1
1
|
<?
|
2
|
-
|
3
|
-
query_string = args[:query_string]
|
4
|
-
|
5
|
-
action = args[:action]
|
6
2
|
if action=="edit"
|
7
|
-
custom_param = Mutx::Tasks::Custom::Param.get(args[:custom_param_id]).structure
|
8
3
|
name = custom_param["name"]
|
9
4
|
type = custom_param["type"]
|
10
5
|
value = custom_param["value"]
|
@@ -16,8 +11,9 @@ if action=="edit"
|
|
16
11
|
else
|
17
12
|
value.gsub('"=>"','":"') if type=="json"
|
18
13
|
end
|
19
|
-
|
20
|
-
|
14
|
+
path = path_for(:admin_custom_params_update, custom_param_id: custom_param['_id'])
|
15
|
+
else
|
16
|
+
path = path_for(:admin_custom_params_create)
|
21
17
|
end
|
22
18
|
|
23
19
|
|
@@ -60,7 +56,7 @@ types.unshift("Select...") unless types.include? "Select..."
|
|
60
56
|
</script>
|
61
57
|
|
62
58
|
<nav class="navbar navbar-default">
|
63
|
-
<form name="custom-param" id="custom-param" action="
|
59
|
+
<form name="custom-param" id="custom-param" action="{{ path }}" method="POST">
|
64
60
|
<div class='form-group'>
|
65
61
|
<br>
|
66
62
|
<label class='col-sm-2 control-label' for='formGroupInputSmall'>
|
@@ -102,7 +98,7 @@ types.unshift("Select...") unless types.include? "Select..."
|
|
102
98
|
<br>
|
103
99
|
<div class='form-group'>
|
104
100
|
<label class='col-sm-2 control-label' for='formGroupInputSmall'></label>
|
105
|
-
<input type="submit" class="btn btn-success" value="Save"> <a class="btn btn-danger" href="
|
101
|
+
<input type="submit" class="btn btn-success" value="Save"> <a class="btn btn-danger" href="{{ path_for(:admin_custom_params_index) }}">Cancel</a>
|
106
102
|
</div>
|
107
103
|
<br>
|
108
104
|
</form>
|
@@ -17,8 +17,7 @@
|
|
17
17
|
<label class='control-label' for='formGroupInputSmall'>{{custom_param['name']}}</label>
|
18
18
|
</td>
|
19
19
|
<td>
|
20
|
-
|
21
|
-
{{custom_param_template.call(param:custom_param, no_label:true, task_form:true)}}
|
20
|
+
{{ partial("custom-params/types/#{custom_param["type"]}", param: custom_param, no_label: true, task_form: true) }}
|
22
21
|
</td>
|
23
22
|
</tr>
|
24
23
|
% end
|
@@ -1,5 +1,3 @@
|
|
1
|
-
% form_template = Mote.parse(File.read("#{Mutx::View.path}/custom/params/delete_form.mote"), self, [:args])
|
2
|
-
|
3
1
|
<div class="panel panel-info">
|
4
2
|
<!-- Default panel contents -->
|
5
3
|
<div class="panel-heading"><h2>Delete Custom Parameter</h2></div>
|
@@ -9,7 +7,7 @@
|
|
9
7
|
|
10
8
|
<div class="panel-success">
|
11
9
|
<div class="panel-body">
|
12
|
-
{{
|
10
|
+
{{ partial('admin/custom-params/_delete_form', custom_param: custom_param) }}
|
13
11
|
</div>
|
14
12
|
</div>
|
15
13
|
</div>
|
@@ -1,5 +1,3 @@
|
|
1
|
-
% form_template = Mote.parse(File.read("#{Mutx::View.path}/custom/params/create_edit_form.mote"), self, [:args])
|
2
|
-
% args["action"]="edit"
|
3
1
|
<div class="panel panel-info">
|
4
2
|
<!-- Default panel contents -->
|
5
3
|
<div class="panel-heading"><h2>Edit Custom Parameter</h2></div>
|
@@ -9,9 +7,7 @@
|
|
9
7
|
|
10
8
|
<div class="panel-warning">
|
11
9
|
<div class="panel-body">
|
12
|
-
|
13
|
-
{{form_template.call(args:args)}}
|
14
|
-
|
10
|
+
{{ partial('admin/custom-params/_form', action: 'edit', custom_param: custom_param)}}
|
15
11
|
</div>
|
16
12
|
</div>
|
17
13
|
</div>
|
@@ -1,22 +1,18 @@
|
|
1
|
-
<?
|
2
|
-
custom_params_list = Mutx::API::CustomParams.list
|
3
|
-
?>
|
4
|
-
|
5
1
|
<div class="panel panel-default">
|
6
2
|
<!-- Default panel contents -->
|
7
3
|
<div class="panel-heading"><h2>Custom Parameters</h2></div>
|
8
4
|
<div class="panel-body">
|
9
|
-
<p><a class="btn btn-success" href="
|
5
|
+
<p><a class="btn btn-success" href="{{ path_for(:admin_custom_params_new) }}">New Custom Param</a></p>
|
10
6
|
</div>
|
11
7
|
|
12
8
|
<div class="panel-success">
|
13
9
|
<div class="panel-body">
|
14
10
|
<!-- Table -->
|
15
11
|
<table class="table">
|
16
|
-
% unless
|
12
|
+
% unless custom_params.empty?
|
17
13
|
<thead>
|
18
14
|
<tr>
|
19
|
-
%
|
15
|
+
% custom_params.first.keys.select{|key| !(["action","options","value"].include? key)}.each do |header|
|
20
16
|
<td><b>{{header.gsub(/(-|_)/," ").capitalize}}</b></td>
|
21
17
|
% end
|
22
18
|
<td><b>Representation</b></td>
|
@@ -24,7 +20,7 @@
|
|
24
20
|
</tr>
|
25
21
|
</thead>
|
26
22
|
<tbody>
|
27
|
-
%
|
23
|
+
% custom_params.each do |custom_param|
|
28
24
|
<tr>
|
29
25
|
% custom_param.select{|key,value| !(["options","value"].include? key)}.each_pair do |key, value|
|
30
26
|
<?
|
@@ -37,14 +33,13 @@
|
|
37
33
|
{{value}}
|
38
34
|
</td>
|
39
35
|
%end
|
40
|
-
<td>
|
41
|
-
|
42
|
-
{{param_representation}}
|
36
|
+
<td>
|
37
|
+
{{ partial("custom-params/types/#{custom_param["type"]}", param:custom_param, no_label:true, task_form:false) }}
|
43
38
|
</td>
|
44
39
|
<td>
|
45
40
|
<div class="btn-group">
|
46
|
-
<a href="
|
47
|
-
<a href="
|
41
|
+
<a href="{{ path_for(:admin_custom_params_edit, custom_param_id: custom_param["_id"]) }}"><button type="button" class="btn btn-info">Edit</button></a>
|
42
|
+
<a href="{{ path_for(:admin_custom_params_delete, custom_param_id: custom_param["_id"]) }}"><button type="button" class="btn btn-danger">Delete</button></a>
|
48
43
|
</div>
|
49
44
|
</td>
|
50
45
|
</tr>
|
@@ -1,5 +1,3 @@
|
|
1
|
-
% form_template = Mote.parse(File.read("#{Mutx::View.path}/custom/params/create_edit_form.mote"), self, [:args])
|
2
|
-
% args["action"]="edit"
|
3
1
|
<div class="panel panel-info">
|
4
2
|
<!-- Default panel contents -->
|
5
3
|
<div class="panel-heading"><h2>New Custom Parameter</h2></div>
|
@@ -9,9 +7,7 @@
|
|
9
7
|
|
10
8
|
<div class="panel-success">
|
11
9
|
<div class="panel-body">
|
12
|
-
|
13
|
-
{{form_template.call(args:args)}}
|
14
|
-
|
10
|
+
{{ partial('admin/custom-params/_form', action: 'new', custom_param: nil) }}
|
15
11
|
</div>
|
16
12
|
</div>
|
17
13
|
</div>
|
@@ -14,9 +14,8 @@ custom_params_list = Mutx::API::CustomParams.list
|
|
14
14
|
<label class='control-label' for='formGroupInputSmall'>{{custom_param['name']}}</label>
|
15
15
|
</td>
|
16
16
|
<td>
|
17
|
-
|
18
|
-
{{custom_param_template.call(param:custom_param, no_label:true, task_form:true)}}
|
17
|
+
{{ partial("custom-params/types/#{custom_param['type']}", param: custom_param, no_label: true, task_form: true) }}
|
19
18
|
</td>
|
20
19
|
</tr>
|
21
20
|
% end
|
22
|
-
</table>
|
21
|
+
</table>
|
@@ -1,13 +1,9 @@
|
|
1
|
-
<?
|
2
|
-
repo_list = Mutx::Database::MongoConnector.all_repos
|
3
|
-
?>
|
4
|
-
|
5
1
|
<div class="panel panel-success">
|
6
2
|
<!-- Default panel contents -->
|
7
3
|
<div class="panel-heading"><h2>Listing Repos</h2><h5><a href="#" title="Click here to know what this means" class="label label-info" aria-hidden="true" data-toggle="modal" data-target="#myModal" onclick="javascript:info('Update Repo', 'To update a repo the path must be: /:token/:repo_name . Send value in body as application/json { foo: bar, foo_1: bar_1 } . Without a valid token you cannot update');">
|
8
4
|
?</a></h5></div>
|
9
5
|
<div class="panel-body">
|
10
|
-
<p><a class="btn btn-success" href="
|
6
|
+
<p><a class="btn btn-success" href="{{ path_for(:admin_repositories_new) }}">New Repo</a></p>
|
11
7
|
</div>
|
12
8
|
<div class="panel-success">
|
13
9
|
<div class="panel-body">
|
@@ -21,7 +17,7 @@
|
|
21
17
|
</tr>
|
22
18
|
</thead>
|
23
19
|
<tbody>
|
24
|
-
%
|
20
|
+
% repositories.each do |repo|
|
25
21
|
<tr>
|
26
22
|
<td>{{repo[:repo_name]}}</td>
|
27
23
|
<td>{{repo[:repo_token]}}</td>
|
@@ -1,8 +1,4 @@
|
|
1
1
|
<?
|
2
|
-
|
3
|
-
query_string = args[:query_string]
|
4
|
-
|
5
|
-
action = args[:action]
|
6
2
|
if action=="edit"
|
7
3
|
custom_param = Mutx::Tasks::Custom::Param.get(args[:custom_param_id]).structure
|
8
4
|
name = custom_param["name"]
|
@@ -34,7 +30,7 @@ types.unshift("Select...") unless types.include? "Select..."
|
|
34
30
|
?>
|
35
31
|
<div class="panel-heading"><h2>New Repo</h2></div>
|
36
32
|
<nav class="navbar navbar-default">
|
37
|
-
<form name="create-repo" id="create-repo" action="
|
33
|
+
<form name="create-repo" id="create-repo" action="{{ path_for(:admin_repositories_create) }}" method="POST">
|
38
34
|
<div class='form-group'>
|
39
35
|
<br>
|
40
36
|
<label class='col-sm-2 control-label' for='formGroupInputSmall'>
|
@@ -44,7 +40,7 @@ types.unshift("Select...") unless types.include? "Select..."
|
|
44
40
|
</div>
|
45
41
|
<div class='form-group'>
|
46
42
|
<label class='col-sm-2 control-label' for='formGroupInputSmall'></label>
|
47
|
-
<input type="submit" class="btn btn-success" value="Save"> <a class="btn btn-danger" href="
|
43
|
+
<input type="submit" class="btn btn-success" value="Save"> <a class="btn btn-danger" href="{{ path_for(:admin_repositories_index) }}">Cancel</a>
|
48
44
|
</div>
|
49
45
|
<br>
|
50
46
|
</form>
|
@@ -1,13 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
query_string = args[:query_string]
|
4
|
-
|
5
|
-
task = Mutx::Tasks::Task.get(args[:task_id]).task_data_structure
|
6
|
-
|
7
|
-
|
8
|
-
?>
|
9
|
-
|
10
|
-
<form name="custom-param" id="custom-param" action="/admin/tasks/delete" method="POST">
|
1
|
+
<form name="custom-param" id="custom-param" action="{{ path_for(:admin_tasks_destroy, task_id: task["_id"]) }}" method="POST">
|
11
2
|
<nav class="navbar navbar-default">
|
12
3
|
<table width="100%">
|
13
4
|
<tr>
|
@@ -67,8 +58,7 @@ task = Mutx::Tasks::Task.get(args[:task_id]).task_data_structure
|
|
67
58
|
<table>
|
68
59
|
<tr>
|
69
60
|
<td>
|
70
|
-
|
71
|
-
{{custom_param_selection_box}}
|
61
|
+
{{ partial('admin/custom-params/task_deleting_box', custom_params: task["custom_params"]) }}
|
72
62
|
</td>
|
73
63
|
</tr>
|
74
64
|
</table>
|
@@ -1,10 +1,6 @@
|
|
1
1
|
<?
|
2
2
|
|
3
|
-
query_string = args[:query_string]
|
4
|
-
|
5
|
-
action = args[:action]
|
6
3
|
if ["edit","view"].include? action
|
7
|
-
task = Mutx::Tasks::Task.get(args[:task_id]).task_data_structure
|
8
4
|
name = task["name"]
|
9
5
|
type = task["type"]
|
10
6
|
value = task["value"]
|
@@ -60,7 +56,9 @@ if ["edit","view"].include? action
|
|
60
56
|
else
|
61
57
|
active_if_notify_on_any = "active"
|
62
58
|
end
|
63
|
-
|
59
|
+
path = :admin_tasks_update
|
60
|
+
else
|
61
|
+
path = :admin_tasks_create
|
64
62
|
end
|
65
63
|
|
66
64
|
|
@@ -102,7 +100,7 @@ application = task["application"].upcase if task
|
|
102
100
|
|
103
101
|
</script>
|
104
102
|
|
105
|
-
<form name="custom-param" id="custom-param" action="
|
103
|
+
<form name="custom-param" id="custom-param" action="{{ path_for(path) }}" method="POST">
|
106
104
|
<nav class="navbar navbar-default">
|
107
105
|
<h3> Task Configuration</h3>
|
108
106
|
<!--# name-->
|
@@ -401,8 +399,7 @@ application = task["application"].upcase if task
|
|
401
399
|
<h3> Select Input Parameters</h3>
|
402
400
|
<br>
|
403
401
|
<div class='form-group'>
|
404
|
-
|
405
|
-
{{custom_param_selection_box}}
|
402
|
+
{{ partial('admin/custom-params/selection_box', params: params) }}
|
406
403
|
</div>
|
407
404
|
</nav>
|
408
405
|
<nav class="navbar navbar-default">
|
@@ -414,7 +411,7 @@ application = task["application"].upcase if task
|
|
414
411
|
<div class="col-xs-6 col-md-4">
|
415
412
|
% unless action == "view"
|
416
413
|
<input type="submit" class="btn btn-success" value="Save">
|
417
|
-
<a class="btn btn-danger" href="
|
414
|
+
<a class="btn btn-danger" href="{{ path_for(:admin_tasks_index) }}">Cancel</a>
|
418
415
|
% end
|
419
416
|
</div>
|
420
417
|
</div>
|