Monitor webpage - project-SIMPLE/simple.webplatform GitHub Wiki
Once you've launched the program, you can access the monitor page by connecting to localhost:app_port
.
[!NOTE]
app_port
depends on the port you enter insettings.json
. By default, it's 8000. In the default case, The web link would belocalhost:8000
.
The monitor webpage has 2 main pages:
- A main page called Monitor
- A settings page called Settings
Monitor page
This page is divided into two sections: the Gama Server section and the Players section.
-
The Gama Server section contains all information and actions relating to Gama Server control.
- You can first connect to it, if you haven't already done so, by clicking on
Try Connection
. - The page includes information on the status of the simulation.
- It also includes buttons for launching and monitoring a simulation. To change the GAML file to be loaded for simulation, go to the Settings page.
- You can first connect to it, if you haven't already done so, by clicking on
-
The Players section contains all player-related information and actions. When a player connects to the middleware via websocket (at the
player_port
), he appears in this section, which is a kind of waiting room. When the simulation is launched, you can add players to the simulation one by one.- When a player is in red, it means he's disconnected.
- Orange means he's connected to the middleware but not in the simulation. They are therefore waiting to be added.
- Green means he's connected and in the simulation. The player can therefore play freely.
[!NOTE]
To understand how to connect players to the middleware, please visit the 'Create your own game' page.
Settings page
The settings page is simply a page for modifying settings.json
values. Moreover, when you click on Load & Reset button, it will restart all middleware servers and connectors in order to change the connection ports (if any have been modified).
Settings for Gama Server
The parameters included in this section relate to the connection and management of Gama Server.
- Ip adress contains the address of Gama Server (ipv4 format of 'localhost' if Gama Server and the middleware are running on the same device)
[!TIP]
You shoud run Gama Server and Gama Server Middleware on the same device, and use (if you want) the monitor webpage on a different device in the same sub-network. In that case, Ip address would contain 'localhost'.
- Websocket port contains the port of Gama Server.
[!IMPORTANT]
When Gama Server is launched, you can view the port used by Gama Server for the Websocket connection in the console or in the settings (in the case of Gama Server GUI). It is important to enter this port number in the websocket port variable in the middleware. Without it, the middleware won't be able to connect properly to Gama Server.
- Model file path is the variable containing the access path to the GAML model you wish to load.
- Model file type is used to indicate whether the model path is absolute or relative to the project folder.
[!TIP] I recommend putting all GAML models in the
models
folder.
- Experiment name contains the name of the experiment of you model you want to load.
Settings for players
-
Websocket port is the port the middleware will use to open a Websocket Server for listening and managing player connections. You can choose any port you want, but remember that you will have to notice it in the code of the player program.
-
Web interface is a checkbox you can select if you want an HTML page for the players. In this case, you'll be able to access this page by connecting via HTTP to the ip_adress_gama_server_middleware:app_port/player page. In the default case, this will be localhost:8000/player.
-
HTML File is the file you want to load when someone will go to the page ip_adress_gama_server_middleware:app_port/player page. Web interface checkbox must be true if you want to use this variable.
[!TIP] The two last variable would be useful if you want to create you own game using a HTML file for player interface.
Settings for monitor
-
Monitor websocket port is the port for the monitor. I has no effects on the operation. You just should change it if the port is in conflict with another program.
-
App port is the HTTP port for getting the monitor webpage. You can also get the player webpage if Player Web interface is checked. By default, the port is 8000.
Last but not least, by clicking on 'Help', you will be redirected to this wiki page.
Page description
In this section, I present you every buttons and information displayed on the Monitor Page.
- Button to access to the monitor page
- Button to access to the settings page
- Button to access to the Wiki page
- Button to try the connection with gama server
- Information about the connection status with Gama Server. If it's not connected, try to fix the problem by checking that Gama Server is launched, and to report the port used by Gama Server in the settings page. Then, click on 'Try Connection'
- Information about the simulation status
- Button to launch the simulation (check that the model is the one you want to load in Settings Page)
- Button to start the simulation
- Button to pause the simulation
- Button to stop the simulation
- Nothing ;)
- Button to add to Gama every players that are connected to the middleware. Every players in orange will be in green after this operation.
- Button to remove from the simulation every players. Everey player in green will be in orange after this operation.
- Button to clean every players that are disconnected from the middleware and not in the game. Every player in red and status=Not in game will disappear from the display after this operation.
- Button to add the current player to the simulation
- Button to remove the current player from the simulation
- Information about the id of the player. The id is given by the player during the first connection.
- Information about the status of the player to Gama. In game means that the player is in the simulation.
- Infomation about the date of connection.