Skip to content

feat: Add interactive HTML export with DataTables.js - #21

Open
devhysterical wants to merge 4 commits into
igorkasyanchuk:masterfrom
devhysterical:master
Open

feat: Add interactive HTML export with DataTables.js#21
devhysterical wants to merge 4 commits into
igorkasyanchuk:masterfrom
devhysterical:master

Conversation

@devhysterical

Copy link
Copy Markdown

Description

This PR implements interactive HTML export functionality with DataTables.js, completing the TODO item "export to HTML/CSS/JS with datatable.js" from the README.

Features

  • Interactive table with sorting, searching, and pagination powered by jQuery DataTables
  • Color-coded performance metrics:
    • Green: < 100ms (excellent performance)
    • Yellow: 100-400ms (moderate)
    • Orange: 400-800ms (warning)
    • Red: > 800ms (critical - needs optimization)
  • Type badges to distinguish Partials (P) and Views (V)
  • Mobile-responsive design with beautiful gradient UI
  • Security: HTML escaping to prevent XSS attacks

Usage

# Basic HTML export
log_analyzer log/production.log -html

# Export with short paths
log_analyzer log/production.log -html --short

# Filter and sort
log_analyzer log/production.log -html -s count -f view

Files Changed

Core Implementation

  • lib/log_analyzer/analyzer.rb - Added to_html() method and HTML generation logic
  • bin/log_analyzer - Added -html CLI option

devhysterical and others added 4 commits December 12, 2024 19:53
Implements HTML export functionality, completing TODO item from README.

## Features
- Interactive table with sorting, searching, and pagination
- Color-coded performance metrics (green/yellow/orange/red)
- Type badges for Partials (P) and Views (V)
- Beautiful gradient UI design
- Mobile responsive layout
- Powered by jQuery DataTables

## CLI Usage
```bash
log_analyzer log/production.log -html
log_analyzer log/production.log -html --short
```

## Changes
- Add to_html method in Analyzer class
- Add -html CLI option
- Add comprehensive test suite
- Create demo HTML file
- Update README with new examples

## Documentation
- Add CONTRIBUTING.md guide
- Add CHANGELOG.md
- Add PR template
- Add GitHub Actions CI workflow
- Migrate from Travis CI to GitHub Actions
- Add support for Ruby 2.7-3.3

## Testing
- All existing tests pass
- New specs for HTML export
- Validated HTML structure
- Security: HTML escaping for XSS prevention

No breaking changes. Fully backward compatible.

Closes TODO item: "export to HTML/CSS/JS with datatable.js"
Implements HTML export functionality, completing TODO item from README.

## Features
- Interactive table with sorting, searching, and pagination
- Color-coded performance metrics (green/yellow/orange/red)
- Type badges for Partials (P) and Views (V)
- Beautiful gradient UI design
- Mobile responsive layout
- Powered by jQuery DataTables

## CLI Usage
```bash
log_analyzer log/production.log -html
log_analyzer log/production.log -html --short
```

## Changes
- Add to_html method in Analyzer class
- Add -html CLI option
- Add comprehensive test suite
- Create demo HTML file
- Update README with new examples

## Documentation
- Add CONTRIBUTING.md guide
- Add CHANGELOG.md
- Add PR template
- Add GitHub Actions CI workflow
- Migrate from Travis CI to GitHub Actions
- Add support for Ruby 2.7-3.3

## Testing
- All existing tests pass
- New specs for HTML export
- Validated HTML structure
- Security: HTML escaping for XSS prevention

No breaking changes. Fully backward compatible.

Closes TODO item: "export to HTML/CSS/JS with datatable.js"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant