extface 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/extface/devices_controller.rb +2 -2
- data/app/controllers/extface/handler_controller.rb +4 -0
- data/app/models/extface/device.rb +2 -0
- data/app/views/extface/devices/form.html.erb +1 -1
- data/app/views/extface/devices/index.html.erb +1 -1
- data/app/views/extface/devices/show.html.erb +64 -29
- data/app/views/extface/driver/generic_pos/_settings.html.erb +1 -0
- data/app/views/layouts/extface/application.html.erb +5 -4
- data/config/routes.rb +2 -1
- data/lib/extface/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f087805cac85a3a24f51cb71fd0a5b97d787f1ca
|
4
|
+
data.tar.gz: 80bcf72379c305197d1281f6b958e5e744b81009
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03a6973e0839a3c9bbc13605ff74369b36170fc249815828d0a5f6b0f4b21a5a6937c35491c771a0dce5891a37381ab65f8e4021c72ecd18578d125d2156f5d7
|
7
|
+
data.tar.gz: 1a09107b86362f4b101f859f0c5f6e628eb09fd4a1c72e8788eed22c5761e7f2d2ecb09743cf817a987c403c9ee41ffc83fde37771e77874d2979323a23541b9
|
@@ -1,34 +1,69 @@
|
|
1
|
-
<
|
2
|
-
|
3
|
-
<
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
</
|
12
|
-
|
13
|
-
<
|
14
|
-
|
15
|
-
|
16
|
-
|
1
|
+
<div class="page-header nav">
|
2
|
+
<%= link_to 'Edit', edit_device_path(@device), class: 'btn btn-primary navbar-btn pull-right' %>
|
3
|
+
<h3 class='navbar-text'>
|
4
|
+
<%= link_to extface.root_path do %>
|
5
|
+
Extface<sup>♥</sup>
|
6
|
+
<% end %>
|
7
|
+
»
|
8
|
+
<%= link_to t('.devices'), devices_path %>
|
9
|
+
»
|
10
|
+
<%= @device.name %>
|
11
|
+
</h3>
|
12
|
+
</div>
|
13
|
+
<br />
|
14
|
+
<% if @job.present? %>
|
15
|
+
<div class='alert alert-info job-monitor'>
|
16
|
+
See job #<%= @job.id %> execution progress at: <%= link_to job_url(@job), job_path(@job), target: :_blank %>
|
17
|
+
<div>
|
18
|
+
<div class='text-danger'>You need multi-threaded server to do that!</div>
|
19
|
+
<small>(Easiest workaraund: Include <%= link_to 'unicorn-rails', 'https://github.com/samuelkadolph/unicorn-rails', target: :_blank %> in your application)</small>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
<% end %>
|
23
|
+
<div class='row'>
|
24
|
+
<div class='col-sm-6'>
|
25
|
+
<dl class="dl-horizontal">
|
26
|
+
<dt><%= t('.name') %></dt>
|
27
|
+
<dd><%= @device.name %></dd>
|
28
|
+
|
29
|
+
<dt><%= t('.parent') %></dt>
|
30
|
+
<dd><%= @device.extfaceable.composite_id %></dd>
|
31
|
+
|
32
|
+
<dt><%= t('.driver') %></dt>
|
33
|
+
<dd><%= @device.driver_name %></dd>
|
34
|
+
</dl>
|
35
|
+
</div>
|
36
|
+
<div class='col-sm-6'>
|
37
|
+
<dl class="dl-horizontal">
|
38
|
+
<dt><%= t('.created') %></dt>
|
39
|
+
<dd><%= distance_of_time_in_words_to_now @device.created_at %> ago</dd>
|
40
|
+
|
41
|
+
<dt><%= t('.successful_jobs') %></dt>
|
42
|
+
<dd>
|
43
|
+
<%= @device.jobs.count %>
|
44
|
+
(<%= t('.last') %>: <%= distance_of_time_in_words_to_now @device.jobs.maximum(:completed_at) %> ago)
|
45
|
+
</dd>
|
46
|
+
|
47
|
+
<dt><%= t('.failures') %></dt>
|
48
|
+
<dd>
|
49
|
+
<%= @device.jobs.count %>
|
50
|
+
(<%= t('.last') %>: <%= distance_of_time_in_words_to_now @device.jobs.maximum(:failed_at) %> ago)
|
51
|
+
</dd>
|
52
|
+
|
17
53
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
</p>
|
54
|
+
</dl>
|
55
|
+
</div>
|
56
|
+
</div>
|
22
57
|
|
23
|
-
|
24
|
-
|
25
|
-
<
|
26
|
-
|
27
|
-
<br />
|
28
|
-
<%= extface.pull_url(@device.uuid) %>
|
29
|
-
<br />
|
30
|
-
<%= link_to 'Print Test Page', test_page_device_path(@device), remote:true %>
|
58
|
+
<dl class="dl-horizontal">
|
59
|
+
<dt><%= t('.client_pull_url') %></dt>
|
60
|
+
<dd><pre><%= extface.pull_url(@device.uuid) %></pre></dd>
|
61
|
+
</dl>
|
31
62
|
|
63
|
+
<hr />
|
64
|
+
<% if @device.print? %>
|
65
|
+
<%= button_to 'Print Test Page', test_page_device_path(@device), remote: true, name: :test_page, value: true, class: 'btn btn-warning' %>
|
66
|
+
<% end %>
|
32
67
|
|
33
68
|
<h1>Jobs</h1>
|
34
69
|
<table class='table'>
|
@@ -43,7 +78,7 @@ Client Pull URL:
|
|
43
78
|
<th>Connected</th>
|
44
79
|
</tr>
|
45
80
|
</thead>
|
46
|
-
<% @device.jobs.last(10).each do |job|%>
|
81
|
+
<% @device.jobs.last(10).reverse.each do |job|%>
|
47
82
|
<tr>
|
48
83
|
<td><%= job.id %></td>
|
49
84
|
<td><%= job.created_at %></td>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= __FILE__.gsub(Rails.root.to_s, "") %>
|
@@ -1,14 +1,15 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html>
|
3
3
|
<head>
|
4
|
-
<title>Extface
|
4
|
+
<title>Extface♥</title>
|
5
5
|
<%= stylesheet_link_tag "extface/application", media: "all" %>
|
6
|
+
<%= stylesheet_link_tag "http://getbootstrap.com/dist/css/bootstrap.min.css", medis: :all %>
|
6
7
|
<%= javascript_include_tag "extface/application" %>
|
7
8
|
<%= csrf_meta_tags %>
|
8
9
|
</head>
|
9
10
|
<body>
|
10
|
-
|
11
|
-
<%= yield %>
|
12
|
-
|
11
|
+
<div class="container">
|
12
|
+
<%= yield %>
|
13
|
+
</div>
|
13
14
|
</body>
|
14
15
|
</html>
|
data/config/routes.rb
CHANGED
@@ -3,10 +3,11 @@ Extface::Engine.routes.draw do
|
|
3
3
|
|
4
4
|
resources :devices do
|
5
5
|
resources :jobs, only: [:show]
|
6
|
-
|
6
|
+
post :test_page, on: :member
|
7
7
|
end
|
8
8
|
|
9
9
|
get ':device_uuid' => 'handler#pull', as: :pull
|
10
|
+
get ':device_uuid/settings' => 'handler#settings', as: :settings
|
10
11
|
post ':device_uuid' => 'handler#push', as: :push
|
11
12
|
root 'devices#index'
|
12
13
|
end
|
data/lib/extface/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: extface
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Vangelov
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 4.0.
|
19
|
+
version: 4.0.3
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 4.0.
|
26
|
+
version: 4.0.3
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rdoc
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,6 +128,7 @@ files:
|
|
128
128
|
- app/views/extface/devices/index.html.erb
|
129
129
|
- app/views/extface/devices/show.html.erb
|
130
130
|
- app/views/extface/driver/fixed_width_serial_cdr/_settings.html.erb
|
131
|
+
- app/views/extface/driver/generic_pos/_settings.html.erb
|
131
132
|
- app/views/extface/driver/star_scp700/_settings.html.erb
|
132
133
|
- app/views/extface/jobs/_form.html.erb
|
133
134
|
- app/views/extface/jobs/edit.html.erb
|