-
-
Notifications
You must be signed in to change notification settings - Fork 2
Redesign stránky runtemplate
#73
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
base: main
Are you sure you want to change the base?
Conversation
Deletes outdated Phinx migration files to clean up legacy configurations and unused database schema changes. Updates Composer lockfile to include newer dependency versions, improving compatibility and functionality. Streamlines project setup and reduces maintenance overhead by removing redundant files and ensuring up-to-date dependency references.
…-database #31 Remove obsolete database migrations and update dependencies
…-database #31 Remove obsolete migration and seed targets from Makefile
Deprecates and deletes all existing CLI command modules, including application, company, job, token, and queue-related commands. Simplifies the codebase by eliminating unused or obsolete functionality, potentially paving the way for newer, streamlined implementations. Ensures no lingering dependencies by completely removing associated files.
Eliminates redundant Makefile targets to simplify maintenance and streamline build processes. Deletes the composer.lock file to prioritize dynamic dependency resolution, often needed for libraries or shared projects.
…-cli 30 use separated multiflexi cli
Eliminates multiflexi-cli functionality, including launch configurations, documentation references, CLI scripts, and integration tests. Updates dependencies and packaging to reflect the removal. Streamlines codebase by deprecating unused components and aligning with current project requirements.
Eliminates obsolete CLI scripts, Symfony Console command classes, and related tests. Streamlines dependencies by adjusting package requirements, including adding a `Pre-Depends` field. Improves maintainability by removing unused configuration files and simplifying project structure.
Introduces a new package, multiflexi-common, for shared configuration and user management. Updates dependencies to include multiflexi-common and replaces redundant logic in multiflexi.postinst. Adjusts .gitignore and composer.lock for compatibility. Ensures debhelper and installation scripts align with the new package structure.
…te unused Zabbix exceptions and request classes; refactor ZabbixSender; add architecture documentation; introduce User class for UI; create initial test files for CrTypeField, Job, Logger, and platformServer.
…-executor Remove deprecated SQLServer, configForm, and mServer classes; elimina…
Adds multiflexi-api and multiflexi-executor to suggested dependencies in the package control file for better functionality coverage. Replaces inline SVG architecture diagram with an external image reference for improved maintainability and visual clarity.
Eliminates the inclusion of configForm.php in the installation process as it is no longer needed. Simplifies the file structure and reduces potential maintenance overhead.
Relocates Zabbix-related PHP files from multiflexi-zabbix to core directories in preparation for structural improvements. Updates installation paths to reflect the new organization. Improves maintainability and aligns with modular design principles.
Upgrades several library versions, including `cakephp/database`, `cakephp/datasource`, `nikic/php-parser`, `phpstan/phpstan`, and `rectorphp/rector` to their latest versions, ensuring compatibility and improved features. Adds new PSR-4 autoload namespaces for MultiFlexi modules to extend functionality and modularity. Enhances the MultiFlexi API package setup by adding a new dependency on `multiflexi` for improved integration and capability.
Eliminates obsolete scheduler-related scripts and configurations, including `multiflexi-scheduler` and `scheduler.php`. Introduces new credential types and actions under the `MultiFlexi` namespace, improving modularity and maintainability. Renames and organizes files for better structure and consistency. Updates `composer.lock` with newer dependency versions, ensuring compatibility and security. Adds a test script for Zabbix integration and recommends `multiflexi-scheduler` in Debian control file.
Introduces a new UI component for cron expression inputs with validation and styling enhancements to simplify scheduling configuration. Replaces interval-based scheduling logic with cron expression handling across relevant files. Updates dependencies and removes deprecated files related to legacy job launcher setup.
…and consistency; cleans up RunTemplatePanel by removing unnecessary whitespace.
Introduces a new `artifacts` property in the schema to define patterns for matching artifact files produced by the application. This addition enhances the application's capability to identify and process output files, improving post-run handling and automation. Ensures the `pattern` property is required and disables additional properties for strict validation.
Adds detailed descriptions, default values, and constraints to the application schema for improved clarity and validation. Updates test data to reflect schema changes, converting certain fields to arrays and enhancing artifact settings for consistency and functionality.
Adds support for PHP sodium extensions across multiple versions (php8.1-sodium, php8.2-sodium, php8.3-sodium, php8.4-sodium) to improve compatibility and flexibility in dependency resolution.
Bumps [ergebnis/php-cs-fixer-config](https://github.com/ergebnis/php-cs-fixer-config) from 6.55.0 to 6.56.0. - [Release notes](https://github.com/ergebnis/php-cs-fixer-config/releases) - [Changelog](https://github.com/ergebnis/php-cs-fixer-config/blob/6.56.0/CHANGELOG.md) - [Commits](ergebnis/php-cs-fixer-config@6.55.0...6.56.0) --- updated-dependencies: - dependency-name: ergebnis/php-cs-fixer-config dependency-version: 6.56.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Overhauls UI appearance with new color scheme and enhances topic filtering in the Activation Wizard. Adds support for dynamic credential form helpers and introduces a new Raiffeisen Bank credential type handler. Deprecates outdated credential types and debug utilities. Refactors credential validation logic for improved error handling and readability. Removes unused files and legacy code to streamline the codebase. Improves adherence to PSR standards and optimizes PHPDoc formatting. Ensures better database migration checks and error reporting. Prepares the foundation for future dynamic credential type integrations.he
Changes the ownership of web files from `www-data` to `multiflexi` for better alignment with application-specific permissions. Removes the reference to an unused file to clean up the installation script and streamline the packaging process.
Replaces the link for credential type in the 'formType' field to point to the credential type's details page instead of the credential's details page. Improves navigation by directing users to the appropriate resource for credential type-specific information.
Adds support for new Composer plugins `php-http/discovery` and `tbachert/spi` by enabling them in the configuration. Updates multiple dependencies, including `phpunit`, `phpstan`, `php-cs-fixer`, and others, to their latest versions, ensuring compatibility with PHP 8.5 and the latest library improvements. Locks updated references and timestamps in the `composer.lock` file to reflect the latest package versions and updates.
…s/php-cs-fixer-config-6.56.0 composer: bump ergebnis/php-cs-fixer-config from 6.55.0 to 6.56.0
Implements UI showing API rate limits per client ID, improving transparency for credential usage. Refactors code for better formatting consistency. Enhances user awareness of certificate status and API limits.
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.1.0 to 4.1.1. - [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md) - [Commits](nodeca/js-yaml@4.1.0...4.1.1) --- updated-dependencies: - dependency-name: js-yaml dependency-version: 4.1.1 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
…ctions/upload-artifact-5 Bump actions/upload-artifact from 4 to 5
Use php8.4 selenium-tests.yml
…ts/selenium/js-yaml-4.1.1 Bump js-yaml from 4.1.0 to 4.1.1 in /tests/selenium
Uses binary mode for file reading to ensure compatibility and prevents invalid data returns by validating array type. Fixes schedule info display to show correct values and adjusts job count badges for clearer UI feedback.
This commit introduces a complete visual redesign of the `runtemplate.php` page, based on a modern Bootstrap 4 admin template. - Created a new, isolated UI namespace `MultiFlexi\UiII` to allow for a gradual transition without breaking the existing application. - Implemented a new page layout with a fixed, collapsible sidebar and a top header bar. - Developed new, modular UI components (`WebPage`, `AppShell`, `Sidebar`, `RunTemplatePage`) to construct the new design. - Added a test file `runtemplate_new.php` for safe, isolated viewing and testing of the new design. - Included Font Awesome 6 for icons and implemented interactive elements like a collapsible sidebar and a placeholder for charts.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. New to Jules? Learn more at jules.google/docs. |
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the WalkthroughNew PHP UI components establish a structured application layout framework. Four interconnected classes (AppShell, WebPage, Sidebar, RunTemplatePage) compose a responsive web interface with navigation, content areas, and dashboard elements. A demonstration script shows component integration. Changes
Sequence DiagramsequenceDiagram
participant Script as runtemplate_new.php
participant WP as WebPage
participant AS as AppShell
participant SB as Sidebar
participant RTP as RunTemplatePage
participant PM as pageMax Container
Script->>WP: new WebPage("MultiFlexi — Mockup Runs")
WP->>WP: Inject CSS (Bootstrap, FontAwesome)
WP->>AS: new AppShell()
AS->>SB: new Sidebar()
AS->>PM: Create pageMax container
WP->>WP: Attach AppShell to body
Script->>AS: addContent(RunTemplatePage)
AS->>RTP: new RunTemplatePage()
RTP->>RTP: createHeader()
RTP->>RTP: createFiltersCard()
RTP->>RTP: createTableCard()
RTP->>RTP: createChartCard()
RTP->>RTP: createFooterActions()
RTP->>RTP: createDetailModal()
RTP->>PM: Add composed page sections
Script->>WP: Inject Chart.js config
Script->>WP: Inject sidebar toggle handler
Script->>WP: finalize()
WP->>WP: Append JS libraries (jQuery, Popper, Bootstrap, Chart.js)
Script->>Script: Write HTML to file
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
This commit introduces a complete visual redesign of the `runtemplate.php` page, based on a modern Bootstrap 4 admin template. - Created a new, isolated UI namespace `MultiFlexi\UiII` to allow for a gradual transition without breaking the existing application. - Implemented a new page layout with a fixed, collapsible sidebar and a top header bar. - Developed new, modular UI components (`WebPage`, `AppShell`, `Sidebar`, `RunTemplatePage`) to construct the new design. - Added a test file `runtemplate_new.php` for safe, isolated viewing and testing of the new design. - Included Font Awesome 6 for icons and implemented interactive elements like a collapsible sidebar and a placeholder for charts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (5)
src/MultiFlexi/UiII/Sidebar.php (1)
9-21: Allow overriding/merging sidebar CSS classes from$properties.In
Sidebar::__construct, using['class' => 'sidebar d-flex flex-column'] + $propertiesmeans any'class'provided in$propertiesis ignored; array union keeps the left-hand key. If you ever want callers to customize or extend sidebar classes, it would be safer to merge/append classes or put$propertieson the left:- parent::__construct(null, ['class' => 'sidebar d-flex flex-column'] + $properties); + $defaults = ['class' => 'sidebar d-flex flex-column']; + parent::__construct(null, $properties + $defaults);(or explicitly concatenate classes if both sides set
'class').src/MultiFlexi/UiII/WebPage.php (2)
28-51:content-area.expandedCSS currently makes the sidebar toggle a no‑op.The inline CSS defines:
.content-area { flex: 1; padding: 1.25rem; display: flex; justify-content: center; transition: margin-left 0.3s; } .content-area.expanded { margin-left: 0; }Since
.content-areahas no non-zeromargin-leftby default, toggling theexpandedclass (from the JS inruntemplate_new.php) has no visual effect. If the design expects the content area to shift when the sidebar collapses/expands, you likely want a non-zero default margin or an explicit collapsed state rule (e.g. different margin when.sidebarhascollapsed), otherwise you can drop the.expandedclass and its JS toggle.
19-22: Optional: add explicit return type hints for constructor andfinalize().For consistency with typed properties (e.g.
public AppShell $appShell;) anddeclare(strict_types=1);, you could add:- public function __construct($pageTitle = null) + public function __construct(?string $pageTitle = null) - public function finalize() + public function finalize(): voidThis tightens the contract and helps static analysis without changing behavior.
Also applies to: 67-76
src/MultiFlexi/UiII/AppShell.php (1)
24-35: Constructor prevents callers from extendingapp-shellCSS class.Like
Sidebar, the constructor uses['class' => 'app-shell'] + $properties, which discards any'class'provided by the caller. If you intend AppShell to be customizable, consider merging/overriding classes instead:- parent::__construct(null, ['class' => 'app-shell'] + $properties); + $defaults = ['class' => 'app-shell']; + parent::__construct(null, $properties + $defaults);This keeps
app-shellas a default while still allowing extra classes via$properties.Also applies to: 44-47
src/MultiFlexi/UiII/RunTemplatePage.php (1)
19-24: Column widths make table and chart stack instead of forming a 2‑column row.In
createTableCard/createChartCardlayout you use:$row = $this->addItem(new \Ease\TWB4\Row()); $col1 = $row->addColumn('12'); ... $col2 = $row->addColumn('12');With both columns set to
'12', they will occupy the full row width each and stack vertically. If the mockup expects the table and chart side‑by‑side on larger screens, consider using smaller widths and responsive breakpoints (e.g.'8'/'4'or'md-8'/'md-4', depending on howRow::addColumn()maps its argument to Bootstrap classes).
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
src/MultiFlexi/UiII/AppShell.php(1 hunks)src/MultiFlexi/UiII/RunTemplatePage.php(1 hunks)src/MultiFlexi/UiII/Sidebar.php(1 hunks)src/MultiFlexi/UiII/WebPage.php(1 hunks)src/runtemplate_new.php(1 hunks)
| // Přidání JavaScriptu pro graf a sbalování sidebaru | ||
| $page->addJavaScript(" | ||
| // Sample Chart.js config | ||
| var ctx = document.getElementById('runsChart').getContext('2d'); | ||
| var runsChart = new Chart(ctx, { | ||
| type: 'line', | ||
| data: { | ||
| labels: ['Fri','Mon','Tue','Wed','Thu','Fri','Sat','Tue'], | ||
| datasets: [{ | ||
| label: 'Běhy', | ||
| data: [2, 12, 8, 10, 22, 18, 24, 12], | ||
| fill: false, | ||
| borderWidth: 2, | ||
| pointRadius: 3, | ||
| lineTension: 0.2 | ||
| }] | ||
| }, | ||
| options: { | ||
| legend: { display: false }, | ||
| scales: { | ||
| yAxes: [{ ticks: { beginAtZero: true } }] | ||
| }, | ||
| responsive: true, | ||
| maintainAspectRatio: false | ||
| } | ||
| }); | ||
|
|
||
| // Sidebar toggle logic | ||
| $(document).on('click', '.sidebar-toggle-btn', function() { | ||
| $('.sidebar').toggleClass('collapsed'); | ||
| $('.content-area').toggleClass('expanded'); | ||
| }); | ||
| "); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Ensure inline chart & sidebar JS runs after libraries and DOM are ready.
The script added via $page->addJavaScript("..."); uses Chart and $ and directly calls document.getElementById('runsChart'). Depending on addJavaScript defaults, this may execute before Chart.js/jQuery are loaded (added in WebPage::finalize()) or before the canvas exists in the DOM.
For robustness, consider either:
- Explicitly placing this script at the end of
<body>:
- $page->addJavaScript("
+ $page->addJavaScript("
// Sample Chart.js config
...
-");
+", null, true);- Or wrapping it in a DOM-ready handler that also assumes Chart.js and jQuery are already loaded:
$(function () {
var ctx = document.getElementById('runsChart').getContext('2d');
// ...
});This avoids runtime Chart is not defined / $ is not defined errors on some loading orders.
I'll verify the concerns in this review comment by examining the codebase structure and the WebPage::addJavaScript() implementation.
🏁 Script executed:
#!/bin/bash
# Find WebPage class and addJavaScript method implementation
find . -type f -name "*.php" | head -20Length of output: 602
🏁 Script executed:
#!/bin/bash
# Search for WebPage class definition and addJavaScript method
rg -n "class WebPage" --type=phpLength of output: 245
🏁 Script executed:
#!/bin/bash
# Search for addJavaScript method implementation
rg -n -A 10 "function addJavaScript\|public.*addJavaScript" --type=phpLength of output: 0
🏁 Script executed:
#!/bin/bash
# Check the runtemplate_new.php file itself
rg -n "Chart\|jQuery\|addJavaScript" src/runtemplate_new.php --type=phpLength of output: 0
🏁 Script executed:
#!/bin/bash
# Search for where Chart.js and jQuery are included
rg -n "Chart\\.js\|jquery" --type=phpLength of output: 0
🏁 Script executed:
#!/bin/bash
# Look for the canvas element #runsChart
rg -n "runsChart\|<canvas" --type=phpLength of output: 0
🏁 Script executed:
#!/bin/bash
# Check finalize method in WebPage
rg -n -A 20 "function finalize\|public.*finalize" --type=php | grep -A 20 "class WebPage" Length of output: 0
🏁 Script executed:
#!/bin/bash
# Search for DOM ready handlers or script loading patterns
rg -n "\$\(function\|document.ready\|DOMContentLoaded" --type=phpLength of output: 0
🏁 Script executed:
#!/bin/bash
# Get the full content of src/runtemplate_new.php
cat src/runtemplate_new.phpLength of output: 1317
🏁 Script executed:
#!/bin/bash
# Find WebPage.php or similar files
fd "WebPage\|webpage" --type=f --extension=phpLength of output: 0
🏁 Script executed:
#!/bin/bash
# Search for finalize method that may output scripts
rg -n -B 5 -A 15 "finalize" --type=phpLength of output: 64445
🏁 Script executed:
#!/bin/bash
# Check for script tag placement patterns
rg -n "<script\|</body>" --type=phpLength of output: 0
🏁 Script executed:
#!/bin/bash
# Search for jQuery and Chart.js version or CDN references
rg -n "jquery|chart" --type=php -iLength of output: 10307
🏁 Script executed:
#!/bin/bash
# Look at the structure and imports in runtemplate_new.php
head -50 src/runtemplate_new.phpLength of output: 1317
🏁 Script executed:
#!/bin/bash
# Check if there's a template or HTML file involved
fd "\.html|\.tpl" --type=fLength of output: 93
🏁 Script executed:
#!/bin/bash
# Search for where addJavaScript output is rendered
rg -n "echo.*<script\|print.*<script" --type=phpLength of output: 0
🏁 Script executed:
#!/bin/bash
# Find all PHP files to understand project structure
find . -name "*.php" -type fLength of output: 17843
🏁 Script executed:
#!/bin/bash
# Get more context around the addJavaScript calls
rg -n -B 5 -A 5 "addJavaScript" --type=phpLength of output: 25061
🏁 Script executed:
#!/bin/bash
# Check WebPage implementation for script output location
rg -n -C 10 "class WebPage" --type=phpLength of output: 3308
🏁 Script executed:
#!/bin/bash
# Look for HTML template structure
fd . -type f \( -name "*.php" -o -name "*.html" \) | xargs grep -l "runsChart\|<body\|<head" 2>/dev/null | head -5Length of output: 170
🏁 Script executed:
#!/bin/bash
# Search for where the page is finalized and output
rg -n "file_put_contents\|echo\|print\|->output\|->render" --type=php | grep -i "html\|finalize"Length of output: 0
🏁 Script executed:
#!/bin/bash
# Check complete project structure
ls -laLength of output: 4072
🏁 Script executed:
#!/bin/bash
# Search for all script-related method calls
rg -n "add.*Script\|addJavaScript\|addCSS\|include.*js\|include.*jQuery\|include.*Chart" --type=phpLength of output: 0
Fix script execution order: add libraries before custom inline JavaScript
The concern is valid. The custom inline script at line 16 of src/runtemplate_new.php calls Chart and $ without ensuring those libraries are loaded first.
The finalize() method in src/MultiFlexi/UiII/WebPage.php (lines 70–73) loads jQuery and Chart.js with the third parameter set to true, which places them at the end of <body>. However, your custom inline script (line 16) is added without this flag, causing it to execute before the libraries load.
Solution: Add , null, true to ensure the custom script runs after the libraries:
$page->addJavaScript("
// Sample Chart.js config
var ctx = document.getElementById('runsChart').getContext('2d');
// ... rest of script
", null, true);Alternatively, wrap it in a DOM-ready handler that assumes libraries are already loaded:
$page->addJavaScript(<<<'EOD'
$(function () {
var ctx = document.getElementById('runsChart').getContext('2d');
// ... rest of script
});
EOD, null, true);🤖 Prompt for AI Agents
In src/runtemplate_new.php around lines 15 to 47 the inline script uses Chart
and $ before those libraries are guaranteed to be loaded; update the
addJavaScript call to schedule the script after footer-loaded libraries by
passing the third parameter true (e.g. addJavaScript(..., null, true)) or wrap
the script body in a DOM-ready handler and still pass the third parameter true
so the inline code executes only after jQuery and Chart.js have been loaded.
| // Vykreslení stránky do souboru | ||
| file_put_contents('/home/jules/verification/runtemplate.html', $page->draw(false)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid hard‑coded absolute output path in the demo script.
Writing directly to /home/jules/verification/runtemplate.html is very environment-specific and will typically fail or write to an unexpected location outside your deployment. For a committed test/demo script, consider making the output path configurable (CLI argument, env/config) or at least guarded so it’s used only in a local/dev context.
🤖 Prompt for AI Agents
In src/runtemplate_new.php around lines 49-50, the script writes output to a
hard-coded absolute path (/home/jules/verification/runtemplate.html); change
this to use a configurable, environment-safe location by reading an environment
variable or CLI argument (e.g. RUNTEMPLATE_OUTPUT or a --output option) and only
falling back to a safe default (temporary directory or a path relative to the
project, e.g. sys_get_temp_dir() or __DIR__). Also guard the write so it only
executes in local/dev contexts (check an env flag like APP_ENV === 'development'
or a --force flag) to avoid accidental writes in production; if the configured
path is missing or not writable, fail with a clear error message instead of
silently writing to an unexpected location.
Tento commit obsahuje kompletní redesign stránky
runtemplate.phppodle dodaného mockupu. Vytvořil jsem novou sadu UI komponent v adresářisrc/MultiFlexi/UiII/, které implementují moderní administrátorský vzhled s fixním postranním panelem a horní lištou. Součástí je i testovací souborruntemplate_new.phppro snadné ověření. Veškeré změny jsou provedeny v souladu s požadavky na použití Bootstrap 4 a Font Awesome 6. Připravil jsem také detailní instrukce pro integraci.Fixes #
PR created automatically by Jules for task 10205857577420002137 started by @Vitexus
Summary by CodeRabbit