foreman_hosts 2.0.4.1 → 2.0.4.2

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.
data/config/routes.rb CHANGED
@@ -2,6 +2,6 @@ Rails.application.routes.draw do
2
2
  match 'report_index', to: 'foreman_hosts/hosts#report_index'
3
3
 
4
4
  namespace :foreman_hosts do
5
- resources :syhostmodels
5
+
6
6
  end
7
7
  end
@@ -28,11 +28,11 @@ module ForemanHosts
28
28
  end
29
29
 
30
30
  # Add a new role called 'Discovery' if it doesn't exist
31
- role 'ForemanHosts', [:view_foreman_hosts, :view_foreman_syhostmodels, :new_foreman_syhostmodels, :edit_foreman_syhostmodels, :delete_foreman_syhostmodels]
31
+ role 'ForemanHosts', [:view_foreman_hosts ] #, :view_foreman_syhostmodels, :new_foreman_syhostmodels, :edit_foreman_syhostmodels, :delete_foreman_syhostmodels]
32
32
  # add menu entry
33
33
 
34
34
  sub_menu :top_menu, :export_menu, :caption=> N_('Export'), :after=> :infrastructure_menu do
35
- menu :top_menu, :level1, :caption=>N_('ExportTemplates'), :url_hash => { :controller => 'foreman_hosts/syhostmodels', :action => :index }
35
+ #menu :top_menu, :level1, :caption=>N_('ExportTemplates'), :url_hash => { :controller => 'foreman_hosts/syhostmodels', :action => :index }
36
36
  menu :top_menu, :level2, :caption=>N_('ExportHosts'), :url_hash => { :controller => 'foreman_hosts/hosts', :action => :report_index }
37
37
  # menu :top_menu, :level2, :url_hash => {:controller=> :example, :action=>:index}
38
38
  # menu :top_menu, :level3, :url_hash => {:controller=> :example, :action=>:index}
@@ -1,3 +1,3 @@
1
1
  module ForemanHosts
2
- VERSION = '2.0.4.1'
2
+ VERSION = '2.0.4.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_hosts
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.4.1
4
+ version: 2.0.4.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -90,11 +90,9 @@ files:
90
90
  - app/views/foreman_hosts/hosts/hosts/new_action.html.erb
91
91
  - app/views/foreman_hosts/hosts/new_action.html.erb
92
92
  - app/overrides/dashboard/index/sample_override.html.erb.deface
93
- - app/controllers/foreman_hosts/syhostmodels_controller.rb
94
93
  - app/controllers/foreman_hosts/hosts_controller.rb
95
94
  - app/helpers/concerns/foreman_hosts/hosts_helper_extensions.rb
96
95
  - app/models/concerns/foreman_hosts/host_extensions.rb
97
- - app/models/foreman_hosts/syhostmodel.rb
98
96
  - bin/foreman-hosts
99
97
  - config/routes.rb
100
98
  - lib/tasks/foreman_hosts_tasks.rake
@@ -1,84 +0,0 @@
1
- class ForemanHosts::SyhostmodelsController < ApplicationController
2
- # GET /syhostmodels
3
- # GET /syhostmodels.json
4
- def index
5
- @syhostmodels = ForemanHosts::Syhostmodel.all.paginate(:page => params[:page])
6
-
7
- respond_to do |format|
8
- format.html # index.html.erb
9
- format.json { render json: @syhostmodels }
10
- end
11
- end
12
-
13
- # GET /syhostmodels/1
14
- # GET /syhostmodels/1.json
15
- def show
16
- @syhostmodel = ForemanHosts::Syhostmodel.find(params[:id])
17
- # @syhosts = Host.all
18
- # @syfactvalues = FactValue.all
19
- respond_to do |format|
20
- format.html # show.html.erb
21
- format.json { render json: @syhostmodel }
22
- end
23
- end
24
-
25
- # GET /syhostmodels/new
26
- # GET /syhostmodels/new.json
27
- def new
28
- @syhostmodel = ForemanHosts::Syhostmodel.new
29
- respond_to do |format|
30
- format.html # new.html.erb
31
- format.json { render json: @syhostmodel }
32
- end
33
- end
34
-
35
- # GET /syhostmodels/1/edit
36
- def edit
37
- @syhostmodel = ForemanHosts::Syhostmodel.find(params[:id])
38
- end
39
-
40
- # POST /syhostmodels
41
- # POST /syhostmodels.json
42
- def create
43
- @syhostmodel = ForemanHosts::Syhostmodel.new(params[:foreman_hosts_syhostmodel])
44
-
45
- respond_to do |format|
46
- if @syhostmodel.save
47
- format.html { redirect_to @syhostmodel, notice: 'syhostmodel was successfully created.' }
48
- format.json { render json: @syhostmodel, status: :created, location: @syhostmodel }
49
- else
50
- format.html { render action: "new" }
51
- format.json { render json: @syhostmodel.errors, status: :unprocessable_entity }
52
- end
53
- end
54
- end
55
-
56
- # PUT /syhostmodels/1
57
- # PUT /syhostmodels/1.json
58
- def update
59
- @syhostmodel = ForemanHosts::Syhostmodel.find(params[:id])
60
-
61
- respond_to do |format|
62
- if @syhostmodel.update_attributes(params[:foreman_hosts_syhostmodel])
63
- format.html { redirect_to @syhostmodel, notice: 'syhostmodel was successfully updated.' }
64
- format.json { head :no_content }
65
- else
66
- format.html { render action: "edit" }
67
- format.json { render json: @syhostmodel.errors, status: :unprocessable_entity }
68
- end
69
- end
70
- end
71
-
72
- # DELETE /syhostmodels/1
73
- # DELETE /syhostmodels/1.json
74
- def destroy
75
- @syhostmodel = ForemanHosts::Syhostmodel.find(params[:id])
76
- @syhostmodel.destroy
77
- respond_to do |format|
78
- format.html { redirect_to foreman_hosts_syhostmodels_url }
79
- format.json { head :no_content }
80
- end
81
-
82
-
83
- end
84
- end
@@ -1,8 +0,0 @@
1
- class ForemanHosts::Syhostmodel < ActiveRecord::Base
2
-
3
- attr_accessible :name, :remark #, :syhostmodeldetails_attributes
4
- #has_many :syhostmodeldetails, class_name: "ForemanHosts::Syhostmodeldetail"
5
- #accepts_nested_attributes_for :syhostmodeldetails, reject_if: proc { |attributes| attributes['no'].blank?| attributes['status'].blank? | attributes['fact_name_id'].blank? } , allow_destroy: true
6
-
7
-
8
- end