mutx 0.1.69 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (128) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/documentation/repos.md +21 -24
  4. data/lib/generators/task_rack.rb +8 -2
  5. data/lib/generators/templates/config.ru.tt +1 -1
  6. data/lib/mutx/API/execution.rb +8 -44
  7. data/lib/mutx/API/repo.rb +7 -10
  8. data/lib/mutx/background_jobs/workers/executor.rb +44 -38
  9. data/lib/mutx/commands/install.rb +1 -1
  10. data/lib/mutx/commands/start.rb +1 -1
  11. data/lib/mutx/custom/execution.rb +1 -1
  12. data/lib/mutx/database/mongo_connector.rb +19 -22
  13. data/lib/mutx/execution.rb +1 -0
  14. data/lib/mutx/lib/authentication.rb +23 -0
  15. data/lib/mutx/lib/helpers.rb +52 -0
  16. data/lib/mutx/lib/middlewares/database_middleware.rb +16 -0
  17. data/lib/mutx/lib/middlewares/flash_middleware.rb +31 -0
  18. data/lib/mutx/lib/middlewares/logger_middleware.rb +13 -0
  19. data/lib/mutx/lib/monkey_patch.rb +28 -0
  20. data/lib/mutx/lib/paths.rb +80 -0
  21. data/lib/mutx/platforms/ruby.rb +8 -0
  22. data/lib/mutx/public/css/bootstrap.min.css +7 -0
  23. data/lib/mutx/public/css/font-awesome.min.css +4 -0
  24. data/lib/mutx/public/css/jquery.json-viewer.css +44 -0
  25. data/{favicon.ico → lib/mutx/public/img/favicon.ico} +0 -0
  26. data/lib/mutx/public/js/bootstrap.min.js +6 -0
  27. data/lib/mutx/public/js/jquery.json-viewer.js +148 -0
  28. data/lib/mutx/public/js/jquery.min.js +6 -0
  29. data/lib/mutx/{view/javascript.mote → public/js/mutx.js} +0 -5
  30. data/lib/mutx/public/js/notify.min.js +1 -0
  31. data/lib/mutx/results/result.rb +60 -68
  32. data/lib/mutx/results/results.rb +4 -0
  33. data/lib/mutx/routes.rb +85 -883
  34. data/lib/mutx/routes/admin_routes.rb +16 -0
  35. data/lib/mutx/routes/admin_routes/custom_params_routes.rb +97 -0
  36. data/lib/mutx/routes/admin_routes/repositories_routes.rb +35 -0
  37. data/lib/mutx/routes/admin_routes/tasks_routes.rb +110 -0
  38. data/lib/mutx/routes/api_routes.rb +49 -0
  39. data/lib/mutx/routes/api_routes/custom_params_routes.rb +41 -0
  40. data/lib/mutx/routes/api_routes/input_routes.rb +48 -0
  41. data/lib/mutx/routes/api_routes/repos_routes.rb +74 -0
  42. data/lib/mutx/routes/api_routes/results_routes.rb +50 -0
  43. data/lib/mutx/routes/api_routes/tasks_routes.rb +47 -0
  44. data/lib/mutx/routes/api_routes/tests_routes.rb +42 -0
  45. data/lib/mutx/routes/features_routes.rb +24 -0
  46. data/lib/mutx/routes/help_routes.rb +23 -0
  47. data/lib/mutx/routes/logs_routes.rb +22 -0
  48. data/lib/mutx/routes/message_routes.rb +24 -0
  49. data/lib/mutx/routes/repositories_routes.rb +25 -0
  50. data/lib/mutx/routes/results_routes.rb +53 -0
  51. data/lib/mutx/routes/task_results_routes.rb +25 -0
  52. data/lib/mutx/routes/tasks_routes.rb +67 -0
  53. data/lib/mutx/routes/tests_routes.rb +66 -0
  54. data/lib/mutx/support/change_inspector.rb +3 -3
  55. data/lib/mutx/support/files_cleanner.rb +12 -3
  56. data/lib/mutx/support/git.rb +11 -2
  57. data/lib/mutx/support/processes.rb +2 -2
  58. data/lib/mutx/support/project_type.rb +12 -0
  59. data/lib/mutx/tasks/task.rb +8 -2
  60. data/lib/mutx/version.rb +1 -1
  61. data/lib/mutx/view/{custom/params/delete_form.mote → admin/custom-params/_delete_form.mote} +2 -4
  62. data/lib/mutx/view/{custom/params/create_edit_form.mote → admin/custom-params/_form.mote} +5 -9
  63. data/lib/mutx/view/{custom/params/custom_param_task_deleting_box.mote → admin/custom-params/_task_deleting_box.mote} +1 -2
  64. data/lib/mutx/view/{custom/params → admin/custom-params}/delete.mote +1 -3
  65. data/lib/mutx/view/{custom/params → admin/custom-params}/edit.mote +1 -5
  66. data/lib/mutx/view/{custom/params/list.mote → admin/custom-params/index.mote} +8 -13
  67. data/lib/mutx/view/{custom/params → admin/custom-params}/new.mote +1 -5
  68. data/lib/mutx/view/{custom/params/custom_param_selection_box.mote → admin/custom-params/selection_box.mote} +2 -3
  69. data/lib/mutx/view/{list_repos.mote → admin/repositories/index.mote} +2 -6
  70. data/lib/mutx/view/{repos.mote → admin/repositories/new.mote} +2 -6
  71. data/lib/mutx/view/{tasks/admin/delete_form.mote → admin/tasks/_delete_form.mote} +2 -12
  72. data/lib/mutx/view/{tasks/admin/create_edit_form.mote → admin/tasks/_form.mote} +6 -9
  73. data/lib/mutx/view/{tasks/admin → admin/tasks}/delete.mote +1 -3
  74. data/lib/mutx/view/{tasks/admin → admin/tasks}/edit.mote +1 -4
  75. data/lib/mutx/view/{tasks/admin/list.mote → admin/tasks/index.mote} +5 -10
  76. data/lib/mutx/view/{tasks/admin → admin/tasks}/new.mote +1 -5
  77. data/lib/mutx/view/{tasks/admin/view.mote → admin/tasks/show.mote} +1 -3
  78. data/lib/mutx/view/body.mote +13 -51
  79. data/lib/mutx/view/{custom/params.mote → custom-params/_custom_params.mote} +3 -4
  80. data/lib/mutx/view/{custom/params → custom-params/types}/json.mote +0 -0
  81. data/lib/mutx/view/{custom/params → custom-params/types}/select_list.mote +0 -0
  82. data/lib/mutx/view/{custom/params → custom-params/types}/text.mote +0 -0
  83. data/lib/mutx/view/error_handler.mote +4 -54
  84. data/lib/mutx/view/features/{feature.mote → file.mote} +0 -0
  85. data/lib/mutx/view/features/index.mote +9 -0
  86. data/lib/mutx/view/git_information.mote +2 -8
  87. data/lib/mutx/view/help/{main.mote → _main.mote} +0 -0
  88. data/lib/mutx/view/help/{page.mote → _page.mote} +0 -0
  89. data/lib/mutx/view/help/{search_result.mote → _search_result.mote} +0 -0
  90. data/lib/mutx/view/help/index.mote +38 -0
  91. data/lib/mutx/view/layout/flash.mote +7 -0
  92. data/lib/mutx/view/{footer.mote → layout/footer.mote} +1 -1
  93. data/lib/mutx/view/layout/javascript.mote +6 -0
  94. data/lib/mutx/view/{modals.mote → layout/modals.mote} +0 -0
  95. data/lib/mutx/view/layout/navigation_bar.mote +88 -0
  96. data/lib/mutx/view/{styles.mote → layout/styles.mote} +10 -0
  97. data/lib/mutx/view/logs/{logs.mote → index.mote} +1 -1
  98. data/lib/mutx/view/logs/show.mote +3 -0
  99. data/lib/mutx/view/repositories/_repository.mote +7 -0
  100. data/lib/mutx/view/repositories/index.mote +23 -0
  101. data/lib/mutx/view/repositories/show.mote +21 -0
  102. data/lib/mutx/view/results/{detailed_info.mote → _result.mote} +5 -5
  103. data/lib/mutx/view/results/console.mote +63 -106
  104. data/lib/mutx/view/results/{all.mote → index.mote} +18 -24
  105. data/lib/mutx/view/sections.rb +36 -24
  106. data/lib/mutx/view/task_results/_result.mote +57 -0
  107. data/lib/mutx/view/{results/result.mote → task_results/_result_item.mote} +6 -5
  108. data/lib/mutx/view/task_results/index.mote +35 -0
  109. data/lib/mutx/view/tasks/_task.mote +90 -0
  110. data/lib/mutx/view/tasks/index.mote +61 -0
  111. data/lib/mutx/view/tasks/show.mote +167 -0
  112. data/lib/mutx/view/tests/_test.mote +90 -0
  113. data/lib/mutx/view/tests/index.mote +59 -0
  114. data/lib/mutx/view/tests/show.mote +172 -0
  115. data/lib/mutx/view/view.rb +172 -10
  116. metadata +89 -50
  117. data/lib/mutx/database/middleware.rb +0 -18
  118. data/lib/mutx/view/features.mote +0 -57
  119. data/lib/mutx/view/features/features_list.mote +0 -10
  120. data/lib/mutx/view/help.mote +0 -75
  121. data/lib/mutx/view/logs/log.mote +0 -3
  122. data/lib/mutx/view/message.mote +0 -8
  123. data/lib/mutx/view/navigation_bar.mote +0 -67
  124. data/lib/mutx/view/results/results.mote +0 -112
  125. data/lib/mutx/view/tasks/message.mote +0 -37
  126. data/lib/mutx/view/tasks/task.mote +0 -167
  127. data/lib/mutx/view/tasks/task_item.mote +0 -77
  128. data/lib/mutx/view/tasks/tasks.mote +0 -74
