ezii-os 2.0.1 → 5.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/visualizations.scss +3 -0
  3. data/app/assets/stylesheets/waymo_slomos.scss +3 -0
  4. data/app/controllers/visualizations_controller.rb +74 -0
  5. data/app/controllers/waymo_slomos_controller.rb +74 -0
  6. data/app/helpers/visualizations_helper.rb +2 -0
  7. data/app/helpers/waymo_slomos_helper.rb +2 -0
  8. data/app/models/visualization.rb +2 -0
  9. data/app/models/waymo_slomo.rb +2 -0
  10. data/app/views/application/_navbar.html.erb +9 -0
  11. data/app/views/banal/employees/index.html.erb +7 -49
  12. data/app/views/employees/index.html.erb +7 -49
  13. data/app/views/layouts/application.html.erb +11 -2
  14. data/app/views/visualizations/_form.html.erb +22 -0
  15. data/app/views/visualizations/_visualization.json.jbuilder +2 -0
  16. data/app/views/visualizations/edit.html.erb +6 -0
  17. data/app/views/visualizations/index.html.erb +30 -0
  18. data/app/views/visualizations/index.json.jbuilder +1 -0
  19. data/app/views/visualizations/new.html.erb +5 -0
  20. data/app/views/visualizations/show.html.erb +9 -0
  21. data/app/views/visualizations/show.json.jbuilder +1 -0
  22. data/app/views/waymo_slomos/_form.html.erb +22 -0
  23. data/app/views/waymo_slomos/_waymo_slomo.json.jbuilder +2 -0
  24. data/app/views/waymo_slomos/edit.html.erb +6 -0
  25. data/app/views/waymo_slomos/index.html.erb +27 -0
  26. data/app/views/waymo_slomos/index.json.jbuilder +1 -0
  27. data/app/views/waymo_slomos/new.html.erb +5 -0
  28. data/app/views/waymo_slomos/show.html.erb +9 -0
  29. data/app/views/waymo_slomos/show.json.jbuilder +1 -0
  30. data/config/routes.rb +2 -0
  31. data/db/migrate/20190919190540_create_waymo_slomos.rb +10 -0
  32. data/db/migrate/20190919190738_create_visualizations.rb +9 -0
  33. data/ezii-os-2.0.1.gem +0 -0
  34. data/ezii-os.gemspec +1 -1
  35. data/log/development.log +1394 -0
  36. data/test/controllers/visualizations_controller_test.rb +48 -0
  37. data/test/controllers/waymo_slomos_controller_test.rb +48 -0
  38. data/test/fixtures/visualizations.yml +7 -0
  39. data/test/fixtures/waymo_slomos.yml +7 -0
  40. data/test/models/visualization_test.rb +7 -0
  41. data/test/models/waymo_slomo_test.rb +7 -0
  42. data/test/system/visualizations_test.rb +43 -0
  43. data/test/system/waymo_slomos_test.rb +43 -0
  44. metadata +37 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a7f883dec361a0bc555d2c4d7cbc38f9ff21fd71f3c0d3e16564c7f9efb2a8ec
4
- data.tar.gz: 49e19d058cd4ea36a1d07807b0495f60687201bbea0005f0305b25698af08b40
3
+ metadata.gz: c831721b0b5259ad4a70741c613d39aa4fbdaa3427c3d7e34519c52f7911bb00
4
+ data.tar.gz: 66df7f309f2c62a91b12e8728307c87477c42399e74291b6cb89b7787197ed10
5
5
  SHA512:
