GithubHelp home page GithubHelp logo

averycrespi / statice Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 977 KB

A friendly status page built with Flask and Bootstrap

License: MIT License

Python 91.24% Dockerfile 4.27% Shell 0.82% Makefile 1.84% Mako 1.83%
bootstrap docker flask python

statice's People

Contributors

averycrespi avatar imgbotapp avatar

Watchers

 avatar

statice's Issues

Refactor cards

  • Make Card class from check
  • Field: check, recent_events, chart_data

Add tests

Use pytest

  • Add unit tests
  • Add integration tests
  • [ ] Improve database seeding
  • Use testing database (change main db name?)
  • Use pytest-flask

Prevent backpressure

If the RQ workers are not running, jobs will build up in the queue. To fix this, we can only re-queue jobs after they have finished or failed.

Add docstrings

To constants, functions, methods, modules, classes, etc.

Re-add cli

  • Move admin creation to create-admin script

Fix database migrations

  • Generate migrations/ folder locally, then copy into container
  • Expose Postgres docker port OR run postgres locally

Implement janitor

  • Run every STATICE_PURGE_INTERVAL seconds
  • Remove events and responses older than STATICE_PURGE_LIFESPAN seconds

Related changes:

  • Rename STATICE_INTERVAL to STATICE_REQUEST_INTERVAL
  • Move daemons to daemon threads

Migrate Docker to production

  • Add gunicorn with app.run() in front of web_ui
  • Add additional Dockerfile for development.
  • Improve README (no make or poetry required)
  • Use supervisord for workers container with separate Dockerfile
  • Move Dockerfiles to docker dir, 1 per dir, using root as build context
  • Update docker-compose version to 3.3
  • Add example .env files for dev and prod

Implement background jobs

  • Schedule periodic jobs to send GET requests for active checks
  • Use requests and Redis Queue
  • Save job IDs so that they can be canceled
  • Save Response models into DB
  • Prune old responses and events

Redesign settings

  • Access settings page via gear icon on right of navbar
  • Use bootstrap vertical pills as a sidebar item for each section (App settings, checks, integrations, etc.)

Implement site settings page

  • Allow environment variables to be saved in DB settings table
  • Use make reset to drop and regen settings table
  • Can edit and save site settings in dedicated page

Improve daemon

  • Commit database session once after for loop
  • Handle failures
  • Report status of all queued jobs
  • Subtract runtime from next sleep
  • Make daemon class import config from app

Restructure application

  • Move daemons to Blueprint
  • Move models into Blueprint folders
  • Move handlers import to create_app

Improve UX

  • Make cancel buttons work
  • Improve design when no checks are present
  • Allow user to go back from view_check page (with arrow)
  • Change back to dashboard button to arrow
  • Add icons
  • Align messages

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.