Initial scaffold: Flask webui + APScheduler + Playwright automation for MassPrice rule scheduling
Some checks failed
Deploy / deploy (push) Failing after 51s
Some checks failed
Deploy / deploy (push) Failing after 51s
Drives massprice.tcgplayer.com's Run Rule action per-rule on a user-configured schedule (multiple times/day, day-of-week toggles), replacing MassPrice's native scheduler (capped at 15 schedules account-wide, one run/day, with observed clock drift). Deployed via Forgejo push-to-deploy on Unraid, matching arr-summary/card-grader. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H6TgffxTvYhqxykAbVQg2v
This commit is contained in:
commit
2fdb9be9b9
19 changed files with 1197 additions and 0 deletions
68
templates/dashboard.html
Normal file
68
templates/dashboard.html
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
{% extends "_shell.html" %}
|
||||
{% block title %}Dashboard · MassPrice Scheduler{% endblock %}
|
||||
{% block content %}
|
||||
<div class="page-header">
|
||||
<h1>Rules</h1>
|
||||
<div class="page-header-meta">
|
||||
{% if rules_updated_at %}<span class="muted">Rules last synced {{ rules_updated_at }}</span>{% endif %}
|
||||
<button id="refresh-rules" class="btn btn-secondary">Refresh Rules</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if not rules %}
|
||||
<p class="empty-state">No rules loaded yet. Click "Refresh Rules" to pull the current rule list from MassPrice.</p>
|
||||
{% endif %}
|
||||
|
||||
<div class="rule-grid">
|
||||
{% for rule in rules %}
|
||||
<div class="rule-card" data-rule-id="{{ rule.id }}">
|
||||
<div class="rule-card-header">
|
||||
<h2>{{ rule.name }}</h2>
|
||||
<label class="switch" title="Enabled">
|
||||
<input type="checkbox" class="rule-enabled" {{ 'checked' if rule.enabled else '' }}>
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="rule-last-run">
|
||||
{% if rule.last_run %}
|
||||
<span class="status-dot status-{{ rule.last_run.status }}"></span>
|
||||
Last run {{ rule.last_run.timestamp }} — {{ rule.last_run.status }}
|
||||
{% if rule.last_run.status == 'failure' %}<div class="muted small">{{ rule.last_run.message }}</div>{% endif %}
|
||||
{% else %}
|
||||
<span class="muted">No runs yet</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<ul class="schedule-list">
|
||||
{% for entry in rule.schedules %}
|
||||
<li class="schedule-chip">
|
||||
<span class="chip-time">{{ entry.time }}</span>
|
||||
<span class="chip-days">{{ entry.days | join(' ') }}</span>
|
||||
<button type="button" class="chip-remove" title="Remove">×</button>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<div class="schedule-add">
|
||||
<div class="schedule-add-row">
|
||||
<input type="time" class="new-time" value="06:00">
|
||||
<button type="button" class="btn btn-small add-schedule">Add Time</button>
|
||||
</div>
|
||||
<div class="day-toggles">
|
||||
{% for d in days %}
|
||||
<button type="button" class="day-toggle" data-day="{{ d }}">{{ day_labels[d] }}</button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="rule-actions">
|
||||
<button type="button" class="btn btn-primary run-now">Run Now</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script src="{{ url_for('static', filename='js/app.js') }}"></script>
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue