Version: v0.70 (2026-08-01)
Type: PHP/Perl Web Application
Database: SQLite (ko_center.db3)
Location: /os/ai/io/ko_center.php
ko_center is a single-file web application that provides a centralized dashboard for managing and monitoring system resources. It uses SQLite as its backend database and generates HTML pages dynamically via PHP.
The system provides:
Access the system by navigating to the ko_center URL. If not logged in, the system presents a login form.
URL: http://<host>/ko_center/ko_center.php
Login credentials are validated against the hosts.allow file
located at /os/ai/io/../safer/hosts.allow.
Once logged in, the user's role determines which features and data they can access.
Click the logout button (white icon) in the navigation bar to end your session.
$_SESSION)
to track logged-in users. The session stores the user's role, which controls
access to different features.
The main navigation bar provides quick access to all major features via button squares. Available buttons depend on user role:
| Button | URL | Description |
|---|---|---|
| Leds | ?q=leds | LED indicator display |
| Grid | ?q=db/grid | Database grid views |
| KB | ?q=kb | Knowledge Base |
| Reports | ?q=reports | Reports & exports |
| Certs | ?q=certs | Certificate management |
| Nodes | ?q=nodes | Node/Host management |
| HW | ?q=hw | Hardware inventory |
| Plans | ?q=plans | Plan management |
| Config | ?q=config | System configuration |
| Login | ?q=login | Login form |
| Logout | ?q=logout | End session |
| Tools | ?q=tools | System tools |
The system uses the q query parameter for routing. The
parameter value is split by / to determine the page and
sub-actions.
ko_center.php?q=<page>/<action>/<id>
| URL | Page | Action |
|---|---|---|
?q=leds | LED Display | Show all current LEDs |
?q=leds/detail/cab1 | LED Detail | Show detail for cab1 |
?q=kb | Knowledge Base | List KB entries |
?q=kb/new | KB | Create new KB entry |
?q=kb/view/123 | KB | View KB entry #123 |
?q=reports/rpt | Reports | Run a report |
?q=reports/sql | Reports | SQL query interface |
?q=db/grid/ko_center/leds | Grid | Grid view of leds table |
?q=hw | Hardware | Hardware inventory |
?q=hw/cab1 | Hardware | Hardware for cab1 |
?q=trigger | Trigger | Broadcast refresh signal |
?q=login | Login | Login form |
?q=logout | Logout | End session |
?q=config | Config | System configuration |
?q=zoom/code/type/rowid | Zoom | Zoom viewer with hotspot |
?q=zview/file/xml | ZView | Full-screen zoom view |
?q=ptviewer | PTViewer | Panorama viewer |
?q=ptobject | PTObject | Panorama object |
?q=about | About | About page |
?q=konet | Konet | Contact information |
?q=form_request_access | Access | Request access form |
The LED display system is the core visual component of ko_center. Each LED record represents a monitored item with configurable visual properties.
| Field | Description |
|---|---|
led_id | Unique identifier (auto-increment) |
led_status | Current status (active/inactive) |
led_code | Short code identifier |
led_name | Display name of the LED |
led_dttm | Timestamp marker ("current" for active records) |
led_color | Indicator color (red, yellow, blue, green, pink, orange, black, white, trans) |
led_speed | Blink speed (0-3: no blink, slow, medium, fast) |
led_type | LED type: manual, date, cmd, null |
led_date | Date value (used with date-type LEDs) |
led_cmd | Shell command to execute (used with cmd-type LEDs) |
led_cmdout | Command output |
led_desc | Description text |
led_misc | Miscellaneous data |
led_city | Location: city |
led_bldg | Location: building |
led_loc_code | Location code |
led_floor | Location: floor |
led_group | Group assignment |
led_orgs | Organization assignment |
led_title | Title/label |
led_published | Published flag (1/0) |
led_width | Display width |
led_height | Display height |
led_comment | User comment |
led_filename | Associated file name |
led_user | User who created/modified |
led_user_ip | IP address of user |
led_referer | HTTP referer |
led_remote_port | Remote port number |
led_viewrole | Role required to view |
led_user_agent | Browser user agent string |
led_unique_id | Unique identifier string |
led_err | Error flag |
led_fix | Fix status |
led_os | Operating system |
| Type | Behavior |
|---|---|
manual | Static indicator with configurable color and blink speed |
date | Calculates days from a target date; color and speed change based on proximity |
cmd | Executes a shell command; shows green if command succeeds, red if it fails |
null | Shows a null/blank indicator |
LEDs use animated GIF files for blinking effects. The GIF filename is constructed from the color and speed:
ani_colorspeed.gif
Example: ani_red1.gif (red, slow blink)
Clicking an LED name navigates to the detail view (?q=detail/<name>),
which shows associated hardware items, images, and metadata.
The grid system provides sortable, filterable table views of any database table. It supports pagination, column sorting, and inline editing.
ko_center.php?q=db/grid/<dbcode>/<table>
Or use the shortcut:
ko_center.php?q=grid?dbcode=<dbcode>&table=<table>
The system supports multiple database files with role-based access:
ko_center.db3 — Main center database (leds, randomus, ko_plans, ko_hw, etc.)koaac_kb.db3 — Knowledge Base databaseko_center_certs.db3 — Certificates databaseThe reports system provides three types of report views:
Run custom SQL queries against the database and view results in a table.
ko_center.php?q=reports/sql
Export query results as CSV files for spreadsheet processing.
ko_center.php?q=reports/rpt/<rptcode>&fmt=header_csv
Export query results as XML for programmatic consumption.
ko_center.php?q=kb/rpts/rpt_id&fmt=xml
| Report | URL | Description |
|---|---|---|
| LED Reports | ?q=leds/rpts | LED status and configuration reports |
| KB Reports | ?q=kb/rpts | Knowledge Base article reports |
| Datacenter Reports | ?q=dc/rpts | Datacenter infrastructure reports |
| Certificate Reports | ?q=certs/rpts | Certificate status reports |
| Console Reports | ?q=cons/rpts | Console/log reports |
| Host Reports | ?q=hosts/rpts | Host inventory reports |
| ko_centerd Reports | ?q=ko_centerd/rpts | ko_center daemon reports |
| Node Reports | ?q=nodes/rpts | Node/network reports |
The Knowledge Base (KB) system allows users to create, view, and manage
articles. KB entries are stored in the koaac_kb table in the
ko_center.db3 database.
| Field | Type | Description |
|---|---|---|
kb_id | INTEGER PK | Auto-increment primary key |
kb_title | VARCHAR | Article title |
kb_body | TEXT | Article content |
kb_dttm | VARCHAR | Timestamp |
kb_user | VARCHAR | Author username |
kb_type | VARCHAR | Article type/category |
?q=kb — View all KB entries?q=kb/new — Create a new article?q=kb/view/<id> — Read an article?q=kb/mod/<id> — Edit an article?q=kb/rpts — View KB reportsThe certificate management system allows viewing and managing digital
certificates stored in the ko_center_certs.db3 database.
?q=certs — View all certificates?q=certs/view/<code> — View certificate details?q=certs/rpts — Certificate status reportsThe node management system tracks network nodes and hosts. Nodes are displayed with their status, location, and associated metadata.
?q=nodes — View all nodes?q=nodes/rpts — Node reportsThe hardware inventory system tracks physical equipment with details such as model, serial number, IP address, HRC tag, and associated cabinet/location.
?q=hw — View all hardware?q=hw&cab=cab1 — Filter by cabinet?q=hw&item=item1 — Filter by item?q=hw&sn=SN123 — Filter by serial number?q=hw&ip=10.0.0.1 — Filter by IP address?q=hw&hrctag=TAG123 — Filter by HRC tagThe plans system tracks project plans with steps, items, and status tracking.
?q=plans — View all plans?q=plans/view — View plan details?q=plans/steps — View plan steps?q=plans/items — View plan items?q=plans/reports — Plan reportsThe tools section provides access to various system utilities:
Data cleanup and maintenance tool.
ko_center.php?q=scrub
File upload utility for KB attachments and other files.
ko_center.php?q=upload
Interactive zoomable image viewer with hotspot navigation.
ko_center.php?q=zoom/<code>/<type>/<rowid>
Full-screen zoom view with XML-based hotspot configuration.
ko_center.php?q=zview/<file>/<xml>
Panorama/tour viewer for 360-degree images.
ko_center.php?q=ptviewer
Individual panorama object viewer.
ko_center.php?q=ptobject
The trigger system allows one browser to signal all other browsers to refresh their views. This is useful when one user makes a change that should be immediately visible to all other users.
ko_center.php?q=triggerko_trigger.datko_center.php?q=trigger
The endpoint accepts an optional last_check parameter:
ko_center.php?q=trigger&last_check=2026-08-01 07:00:00
{
"triggered": true,
"timestamp": "2026-08-01 07:05:00",
"since": "2026-08-01 07:00:00"
}
The client page includes JavaScript that polls the trigger endpoint every few seconds. When a new trigger is detected, the browser automatically reloads.
Location: /os/ai/io/ko_center.db3 (39.6 MB)
| Table | Description | Row Count |
|---|---|---|
leds | LED indicator records | 262 |
randomus | Random user data | 101 |
leds_randomus | Combined LED + randomus data | 101 |
ko_plans | Project plans | — |
ko_hw | Hardware inventory | — |
koaac_kb | Knowledge Base articles | — |
nodes | Network nodes | — |
roles | User roles | — |
users | User accounts | — |
cabs | Cabinet/rack data | — |
hrc_datacenters_equipment | Datacenter equipment | — |
defrag_plan | Defragmentation plans | — |
periods | Time periods | — |
rpts | Report definitions | — |
cfg | Configuration settings | — |
dbs | Database registry | — |
menus | Menu definitions | — |
fp | Floor plan data | — |
grid | Grid configuration | — |
us | User-specific data | — |
n11 | N11 monitoring data | — |
pano | Panorama data | — |
obj | Object data | — |
zoom | Zoom configuration | — |
zoomxml | Zoom XML data | — |
shelves | Shelf data | — |
hallo | Hallo data | — |
halo | Halo data | — |
nimbus | Nimbus data | — |
aureole | Aureole data | — |
leds_defaults | LED default settings | — |
leds_racks | LED rack mappings | — |
leds_randomus | Combined LED + randomus | 101 |
The leds_randomus table combines the schema of the
leds table (all columns, with LED fields blank/NULL) with all
columns from the randomus table. It contains only records from
the randomus table (101 rows).
Creation script: /os/ai/io/new_leds.py
| File | Description |
|---|---|
/os/ai/io/ko_center.php | Main application (PHP, 16,322 lines, 205 functions) |
/os/ai/io/ko_center.db3 | SQLite database (39.6 MB) |
/os/ai/io/ko_center.py | Python Flask equivalent of ko_center.php |
/os/ai/io/new_leds.py | Script to create leds_randomus from leds + randomus |
/os/ai/io/new_leds_tbl.py | Generalized script to create leds_<tbl2> from leds + any table |
/os/ai/io/cr_leds.py | Script to create blinking LED GIF images |
/os/ai/io/response_trigger_plan.txt | Trigger mechanism design document |
/os/ai/io/prompt_php_trigger.txt | Original prompt for trigger feature |
/os/ai/io/prompt_cr_icons.txt | Original prompt for LED GIF creation |
/os/ai/io/prompt_sql3_leds_randomus.txt | Original prompt for leds_randomus table |
/os/ai/io/ko_center.html | This user documentation file |
/os/ai/io/ko_trigger.dat | Trigger timestamp file (created at runtime) |
/os/ai/io/../safer/hosts.allow | Authentication/authorization file |
/os/ai/io/ko_center/kb/ | Knowledge Base file storage directory |
/os/ai/io/ko_center/db3/ | Database files directory |
/os/ai/io/images/btn/ | Button image assets |
/os/ai/io/images/ani/ | Animated LED GIF images |
/os/ai/io/images/fpb/ | Floor plan button images |
A Python Flask equivalent of ko_center.php has been created at
/os/ai/io/ko_center.py. It provides the same core functionality:
?q= URL routingsqlite3 module?q=trigger)Running the Python version:
python3 /os/ai/io/ko_center.py
Then browse to http://localhost:5000
The cr_leds.py script generates blinking LED GIF images using
ImageMagick. For each color (red, yellow, blue, green, pink, orange, black,
white, transparent) and each speed (0=no blink, 1=slow, 2=medium, 3=fast),
it creates an animated GIF file.
Usage:
python3 cr_leds.py <static_image.png> <dynamic_image.png>
Output files:
led_<prefix>_red_0.gif (no blink) led_<prefix>_red_1.gif (slow blink) led_<prefix>_red_2.gif (medium blink) led_<prefix>_red_3.gif (fast blink) led_<prefix>_yellow_0.gif ... led_<prefix>_trans_3.gif
There are 9 colors × 4 speeds = 36 GIF files per static image.
admin.html