Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
MBetterc
Project
Project
Details
Activity
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
Mbetter
MBetterc
Commits
897b39c1
Commit
897b39c1
authored
Nov 19, 2025
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved readability
parent
5b0da3e1
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
235 additions
and
57 deletions
+235
-57
migrations.py
mbetterclient/database/migrations.py
+61
-0
fixtures.html
mbetterclient/qt_player/templates/fixtures.html
+170
-53
fixture_details.html
...nt/web_dashboard/templates/dashboard/fixture_details.html
+2
-2
fixtures.html
...terclient/web_dashboard/templates/dashboard/fixtures.html
+2
-2
No files found.
mbetterclient/database/migrations.py
View file @
897b39c1
...
...
@@ -2080,6 +2080,66 @@ class Migration_027_AddDefaultIntroTemplatesConfig(DatabaseMigration):
logger
.
error
(
f
"Failed to remove default intro templates configuration: {e}"
)
return
False
class
Migration_028_AddFixtureRefreshIntervalConfig
(
DatabaseMigration
):
"""Add fixture refresh interval configuration for web dashboard"""
def
__init__
(
self
):
super
()
.
__init__
(
"028"
,
"Add fixture refresh interval configuration for web dashboard"
)
def
up
(
self
,
db_manager
)
->
bool
:
"""Add fixture refresh interval configuration to game_config table"""
try
:
with
db_manager
.
engine
.
connect
()
as
conn
:
# Check if fixture_refresh_interval already exists
result
=
conn
.
execute
(
text
(
"""
SELECT COUNT(*) FROM game_config WHERE config_key = 'fixture_refresh_interval'
"""
))
exists
=
result
.
scalar
()
>
0
if
not
exists
:
conn
.
execute
(
text
(
"""
INSERT INTO game_config
(config_key, config_value, value_type, description, is_system, created_at, updated_at)
VALUES (:config_key, :config_value, :value_type, :description, :is_system, datetime('now'), datetime('now'))
"""
),
{
'config_key'
:
'fixture_refresh_interval'
,
'config_value'
:
'15'
,
'value_type'
:
'int'
,
'description'
:
'Auto-refresh interval in seconds for fixture pages in web dashboard'
,
'is_system'
:
False
})
logger
.
info
(
"Added fixture refresh interval configuration (15 seconds)"
)
else
:
logger
.
info
(
"Fixture refresh interval configuration already exists"
)
conn
.
commit
()
logger
.
info
(
"Fixture refresh interval configuration migration completed successfully"
)
return
True
except
Exception
as
e
:
logger
.
error
(
f
"Failed to add fixture refresh interval configuration: {e}"
)
return
False
def
down
(
self
,
db_manager
)
->
bool
:
"""Remove fixture refresh interval configuration"""
try
:
with
db_manager
.
engine
.
connect
()
as
conn
:
# Remove the fixture refresh interval configuration
conn
.
execute
(
text
(
"""
DELETE FROM game_config WHERE config_key = 'fixture_refresh_interval'
"""
))
conn
.
commit
()
logger
.
info
(
"Fixture refresh interval configuration removed"
)
return
True
except
Exception
as
e
:
logger
.
error
(
f
"Failed to remove fixture refresh interval configuration: {e}"
)
return
False
# Registry of all migrations in order
MIGRATIONS
:
List
[
DatabaseMigration
]
=
[
Migration_001_InitialSchema
(),
...
...
@@ -2109,6 +2169,7 @@ MIGRATIONS: List[DatabaseMigration] = [
Migration_025_AddResultOptionModel
(),
Migration_026_AddExtractionStatsTable
(),
Migration_027_AddDefaultIntroTemplatesConfig
(),
Migration_028_AddFixtureRefreshIntervalConfig
(),
]
...
...
mbetterclient/qt_player/templates/fixtures.html
View file @
897b39c1
This diff is collapsed.
Click to expand it.
mbetterclient/web_dashboard/templates/dashboard/fixture_details.html
View file @
897b39c1
...
...
@@ -244,8 +244,8 @@ let isInitialLoad = true;
document
.
addEventListener
(
'DOMContentLoaded'
,
function
()
{
loadFixtureDetails
();
// Set up auto-refresh every 5 seconds
setInterval
(
loadFixtureDetails
,
5000
);
// Set up auto-refresh every
1
5 seconds
setInterval
(
loadFixtureDetails
,
1
5000
);
});
function
loadFixtureDetails
()
{
...
...
mbetterclient/web_dashboard/templates/dashboard/fixtures.html
View file @
897b39c1
...
...
@@ -167,8 +167,8 @@ document.addEventListener('DOMContentLoaded', function() {
resetBtn
.
addEventListener
(
'click'
,
resetFixtures
);
}
// Auto-refresh fixtures every 5 seconds
setInterval
(
loadFixtures
,
5000
);
// Auto-refresh fixtures every
1
5 seconds
setInterval
(
loadFixtures
,
1
5000
);
});
let
isInitialLoad
=
true
;
...
...
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