Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
292 commits
Select commit Hold shift + click to select a range
12653fe
Merge branch 'master' of github.com:ptrofimov/beanstalk_console
Feb 11, 2015
1ca1849
Adding docker support and fig file for starting beanstalkd and consol…
deardooley Mar 11, 2015
9a51230
Updating readme files. Cleaning up Dockerfile of unnecessary comments
deardooley Mar 11, 2015
0d032f1
Added basic authentication
johncongdon Mar 26, 2015
78bf247
Make auth optional
johncongdon Mar 26, 2015
3c691e1
Make auth optional
johncongdon Mar 26, 2015
52717e3
try to create storage.json automatically if it does not exist
d-a-n Apr 25, 2015
43c6219
Merge pull request #86 from d-a-n/feature/auto-create-storage-file
pentium10 May 13, 2015
b3ef456
Reformatted the composer.json file.
needcaffeine May 16, 2015
662ca7e
Merge branch 'master' of github.com:ptrofimov/beanstalk_console
May 18, 2015
d458c25
Merge pull request #92 from pentium10/master
pentium10 May 18, 2015
4aec7dd
minor formatting commit
May 18, 2015
7f865d3
Merge pull request #93 from pentium10/master
pentium10 May 18, 2015
3d87687
Merge pull request #89 from needcaffeine/master-readme
pentium10 May 18, 2015
7938582
Merge branch 'add_authentication' of git://github.com/johncongdon/bea…
May 18, 2015
de58c38
Added basic authentication fixes #84
May 18, 2015
89eeeda
Merge branch 'master' of github.com:ptrofimov/beanstalk_console
May 18, 2015
03543d9
Merge pull request #94 from pentium10/master
pentium10 May 18, 2015
3c92206
Update README.md
pentium10 May 18, 2015
2bb547f
Merge branch 'search_feature' of git://github.com/c4pone/beanstalk_co…
May 18, 2015
9bdf7c0
Created the option to search for jobs by their data field, fixes #75
May 18, 2015
92ae858
Merge branch 'master' of github.com:ptrofimov/beanstalk_console
May 18, 2015
5ea3f99
Update README.md
pentium10 May 18, 2015
d289b7c
Merge pull request #95 from pentium10/master
pentium10 May 18, 2015
63ff627
Update config.php
pentium10 May 18, 2015
01f999e
on dblclick toggle ellipsize
May 18, 2015
073cbf4
Merge pull request #96 from pentium10/master
pentium10 May 18, 2015
9df2b6d
use getenv function for BEANSTALK_SERVERS
rjocoleman Jul 2, 2015
8d39fc8
Merge pull request #98 from rjocoleman/flexible-env
pentium10 Jul 2, 2015
f2fe987
Ability to name servers implements #99
Aug 18, 2015
0d5a173
Merge pull request #102 from pentium10/master
pentium10 Aug 18, 2015
6751049
small fix
Aug 19, 2015
49b687c
Merge pull request #103 from pentium10/master
pentium10 Aug 19, 2015
dd39991
Merge pull request #83 from deardooley/master
pentium10 Aug 19, 2015
fc0d675
Update config.php
pentium10 Aug 19, 2015
662a222
Updating from fig to compose. Adding option to start container with b…
deardooley Aug 19, 2015
d664d8d
Merge pull request #104 from deardooley/master
pentium10 Aug 21, 2015
6f21d15
Update config.php
pentium10 Aug 21, 2015
ee93171
Changed the global vars to $GLOBALS and fix some includes
byjg Aug 26, 2015
3dcc792
Changed __DIR__ for dirname(__FILE__) to became 5.2 compatible
byjg Aug 26, 2015
888e19d
Fixed response for addJob action
drull755 Sep 8, 2015
35ebe1c
error_fix
drull755 Sep 8, 2015
950723e
fix_redirect
drull755 Sep 8, 2015
dad98c5
Merge pull request #107 from drull755/master
pentium10 Sep 9, 2015
ebcd0fa
Merge pull request #109 from drull755/fix_redirect
pentium10 Sep 9, 2015
fe50bfe
error_fix - php52 support
drull755 Sep 15, 2015
069c1d0
Merge branch 'master' of https://github.com/ptrofimov/beanstalk_conso…
drull755 Sep 15, 2015
0d1a36d
error_fix - fix for "Invalid argument supplied for foreach()" error
drull755 Sep 15, 2015
61aa9d4
configure_search_limits
drull755 Sep 22, 2015
7b2082f
Merge pull request #110 from drull755/configure_search_limits
pentium10 Sep 22, 2015
6a98374
Merge pull request #108 from drull755/error_fix
pentium10 Sep 22, 2015
7fe1ccf
Merge branch 'changeglobal' of git://github.com/byjg/beanstalk_consol…
Sep 23, 2015
4e7824c
Merge branch 'byjg-changeglobal'
Sep 23, 2015
512349b
s
Sep 23, 2015
f5c288c
fix path
Sep 23, 2015
5562e8f
Update run.sh
pentium10 Sep 28, 2015
8d1356f
Merge branch 'master' of github.com:ptrofimov/beanstalk_console
Sep 30, 2015
bd2aad0
Merge pull request #113 from pentium10/master
pentium10 Sep 30, 2015
17490b2
Update config.php
pentium10 Sep 30, 2015
8b102c4
Add missing php extension mbstring
jfilipczyk Oct 10, 2015
03e55a1
Merge pull request #114 from jfilipczyk/master
pentium10 Oct 11, 2015
026292d
Extract apache listen ports as env vars
Jan 6, 2016
00d66b4
Merge branch 'master' of github.com:ptrofimov/beanstalk_console
Jan 13, 2016
6292157
Merge pull request #115 from pentium10/master
pentium10 Jan 13, 2016
eab430a
Update README.md
zekiunal Feb 18, 2016
ba8717a
Merge pull request #117 from zekiunal/patch-1
pentium10 Feb 18, 2016
b1249ad
set the proper permission bits on storage.json
karenetheridge Sep 29, 2016
0f58b6d
Merge pull request #125 from karenetheridge/topic/chmod
pentium10 Sep 29, 2016
ede5bad
bugfix from warning when null arrived for foreach loop
Oct 4, 2016
85ea582
made all URLS consistant
Oct 6, 2016
a30436d
Merge pull request #2 from SpaceGazebo/master
pentium10 Oct 7, 2016
eeb337f
Merge pull request #126 from SpaceGazebo/master
pentium10 Oct 11, 2016
3aadc64
Update config.php
pentium10 Oct 11, 2016
2489a6f
added base64 decode
Oct 11, 2016
4c6f6c7
Merge pull request #127 from pentium10/master
pentium10 Oct 11, 2016
4ac76e6
开启密码验证,添加退出按钮
Feb 4, 2016
1a8cd00
logout when authenticated
Oct 11, 2016
e025a20
Merge pull request #128 from pentium10/master
pentium10 Oct 11, 2016
ddde083
fixed urlencode issue, fixes #129
Nov 11, 2016
3989034
Merge pull request #131 from pentium10/master
pentium10 Nov 11, 2016
50c0d31
Update config.php
pentium10 Nov 11, 2016
7561d6f
fixes incorrect vhost DocumentRoot which overrides the correct Docume…
jorgecolonconsulting Nov 21, 2016
1003fa4
Added missing requirement ext-mbstring
ivodvb Jan 24, 2017
0c50db8
Merge pull request #133 from ivodvb/mbstring-dependency-update
pentium10 Jan 24, 2017
2c33b9d
Show job age in human readable format in tube view
Feb 22, 2017
301cf72
Show job age in human readable format in tube view
Feb 22, 2017
6bfa3e5
Merge pull request #137 from s22su/show-job-age
pentium10 Feb 22, 2017
ea21e2b
Do not show job age row when row value is zero
Feb 22, 2017
f7f2d7a
Merge pull request #138 from s22su/show-job-age
pentium10 Feb 22, 2017
73a435b
Merge pull request #132 from 2upmedia/master
pentium10 Jul 6, 2017
20ad057
Update config.php
pentium10 Jul 6, 2017
e2d2f44
Add missing files in .dockerignore
Nov 16, 2017
ec3b22e
Upgraded `docker-compose` to '3'
Nov 16, 2017
2678425
Add better documentation for `image` keyword
Nov 16, 2017
9e725ce
Add better port definitions
Nov 16, 2017
35bc5be
Refactor Dockerfile
Nov 16, 2017
2e13d39
Add proper naming-convention
Nov 16, 2017
2a0e2f8
Add proper `php.ini` image deployment
Nov 16, 2017
1756f7e
Fix changing ownership
Nov 16, 2017
d7b3bc0
Cut `ERROR_REPORTING`
Nov 16, 2017
f89a199
Cut `apache_default`
Nov 16, 2017
25b3d5e
Cut not-needed comments
Nov 16, 2017
cb86cb6
Cut `APACHE_PORT`-s
Nov 16, 2017
5b6f4e8
Cut `BEANSTALKD_PORT`
Nov 16, 2017
3842c17
Merge pull request #146 from kamilzabielski/feature/docker
pentium10 Dec 6, 2017
3821f40
Update config.php
pentium10 Dec 6, 2017
4ce0f47
Merge pull request #3 from ptrofimov/master
pentium10 Dec 6, 2017
b6b6211
show human-friendly info for several tube stats
prgTW Dec 14, 2017
9f0a0ef
added input field for kicking jobs
Dec 28, 2017
8823c43
Merge pull request #148 from tsia/master
pentium10 Dec 28, 2017
655d679
Replacing __autoload with spl_autoload_register for PHP 7.2 compatbility
EricTendian Jan 4, 2018
bd5da50
Merge pull request #150 from EricTendian/php7.2-compatibility
pentium10 Jan 4, 2018
5992ea3
Merge pull request #147 from prgTW/patch-1
pentium10 Jan 4, 2018
6b31582
Update currentTubeJobsShowcase.php
pentium10 Jan 4, 2018
d014084
Update config.php
pentium10 Jan 4, 2018
256cd97
Merge pull request #4 from ptrofimov/master
pentium10 Jan 4, 2018
c7b67f8
enhanced kick number with local storage
Jan 4, 2018
3d759f0
Merge pull request #151 from pentium10/master
pentium10 Jan 4, 2018
ba0c5ff
Merge pull request #5 from ptrofimov/master
pentium10 Jan 4, 2018
a78c108
added quick links to speed up jumps inside current tube view
Jan 5, 2018
962e03c
Merge branch 'master' of github.com:pentium10/beanstalk_console
Jan 5, 2018
ca13acd
Merge pull request #152 from pentium10/master
pentium10 Jan 5, 2018
a825ae5
Fix link to beanstalkd protocol specification
mkopinsky Jan 24, 2018
6f1448d
Add detail to page titles
mkopinsky Feb 8, 2018
8ab2831
Add favicon
mkopinsky Feb 8, 2018
39867eb
Cleanup repeated nav stuff
mkopinsky Feb 9, 2018
25f657a
Show server names instead of server IP/port if we have it
mkopinsky Feb 9, 2018
8acc12c
getenv returns false if the variable's not set, rather than null
mkopinsky Feb 9, 2018
f8d750a
Merge pull request #160 from mkopinsky/server-names-in-nav
pentium10 Feb 9, 2018
6c01022
Merge pull request #159 from mkopinsky/protocol-spec
pentium10 Feb 9, 2018
f54681c
Merge pull request #158 from mkopinsky/favicon
pentium10 Feb 9, 2018
9d27c12
Merge pull request #157 from mkopinsky/detailed-title
pentium10 Feb 9, 2018
df5618c
Fixes search by calculating maximum job ID
mmenozzi Mar 6, 2018
d85faf8
Added auto-refresh on load
shaunpud Apr 18, 2018
cc0ddef
Fix
shaunpud Apr 18, 2018
15ff405
Merge pull request #162 from mmenozzi/search-fix
pentium10 Apr 18, 2018
8a3b94b
Merge pull request #164 from shaunpud/master
pentium10 Apr 18, 2018
829dd83
Update config.php
pentium10 Apr 18, 2018
1876e6b
Merge pull request #6 from ptrofimov/master
pentium10 Apr 18, 2018
4cc195d
Fixed auto-refresh on summary page
shaunpud Apr 18, 2018
1a84dd5
Use pretty server label in HTML title
curtisgibby May 2, 2018
501b236
Add button to tube page to kick all buried jobs
danbartram Oct 12, 2018
ee5095b
Highlight buried jobs by changing their color and background-color.
netsmart-fanis Dec 4, 2019
6e6f273
Merge pull request #171 from fanis/master
pentium10 Dec 4, 2019
d6c2200
Merge pull request #168 from danbartram/add-kick-all-button
pentium10 Dec 4, 2019
8de718a
Merge pull request #166 from curtisgibby/patch-1
pentium10 Dec 4, 2019
9a4db88
Merge pull request #165 from shaunpud/master
pentium10 Dec 4, 2019
a84c050
Update config.php
pentium10 Dec 4, 2019
faea3b4
Merge pull request #7 from ptrofimov/master
pentium10 Dec 4, 2019
4aa5ab2
Update composer.json
pentium10 Dec 5, 2019
91f6192
Merge pull request #1 from ptrofimov/master
fanis Dec 11, 2019
7aee4db
Added run commands to get latest updates.
mbarth Apr 14, 2020
c3d0a10
Corrected upgrade command.
mbarth Apr 14, 2020
8d89240
Merge pull request #172 from Finhaven/master
pentium10 Apr 15, 2020
3bdfa76
Fix reference to precise64 box in Vagrantfile
SteenSchutt Jul 7, 2020
e0bd5d5
Merge pull request #173 from SteenSchutt/patch-1
pentium10 Jul 7, 2020
ef2d324
Highlight delayed jobs by changing their color and background-color.
netsmart-fanis Oct 16, 2020
9572a1c
Merge pull request #2 from ptrofimov/master
fanis Oct 16, 2020
7c5c49e
Merge pull request #174 from fanis/highlight_delayed
pentium10 Oct 16, 2020
8cc8d51
Merge pull request #3 from ptrofimov/master
fanis Oct 16, 2020
21efb8d
Highlight paused tubes by changing their border-left colour and show …
netsmart-fanis Nov 16, 2020
a57e205
fixing missing docker image
natsu90 Jul 20, 2021
0af5423
Error in PHP8
daycry Aug 30, 2021
95d5808
Merge pull request #177 from daycry/patch-1
pentium10 Aug 30, 2021
e351c82
Sanitize input
Nav-Prak Feb 1, 2022
8f5bac3
Merge branch 'master' of github.com:ptrofimov/beanstalk_console
Feb 4, 2022
62fd590
Merge pull request #8 from Nav-Prak/master
pentium10 Feb 4, 2022
6ca48e9
improving code by applying filter_input for sanitization
Feb 4, 2022
0f1ec60
Merge pull request #181 from pentium10/master
pentium10 Feb 4, 2022
94b84ea
Merge branch 'highlight_paused' of https://github.com/fanis/beanstalk…
Feb 4, 2022
f8fa58e
improved stats handling
Feb 4, 2022
88254f0
Merge pull request #182 from pentium10/master
pentium10 Feb 4, 2022
d8a3468
Merge pull request #176 from natsu90/missing-docker-image
pentium10 Feb 4, 2022
9876bd0
Update config.php
pentium10 Feb 4, 2022
4a00a87
improvements for php8.1
Feb 4, 2022
6523c20
Merge pull request #183 from pentium10/master
pentium10 Feb 4, 2022
8140e09
Update config.php
pentium10 Feb 4, 2022
5aea5f9
applying htmlspecialchars for sanitization output
noobpk Feb 8, 2022
ced4dec
Merge pull request #184 from noobpk/noobpk-fix-xss
pentium10 Feb 8, 2022
bc3386f
Update config.php
pentium10 Feb 8, 2022
adc43a1
Force int for port due to warning in PHP8
tsmgeek Apr 28, 2022
a275c96
Merge pull request #187 from tsmgeek/patch-2
pentium10 Aug 1, 2022
010a2db
Update config.php
pentium10 Aug 1, 2022
40409f8
Fix PHP version into dockerfile
joubertredrat Aug 8, 2022
60fdfbc
Merge pull request #188 from joubertredrat/fix-dockerfile
pentium10 Aug 8, 2022
b0f2b15
Update config.php
pentium10 Aug 8, 2022
7627c74
[style-fix] Fix button group broken in Chrome UI.
divyekapoor Aug 20, 2022
4683c06
Merge pull request #189 from divyekapoor/master
pentium10 Aug 21, 2022
1f6bb94
Update config.php
pentium10 Aug 21, 2022
f808632
Fix "Undefined variable $serverLabel" warning in php 8+
nyirocsaba Oct 6, 2022
bf5707e
Merge pull request #190 from nyirocsaba/master
pentium10 Oct 9, 2022
b589d53
Update config.php
pentium10 Oct 9, 2022
20b1bda
Merge pull request #9 from ptrofimov/master
pentium10 Oct 9, 2022
0ed850d
Update composer.json
pentium10 Nov 27, 2022
ed678bf
Update config.php
pentium10 Nov 27, 2022
76c4ffb
give the session a name so it does not clash with anything else that …
DavidGoodwin Oct 19, 2023
4324aee
Merge pull request #192 from DavidGoodwin/feature-named-session
pentium10 Oct 19, 2023
b0a37d3
Update config.php
pentium10 Oct 19, 2023
b821518
Merge branch 'master' of github.com:ptrofimov/beanstalk_console
Dec 2, 2024
acf8b02
optimized mass delete/move
Dec 2, 2024
132233e
Merge pull request #194 from pentium10/master
pentium10 Dec 2, 2024
d4d89bd
Update config.php
pentium10 Dec 2, 2024
ba2c040
Adding reuse of already fetched tubes
99kennetn Dec 11, 2024
5e4c6be
Merge pull request #196 from 99kennetn/added-reuse-of-tubes-when-gett…
pentium10 Dec 11, 2024
b6ab9bc
Merge pull request #10 from ptrofimov/master
pentium10 Apr 2, 2025
ca0427e
adds tube filter + improves mass move
Apr 2, 2025
f53202b
Merge pull request #198 from pentium10/master
pentium10 Apr 2, 2025
d937f56
Update config.php
pentium10 Apr 2, 2025
9a9cef0
Merge pull request #11 from ptrofimov/master
pentium10 Apr 2, 2025
1217aaf
fix js regression
Apr 3, 2025
205d7c2
Merge pull request #199 from pentium10/master
pentium10 Apr 3, 2025
d5e315c
Update config.php
pentium10 Apr 3, 2025
074cb50
cosmetic fixes
Apr 3, 2025
2ad8beb
Merge branch 'ptrofimov:master' into master
pentium10 Apr 3, 2025
2a7ea14
Merge pull request #200 from pentium10/master
pentium10 Apr 3, 2025
e1311ba
Merge pull request #12 from ptrofimov/master
pentium10 Apr 4, 2025
21beb42
Implement Default UI Settings from config.php
Apr 10, 2025
1001c62
Merge pull request #204 from pentium10/master
pentium10 Apr 10, 2025
297effa
Merge pull request #13 from ptrofimov/master
pentium10 Apr 10, 2025
9b7fa83
Introduce config.local.php for local configuration overrides
Apr 10, 2025
c785e5c
Merge pull request #205 from pentium10/master
pentium10 Apr 10, 2025
ab043e0
Implement Cache Busting for Static Assets (JS/CSS)
Apr 10, 2025
6b45e50
Merge pull request #206 from pentium10/master
pentium10 Apr 10, 2025
dbf64e9
cosmetic changes
Apr 10, 2025
d8a688d
Update Bootstrap alert class for error message styling
Apr 10, 2025
20f1bb1
Merge pull request #207 from pentium10/master
pentium10 Apr 10, 2025
34d3c47
Merge pull request #14 from ptrofimov/master
pentium10 Apr 10, 2025
16a5fe5
changes on config syntax
Apr 10, 2025
a82e204
Merge pull request #208 from pentium10/master
pentium10 Apr 10, 2025
243d614
Updated env var syntax
kdekooter May 19, 2025
e38adc0
Merge pull request #211 from kdekooter/master
pentium10 May 20, 2025
289d49a
Refactor version management: use BEANSTALK_CONSOLE_VERSION constant i…
pentium10 May 20, 2025
49c09d7
Merge pull request #212 from pentium10/master
pentium10 May 20, 2025
873c5cf
Improve Beanstalkd host in Dockerfile
pentium10 May 20, 2025
b74487a
Merge pull request #213 from pentium10/master
pentium10 May 20, 2025
4226fc8
Update config.php
pentium10 May 20, 2025
94dd3d4
Fix config validation and improve error handling for tube stats
Jun 5, 2026
055768c
Update Docker configuration to use port 8080 and adjust Apache virtua…
Jun 5, 2026
9ed1a04
Enhance autoloading and server stats validation; improve code readabi…
Jun 5, 2026
640d3b8
Merge pull request #215 from pentium10/master
pentium10 Jun 5, 2026
9b2b652
Update config.php
pentium10 Jun 5, 2026
e40d6fc
Add review batch workflow
fanis Jun 25, 2026
e0fdb51
Address review batch safety and destination actions
fanis Jun 25, 2026
7125378
Update PHP version requirement to 7.0.0; refactor code to handle unde…
Jun 28, 2026
62d729b
Enhance Review Batches Interface and Functionality
Jun 28, 2026
21a8779
Merge pull request #15 from ptrofimov/master
pentium10 Jun 28, 2026
03856cf
Merge branch 'master' of github.com:pentium10/beanstalk_console
Jun 28, 2026
fffe944
Merge pull request #219 from pentium10/master
pentium10 Jun 28, 2026
261084b
Bump Beanstalk Console version to 1.9 and update comments for clarity
netsmart-fanis Jun 28, 2026
68601bf
Merge pull request #220 from pentium10/pr-218
pentium10 Jun 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.idea