6
- metadata.gz: 6b0969a175d07339a0734771c73fee047505318cf0f9b253a059bf961f8fadea26af66ac3140b80415965a2412292cd0c26f6d6764a81fd576f79c42d27ae6e3
7
- data.tar.gz: b071338ba8b5803271708879d59dc4ebcc0d2f9e2b8c7427f42406bcd74848952a87cc9d270f6a3126ebf9f970bb507e1767e318fe9dff30a07b4575936e3a72
6
+ metadata.gz: 6ed2ee9c459f101a17f176ee4acef19a542b7ee48f290090bc38bd045bc184ddd524b9362b0ab1021e3085732b464290343360b34dc5e31d457456ff3e96a128
7
+ data.tar.gz: 583c6363eadcf4964428ee1d007bcdc6c9fcb797a263936571f240b5bffe53c109daab4a3aafbce7aec3f52c65d1d238f8aa79245cec32b4c65c860c5d1f2b2e
@@ -0,0 +1,3 @@
1
+ // Place all the styles related to the Visualizations controller here.
2
+ // They will automatically be included in application.css.
3
+ // You can use Sass (SCSS) here: http://sass-lang.com/
@@ -0,0 +1,3 @@
1
+ // Place all the styles related to the WaymoSlomos controller here.
2
+ // They will automatically be included in application.css.
3
+ // You can use Sass (SCSS) here: http://sass-lang.com/
@@ -0,0 +1,74 @@
1
+ class VisualizationsController < ApplicationController
2
+ before_action :set_visualization, only: [:show, :edit, :update, :destroy]
3
+
4
+ # GET /visualizations
5
+ # GET /visualizations.json
6
+ def index
7
+ @visualizations = Visualization.all
8
+ end
9
+
10
+ # GET /visualizations/1
11
+ # GET /visualizations/1.json
12
+ def show
13
+ end
14
+
15
+ # GET /visualizations/new
16
+ def new
17
+ @visualization = Visualization.new
18
+ end
19
+
20
+ # GET /visualizations/1/edit
21
+ def edit
22
+ end
23
+
24
+ # POST /visualizations
25
+ # POST /visualizations.json
26
+ def create
27
+ @visualization = Visualization.new(visualization_params)
28
+
29
+ respond_to do |format|
30
+ if @visualization.save
31
+ format.html { redirect_to @visualization, notice: 'Visualization was successfully created.' }
32
+ format.json { render :show, status: :created, location: @visualization }
33
+ else
34
+ format.html { render :new }
35
+ format.json { render json: @visualization.errors, status: :unprocessable_entity }
36
+ end
37
+ end
38
+ end
39
+
40
+ # PATCH/PUT /visualizations/1
41
+ # PATCH/PUT /visualizations/1.json
42
+ def update
43
+ respond_to do |format|
44
+ if @visualization.update(visualization_params)
45
+ format.html { redirect_to @visualization, notice: 'Visualization was successfully updated.' }
46
+ format.json { render :show, status: :ok, location: @visualization }
47
+ else
48
+ format.html { render :edit }
49
+ format.json { render json: @visualization.errors, status: :unprocessable_entity }
50
+ end
51
+ end
52
+ end
53
+
54
+ # DELETE /visualizations/1
55
+ # DELETE /visualizations/1.json
56
+ def destroy
57
+ @visualization.destroy
58
+ respond_to do |format|
59
+ format.html { redirect_to visualizations_url, notice: 'Visualization was successfully destroyed.' }
60
+ format.json { head :no_content }
61
+ end
62
+ end
63
+
64
+ private
65
+ # Use callbacks to share common setup or constraints between actions.
66
+ def set_visualization
67
+ @visualization = Visualization.find(params[:id])
68
+ end
69
+
70
+ # Never trust parameters from the scary internet, only allow the white list through.
71
+ def visualization_params
72
+ params.require(:visualization).permit(:image_url)
73
+ end
74
+ end
@@ -0,0 +1,74 @@
1
+ class WaymoSlomosController < ApplicationController
2
+ before_action :set_waymo_slomo, only: [:show, :edit, :update, :destroy]
3
+
4
+ # GET /waymo_slomos
5
+ # GET /waymo_slomos.json
6
+ def index
7
+ @waymo_slomos = WaymoSlomo.all
8
+ end
9
+
10
+ # GET /waymo_slomos/1
11
+ # GET /waymo_slomos/1.json
12
+ def show
13
+ end
14
+
15
+ # GET /waymo_slomos/new
16
+ def new
17
+ @waymo_slomo = WaymoSlomo.new
18
+ end
19
+
20
+ # GET /waymo_slomos/1/edit
21
+ def edit
22
+ end
23
+
24
+ # POST /waymo_slomos
25
+ # POST /waymo_slomos.json
26
+ def create
27
+ @waymo_slomo = WaymoSlomo.new(waymo_slomo_params)
28
+
29
+ respond_to do |format|
30
+ if @waymo_slomo.save
31
+ format.html { redirect_to @waymo_slomo, notice: 'Waymo slomo was successfully created.' }
32
+ format.json { render :show, status: :created, location: @waymo_slomo }
33
+ else
34
+ format.html { render :new }
35
+ format.json { render json: @waymo_slomo.errors, status: :unprocessable_entity }
36
+ end
37
+ end
38
+ end
39
+
40
+ # PATCH/PUT /waymo_slomos/1
41
+ # PATCH/PUT /waymo_slomos/1.json
42
+ def update
43
+ respond_to do |format|
44
+ if @waymo_slomo.update(waymo_slomo_params)
45
+ format.html { redirect_to @waymo_slomo, notice: 'Waymo slomo was successfully updated.' }
46
+ format.json { render :show, status: :ok, location: @waymo_slomo }
47
+ else
48
+ format.html { render :edit }
49
+ format.json { render json: @waymo_slomo.errors, status: :unprocessable_entity }
50
+ end
51
+ end
52
+ end
53
+
54
+ # DELETE /waymo_slomos/1
55
+ # DELETE /waymo_slomos/1.json
56
+ def destroy
57
+ @waymo_slomo.destroy
58
+ respond_to do |format|
59
+ format.html { redirect_to waymo_slomos_url, notice: 'Waymo slomo was successfully destroyed.' }
60
+ format.json { head :no_content }
61
+ end
62
+ end
63
+
64
+ private
65
+ # Use callbacks to share common setup or constraints between actions.
66
+ def set_waymo_slomo
67
+ @waymo_slomo = WaymoSlomo.find(params[:id])
68
+ end
69
+
70
+ # Never trust parameters from the scary internet, only allow the white list through.
71
+ def waymo_slomo_params
72
+ params.require(:waymo_slomo).permit(:banal_brainstorm_id)
73
+ end
74
+ end
@@ -0,0 +1,2 @@
1
+ module VisualizationsHelper
2
+ end
@@ -0,0 +1,2 @@
1
+ module WaymoSlomosHelper
2
+ end
@@ -0,0 +1,2 @@
1
+ class Visualization < ApplicationRecord
2
+ end
@@ -0,0 +1,2 @@
1
+ class WaymoSlomo < ApplicationRecord
2
+ end
@@ -25,6 +25,15 @@
25
25
  <li class="nav-item active">
