Commit Graph

121 Commits

Author SHA1 Message Date
Peter Stockings
d65495541f Move LLM logic to seperate route 2025-07-22 20:25:42 +10:00
Peter Stockings
2c089fcaf7 Remove dashboard route 2025-07-22 09:46:06 +10:00
Peter Stockings
6891ce5661 Make Http client path consistent 2025-07-21 23:29:17 +10:00
Peter Stockings
f55f50d0dc Further refactor, still need to cleanup db.py 2025-07-21 23:25:25 +10:00
Peter Stockings
2ec44252bb Move http endpoints into seperate route 2025-07-21 22:05:58 +10:00
Peter Stockings
917189b3d9 Add support to use LLM's (gemni) to create functions, also create documentation page 2025-06-21 19:04:00 +10:00
Peter Stockings
525471d8c0 Separate timer function execution into dedicated worker process
- Move timer function scheduling and execution logic from `app.py` to new `worker.py`
- Update `Procfile` to launch worker process alongside web application
- Simplify main application startup by removing scheduler configuration
- Maintain existing timer function execution and logging behavior
2025-02-23 17:57:16 +11:00
Peter Stockings
df9378ac23 Update Flask version in requirements.txt
- Upgrade Flask from version 2.2.2 to 2.2.5
- Maintain compatibility with existing project dependencies
2025-02-23 16:50:25 +11:00
Peter Stockings
1b7cfcc8b8 Add background job scheduler for timer functions
- Implement asynchronous timer function execution using APScheduler
- Add support for concurrent timer function invocations with asyncio
- Create background job to check and run enabled timer functions at specified intervals
- Update requirements.txt to include aiohttp and flask-apscheduler
- Configure thread pool executor for scheduler
- Add error handling and logging for timer function executions
2025-02-23 16:48:01 +11:00
Peter Stockings
556a4430ad Improve dashboard responsiveness and layout spacing
- Adjust grid layouts and spacing for better mobile and small screen support
- Reduce padding and margin sizes for compact displays
- Update text sizes and alignment for improved readability across devices
- Maintain existing dashboard structure and content
2025-02-23 16:47:31 +11:00
Peter Stockings
ad84f39113 Update timer function logs display to show first log entry
- Modify logs template to extract and display the first log entry
- Preserve existing log display formatting and empty log handling
2025-02-23 16:47:07 +11:00
Peter Stockings
98f38d56bd Update default timer script to remove request parameter
- Modify default timer script to remove unused `req` parameter
- Simplify default script signature to match current usage
2025-02-21 00:22:08 +11:00
Peter Stockings
f42c3257a8 Remove unused timer functions dashboard route and template
- Delete `/dashboard/timer_functions` route from `app.py`
- Remove `timer_functions.html` template
- Simplify application routing by eliminating unused dashboard view
2025-02-21 00:19:22 +11:00
Peter Stockings
3b7c630a44 Update dashboard navigation icons and styling
- Refresh Home and HTTP sidebar icons with new SVG designs
- Adjust icon sizes and stroke attributes for improved visual consistency
- Maintain existing navigation structure and functionality
2025-02-21 00:00:49 +11:00
Peter Stockings
02e703c62f Update dashboard navigation and login redirect
- Modify login route to redirect to home index instead of dashboard
- Refresh dashboard sidebar icons with new SVG designs
- Remove Analytics sidebar item from dashboard template
2025-02-20 23:53:55 +11:00
Peter Stockings
2d47235d95 Update build pack 2025-02-20 23:42:56 +11:00
Peter Stockings
d4c0c0f262 Add home dashboard and Mithril rendering support
- Create new home route with comprehensive dashboard statistics
- Implement Mithril rendering support with new `mithril_loader.html` template
- Add new routes for home and test pages in `app.py`
- Create `lib/mithril.py` with Mithril rendering and error handling utilities
- Update dashboard template to use new home route
- Add detailed dashboard view with timer and HTTP function statistics
2025-02-20 23:35:46 +11:00
Peter Stockings
24a0c0ffef Enhance timer function tracking with invocation count and log storage
- Add `invocation_count` column to `timer_functions` table
- Change `logs` column in `timer_function_invocations` to JSONB type
- Create trigger function to automatically increment invocation count on new log entries
2025-02-20 22:51:52 +11:00
Peter Stockings
19b5508a9c Refactor timer settings UI in editor component
- Integrate timer settings directly into the main edit template
- Remove separate timer settings panel
- Improve layout and styling of timer configuration inputs
- Maintain existing functionality for interval and date-based triggers
2025-02-17 20:42:29 +11:00
Peter Stockings
0a70f90953 Simplify timer function edit template configuration
- Disable public, log request, and log response toggles in edit template
- Streamline edit view configuration for timer functions
2025-02-17 19:25:31 +11:00
Peter Stockings
17457e492e Add version history view for timer functions
- Implement `/history/<function_id>` route in timer routes to fetch and display function versions
- Create new Mithril `DiffView` component for comparing script versions
- Add new history template for timer functions with version comparison
- Include version diff functionality using AceDiff library
- Update header and edit templates to include history URL for timer functions
2025-02-17 19:19:45 +11:00
Peter Stockings
77957a61a3 Add logs view for timer functions
- Create new database table `timer_function_invocations` to track function executions
- Implement `/logs/<function_id>` route in timer routes to fetch and display invocation logs
- Add new logs template for timer functions with detailed invocation information
- Update header templates to include logs URL for timer functions
2025-02-17 00:24:49 +11:00
Peter Stockings
29da93a9f8 Update ResponseView to support timer function display
- Add `isTimer` flag to conditionally render response view tabs and details
- Hide preview and raw tabs for timer responses
- Automatically switch to logs tab for timer responses
- Conditionally hide status and size details for timer responses
2025-02-17 00:09:02 +11:00
Peter Stockings
d5338f17c1 Hide client details in timer function edit template 2025-02-17 00:08:37 +11:00
Peter Stockings
aeb880ed0a Update cancel URL handling in HTTP and timer function templates
- Modify header template to use explicit `cancel_url` parameter
- Add `cancel_url` to new timer and HTTP function templates
- Remove default URL fallback in header template
2025-02-16 20:22:03 +11:00
Peter Stockings
e09437c7b8 Implement timer functions with full CRUD functionality and enhanced UI
- Add comprehensive routes for creating, editing, deleting, and toggling timer functions
- Create new HTML templates for timer function overview, new, and edit pages
- Extend Mithril editor component to support timer-specific settings like trigger type, frequency, and enabled status
- Implement database schema and versioning for timer functions
- Add UI improvements for timer function listing with detailed schedule and status information
2025-02-16 19:50:58 +11:00
Peter Stockings
adeb62365b Update Jinja2 environment to include Flask's default globals and filters 2025-02-16 14:07:23 +11:00
Peter Stockings
699ee50229 Add blueprint scaffold for timer functions 2025-02-16 13:45:34 +11:00
Peter Stockings
9d48bbd285 Refactor HTTP functions overview and logs pages with improved UI and responsiveness
- Modernize the design of HTTP functions overview and logs pages
- Add more detailed styling with Tailwind CSS
- Improve layout and readability with better typography and spacing
- Add empty state handling for both logs and functions lists
- Enhance visual hierarchy and interaction states
2025-02-14 22:22:27 +11:00
Peter Stockings
5ec8bba9e8 Refactor HTTP function editor with Mithril components and new API endpoints
- Add new Mithril components for editor (editor.js), response view (responseView.js), and alerts (alert.js)
- Create new API endpoints for creating, updating, and deleting HTTP functions
- Update templates to use new Mithril editor component
- Improve header navigation with more consistent styling and active state indicators
- Remove old edit form route and template
- Add new dedicated editor route and template

