-
Notifications
You must be signed in to change notification settings - Fork 1
Usage
The Modeler is written in Javascript, running on a NodeJS backend and distributed via NPM. They're bundled together, so make sure NodeJS is installed.
npm install jefri-modeler
npm start jefri-modeler
The Modeler application is now installed in ./node_modules/jefri-modeler
and being served at http://localhost:3000/
Click "Load Sample" to get a starting feel for how to use the modeler. This is a simple network model. It has routers, which for this particular app will be things that give out IP addresses, and hosts, machines connected to routers. You can drag the entities around to better see and lay them out. Let's add a property to the Router entity. Click + Property in the Router entity. The new property is there, but named property_1. Click on the new property. Double click in the text box, and change the name to "subnet". Click the Check box next to the type dropdown. If you scroll down in the context JSON on the control pane, to the right, you'll see the new property.
Now, let's add a new entity. Click the "New Entity" button at the top of the control panel, on the right. The entity is titled entity_1. Click the entity title, and rename it to User. Add three properties, "user_id", "username", and "host_id". Set the key for this entity, by checking the radio next to "user_id". In this app, users will be able to have many hosts. Click on + Relationship under "User". Expand the relationship editor by clicking on the relationship. Rename the relationship "workstation". Select "Host" from the "Type:" dropdown. Select "host_id" in both the from and too dropdowns. Leave the back relationship as "none". Click the done Checkmark
Click "Manage Context". When the pop-up appears, click "Save" on the left, then "Context" on the top. Enter "network" in the field. Click "Save context". Congratulations, you saved your first context in your browser's html5 LocalStorage!