-
Notifications
You must be signed in to change notification settings - Fork 7
Flowlord Dashboard #237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flowlord Dashboard #237
Conversation
- handler recognizes workflow dir without ending slash
* plan alert switch * add alert table and updates to notifications * fixes and refactoring * update to alerts html * fix TaskTime, remove Task_CreatedAt * fix unit tests
… results accordingly
PR Compliance Guide 🔍(Compliance updated until commit 41691aa)Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label Previous compliance checksCompliance check up to commit 53c04ba
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||||||||||||||
- Fixes for Recap and better taskHTML gen
User description
PR Type
Enhancement, Tests, Documentation
Description
Implements comprehensive SQLite database backend replacing in-memory cache for persistent storage of tasks, alerts, file messages, and workflow phases
Adds new web dashboard UI with embedded HTML templates and static files for viewing alerts, files, tasks, workflows, and system information
Introduces database schema versioning, migration system, and optimization features including PRAGMA settings, date indexing, and size statistics
Refactors task master and handler components to use SQLite queries instead of in-memory storage
Adds alert deduplication, incomplete task detection, and atomic duration tracking for notification frequency management
Implements workflow phase caching with file loading, checksum tracking, and refresh functionality
Enhances date range formatting with automatic granularity detection (hourly/daily/monthly)
Improves cron schedule validation using dedicated parser
Updates Go toolchain to 1.24.0 and adds
modernc.org/sqlitedependencyUpgrades CircleCI configuration to version 2.1 with Docker build workflow
Includes comprehensive test suite covering SQLite operations, HTML rendering, date formatting, and workflow caching
Diagram Walkthrough
File Walkthrough
16 files
sqlite.go
SQLite database implementation for persistent task cachingapps/flowlord/cache/sqlite.go
replacing in-memory storage
evolution
messages, and workflow phases
indexing, and size statistics
efficient JOIN queries
handler.go
Web dashboard UI with embedded templates and static filesapps/flowlord/handler.go
pages
workflows, and about pages
bytes
chi router
taskmaster.go
Task master refactoring for SQLite and alert managementapps/flowlord/taskmaster.go
of in-memory lists
CheckIncompleteTasks()methodin-memory cache
workflow.go
SQLite-based workflow phase caching implementationapps/flowlord/cache/workflow.go
for searching, retrieving, and managing workflow phases
PhaseandPhaseDBstructs to represent workflow phases withvalidation and helper methods
functionality to detect file changes
with dependency tracking
tmpl.go
Enhanced date range formatting with granularity detectiontmpl/tmpl.go
PrintDates()function to automatically detect granularity(hourly/daily/monthly) and format date ranges accordingly
isConsecutive()andformatTime()helper functions forgranularity-aware date formatting
cross-month/year boundaries
data
cache.go
Cache data structures for alerts and task trackingapps/flowlord/cache/cache.go
AlertRecordandSummaryLinefor dashboardalert display
TaskJobandStatstructs for task tracking and statisticsfor reference
files.go
File message persistence to databaseapps/flowlord/files.go
process
AddFileMessage()on taskCache to persist file processinginformation to database
main.go
File utility enhancements and stat commandapps/utils/fz/main.go
statcommand to display file statistics in JSON formatcp()function to useio.Copy()instead of line-by-linescanning
job.go
Cron schedule validation improvementsapps/flowlord/job.go
cronParser.Parse()formore robust validation
validation
workflow.go
Workflow cache directory detection methodworkflow/workflow.go
IsDir()method toCachestruct to determine if workflow path is adirectory
workflow configurations
style.css
Dashboard stylesheet with comprehensive UI stylingapps/flowlord/handler/static/style.css
tables, and UI components
responsive layouts
functionality
task_summary.tmpl
Task summary template for dashboard displayapps/flowlord/handler/task_summary.tmpl
and execution times
workflow.tmpl
Workflow phases dashboard HTML template with filteringapps/flowlord/handler/workflow.tmpl
dependencies, retry, template, and status
copy-to-clipboard functionality
alert.tmpl
Alert dashboard HTML template with date filteringapps/flowlord/handler/alert.tmpl
time, and task time
task.js
Task page JavaScript functionality and filtering logicapps/flowlord/handler/static/task.js
task.tmpl
Task summary dashboard HTML template with paginationapps/flowlord/handler/task.tmpl
meta, and timestamps
8 files
cache_test.go
SQLite database test suite for date queriesapps/flowlord/cache/cache_test.go
DatesByType()method covering tasks,alerts, and files
workflow_test.go
Workflow cache unit tests and validationapps/flowlord/cache/workflow_test.go
file loading, phase validation, and refresh operations
handling
management
handler_test.go
Handler tests with SQLite cache and HTML validationapps/flowlord/handler_test.go
cache
pages with validation
validateHTML()helper to check HTML structure and templateexecution
loadTaskViewData()function to load test data from JSON filestaskmaster_test.go
TaskMaster tests updated for SQLite cache integrationapps/flowlord/taskmaster_test.go
database instead of workflow.New()
taskCachefield in taskMasterstruct
tmpl_test.go
Extended date formatting test coveragetmpl/tmpl_test.go
PrintDates()function covering dailyrecords with offsets, duplicates, and monthly ranges
timestamp edge cases
app_test.go
Test expectations updated for hourly date formatapps/utils/recap/app_test.go
(e.g.,
2020/01/02T00instead of2020/01/02)test cases
files_test.go
File matching test updated for job fieldapps/flowlord/files_test.go
Jobfield in task struct for filematching results
tasks.json
Sample task records test data fileapps/flowlord/test/tasks.json
running)
2 files
main.go
Configuration updates for SQLite database integrationapps/flowlord/main.go
LocalPathandTaskTTLsettings
Hostconfiguration option for dashboard URL generationcache
config.yml
CircleCI configuration upgrade with Docker build workflow.circleci/config.yml
go-executorfor Go 1.23 environmenttestandbuildjobs with distinct responsibilitiestest_and_buildpipeline3 files
Workflow_plan.md
Workflow SQLite persistence architecture documentationapps/flowlord/Workflow_plan.md
compatibility
replacement
sqlite_spec.md
SQLite technical specification and database schema designapps/flowlord/sqlite_spec.md
flowlord
file message history
alert_records,file_messages,and
task_recordscalculations
testing-framework.md
Testing framework documentation and best practices guidetesting-framework.md
task-tools
hydronica/trialframework as primary testing tool withexamples
handling
2 files
go.sum
Dependency updates and SQLite support packagesapps/go.sum
google/pprofto version0.0.0-20250317173921-a4b03ec1a45ejbsmith7741/uri v0.6.0and addedv0.6.1mattn/go-isatty v0.0.20,ncruces/go-strftimev0.1.9,remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daecgolang.org/x/exp,golang.org/x/mod, andgolang.org/x/toolstonewer versions
modernc.orgpackages for SQLite support (cc, ccgo, fileutil, gc,libc, mathutil, memory, opt, sortutil, sqlite, strutil, token)
go.mod
Go module updates and SQLite dependency additionapps/go.mod
1.23.3to1.24.0modernc.org/sqlite v1.37.0as direct dependencygolang.org/x/exp,golang.org/x/mod,golang.org/x/tools9 files