cursor.ai
2025-02-14 00:40:45 +11:00
Peter Stockings
abf3ca15d2 Revert "Update python version from 3.9.18 to 3.10 in attempt to resolve build issue after updating dokku"
This reverts commit 3d70517c67.
2024-12-18 23:21:48 +11:00
Peter Stockings
3d70517c67 Update python version from 3.9.18 to 3.10 in attempt to resolve build issue after updating dokku
"Requested runtime (python-3.9.18) is not available for this stack (heroku-24)."
2024-12-18 23:07:21 +11:00
Peter Stockings
bc4a1ae9a6 Show original script as well, still need to add revert/switch version functionality 2024-05-18 22:46:44 +10:00
Peter Stockings
2b4ca571ca Add in version history for http functions
and also load .env in dev mode
2024-05-18 21:55:11 +10:00
Peter Stockings
b4c67d8346 Add versions for http_functions, whenever script is updated a new version is logged. 2024-04-06 19:49:46 +11:00
Peter Stockings
4b30deb709 On function editor, if the editor loads slow enough then you can see the code/environment json as html text so I changed the text to transparent to avoid this, not a real fix (For some reason I cant find any mention of other people having this issue) 2024-03-29 22:34:57 +11:00
Peter Stockings
3ce976507e Seperated landing page into self contained template as gradient stylings were making the dashboard hard to read 2024-03-29 22:00:17 +11:00
Peter Stockings
d25e8bb182 Fix dashboard -> http functions over view page not working on refresh (was sending html partial for htmx) 2024-03-29 21:40:37 +11:00
Peter Stockings
cb3afa77fc In function editor template modify add/delete functionality so it uses htmx.ajax and updates url 2024-03-29 21:20:35 +11:00
Peter Stockings
163a1dbc5f Disable send request button and display animation when request is already started 2024-03-29 20:19:52 +11:00
Peter Stockings
c2cf448528 For postman-like http client change default tab for response view to Browser Preview 2024-03-29 19:57:23 +11:00
Peter Stockings
e92a1ad69d Limit decimal places length of response time in ms 2024-03-29 19:07:17 +11:00
Peter Stockings
db191d7cf5 Format response time & size 2024-03-29 18:44:32 +11:00
Peter Stockings
6044d2e00b For postman-like mithril.js driven client made the following minor changes
* Display response status, size, time
* Toggle between response body (text), Browser preview (HTML), & headers
2024-03-29 18:38:48 +11:00
Peter Stockings
c2d17e1b82 Remove unused stylings from landing page template 2024-03-29 18:32:23 +11:00
Peter Stockings
25178b5aad Packaging a few small changes
* Make edit http function endpoint accept function id rather than name
* Move show alert js function to function editor template as its only used here
* Added a note that previous commit (API -> isolator request was changed from global routing to inter app routing) (It sped things up, but not its regressed; need to look into this further)
2024-03-28 21:26:49 +11:00
Peter Stockings
df458c2738 Use mithril.js to make postman like client (Previously was static html with a sprinkling of js) 2024-03-28 20:49:49 +11:00
Peter Stockings
01d24c7b29 Testing: In the current setup function executes js functions on isolator through a rest api and it calls the external address https://isolator.peterstockings.com/execute, switching to interal http://isolator.web:5000/execute. Im checking if this results in a speed up 2024-03-27 21:56:02 +11:00
Peter Stockings
1a496d2441 Fix issue where on page refresh when on function edit/new sub pages you would be redirected back to dashboard 2024-03-27 14:03:52 +11:00
Peter Stockings
48b013c1f4 Minor styling update for functions overview & edit/new pages to make it more usable after landing page changes, also started to work on making pages refreshable through htmx hx-push-url 2024-03-27 13:08:29 +11:00