@@ -1,5 +1,3 @@
1
- % form_template = Mote.parse(File.read("#{Mutx::View.path}/tasks/admin/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 Task</h2></div>
@@ -9,7 +7,7 @@
9
7
 
10
8
  <div class="panel-success">
11
9
  <div class="panel-body">
12
- {{form_template.call(args:args)}}
10
+ {{ partial('admin/tasks/_delete_form', task: task)}}
13
11
  </div>
14
12
  </div>
15
13
  </div>
@@ -1,13 +1,10 @@
1
- % form_template = Mote.parse(File.read("#{Mutx::View.path}/tasks/admin/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 Task</h2></div>
6
4
 
7
5
  <div class="panel-warning">
8
6
  <div class="panel-body">
9
-
10
- {{form_template.call(args:args)}}
7
+ {{ partial('admin/tasks/_form', action: 'edit', task: task) }}
11
8
 
12
9
  </div>
13
10
  </div>
@@ -1,6 +1,4 @@
1
1
  <?
2
- tasks_list = Mutx::API::Tasks.list["tasks"]
3
-
4
2
  if (available_custom_params = Mutx::Tasks::Custom::Params.list)
5
3
  custom_params_hash = available_custom_params.inject({}) do |res,custom|
6
4
  res[custom["_id"]]=custom
@@ -9,9 +7,6 @@
9
7
  else
10
8
  custom_params_hash = {}
11
9
  end
12
-
13
-
14
-
15
10
  ?>
16
11
 
17
12
  <script>
@@ -63,7 +58,7 @@
63
58
  <!-- Default panel contents -->
64
59
  <div class="panel-heading"><h2>Tasks Edition Panel</h2></div>
65
60
  <div class="panel-body">
66
- <p><a class="btn btn-success" href="/admin/tasks/new">New Task</a></p>
61
+ <p><a class="btn btn-success" href="{{ path_for(:admin_tasks_new) }}">New Task</a></p>
67
62
  </div>
68
63
  <div class="panel-success">
69
64
  <div class="panel-body">
@@ -84,7 +79,7 @@
84
79
  </tr>
85
80
  </thead>
86
81
  <tbody>
87
- % tasks_list.each do |task|
82
+ % tasks.each do |task|
88
83
  <? #transforms some strings
89
84
 
90
85
  info = if task["information"]
@@ -111,9 +106,9 @@
111
106
  <div class="input-group">
112
107
  <button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown" aria-expanded="false">Options <span class="caret"></span></button>
113
108
  <ul class="dropdown-menu" role="menu">
114
- <li><a href="/admin/tasks/{{task["_id"]}}/view">View</a></li>
115
- <li><a href="/admin/tasks/{{task["_id"]}}/edit">Edit</a></li>
116
- <li><a href="/admin/tasks/{{task["_id"]}}/delete">Delete</a></li>
109
+ <li><a href="{{ path_for(:admin_tasks_show, task_id: task['_id']) }}">View</a></li>
110
+ <li><a href="{{ path_for(:admin_tasks_edit, task_id: task['_id']) }}">Edit</a></li>
111
+ <li><a href="{{ path_for(:admin_tasks_delete, task_id: task['_id']) }}">Delete</a></li>
117
112
  </ul>
118
113
  </div>
119
114
  </td>
@@ -1,5 +1,3 @@
1
- % form_template = Mote.parse(File.read("#{Mutx::View.path}/tasks/admin/create_edit_form.mote"), self, [:args])
2
- % args["action"]="add"
3
1
  <div class="panel panel-info">
4
2
  <!-- Default panel contents -->
5
3
  <div class="panel-heading"><h2>New Task</h2></div>
@@ -12,9 +10,7 @@
12
10
 
13
11
  <div class="panel-success">
14
12
  <div class="panel-body">
15
-
16
- {{form_template.call(args:args)}}
17
-
13
+ {{ partial('admin/tasks/_form', action: 'new', task: nil) }}
18
14
  </div>
19
15
  </div>
20
16
  </div>
@@ -1,5 +1,3 @@
1
- % form_template = Mote.parse(File.read("#{Mutx::View.path}/tasks/admin/create_edit_form.mote"), self, [:args])
2
- % args["action"]="view"
3
1
  <div class="panel panel-info">
4
2
  <!-- Default panel contents -->
5
3
  <div class="panel-heading">
@@ -7,7 +5,7 @@
7
5
  </div>
8
6
  <div class="panel-warning">
9
7
  <div class="panel-body">
10
- {{form_template.call(args:args)}}
8
+ {{ partial('admin/tasks/_form', action: 'view', task: task) }}
11
9
  </div>
12
10
  </div>
13
11
  </div>
@@ -1,77 +1,39 @@
1
1
  <?
2
- # encoding: utf-8
3
- query_string = args[:query_string]
4
-
5
- msg = if query_string.msg
6
- message_file_path = File.read("#{Mutx::View.path}/message.mote")
7
- Mote.parse(message_file_path, self, [:query_string]).call(query_string: query_string)
8
- end
9
-
10
- clean = query_string.clean || false
11
-
12
- message = section =~ /message/i ? " onload=\"javascript:startTimer();\"" : nil
13
-
14
- title = h1 = section.split.map{|w| w.capitalize}.join " "
15
-
16
- javascript = Mote.parse(File.read("#{Mutx::View.path}/javascript.mote"), self, []).call()
17
-
18
- styles = Mote.parse(File.read("#{Mutx::View.path}/styles.mote"), self, []).call()
19
-
20
- modals = Mote.parse(File.read("#{Mutx::View.path}/modals.mote"), self, []).call()
21
-
22
-
23
- args[:section] = section
24
-
25
- git_information = Mote.parse(File.read("#{Mutx::View.path}/git_information.mote"), self, [:section]).call(section:section)
26
-
27
- footer = Mote.parse(File.read("#{Mutx::View.path}/footer.mote"), self, []).call()
28
-
29
- template_file_path = File.read("#{Mutx::View.path}/#{Mutx::View::Sections.path_for(section)}.mote")
30
-
31
- content = Mote.parse(template_file_path, self, [:args]).call(args:args)
32
-
2
+ # encoding: utf-8
33
3
  puts "Section: #{section}".colorize(:green).on_red
34
4
  puts "Viewing #{Mutx::View.path}/#{Mutx::View::Sections.path_for(section)}.mote".colorize(:green).on_red
35
- section = section.gsub(" ","_").downcase
36
-
37
- navigation_bar = Mote.parse(File.read("#{Mutx::View.path}/navigation_bar.mote"), self, [:section]).call(section:section)
38
5
  ?>
39
- <!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><link rel="shortcut icon" type="image/x-icon" href="/favicon.ico"/><meta content="text/html;charset=utf-8" http-equiv="Content-Type"/>'
6
+ <!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">
40
7
  <head>
41
- <title>{{Mutx::Support::Configuration.project_name}} through Mutx - {{title}}</title>
8
+ <title>{{Mutx::Support::Configuration.project_name}} through Mutx - {{ section.split.map(&:capitalize).join(' ') }}</title>
42
9
 
43
10
  <meta content='text/html;charset=utf-8' http-equiv='Content-Type'/>
44
11
  <meta name='viewport' content='width=device-width, initial-scale=1.0'>
45
- <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico"/>
46
- <link href='https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css' rel='stylesheet'>
47
- <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
12
+ <link rel="shortcut icon" type="image/x-icon" href="/img/favicon.ico"/>
13
+
48
14
 
49
- {{javascript}}
50
-
51
-
52
-
53
- {{styles}}
15
+ {{ partial('layout/javascript') }}
16
+ {{ partial('layout/styles') }}
54
17
 
55
18
  </head>
56
19
 
57
- <body class='padding-top: 50px;' {{message}}>
58
- {{modals}}
59
-
60
- {{navigation_bar}}
20
+ <body {{ section =~ /message/i ? ' onload="javascript:startTimer();"' : nil }}>
21
+ {{ partial('layout/modals') }}
61
22
 
62
- {{msg}}
23
+ {{ partial('layout/navigation_bar', section: section.gsub(' ', '_').downcase) }}
63
24
 
64
25
  <div class='container'>
65
26
  <br>
66
- {{git_information}}
27
+ {{ partial('git_information', section: section) }}
67
28
  </div>
68
29
  <div class='container'>
69
30
 
70
31
  <p>{{content}}</p>
71
32
 
72
- {{footer}}
33
+ {{ partial('layout/footer') }}
73
34
 
74
35
  </div>
75
36
  </div>
37
+ {{ partial('layout/flash') }}
76
38
  </body>
77
39
  </html>
@@ -4,13 +4,12 @@
4
4
  custom_params_objects = all_custom_params.select{|custom| custom_params.include? custom["_id"]}
5
5
  # puts custom_params_objects
6
6
  ?>
7
- <h4 title='This parameters will be passed to the test task execution'>&nbsp;&nbsp;&nbsp;Custom Parameters</h4>
7
+ <h5 title='This parameters will be passed to the test task execution'>&nbsp;&nbsp;&nbsp;Custom Parameters</h5>
8
8
  <div class='container' style='width: inherit'>
9
9
  <li class='list-group-item' style='position:relative; with=100%'>
10
10
  <br>
11
11
  % custom_params_objects.each do |custom_param|
12
- % custom = Mote.parse(File.read("#{Mutx::View.path}/custom/params/#{custom_param["type"]}.mote"), self, [:param, :no_label, :task_form])
13
- {{custom.call(param:custom_param, no_label:false, task_form:false)}}
12
+ {{ partial("custom-params/types/#{custom_param['type']}", param: custom_param, no_label: false, task_form: false) }}
14
13
  % end
15
14
  </li>
16
- </div>
15
+ </div>
@@ -1,54 +1,4 @@
1
- <?
2
- javascript = Mote.parse(File.read("#{Mutx::View.path}/javascript.mote"), self, []).call()
3
-
4
- styles = Mote.parse(File.read("#{Mutx::View.path}/styles.mote"), self, []).call()
5
-
6
- navigation_bar = Mote.parse(File.read("#{Mutx::View.path}/navigation_bar.mote"), self, [:section]).call(section:"help")
7
-
8
- error_title = error_msg = ""
9
-
10
- exception = args[:exception]
11
- query_string = args[:query_string]
12
-
13
-
14
-
15
- if exception
16
- error_title , error_msg = Mutx::Support::ErrorHandlerHelper.evaluate exception
17
- else
18
- error_title = " An error ocurred"
19
- error_msg = query_string.msg
20
- end
21
-
22
- ?>
23
-
24
- <!DOCtype html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
25
- <html xmlns ="http://www.w3.org/1999/xhtml">
26
-
27
- <head>
28
- <title>{{Mutx::Support::Configuration.project_name}} through Mutx - Error</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
- {{navigation_bar}}
43
-
44
- <div class='container'>
45
- <br>
46
- <div class='container'>
47
- <div class='alert alert-danger' role='alert'>
48
- <h1>{{error_title}}</h1>
49
- <p>{{error_msg}}</p>
50
- </div>
51
- </div>
52
- </div>
53
- </body>
54
- </html>
1
+ <div class='alert alert-danger' role='alert'>
2
+ <h1>{{error_title}}</h1>
3
+ <p>{{error_msg}}</p>
4
+ </div>
@@ -0,0 +1,9 @@
1
+ <table class='table table-hover'>
2
+ % features.each do |feature|
3
+ <tr>
4
+ <td>
5
+ <a aria-hidden='true' href='{{ path_for(:features_file, query_string: { path: feature.gsub("/"," ") }) }}'>{{ feature }}</a>
6
+ </td>
7
+ </tr>
8
+ % end
9
+ </table>
@@ -1,17 +1,11 @@
1
- <?
2
- # encoding: utf-8
3
- branch = Mutx::Support::Git.branch
4
- log_last_commit = Mutx::Support::Git.log_last_commit
5
- last_commit_id = Mutx::Support::Git.get_last_commit_id
6
- ?>
7
1
  <div class='well'>
8
2
  % if Mutx::Support::Configuration.use_git?
9
3
  <h4>
10
- Working on branch <strong>{{branch}}</strong>
4
+ Working on branch <strong>{{ branch }}</strong>
11
5
  </h4>
12
6
 
13
7
  <small>
14
- <span title='{{log_last_commit}}'>Commit ID:{{last_commit_id}}</span>
8
+ <span title='{{ log_last_commit }}'>Commit ID:{{ last_commit_id }}</span>
15
9
  </small>
16
10
  % else
17
11
  <h4>
@@ -0,0 +1,38 @@
1
+ <?
2
+ title = (page == "main")? page : Mutx::Database::MongoConnector.help_title(page)
3
+ available_pages = Mutx::Database::MongoConnector.get_all_documentation.map{|doc| doc["title"].downcase}
4
+ query = query_string['s']
5
+ ?>
6
+
7
+ <div class='container'>
8
+ <br>
9
+ <div class='jumbotron'>
10
+ <div class='container'>
11
+ <h1>
12
+ <a href='/help'>Help</a>
13
+ {{page.capitalize.gsub("_"," ")}}
14
+ <div class='col-sm-3 col-md-3 pull-right'>
15
+ <form class='navbar-form' role='search' action='/help/main' method='get'>
16
+ <div class='input-group'>
17
+ <input type='text' class='form-control' placeholder='Search' name='s' value="{{ query }}">
18
+ <div class='input-group-btn'>
19
+ <button class='btn btn-info' type='submit'><i class='glyphicon glyphicon-search'></i></button>
20
+ </div>
21
+ </div>
22
+ </form>
23
+ </div>
24
+ </h1>
25
+ <!-- inicio content-->
26
+ % if query and !query.empty?
27
+ {{ partial('help/_search_result', query: query) }}
28
+ % else
29
+ % if available_pages.include? page
30
+ {{ partial('help/_page', page: page) }}
31
+ % else
32
+ {{ partial('help/_main') }}
33
+ % end
34
+ % end
35
+ <!-- fin content -->
36
+ </div>
37
+ </div>
38
+ </div>
@@ -0,0 +1,7 @@
1
+ <? flash.keys.each do |key| ?>
2
+ % value = flash[key]
3
+ % next unless value
4
+ <script type='text/javascript'>
5
+ $.notify("{{value[0..50]}}", "{{key}}");
6
+ </script>
7
+ <? end ?>
@@ -9,4 +9,4 @@
9
9
  </div>
10
10
  </div>
11
11
  </div>
12
- </footer>
12
+ </footer>
@@ -0,0 +1,6 @@
1
+ <script src='/js/jquery.min.js'></script>
2
+ <script src='/js/bootstrap.min.js'></script>
3
+ <script src='/js/notify.min.js'></script>
4
+
5
+ <script src='/js/mutx.js' type='text/javascript'></script>
6
+ <script src='/js/jquery.json-viewer.js' type='text/javascript'></script>
@@ -0,0 +1,88 @@
1
+ <nav 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='#'>{{ project_name }}</a>
14
+ </div>
15
+ <div class='collapse navbar-collapse'>
16
+ <ul class='nav navbar-nav'>
17
+ <li class='{{'active' if section =~ /^tasks?$/}}'>
18
+ <a href='{{ path_for(:tasks_index) }}'>
19
+ {{Mutx::View.icon_for('task')}}
20
+ Tasks
21
+ </a>
22
+ </li>
23
+ <li class='{{'active' if section =~ /^test/}}'>
24
+ <a href='{{ path_for(:tests_index) }}'>
25
+ {{Mutx::View.icon_for('test')}}
26
+ Tests
27
+ </a>
28
+ </li>
29
+ % if Mutx::Support::ProjectType.cucumber?
30
+ <li class='{{'active' if section =~ /^features?$/}}'>
31
+ <a href='{{ path_for(:features_index) }}'>
32
+ {{Mutx::View.icon_for('features')}}
33
+ Features
34
+ </a>
35
+ </li>
36
+ % end
37
+ <li class='{{'active' if section =~ /^repositor(?:y|ies)/}}'>
38
+ <a href='{{ path_for(:repositories_index) }}'>
39
+ {{Mutx::View.icon_for('repo')}}
40
+ Repositories
41
+ </a>
42
+ </li>
43
+ <li class='{{'active' if section =~ /^result/}}'>
44
+ <a href='{{ path_for(:results_index) }}'>
45
+ {{Mutx::View.icon_for('search')}}
46
+ Search results
47
+ </a>
48
+ </li>
49
+ <li class='{{'active' if section == "repo"}}'>
50
+ <a title='Open repository url' href='{{Mutx::Support::Configuration.project_url}}' target='_blank'>
51
+ {{Mutx::View.icon_for('left')}}
52
+ Code
53
+ {{Mutx::View.icon_for('right')}}
54
+ </a>
55
+ </li>
56
+ <li class='{{'active' if section =~ /^(admin|log)/}}'>
57
+ <a href='#' class='dropdown-toggle' data-toggle='dropdown' role= 'button' aria-expanded='false'>
58
+ {{Mutx::View.icon_for('admin')}}
59
+ Admin
60
+ </a>
61
+ <ul class='dropdown-menu' role='menu'>
62
+ <li><a href='{{ path_for(:admin_tasks_index) }}'>Tasks</a></li>
63
+ <li><a href='{{ path_for(:admin_custom_params_index) }}'>Custom Parameters</a></li>
64
+ <li><a href='{{ path_for(:admin_repositories_index) }}'>Repositories</a>
65
+ <li role="presentation" class="divider"></li>
66
+ <li><a href='{{ path_for(:logs_show, log_name: "mutx") }}'>Mutx Log</a>
67
+ <li><a href='{{ path_for(:logs_show, log_name: "sidekiq") }}'>Sidekiq Log</a>
68
+ <li role="presentation" class="divider"></li>
69
+ <!-- <li><a href='/admin/config'>Configuration</a></li>
70
+ -->
71
+ </ul>
72
+ </li>
73
+ % if $result
74
+ <li class='{{'active' if section == "logout"}}'>
75
+ <a href='{{ path_for(:logout) }}'>Logout</a>
76
+ </li>
77
+ % end
78
+ <li class='{{section == "help" ? 'active' : ''}}'>
79
+ <a href='{{ path_for(:help_index) }}'>
80
+ {{Mutx::View.icon_for('help')}}
81
+ Help
82
+ </a>
83
+ </li>
84
+ </ul>
85
+ </div>
86
+ <!--/.nav-collapse -->
87
+ </div>
88
+ </nav>