Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bsa_miner
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nazarf
bsa_miner
Commits
2b794673
Commit
2b794673
authored
Mar 17, 2023
by
nazarf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add btn set miss all miners
parent
517a2770
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
0 deletions
+10
-0
miners_controller.rb
app/controllers/miners_controller.rb
+8
-0
index.html.haml
app/views/miners/index.html.haml
+1
-0
routes.rb
config/routes.rb
+1
-0
No files found.
app/controllers/miners_controller.rb
View file @
2b794673
...
@@ -78,6 +78,14 @@ class MinersController < AdminController
...
@@ -78,6 +78,14 @@ class MinersController < AdminController
end
end
end
end
def
set_miners_miss
Miner
.
update_all
(
status:
'miss'
,
last_activity:
Time
.
now
)
respond_to
do
|
format
|
format
.
html
{
redirect_to
miners_url
,
notice:
'Miners was set miss'
}
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.
...
...
app/views/miners/index.html.haml
View file @
2b794673
...
@@ -40,3 +40,4 @@
...
@@ -40,3 +40,4 @@
%br
%br
=
link_to
"update miner from exel"
,
update_miner_from_exel_path
,
class:
'btn btn-default btn-xs'
=
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'
=
link_to
"check activity"
,
check_activity_path
,
class:
'btn btn-default btn-xs'
=
link_to
"set miss"
,
set_miners_miss_path
,
class:
'btn btn-default btn-xs'
config/routes.rb
View file @
2b794673
...
@@ -36,6 +36,7 @@ Rails.application.routes.draw do
...
@@ -36,6 +36,7 @@ Rails.application.routes.draw do
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'
get
'/check_activity'
,
to:
'miners#check_activity'
,
as:
'check_activity'
get
'/set_miners_miss'
,
to:
'miners#set_miners_miss'
,
as:
'set_miners_miss'
root
'front#index'
root
'front#index'
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment