Commit 599df6f1 authored by nazarf's avatar nazarf

add btn check activity

parent ed46bdc2
...@@ -70,6 +70,14 @@ class MinersController < AdminController ...@@ -70,6 +70,14 @@ class MinersController < AdminController
end end
end end
def check_activity
`rake "miners:check_active_list"`
respond_to do |format|
format.html { redirect_to miners_url, notice: 'Miners was update' }
format.json { head :no_content }
end
end
private private
# Use callbacks to share common setup or constraints between actions. # Use callbacks to share common setup or constraints between actions.
......
- model_class = Miner - model_class = Miner
.page-header.refresh_pagination .page-header.refresh_pagination
=link_to "update miner from exel", update_miner_from_exel_path, class: 'btn btn-default btn-xs'
%table.table.table-striped.filtered_table %table.table.table-striped.filtered_table
%thead %thead
%tr %tr
...@@ -36,3 +35,8 @@ ...@@ -36,3 +35,8 @@
%i.fa.fa-trash %i.fa.fa-trash
= link_to t('helpers.links.new'), new_miner_path, class: 'btn btn-primary' = link_to t('helpers.links.new'), new_miner_path, class: 'btn btn-primary'
%br
%br
%br
=link_to "update miner from exel", update_miner_from_exel_path, class: 'btn btn-default btn-xs'
=link_to "check activity", check_activity_path, class: 'btn btn-default btn-xs'
...@@ -35,6 +35,7 @@ Rails.application.routes.draw do ...@@ -35,6 +35,7 @@ Rails.application.routes.draw do
get '/miners_activity/:name', to: 'front#miners_activity', as: 'miners_activity' get '/miners_activity/:name', to: 'front#miners_activity', as: 'miners_activity'
get '/update_miner_activity/:name', to: 'front#update_miner_activity', as: 'update_miner_activity' get '/update_miner_activity/:name', to: 'front#update_miner_activity', as: 'update_miner_activity'
get '/update_miner_from_exel', to: 'miners#update_miner_from_exel', as: 'update_miner_from_exel' get '/update_miner_from_exel', to: 'miners#update_miner_from_exel', as: 'update_miner_from_exel'
get '/check_activity', to: 'miners#check_activity', as: 'check_activity'
root 'front#index' root 'front#index'
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment