Axiom Inspector

view and edit your application's objects

Axiom Inspector

The Axiom Inspector module lets you view and edit your application's objects, create new objects, and interact with the Axiom Javascript environment via an interactive shell.


Setup

1. Download the inspector module and place it in modules/inspector, then add inspector to the list of modules in app.properties.

2. The inspector will not load unless you define a user and password in your application's app.properties. Do so with the following properties:

inspector.user = username
inspector.password = password

3.(Optional) By default, the inspector is available at /inspector. Optionally, you can change that by defining a new mountpoint in your app.properties file:

inspector.mountpoint = mountpoint

Axiom will need to be restarted before these settings will take effect.

4.If you are altering the behavior of Root's URL by means of rewrite.properties, then you may need to add a line like the following to allow access to the inspector.

/inspector-mountpoint = /inspector-mountpoint

5. Finally, you need to allow http access to the inspector mountpoint (security will be handled with the username and password you've defined above). Add the following line to your application's Root/security.properties (If there is no Root directory, simply create one).

inspector = @Anyone

If you've defined a custom mountpoint in step 3, use that instead of "inspector".


Use

Object Explorer

  • To traverse through your objects, use the explorer-like tree on the left. Each object is displayed as id (prototype).
  • Click the (+) icon next an object to view its children.
  • Left-clicking on the object's id will open a new tab with a form where you can view and edit the object's properties.
  • Right-clicking on a object will open a context menu with options to delete the selected object, refresh the object's display or add a new object to the selected object's children.

Javascript Shell

  • The shell can be toggled between single-line interpreter mode and multi-line mode (akin to Firebug).
  • While in single-line mode, use the up and down arrow keys to page through previously entered commands.
  • The value returned from the shell is the value of the entire expression. With an expression composed of multiple statements like foo(); bar(); baz();, the value of the last statement is the value of the expression; here, the result of baz();.
  • The shell has a built-in println function. Example:
for(var i=0;i<4;i++){
println(i);
}
app.getName();

Returns:

>>> for(var i=0;i<4;i++){ println(i); } app.getName();
0
1
2
3
cuervo