Skip to content

Commit

Permalink
[Bherly/Tara] Modify form for TPS configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
pushm0v committed May 7, 2018
1 parent 56d32f8 commit ab2c14f
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/log_templates_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@ def set_log_template

# Never trust parameters from the scary internet, only allow the white list through.
def log_template_params
params.require(:log_template).permit(:name, :tps_limit, :zookeeper_instances, :kafka_instances, :es_instances)
params.require(:log_template).permit(:name, :tps_limit, :zookeeper_instances, :kafka_instances, :es_instances, :consul_instances, :yggdrasil_instances, :kibana_instances)
end
end
9 changes: 9 additions & 0 deletions app/views/log_templates/_form.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,13 @@
.form-group
= f.label :es_instances, 'ES Instance'
= f.number_field :es_instances, class: 'form-control'
.form-group
= f.label :consul_instances, 'Consul Instance'
= f.number_field :consul_instances, class: 'form-control'
.form-group
= f.label :yggdrasil_instances, 'Yggdrasil Instance'
= f.number_field :yggdrasil_instances, class: 'form-control'
.form-group
= f.label :kibana_instances, 'Kibana Instance'
= f.number_field :kibana_instances, class: 'form-control'
.actions = f.submit 'Submit', class: 'btn btn-primary'
2 changes: 1 addition & 1 deletion app/views/log_templates/_log_template.json.jbuilder
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
json.extract! log_template, :id, :name, :tps_limit, :zookeeper_instances, :kafka_instances, :es_instances, :created_at, :updated_at
json.extract! log_template, :id, :name, :tps_limit, :zookeeper_instances, :kafka_instances, :es_instances, :consul_instances, :yggdrasil_instances, :kibana_instances, :created_at, :updated_at
json.url log_template_url(log_template, format: :json)
6 changes: 6 additions & 0 deletions app/views/log_templates/index.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ table.table
th.text-center[style="width:100px"] Zookeeper instances
th.text-center[style="width:100px"] Kafka instances
th.text-center[style="width:100px"] ES instances
th.text-center[style="width:100px"] Consul instances
th.text-center[style="width:100px"] Yggdrasil instances
th.text-center[style="width:100px"] Kibana instances
th[style="width:50px"]
th[style="width:50px"]
th[style="width:50px"]
Expand All @@ -20,6 +23,9 @@ table.table
td.text-center = log_template.zookeeper_instances
td.text-center = log_template.kafka_instances
td.text-center = log_template.es_instances
td.text-center = log_template.consul_instances
td.text-center = log_template.yggdrasil_instances
td.text-center = log_template.kibana_instances
td = link_to 'Show', log_template
td = link_to 'Edit', edit_log_template_path(log_template)
td = link_to 'Destroy', log_template, data: { confirm: 'Are you sure?' }, method: :delete
Expand Down
9 changes: 9 additions & 0 deletions app/views/log_templates/show.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ p
p
strong Es instances:
= @log_template.es_instances
p
strong Consul instances:
= @log_template.consul_instances
p
strong Yggdrasil instances:
= @log_template.yggdrasil_instances
p
strong Kibana instances:
= @log_template.kibana_instances

=> link_to 'Edit', edit_log_template_path(@log_template)
'|
Expand Down

0 comments on commit ab2c14f

Please sign in to comment.