26
26
  <a class="nav-link" href="/banal_complexes">Complexes</a>
27
27
  </li>
28
+
29
+ <li class="nav-item active">
30
+ <a class="nav-link" href="/waymo_slomos">WayMore SlowMotion please</a>
31
+ </li>
32
+
33
+ <li class="nav-item active">
34
+ <a class="nav-link" href="/visualizations">Visualizations</a>
35
+
36
+ </li>
28
37
  </ul>
29
38
  </div>
30
39
  </nav>
@@ -1,49 +1,7 @@
1
- <p id="notice"><%= notice %></p>
2
-
3
- <h1>Banal Employees</h1>
4
-
5
- <table class="table">
6
- <thead>
7
- <tr>
8
- <th>Facebook</th>
9
- <th>Linkedin</th>
10
- <th>Role</th>
11
- <th>E mail</th>
12
- <th>Mobile</th>
13
- <th>Address</th>
14
- <th>Country</th>
15
- <th>Full name</th>
16
- <th>Last name 2</th>
17
- <th>Last name 1</th>
18
- <th>Middle name</th>
19
- <th>First name</th>
20
- <th colspan="3"></th>
21
- </tr>
22
- </thead>
23
-
24
- <tbody>
25
- <% @banal_employees.each do |banal_employee| %>
26
- <tr id="banal-employee-<%= banal_employee.id %>">
27
- <td><%= banal_employee.Facebook %></td>
28
- <td><%= banal_employee.Linkedin %></td>
29
- <td><%= banal_employee.Role %></td>
30
- <td><%= banal_employee.e_mail %></td>
31
- <td><%= banal_employee.Mobile %></td>
32
- <td><%= banal_employee.Address %></td>
33
- <td><%= banal_employee.Country %></td>
34
- <td><%= banal_employee.Full_Name %></td>
35
- <td><%= banal_employee.Last_Name_2 %></td>
36
- <td><%= banal_employee.Last_Name_1 %></td>
37
- <td><%= banal_employee.Middle_Name %></td>
38
- <td><%= banal_employee.First_Name %></td>
39
- <td><%= link_to 'Show', banal_employee %></td>
40
- <td><%= link_to 'Edit', edit_banal_employee_path(banal_employee) %></td>
41
- <td><%= link_to 'Destroy', banal_employee, method: :delete, data: { confirm: 'Are you sure?' } %></td>
42
- </tr>
43
- <% end %>
44
- </tbody>
45
- </table>
46
-
47
- <br>
48
-
49
- <%= link_to 'New Banal Employee', new_banal_employee_path %>
1
+ <div class="list-group">
2
+ <% @banal_employees.each do |employee| %>
3
+ <div class="list-group-item">
4
+ <%= link_to(employee.First_Name + ' ' + employee.Last_Name_1, banal_employee_path(employee)) %>
5
+ </div>
6
+ <% end %>
7
+ </div>
@@ -1,49 +1,7 @@
1
- <p id="notice"><%= notice %></p>
2
-
3
- <h1>Employees</h1>
4
-
5
- <table>
6
- <thead>
7
- <tr>
8
- <th>Facebook</th>
9
- <th>Linkedin</th>
10
- <th>Role</th>
11
- <th>E mail</th>
12
- <th>Mobile</th>
13
- <th>Address</th>
14
- <th>Country</th>
15
- <th>Full name</th>
16
- <th>Last name 2</th>
17
- <th>Last name 1</th>
18
- <th>Middle name</th>
19
- <th>First name</th>
20
- <th colspan="3"></th>
21
- </tr>
22
- </thead>
23
-
24
- <tbody>
25
- <% @employees.each do |employee| %>
26
- <tr>
27
- <td><%= employee.Facebook %></td>
28
- <td><%= employee.Linkedin %></td>
29
- <td><%= employee.Role %></td>
30
- <td><%= employee.e_mail %></td>
31
- <td><%= employee.Mobile %></td>
32
- <td><%= employee.Address %></td>
33
- <td><%= employee.Country %></td>
34
- <td><%= employee.Full_Name %></td>
35
- <td><%= employee.Last_Name_2 %></td>
36
- <td><%= employee.Last_Name_1 %></td>
37
- <td><%= employee.Middle_Name %></td>
38
- <td><%= employee.First_Name %></td>
39
- <td><%= link_to 'Show', employee %></td>
40
- <td><%= link_to 'Edit', edit_employee_path(employee) %></td>
41
- <td><%= link_to 'Destroy', employee, method: :delete, data: { confirm: 'Are you sure?' } %></td>
42
- </tr>
43
- <% end %>
44
- </tbody>
45
- </table>
46
-
47
- <br>
48
-
49
- <%= link_to 'New Employee', new_employee_path %>
1
+ <div class="list-group">
2
+ <% @employees.each do |employee| %>
3
+ <div class="list-group-item">
4
+ <%= link_to(employee.full_name, employee_path(employee)) %>
5
+ </div>
6
+ <% end %>
7
+ </div>
@@ -17,7 +17,15 @@
17
17
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
18
18
  </head>