.gitattributes
.gitignore
.git

.dockerignore
Dockerfile
docker-compose.yml

LICENSE.md
README.md

storage.json

/vendor
nbproject/

.vagrant
vagrant
Vagrantfile
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.idea
/vendor
.vagrant
nbproject/
nbproject/
config.local.php
review-batches/
107 changes: 107 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# Beanstalk Console - Agent Instructions & Guidelines

Welcome! This file contains development guidelines, architectural details, and coding standards for the Beanstalk Console project. All AI agents working on this repository must adhere to these rules.

---

## 1. Project Overview
**Beanstalk Console** is a web-based administration and monitoring console for the [Beanstalkd](https://beanstalkd.github.io/) queue server, written in PHP.

### Key Features
- Server management (global config + user-added servers via cookies/environment).
- Tube statistics and real-time monitoring.
- Job management (peek, kick, delete, add, move jobs between tubes).
- Sample jobs storage (saving job templates to a local JSON file).
- Job search capability.

---

## 2. Architecture & Directory Structure

The project uses a lightweight, custom MVC-like structure without a heavy framework:

- **`public/index.php`**: The main entry point. Handles Basic Authentication, loads configuration, initializes the `Console` controller, and renders the main template.
- **`config.php`**: Contains default configuration settings. **Do not modify this file for local setup.**
- **`config.local.php`**: (Git-ignored) User-specific local configuration overrides.
- **`lib/include.php`**: The core bootstrap file. Contains the custom class autoloader and the `Console` class, which acts as the main controller handling all actions (e.g., `_actionKick`, `_actionAddjob`, `_actionSearch`).
- **`lib/Pheanstalk/`**: A bundled version of the Pheanstalk library (v2/v1, non-namespaced) used to communicate with the Beanstalkd server.
- **`lib/tpl/`**: Contains PHP template files (e.g., `main.php`, `allTubes.php`, `currentTube.php`) rendered by the `Console` class.
- **`src/`**: Contains the core model and utility classes:
- `Model.php`: Base model class using magic getters/setters and late static binding.
- `Server.php`: Represents a Beanstalkd server instance.
- `Settings.php`: Manages UI and user-specific settings.
- `Storage.php` / `IStorage.php`: Handles saving and retrieving sample jobs from `storage.json`.
- **`public/assets/`, `public/css/`, `public/js/`**: Static assets, stylesheet (`customer.css`), and JavaScript logic (`customer.js` + jQuery plugins).

---

## 3. Technology Stack & Compatibility

### Backend (PHP)
- **PHP Version Compatibility**: The project requires and supports **`PHP 7.0.0` through `PHP 8.5+`** (declared as `"php": ">=7.0.0"` in `composer.json`).
- **No Namespaces**: Do not use PHP namespaces. All class names must be unique and defined in the global namespace.
- **Syntax Constraints**:
- **Null Coalescing & Arrays**: Use the null coalescing operator (`??`) and short array syntax (`[]`) freely, as they are fully supported in PHP 7.0+.
- **Avoid PHP 7.4+ features**: Do not use features like arrow functions `fn()`, typed properties, or null coalescing assignment `??=`.
- **Avoid PHP 8.0+ features**: Do not use union types, constructor promotion, match expressions, named arguments, or the nullsafe operator `?->`.
- **Array Key Shielding**: Always shield array key accesses (especially on superglobals like `$_GET`, `$_POST`, `$_SERVER`, and `$_COOKIE`) using `??` to prevent `E_WARNING` warnings on PHP 8.0+.
- **Variable Initialization**: Always initialize array keys before performing operations like accumulation (e.g., `$arr['total'] = 0` before `$arr['total'] += ...`).
- **Autoloading**: Do not rely on Composer's autoloader for the project's own classes. The custom autoloader in `lib/include.php` automatically maps class names to filenames in `src/` and `lib/`.

### Frontend
- **HTML & PHP Templates**: UI markup is mixed with PHP in `lib/tpl/`.
- **CSS**: Plain, vanilla CSS in `public/css/customer.css`. Avoid adding utility classes or external CSS frameworks unless explicitly requested.
- **JavaScript**: jQuery-based interactive logic in `public/js/customer.js`.

---

## 4. Coding Guidelines & Best Practices

### Configuration
- Never commit credentials or local server configurations to `config.php`.
- When adding a new configuration option, add it to `config.php` with a sensible default, and ensure that the configuration check in `config.php` (which verifies if `config.local.php` is missing any keys) is updated if necessary.

### Modifying Business Logic vs. UI
- **Controller/Action Logic**: Keep all request handling, Beanstalkd communication, and data preparation inside the `Console` class in `lib/include.php`.
- **UI/Templates**: Keep the templates in `lib/tpl/` focused purely on rendering. Avoid database/socket communication or complex business logic inside templates.
- **Sample Jobs**: Sample jobs are stored in `storage.json`. Ensure any modification to storage logic implements `IStorage` and is updated in `src/Storage.php`.

### Code Style
- Follow the existing style:
- 4-space indentation for PHP, JS, and CSS.
- `camelCase` for method names (e.g., `getSampleJobs`).
- Prefix action methods with an underscore (e.g., `_actionKick`).
- Keep comments clean, concise, and in English.

---

## 5. Development & Running the Project

### Running Locally (PHP Built-in Server)
To run the console locally without Docker or Vagrant, navigate to the project root and run:
```powershell
php -S localhost:8080 -t public
```
Then open `http://localhost:8080` in your browser.

### Running with Docker
To build and run the Docker container:
```powershell
docker compose up --build
```

### Running with Vagrant
To spin up the Vagrant virtual machine:
```powershell
vagrant up
```

---

## 6. Checklist for Changes
Before finalizing any pull request or change:
1. **PHP Compatibility**: Ensure the code remains compatible with the PHP 7.0 to PHP 8.5+ range. Do not introduce PHP 7.4+ or PHP 8.0+ syntax.
2. **PHP 8 Warnings**: Verify that all array key accesses are shielded (e.g. using `??`) and variables are initialized to avoid PHP 8+ `E_WARNING` warnings.
3. **Local Config**: Verify that `config.local.php` is not tracked by Git.
4. **Storage Permission**: Ensure that any changes to sample jobs do not break the writability check of `storage.json` in `src/Storage.php`.
5. **No Console Errors**: Check the browser console to ensure jQuery and `customer.js` run without errors.
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM php:8.4-apache
LABEL maintainer="Rion Dooley <dooley@tacc.utexas.edu>"

ENV APACHE_DOCROOT="/var/www"

# Configure Apache to listen on port 8080
RUN sed -i 's/Listen 80/Listen 8080/g' /etc/apache2/ports.conf

# Add custom default apache virtual host with combined error and access logging to stdout
COPY docker/apache_vhost /etc/apache2/sites-available/000-default.conf
COPY docker/php.ini /usr/local/etc/php

WORKDIR "${APACHE_DOCROOT}"
COPY . ./

# Ensure Apache runtime directories and docroot are owned by www-data
RUN chown -R www-data:www-data /var/run/apache2 /var/lock/apache2 /var/log/apache2 "${APACHE_DOCROOT}"

USER www-data

CMD ["apache2-foreground"]
84 changes: 45 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,34 @@

**Features**

- Common list of servers in config for all users
- Common list of servers in config for all users + optional Basic Auth
- Global server list can be set via BEANSTALK_SERVERS environment variable
- Each user can add its own personal Beanstalkd server
- Full list of available tubes
- Complete statistics about jobs in tubes
- Realtime auto-update with highlighting of changed values
- You can view jobs in ready/delayed/buried states in every tube
- You can add/kick/delete jobs in every tube
- You can select multiple tubes by regExp and clear them
- You can move jobs between tubes
- Ability to Pause tubes
- Saved jobs (store sample jobs as a template, kick/edit them, very useful for development)
- Customizable UI (code highlighter, choose columns, edit auto refresh seconds, pause tube seconds)
- View jobs in ready/delayed/buried states in every tube
- Highlighting of buried jobs for better visibility
- Add/kick/delete jobs in every tube
- Select multiple tubes by regular expression and clear them
- Saved jobs: Store sample jobs as templates, kick/edit them (useful for development)
- Search within job data fields
- Move jobs between tubes
- Pause tubes
- Prepare review batches by moving jobs into an isolated review tube before moving, duplicating, or deleting them
- Configurable UI settings (auto-refresh, decoding, pause duration, etc.)

**Review batches**

Review batches help inspect a bounded set of jobs without workers changing them during review. From a tube page, click "Prepare review batch", choose the source state, set how many current jobs to review, and choose the review tube name. Ready and delayed jobs can be reviewed when no clients are watching/waiting or when the tube is paused; the dialog can pause the tube and proceed when needed. Buried jobs can be reviewed directly because workers cannot reserve buried jobs.

The review page uses a destination tube field, prefilled with the source tube. Moving jobs to the source tube returns them; changing the destination moves them elsewhere. Existing tubes are suggested, but new tube names can be typed. Selected jobs or all undecided jobs can also be duplicated to the destination or deleted from the review tube. Duplicated jobs remain available for further review actions until their review copy is moved or deleted. Job bodies can be snapshotted to local JSONL during preparation so they remain visible after review copies are moved or deleted.

Review batch files are console-local support files used for auditing, current-state tracking, exports, and optional body display. They are not automatically removed, so delete completed review batches or disable body snapshots if disk growth is a concern.

**Change log**

Navigate to [Releases](https://github.com/ptrofimov/beanstalk_console/releases).

Change log on [Releases](https://github.com/ptrofimov/beanstalk_console/releases).

**Installation**

Expand All @@ -37,50 +51,42 @@ Then, use the `create-project` command to generate a new application:

Composer will install the Beanstalk Console and all its dependencies under the `path/to/install` directory.

### Setup using vagrant

Install [VirtualBox](https://www.virtualbox.org/wiki/Downloads) and [vagrant](http://www.vagrantup.com/downloads.html) then run (from project root):

vagrant up

After provision beanstalk console will be available at [http://localhost:7654](http://localhost:7654) (port could be configured in Vagrantfile)

### Download an Archive File
### Run as a Docker container

[Download](https://github.com/ptrofimov/beanstalk_console/archive/master.zip), unzip files to your *wwww* directory and launch from *public* directory, enjoy!
Install [Docker](https://docs.docker.com/installation/) then build and run with the following command (from project root):

docker build --rm -t beanstalk_console .
docker run -d -p "80:80" --name beanstalk_console beanstalk_console

**Authors:** Petr Trofimov, Sergey Lysenko, Pentium10
If you would rather just run the existing automated build of this project, run (from project root):

--------------------------------------------------
docker run -d -p "80:80" -e APACHE_PORT=80 --name beanstalk_console agaveapi/beanstalkd-console

# Beanstalk консоль ![Русская версия](http://upload.wikimedia.org/wikipedia/en/thumb/f/f3/Flag_of_Russia.svg/22px-Flag_of_Russia.svg.png)
To configure webapp with a custom beanstalk server to load at runtime, set the `BEANSTALKD_HOST` and `BEANSTALKD_PORT` environment variables.

*Административная консоль для сервера очередей [Beanstalk](http://kr.github.com/beanstalkd), написанная на PHP*
docker run -d -p 80:80 \
--name beanstalk_console \
-e 'BEANSTALKD_HOST=beanstalkd' \
-e 'BEANSTALKD_PORT=11300' \
beanstalk_console

**Возможности**
To spin up a console with a beanstalkd server all at once, install [Docker Compose](https://docs.docker.com/compose/) and run (from project root):

- Общий список серверов в конфиге для всех пользователей
- Каждый пользователь может добавить свой персональный сервер
- Полный список доступных труб
- Полная статистика тасков в трубах
- Realtime-обновление с подсветкой изменившихся значений
- Вы можете просматривать таски в каждой трубе (ready/delayed/buried)
- Вы можете выполнять операции с тасками в каждой трубе (add/kick/delete)
docker-compose up

**Установка**
### Setup using vagrant

[Скачайте](https://github.com/ptrofimov/beanstalk_console/archive/master.zip), положите распакованные файлы в www папку и наслаждайтесь!
Install [VirtualBox](https://www.virtualbox.org/wiki/Downloads) and [vagrant](http://www.vagrantup.com/downloads.html) then run (from project root):

**Установка с помощью vagrant**
vagrant up

Установите [VirtualBox](https://www.virtualbox.org/wiki/Downloads) и [vagrant](http://www.vagrantup.com/downloads.html) затем запустите (в корневой директории проекта):
After provision beanstalk console will be available at [http://localhost:7654](http://localhost:7654) (port could be configured in Vagrantfile)

vagrant up
### Download an Archive File

После завершения провизии консоль будет доступна по адресу [http://localhost:7654](http://localhost:7654) (порт можно сконфигурировать в Vagrantfile)
[Download](https://github.com/ptrofimov/beanstalk_console/archive/master.zip), unzip files to your *www* directory and launch from *public* directory, enjoy!

**Авторы:** Петр Трофимов, Сергей Лысенко, Pentium10
**Authors:** Petr Trofimov, Sergey Lysenko, Pentium10

--------------------------------------------------

Expand Down
4 changes: 2 additions & 2 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.box = "hashicorp/precise64"
config.vm.box_url = "https://vagrantcloud.com/hashicorp/boxes/precise64/versions/1.1.0/providers/virtualbox.box"

# expose ports
config.vm.network :forwarded_port, host: 7654, guest: 80
Expand Down
9 changes: 5 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"description": "Admin console for Beanstalk queue server",
"keywords": ["beanstalk", "beanstalkd", "queue", "console", "gui", "admin", "web admin", "monitoring", "stats", "interface", "php"],
"type": "project",
"authors": [
"authors": [
{
"name": "Petr Trofimov"
},
{
"name": "Sergey Lysenko"
},
{
{
"name": "Pentium10"
}
],
Expand All @@ -19,7 +19,8 @@
},
"license": "MIT",
"require": {
"php": ">=5.2.0",
"ext-json": "*"
"php": ">=7.0.0",
"ext-json": "*",
"ext-mbstring": "*"
}
}
Loading