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
7137e776
Commit
7137e776
authored
Mar 16, 2023
by
nazarf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add production conf
parent
9448385f
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
109 additions
and
91 deletions
+109
-91
workspace.xml
.idea/workspace.xml
+20
-24
front_controller.rb
app/controllers/front_controller.rb
+24
-0
miners_controller.rb
app/controllers/miners_controller.rb
+0
-24
base_site.iml
base_site.iml
+60
-38
deploy.rb
config/deploy.rb
+2
-2
production.rb
config/deploy/production.rb
+2
-2
routes.rb
config/routes.rb
+1
-1
No files found.
.idea/workspace.xml
View file @
7137e776
...
...
@@ -4,30 +4,11 @@
<option
name=
"autoReloadType"
value=
"SELECTIVE"
/>
</component>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"9714672e-a423-436e-a8d6-e25573fece52"
name=
"Changes"
comment=
""
>
<change
afterPath=
"$PROJECT_DIR$/.idea/codeStyles/Project.xml"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/.idea/codeStyles/codeStyleConfig.xml"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/app/controllers/miners_controller.rb"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/app/models/miner.rb"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/app/views/miners/_form.html.haml"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/app/views/miners/edit.html.haml"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/app/views/miners/index.html.haml"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/app/views/miners/new.html.haml"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/app/views/miners/show.html.haml"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/db/migrate/20230312235403_create_miners.rb"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/test/controllers/miners_controller_test.rb"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/test/fixtures/miners.yml"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/test/models/miner_test.rb"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/Gemfile"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/Gemfile"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/Gemfile.lock"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/Gemfile.lock"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/app/controllers/front_controller.rb"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/app/controllers/front_controller.rb"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/app/views/layouts/admin.html.haml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/app/views/layouts/admin.html.haml"
afterDir=
"false"
/>
<list
default=
"true"
id=
"9714672e-a423-436e-a8d6-e25573fece52"
name=
"Changes"
comment=
"set and check miner status"
>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/base_site.iml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/base_site.iml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/config/database.yml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/config/database.yml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/config/routes.rb"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/config/routes.rb"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/db/schema.rb"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/db/schema.rb"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/db/seeds.rb"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/db/seeds.rb"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/config/deploy.rb"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/config/deploy.rb"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/config/deploy/production.rb"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/config/deploy/production.rb"
afterDir=
"false"
/>
</list>
<list
id=
"e4be6035-6aaa-4f44-85ea-6a3713a8155a"
name=
".idea"
comment=
""
/>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
...
...
@@ -243,13 +224,28 @@
<updated>
1678665447645
</updated>
<workItem
from=
"1678665448925"
duration=
"187000"
/>
<workItem
from=
"1678665646686"
duration=
"2018000"
/>
<workItem
from=
"1678919799908"
duration=
"1347000"
/>
<workItem
from=
"1678919799908"
duration=
"4548000"
/>
<workItem
from=
"1678925183855"
duration=
"109000"
/>
<workItem
from=
"1678925900403"
duration=
"62000"
/>
<workItem
from=
"1678926670884"
duration=
"178000"
/>
</task>
<task
id=
"LOCAL-00001"
summary=
"set and check miner status"
>
<created>
1678921173455
</created>
<option
name=
"number"
value=
"00001"
/>
<option
name=
"presentableId"
value=
"LOCAL-00001"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1678921173455
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"2"
/>
<servers
/>
</component>
<component
name=
"TypeScriptGeneratedFilesManager"
>
<option
name=
"version"
value=
"3"
/>
</component>
<component
name=
"VcsManagerConfiguration"
>
<MESSAGE
value=
"set and check miner status"
/>
<option
name=
"LAST_COMMIT_MESSAGE"
value=
"set and check miner status"
/>
</component>
<component
name=
"com.intellij.coverage.CoverageDataManagerImpl"
>
<SUITE
FILE_PATH=
"coverage/bsa_miner@db_seed__base_site.rcov"
NAME=
"db:seed: base_site Coverage Results"
MODIFIED=
"1678666605094"
SOURCE_PROVIDER=
"com.intellij.coverage.DefaultCoverageFileProvider"
RUNNER=
"rcov"
COVERAGE_BY_TEST_ENABLED=
"true"
COVERAGE_TRACING_ENABLED=
"false"
WORKING_DIRECTORY=
"$PROJECT_DIR$"
MODULE_NAME=
"base_site"
/>
<SUITE
FILE_PATH=
"coverage/bsa_miner@dev_start.rcov"
NAME=
"dev_start Coverage Results"
MODIFIED=
"1678921028158"
SOURCE_PROVIDER=
"com.intellij.coverage.DefaultCoverageFileProvider"
RUNNER=
"rcov"
COVERAGE_BY_TEST_ENABLED=
"true"
COVERAGE_TRACING_ENABLED=
"false"
WORKING_DIRECTORY=
"$PROJECT_DIR$"
MODULE_NAME=
"base_site"
/>
...
...
app/controllers/front_controller.rb
View file @
7137e776
...
...
@@ -15,4 +15,28 @@ class FrontController < ApplicationController
render
json:
{
status:
'ok'
}
end
def
miners_activity
@data
=
Miner
.
all
.
map
do
|
miner
|
{
name:
miner
.
name
,
status:
miner
.
status
,
hash_rate:
miner
.
hash_rate
,
last_activity:
miner
.
last_activity
,
ip_address:
miner
.
ip_address
,
port:
miner
.
port
,
wallet_address:
miner
.
wallet_address
,
password:
miner
.
password
,
algorithm:
miner
.
algorithm
,
ip_address_2:
miner
.
ip_address_2
,
port_2:
miner
.
port_2
,
wallet_address_2:
miner
.
wallet_address_2
,
password_2:
miner
.
password_2
,
algorithm_2:
miner
.
algorithm_2
}
end
render
json:
@data
end
end
app/controllers/miners_controller.rb
View file @
7137e776
...
...
@@ -62,30 +62,6 @@ class MinersController < AdminController
end
end
def
miners_activity
@data
=
Miner
.
all
.
map
do
|
miner
|
{
name:
miner
.
name
,
status:
miner
.
status
,
hash_rate:
miner
.
hash_rate
,
last_activity:
miner
.
last_activity
,
ip_address:
miner
.
ip_address
,
port:
miner
.
port
,
wallet_address:
miner
.
wallet_address
,
password:
miner
.
password
,
algorithm:
miner
.
algorithm
,
ip_address_2:
miner
.
ip_address_2
,
port_2:
miner
.
port_2
,
wallet_address_2:
miner
.
wallet_address_2
,
password_2:
miner
.
password_2
,
algorithm_2:
miner
.
algorithm_2
}
end
render
json:
@data
end
private
# Use callbacks to share common setup or constraints between actions.
...
...
base_site.iml
View file @
7137e776
...
...
@@ -139,76 +139,98 @@
<component
name=
"RailsGeneratorsCache"
>
<option
name=
"generators"
>
<list>
<option
value=
"active_record:migration"
/>
<option
value=
"active_record:model"
/>
<option
value=
"active_record:observer"
/>
<option
value=
"active_record:session_migration"
/>
<option
value=
"active_record:devise"
/>
<option
value=
"assets"
/>
<option
value=
"bootstrap:install"
/>
<option
value=
"bootstrap:layout"
/>
<option
value=
"bootstrap:partial"
/>
<option
value=
"bootstrap:themed"
/>
<option
value=
"ckeditor:action_policy"
/>
<option
value=
"ckeditor:install"
/>
<option
value=
"ckeditor:pundit_policy"
/>
<option
value=
"coffee:assets"
/>
<option
value=
"controller"
/>
<option
value=
"devise"
/>
<option
value=
"devise:controllers"
/>
<option
value=
"devise:i18n:locale"
/>
<option
value=
"devise:i18n:views"
/>
<option
value=
"devise:install"
/>
<option
value=
"devise:views"
/>
<option
value=
"erb:controller"
/>
<option
value=
"erb:mailer"
/>
<option
value=
"erb:scaffold"
/>
<option
value=
"generator"
/>
<option
value=
"haml:application_layout"
/>
<option
value=
"helper"
/>
<option
value=
"integration_test"
/>
<option
value=
"jbuilder"
/>
<option
value=
"job"
/>
<option
value=
"js:assets"
/>
<option
value=
"less:assets"
/>
<option
value=
"mailer"
/>
<option
value=
"metal"
/>
<option
value=
"migration"
/>
<option
value=
"model"
/>
<option
value=
"model_subclass"
/>
<option
value=
"observer"
/>
<option
value=
"performance_test"
/>
<option
value=
"plugin"
/>
<option
value=
"mongoid:devise"
/>
<option
value=
"nested_form:install"
/>
<option
value=
"resource"
/>
<option
value=
"responders:install"
/>
<option
value=
"responders_controller"
/>
<option
value=
"scaffold"
/>
<option
value=
"scaffold_controller"
/>
<option
value=
"session_migration"
/>
<option
value=
"stylesheets"
/>
<option
value=
"test_unit:controller"
/>
<option
value=
"test_unit:helper"
/>
<option
value=
"test_unit:integration"
/>
<option
value=
"test_unit:mailer"
/>
<option
value=
"test_unit:model"
/>
<option
value=
"test_unit:observer"
/>
<option
value=
"test_unit:performance"
/>
<option
value=
"simple_form:install"
/>
<option
value=
"task"
/>
<option
value=
"test_unit:generator"
/>
<option
value=
"test_unit:job"
/>
<option
value=
"test_unit:plugin"
/>
<option
value=
"
test_unit:scaffold
"
/>
<option
value=
"
uploader
"
/>
</list>
</option>
<option
name=
"myGenerators"
>
<list>
<option
value=
"active_record:migration"
/>
<option
value=
"active_record:model"
/>
<option
value=
"active_record:observer"
/>
<option
value=
"active_record:session_migration"
/>
<option
value=
"active_record:devise"
/>
<option
value=
"assets"
/>
<option
value=
"bootstrap:install"
/>
<option
value=
"bootstrap:layout"
/>
<option
value=
"bootstrap:partial"
/>
<option
value=
"bootstrap:themed"
/>
<option
value=
"ckeditor:action_policy"
/>
<option
value=
"ckeditor:install"
/>
<option
value=
"ckeditor:pundit_policy"
/>
<option
value=
"coffee:assets"
/>
<option
value=
"controller"
/>
<option
value=
"devise"
/>
<option
value=
"devise:controllers"
/>
<option
value=
"devise:i18n:locale"
/>
<option
value=
"devise:i18n:views"
/>
<option
value=
"devise:install"
/>
<option
value=
"devise:views"
/>
<option
value=
"erb:controller"
/>
<option
value=
"erb:mailer"
/>
<option
value=
"erb:scaffold"
/>
<option
value=
"generator"
/>
<option
value=
"haml:application_layout"
/>
<option
value=
"helper"
/>
<option
value=
"integration_test"
/>
<option
value=
"jbuilder"
/>
<option
value=
"job"
/>
<option
value=
"js:assets"
/>
<option
value=
"less:assets"
/>
<option
value=
"mailer"
/>
<option
value=
"metal"
/>
<option
value=
"migration"
/>
<option
value=
"model"
/>
<option
value=
"model_subclass"
/>
<option
value=
"observer"
/>
<option
value=
"performance_test"
/>
<option
value=
"plugin"
/>
<option
value=
"mongoid:devise"
/>
<option
value=
"nested_form:install"
/>
<option
value=
"resource"
/>
<option
value=
"responders:install"
/>
<option
value=
"responders_controller"
/>
<option
value=
"scaffold"
/>
<option
value=
"scaffold_controller"
/>
<option
value=
"session_migration"
/>
<option
value=
"stylesheets"
/>
<option
value=
"test_unit:controller"
/>
<option
value=
"test_unit:helper"
/>
<option
value=
"test_unit:integration"
/>
<option
value=
"test_unit:mailer"
/>
<option
value=
"test_unit:model"
/>
<option
value=
"test_unit:observer"
/>
<option
value=
"test_unit:performance"
/>
<option
value=
"simple_form:install"
/>
<option
value=
"task"
/>
<option
value=
"test_unit:generator"
/>
<option
value=
"test_unit:job"
/>
<option
value=
"test_unit:plugin"
/>
<option
value=
"
test_unit:scaffold
"
/>
<option
value=
"
uploader
"
/>
</list>
</option>
</component>
...
...
config/deploy.rb
View file @
7137e776
...
...
@@ -4,7 +4,7 @@ lock '3.7.2'
# DEPLOY
set
:application
,
'base_site'
# set :deploy_to, '/var/www/amaox' # Default deploy_to directory is /var/www/my_app_name
set
:repo_url
,
'http://
svn.sp-service.com.ua/svnroot/svn/base_site/trunk
'
set
:repo_url
,
'http://
deploy:zpxocivu73@git.sp-service.com.ua/nazarf/bsa_miner.git
'
# set :format, :pretty # Default value for :format is :pretty
# set :log_level, :debug # Default value for :log_level is :debug
# set :pty, true # Default value for :pty is false
...
...
@@ -15,7 +15,7 @@ set :linked_dirs, fetch(:linked_dirs, []).push('log', 'public/uploads', 'files')
# RVM
# set :rvm_type, :user # Defaults to: :auto
set
:rvm_ruby_version
,
'2.
3.3
'
# Defaults to: 'default'
set
:rvm_ruby_version
,
'2.
5.1
'
# Defaults to: 'default'
# set :rvm_custom_path, '~/.rvm' # only needed if not detected
# RAILS
...
...
config/deploy/production.rb
View file @
7137e776
server
'
storage.sp-service.com.ua'
,
user:
'deploy'
,
roles:
%w{app db web}
server
'
209.250.245.88'
,
user:
'deploy'
,
roles:
%w{app db web}
# set :rvm_custom_path, '/usr/local/rvm' # only needed if not detected
config/routes.rb
View file @
7137e776
...
...
@@ -32,7 +32,7 @@ Rails.application.routes.draw do
get
'/'
=>
'front#index'
get
'pages/:id'
=>
'front#page'
,
as: :front_page
get
'/miners_activity'
,
to:
'
miners
#miners_activity'
,
as:
'miners_activity'
get
'/miners_activity'
,
to:
'
front
#miners_activity'
,
as:
'miners_activity'
get
'/update_miner_activity'
,
to:
'front#update_miner_activity'
,
as:
'update_miner_activity'
root
'front#index'
...
...
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