19
19
 
20
- <body>
20
+ <body style="transform: scale(0.7);" onscroll="zoom(this)">
21
+
22
+ <script>
23
+ function zoom(eQuestionMarkHahaha) {
24
+ $("body").css("transform", `scale(${document.documentElement.scrollTop / (document.documentElement.scrollTop + 100)})`);
25
+ }
26
+ </script>
27
+
28
+ <div class="jumbotron" style="border: 10px solid blue">
21
29
  <div class="container">
22
30
  <div class="row">
23
31
  <div class="col">
@@ -52,6 +60,7 @@
52
60
 
53
61
 
54
62
  <footer style="border: 1px solid blue">
63
+
55
64
  <div class="float-left fixed-bottom" style="margin: 5px">
56
65
  <button
57
66
  type="button"
@@ -111,7 +120,7 @@
111
120
  </div>
112
121
  </div>
113
122
 
114
-
123
+ </div>
115
124
  </body>
116
125
 
117
126
  <foot>
@@ -0,0 +1,22 @@
1
+ <%= form_with(model: visualization, local: true) do |form| %>
2
+ <% if visualization.errors.any? %>
3
+ <div id="error_explanation">
4
+ <h2><%= pluralize(visualization.errors.count, "error") %> prohibited this visualization from being saved:</h2>
5
+
6
+ <ul>
7
+ <% visualization.errors.full_messages.each do |message| %>
8
+ <li><%= message %></li>
9
+ <% end %>
10
+ </ul>
11
+ </div>
12
+ <% end %>
13
+
14
+ <div class="field">
15
+ <%= form.label :image_url %>
16
+ <%= form.text_field :image_url %>
17
+ </div>
18
+
19
+ <div class="actions">
20
+ <%= form.submit %>
21
+ </div>
22
+ <% end %>
@@ -0,0 +1,2 @@
1
+ json.extract! visualization, :id, :image_url, :created_at, :updated_at
2
+ json.url visualization_url(visualization, format: :json)
@@ -0,0 +1,6 @@
1
+ <h1>Editing Visualization</h1>
2
+
3
+ <%= render 'form', visualization: @visualization %>
4
+
5
+ <%= link_to 'Show', @visualization %> |
6
+ <%= link_to 'Back', visualizations_path %>
@@ -0,0 +1,30 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <h1>Visualizations</h1>
4
+
5
+ <table>
6
+ <thead>
7
+ <tr>
8
+ <th>Image url</th>
9
+ <th colspan="3"></th>
10
+ </tr>
11
+ </thead>
12
+
13
+ <tbody>
14
+ <% @visualizations.each do |visualization| %>
15
+ <tr>
16
+ <td>
17
+ <%= image_tag(visualization.image_url) %>
18
+ </td>
19
+ <td><%= visualization.image_url %></td>
20
+ <td><%= link_to 'Show', visualization %></td>
21
+ <td><%= link_to 'Edit', edit_visualization_path(visualization) %></td>
22
+ <td><%= link_to 'Destroy', visualization, method: :delete, data: { confirm: 'Are you sure?' } %></td>
23
+ </tr>
24
+ <% end %>
25
+ </tbody>
26
+ </table>
27
+
28
+ <br>
29
+
30
+ <%= link_to 'New Visualization', new_visualization_path %>
@@ -0,0 +1 @@
1
+ json.array! @visualizations, partial: "visualizations/visualization", as: :visualization
@@ -0,0 +1,5 @@
1
+ <h1>New Visualization</h1>
2
+
3
+ <%= render 'form', visualization: @visualization %>
4
+
5
+ <%= link_to 'Back', visualizations_path %>
@@ -0,0 +1,9 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <p>
4
+ <strong>Image url:</strong>
5
+ <%= @visualization.image_url %>
6
+ </p>
7
+
8
+ <%= link_to 'Edit', edit_visualization_path(@visualization) %> |
9
+ <%= link_to 'Back', visualizations_path %>