NOTICE: All information contained herein is, and remains
the property of TechnoCore.
The intellectual and technical concepts contained
herein are proprietary to TechnoCore and dissemination of this information or reproduction of this material
is strictly forbidden unless prior written permission is obtained
from TechnoCore.
The ObjTextKnob module provides a text processing object that generates a circular, dial-like input control known as a "knob." It is designed to be used within the Axion text processing engine to create interactive, visually appealing controls for numeric input.
This module generates the necessary HTML and CSS to render a knob control using the jQuery.knob.js library. It also dynamically adds the required JavaScript and CSS files to the page resources. The knob displays a value, which can be adjusted by the user, and an optional label underneath.
The Process method accepts the following parameters:
| Parameter | Description | Type |
|---|---|---|
Param1 |
The initial value to display on the knob. | String |
Param2 |
An optional label to display below the knob. | String |
Param3 |
Not used. | - |
Param4 |
Not used. | - |
Param5 |
Not used. | - |
Param6 |
Not used. | - |
Param7 |
Not used. | - |
Param8 |
Not used. | - |
To create a knob control with a value of 75 and the label "CPU Usage", you can use the following syntax within a text field processed by the engine:
{knob:75:CPU Usage}
This will generate an interactive knob element on the page.
cythonize -3 -a -i ObjTextKnob.py
Compiling /home/axion/projects/axion/factory.text/ObjTextKnob.py because it changed..[1/1] Cythonizing /home/axion/projects/axion/factory.text/ObjTextKnob.py
Updated : 2025-10-02
{knob:value|label|min|max|size} renders ObjReportKnob
(factory.report/package.widgets), the platform's dial. This module
produces no markup of its own.
| Before | Now | |
|---|---|---|
| Drawing | jquery.knob canvas plugin |
vanilla SVG arc |
| Init | $(document).bind('ready') — not jQuery-3 compatible, never fired |
none needed |
| Colour | hardcoded rgb(147, 42, 182) |
palette band computed from the value |
| Assets | jquery.knob.js + .css |
none |
Kept rather than deleted because {knob:} may appear in page text
held in def_report.Query rows, which the repository cannot be
grepped for. One implementation of the dial, two ways to reach it.
The widget is handed a single row — [value, title, min, max, size] —
through inject(), which bypasses the def_report query and makes
the widget render a static snapshot with polling off. That is the
right mode here: the value came from the marker, not from a query the
widget could re-run. A negative max inverts the colour scale
(high = good); the marker forwards that rather than reimplementing it.
No def_report row is read. _Reportcode is the only attribute
render() needs from one, and it names the RPC endpoint that the
injected path never calls.
inject() was unreachable on widgets until this changeObjReportWidgetbase.render() had always implemented the injected
branch, but the widget classes do not descend from ObjReport.Report
— so inject resolved to Objects.Object.inject(target), a
different method with a different argument. See
resource.test/pytests/factory.report/test_ObjReportWidgetbase_inject.py.